@dcl/auth-site 2.1.1-13239233428.commit-2de01c8 → 2.1.1-13239440432.commit-2fa6a22

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.
@@ -107,7 +107,7 @@ Instead of \``+pt+"`, did you mean:",Ot.map(function(Nt){return`
107
107
  || ${Bt} === "boolean" || ${kt} === null`).assign(zt,(0,_e._)`[${kt}]`)}}}function Et({gen:Tt,parentData:Rt,parentDataProperty:Ct},It){Tt.if((0,_e._)`${Rt} !== undefined`,()=>Tt.assign((0,_e._)`${Rt}[${Ct}]`,It))}function $t(Tt,Rt,Ct,It=tt.Correct){const kt=It===tt.Correct?_e.operators.EQ:_e.operators.NEQ;let Dt;switch(Tt){case"null":return(0,_e._)`${Rt} ${kt} null`;case"array":Dt=(0,_e._)`Array.isArray(${Rt})`;break;case"object":Dt=(0,_e._)`${Rt} && typeof ${Rt} == "object" && !Array.isArray(${Rt})`;break;case"integer":Dt=Bt((0,_e._)`!(${Rt} % 1) && !isNaN(${Rt})`);break;case"number":Dt=Bt();break;default:return(0,_e._)`typeof ${Rt} ${kt} ${Tt}`}return It===tt.Correct?Dt:(0,_e.not)(Dt);function Bt(zt=_e.nil){return(0,_e.and)((0,_e._)`typeof ${Rt} == "number"`,zt,Ct?(0,_e._)`isFinite(${Rt})`:_e.nil)}}a.checkDataType=$t;function _t(Tt,Rt,Ct,It){if(Tt.length===1)return $t(Tt[0],Rt,Ct,It);let kt;const Dt=(0,et.toHash)(Tt);if(Dt.array&&Dt.object){const Bt=(0,_e._)`typeof ${Rt} != "object"`;kt=Dt.null?Bt:(0,_e._)`!${Rt} || ${Bt}`,delete Dt.null,delete Dt.array,delete Dt.object}else kt=_e.nil;Dt.number&&delete Dt.integer;for(const Bt in Dt)kt=(0,_e.and)(kt,$t(Bt,Rt,Ct,It));return kt}a.checkDataTypes=_t;const xt={message:({schema:Tt})=>`must be ${Tt}`,params:({schema:Tt,schemaValue:Rt})=>typeof Tt=="string"?(0,_e._)`{type: ${Tt}}`:(0,_e._)`{type: ${Rt}}`};function St(Tt){const Rt=Mt(Tt);(0,j.reportError)(Rt,xt)}a.reportTypeError=St;function Mt(Tt){const{gen:Rt,data:Ct,schema:It}=Tt,kt=(0,et.schemaRefOrVal)(Tt,It,"type");return{gen:Rt,keyword:"type",data:Ct,schema:It.type,schemaCode:kt,schemaValue:kt,parentSchema:It,params:{},it:Tt}}})(dataType);var defaults={};Object.defineProperty(defaults,"__esModule",{value:!0});defaults.assignDefaults=void 0;const codegen_1$s=codegen,util_1$p=util$1;function assignDefaults(a,_){const{properties:$,items:j}=a.schema;if(_==="object"&&$)for(const _e in $)assignDefault(a,_e,$[_e].default);else _==="array"&&Array.isArray(j)&&j.forEach((_e,et)=>assignDefault(a,et,_e.default))}defaults.assignDefaults=assignDefaults;function assignDefault(a,_,$){const{gen:j,compositeRule:_e,data:et,opts:tt}=a;if($===void 0)return;const rt=(0,codegen_1$s._)`${et}${(0,codegen_1$s.getProperty)(_)}`;if(_e){(0,util_1$p.checkStrictMode)(a,`default is ignored for: ${rt}`);return}let at=(0,codegen_1$s._)`${rt} === undefined`;tt.useDefaults==="empty"&&(at=(0,codegen_1$s._)`${at} || ${rt} === null || ${rt} === ""`),j.if(at,(0,codegen_1$s._)`${rt} = ${(0,codegen_1$s.stringify)($)}`)}var keyword={},code$1={};Object.defineProperty(code$1,"__esModule",{value:!0});code$1.validateUnion=code$1.validateArray=code$1.usePattern=code$1.callValidateCode=code$1.schemaProperties=code$1.allSchemaProperties=code$1.noPropertyInData=code$1.propertyInData=code$1.isOwnProperty=code$1.hasPropFunc=code$1.reportMissingProp=code$1.checkMissingProp=code$1.checkReportMissingProp=void 0;const codegen_1$r=codegen,util_1$o=util$1,names_1$5=names$1,util_2$1=util$1;function checkReportMissingProp(a,_){const{gen:$,data:j,it:_e}=a;$.if(noPropertyInData($,j,_,_e.opts.ownProperties),()=>{a.setParams({missingProperty:(0,codegen_1$r._)`${_}`},!0),a.error()})}code$1.checkReportMissingProp=checkReportMissingProp;function checkMissingProp({gen:a,data:_,it:{opts:$}},j,_e){return(0,codegen_1$r.or)(...j.map(et=>(0,codegen_1$r.and)(noPropertyInData(a,_,et,$.ownProperties),(0,codegen_1$r._)`${_e} = ${et}`)))}code$1.checkMissingProp=checkMissingProp;function reportMissingProp(a,_){a.setParams({missingProperty:_},!0),a.error()}code$1.reportMissingProp=reportMissingProp;function hasPropFunc(a){return a.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,codegen_1$r._)`Object.prototype.hasOwnProperty`})}code$1.hasPropFunc=hasPropFunc;function isOwnProperty(a,_,$){return(0,codegen_1$r._)`${hasPropFunc(a)}.call(${_}, ${$})`}code$1.isOwnProperty=isOwnProperty;function propertyInData(a,_,$,j){const _e=(0,codegen_1$r._)`${_}${(0,codegen_1$r.getProperty)($)} !== undefined`;return j?(0,codegen_1$r._)`${_e} && ${isOwnProperty(a,_,$)}`:_e}code$1.propertyInData=propertyInData;function noPropertyInData(a,_,$,j){const _e=(0,codegen_1$r._)`${_}${(0,codegen_1$r.getProperty)($)} === undefined`;return j?(0,codegen_1$r.or)(_e,(0,codegen_1$r.not)(isOwnProperty(a,_,$))):_e}code$1.noPropertyInData=noPropertyInData;function allSchemaProperties(a){return a?Object.keys(a).filter(_=>_!=="__proto__"):[]}code$1.allSchemaProperties=allSchemaProperties;function schemaProperties(a,_){return allSchemaProperties(_).filter($=>!(0,util_1$o.alwaysValidSchema)(a,_[$]))}code$1.schemaProperties=schemaProperties;function callValidateCode({schemaCode:a,data:_,it:{gen:$,topSchemaRef:j,schemaPath:_e,errorPath:et},it:tt},rt,at,ct){const dt=ct?(0,codegen_1$r._)`${a}, ${_}, ${j}${_e}`:_,yt=[[names_1$5.default.instancePath,(0,codegen_1$r.strConcat)(names_1$5.default.instancePath,et)],[names_1$5.default.parentData,tt.parentData],[names_1$5.default.parentDataProperty,tt.parentDataProperty],[names_1$5.default.rootData,names_1$5.default.rootData]];tt.opts.dynamicRef&&yt.push([names_1$5.default.dynamicAnchors,names_1$5.default.dynamicAnchors]);const bt=(0,codegen_1$r._)`${dt}, ${$.object(...yt)}`;return at!==codegen_1$r.nil?(0,codegen_1$r._)`${rt}.call(${at}, ${bt})`:(0,codegen_1$r._)`${rt}(${bt})`}code$1.callValidateCode=callValidateCode;const newRegExp=(0,codegen_1$r._)`new RegExp`;function usePattern$1({gen:a,it:{opts:_}},$){const j=_.unicodeRegExp?"u":"",{regExp:_e}=_.code,et=_e($,j);return a.scopeValue("pattern",{key:et.toString(),ref:et,code:(0,codegen_1$r._)`${_e.code==="new RegExp"?newRegExp:(0,util_2$1.useFunc)(a,_e)}(${$}, ${j})`})}code$1.usePattern=usePattern$1;function validateArray(a){const{gen:_,data:$,keyword:j,it:_e}=a,et=_.name("valid");if(_e.allErrors){const rt=_.let("valid",!0);return tt(()=>_.assign(rt,!1)),rt}return _.var(et,!0),tt(()=>_.break()),et;function tt(rt){const at=_.const("len",(0,codegen_1$r._)`${$}.length`);_.forRange("i",0,at,ct=>{a.subschema({keyword:j,dataProp:ct,dataPropType:util_1$o.Type.Num},et),_.if((0,codegen_1$r.not)(et),rt)})}}code$1.validateArray=validateArray;function validateUnion(a){const{gen:_,schema:$,keyword:j,it:_e}=a;if(!Array.isArray($))throw new Error("ajv implementation error");if($.some(at=>(0,util_1$o.alwaysValidSchema)(_e,at))&&!_e.opts.unevaluated)return;const tt=_.let("valid",!1),rt=_.name("_valid");_.block(()=>$.forEach((at,ct)=>{const dt=a.subschema({keyword:j,schemaProp:ct,compositeRule:!0},rt);_.assign(tt,(0,codegen_1$r._)`${tt} || ${rt}`),a.mergeValidEvaluated(dt,rt)||_.if((0,codegen_1$r.not)(tt))})),a.result(tt,()=>a.reset(),()=>a.error(!0))}code$1.validateUnion=validateUnion;Object.defineProperty(keyword,"__esModule",{value:!0});keyword.validateKeywordUsage=keyword.validSchemaType=keyword.funcKeywordCode=keyword.macroKeywordCode=void 0;const codegen_1$q=codegen,names_1$4=names$1,code_1$9=code$1,errors_1$1=errors;function macroKeywordCode(a,_){const{gen:$,keyword:j,schema:_e,parentSchema:et,it:tt}=a,rt=_.macro.call(tt.self,_e,et,tt),at=useKeyword($,j,rt);tt.opts.validateSchema!==!1&&tt.self.validateSchema(rt,!0);const ct=$.name("valid");a.subschema({schema:rt,schemaPath:codegen_1$q.nil,errSchemaPath:`${tt.errSchemaPath}/${j}`,topSchemaRef:at,compositeRule:!0},ct),a.pass(ct,()=>a.error(!0))}keyword.macroKeywordCode=macroKeywordCode;function funcKeywordCode(a,_){var $;const{gen:j,keyword:_e,schema:et,parentSchema:tt,$data:rt,it:at}=a;checkAsyncKeyword(at,_);const ct=!rt&&_.compile?_.compile.call(at.self,et,tt,at):_.validate,dt=useKeyword(j,_e,ct),yt=j.let("valid");a.block$data(yt,bt),a.ok(($=_.valid)!==null&&$!==void 0?$:yt);function bt(){if(_.errors===!1)_t(),_.modifying&&modifyData(a),xt(()=>a.error());else{const St=_.async?Et():$t();_.modifying&&modifyData(a),xt(()=>addErrs(a,St))}}function Et(){const St=j.let("ruleErrs",null);return j.try(()=>_t((0,codegen_1$q._)`await `),Mt=>j.assign(yt,!1).if((0,codegen_1$q._)`${Mt} instanceof ${at.ValidationError}`,()=>j.assign(St,(0,codegen_1$q._)`${Mt}.errors`),()=>j.throw(Mt))),St}function $t(){const St=(0,codegen_1$q._)`${dt}.errors`;return j.assign(St,null),_t(codegen_1$q.nil),St}function _t(St=_.async?(0,codegen_1$q._)`await `:codegen_1$q.nil){const Mt=at.opts.passContext?names_1$4.default.this:names_1$4.default.self,Tt=!("compile"in _&&!rt||_.schema===!1);j.assign(yt,(0,codegen_1$q._)`${St}${(0,code_1$9.callValidateCode)(a,dt,Mt,Tt)}`,_.modifying)}function xt(St){var Mt;j.if((0,codegen_1$q.not)((Mt=_.valid)!==null&&Mt!==void 0?Mt:yt),St)}}keyword.funcKeywordCode=funcKeywordCode;function modifyData(a){const{gen:_,data:$,it:j}=a;_.if(j.parentData,()=>_.assign($,(0,codegen_1$q._)`${j.parentData}[${j.parentDataProperty}]`))}function addErrs(a,_){const{gen:$}=a;$.if((0,codegen_1$q._)`Array.isArray(${_})`,()=>{$.assign(names_1$4.default.vErrors,(0,codegen_1$q._)`${names_1$4.default.vErrors} === null ? ${_} : ${names_1$4.default.vErrors}.concat(${_})`).assign(names_1$4.default.errors,(0,codegen_1$q._)`${names_1$4.default.vErrors}.length`),(0,errors_1$1.extendErrors)(a)},()=>a.error())}function checkAsyncKeyword({schemaEnv:a},_){if(_.async&&!a.$async)throw new Error("async keyword in sync schema")}function useKeyword(a,_,$){if($===void 0)throw new Error(`keyword "${_}" failed to compile`);return a.scopeValue("keyword",typeof $=="function"?{ref:$}:{ref:$,code:(0,codegen_1$q.stringify)($)})}function validSchemaType(a,_,$=!1){return!_.length||_.some(j=>j==="array"?Array.isArray(a):j==="object"?a&&typeof a=="object"&&!Array.isArray(a):typeof a==j||$&&typeof a>"u")}keyword.validSchemaType=validSchemaType;function validateKeywordUsage({schema:a,opts:_,self:$,errSchemaPath:j},_e,et){if(Array.isArray(_e.keyword)?!_e.keyword.includes(et):_e.keyword!==et)throw new Error("ajv implementation error");const tt=_e.dependencies;if(tt!=null&&tt.some(rt=>!Object.prototype.hasOwnProperty.call(a,rt)))throw new Error(`parent schema must have dependencies of ${et}: ${tt.join(",")}`);if(_e.validateSchema&&!_e.validateSchema(a[et])){const at=`keyword "${et}" value is invalid at path "${j}": `+$.errorsText(_e.validateSchema.errors);if(_.validateSchema==="log")$.logger.error(at);else throw new Error(at)}}keyword.validateKeywordUsage=validateKeywordUsage;var subschema={};Object.defineProperty(subschema,"__esModule",{value:!0});subschema.extendSubschemaMode=subschema.extendSubschemaData=subschema.getSubschema=void 0;const codegen_1$p=codegen,util_1$n=util$1;function getSubschema(a,{keyword:_,schemaProp:$,schema:j,schemaPath:_e,errSchemaPath:et,topSchemaRef:tt}){if(_!==void 0&&j!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(_!==void 0){const rt=a.schema[_];return $===void 0?{schema:rt,schemaPath:(0,codegen_1$p._)`${a.schemaPath}${(0,codegen_1$p.getProperty)(_)}`,errSchemaPath:`${a.errSchemaPath}/${_}`}:{schema:rt[$],schemaPath:(0,codegen_1$p._)`${a.schemaPath}${(0,codegen_1$p.getProperty)(_)}${(0,codegen_1$p.getProperty)($)}`,errSchemaPath:`${a.errSchemaPath}/${_}/${(0,util_1$n.escapeFragment)($)}`}}if(j!==void 0){if(_e===void 0||et===void 0||tt===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:j,schemaPath:_e,topSchemaRef:tt,errSchemaPath:et}}throw new Error('either "keyword" or "schema" must be passed')}subschema.getSubschema=getSubschema;function extendSubschemaData(a,_,{dataProp:$,dataPropType:j,data:_e,dataTypes:et,propertyName:tt}){if(_e!==void 0&&$!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:rt}=_;if($!==void 0){const{errorPath:ct,dataPathArr:dt,opts:yt}=_,bt=rt.let("data",(0,codegen_1$p._)`${_.data}${(0,codegen_1$p.getProperty)($)}`,!0);at(bt),a.errorPath=(0,codegen_1$p.str)`${ct}${(0,util_1$n.getErrorPath)($,j,yt.jsPropertySyntax)}`,a.parentDataProperty=(0,codegen_1$p._)`${$}`,a.dataPathArr=[...dt,a.parentDataProperty]}if(_e!==void 0){const ct=_e instanceof codegen_1$p.Name?_e:rt.let("data",_e,!0);at(ct),tt!==void 0&&(a.propertyName=tt)}et&&(a.dataTypes=et);function at(ct){a.data=ct,a.dataLevel=_.dataLevel+1,a.dataTypes=[],_.definedProperties=new Set,a.parentData=_.data,a.dataNames=[..._.dataNames,ct]}}subschema.extendSubschemaData=extendSubschemaData;function extendSubschemaMode(a,{jtdDiscriminator:_,jtdMetadata:$,compositeRule:j,createErrors:_e,allErrors:et}){j!==void 0&&(a.compositeRule=j),_e!==void 0&&(a.createErrors=_e),et!==void 0&&(a.allErrors=et),a.jtdDiscriminator=_,a.jtdMetadata=$}subschema.extendSubschemaMode=extendSubschemaMode;var resolve$1={},fastDeepEqual=function a(_,$){if(_===$)return!0;if(_&&$&&typeof _=="object"&&typeof $=="object"){if(_.constructor!==$.constructor)return!1;var j,_e,et;if(Array.isArray(_)){if(j=_.length,j!=$.length)return!1;for(_e=j;_e--!==0;)if(!a(_[_e],$[_e]))return!1;return!0}if(_.constructor===RegExp)return _.source===$.source&&_.flags===$.flags;if(_.valueOf!==Object.prototype.valueOf)return _.valueOf()===$.valueOf();if(_.toString!==Object.prototype.toString)return _.toString()===$.toString();if(et=Object.keys(_),j=et.length,j!==Object.keys($).length)return!1;for(_e=j;_e--!==0;)if(!Object.prototype.hasOwnProperty.call($,et[_e]))return!1;for(_e=j;_e--!==0;){var tt=et[_e];if(!a(_[tt],$[tt]))return!1}return!0}return _!==_&&$!==$},jsonSchemaTraverse={exports:{}},traverse$1=jsonSchemaTraverse.exports=function(a,_,$){typeof _=="function"&&($=_,_={}),$=_.cb||$;var j=typeof $=="function"?$:$.pre||function(){},_e=$.post||function(){};_traverse(_,j,_e,a,"",a)};traverse$1.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};traverse$1.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};traverse$1.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};traverse$1.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function _traverse(a,_,$,j,_e,et,tt,rt,at,ct){if(j&&typeof j=="object"&&!Array.isArray(j)){_(j,_e,et,tt,rt,at,ct);for(var dt in j){var yt=j[dt];if(Array.isArray(yt)){if(dt in traverse$1.arrayKeywords)for(var bt=0;bt<yt.length;bt++)_traverse(a,_,$,yt[bt],_e+"/"+dt+"/"+bt,et,_e,dt,j,bt)}else if(dt in traverse$1.propsKeywords){if(yt&&typeof yt=="object")for(var Et in yt)_traverse(a,_,$,yt[Et],_e+"/"+dt+"/"+escapeJsonPtr(Et),et,_e,dt,j,Et)}else(dt in traverse$1.keywords||a.allKeys&&!(dt in traverse$1.skipKeywords))&&_traverse(a,_,$,yt,_e+"/"+dt,et,_e,dt,j)}$(j,_e,et,tt,rt,at,ct)}}function escapeJsonPtr(a){return a.replace(/~/g,"~0").replace(/\//g,"~1")}var jsonSchemaTraverseExports=jsonSchemaTraverse.exports;Object.defineProperty(resolve$1,"__esModule",{value:!0});resolve$1.getSchemaRefs=resolve$1.resolveUrl=resolve$1.normalizeId=resolve$1._getFullPath=resolve$1.getFullPath=resolve$1.inlineRef=void 0;const util_1$m=util$1,equal$3=fastDeepEqual,traverse=jsonSchemaTraverseExports,SIMPLE_INLINED=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function inlineRef(a,_=!0){return typeof a=="boolean"?!0:_===!0?!hasRef(a):_?countKeys(a)<=_:!1}resolve$1.inlineRef=inlineRef;const REF_KEYWORDS=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function hasRef(a){for(const _ in a){if(REF_KEYWORDS.has(_))return!0;const $=a[_];if(Array.isArray($)&&$.some(hasRef)||typeof $=="object"&&hasRef($))return!0}return!1}function countKeys(a){let _=0;for(const $ in a){if($==="$ref")return 1/0;if(_++,!SIMPLE_INLINED.has($)&&(typeof a[$]=="object"&&(0,util_1$m.eachItem)(a[$],j=>_+=countKeys(j)),_===1/0))return 1/0}return _}function getFullPath(a,_="",$){$!==!1&&(_=normalizeId(_));const j=a.parse(_);return _getFullPath(a,j)}resolve$1.getFullPath=getFullPath;function _getFullPath(a,_){return a.serialize(_).split("#")[0]+"#"}resolve$1._getFullPath=_getFullPath;const TRAILING_SLASH_HASH=/#\/?$/;function normalizeId(a){return a?a.replace(TRAILING_SLASH_HASH,""):""}resolve$1.normalizeId=normalizeId;function resolveUrl(a,_,$){return $=normalizeId($),a.resolve(_,$)}resolve$1.resolveUrl=resolveUrl;const ANCHOR=/^[a-z_][-a-z0-9._]*$/i;function getSchemaRefs(a,_){if(typeof a=="boolean")return{};const{schemaId:$,uriResolver:j}=this.opts,_e=normalizeId(a[$]||_),et={"":_e},tt=getFullPath(j,_e,!1),rt={},at=new Set;return traverse(a,{allKeys:!0},(yt,bt,Et,$t)=>{if($t===void 0)return;const _t=tt+bt;let xt=et[$t];typeof yt[$]=="string"&&(xt=St.call(this,yt[$])),Mt.call(this,yt.$anchor),Mt.call(this,yt.$dynamicAnchor),et[bt]=xt;function St(Tt){const Rt=this.opts.uriResolver.resolve;if(Tt=normalizeId(xt?Rt(xt,Tt):Tt),at.has(Tt))throw dt(Tt);at.add(Tt);let Ct=this.refs[Tt];return typeof Ct=="string"&&(Ct=this.refs[Ct]),typeof Ct=="object"?ct(yt,Ct.schema,Tt):Tt!==normalizeId(_t)&&(Tt[0]==="#"?(ct(yt,rt[Tt],Tt),rt[Tt]=yt):this.refs[Tt]=_t),Tt}function Mt(Tt){if(typeof Tt=="string"){if(!ANCHOR.test(Tt))throw new Error(`invalid anchor "${Tt}"`);St.call(this,`#${Tt}`)}}}),rt;function ct(yt,bt,Et){if(bt!==void 0&&!equal$3(yt,bt))throw dt(Et)}function dt(yt){return new Error(`reference "${yt}" resolves to more than one schema`)}}resolve$1.getSchemaRefs=getSchemaRefs;Object.defineProperty(validate,"__esModule",{value:!0});validate.getData=validate.KeywordCxt=validate.validateFunctionCode=void 0;const boolSchema_1=boolSchema,dataType_1$1=dataType,applicability_1=applicability,dataType_2=dataType,defaults_1=defaults,keyword_1=keyword,subschema_1=subschema,codegen_1$o=codegen,names_1$3=names$1,resolve_1$2=resolve$1,util_1$l=util$1,errors_1=errors;function validateFunctionCode(a){if(isSchemaObj(a)&&(checkKeywords(a),schemaCxtHasRules(a))){topSchemaObjCode(a);return}validateFunction(a,()=>(0,boolSchema_1.topBoolOrEmptySchema)(a))}validate.validateFunctionCode=validateFunctionCode;function validateFunction({gen:a,validateName:_,schema:$,schemaEnv:j,opts:_e},et){_e.code.es5?a.func(_,(0,codegen_1$o._)`${names_1$3.default.data}, ${names_1$3.default.valCxt}`,j.$async,()=>{a.code((0,codegen_1$o._)`"use strict"; ${funcSourceUrl($,_e)}`),destructureValCxtES5(a,_e),a.code(et)}):a.func(_,(0,codegen_1$o._)`${names_1$3.default.data}, ${destructureValCxt(_e)}`,j.$async,()=>a.code(funcSourceUrl($,_e)).code(et))}function destructureValCxt(a){return(0,codegen_1$o._)`{${names_1$3.default.instancePath}="", ${names_1$3.default.parentData}, ${names_1$3.default.parentDataProperty}, ${names_1$3.default.rootData}=${names_1$3.default.data}${a.dynamicRef?(0,codegen_1$o._)`, ${names_1$3.default.dynamicAnchors}={}`:codegen_1$o.nil}}={}`}function destructureValCxtES5(a,_){a.if(names_1$3.default.valCxt,()=>{a.var(names_1$3.default.instancePath,(0,codegen_1$o._)`${names_1$3.default.valCxt}.${names_1$3.default.instancePath}`),a.var(names_1$3.default.parentData,(0,codegen_1$o._)`${names_1$3.default.valCxt}.${names_1$3.default.parentData}`),a.var(names_1$3.default.parentDataProperty,(0,codegen_1$o._)`${names_1$3.default.valCxt}.${names_1$3.default.parentDataProperty}`),a.var(names_1$3.default.rootData,(0,codegen_1$o._)`${names_1$3.default.valCxt}.${names_1$3.default.rootData}`),_.dynamicRef&&a.var(names_1$3.default.dynamicAnchors,(0,codegen_1$o._)`${names_1$3.default.valCxt}.${names_1$3.default.dynamicAnchors}`)},()=>{a.var(names_1$3.default.instancePath,(0,codegen_1$o._)`""`),a.var(names_1$3.default.parentData,(0,codegen_1$o._)`undefined`),a.var(names_1$3.default.parentDataProperty,(0,codegen_1$o._)`undefined`),a.var(names_1$3.default.rootData,names_1$3.default.data),_.dynamicRef&&a.var(names_1$3.default.dynamicAnchors,(0,codegen_1$o._)`{}`)})}function topSchemaObjCode(a){const{schema:_,opts:$,gen:j}=a;validateFunction(a,()=>{$.$comment&&_.$comment&&commentKeyword(a),checkNoDefault(a),j.let(names_1$3.default.vErrors,null),j.let(names_1$3.default.errors,0),$.unevaluated&&resetEvaluated(a),typeAndKeywords(a),returnResults(a)})}function resetEvaluated(a){const{gen:_,validateName:$}=a;a.evaluated=_.const("evaluated",(0,codegen_1$o._)`${$}.evaluated`),_.if((0,codegen_1$o._)`${a.evaluated}.dynamicProps`,()=>_.assign((0,codegen_1$o._)`${a.evaluated}.props`,(0,codegen_1$o._)`undefined`)),_.if((0,codegen_1$o._)`${a.evaluated}.dynamicItems`,()=>_.assign((0,codegen_1$o._)`${a.evaluated}.items`,(0,codegen_1$o._)`undefined`))}function funcSourceUrl(a,_){const $=typeof a=="object"&&a[_.schemaId];return $&&(_.code.source||_.code.process)?(0,codegen_1$o._)`/*# sourceURL=${$} */`:codegen_1$o.nil}function subschemaCode(a,_){if(isSchemaObj(a)&&(checkKeywords(a),schemaCxtHasRules(a))){subSchemaObjCode(a,_);return}(0,boolSchema_1.boolOrEmptySchema)(a,_)}function schemaCxtHasRules({schema:a,self:_}){if(typeof a=="boolean")return!a;for(const $ in a)if(_.RULES.all[$])return!0;return!1}function isSchemaObj(a){return typeof a.schema!="boolean"}function subSchemaObjCode(a,_){const{schema:$,gen:j,opts:_e}=a;_e.$comment&&$.$comment&&commentKeyword(a),updateContext(a),checkAsyncSchema(a);const et=j.const("_errs",names_1$3.default.errors);typeAndKeywords(a,et),j.var(_,(0,codegen_1$o._)`${et} === ${names_1$3.default.errors}`)}function checkKeywords(a){(0,util_1$l.checkUnknownRules)(a),checkRefsAndKeywords(a)}function typeAndKeywords(a,_){if(a.opts.jtd)return schemaKeywords(a,[],!1,_);const $=(0,dataType_1$1.getSchemaTypes)(a.schema),j=(0,dataType_1$1.coerceAndCheckDataType)(a,$);schemaKeywords(a,$,!j,_)}function checkRefsAndKeywords(a){const{schema:_,errSchemaPath:$,opts:j,self:_e}=a;_.$ref&&j.ignoreKeywordsWithRef&&(0,util_1$l.schemaHasRulesButRef)(_,_e.RULES)&&_e.logger.warn(`$ref: keywords ignored in schema at path "${$}"`)}function checkNoDefault(a){const{schema:_,opts:$}=a;_.default!==void 0&&$.useDefaults&&$.strictSchema&&(0,util_1$l.checkStrictMode)(a,"default is ignored in the schema root")}function updateContext(a){const _=a.schema[a.opts.schemaId];_&&(a.baseId=(0,resolve_1$2.resolveUrl)(a.opts.uriResolver,a.baseId,_))}function checkAsyncSchema(a){if(a.schema.$async&&!a.schemaEnv.$async)throw new Error("async schema in sync schema")}function commentKeyword({gen:a,schemaEnv:_,schema:$,errSchemaPath:j,opts:_e}){const et=$.$comment;if(_e.$comment===!0)a.code((0,codegen_1$o._)`${names_1$3.default.self}.logger.log(${et})`);else if(typeof _e.$comment=="function"){const tt=(0,codegen_1$o.str)`${j}/$comment`,rt=a.scopeValue("root",{ref:_.root});a.code((0,codegen_1$o._)`${names_1$3.default.self}.opts.$comment(${et}, ${tt}, ${rt}.schema)`)}}function returnResults(a){const{gen:_,schemaEnv:$,validateName:j,ValidationError:_e,opts:et}=a;$.$async?_.if((0,codegen_1$o._)`${names_1$3.default.errors} === 0`,()=>_.return(names_1$3.default.data),()=>_.throw((0,codegen_1$o._)`new ${_e}(${names_1$3.default.vErrors})`)):(_.assign((0,codegen_1$o._)`${j}.errors`,names_1$3.default.vErrors),et.unevaluated&&assignEvaluated(a),_.return((0,codegen_1$o._)`${names_1$3.default.errors} === 0`))}function assignEvaluated({gen:a,evaluated:_,props:$,items:j}){$ instanceof codegen_1$o.Name&&a.assign((0,codegen_1$o._)`${_}.props`,$),j instanceof codegen_1$o.Name&&a.assign((0,codegen_1$o._)`${_}.items`,j)}function schemaKeywords(a,_,$,j){const{gen:_e,schema:et,data:tt,allErrors:rt,opts:at,self:ct}=a,{RULES:dt}=ct;if(et.$ref&&(at.ignoreKeywordsWithRef||!(0,util_1$l.schemaHasRulesButRef)(et,dt))){_e.block(()=>keywordCode(a,"$ref",dt.all.$ref.definition));return}at.jtd||checkStrictTypes(a,_),_e.block(()=>{for(const bt of dt.rules)yt(bt);yt(dt.post)});function yt(bt){(0,applicability_1.shouldUseGroup)(et,bt)&&(bt.type?(_e.if((0,dataType_2.checkDataType)(bt.type,tt,at.strictNumbers)),iterateKeywords(a,bt),_.length===1&&_[0]===bt.type&&$&&(_e.else(),(0,dataType_2.reportTypeError)(a)),_e.endIf()):iterateKeywords(a,bt),rt||_e.if((0,codegen_1$o._)`${names_1$3.default.errors} === ${j||0}`))}}function iterateKeywords(a,_){const{gen:$,schema:j,opts:{useDefaults:_e}}=a;_e&&(0,defaults_1.assignDefaults)(a,_.type),$.block(()=>{for(const et of _.rules)(0,applicability_1.shouldUseRule)(j,et)&&keywordCode(a,et.keyword,et.definition,_.type)})}function checkStrictTypes(a,_){a.schemaEnv.meta||!a.opts.strictTypes||(checkContextTypes(a,_),a.opts.allowUnionTypes||checkMultipleTypes(a,_),checkKeywordTypes(a,a.dataTypes))}function checkContextTypes(a,_){if(_.length){if(!a.dataTypes.length){a.dataTypes=_;return}_.forEach($=>{includesType(a.dataTypes,$)||strictTypesError(a,`type "${$}" not allowed by context "${a.dataTypes.join(",")}"`)}),narrowSchemaTypes(a,_)}}function checkMultipleTypes(a,_){_.length>1&&!(_.length===2&&_.includes("null"))&&strictTypesError(a,"use allowUnionTypes to allow union type keyword")}function checkKeywordTypes(a,_){const $=a.self.RULES.all;for(const j in $){const _e=$[j];if(typeof _e=="object"&&(0,applicability_1.shouldUseRule)(a.schema,_e)){const{type:et}=_e.definition;et.length&&!et.some(tt=>hasApplicableType(_,tt))&&strictTypesError(a,`missing type "${et.join(",")}" for keyword "${j}"`)}}}function hasApplicableType(a,_){return a.includes(_)||_==="number"&&a.includes("integer")}function includesType(a,_){return a.includes(_)||_==="integer"&&a.includes("number")}function narrowSchemaTypes(a,_){const $=[];for(const j of a.dataTypes)includesType(_,j)?$.push(j):_.includes("integer")&&j==="number"&&$.push("integer");a.dataTypes=$}function strictTypesError(a,_){const $=a.schemaEnv.baseId+a.errSchemaPath;_+=` at "${$}" (strictTypes)`,(0,util_1$l.checkStrictMode)(a,_,a.opts.strictTypes)}class KeywordCxt{constructor(_,$,j){if((0,keyword_1.validateKeywordUsage)(_,$,j),this.gen=_.gen,this.allErrors=_.allErrors,this.keyword=j,this.data=_.data,this.schema=_.schema[j],this.$data=$.$data&&_.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,util_1$l.schemaRefOrVal)(_,this.schema,j,this.$data),this.schemaType=$.schemaType,this.parentSchema=_.schema,this.params={},this.it=_,this.def=$,this.$data)this.schemaCode=_.gen.const("vSchema",getData(this.$data,_));else if(this.schemaCode=this.schemaValue,!(0,keyword_1.validSchemaType)(this.schema,$.schemaType,$.allowUndefined))throw new Error(`${j} value must be ${JSON.stringify($.schemaType)}`);("code"in $?$.trackErrors:$.errors!==!1)&&(this.errsCount=_.gen.const("_errs",names_1$3.default.errors))}result(_,$,j){this.failResult((0,codegen_1$o.not)(_),$,j)}failResult(_,$,j){this.gen.if(_),j?j():this.error(),$?(this.gen.else(),$(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(_,$){this.failResult((0,codegen_1$o.not)(_),void 0,$)}fail(_){if(_===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(_),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(_){if(!this.$data)return this.fail(_);const{schemaCode:$}=this;this.fail((0,codegen_1$o._)`${$} !== undefined && (${(0,codegen_1$o.or)(this.invalid$data(),_)})`)}error(_,$,j){if($){this.setParams($),this._error(_,j),this.setParams({});return}this._error(_,j)}_error(_,$){(_?errors_1.reportExtraError:errors_1.reportError)(this,this.def.error,$)}$dataError(){(0,errors_1.reportError)(this,this.def.$dataError||errors_1.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,errors_1.resetErrorsCount)(this.gen,this.errsCount)}ok(_){this.allErrors||this.gen.if(_)}setParams(_,$){$?Object.assign(this.params,_):this.params=_}block$data(_,$,j=codegen_1$o.nil){this.gen.block(()=>{this.check$data(_,j),$()})}check$data(_=codegen_1$o.nil,$=codegen_1$o.nil){if(!this.$data)return;const{gen:j,schemaCode:_e,schemaType:et,def:tt}=this;j.if((0,codegen_1$o.or)((0,codegen_1$o._)`${_e} === undefined`,$)),_!==codegen_1$o.nil&&j.assign(_,!0),(et.length||tt.validateSchema)&&(j.elseIf(this.invalid$data()),this.$dataError(),_!==codegen_1$o.nil&&j.assign(_,!1)),j.else()}invalid$data(){const{gen:_,schemaCode:$,schemaType:j,def:_e,it:et}=this;return(0,codegen_1$o.or)(tt(),rt());function tt(){if(j.length){if(!($ instanceof codegen_1$o.Name))throw new Error("ajv implementation error");const at=Array.isArray(j)?j:[j];return(0,codegen_1$o._)`${(0,dataType_2.checkDataTypes)(at,$,et.opts.strictNumbers,dataType_2.DataType.Wrong)}`}return codegen_1$o.nil}function rt(){if(_e.validateSchema){const at=_.scopeValue("validate$data",{ref:_e.validateSchema});return(0,codegen_1$o._)`!${at}(${$})`}return codegen_1$o.nil}}subschema(_,$){const j=(0,subschema_1.getSubschema)(this.it,_);(0,subschema_1.extendSubschemaData)(j,this.it,_),(0,subschema_1.extendSubschemaMode)(j,_);const _e={...this.it,...j,items:void 0,props:void 0};return subschemaCode(_e,$),_e}mergeEvaluated(_,$){const{it:j,gen:_e}=this;j.opts.unevaluated&&(j.props!==!0&&_.props!==void 0&&(j.props=util_1$l.mergeEvaluated.props(_e,_.props,j.props,$)),j.items!==!0&&_.items!==void 0&&(j.items=util_1$l.mergeEvaluated.items(_e,_.items,j.items,$)))}mergeValidEvaluated(_,$){const{it:j,gen:_e}=this;if(j.opts.unevaluated&&(j.props!==!0||j.items!==!0))return _e.if($,()=>this.mergeEvaluated(_,codegen_1$o.Name)),!0}}validate.KeywordCxt=KeywordCxt;function keywordCode(a,_,$,j){const _e=new KeywordCxt(a,$,_);"code"in $?$.code(_e,j):_e.$data&&$.validate?(0,keyword_1.funcKeywordCode)(_e,$):"macro"in $?(0,keyword_1.macroKeywordCode)(_e,$):($.compile||$.validate)&&(0,keyword_1.funcKeywordCode)(_e,$)}const JSON_POINTER=/^\/(?:[^~]|~0|~1)*$/,RELATIVE_JSON_POINTER=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData(a,{dataLevel:_,dataNames:$,dataPathArr:j}){let _e,et;if(a==="")return names_1$3.default.rootData;if(a[0]==="/"){if(!JSON_POINTER.test(a))throw new Error(`Invalid JSON-pointer: ${a}`);_e=a,et=names_1$3.default.rootData}else{const ct=RELATIVE_JSON_POINTER.exec(a);if(!ct)throw new Error(`Invalid JSON-pointer: ${a}`);const dt=+ct[1];if(_e=ct[2],_e==="#"){if(dt>=_)throw new Error(at("property/index",dt));return j[_-dt]}if(dt>_)throw new Error(at("data",dt));if(et=$[_-dt],!_e)return et}let tt=et;const rt=_e.split("/");for(const ct of rt)ct&&(et=(0,codegen_1$o._)`${et}${(0,codegen_1$o.getProperty)((0,util_1$l.unescapeJsonPointer)(ct))}`,tt=(0,codegen_1$o._)`${tt} && ${et}`);return tt;function at(ct,dt){return`Cannot access ${ct} ${dt} levels up, current level is ${_}`}}validate.getData=getData;var validation_error={};Object.defineProperty(validation_error,"__esModule",{value:!0});class ValidationError extends Error{constructor(_){super("validation failed"),this.errors=_,this.ajv=this.validation=!0}}validation_error.default=ValidationError;var ref_error={};Object.defineProperty(ref_error,"__esModule",{value:!0});const resolve_1$1=resolve$1;class MissingRefError extends Error{constructor(_,$,j,_e){super(_e||`can't resolve reference ${j} from id ${$}`),this.missingRef=(0,resolve_1$1.resolveUrl)(_,$,j),this.missingSchema=(0,resolve_1$1.normalizeId)((0,resolve_1$1.getFullPath)(_,this.missingRef))}}ref_error.default=MissingRefError;var compile={};Object.defineProperty(compile,"__esModule",{value:!0});compile.resolveSchema=compile.getCompilingSchema=compile.resolveRef=compile.compileSchema=compile.SchemaEnv=void 0;const codegen_1$n=codegen,validation_error_1=validation_error,names_1$2=names$1,resolve_1=resolve$1,util_1$k=util$1,validate_1$1=validate;class SchemaEnv{constructor(_){var $;this.refs={},this.dynamicAnchors={};let j;typeof _.schema=="object"&&(j=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=($=_.baseId)!==null&&$!==void 0?$:(0,resolve_1.normalizeId)(j==null?void 0:j[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=j==null?void 0:j.$async,this.refs={}}}compile.SchemaEnv=SchemaEnv;function compileSchema(a){const _=getCompilingSchema.call(this,a);if(_)return _;const $=(0,resolve_1.getFullPath)(this.opts.uriResolver,a.root.baseId),{es5:j,lines:_e}=this.opts.code,{ownProperties:et}=this.opts,tt=new codegen_1$n.CodeGen(this.scope,{es5:j,lines:_e,ownProperties:et});let rt;a.$async&&(rt=tt.scopeValue("Error",{ref:validation_error_1.default,code:(0,codegen_1$n._)`require("ajv/dist/runtime/validation_error").default`}));const at=tt.scopeName("validate");a.validateName=at;const ct={gen:tt,allErrors:this.opts.allErrors,data:names_1$2.default.data,parentData:names_1$2.default.parentData,parentDataProperty:names_1$2.default.parentDataProperty,dataNames:[names_1$2.default.data],dataPathArr:[codegen_1$n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:tt.scopeValue("schema",this.opts.code.source===!0?{ref:a.schema,code:(0,codegen_1$n.stringify)(a.schema)}:{ref:a.schema}),validateName:at,ValidationError:rt,schema:a.schema,schemaEnv:a,rootId:$,baseId:a.baseId||$,schemaPath:codegen_1$n.nil,errSchemaPath:a.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,codegen_1$n._)`""`,opts:this.opts,self:this};let dt;try{this._compilations.add(a),(0,validate_1$1.validateFunctionCode)(ct),tt.optimize(this.opts.code.optimize);const yt=tt.toString();dt=`${tt.scopeRefs(names_1$2.default.scope)}return ${yt}`,this.opts.code.process&&(dt=this.opts.code.process(dt,a));const Et=new Function(`${names_1$2.default.self}`,`${names_1$2.default.scope}`,dt)(this,this.scope.get());if(this.scope.value(at,{ref:Et}),Et.errors=null,Et.schema=a.schema,Et.schemaEnv=a,a.$async&&(Et.$async=!0),this.opts.code.source===!0&&(Et.source={validateName:at,validateCode:yt,scopeValues:tt._values}),this.opts.unevaluated){const{props:$t,items:_t}=ct;Et.evaluated={props:$t instanceof codegen_1$n.Name?void 0:$t,items:_t instanceof codegen_1$n.Name?void 0:_t,dynamicProps:$t instanceof codegen_1$n.Name,dynamicItems:_t instanceof codegen_1$n.Name},Et.source&&(Et.source.evaluated=(0,codegen_1$n.stringify)(Et.evaluated))}return a.validate=Et,a}catch(yt){throw delete a.validate,delete a.validateName,dt&&this.logger.error("Error compiling schema, function code:",dt),yt}finally{this._compilations.delete(a)}}compile.compileSchema=compileSchema;function resolveRef(a,_,$){var j;$=(0,resolve_1.resolveUrl)(this.opts.uriResolver,_,$);const _e=a.refs[$];if(_e)return _e;let et=resolve.call(this,a,$);if(et===void 0){const tt=(j=a.localRefs)===null||j===void 0?void 0:j[$],{schemaId:rt}=this.opts;tt&&(et=new SchemaEnv({schema:tt,schemaId:rt,root:a,baseId:_}))}if(et!==void 0)return a.refs[$]=inlineOrCompile.call(this,et)}compile.resolveRef=resolveRef;function inlineOrCompile(a){return(0,resolve_1.inlineRef)(a.schema,this.opts.inlineRefs)?a.schema:a.validate?a:compileSchema.call(this,a)}function getCompilingSchema(a){for(const _ of this._compilations)if(sameSchemaEnv(_,a))return _}compile.getCompilingSchema=getCompilingSchema;function sameSchemaEnv(a,_){return a.schema===_.schema&&a.root===_.root&&a.baseId===_.baseId}function resolve(a,_){let $;for(;typeof($=this.refs[_])=="string";)_=$;return $||this.schemas[_]||resolveSchema.call(this,a,_)}function resolveSchema(a,_){const $=this.opts.uriResolver.parse(_),j=(0,resolve_1._getFullPath)(this.opts.uriResolver,$);let _e=(0,resolve_1.getFullPath)(this.opts.uriResolver,a.baseId,void 0);if(Object.keys(a.schema).length>0&&j===_e)return getJsonPointer.call(this,$,a);const et=(0,resolve_1.normalizeId)(j),tt=this.refs[et]||this.schemas[et];if(typeof tt=="string"){const rt=resolveSchema.call(this,a,tt);return typeof(rt==null?void 0:rt.schema)!="object"?void 0:getJsonPointer.call(this,$,rt)}if(typeof(tt==null?void 0:tt.schema)=="object"){if(tt.validate||compileSchema.call(this,tt),et===(0,resolve_1.normalizeId)(_)){const{schema:rt}=tt,{schemaId:at}=this.opts,ct=rt[at];return ct&&(_e=(0,resolve_1.resolveUrl)(this.opts.uriResolver,_e,ct)),new SchemaEnv({schema:rt,schemaId:at,root:a,baseId:_e})}return getJsonPointer.call(this,$,tt)}}compile.resolveSchema=resolveSchema;const PREVENT_SCOPE_CHANGE=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(a,{baseId:_,schema:$,root:j}){var _e;if(((_e=a.fragment)===null||_e===void 0?void 0:_e[0])!=="/")return;for(const rt of a.fragment.slice(1).split("/")){if(typeof $=="boolean")return;const at=$[(0,util_1$k.unescapeFragment)(rt)];if(at===void 0)return;$=at;const ct=typeof $=="object"&&$[this.opts.schemaId];!PREVENT_SCOPE_CHANGE.has(rt)&&ct&&(_=(0,resolve_1.resolveUrl)(this.opts.uriResolver,_,ct))}let et;if(typeof $!="boolean"&&$.$ref&&!(0,util_1$k.schemaHasRulesButRef)($,this.RULES)){const rt=(0,resolve_1.resolveUrl)(this.opts.uriResolver,_,$.$ref);et=resolveSchema.call(this,j,rt)}const{schemaId:tt}=this.opts;if(et=et||new SchemaEnv({schema:$,schemaId:tt,root:j,baseId:_}),et.schema!==et.root.schema)return et}const $id$1="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description$3="Meta-schema for $data reference (JSON AnySchema extension proposal)",type$4="object",required$1=["$data"],properties$2={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties$1=!1,require$$9={$id:$id$1,description:description$3,type:type$4,required:required$1,properties:properties$2,additionalProperties:additionalProperties$1};var uri$1={},uri_all={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(a,_){(function($,j){j(_)})(commonjsGlobal,function($){function j(){for(var er=arguments.length,Qt=Array(er),wr=0;wr<er;wr++)Qt[wr]=arguments[wr];if(Qt.length>1){Qt[0]=Qt[0].slice(0,-1);for(var lr=Qt.length-1,yr=1;yr<lr;++yr)Qt[yr]=Qt[yr].slice(1,-1);return Qt[lr]=Qt[lr].slice(1),Qt.join("")}else return Qt[0]}function _e(er){return"(?:"+er+")"}function et(er){return er===void 0?"undefined":er===null?"null":Object.prototype.toString.call(er).split(" ").pop().split("]").shift().toLowerCase()}function tt(er){return er.toUpperCase()}function rt(er){return er!=null?er instanceof Array?er:typeof er.length!="number"||er.split||er.setInterval||er.call?[er]:Array.prototype.slice.call(er):[]}function at(er,Qt){var wr=er;if(Qt)for(var lr in Qt)wr[lr]=Qt[lr];return wr}function ct(er){var Qt="[A-Za-z]",wr="[0-9]",lr=j(wr,"[A-Fa-f]"),yr=_e(_e("%[EFef]"+lr+"%"+lr+lr+"%"+lr+lr)+"|"+_e("%[89A-Fa-f]"+lr+"%"+lr+lr)+"|"+_e("%"+lr+lr)),cn="[\\:\\/\\?\\#\\[\\]\\@]",Cr="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Yr=j(cn,Cr),yn=er?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",_n=er?"[\\uE000-\\uF8FF]":"[]",xn=j(Qt,wr,"[\\-\\.\\_\\~]",yn);_e(Qt+j(Qt,wr,"[\\+\\-\\.]")+"*"),_e(_e(yr+"|"+j(xn,Cr,"[\\:]"))+"*");var Sn=_e(_e("25[0-5]")+"|"+_e("2[0-4]"+wr)+"|"+_e("1"+wr+wr)+"|"+_e("0?[1-9]"+wr)+"|0?0?"+wr),kn=_e(Sn+"\\."+Sn+"\\."+Sn+"\\."+Sn),wn=_e(lr+"{1,4}"),Bn=_e(_e(wn+"\\:"+wn)+"|"+kn),Un=_e(_e(wn+"\\:")+"{6}"+Bn),In=_e("\\:\\:"+_e(wn+"\\:")+"{5}"+Bn),Kn=_e(_e(wn)+"?\\:\\:"+_e(wn+"\\:")+"{4}"+Bn),Gn=_e(_e(_e(wn+"\\:")+"{0,1}"+wn)+"?\\:\\:"+_e(wn+"\\:")+"{3}"+Bn),zn=_e(_e(_e(wn+"\\:")+"{0,2}"+wn)+"?\\:\\:"+_e(wn+"\\:")+"{2}"+Bn),Wn=_e(_e(_e(wn+"\\:")+"{0,3}"+wn)+"?\\:\\:"+wn+"\\:"+Bn),Jn=_e(_e(_e(wn+"\\:")+"{0,4}"+wn)+"?\\:\\:"+Bn),Hn=_e(_e(_e(wn+"\\:")+"{0,5}"+wn)+"?\\:\\:"+wn),Vn=_e(_e(_e(wn+"\\:")+"{0,6}"+wn)+"?\\:\\:"),Yn=_e([Un,In,Kn,Gn,zn,Wn,Jn,Hn,Vn].join("|")),Qn=_e(_e(xn+"|"+yr)+"+");_e("[vV]"+lr+"+\\."+j(xn,Cr,"[\\:]")+"+"),_e(_e(yr+"|"+j(xn,Cr))+"*");var Zn=_e(yr+"|"+j(xn,Cr,"[\\:\\@]"));return _e(_e(yr+"|"+j(xn,Cr,"[\\@]"))+"+"),_e(_e(Zn+"|"+j("[\\/\\?]",_n))+"*"),{NOT_SCHEME:new RegExp(j("[^]",Qt,wr,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(j("[^\\%\\:]",xn,Cr),"g"),NOT_HOST:new RegExp(j("[^\\%\\[\\]\\:]",xn,Cr),"g"),NOT_PATH:new RegExp(j("[^\\%\\/\\:\\@]",xn,Cr),"g"),NOT_PATH_NOSCHEME:new RegExp(j("[^\\%\\/\\@]",xn,Cr),"g"),NOT_QUERY:new RegExp(j("[^\\%]",xn,Cr,"[\\:\\@\\/\\?]",_n),"g"),NOT_FRAGMENT:new RegExp(j("[^\\%]",xn,Cr,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(j("[^]",xn,Cr),"g"),UNRESERVED:new RegExp(xn,"g"),OTHER_CHARS:new RegExp(j("[^\\%]",xn,Yr),"g"),PCT_ENCODED:new RegExp(yr,"g"),IPV4ADDRESS:new RegExp("^("+kn+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Yn+")"+_e(_e("\\%25|\\%(?!"+lr+"{2})")+"("+Qn+")")+"?\\]?$")}}var dt=ct(!1),yt=ct(!0),bt=function(){function er(Qt,wr){var lr=[],yr=!0,cn=!1,Cr=void 0;try{for(var Yr=Qt[Symbol.iterator](),yn;!(yr=(yn=Yr.next()).done)&&(lr.push(yn.value),!(wr&&lr.length===wr));yr=!0);}catch(_n){cn=!0,Cr=_n}finally{try{!yr&&Yr.return&&Yr.return()}finally{if(cn)throw Cr}}return lr}return function(Qt,wr){if(Array.isArray(Qt))return Qt;if(Symbol.iterator in Object(Qt))return er(Qt,wr);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Et=function(er){if(Array.isArray(er)){for(var Qt=0,wr=Array(er.length);Qt<er.length;Qt++)wr[Qt]=er[Qt];return wr}else return Array.from(er)},$t=2147483647,_t=36,xt=1,St=26,Mt=38,Tt=700,Rt=72,Ct=128,It="-",kt=/^xn--/,Dt=/[^\0-\x7E]/,Bt=/[\x2E\u3002\uFF0E\uFF61]/g,zt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},vt=_t-xt,nt=Math.floor,st=String.fromCharCode;function lt(er){throw new RangeError(zt[er])}function ht(er,Qt){for(var wr=[],lr=er.length;lr--;)wr[lr]=Qt(er[lr]);return wr}function mt(er,Qt){var wr=er.split("@"),lr="";wr.length>1&&(lr=wr[0]+"@",er=wr[1]),er=er.replace(Bt,".");var yr=er.split("."),cn=ht(yr,Qt).join(".");return lr+cn}function wt(er){for(var Qt=[],wr=0,lr=er.length;wr<lr;){var yr=er.charCodeAt(wr++);if(yr>=55296&&yr<=56319&&wr<lr){var cn=er.charCodeAt(wr++);(cn&64512)==56320?Qt.push(((yr&1023)<<10)+(cn&1023)+65536):(Qt.push(yr),wr--)}else Qt.push(yr)}return Qt}var At=function(Qt){return String.fromCodePoint.apply(String,Et(Qt))},gt=function(Qt){return Qt-48<10?Qt-22:Qt-65<26?Qt-65:Qt-97<26?Qt-97:_t},ot=function(Qt,wr){return Qt+22+75*(Qt<26)-((wr!=0)<<5)},pt=function(Qt,wr,lr){var yr=0;for(Qt=lr?nt(Qt/Tt):Qt>>1,Qt+=nt(Qt/wr);Qt>vt*St>>1;yr+=_t)Qt=nt(Qt/vt);return nt(yr+(vt+1)*Qt/(Qt+Mt))},Pt=function(Qt){var wr=[],lr=Qt.length,yr=0,cn=Ct,Cr=Rt,Yr=Qt.lastIndexOf(It);Yr<0&&(Yr=0);for(var yn=0;yn<Yr;++yn)Qt.charCodeAt(yn)>=128&&lt("not-basic"),wr.push(Qt.charCodeAt(yn));for(var _n=Yr>0?Yr+1:0;_n<lr;){for(var xn=yr,Sn=1,kn=_t;;kn+=_t){_n>=lr&&lt("invalid-input");var wn=gt(Qt.charCodeAt(_n++));(wn>=_t||wn>nt(($t-yr)/Sn))&&lt("overflow"),yr+=wn*Sn;var Bn=kn<=Cr?xt:kn>=Cr+St?St:kn-Cr;if(wn<Bn)break;var Un=_t-Bn;Sn>nt($t/Un)&&lt("overflow"),Sn*=Un}var In=wr.length+1;Cr=pt(yr-xn,In,xn==0),nt(yr/In)>$t-cn&&lt("overflow"),cn+=nt(yr/In),yr%=In,wr.splice(yr++,0,cn)}return String.fromCodePoint.apply(String,wr)},Ot=function(Qt){var wr=[];Qt=wt(Qt);var lr=Qt.length,yr=Ct,cn=0,Cr=Rt,Yr=!0,yn=!1,_n=void 0;try{for(var xn=Qt[Symbol.iterator](),Sn;!(Yr=(Sn=xn.next()).done);Yr=!0){var kn=Sn.value;kn<128&&wr.push(st(kn))}}catch(so){yn=!0,_n=so}finally{try{!Yr&&xn.return&&xn.return()}finally{if(yn)throw _n}}var wn=wr.length,Bn=wn;for(wn&&wr.push(It);Bn<lr;){var Un=$t,In=!0,Kn=!1,Gn=void 0;try{for(var zn=Qt[Symbol.iterator](),Wn;!(In=(Wn=zn.next()).done);In=!0){var Jn=Wn.value;Jn>=yr&&Jn<Un&&(Un=Jn)}}catch(so){Kn=!0,Gn=so}finally{try{!In&&zn.return&&zn.return()}finally{if(Kn)throw Gn}}var Hn=Bn+1;Un-yr>nt(($t-cn)/Hn)&&lt("overflow"),cn+=(Un-yr)*Hn,yr=Un;var Vn=!0,Yn=!1,Qn=void 0;try{for(var Zn=Qt[Symbol.iterator](),Ko;!(Vn=(Ko=Zn.next()).done);Vn=!0){var us=Ko.value;if(us<yr&&++cn>$t&&lt("overflow"),us==yr){for(var Ws=cn,An=_t;;An+=_t){var Pn=An<=Cr?xt:An>=Cr+St?St:An-Cr;if(Ws<Pn)break;var Rn=Ws-Pn,Ln=_t-Pn;wr.push(st(ot(Pn+Rn%Ln,0))),Ws=nt(Rn/Ln)}wr.push(st(ot(Ws,0))),Cr=pt(cn,Hn,Bn==wn),cn=0,++Bn}}}catch(so){Yn=!0,Qn=so}finally{try{!Vn&&Zn.return&&Zn.return()}finally{if(Yn)throw Qn}}++cn,++yr}return wr.join("")},Nt=function(Qt){return mt(Qt,function(wr){return kt.test(wr)?Pt(wr.slice(4).toLowerCase()):wr})},jt=function(Qt){return mt(Qt,function(wr){return Dt.test(wr)?"xn--"+Ot(wr):wr})},Ut={version:"2.1.0",ucs2:{decode:wt,encode:At},decode:Pt,encode:Ot,toASCII:jt,toUnicode:Nt},Vt={};function rr(er){var Qt=er.charCodeAt(0),wr=void 0;return Qt<16?wr="%0"+Qt.toString(16).toUpperCase():Qt<128?wr="%"+Qt.toString(16).toUpperCase():Qt<2048?wr="%"+(Qt>>6|192).toString(16).toUpperCase()+"%"+(Qt&63|128).toString(16).toUpperCase():wr="%"+(Qt>>12|224).toString(16).toUpperCase()+"%"+(Qt>>6&63|128).toString(16).toUpperCase()+"%"+(Qt&63|128).toString(16).toUpperCase(),wr}function tr(er){for(var Qt="",wr=0,lr=er.length;wr<lr;){var yr=parseInt(er.substr(wr+1,2),16);if(yr<128)Qt+=String.fromCharCode(yr),wr+=3;else if(yr>=194&&yr<224){if(lr-wr>=6){var cn=parseInt(er.substr(wr+4,2),16);Qt+=String.fromCharCode((yr&31)<<6|cn&63)}else Qt+=er.substr(wr,6);wr+=6}else if(yr>=224){if(lr-wr>=9){var Cr=parseInt(er.substr(wr+4,2),16),Yr=parseInt(er.substr(wr+7,2),16);Qt+=String.fromCharCode((yr&15)<<12|(Cr&63)<<6|Yr&63)}else Qt+=er.substr(wr,9);wr+=9}else Qt+=er.substr(wr,3),wr+=3}return Qt}function Zt(er,Qt){function wr(lr){var yr=tr(lr);return yr.match(Qt.UNRESERVED)?yr:lr}return er.scheme&&(er.scheme=String(er.scheme).replace(Qt.PCT_ENCODED,wr).toLowerCase().replace(Qt.NOT_SCHEME,"")),er.userinfo!==void 0&&(er.userinfo=String(er.userinfo).replace(Qt.PCT_ENCODED,wr).replace(Qt.NOT_USERINFO,rr).replace(Qt.PCT_ENCODED,tt)),er.host!==void 0&&(er.host=String(er.host).replace(Qt.PCT_ENCODED,wr).toLowerCase().replace(Qt.NOT_HOST,rr).replace(Qt.PCT_ENCODED,tt)),er.path!==void 0&&(er.path=String(er.path).replace(Qt.PCT_ENCODED,wr).replace(er.scheme?Qt.NOT_PATH:Qt.NOT_PATH_NOSCHEME,rr).replace(Qt.PCT_ENCODED,tt)),er.query!==void 0&&(er.query=String(er.query).replace(Qt.PCT_ENCODED,wr).replace(Qt.NOT_QUERY,rr).replace(Qt.PCT_ENCODED,tt)),er.fragment!==void 0&&(er.fragment=String(er.fragment).replace(Qt.PCT_ENCODED,wr).replace(Qt.NOT_FRAGMENT,rr).replace(Qt.PCT_ENCODED,tt)),er}function Yt(er){return er.replace(/^0*(.*)/,"$1")||"0"}function Wt(er,Qt){var wr=er.match(Qt.IPV4ADDRESS)||[],lr=bt(wr,2),yr=lr[1];return yr?yr.split(".").map(Yt).join("."):er}function fr(er,Qt){var wr=er.match(Qt.IPV6ADDRESS)||[],lr=bt(wr,3),yr=lr[1],cn=lr[2];if(yr){for(var Cr=yr.toLowerCase().split("::").reverse(),Yr=bt(Cr,2),yn=Yr[0],_n=Yr[1],xn=_n?_n.split(":").map(Yt):[],Sn=yn.split(":").map(Yt),kn=Qt.IPV4ADDRESS.test(Sn[Sn.length-1]),wn=kn?7:8,Bn=Sn.length-wn,Un=Array(wn),In=0;In<wn;++In)Un[In]=xn[In]||Sn[Bn+In]||"";kn&&(Un[wn-1]=Wt(Un[wn-1],Qt));var Kn=Un.reduce(function(Hn,Vn,Yn){if(!Vn||Vn==="0"){var Qn=Hn[Hn.length-1];Qn&&Qn.index+Qn.length===Yn?Qn.length++:Hn.push({index:Yn,length:1})}return Hn},[]),Gn=Kn.sort(function(Hn,Vn){return Vn.length-Hn.length})[0],zn=void 0;if(Gn&&Gn.length>1){var Wn=Un.slice(0,Gn.index),Jn=Un.slice(Gn.index+Gn.length);zn=Wn.join(":")+"::"+Jn.join(":")}else zn=Un.join(":");return cn&&(zn+="%"+cn),zn}else return er}var jr=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Sr="".match(/(){0}/)[1]===void 0;function Er(er){var Qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},wr={},lr=Qt.iri!==!1?yt:dt;Qt.reference==="suffix"&&(er=(Qt.scheme?Qt.scheme+":":"")+"//"+er);var yr=er.match(jr);if(yr){Sr?(wr.scheme=yr[1],wr.userinfo=yr[3],wr.host=yr[4],wr.port=parseInt(yr[5],10),wr.path=yr[6]||"",wr.query=yr[7],wr.fragment=yr[8],isNaN(wr.port)&&(wr.port=yr[5])):(wr.scheme=yr[1]||void 0,wr.userinfo=er.indexOf("@")!==-1?yr[3]:void 0,wr.host=er.indexOf("//")!==-1?yr[4]:void 0,wr.port=parseInt(yr[5],10),wr.path=yr[6]||"",wr.query=er.indexOf("?")!==-1?yr[7]:void 0,wr.fragment=er.indexOf("#")!==-1?yr[8]:void 0,isNaN(wr.port)&&(wr.port=er.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?yr[4]:void 0)),wr.host&&(wr.host=fr(Wt(wr.host,lr),lr)),wr.scheme===void 0&&wr.userinfo===void 0&&wr.host===void 0&&wr.port===void 0&&!wr.path&&wr.query===void 0?wr.reference="same-document":wr.scheme===void 0?wr.reference="relative":wr.fragment===void 0?wr.reference="absolute":wr.reference="uri",Qt.reference&&Qt.reference!=="suffix"&&Qt.reference!==wr.reference&&(wr.error=wr.error||"URI is not a "+Qt.reference+" reference.");var cn=Vt[(Qt.scheme||wr.scheme||"").toLowerCase()];if(!Qt.unicodeSupport&&(!cn||!cn.unicodeSupport)){if(wr.host&&(Qt.domainHost||cn&&cn.domainHost))try{wr.host=Ut.toASCII(wr.host.replace(lr.PCT_ENCODED,tr).toLowerCase())}catch(Cr){wr.error=wr.error||"Host's domain name can not be converted to ASCII via punycode: "+Cr}Zt(wr,dt)}else Zt(wr,lr);cn&&cn.parse&&cn.parse(wr,Qt)}else wr.error=wr.error||"URI can not be parsed.";return wr}function sn(er,Qt){var wr=Qt.iri!==!1?yt:dt,lr=[];return er.userinfo!==void 0&&(lr.push(er.userinfo),lr.push("@")),er.host!==void 0&&lr.push(fr(Wt(String(er.host),wr),wr).replace(wr.IPV6ADDRESS,function(yr,cn,Cr){return"["+cn+(Cr?"%25"+Cr:"")+"]"})),(typeof er.port=="number"||typeof er.port=="string")&&(lr.push(":"),lr.push(String(er.port))),lr.length?lr.join(""):void 0}var Ir=/^\.\.?\//,gr=/^\/\.(\/|$)/,ln=/^\/\.\.(\/|$)/,Mr=/^\/?(?:.|\n)*?(?=\/|$)/;function Vr(er){for(var Qt=[];er.length;)if(er.match(Ir))er=er.replace(Ir,"");else if(er.match(gr))er=er.replace(gr,"/");else if(er.match(ln))er=er.replace(ln,"/"),Qt.pop();else if(er==="."||er==="..")er="";else{var wr=er.match(Mr);if(wr){var lr=wr[0];er=er.slice(lr.length),Qt.push(lr)}else throw new Error("Unexpected dot segment condition")}return Qt.join("")}function pn(er){var Qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},wr=Qt.iri?yt:dt,lr=[],yr=Vt[(Qt.scheme||er.scheme||"").toLowerCase()];if(yr&&yr.serialize&&yr.serialize(er,Qt),er.host&&!wr.IPV6ADDRESS.test(er.host)){if(Qt.domainHost||yr&&yr.domainHost)try{er.host=Qt.iri?Ut.toUnicode(er.host):Ut.toASCII(er.host.replace(wr.PCT_ENCODED,tr).toLowerCase())}catch(Yr){er.error=er.error||"Host's domain name can not be converted to "+(Qt.iri?"Unicode":"ASCII")+" via punycode: "+Yr}}Zt(er,wr),Qt.reference!=="suffix"&&er.scheme&&(lr.push(er.scheme),lr.push(":"));var cn=sn(er,Qt);if(cn!==void 0&&(Qt.reference!=="suffix"&&lr.push("//"),lr.push(cn),er.path&&er.path.charAt(0)!=="/"&&lr.push("/")),er.path!==void 0){var Cr=er.path;!Qt.absolutePath&&(!yr||!yr.absolutePath)&&(Cr=Vr(Cr)),cn===void 0&&(Cr=Cr.replace(/^\/\//,"/%2F")),lr.push(Cr)}return er.query!==void 0&&(lr.push("?"),lr.push(er.query)),er.fragment!==void 0&&(lr.push("#"),lr.push(er.fragment)),lr.join("")}function Gr(er,Qt){var wr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},lr=arguments[3],yr={};return lr||(er=Er(pn(er,wr),wr),Qt=Er(pn(Qt,wr),wr)),wr=wr||{},!wr.tolerant&&Qt.scheme?(yr.scheme=Qt.scheme,yr.userinfo=Qt.userinfo,yr.host=Qt.host,yr.port=Qt.port,yr.path=Vr(Qt.path||""),yr.query=Qt.query):(Qt.userinfo!==void 0||Qt.host!==void 0||Qt.port!==void 0?(yr.userinfo=Qt.userinfo,yr.host=Qt.host,yr.port=Qt.port,yr.path=Vr(Qt.path||""),yr.query=Qt.query):(Qt.path?(Qt.path.charAt(0)==="/"?yr.path=Vr(Qt.path):((er.userinfo!==void 0||er.host!==void 0||er.port!==void 0)&&!er.path?yr.path="/"+Qt.path:er.path?yr.path=er.path.slice(0,er.path.lastIndexOf("/")+1)+Qt.path:yr.path=Qt.path,yr.path=Vr(yr.path)),yr.query=Qt.query):(yr.path=er.path,Qt.query!==void 0?yr.query=Qt.query:yr.query=er.query),yr.userinfo=er.userinfo,yr.host=er.host,yr.port=er.port),yr.scheme=er.scheme),yr.fragment=Qt.fragment,yr}function Zr(er,Qt,wr){var lr=at({scheme:"null"},wr);return pn(Gr(Er(er,lr),Er(Qt,lr),lr,!0),lr)}function Mn(er,Qt){return typeof er=="string"?er=pn(Er(er,Qt),Qt):et(er)==="object"&&(er=Er(pn(er,Qt),Qt)),er}function Wr(er,Qt,wr){return typeof er=="string"?er=pn(Er(er,wr),wr):et(er)==="object"&&(er=pn(er,wr)),typeof Qt=="string"?Qt=pn(Er(Qt,wr),wr):et(Qt)==="object"&&(Qt=pn(Qt,wr)),er===Qt}function Qr(er,Qt){return er&&er.toString().replace(!Qt||!Qt.iri?dt.ESCAPE:yt.ESCAPE,rr)}function On(er,Qt){return er&&er.toString().replace(!Qt||!Qt.iri?dt.PCT_ENCODED:yt.PCT_ENCODED,tr)}var Kt={scheme:"http",domainHost:!0,parse:function(Qt,wr){return Qt.host||(Qt.error=Qt.error||"HTTP URIs must have a host."),Qt},serialize:function(Qt,wr){var lr=String(Qt.scheme).toLowerCase()==="https";return(Qt.port===(lr?443:80)||Qt.port==="")&&(Qt.port=void 0),Qt.path||(Qt.path="/"),Qt}},Lt={scheme:"https",domainHost:Kt.domainHost,parse:Kt.parse,serialize:Kt.serialize};function Ht(er){return typeof er.secure=="boolean"?er.secure:String(er.scheme).toLowerCase()==="wss"}var Xt={scheme:"ws",domainHost:!0,parse:function(Qt,wr){var lr=Qt;return lr.secure=Ht(lr),lr.resourceName=(lr.path||"/")+(lr.query?"?"+lr.query:""),lr.path=void 0,lr.query=void 0,lr},serialize:function(Qt,wr){if((Qt.port===(Ht(Qt)?443:80)||Qt.port==="")&&(Qt.port=void 0),typeof Qt.secure=="boolean"&&(Qt.scheme=Qt.secure?"wss":"ws",Qt.secure=void 0),Qt.resourceName){var lr=Qt.resourceName.split("?"),yr=bt(lr,2),cn=yr[0],Cr=yr[1];Qt.path=cn&&cn!=="/"?cn:void 0,Qt.query=Cr,Qt.resourceName=void 0}return Qt.fragment=void 0,Qt}},cr={scheme:"wss",domainHost:Xt.domainHost,parse:Xt.parse,serialize:Xt.serialize},qr={},br="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Ur="[0-9A-Fa-f]",$n=_e(_e("%[EFef]"+Ur+"%"+Ur+Ur+"%"+Ur+Ur)+"|"+_e("%[89A-Fa-f]"+Ur+"%"+Ur+Ur)+"|"+_e("%"+Ur+Ur)),Hr="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Xr="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",mn=j(Xr,'[\\"\\\\]'),Fr="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",an=new RegExp(br,"g"),Nn=new RegExp($n,"g"),ar=new RegExp(j("[^]",Hr,"[\\.]",'[\\"]',mn),"g"),Jt=new RegExp(j("[^]",br,Fr),"g"),_r=Jt;function ur(er){var Qt=tr(er);return Qt.match(an)?Qt:er}var $r={scheme:"mailto",parse:function(Qt,wr){var lr=Qt,yr=lr.to=lr.path?lr.path.split(","):[];if(lr.path=void 0,lr.query){for(var cn=!1,Cr={},Yr=lr.query.split("&"),yn=0,_n=Yr.length;yn<_n;++yn){var xn=Yr[yn].split("=");switch(xn[0]){case"to":for(var Sn=xn[1].split(","),kn=0,wn=Sn.length;kn<wn;++kn)yr.push(Sn[kn]);break;case"subject":lr.subject=On(xn[1],wr);break;case"body":lr.body=On(xn[1],wr);break;default:cn=!0,Cr[On(xn[0],wr)]=On(xn[1],wr);break}}cn&&(lr.headers=Cr)}lr.query=void 0;for(var Bn=0,Un=yr.length;Bn<Un;++Bn){var In=yr[Bn].split("@");if(In[0]=On(In[0]),wr.unicodeSupport)In[1]=On(In[1],wr).toLowerCase();else try{In[1]=Ut.toASCII(On(In[1],wr).toLowerCase())}catch(Kn){lr.error=lr.error||"Email address's domain name can not be converted to ASCII via punycode: "+Kn}yr[Bn]=In.join("@")}return lr},serialize:function(Qt,wr){var lr=Qt,yr=rt(Qt.to);if(yr){for(var cn=0,Cr=yr.length;cn<Cr;++cn){var Yr=String(yr[cn]),yn=Yr.lastIndexOf("@"),_n=Yr.slice(0,yn).replace(Nn,ur).replace(Nn,tt).replace(ar,rr),xn=Yr.slice(yn+1);try{xn=wr.iri?Ut.toUnicode(xn):Ut.toASCII(On(xn,wr).toLowerCase())}catch(Bn){lr.error=lr.error||"Email address's domain name can not be converted to "+(wr.iri?"Unicode":"ASCII")+" via punycode: "+Bn}yr[cn]=_n+"@"+xn}lr.path=yr.join(",")}var Sn=Qt.headers=Qt.headers||{};Qt.subject&&(Sn.subject=Qt.subject),Qt.body&&(Sn.body=Qt.body);var kn=[];for(var wn in Sn)Sn[wn]!==qr[wn]&&kn.push(wn.replace(Nn,ur).replace(Nn,tt).replace(Jt,rr)+"="+Sn[wn].replace(Nn,ur).replace(Nn,tt).replace(_r,rr));return kn.length&&(lr.query=kn.join("&")),lr}},en=/^([^\:]+)\:(.*)/,Rr={scheme:"urn",parse:function(Qt,wr){var lr=Qt.path&&Qt.path.match(en),yr=Qt;if(lr){var cn=wr.scheme||yr.scheme||"urn",Cr=lr[1].toLowerCase(),Yr=lr[2],yn=cn+":"+(wr.nid||Cr),_n=Vt[yn];yr.nid=Cr,yr.nss=Yr,yr.path=void 0,_n&&(yr=_n.parse(yr,wr))}else yr.error=yr.error||"URN can not be parsed.";return yr},serialize:function(Qt,wr){var lr=wr.scheme||Qt.scheme||"urn",yr=Qt.nid,cn=lr+":"+(wr.nid||yr),Cr=Vt[cn];Cr&&(Qt=Cr.serialize(Qt,wr));var Yr=Qt,yn=Qt.nss;return Yr.path=(yr||wr.nid)+":"+yn,Yr}},Br=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,fn={scheme:"urn:uuid",parse:function(Qt,wr){var lr=Qt;return lr.uuid=lr.nss,lr.nss=void 0,!wr.tolerant&&(!lr.uuid||!lr.uuid.match(Br))&&(lr.error=lr.error||"UUID is not valid."),lr},serialize:function(Qt,wr){var lr=Qt;return lr.nss=(Qt.uuid||"").toLowerCase(),lr}};Vt[Kt.scheme]=Kt,Vt[Lt.scheme]=Lt,Vt[Xt.scheme]=Xt,Vt[cr.scheme]=cr,Vt[$r.scheme]=$r,Vt[Rr.scheme]=Rr,Vt[fn.scheme]=fn,$.SCHEMES=Vt,$.pctEncChar=rr,$.pctDecChars=tr,$.parse=Er,$.removeDotSegments=Vr,$.serialize=pn,$.resolveComponents=Gr,$.resolve=Zr,$.normalize=Mn,$.equal=Wr,$.escapeComponent=Qr,$.unescapeComponent=On,Object.defineProperty($,"__esModule",{value:!0})})})(uri_all,uri_all.exports);var uri_allExports=uri_all.exports;Object.defineProperty(uri$1,"__esModule",{value:!0});const uri=uri_allExports;uri.code='require("ajv/dist/runtime/uri").default';uri$1.default=uri;(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.CodeGen=a.Name=a.nil=a.stringify=a.str=a._=a.KeywordCxt=void 0;var _=validate;Object.defineProperty(a,"KeywordCxt",{enumerable:!0,get:function(){return _.KeywordCxt}});var $=codegen;Object.defineProperty(a,"_",{enumerable:!0,get:function(){return $._}}),Object.defineProperty(a,"str",{enumerable:!0,get:function(){return $.str}}),Object.defineProperty(a,"stringify",{enumerable:!0,get:function(){return $.stringify}}),Object.defineProperty(a,"nil",{enumerable:!0,get:function(){return $.nil}}),Object.defineProperty(a,"Name",{enumerable:!0,get:function(){return $.Name}}),Object.defineProperty(a,"CodeGen",{enumerable:!0,get:function(){return $.CodeGen}});const j=validation_error,_e=ref_error,et=rules,tt=compile,rt=codegen,at=resolve$1,ct=dataType,dt=util$1,yt=require$$9,bt=uri$1,Et=(ot,pt)=>new RegExp(ot,pt);Et.code="new RegExp";const $t=["removeAdditional","useDefaults","coerceTypes"],_t=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),xt={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},St={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Mt=200;function Tt(ot){var pt,Pt,Ot,Nt,jt,Ut,Vt,rr,tr,Zt,Yt,Wt,fr,jr,Sr,Er,sn,Ir,gr,ln,Mr,Vr,pn,Gr,Zr;const Mn=ot.strict,Wr=(pt=ot.code)===null||pt===void 0?void 0:pt.optimize,Qr=Wr===!0||Wr===void 0?1:Wr||0,On=(Ot=(Pt=ot.code)===null||Pt===void 0?void 0:Pt.regExp)!==null&&Ot!==void 0?Ot:Et,Kt=(Nt=ot.uriResolver)!==null&&Nt!==void 0?Nt:bt.default;return{strictSchema:(Ut=(jt=ot.strictSchema)!==null&&jt!==void 0?jt:Mn)!==null&&Ut!==void 0?Ut:!0,strictNumbers:(rr=(Vt=ot.strictNumbers)!==null&&Vt!==void 0?Vt:Mn)!==null&&rr!==void 0?rr:!0,strictTypes:(Zt=(tr=ot.strictTypes)!==null&&tr!==void 0?tr:Mn)!==null&&Zt!==void 0?Zt:"log",strictTuples:(Wt=(Yt=ot.strictTuples)!==null&&Yt!==void 0?Yt:Mn)!==null&&Wt!==void 0?Wt:"log",strictRequired:(jr=(fr=ot.strictRequired)!==null&&fr!==void 0?fr:Mn)!==null&&jr!==void 0?jr:!1,code:ot.code?{...ot.code,optimize:Qr,regExp:On}:{optimize:Qr,regExp:On},loopRequired:(Sr=ot.loopRequired)!==null&&Sr!==void 0?Sr:Mt,loopEnum:(Er=ot.loopEnum)!==null&&Er!==void 0?Er:Mt,meta:(sn=ot.meta)!==null&&sn!==void 0?sn:!0,messages:(Ir=ot.messages)!==null&&Ir!==void 0?Ir:!0,inlineRefs:(gr=ot.inlineRefs)!==null&&gr!==void 0?gr:!0,schemaId:(ln=ot.schemaId)!==null&&ln!==void 0?ln:"$id",addUsedSchema:(Mr=ot.addUsedSchema)!==null&&Mr!==void 0?Mr:!0,validateSchema:(Vr=ot.validateSchema)!==null&&Vr!==void 0?Vr:!0,validateFormats:(pn=ot.validateFormats)!==null&&pn!==void 0?pn:!0,unicodeRegExp:(Gr=ot.unicodeRegExp)!==null&&Gr!==void 0?Gr:!0,int32range:(Zr=ot.int32range)!==null&&Zr!==void 0?Zr:!0,uriResolver:Kt}}class Rt{constructor(pt={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,pt=this.opts={...pt,...Tt(pt)};const{es5:Pt,lines:Ot}=this.opts.code;this.scope=new rt.ValueScope({scope:{},prefixes:_t,es5:Pt,lines:Ot}),this.logger=nt(pt.logger);const Nt=pt.validateFormats;pt.validateFormats=!1,this.RULES=(0,et.getRules)(),Ct.call(this,xt,pt,"NOT SUPPORTED"),Ct.call(this,St,pt,"DEPRECATED","warn"),this._metaOpts=zt.call(this),pt.formats&&Dt.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),pt.keywords&&Bt.call(this,pt.keywords),typeof pt.meta=="object"&&this.addMetaSchema(pt.meta),kt.call(this),pt.validateFormats=Nt}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:pt,meta:Pt,schemaId:Ot}=this.opts;let Nt=yt;Ot==="id"&&(Nt={...yt},Nt.id=Nt.$id,delete Nt.$id),Pt&&pt&&this.addMetaSchema(Nt,Nt[Ot],!1)}defaultMeta(){const{meta:pt,schemaId:Pt}=this.opts;return this.opts.defaultMeta=typeof pt=="object"?pt[Pt]||pt:void 0}validate(pt,Pt){let Ot;if(typeof pt=="string"){if(Ot=this.getSchema(pt),!Ot)throw new Error(`no schema with key or ref "${pt}"`)}else Ot=this.compile(pt);const Nt=Ot(Pt);return"$async"in Ot||(this.errors=Ot.errors),Nt}compile(pt,Pt){const Ot=this._addSchema(pt,Pt);return Ot.validate||this._compileSchemaEnv(Ot)}compileAsync(pt,Pt){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:Ot}=this.opts;return Nt.call(this,pt,Pt);async function Nt(Zt,Yt){await jt.call(this,Zt.$schema);const Wt=this._addSchema(Zt,Yt);return Wt.validate||Ut.call(this,Wt)}async function jt(Zt){Zt&&!this.getSchema(Zt)&&await Nt.call(this,{$ref:Zt},!0)}async function Ut(Zt){try{return this._compileSchemaEnv(Zt)}catch(Yt){if(!(Yt instanceof _e.default))throw Yt;return Vt.call(this,Yt),await rr.call(this,Yt.missingSchema),Ut.call(this,Zt)}}function Vt({missingSchema:Zt,missingRef:Yt}){if(this.refs[Zt])throw new Error(`AnySchema ${Zt} is loaded but ${Yt} cannot be resolved`)}async function rr(Zt){const Yt=await tr.call(this,Zt);this.refs[Zt]||await jt.call(this,Yt.$schema),this.refs[Zt]||this.addSchema(Yt,Zt,Pt)}async function tr(Zt){const Yt=this._loading[Zt];if(Yt)return Yt;try{return await(this._loading[Zt]=Ot(Zt))}finally{delete this._loading[Zt]}}}addSchema(pt,Pt,Ot,Nt=this.opts.validateSchema){if(Array.isArray(pt)){for(const Ut of pt)this.addSchema(Ut,void 0,Ot,Nt);return this}let jt;if(typeof pt=="object"){const{schemaId:Ut}=this.opts;if(jt=pt[Ut],jt!==void 0&&typeof jt!="string")throw new Error(`schema ${Ut} must be string`)}return Pt=(0,at.normalizeId)(Pt||jt),this._checkUnique(Pt),this.schemas[Pt]=this._addSchema(pt,Ot,Pt,Nt,!0),this}addMetaSchema(pt,Pt,Ot=this.opts.validateSchema){return this.addSchema(pt,Pt,!0,Ot),this}validateSchema(pt,Pt){if(typeof pt=="boolean")return!0;let Ot;if(Ot=pt.$schema,Ot!==void 0&&typeof Ot!="string")throw new Error("$schema must be a string");if(Ot=Ot||this.opts.defaultMeta||this.defaultMeta(),!Ot)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const Nt=this.validate(Ot,pt);if(!Nt&&Pt){const jt="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(jt);else throw new Error(jt)}return Nt}getSchema(pt){let Pt;for(;typeof(Pt=It.call(this,pt))=="string";)pt=Pt;if(Pt===void 0){const{schemaId:Ot}=this.opts,Nt=new tt.SchemaEnv({schema:{},schemaId:Ot});if(Pt=tt.resolveSchema.call(this,Nt,pt),!Pt)return;this.refs[pt]=Pt}return Pt.validate||this._compileSchemaEnv(Pt)}removeSchema(pt){if(pt instanceof RegExp)return this._removeAllSchemas(this.schemas,pt),this._removeAllSchemas(this.refs,pt),this;switch(typeof pt){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const Pt=It.call(this,pt);return typeof Pt=="object"&&this._cache.delete(Pt.schema),delete this.schemas[pt],delete this.refs[pt],this}case"object":{const Pt=pt;this._cache.delete(Pt);let Ot=pt[this.opts.schemaId];return Ot&&(Ot=(0,at.normalizeId)(Ot),delete this.schemas[Ot],delete this.refs[Ot]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(pt){for(const Pt of pt)this.addKeyword(Pt);return this}addKeyword(pt,Pt){let Ot;if(typeof pt=="string")Ot=pt,typeof Pt=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),Pt.keyword=Ot);else if(typeof pt=="object"&&Pt===void 0){if(Pt=pt,Ot=Pt.keyword,Array.isArray(Ot)&&!Ot.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(lt.call(this,Ot,Pt),!Pt)return(0,dt.eachItem)(Ot,jt=>ht.call(this,jt)),this;wt.call(this,Pt);const Nt={...Pt,type:(0,ct.getJSONTypes)(Pt.type),schemaType:(0,ct.getJSONTypes)(Pt.schemaType)};return(0,dt.eachItem)(Ot,Nt.type.length===0?jt=>ht.call(this,jt,Nt):jt=>Nt.type.forEach(Ut=>ht.call(this,jt,Nt,Ut))),this}getKeyword(pt){const Pt=this.RULES.all[pt];return typeof Pt=="object"?Pt.definition:!!Pt}removeKeyword(pt){const{RULES:Pt}=this;delete Pt.keywords[pt],delete Pt.all[pt];for(const Ot of Pt.rules){const Nt=Ot.rules.findIndex(jt=>jt.keyword===pt);Nt>=0&&Ot.rules.splice(Nt,1)}return this}addFormat(pt,Pt){return typeof Pt=="string"&&(Pt=new RegExp(Pt)),this.formats[pt]=Pt,this}errorsText(pt=this.errors,{separator:Pt=", ",dataVar:Ot="data"}={}){return!pt||pt.length===0?"No errors":pt.map(Nt=>`${Ot}${Nt.instancePath} ${Nt.message}`).reduce((Nt,jt)=>Nt+Pt+jt)}$dataMetaSchema(pt,Pt){const Ot=this.RULES.all;pt=JSON.parse(JSON.stringify(pt));for(const Nt of Pt){const jt=Nt.split("/").slice(1);let Ut=pt;for(const Vt of jt)Ut=Ut[Vt];for(const Vt in Ot){const rr=Ot[Vt];if(typeof rr!="object")continue;const{$data:tr}=rr.definition,Zt=Ut[Vt];tr&&Zt&&(Ut[Vt]=gt(Zt))}}return pt}_removeAllSchemas(pt,Pt){for(const Ot in pt){const Nt=pt[Ot];(!Pt||Pt.test(Ot))&&(typeof Nt=="string"?delete pt[Ot]:Nt&&!Nt.meta&&(this._cache.delete(Nt.schema),delete pt[Ot]))}}_addSchema(pt,Pt,Ot,Nt=this.opts.validateSchema,jt=this.opts.addUsedSchema){let Ut;const{schemaId:Vt}=this.opts;if(typeof pt=="object")Ut=pt[Vt];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof pt!="boolean")throw new Error("schema must be object or boolean")}let rr=this._cache.get(pt);if(rr!==void 0)return rr;Ot=(0,at.normalizeId)(Ut||Ot);const tr=at.getSchemaRefs.call(this,pt,Ot);return rr=new tt.SchemaEnv({schema:pt,schemaId:Vt,meta:Pt,baseId:Ot,localRefs:tr}),this._cache.set(rr.schema,rr),jt&&!Ot.startsWith("#")&&(Ot&&this._checkUnique(Ot),this.refs[Ot]=rr),Nt&&this.validateSchema(pt,!0),rr}_checkUnique(pt){if(this.schemas[pt]||this.refs[pt])throw new Error(`schema with key or id "${pt}" already exists`)}_compileSchemaEnv(pt){if(pt.meta?this._compileMetaSchema(pt):tt.compileSchema.call(this,pt),!pt.validate)throw new Error("ajv implementation error");return pt.validate}_compileMetaSchema(pt){const Pt=this.opts;this.opts=this._metaOpts;try{tt.compileSchema.call(this,pt)}finally{this.opts=Pt}}}a.default=Rt,Rt.ValidationError=j.default,Rt.MissingRefError=_e.default;function Ct(ot,pt,Pt,Ot="error"){for(const Nt in ot){const jt=Nt;jt in pt&&this.logger[Ot](`${Pt}: option ${Nt}. ${ot[jt]}`)}}function It(ot){return ot=(0,at.normalizeId)(ot),this.schemas[ot]||this.refs[ot]}function kt(){const ot=this.opts.schemas;if(ot)if(Array.isArray(ot))this.addSchema(ot);else for(const pt in ot)this.addSchema(ot[pt],pt)}function Dt(){for(const ot in this.opts.formats){const pt=this.opts.formats[ot];pt&&this.addFormat(ot,pt)}}function Bt(ot){if(Array.isArray(ot)){this.addVocabulary(ot);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const pt in ot){const Pt=ot[pt];Pt.keyword||(Pt.keyword=pt),this.addKeyword(Pt)}}function zt(){const ot={...this.opts};for(const pt of $t)delete ot[pt];return ot}const vt={log(){},warn(){},error(){}};function nt(ot){if(ot===!1)return vt;if(ot===void 0)return console;if(ot.log&&ot.warn&&ot.error)return ot;throw new Error("logger must implement log, warn and error methods")}const st=/^[a-z_$][a-z0-9_$:-]*$/i;function lt(ot,pt){const{RULES:Pt}=this;if((0,dt.eachItem)(ot,Ot=>{if(Pt.keywords[Ot])throw new Error(`Keyword ${Ot} is already defined`);if(!st.test(Ot))throw new Error(`Keyword ${Ot} has invalid name`)}),!!pt&&pt.$data&&!("code"in pt||"validate"in pt))throw new Error('$data keyword must have "code" or "validate" function')}function ht(ot,pt,Pt){var Ot;const Nt=pt==null?void 0:pt.post;if(Pt&&Nt)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:jt}=this;let Ut=Nt?jt.post:jt.rules.find(({type:rr})=>rr===Pt);if(Ut||(Ut={type:Pt,rules:[]},jt.rules.push(Ut)),jt.keywords[ot]=!0,!pt)return;const Vt={keyword:ot,definition:{...pt,type:(0,ct.getJSONTypes)(pt.type),schemaType:(0,ct.getJSONTypes)(pt.schemaType)}};pt.before?mt.call(this,Ut,Vt,pt.before):Ut.rules.push(Vt),jt.all[ot]=Vt,(Ot=pt.implements)===null||Ot===void 0||Ot.forEach(rr=>this.addKeyword(rr))}function mt(ot,pt,Pt){const Ot=ot.rules.findIndex(Nt=>Nt.keyword===Pt);Ot>=0?ot.rules.splice(Ot,0,pt):(ot.rules.push(pt),this.logger.warn(`rule ${Pt} is not defined`))}function wt(ot){let{metaSchema:pt}=ot;pt!==void 0&&(ot.$data&&this.opts.$data&&(pt=gt(pt)),ot.validateSchema=this.compile(pt,!0))}const At={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function gt(ot){return{anyOf:[ot,At]}}})(core$2);var draft7={},core$1={},id={};Object.defineProperty(id,"__esModule",{value:!0});const def$s={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};id.default=def$s;var ref={};Object.defineProperty(ref,"__esModule",{value:!0});ref.callRef=ref.getValidate=void 0;const ref_error_1=ref_error,code_1$8=code$1,codegen_1$m=codegen,names_1$1=names$1,compile_1$1=compile,util_1$j=util$1,def$r={keyword:"$ref",schemaType:"string",code(a){const{gen:_,schema:$,it:j}=a,{baseId:_e,schemaEnv:et,validateName:tt,opts:rt,self:at}=j,{root:ct}=et;if(($==="#"||$==="#/")&&_e===ct.baseId)return yt();const dt=compile_1$1.resolveRef.call(at,ct,_e,$);if(dt===void 0)throw new ref_error_1.default(j.opts.uriResolver,_e,$);if(dt instanceof compile_1$1.SchemaEnv)return bt(dt);return Et(dt);function yt(){if(et===ct)return callRef(a,tt,et,et.$async);const $t=_.scopeValue("root",{ref:ct});return callRef(a,(0,codegen_1$m._)`${$t}.validate`,ct,ct.$async)}function bt($t){const _t=getValidate(a,$t);callRef(a,_t,$t,$t.$async)}function Et($t){const _t=_.scopeValue("schema",rt.code.source===!0?{ref:$t,code:(0,codegen_1$m.stringify)($t)}:{ref:$t}),xt=_.name("valid"),St=a.subschema({schema:$t,dataTypes:[],schemaPath:codegen_1$m.nil,topSchemaRef:_t,errSchemaPath:$},xt);a.mergeEvaluated(St),a.ok(xt)}}};function getValidate(a,_){const{gen:$}=a;return _.validate?$.scopeValue("validate",{ref:_.validate}):(0,codegen_1$m._)`${$.scopeValue("wrapper",{ref:_})}.validate`}ref.getValidate=getValidate;function callRef(a,_,$,j){const{gen:_e,it:et}=a,{allErrors:tt,schemaEnv:rt,opts:at}=et,ct=at.passContext?names_1$1.default.this:codegen_1$m.nil;j?dt():yt();function dt(){if(!rt.$async)throw new Error("async schema referenced by sync schema");const $t=_e.let("valid");_e.try(()=>{_e.code((0,codegen_1$m._)`await ${(0,code_1$8.callValidateCode)(a,_,ct)}`),Et(_),tt||_e.assign($t,!0)},_t=>{_e.if((0,codegen_1$m._)`!(${_t} instanceof ${et.ValidationError})`,()=>_e.throw(_t)),bt(_t),tt||_e.assign($t,!1)}),a.ok($t)}function yt(){a.result((0,code_1$8.callValidateCode)(a,_,ct),()=>Et(_),()=>bt(_))}function bt($t){const _t=(0,codegen_1$m._)`${$t}.errors`;_e.assign(names_1$1.default.vErrors,(0,codegen_1$m._)`${names_1$1.default.vErrors} === null ? ${_t} : ${names_1$1.default.vErrors}.concat(${_t})`),_e.assign(names_1$1.default.errors,(0,codegen_1$m._)`${names_1$1.default.vErrors}.length`)}function Et($t){var _t;if(!et.opts.unevaluated)return;const xt=(_t=$==null?void 0:$.validate)===null||_t===void 0?void 0:_t.evaluated;if(et.props!==!0)if(xt&&!xt.dynamicProps)xt.props!==void 0&&(et.props=util_1$j.mergeEvaluated.props(_e,xt.props,et.props));else{const St=_e.var("props",(0,codegen_1$m._)`${$t}.evaluated.props`);et.props=util_1$j.mergeEvaluated.props(_e,St,et.props,codegen_1$m.Name)}if(et.items!==!0)if(xt&&!xt.dynamicItems)xt.items!==void 0&&(et.items=util_1$j.mergeEvaluated.items(_e,xt.items,et.items));else{const St=_e.var("items",(0,codegen_1$m._)`${$t}.evaluated.items`);et.items=util_1$j.mergeEvaluated.items(_e,St,et.items,codegen_1$m.Name)}}}ref.callRef=callRef;ref.default=def$r;Object.defineProperty(core$1,"__esModule",{value:!0});const id_1=id,ref_1=ref,core=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",id_1.default,ref_1.default];core$1.default=core;var validation$4={},limitNumber={};Object.defineProperty(limitNumber,"__esModule",{value:!0});const codegen_1$l=codegen,ops=codegen_1$l.operators,KWDs={maximum:{okStr:"<=",ok:ops.LTE,fail:ops.GT},minimum:{okStr:">=",ok:ops.GTE,fail:ops.LT},exclusiveMaximum:{okStr:"<",ok:ops.LT,fail:ops.GTE},exclusiveMinimum:{okStr:">",ok:ops.GT,fail:ops.LTE}},error$j={message:({keyword:a,schemaCode:_})=>(0,codegen_1$l.str)`must be ${KWDs[a].okStr} ${_}`,params:({keyword:a,schemaCode:_})=>(0,codegen_1$l._)`{comparison: ${KWDs[a].okStr}, limit: ${_}}`},def$q={keyword:Object.keys(KWDs),type:"number",schemaType:"number",$data:!0,error:error$j,code(a){const{keyword:_,data:$,schemaCode:j}=a;a.fail$data((0,codegen_1$l._)`${$} ${KWDs[_].fail} ${j} || isNaN(${$})`)}};limitNumber.default=def$q;var multipleOf={};Object.defineProperty(multipleOf,"__esModule",{value:!0});const codegen_1$k=codegen,error$i={message:({schemaCode:a})=>(0,codegen_1$k.str)`must be multiple of ${a}`,params:({schemaCode:a})=>(0,codegen_1$k._)`{multipleOf: ${a}}`},def$p={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:error$i,code(a){const{gen:_,data:$,schemaCode:j,it:_e}=a,et=_e.opts.multipleOfPrecision,tt=_.let("res"),rt=et?(0,codegen_1$k._)`Math.abs(Math.round(${tt}) - ${tt}) > 1e-${et}`:(0,codegen_1$k._)`${tt} !== parseInt(${tt})`;a.fail$data((0,codegen_1$k._)`(${j} === 0 || (${tt} = ${$}/${j}, ${rt}))`)}};multipleOf.default=def$p;var limitLength={},ucs2length$1={};Object.defineProperty(ucs2length$1,"__esModule",{value:!0});function ucs2length(a){const _=a.length;let $=0,j=0,_e;for(;j<_;)$++,_e=a.charCodeAt(j++),_e>=55296&&_e<=56319&&j<_&&(_e=a.charCodeAt(j),(_e&64512)===56320&&j++);return $}ucs2length$1.default=ucs2length;ucs2length.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(limitLength,"__esModule",{value:!0});const codegen_1$j=codegen,util_1$i=util$1,ucs2length_1=ucs2length$1,error$h={message({keyword:a,schemaCode:_}){const $=a==="maxLength"?"more":"fewer";return(0,codegen_1$j.str)`must NOT have ${$} than ${_} characters`},params:({schemaCode:a})=>(0,codegen_1$j._)`{limit: ${a}}`},def$o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:error$h,code(a){const{keyword:_,data:$,schemaCode:j,it:_e}=a,et=_==="maxLength"?codegen_1$j.operators.GT:codegen_1$j.operators.LT,tt=_e.opts.unicode===!1?(0,codegen_1$j._)`${$}.length`:(0,codegen_1$j._)`${(0,util_1$i.useFunc)(a.gen,ucs2length_1.default)}(${$})`;a.fail$data((0,codegen_1$j._)`${tt} ${et} ${j}`)}};limitLength.default=def$o;var pattern={};Object.defineProperty(pattern,"__esModule",{value:!0});const code_1$7=code$1,codegen_1$i=codegen,error$g={message:({schemaCode:a})=>(0,codegen_1$i.str)`must match pattern "${a}"`,params:({schemaCode:a})=>(0,codegen_1$i._)`{pattern: ${a}}`},def$n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:error$g,code(a){const{data:_,$data:$,schema:j,schemaCode:_e,it:et}=a,tt=et.opts.unicodeRegExp?"u":"",rt=$?(0,codegen_1$i._)`(new RegExp(${_e}, ${tt}))`:(0,code_1$7.usePattern)(a,j);a.fail$data((0,codegen_1$i._)`!${rt}.test(${_})`)}};pattern.default=def$n;var limitProperties={};Object.defineProperty(limitProperties,"__esModule",{value:!0});const codegen_1$h=codegen,error$f={message({keyword:a,schemaCode:_}){const $=a==="maxProperties"?"more":"fewer";return(0,codegen_1$h.str)`must NOT have ${$} than ${_} properties`},params:({schemaCode:a})=>(0,codegen_1$h._)`{limit: ${a}}`},def$m={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:error$f,code(a){const{keyword:_,data:$,schemaCode:j}=a,_e=_==="maxProperties"?codegen_1$h.operators.GT:codegen_1$h.operators.LT;a.fail$data((0,codegen_1$h._)`Object.keys(${$}).length ${_e} ${j}`)}};limitProperties.default=def$m;var required={};Object.defineProperty(required,"__esModule",{value:!0});const code_1$6=code$1,codegen_1$g=codegen,util_1$h=util$1,error$e={message:({params:{missingProperty:a}})=>(0,codegen_1$g.str)`must have required property '${a}'`,params:({params:{missingProperty:a}})=>(0,codegen_1$g._)`{missingProperty: ${a}}`},def$l={keyword:"required",type:"object",schemaType:"array",$data:!0,error:error$e,code(a){const{gen:_,schema:$,schemaCode:j,data:_e,$data:et,it:tt}=a,{opts:rt}=tt;if(!et&&$.length===0)return;const at=$.length>=rt.loopRequired;if(tt.allErrors?ct():dt(),rt.strictRequired){const Et=a.parentSchema.properties,{definedProperties:$t}=a.it;for(const _t of $)if((Et==null?void 0:Et[_t])===void 0&&!$t.has(_t)){const xt=tt.schemaEnv.baseId+tt.errSchemaPath,St=`required property "${_t}" is not defined at "${xt}" (strictRequired)`;(0,util_1$h.checkStrictMode)(tt,St,tt.opts.strictRequired)}}function ct(){if(at||et)a.block$data(codegen_1$g.nil,yt);else for(const Et of $)(0,code_1$6.checkReportMissingProp)(a,Et)}function dt(){const Et=_.let("missing");if(at||et){const $t=_.let("valid",!0);a.block$data($t,()=>bt(Et,$t)),a.ok($t)}else _.if((0,code_1$6.checkMissingProp)(a,$,Et)),(0,code_1$6.reportMissingProp)(a,Et),_.else()}function yt(){_.forOf("prop",j,Et=>{a.setParams({missingProperty:Et}),_.if((0,code_1$6.noPropertyInData)(_,_e,Et,rt.ownProperties),()=>a.error())})}function bt(Et,$t){a.setParams({missingProperty:Et}),_.forOf(Et,j,()=>{_.assign($t,(0,code_1$6.propertyInData)(_,_e,Et,rt.ownProperties)),_.if((0,codegen_1$g.not)($t),()=>{a.error(),_.break()})},codegen_1$g.nil)}}};required.default=def$l;var limitItems={};Object.defineProperty(limitItems,"__esModule",{value:!0});const codegen_1$f=codegen,error$d={message({keyword:a,schemaCode:_}){const $=a==="maxItems"?"more":"fewer";return(0,codegen_1$f.str)`must NOT have ${$} than ${_} items`},params:({schemaCode:a})=>(0,codegen_1$f._)`{limit: ${a}}`},def$k={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:error$d,code(a){const{keyword:_,data:$,schemaCode:j}=a,_e=_==="maxItems"?codegen_1$f.operators.GT:codegen_1$f.operators.LT;a.fail$data((0,codegen_1$f._)`${$}.length ${_e} ${j}`)}};limitItems.default=def$k;var uniqueItems={},equal$2={};Object.defineProperty(equal$2,"__esModule",{value:!0});const equal$1=fastDeepEqual;equal$1.code='require("ajv/dist/runtime/equal").default';equal$2.default=equal$1;Object.defineProperty(uniqueItems,"__esModule",{value:!0});const dataType_1=dataType,codegen_1$e=codegen,util_1$g=util$1,equal_1$2=equal$2,error$c={message:({params:{i:a,j:_}})=>(0,codegen_1$e.str)`must NOT have duplicate items (items ## ${_} and ${a} are identical)`,params:({params:{i:a,j:_}})=>(0,codegen_1$e._)`{i: ${a}, j: ${_}}`},def$j={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:error$c,code(a){const{gen:_,data:$,$data:j,schema:_e,parentSchema:et,schemaCode:tt,it:rt}=a;if(!j&&!_e)return;const at=_.let("valid"),ct=et.items?(0,dataType_1.getSchemaTypes)(et.items):[];a.block$data(at,dt,(0,codegen_1$e._)`${tt} === false`),a.ok(at);function dt(){const $t=_.let("i",(0,codegen_1$e._)`${$}.length`),_t=_.let("j");a.setParams({i:$t,j:_t}),_.assign(at,!0),_.if((0,codegen_1$e._)`${$t} > 1`,()=>(yt()?bt:Et)($t,_t))}function yt(){return ct.length>0&&!ct.some($t=>$t==="object"||$t==="array")}function bt($t,_t){const xt=_.name("item"),St=(0,dataType_1.checkDataTypes)(ct,xt,rt.opts.strictNumbers,dataType_1.DataType.Wrong),Mt=_.const("indices",(0,codegen_1$e._)`{}`);_.for((0,codegen_1$e._)`;${$t}--;`,()=>{_.let(xt,(0,codegen_1$e._)`${$}[${$t}]`),_.if(St,(0,codegen_1$e._)`continue`),ct.length>1&&_.if((0,codegen_1$e._)`typeof ${xt} == "string"`,(0,codegen_1$e._)`${xt} += "_"`),_.if((0,codegen_1$e._)`typeof ${Mt}[${xt}] == "number"`,()=>{_.assign(_t,(0,codegen_1$e._)`${Mt}[${xt}]`),a.error(),_.assign(at,!1).break()}).code((0,codegen_1$e._)`${Mt}[${xt}] = ${$t}`)})}function Et($t,_t){const xt=(0,util_1$g.useFunc)(_,equal_1$2.default),St=_.name("outer");_.label(St).for((0,codegen_1$e._)`;${$t}--;`,()=>_.for((0,codegen_1$e._)`${_t} = ${$t}; ${_t}--;`,()=>_.if((0,codegen_1$e._)`${xt}(${$}[${$t}], ${$}[${_t}])`,()=>{a.error(),_.assign(at,!1).break(St)})))}}};uniqueItems.default=def$j;var _const={};Object.defineProperty(_const,"__esModule",{value:!0});const codegen_1$d=codegen,util_1$f=util$1,equal_1$1=equal$2,error$b={message:"must be equal to constant",params:({schemaCode:a})=>(0,codegen_1$d._)`{allowedValue: ${a}}`},def$i={keyword:"const",$data:!0,error:error$b,code(a){const{gen:_,data:$,$data:j,schemaCode:_e,schema:et}=a;j||et&&typeof et=="object"?a.fail$data((0,codegen_1$d._)`!${(0,util_1$f.useFunc)(_,equal_1$1.default)}(${$}, ${_e})`):a.fail((0,codegen_1$d._)`${et} !== ${$}`)}};_const.default=def$i;var _enum={};Object.defineProperty(_enum,"__esModule",{value:!0});const codegen_1$c=codegen,util_1$e=util$1,equal_1=equal$2,error$a={message:"must be equal to one of the allowed values",params:({schemaCode:a})=>(0,codegen_1$c._)`{allowedValues: ${a}}`},def$h={keyword:"enum",schemaType:"array",$data:!0,error:error$a,code(a){const{gen:_,data:$,$data:j,schema:_e,schemaCode:et,it:tt}=a;if(!j&&_e.length===0)throw new Error("enum must have non-empty array");const rt=_e.length>=tt.opts.loopEnum;let at;const ct=()=>at??(at=(0,util_1$e.useFunc)(_,equal_1.default));let dt;if(rt||j)dt=_.let("valid"),a.block$data(dt,yt);else{if(!Array.isArray(_e))throw new Error("ajv implementation error");const Et=_.const("vSchema",et);dt=(0,codegen_1$c.or)(..._e.map(($t,_t)=>bt(Et,_t)))}a.pass(dt);function yt(){_.assign(dt,!1),_.forOf("v",et,Et=>_.if((0,codegen_1$c._)`${ct()}(${$}, ${Et})`,()=>_.assign(dt,!0).break()))}function bt(Et,$t){const _t=_e[$t];return typeof _t=="object"&&_t!==null?(0,codegen_1$c._)`${ct()}(${$}, ${Et}[${$t}])`:(0,codegen_1$c._)`${$} === ${_t}`}}};_enum.default=def$h;Object.defineProperty(validation$4,"__esModule",{value:!0});const limitNumber_1=limitNumber,multipleOf_1=multipleOf,limitLength_1=limitLength,pattern_1=pattern,limitProperties_1=limitProperties,required_1=required,limitItems_1=limitItems,uniqueItems_1=uniqueItems,const_1=_const,enum_1=_enum,validation$3=[limitNumber_1.default,multipleOf_1.default,limitLength_1.default,pattern_1.default,limitProperties_1.default,required_1.default,limitItems_1.default,uniqueItems_1.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},const_1.default,enum_1.default];validation$4.default=validation$3;var applicator={},additionalItems={};Object.defineProperty(additionalItems,"__esModule",{value:!0});additionalItems.validateAdditionalItems=void 0;const codegen_1$b=codegen,util_1$d=util$1,error$9={message:({params:{len:a}})=>(0,codegen_1$b.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,codegen_1$b._)`{limit: ${a}}`},def$g={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:error$9,code(a){const{parentSchema:_,it:$}=a,{items:j}=_;if(!Array.isArray(j)){(0,util_1$d.checkStrictMode)($,'"additionalItems" is ignored when "items" is not an array of schemas');return}validateAdditionalItems(a,j)}};function validateAdditionalItems(a,_){const{gen:$,schema:j,data:_e,keyword:et,it:tt}=a;tt.items=!0;const rt=$.const("len",(0,codegen_1$b._)`${_e}.length`);if(j===!1)a.setParams({len:_.length}),a.pass((0,codegen_1$b._)`${rt} <= ${_.length}`);else if(typeof j=="object"&&!(0,util_1$d.alwaysValidSchema)(tt,j)){const ct=$.var("valid",(0,codegen_1$b._)`${rt} <= ${_.length}`);$.if((0,codegen_1$b.not)(ct),()=>at(ct)),a.ok(ct)}function at(ct){$.forRange("i",_.length,rt,dt=>{a.subschema({keyword:et,dataProp:dt,dataPropType:util_1$d.Type.Num},ct),tt.allErrors||$.if((0,codegen_1$b.not)(ct),()=>$.break())})}}additionalItems.validateAdditionalItems=validateAdditionalItems;additionalItems.default=def$g;var prefixItems={},items={};Object.defineProperty(items,"__esModule",{value:!0});items.validateTuple=void 0;const codegen_1$a=codegen,util_1$c=util$1,code_1$5=code$1,def$f={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(a){const{schema:_,it:$}=a;if(Array.isArray(_))return validateTuple(a,"additionalItems",_);$.items=!0,!(0,util_1$c.alwaysValidSchema)($,_)&&a.ok((0,code_1$5.validateArray)(a))}};function validateTuple(a,_,$=a.schema){const{gen:j,parentSchema:_e,data:et,keyword:tt,it:rt}=a;dt(_e),rt.opts.unevaluated&&$.length&&rt.items!==!0&&(rt.items=util_1$c.mergeEvaluated.items(j,$.length,rt.items));const at=j.name("valid"),ct=j.const("len",(0,codegen_1$a._)`${et}.length`);$.forEach((yt,bt)=>{(0,util_1$c.alwaysValidSchema)(rt,yt)||(j.if((0,codegen_1$a._)`${ct} > ${bt}`,()=>a.subschema({keyword:tt,schemaProp:bt,dataProp:bt},at)),a.ok(at))});function dt(yt){const{opts:bt,errSchemaPath:Et}=rt,$t=$.length,_t=$t===yt.minItems&&($t===yt.maxItems||yt[_]===!1);if(bt.strictTuples&&!_t){const xt=`"${tt}" is ${$t}-tuple, but minItems or maxItems/${_} are not specified or different at path "${Et}"`;(0,util_1$c.checkStrictMode)(rt,xt,bt.strictTuples)}}}items.validateTuple=validateTuple;items.default=def$f;Object.defineProperty(prefixItems,"__esModule",{value:!0});const items_1$1=items,def$e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:a=>(0,items_1$1.validateTuple)(a,"items")};prefixItems.default=def$e;var items2020={};Object.defineProperty(items2020,"__esModule",{value:!0});const codegen_1$9=codegen,util_1$b=util$1,code_1$4=code$1,additionalItems_1$1=additionalItems,error$8={message:({params:{len:a}})=>(0,codegen_1$9.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,codegen_1$9._)`{limit: ${a}}`},def$d={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:error$8,code(a){const{schema:_,parentSchema:$,it:j}=a,{prefixItems:_e}=$;j.items=!0,!(0,util_1$b.alwaysValidSchema)(j,_)&&(_e?(0,additionalItems_1$1.validateAdditionalItems)(a,_e):a.ok((0,code_1$4.validateArray)(a)))}};items2020.default=def$d;var contains$1={};Object.defineProperty(contains$1,"__esModule",{value:!0});const codegen_1$8=codegen,util_1$a=util$1,error$7={message:({params:{min:a,max:_}})=>_===void 0?(0,codegen_1$8.str)`must contain at least ${a} valid item(s)`:(0,codegen_1$8.str)`must contain at least ${a} and no more than ${_} valid item(s)`,params:({params:{min:a,max:_}})=>_===void 0?(0,codegen_1$8._)`{minContains: ${a}}`:(0,codegen_1$8._)`{minContains: ${a}, maxContains: ${_}}`},def$c={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:error$7,code(a){const{gen:_,schema:$,parentSchema:j,data:_e,it:et}=a;let tt,rt;const{minContains:at,maxContains:ct}=j;et.opts.next?(tt=at===void 0?1:at,rt=ct):tt=1;const dt=_.const("len",(0,codegen_1$8._)`${_e}.length`);if(a.setParams({min:tt,max:rt}),rt===void 0&&tt===0){(0,util_1$a.checkStrictMode)(et,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(rt!==void 0&&tt>rt){(0,util_1$a.checkStrictMode)(et,'"minContains" > "maxContains" is always invalid'),a.fail();return}if((0,util_1$a.alwaysValidSchema)(et,$)){let _t=(0,codegen_1$8._)`${dt} >= ${tt}`;rt!==void 0&&(_t=(0,codegen_1$8._)`${_t} && ${dt} <= ${rt}`),a.pass(_t);return}et.items=!0;const yt=_.name("valid");rt===void 0&&tt===1?Et(yt,()=>_.if(yt,()=>_.break())):tt===0?(_.let(yt,!0),rt!==void 0&&_.if((0,codegen_1$8._)`${_e}.length > 0`,bt)):(_.let(yt,!1),bt()),a.result(yt,()=>a.reset());function bt(){const _t=_.name("_valid"),xt=_.let("count",0);Et(_t,()=>_.if(_t,()=>$t(xt)))}function Et(_t,xt){_.forRange("i",0,dt,St=>{a.subschema({keyword:"contains",dataProp:St,dataPropType:util_1$a.Type.Num,compositeRule:!0},_t),xt()})}function $t(_t){_.code((0,codegen_1$8._)`${_t}++`),rt===void 0?_.if((0,codegen_1$8._)`${_t} >= ${tt}`,()=>_.assign(yt,!0).break()):(_.if((0,codegen_1$8._)`${_t} > ${rt}`,()=>_.assign(yt,!1).break()),tt===1?_.assign(yt,!0):_.if((0,codegen_1$8._)`${_t} >= ${tt}`,()=>_.assign(yt,!0)))}}};contains$1.default=def$c;var dependencies$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.validateSchemaDeps=a.validatePropertyDeps=a.error=void 0;const _=codegen,$=util$1,j=code$1;a.error={message:({params:{property:at,depsCount:ct,deps:dt}})=>{const yt=ct===1?"property":"properties";return(0,_.str)`must have ${yt} ${dt} when property ${at} is present`},params:({params:{property:at,depsCount:ct,deps:dt,missingProperty:yt}})=>(0,_._)`{property: ${at},
108
108
  missingProperty: ${yt},
109
109
  depsCount: ${ct},
110
- deps: ${dt}}`};const _e={keyword:"dependencies",type:"object",schemaType:"object",error:a.error,code(at){const[ct,dt]=et(at);tt(at,ct),rt(at,dt)}};function et({schema:at}){const ct={},dt={};for(const yt in at){if(yt==="__proto__")continue;const bt=Array.isArray(at[yt])?ct:dt;bt[yt]=at[yt]}return[ct,dt]}function tt(at,ct=at.schema){const{gen:dt,data:yt,it:bt}=at;if(Object.keys(ct).length===0)return;const Et=dt.let("missing");for(const $t in ct){const _t=ct[$t];if(_t.length===0)continue;const xt=(0,j.propertyInData)(dt,yt,$t,bt.opts.ownProperties);at.setParams({property:$t,depsCount:_t.length,deps:_t.join(", ")}),bt.allErrors?dt.if(xt,()=>{for(const St of _t)(0,j.checkReportMissingProp)(at,St)}):(dt.if((0,_._)`${xt} && (${(0,j.checkMissingProp)(at,_t,Et)})`),(0,j.reportMissingProp)(at,Et),dt.else())}}a.validatePropertyDeps=tt;function rt(at,ct=at.schema){const{gen:dt,data:yt,keyword:bt,it:Et}=at,$t=dt.name("valid");for(const _t in ct)(0,$.alwaysValidSchema)(Et,ct[_t])||(dt.if((0,j.propertyInData)(dt,yt,_t,Et.opts.ownProperties),()=>{const xt=at.subschema({keyword:bt,schemaProp:_t},$t);at.mergeValidEvaluated(xt,$t)},()=>dt.var($t,!0)),at.ok($t))}a.validateSchemaDeps=rt,a.default=_e})(dependencies$2);var propertyNames={};Object.defineProperty(propertyNames,"__esModule",{value:!0});const codegen_1$7=codegen,util_1$9=util$1,error$6={message:"property name must be valid",params:({params:a})=>(0,codegen_1$7._)`{propertyName: ${a.propertyName}}`},def$b={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:error$6,code(a){const{gen:_,schema:$,data:j,it:_e}=a;if((0,util_1$9.alwaysValidSchema)(_e,$))return;const et=_.name("valid");_.forIn("key",j,tt=>{a.setParams({propertyName:tt}),a.subschema({keyword:"propertyNames",data:tt,dataTypes:["string"],propertyName:tt,compositeRule:!0},et),_.if((0,codegen_1$7.not)(et),()=>{a.error(!0),_e.allErrors||_.break()})}),a.ok(et)}};propertyNames.default=def$b;var additionalProperties={};Object.defineProperty(additionalProperties,"__esModule",{value:!0});const code_1$3=code$1,codegen_1$6=codegen,names_1=names$1,util_1$8=util$1,error$5={message:"must NOT have additional properties",params:({params:a})=>(0,codegen_1$6._)`{additionalProperty: ${a.additionalProperty}}`},def$a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:error$5,code(a){const{gen:_,schema:$,parentSchema:j,data:_e,errsCount:et,it:tt}=a;if(!et)throw new Error("ajv implementation error");const{allErrors:rt,opts:at}=tt;if(tt.props=!0,at.removeAdditional!=="all"&&(0,util_1$8.alwaysValidSchema)(tt,$))return;const ct=(0,code_1$3.allSchemaProperties)(j.properties),dt=(0,code_1$3.allSchemaProperties)(j.patternProperties);yt(),a.ok((0,codegen_1$6._)`${et} === ${names_1.default.errors}`);function yt(){_.forIn("key",_e,xt=>{!ct.length&&!dt.length?$t(xt):_.if(bt(xt),()=>$t(xt))})}function bt(xt){let St;if(ct.length>8){const Mt=(0,util_1$8.schemaRefOrVal)(tt,j.properties,"properties");St=(0,code_1$3.isOwnProperty)(_,Mt,xt)}else ct.length?St=(0,codegen_1$6.or)(...ct.map(Mt=>(0,codegen_1$6._)`${xt} === ${Mt}`)):St=codegen_1$6.nil;return dt.length&&(St=(0,codegen_1$6.or)(St,...dt.map(Mt=>(0,codegen_1$6._)`${(0,code_1$3.usePattern)(a,Mt)}.test(${xt})`))),(0,codegen_1$6.not)(St)}function Et(xt){_.code((0,codegen_1$6._)`delete ${_e}[${xt}]`)}function $t(xt){if(at.removeAdditional==="all"||at.removeAdditional&&$===!1){Et(xt);return}if($===!1){a.setParams({additionalProperty:xt}),a.error(),rt||_.break();return}if(typeof $=="object"&&!(0,util_1$8.alwaysValidSchema)(tt,$)){const St=_.name("valid");at.removeAdditional==="failing"?(_t(xt,St,!1),_.if((0,codegen_1$6.not)(St),()=>{a.reset(),Et(xt)})):(_t(xt,St),rt||_.if((0,codegen_1$6.not)(St),()=>_.break()))}}function _t(xt,St,Mt){const Tt={keyword:"additionalProperties",dataProp:xt,dataPropType:util_1$8.Type.Str};Mt===!1&&Object.assign(Tt,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(Tt,St)}}};additionalProperties.default=def$a;var properties$1={};Object.defineProperty(properties$1,"__esModule",{value:!0});const validate_1=validate,code_1$2=code$1,util_1$7=util$1,additionalProperties_1$1=additionalProperties,def$9={keyword:"properties",type:"object",schemaType:"object",code(a){const{gen:_,schema:$,parentSchema:j,data:_e,it:et}=a;et.opts.removeAdditional==="all"&&j.additionalProperties===void 0&&additionalProperties_1$1.default.code(new validate_1.KeywordCxt(et,additionalProperties_1$1.default,"additionalProperties"));const tt=(0,code_1$2.allSchemaProperties)($);for(const yt of tt)et.definedProperties.add(yt);et.opts.unevaluated&&tt.length&&et.props!==!0&&(et.props=util_1$7.mergeEvaluated.props(_,(0,util_1$7.toHash)(tt),et.props));const rt=tt.filter(yt=>!(0,util_1$7.alwaysValidSchema)(et,$[yt]));if(rt.length===0)return;const at=_.name("valid");for(const yt of rt)ct(yt)?dt(yt):(_.if((0,code_1$2.propertyInData)(_,_e,yt,et.opts.ownProperties)),dt(yt),et.allErrors||_.else().var(at,!0),_.endIf()),a.it.definedProperties.add(yt),a.ok(at);function ct(yt){return et.opts.useDefaults&&!et.compositeRule&&$[yt].default!==void 0}function dt(yt){a.subschema({keyword:"properties",schemaProp:yt,dataProp:yt},at)}}};properties$1.default=def$9;var patternProperties={};Object.defineProperty(patternProperties,"__esModule",{value:!0});const code_1$1=code$1,codegen_1$5=codegen,util_1$6=util$1,util_2=util$1,def$8={keyword:"patternProperties",type:"object",schemaType:"object",code(a){const{gen:_,schema:$,data:j,parentSchema:_e,it:et}=a,{opts:tt}=et,rt=(0,code_1$1.allSchemaProperties)($),at=rt.filter(_t=>(0,util_1$6.alwaysValidSchema)(et,$[_t]));if(rt.length===0||at.length===rt.length&&(!et.opts.unevaluated||et.props===!0))return;const ct=tt.strictSchema&&!tt.allowMatchingProperties&&_e.properties,dt=_.name("valid");et.props!==!0&&!(et.props instanceof codegen_1$5.Name)&&(et.props=(0,util_2.evaluatedPropsToName)(_,et.props));const{props:yt}=et;bt();function bt(){for(const _t of rt)ct&&Et(_t),et.allErrors?$t(_t):(_.var(dt,!0),$t(_t),_.if(dt))}function Et(_t){for(const xt in ct)new RegExp(_t).test(xt)&&(0,util_1$6.checkStrictMode)(et,`property ${xt} matches pattern ${_t} (use allowMatchingProperties)`)}function $t(_t){_.forIn("key",j,xt=>{_.if((0,codegen_1$5._)`${(0,code_1$1.usePattern)(a,_t)}.test(${xt})`,()=>{const St=at.includes(_t);St||a.subschema({keyword:"patternProperties",schemaProp:_t,dataProp:xt,dataPropType:util_2.Type.Str},dt),et.opts.unevaluated&&yt!==!0?_.assign((0,codegen_1$5._)`${yt}[${xt}]`,!0):!St&&!et.allErrors&&_.if((0,codegen_1$5.not)(dt),()=>_.break())})})}}};patternProperties.default=def$8;var not={};Object.defineProperty(not,"__esModule",{value:!0});const util_1$5=util$1,def$7={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(a){const{gen:_,schema:$,it:j}=a;if((0,util_1$5.alwaysValidSchema)(j,$)){a.fail();return}const _e=_.name("valid");a.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},_e),a.failResult(_e,()=>a.reset(),()=>a.error())},error:{message:"must NOT be valid"}};not.default=def$7;var anyOf={};Object.defineProperty(anyOf,"__esModule",{value:!0});const code_1=code$1,def$6={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:code_1.validateUnion,error:{message:"must match a schema in anyOf"}};anyOf.default=def$6;var oneOf$1={};Object.defineProperty(oneOf$1,"__esModule",{value:!0});const codegen_1$4=codegen,util_1$4=util$1,error$4={message:"must match exactly one schema in oneOf",params:({params:a})=>(0,codegen_1$4._)`{passingSchemas: ${a.passing}}`},def$5={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:error$4,code(a){const{gen:_,schema:$,parentSchema:j,it:_e}=a;if(!Array.isArray($))throw new Error("ajv implementation error");if(_e.opts.discriminator&&j.discriminator)return;const et=$,tt=_.let("valid",!1),rt=_.let("passing",null),at=_.name("_valid");a.setParams({passing:rt}),_.block(ct),a.result(tt,()=>a.reset(),()=>a.error(!0));function ct(){et.forEach((dt,yt)=>{let bt;(0,util_1$4.alwaysValidSchema)(_e,dt)?_.var(at,!0):bt=a.subschema({keyword:"oneOf",schemaProp:yt,compositeRule:!0},at),yt>0&&_.if((0,codegen_1$4._)`${at} && ${tt}`).assign(tt,!1).assign(rt,(0,codegen_1$4._)`[${rt}, ${yt}]`).else(),_.if(at,()=>{_.assign(tt,!0),_.assign(rt,yt),bt&&a.mergeEvaluated(bt,codegen_1$4.Name)})})}}};oneOf$1.default=def$5;var allOf={};Object.defineProperty(allOf,"__esModule",{value:!0});const util_1$3=util$1,def$4={keyword:"allOf",schemaType:"array",code(a){const{gen:_,schema:$,it:j}=a;if(!Array.isArray($))throw new Error("ajv implementation error");const _e=_.name("valid");$.forEach((et,tt)=>{if((0,util_1$3.alwaysValidSchema)(j,et))return;const rt=a.subschema({keyword:"allOf",schemaProp:tt},_e);a.ok(_e),a.mergeEvaluated(rt)})}};allOf.default=def$4;var _if={};Object.defineProperty(_if,"__esModule",{value:!0});const codegen_1$3=codegen,util_1$2=util$1,error$3={message:({params:a})=>(0,codegen_1$3.str)`must match "${a.ifClause}" schema`,params:({params:a})=>(0,codegen_1$3._)`{failingKeyword: ${a.ifClause}}`},def$3={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:error$3,code(a){const{gen:_,parentSchema:$,it:j}=a;$.then===void 0&&$.else===void 0&&(0,util_1$2.checkStrictMode)(j,'"if" without "then" and "else" is ignored');const _e=hasSchema(j,"then"),et=hasSchema(j,"else");if(!_e&&!et)return;const tt=_.let("valid",!0),rt=_.name("_valid");if(at(),a.reset(),_e&&et){const dt=_.let("ifClause");a.setParams({ifClause:dt}),_.if(rt,ct("then",dt),ct("else",dt))}else _e?_.if(rt,ct("then")):_.if((0,codegen_1$3.not)(rt),ct("else"));a.pass(tt,()=>a.error(!0));function at(){const dt=a.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},rt);a.mergeEvaluated(dt)}function ct(dt,yt){return()=>{const bt=a.subschema({keyword:dt},rt);_.assign(tt,rt),a.mergeValidEvaluated(bt,tt),yt?_.assign(yt,(0,codegen_1$3._)`${dt}`):a.setParams({ifClause:dt})}}}};function hasSchema(a,_){const $=a.schema[_];return $!==void 0&&!(0,util_1$2.alwaysValidSchema)(a,$)}_if.default=def$3;var thenElse={};Object.defineProperty(thenElse,"__esModule",{value:!0});const util_1$1=util$1,def$2={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:a,parentSchema:_,it:$}){_.if===void 0&&(0,util_1$1.checkStrictMode)($,`"${a}" without "if" is ignored`)}};thenElse.default=def$2;Object.defineProperty(applicator,"__esModule",{value:!0});const additionalItems_1=additionalItems,prefixItems_1=prefixItems,items_1=items,items2020_1=items2020,contains_1=contains$1,dependencies_1=dependencies$2,propertyNames_1=propertyNames,additionalProperties_1=additionalProperties,properties_1=properties$1,patternProperties_1=patternProperties,not_1=not,anyOf_1=anyOf,oneOf_1=oneOf$1,allOf_1=allOf,if_1=_if,thenElse_1=thenElse;function getApplicator(a=!1){const _=[not_1.default,anyOf_1.default,oneOf_1.default,allOf_1.default,if_1.default,thenElse_1.default,propertyNames_1.default,additionalProperties_1.default,dependencies_1.default,properties_1.default,patternProperties_1.default];return a?_.push(prefixItems_1.default,items2020_1.default):_.push(additionalItems_1.default,items_1.default),_.push(contains_1.default),_}applicator.default=getApplicator;var format$3={},format$2={};Object.defineProperty(format$2,"__esModule",{value:!0});const codegen_1$2=codegen,error$2={message:({schemaCode:a})=>(0,codegen_1$2.str)`must match format "${a}"`,params:({schemaCode:a})=>(0,codegen_1$2._)`{format: ${a}}`},def$1={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:error$2,code(a,_){const{gen:$,data:j,$data:_e,schema:et,schemaCode:tt,it:rt}=a,{opts:at,errSchemaPath:ct,schemaEnv:dt,self:yt}=rt;if(!at.validateFormats)return;_e?bt():Et();function bt(){const $t=$.scopeValue("formats",{ref:yt.formats,code:at.code.formats}),_t=$.const("fDef",(0,codegen_1$2._)`${$t}[${tt}]`),xt=$.let("fType"),St=$.let("format");$.if((0,codegen_1$2._)`typeof ${_t} == "object" && !(${_t} instanceof RegExp)`,()=>$.assign(xt,(0,codegen_1$2._)`${_t}.type || "string"`).assign(St,(0,codegen_1$2._)`${_t}.validate`),()=>$.assign(xt,(0,codegen_1$2._)`"string"`).assign(St,_t)),a.fail$data((0,codegen_1$2.or)(Mt(),Tt()));function Mt(){return at.strictSchema===!1?codegen_1$2.nil:(0,codegen_1$2._)`${tt} && !${St}`}function Tt(){const Rt=dt.$async?(0,codegen_1$2._)`(${_t}.async ? await ${St}(${j}) : ${St}(${j}))`:(0,codegen_1$2._)`${St}(${j})`,Ct=(0,codegen_1$2._)`(typeof ${St} == "function" ? ${Rt} : ${St}.test(${j}))`;return(0,codegen_1$2._)`${St} && ${St} !== true && ${xt} === ${_} && !${Ct}`}}function Et(){const $t=yt.formats[et];if(!$t){Mt();return}if($t===!0)return;const[_t,xt,St]=Tt($t);_t===_&&a.pass(Rt());function Mt(){if(at.strictSchema===!1){yt.logger.warn(Ct());return}throw new Error(Ct());function Ct(){return`unknown format "${et}" ignored in schema at path "${ct}"`}}function Tt(Ct){const It=Ct instanceof RegExp?(0,codegen_1$2.regexpCode)(Ct):at.code.formats?(0,codegen_1$2._)`${at.code.formats}${(0,codegen_1$2.getProperty)(et)}`:void 0,kt=$.scopeValue("formats",{key:et,ref:Ct,code:It});return typeof Ct=="object"&&!(Ct instanceof RegExp)?[Ct.type||"string",Ct.validate,(0,codegen_1$2._)`${kt}.validate`]:["string",Ct,kt]}function Rt(){if(typeof $t=="object"&&!($t instanceof RegExp)&&$t.async){if(!dt.$async)throw new Error("async format in sync schema");return(0,codegen_1$2._)`await ${St}(${j})`}return typeof xt=="function"?(0,codegen_1$2._)`${St}(${j})`:(0,codegen_1$2._)`${St}.test(${j})`}}}};format$2.default=def$1;Object.defineProperty(format$3,"__esModule",{value:!0});const format_1$1=format$2,format$1=[format_1$1.default];format$3.default=format$1;var metadata={};Object.defineProperty(metadata,"__esModule",{value:!0});metadata.contentVocabulary=metadata.metadataVocabulary=void 0;metadata.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];metadata.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(draft7,"__esModule",{value:!0});const core_1=core$1,validation_1=validation$4,applicator_1=applicator,format_1=format$3,metadata_1=metadata,draft7Vocabularies=[core_1.default,validation_1.default,(0,applicator_1.default)(),format_1.default,metadata_1.metadataVocabulary,metadata_1.contentVocabulary];draft7.default=draft7Vocabularies;var discriminator={},types$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.DiscrError=void 0,function(_){_.Tag="tag",_.Mapping="mapping"}(a.DiscrError||(a.DiscrError={}))})(types$2);Object.defineProperty(discriminator,"__esModule",{value:!0});const codegen_1$1=codegen,types_1=types$2,compile_1=compile,util_1=util$1,error$1={message:({params:{discrError:a,tagName:_}})=>a===types_1.DiscrError.Tag?`tag "${_}" must be string`:`value of tag "${_}" must be in oneOf`,params:({params:{discrError:a,tag:_,tagName:$}})=>(0,codegen_1$1._)`{error: ${a}, tag: ${$}, tagValue: ${_}}`},def={keyword:"discriminator",type:"object",schemaType:"object",error:error$1,code(a){const{gen:_,data:$,schema:j,parentSchema:_e,it:et}=a,{oneOf:tt}=_e;if(!et.opts.discriminator)throw new Error("discriminator: requires discriminator option");const rt=j.propertyName;if(typeof rt!="string")throw new Error("discriminator: requires propertyName");if(j.mapping)throw new Error("discriminator: mapping is not supported");if(!tt)throw new Error("discriminator: requires oneOf keyword");const at=_.let("valid",!1),ct=_.const("tag",(0,codegen_1$1._)`${$}${(0,codegen_1$1.getProperty)(rt)}`);_.if((0,codegen_1$1._)`typeof ${ct} == "string"`,()=>dt(),()=>a.error(!1,{discrError:types_1.DiscrError.Tag,tag:ct,tagName:rt})),a.ok(at);function dt(){const Et=bt();_.if(!1);for(const $t in Et)_.elseIf((0,codegen_1$1._)`${ct} === ${$t}`),_.assign(at,yt(Et[$t]));_.else(),a.error(!1,{discrError:types_1.DiscrError.Mapping,tag:ct,tagName:rt}),_.endIf()}function yt(Et){const $t=_.name("valid"),_t=a.subschema({keyword:"oneOf",schemaProp:Et},$t);return a.mergeEvaluated(_t,codegen_1$1.Name),$t}function bt(){var Et;const $t={},_t=St(_e);let xt=!0;for(let Rt=0;Rt<tt.length;Rt++){let Ct=tt[Rt];Ct!=null&&Ct.$ref&&!(0,util_1.schemaHasRulesButRef)(Ct,et.self.RULES)&&(Ct=compile_1.resolveRef.call(et.self,et.schemaEnv.root,et.baseId,Ct==null?void 0:Ct.$ref),Ct instanceof compile_1.SchemaEnv&&(Ct=Ct.schema));const It=(Et=Ct==null?void 0:Ct.properties)===null||Et===void 0?void 0:Et[rt];if(typeof It!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${rt}"`);xt=xt&&(_t||St(Ct)),Mt(It,Rt)}if(!xt)throw new Error(`discriminator: "${rt}" must be required`);return $t;function St({required:Rt}){return Array.isArray(Rt)&&Rt.includes(rt)}function Mt(Rt,Ct){if(Rt.const)Tt(Rt.const,Ct);else if(Rt.enum)for(const It of Rt.enum)Tt(It,Ct);else throw new Error(`discriminator: "properties/${rt}" must have "const" or "enum"`)}function Tt(Rt,Ct){if(typeof Rt!="string"||Rt in $t)throw new Error(`discriminator: "${rt}" values must be unique strings`);$t[Rt]=Ct}}}};discriminator.default=def;const $schema="http://json-schema.org/draft-07/schema#",$id="http://json-schema.org/draft-07/schema#",title$5="Core schema meta-schema",definitions={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:[]}},type$3=["object","boolean"],properties={$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:"#"}},require$$3$1={$schema,$id,title:title$5,definitions,type:type$3,properties,default:!0};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0}),_.MissingRefError=_.ValidationError=_.CodeGen=_.Name=_.nil=_.stringify=_.str=_._=_.KeywordCxt=void 0;const $=core$2,j=draft7,_e=discriminator,et=require$$3$1,tt=["/properties"],rt="http://json-schema.org/draft-07/schema";class at extends $.default{_addVocabularies(){super._addVocabularies(),j.default.forEach($t=>this.addVocabulary($t)),this.opts.discriminator&&this.addKeyword(_e.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const $t=this.opts.$data?this.$dataMetaSchema(et,tt):et;this.addMetaSchema($t,rt,!1),this.refs["http://json-schema.org/schema"]=rt}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(rt)?rt:void 0)}}a.exports=_=at,Object.defineProperty(_,"__esModule",{value:!0}),_.default=at;var ct=validate;Object.defineProperty(_,"KeywordCxt",{enumerable:!0,get:function(){return ct.KeywordCxt}});var dt=codegen;Object.defineProperty(_,"_",{enumerable:!0,get:function(){return dt._}}),Object.defineProperty(_,"str",{enumerable:!0,get:function(){return dt.str}}),Object.defineProperty(_,"stringify",{enumerable:!0,get:function(){return dt.stringify}}),Object.defineProperty(_,"nil",{enumerable:!0,get:function(){return dt.nil}}),Object.defineProperty(_,"Name",{enumerable:!0,get:function(){return dt.Name}}),Object.defineProperty(_,"CodeGen",{enumerable:!0,get:function(){return dt.CodeGen}});var yt=validation_error;Object.defineProperty(_,"ValidationError",{enumerable:!0,get:function(){return yt.default}});var bt=ref_error;Object.defineProperty(_,"MissingRefError",{enumerable:!0,get:function(){return bt.default}})})(ajv,ajv.exports);var ajvExports=ajv.exports,dist$a={exports:{}},keywords$2={exports:{}},_typeof$A={exports:{}},_typeof$z={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $=codegen,j=["undefined","string","number","object","function","boolean","symbol"];function _e(){return{keyword:"typeof",schemaType:["string","array"],code(et){const{data:tt,schema:rt,schemaValue:at}=et;et.fail(typeof rt=="string"?(0,$._)`typeof ${tt} != ${rt}`:(0,$._)`${at}.indexOf(typeof ${tt}) < 0`)},metaSchema:{anyOf:[{type:"string",enum:j},{type:"array",items:{type:"string",enum:j}}]}}}_.default=_e,a.exports=_e})(_typeof$z,_typeof$z.exports);var _typeofExports$1=_typeof$z.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(_typeofExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(_typeof$A,_typeof$A.exports);var _typeofExports=_typeof$A.exports,_instanceof$1={exports:{}},_instanceof={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $={Object,Array,Function,Number,String,Date,RegExp};typeof Buffer$G<"u"&&($.Buffer=Buffer$G),typeof Promise<"u"&&($.Promise=Promise);const j=Object.assign(_e,{CONSTRUCTORS:$});function _e(){return{keyword:"instanceof",schemaType:["string","array"],compile(tt){if(typeof tt=="string"){const rt=et(tt);return at=>at instanceof rt}if(Array.isArray(tt)){const rt=tt.map(et);return at=>{for(const ct of rt)if(at instanceof ct)return!0;return!1}}throw new Error("ajv implementation error")},metaSchema:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}}}function et(tt){const rt=$[tt];if(rt)return rt;throw new Error(`invalid "instanceof" keyword value ${tt}`)}_.default=j,a.exports=j})(_instanceof,_instanceof.exports);var _instanceofExports$1=_instanceof.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(_instanceofExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(_instanceof$1,_instanceof$1.exports);var _instanceofExports=_instanceof$1.exports,range$1={exports:{}},range={exports:{}},_range={};Object.defineProperty(_range,"__esModule",{value:!0});function getRangeDef(a){return()=>({keyword:a,type:"number",schemaType:"array",macro:function([$,j]){return _($,j),a==="range"?{minimum:$,maximum:j}:{exclusiveMinimum:$,exclusiveMaximum:j}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}});function _($,j){if($>j||a==="exclusiveRange"&&$===j)throw new Error("There are no numbers in range")}}_range.default=getRangeDef;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const _e=(0,$(_range).default)("range");_.default=_e,a.exports=_e})(range,range.exports);var rangeExports$1=range.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(rangeExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(range$1,range$1.exports);var rangeExports=range$1.exports,exclusiveRange$1={exports:{}},exclusiveRange={exports:{}};(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const _e=(0,$(_range).default)("exclusiveRange");_.default=_e,a.exports=_e})(exclusiveRange,exclusiveRange.exports);var exclusiveRangeExports$1=exclusiveRange.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(exclusiveRangeExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(exclusiveRange$1,exclusiveRange$1.exports);var exclusiveRangeExports=exclusiveRange$1.exports,regexp$1={exports:{}},regexp={exports:{}},_util={};Object.defineProperty(_util,"__esModule",{value:!0});_util.usePattern=_util.metaSchemaRef=void 0;const codegen_1=codegen,META_SCHEMA_ID="http://json-schema.org/schema";function metaSchemaRef({defaultMeta:a}={}){return a===!1?{}:{$ref:a||META_SCHEMA_ID}}_util.metaSchemaRef=metaSchemaRef;function usePattern({gen:a,it:{opts:_}},$,j=_.unicodeRegExp?"u":""){const _e=new RegExp($,j);return a.scopeValue("pattern",{key:_e.toString(),ref:_e,code:(0,codegen_1._)`new RegExp(${$}, ${j})`})}_util.usePattern=usePattern;(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $=codegen,j=_util,_e={type:"object",properties:{pattern:{type:"string"},flags:{type:"string",nullable:!0}},required:["pattern"],additionalProperties:!1},et=/^\/(.*)\/([gimuy]*)$/;function tt(){return{keyword:"regexp",type:"string",schemaType:["string","object"],code(rt){const{data:at,schema:ct}=rt,dt=yt(ct);rt.pass((0,$._)`${dt}.test(${at})`);function yt(bt){if(typeof bt=="object")return(0,j.usePattern)(rt,bt.pattern,bt.flags);const Et=et.exec(bt);if(Et)return(0,j.usePattern)(rt,Et[1],Et[2]);throw new Error("cannot parse string into RegExp")}},metaSchema:{anyOf:[{type:"string"},_e]}}}_.default=tt,a.exports=tt})(regexp,regexp.exports);var regexpExports$1=regexp.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(regexpExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(regexp$1,regexp$1.exports);var regexpExports=regexp$1.exports,transform$1={exports:{}},transform={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $=codegen,j={trimStart:at=>at.trimStart(),trimEnd:at=>at.trimEnd(),trimLeft:at=>at.trimStart(),trimRight:at=>at.trimEnd(),trim:at=>at.trim(),toLowerCase:at=>at.toLowerCase(),toUpperCase:at=>at.toUpperCase(),toEnumCase:(at,ct)=>(ct==null?void 0:ct.hash[rt(at)])||at},_e=Object.assign(et,{transform:j});function et(){return{keyword:"transform",schemaType:"array",before:"enum",code(at){const{gen:ct,data:dt,schema:yt,parentSchema:bt,it:Et}=at,{parentData:$t,parentDataProperty:_t}=Et,xt=yt;if(!xt.length)return;let St;if(xt.includes("toEnumCase")){const Tt=tt(bt);St=ct.scopeValue("obj",{ref:Tt,code:(0,$.stringify)(Tt)})}ct.if((0,$._)`typeof ${dt} == "string" && ${$t} !== undefined`,()=>{ct.assign(dt,Mt(xt.slice())),ct.assign((0,$._)`${$t}[${_t}]`,dt)});function Mt(Tt){if(!Tt.length)return dt;const Rt=Tt.pop();if(!(Rt in j))throw new Error(`transform: unknown transformation ${Rt}`);const Ct=ct.scopeValue("func",{ref:j[Rt],code:(0,$._)`require("ajv-keywords/dist/definitions/transform").transform${(0,$.getProperty)(Rt)}`}),It=Mt(Tt);return St&&Rt==="toEnumCase"?(0,$._)`${Ct}(${It}, ${St})`:(0,$._)`${Ct}(${It})`}},metaSchema:{type:"array",items:{type:"string",enum:Object.keys(j)}}}}function tt(at){const ct={hash:{}};if(!at.enum)throw new Error('transform: "toEnumCase" requires "enum"');for(const dt of at.enum){if(typeof dt!="string")continue;const yt=rt(dt);if(ct.hash[yt])throw new Error('transform: "toEnumCase" requires all lowercased "enum" values to be unique');ct.hash[yt]=dt}return ct}function rt(at){return at.toLowerCase()}_.default=_e,a.exports=_e})(transform,transform.exports);var transformExports$1=transform.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(transformExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(transform$1,transform$1.exports);var transformExports=transform$1.exports,uniqueItemProperties$1={exports:{}},uniqueItemProperties={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $=fastDeepEqual,j=["number","integer","string","boolean","null"];function _e(){return{keyword:"uniqueItemProperties",type:"array",schemaType:"array",compile(tt,rt){const at=et(tt,rt);return ct=>{if(ct.length<=1)return!0;for(let dt=0;dt<tt.length;dt++){const yt=tt[dt];if(at[dt]){const bt={};for(const Et of ct){if(!Et||typeof Et!="object")continue;let $t=Et[yt];if(!($t&&typeof $t=="object")){if(typeof $t=="string"&&($t='"'+$t),bt[$t])return!1;bt[$t]=!0}}}else for(let bt=ct.length;bt--;){const Et=ct[bt];if(!(!Et||typeof Et!="object"))for(let $t=bt;$t--;){const _t=ct[$t];if(_t&&typeof _t=="object"&&$(Et[yt],_t[yt]))return!1}}}return!0}},metaSchema:{type:"array",items:{type:"string"}}}}_.default=_e;function et(tt,rt){return tt.map(at=>{var ct,dt,yt;const bt=(yt=(dt=(ct=rt.items)===null||ct===void 0?void 0:ct.properties)===null||dt===void 0?void 0:dt[at])===null||yt===void 0?void 0:yt.type;return Array.isArray(bt)?!bt.includes("object")&&!bt.includes("array"):j.includes(bt)})}a.exports=_e})(uniqueItemProperties,uniqueItemProperties.exports);var uniqueItemPropertiesExports$1=uniqueItemProperties.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(uniqueItemPropertiesExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(uniqueItemProperties$1,uniqueItemProperties$1.exports);var uniqueItemPropertiesExports=uniqueItemProperties$1.exports,allRequired$1={exports:{}},allRequired={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});function $(){return{keyword:"allRequired",type:"object",schemaType:"boolean",macro(j,_e){if(!j)return!0;const et=Object.keys(_e.properties);return et.length===0?!0:{required:et}},dependencies:["properties"]}}_.default=$,a.exports=$})(allRequired,allRequired.exports);var allRequiredExports$1=allRequired.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(allRequiredExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(allRequired$1,allRequired$1.exports);var allRequiredExports=allRequired$1.exports,anyRequired$1={exports:{}},anyRequired={exports:{}},_required={};Object.defineProperty(_required,"__esModule",{value:!0});function getRequiredDef(a){return()=>({keyword:a,type:"object",schemaType:"array",macro(_){return _.length===0?!0:_.length===1?{required:_}:{[a==="anyRequired"?"anyOf":"oneOf"]:_.map(j=>({required:[j]}))}},metaSchema:{type:"array",items:{type:"string"}}})}_required.default=getRequiredDef;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const _e=(0,$(_required).default)("anyRequired");_.default=_e,a.exports=_e})(anyRequired,anyRequired.exports);var anyRequiredExports$1=anyRequired.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(anyRequiredExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(anyRequired$1,anyRequired$1.exports);var anyRequiredExports=anyRequired$1.exports,oneRequired$1={exports:{}},oneRequired={exports:{}};(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const _e=(0,$(_required).default)("oneRequired");_.default=_e,a.exports=_e})(oneRequired,oneRequired.exports);var oneRequiredExports$1=oneRequired.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(oneRequiredExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(oneRequired$1,oneRequired$1.exports);var oneRequiredExports=oneRequired$1.exports,patternRequired$1={exports:{}},patternRequired={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $=codegen,j=_util,_e={message:({params:{missingPattern:tt}})=>(0,$.str)`should have property matching pattern '${tt}'`,params:({params:{missingPattern:tt}})=>(0,$._)`{missingPattern: ${tt}}`};function et(){return{keyword:"patternRequired",type:"object",schemaType:"array",error:_e,code(tt){const{gen:rt,schema:at,data:ct}=tt;if(at.length===0)return;const dt=rt.let("valid",!0);for(const bt of at)yt(bt);function yt(bt){const Et=rt.let("matched",!1);rt.forIn("key",ct,$t=>{rt.assign(Et,(0,$._)`${(0,j.usePattern)(tt,bt)}.test(${$t})`),rt.if(Et,()=>rt.break())}),tt.setParams({missingPattern:bt}),rt.assign(dt,(0,$.and)(dt,Et)),tt.pass(dt)}},metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:!0}}}_.default=et,a.exports=et})(patternRequired,patternRequired.exports);var patternRequiredExports$1=patternRequired.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(patternRequiredExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(patternRequired$1,patternRequired$1.exports);var patternRequiredExports=patternRequired$1.exports,prohibited$1={exports:{}},prohibited={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});function $(){return{keyword:"prohibited",type:"object",schemaType:"array",macro:function(j){return j.length===0?!0:j.length===1?{not:{required:j}}:{not:{anyOf:j.map(_e=>({required:[_e]}))}}},metaSchema:{type:"array",items:{type:"string"}}}}_.default=$,a.exports=$})(prohibited,prohibited.exports);var prohibitedExports$1=prohibited.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(prohibitedExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(prohibited$1,prohibited$1.exports);var prohibitedExports=prohibited$1.exports,deepProperties$1={exports:{}},deepProperties={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $=_util;function j(tt){return{keyword:"deepProperties",type:"object",schemaType:"object",macro:function(rt){const at=[];for(const ct in rt)at.push(_e(ct,rt[ct]));return{allOf:at}},metaSchema:{type:"object",propertyNames:{type:"string",format:"json-pointer"},additionalProperties:(0,$.metaSchemaRef)(tt)}}}_.default=j;function _e(tt,rt){const at=tt.split("/"),ct={};let dt=ct;for(let yt=1;yt<at.length;yt++){let bt=at[yt];const Et=yt===at.length-1;bt=et(bt);const $t=dt.properties={};let _t;if(/[0-9]+/.test(bt)){let xt=+bt;for(_t=dt.items=[],dt.type=["object","array"];xt--;)_t.push({})}else dt.type="object";dt=Et?rt:{},$t[bt]=dt,_t&&_t.push(dt)}return ct}function et(tt){return tt.replace(/~1/g,"/").replace(/~0/g,"~")}a.exports=j})(deepProperties,deepProperties.exports);var deepPropertiesExports$1=deepProperties.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(deepPropertiesExports$1),_e=(et,tt)=>et.addKeyword((0,j.default)(tt));_.default=_e,a.exports=_e})(deepProperties$1,deepProperties$1.exports);var deepPropertiesExports=deepProperties$1.exports,deepRequired$1={exports:{}},deepRequired={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $=codegen;function j(){return{keyword:"deepRequired",type:"object",schemaType:"array",code(et){const{schema:tt,data:rt}=et,at=tt.map(dt=>(0,$._)`(${ct(dt)}) === undefined`);et.fail((0,$.or)(...at));function ct(dt){if(dt==="")throw new Error("empty JSON pointer not allowed");const yt=dt.split("/");let bt=rt;const Et=yt.map(($t,_t)=>_t?bt=(0,$._)`${bt}${(0,$.getProperty)(_e($t))}`:bt);return(0,$.and)(...Et)}},metaSchema:{type:"array",items:{type:"string",format:"json-pointer"}}}}_.default=j;function _e(et){return et.replace(/~1/g,"/").replace(/~0/g,"~")}a.exports=j})(deepRequired,deepRequired.exports);var deepRequiredExports$1=deepRequired.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(deepRequiredExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(deepRequired$1,deepRequired$1.exports);var deepRequiredExports=deepRequired$1.exports,dynamicDefaults$1={exports:{}},dynamicDefaults={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $={},j={timestamp:()=>()=>Date.now(),datetime:()=>()=>new Date().toISOString(),date:()=>()=>new Date().toISOString().slice(0,10),time:()=>()=>new Date().toISOString().slice(11),random:()=>()=>Math.random(),randomint:dt=>{var yt;const bt=(yt=dt==null?void 0:dt.max)!==null&&yt!==void 0?yt:2;return()=>Math.floor(Math.random()*bt)},seq:dt=>{var yt;const bt=(yt=dt==null?void 0:dt.name)!==null&&yt!==void 0?yt:"";return $[bt]||($[bt]=0),()=>$[bt]++}},_e=Object.assign(et,{DEFAULTS:j});function et(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(dt,yt,bt){if(!bt.opts.useDefaults||bt.compositeRule)return()=>!0;const Et={};for(const _t in dt)Et[_t]=tt(dt[_t]);const $t=bt.opts.useDefaults==="empty";return _t=>{for(const xt in dt)(_t[xt]===void 0||$t&&(_t[xt]===null||_t[xt]===""))&&(_t[xt]=Et[xt]());return!0}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}function tt(dt){return typeof dt=="object"?rt(dt):at(dt)}function rt({func:dt,args:yt}){const bt=j[dt];return ct(dt,bt),bt(yt)}function at(dt=""){const yt=j[dt];return ct(dt,yt),yt()}function ct(dt,yt){if(!yt)throw new Error(`invalid "dynamicDefaults" keyword property value: ${dt}`)}_.default=_e,a.exports=_e})(dynamicDefaults,dynamicDefaults.exports);var dynamicDefaultsExports$1=dynamicDefaults.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(dynamicDefaultsExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(dynamicDefaults$1,dynamicDefaults$1.exports);var dynamicDefaultsExports=dynamicDefaults$1.exports,select$1={exports:{}},select={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $=codegen,j=_util,_e={message:({params:{schemaProp:tt}})=>tt?(0,$.str)`should match case "${tt}" schema`:(0,$.str)`should match default case schema`,params:({params:{schemaProp:tt}})=>tt?(0,$._)`{failingCase: ${tt}}`:(0,$._)`{failingDefault: true}`};function et(tt){const rt=(0,j.metaSchemaRef)(tt);return[{keyword:"select",schemaType:["string","number","boolean","null"],$data:!0,error:_e,dependencies:["selectCases"],code(at){const{gen:ct,schemaCode:dt,parentSchema:yt}=at;at.block$data($.nil,()=>{const bt=ct.let("valid",!0),Et=ct.name("_valid"),$t=ct.const("value",(0,$._)`${dt} === null ? "null" : ${dt}`);ct.if(!1);for(const _t in yt.selectCases){at.setParams({schemaProp:_t}),ct.elseIf((0,$._)`"" + ${$t} == ${_t}`);const xt=at.subschema({keyword:"selectCases",schemaProp:_t},Et);at.mergeEvaluated(xt,$.Name),ct.assign(bt,Et)}if(ct.else(),yt.selectDefault!==void 0){at.setParams({schemaProp:void 0});const _t=at.subschema({keyword:"selectDefault"},Et);at.mergeEvaluated(_t,$.Name),ct.assign(bt,Et)}ct.endIf(),at.pass(bt)})}},{keyword:"selectCases",dependencies:["select"],metaSchema:{type:"object",additionalProperties:rt}},{keyword:"selectDefault",dependencies:["select","selectCases"],metaSchema:rt}]}_.default=et,a.exports=et})(select,select.exports);var selectExports$1=select.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(selectExports$1),_e=(et,tt)=>((0,j.default)(tt).forEach(rt=>et.addKeyword(rt)),et);_.default=_e,a.exports=_e})(select$1,select$1.exports);var selectExports=select$1.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(Rt){return Rt&&Rt.__esModule?Rt:{default:Rt}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(_typeofExports),_e=$(_instanceofExports),et=$(rangeExports),tt=$(exclusiveRangeExports),rt=$(regexpExports),at=$(transformExports),ct=$(uniqueItemPropertiesExports),dt=$(allRequiredExports),yt=$(anyRequiredExports),bt=$(oneRequiredExports),Et=$(patternRequiredExports),$t=$(prohibitedExports),_t=$(deepPropertiesExports),xt=$(deepRequiredExports),St=$(dynamicDefaultsExports),Mt=$(selectExports),Tt={typeof:j.default,instanceof:_e.default,range:et.default,exclusiveRange:tt.default,regexp:rt.default,transform:at.default,uniqueItemProperties:ct.default,allRequired:dt.default,anyRequired:yt.default,oneRequired:bt.default,patternRequired:Et.default,prohibited:$t.default,deepProperties:_t.default,deepRequired:xt.default,dynamicDefaults:St.default,select:Mt.default};_.default=Tt,a.exports=Tt})(keywords$2,keywords$2.exports);var keywordsExports=keywords$2.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(tt){return tt&&tt.__esModule?tt:{default:tt}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(keywordsExports),_e=(tt,rt)=>{if(Array.isArray(rt)){for(const at of rt)et(at)(tt);return tt}if(rt)return et(rt)(tt),tt;for(rt in j.default)et(rt)(tt);return tt};_e.get=et;function et(tt){const rt=j.default[tt];if(!rt)throw new Error("Unknown keyword "+tt);return rt}_.default=_e,a.exports=_e,a.exports.default=_e})(dist$a,dist$a.exports);var distExports$2=dist$a.exports,dist$9={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $=ajvExports,j=codegen,_e=code$2,et=validate,tt=errors,rt=names$1,at="errorMessage",ct=new $.Name("emUsed"),dt={required:"missingProperty",dependencies:"property",dependentRequired:"property"},yt=/\$\{[^}]+\}/,bt=/\$\{([^}]+)\}/g,Et=/^""\s*\+\s*|\s*\+\s*""$/g;function $t(xt){return{keyword:at,schemaType:["string","object"],post:!0,code(St){const{gen:Mt,data:Tt,schema:Rt,schemaValue:Ct,it:It}=St;if(It.createErrors===!1)return;const kt=Rt,Dt=j.strConcat(rt.default.instancePath,It.errorPath);Mt.if($._`${rt.default.errors} > 0`,()=>{if(typeof kt=="object"){const[Ot,Nt]=zt(kt);Nt&&vt(Nt),Ot&&nt(Ot),st(Bt(kt))}const Pt=typeof kt=="string"?kt:kt._;Pt&&lt(Pt),xt.keepErrors||ht()});function Bt({properties:Pt,items:Ot}){const Nt={};if(Pt){Nt.props={};for(const jt in Pt)Nt.props[jt]=[]}if(Ot){Nt.items={};for(let jt=0;jt<Ot.length;jt++)Nt.items[jt]=[]}return Nt}function zt(Pt){let Ot,Nt;for(const jt in Pt){if(jt==="properties"||jt==="items")continue;const Ut=Pt[jt];if(typeof Ut=="object"){Ot||(Ot={});const Vt=Ot[jt]={};for(const rr in Ut)Vt[rr]=[]}else Nt||(Nt={}),Nt[jt]=[]}return[Ot,Nt]}function vt(Pt){const Ot=Mt.const("emErrors",$.stringify(Pt)),Nt=Mt.const("templates",gt(Pt,Rt));Mt.forOf("err",rt.default.vErrors,rr=>Mt.if(mt(rr,Ot),()=>Mt.code($._`${Ot}[${rr}.keyword].push(${rr})`).assign($._`${rr}.${ct}`,!0)));const{singleError:jt}=xt;if(jt){const rr=Mt.let("message",$._`""`),tr=Mt.let("paramsErrors",$._`[]`);Ut(Zt=>{Mt.if(rr,()=>Mt.code($._`${rr} += ${typeof jt=="string"?jt:";"}`)),Mt.code($._`${rr} += ${Vt(Zt)}`),Mt.assign(tr,$._`${tr}.concat(${Ot}[${Zt}])`)}),tt.reportError(St,{message:rr,params:$._`{errors: ${tr}}`})}else Ut(rr=>tt.reportError(St,{message:Vt(rr),params:$._`{errors: ${Ot}[${rr}]}`}));function Ut(rr){Mt.forIn("key",Ot,tr=>Mt.if($._`${Ot}[${tr}].length`,()=>rr(tr)))}function Vt(rr){return $._`${rr} in ${Nt} ? ${Nt}[${rr}]() : ${Ct}[${rr}]`}}function nt(Pt){const Ot=Mt.const("emErrors",$.stringify(Pt)),Nt=[];for(const tr in Pt)Nt.push([tr,gt(Pt[tr],Rt[tr])]);const jt=Mt.const("templates",Mt.object(...Nt)),Ut=Mt.scopeValue("obj",{ref:dt,code:$.stringify(dt)}),Vt=Mt.let("emPropParams"),rr=Mt.let("emParamsErrors");Mt.forOf("err",rt.default.vErrors,tr=>Mt.if(mt(tr,Ot),()=>{Mt.assign(Vt,$._`${Ut}[${tr}.keyword]`),Mt.assign(rr,$._`${Ot}[${tr}.keyword][${tr}.params[${Vt}]]`),Mt.if(rr,()=>Mt.code($._`${rr}.push(${tr})`).assign($._`${tr}.${ct}`,!0))})),Mt.forIn("key",Ot,tr=>Mt.forIn("keyProp",$._`${Ot}[${tr}]`,Zt=>{Mt.assign(rr,$._`${Ot}[${tr}][${Zt}]`),Mt.if($._`${rr}.length`,()=>{const Yt=Mt.const("tmpl",$._`${jt}[${tr}] && ${jt}[${tr}][${Zt}]`);tt.reportError(St,{message:$._`${Yt} ? ${Yt}() : ${Ct}[${tr}][${Zt}]`,params:$._`{errors: ${rr}}`})})}))}function st(Pt){const{props:Ot,items:Nt}=Pt;if(!Ot&&!Nt)return;const jt=$._`typeof ${Tt} == "object"`,Ut=$._`Array.isArray(${Tt})`,Vt=Mt.let("emErrors");let rr,tr;const Zt=Mt.let("templates");Ot&&Nt?(rr=Mt.let("emChildKwd"),Mt.if(jt),Mt.if(Ut,()=>{Yt(Nt,Rt.items),Mt.assign(rr,$.str`items`)},()=>{Yt(Ot,Rt.properties),Mt.assign(rr,$.str`properties`)}),tr=$._`[${rr}]`):Nt?(Mt.if(Ut),Yt(Nt,Rt.items),tr=$._`.items`):Ot&&(Mt.if(j.and(jt,j.not(Ut))),Yt(Ot,Rt.properties),tr=$._`.properties`),Mt.forOf("err",rt.default.vErrors,Wt=>wt(Wt,Vt,fr=>Mt.code($._`${Vt}[${fr}].push(${Wt})`).assign($._`${Wt}.${ct}`,!0))),Mt.forIn("key",Vt,Wt=>Mt.if($._`${Vt}[${Wt}].length`,()=>{tt.reportError(St,{message:$._`${Wt} in ${Zt} ? ${Zt}[${Wt}]() : ${Ct}${tr}[${Wt}]`,params:$._`{errors: ${Vt}[${Wt}]}`}),Mt.assign($._`${rt.default.vErrors}[${rt.default.errors}-1].instancePath`,$._`${Dt} + "/" + ${Wt}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),Mt.endIf();function Yt(Wt,fr){Mt.assign(Vt,$.stringify(Wt)),Mt.assign(Zt,gt(Wt,fr))}}function lt(Pt){const Ot=Mt.const("emErrs",$._`[]`);Mt.forOf("err",rt.default.vErrors,Nt=>Mt.if(At(Nt),()=>Mt.code($._`${Ot}.push(${Nt})`).assign($._`${Nt}.${ct}`,!0))),Mt.if($._`${Ot}.length`,()=>tt.reportError(St,{message:ot(Pt),params:$._`{errors: ${Ot}}`}))}function ht(){const Pt=Mt.const("emErrs",$._`[]`);Mt.forOf("err",rt.default.vErrors,Ot=>Mt.if($._`!${Ot}.${ct}`,()=>Mt.code($._`${Pt}.push(${Ot})`))),Mt.assign(rt.default.vErrors,Pt).assign(rt.default.errors,$._`${Pt}.length`)}function mt(Pt,Ot){return j.and($._`${Pt}.keyword !== ${at}`,$._`!${Pt}.${ct}`,$._`${Pt}.instancePath === ${Dt}`,$._`${Pt}.keyword in ${Ot}`,$._`${Pt}.schemaPath.indexOf(${It.errSchemaPath}) === 0`,$._`/^\\/[^\\/]*$/.test(${Pt}.schemaPath.slice(${It.errSchemaPath.length}))`)}function wt(Pt,Ot,Nt){Mt.if(j.and($._`${Pt}.keyword !== ${at}`,$._`!${Pt}.${ct}`,$._`${Pt}.instancePath.indexOf(${Dt}) === 0`),()=>{const jt=Mt.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:$._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),Ut=Mt.const("emMatches",$._`${jt}.exec(${Pt}.instancePath.slice(${Dt}.length))`),Vt=Mt.const("emChild",$._`${Ut} && ${Ut}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);Mt.if($._`${Vt} !== undefined && ${Vt} in ${Ot}`,()=>Nt(Vt))})}function At(Pt){return j.and($._`${Pt}.keyword !== ${at}`,$._`!${Pt}.${ct}`,j.or($._`${Pt}.instancePath === ${Dt}`,j.and($._`${Pt}.instancePath.indexOf(${Dt}) === 0`,$._`${Pt}.instancePath[${Dt}.length] === "/"`)),$._`${Pt}.schemaPath.indexOf(${It.errSchemaPath}) === 0`,$._`${Pt}.schemaPath[${It.errSchemaPath}.length] === "/"`)}function gt(Pt,Ot){const Nt=[];for(const jt in Pt){const Ut=Ot[jt];yt.test(Ut)&&Nt.push([jt,pt(Ut)])}return Mt.object(...Nt)}function ot(Pt){return yt.test(Pt)?new _e._Code(_e.safeStringify(Pt).replace(bt,(Ot,Nt)=>`" + JSON.stringify(${et.getData(Nt,It)}) + "`).replace(Et,"")):$.stringify(Pt)}function pt(Pt){return $._`function(){return ${ot(Pt)}}`}},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 _t=(xt,St={})=>{if(!xt.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(xt.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return xt.addKeyword($t(St))};_.default=_t,a.exports=_t,a.exports.default=_t})(dist$9,dist$9.exports);var distExports$1=dist$9.exports,__importDefault$8=commonjsGlobal&&commonjsGlobal.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(validation$5,"__esModule",{value:!0});validation$5.validateType=validation$5.generateLazyValidator=validation$5.Ajv=void 0;const ajv_1$3=__importDefault$8(ajvExports);validation$5.Ajv=ajv_1$3.default;const ajv_keywords_1$3=__importDefault$8(distExports$2),ajv_errors_1$3=__importDefault$8(distExports$1);function generateLazyValidator$3(a,_){let $=null;const j=(_e,et)=>{if(!$){const tt=new ajv_1$3.default({$data:!0,allErrors:!0});(0,ajv_keywords_1$3.default)(tt),(0,ajv_errors_1$3.default)(tt,{singleError:!0}),_==null||_.forEach(rt=>tt.addKeyword(rt)),$=tt.compile(a),Object.defineProperty(j,"errors",{get(){return $==null?void 0:$.errors}})}return $(_e,et)};return j}validation$5.generateLazyValidator=generateLazyValidator$3;function validateType$3(a,_){return a.validate(_)}validation$5.validateType=validateType$3;var chainName$2={},hasRequiredChainName$2;function requireChainName$2(){return hasRequiredChainName$2||(hasRequiredChainName$2=1,function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.getChainId=a.ChainName=void 0;const _=validation$5,$=requireChainId$2();var j;(function(et){et.ETHEREUM_MAINNET="Ethereum Mainnet",et.ETHEREUM_ROPSTEN="Ropsten",et.ETHEREUM_RINKEBY="Rinkeby",et.ETHEREUM_GOERLI="Goerli",et.ETHEREUM_KOVAN="Kovan",et.ETHEREUM_SEPOLIA="Sepolia",et.MATIC_MAINNET="Polygon",et.MATIC_MUMBAI="Mumbai",et.MATIC_AMOY="Amoy",et.AVALANCHE_MAINNET="Avalanche",et.BINANCE_MAINNET="Binance Smart Chain",et.ARBITRUM_MAINNET="Arbitrum",et.OPTIMISM_MAINNET="Optimism",et.FANTOM_MAINNET="Fantom"})(j=a.ChainName||(a.ChainName={}));function _e(et){switch(et){case j.ETHEREUM_MAINNET:return $.ChainId.ETHEREUM_MAINNET;case j.ETHEREUM_ROPSTEN:return $.ChainId.ETHEREUM_ROPSTEN;case j.ETHEREUM_RINKEBY:return $.ChainId.ETHEREUM_RINKEBY;case j.ETHEREUM_GOERLI:return $.ChainId.ETHEREUM_GOERLI;case j.ETHEREUM_KOVAN:return $.ChainId.ETHEREUM_KOVAN;case j.ETHEREUM_SEPOLIA:return $.ChainId.ETHEREUM_SEPOLIA;case j.MATIC_MAINNET:return $.ChainId.MATIC_MAINNET;case j.MATIC_MUMBAI:return $.ChainId.MATIC_MUMBAI;case j.MATIC_AMOY:return $.ChainId.MATIC_AMOY;case j.AVALANCHE_MAINNET:return $.ChainId.AVALANCHE_MAINNET;case j.BINANCE_MAINNET:return $.ChainId.BSC_MAINNET;case j.ARBITRUM_MAINNET:return $.ChainId.ARBITRUM_MAINNET;case j.OPTIMISM_MAINNET:return $.ChainId.OPTIMISM_MAINNET;case j.FANTOM_MAINNET:return $.ChainId.FANTOM_MAINNET;default:return null}}a.getChainId=_e,function(et){et.schema={type:"string",enum:Object.values(et)},et.validate=(0,_.generateLazyValidator)(et.schema)}(j=a.ChainName||(a.ChainName={}))}(chainName$2)),chainName$2}var network$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Network=void 0;const _=validation$5;(function($){$.ETHEREUM="ETHEREUM",$.MATIC="MATIC",$.AVALANCHE="AVALANCHE",$.BSC="BINANCE SMART CHAIN",$.OPTIMISM="OPTIMISM",$.ARBITRUM="ARBITRUM",$.FANTOM="FANTOM"})(a.Network||(a.Network={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.Network||(a.Network={}))})(network$2);var hasRequiredChainId$2;function requireChainId$2(){return hasRequiredChainId$2||(hasRequiredChainId$2=1,function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.getNetwork=a.getNetworkMapping=a.getURNProtocol=a.getChainName=a.ChainId=void 0;const _=validation$5,$=requireChainName$2(),j=network$2;var _e;(function(ct){ct[ct.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",ct[ct.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",ct[ct.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",ct[ct.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",ct[ct.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",ct[ct.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",ct[ct.MATIC_MAINNET=137]="MATIC_MAINNET",ct[ct.MATIC_MUMBAI=80001]="MATIC_MUMBAI",ct[ct.MATIC_AMOY=80002]="MATIC_AMOY",ct[ct.BSC_MAINNET=56]="BSC_MAINNET",ct[ct.OPTIMISM_MAINNET=10]="OPTIMISM_MAINNET",ct[ct.ARBITRUM_MAINNET=42161]="ARBITRUM_MAINNET",ct[ct.FANTOM_MAINNET=250]="FANTOM_MAINNET",ct[ct.AVALANCHE_MAINNET=43114]="AVALANCHE_MAINNET"})(_e=a.ChainId||(a.ChainId={}));function et(ct){switch(ct){case _e.ETHEREUM_MAINNET:return $.ChainName.ETHEREUM_MAINNET;case _e.ETHEREUM_ROPSTEN:return $.ChainName.ETHEREUM_ROPSTEN;case _e.ETHEREUM_RINKEBY:return $.ChainName.ETHEREUM_RINKEBY;case _e.ETHEREUM_GOERLI:return $.ChainName.ETHEREUM_GOERLI;case _e.ETHEREUM_KOVAN:return $.ChainName.ETHEREUM_KOVAN;case _e.ETHEREUM_SEPOLIA:return $.ChainName.ETHEREUM_SEPOLIA;case _e.MATIC_MAINNET:return $.ChainName.MATIC_MAINNET;case _e.MATIC_MUMBAI:return $.ChainName.MATIC_MUMBAI;case _e.MATIC_AMOY:return $.ChainName.MATIC_AMOY;case _e.BSC_MAINNET:return $.ChainName.BINANCE_MAINNET;case _e.ARBITRUM_MAINNET:return $.ChainName.ARBITRUM_MAINNET;case _e.OPTIMISM_MAINNET:return $.ChainName.OPTIMISM_MAINNET;case _e.FANTOM_MAINNET:return $.ChainName.FANTOM_MAINNET;case _e.AVALANCHE_MAINNET:return $.ChainName.AVALANCHE_MAINNET;default:return null}}a.getChainName=et;function tt(ct){switch(ct){case _e.ETHEREUM_MAINNET:return"ethereum";case _e.ETHEREUM_ROPSTEN:return"ropsten";case _e.ETHEREUM_RINKEBY:return"rinkeby";case _e.ETHEREUM_GOERLI:return"goerli";case _e.ETHEREUM_KOVAN:return"kovan";case _e.ETHEREUM_SEPOLIA:return"sepolia";case _e.MATIC_MAINNET:return"matic";case _e.MATIC_MUMBAI:return"mumbai";case _e.MATIC_AMOY:return"amoy";default:return""}}a.getURNProtocol=tt;function rt(ct){const dt={[j.Network.BSC]:_e.BSC_MAINNET,[j.Network.OPTIMISM]:_e.OPTIMISM_MAINNET,[j.Network.ARBITRUM]:_e.ARBITRUM_MAINNET,[j.Network.FANTOM]:_e.FANTOM_MAINNET,[j.Network.AVALANCHE]:_e.AVALANCHE_MAINNET};switch(ct){case _e.ETHEREUM_MAINNET:return Object.assign({[j.Network.ETHEREUM]:_e.ETHEREUM_MAINNET,[j.Network.MATIC]:_e.MATIC_MAINNET},dt);case _e.ETHEREUM_ROPSTEN:return Object.assign({[j.Network.ETHEREUM]:_e.ETHEREUM_ROPSTEN,[j.Network.MATIC]:_e.MATIC_MUMBAI},dt);case _e.ETHEREUM_RINKEBY:return Object.assign({[j.Network.ETHEREUM]:_e.ETHEREUM_RINKEBY,[j.Network.MATIC]:_e.MATIC_MUMBAI},dt);case _e.ETHEREUM_GOERLI:return Object.assign({[j.Network.ETHEREUM]:_e.ETHEREUM_GOERLI,[j.Network.MATIC]:_e.MATIC_MUMBAI},dt);case _e.ETHEREUM_KOVAN:return Object.assign({[j.Network.ETHEREUM]:_e.ETHEREUM_KOVAN,[j.Network.MATIC]:_e.MATIC_MUMBAI},dt);case _e.ETHEREUM_SEPOLIA:return Object.assign({[j.Network.ETHEREUM]:_e.ETHEREUM_SEPOLIA,[j.Network.MATIC]:_e.MATIC_AMOY},dt);case _e.MATIC_MAINNET:return Object.assign({[j.Network.ETHEREUM]:_e.MATIC_MAINNET,[j.Network.MATIC]:_e.MATIC_MAINNET},dt);case _e.MATIC_MUMBAI:return Object.assign({[j.Network.ETHEREUM]:_e.MATIC_MUMBAI,[j.Network.MATIC]:_e.MATIC_MUMBAI},dt);case _e.MATIC_AMOY:return Object.assign({[j.Network.ETHEREUM]:_e.MATIC_AMOY,[j.Network.MATIC]:_e.MATIC_AMOY},dt);default:return Object.assign({[j.Network.ETHEREUM]:_e.ETHEREUM_MAINNET,[j.Network.MATIC]:_e.MATIC_MAINNET},dt)}}a.getNetworkMapping=rt;function at(ct){switch(ct){case _e.ETHEREUM_MAINNET:case _e.ETHEREUM_ROPSTEN:case _e.ETHEREUM_GOERLI:case _e.ETHEREUM_KOVAN:case _e.ETHEREUM_RINKEBY:case _e.ETHEREUM_SEPOLIA:return j.Network.ETHEREUM;case _e.MATIC_MAINNET:case _e.MATIC_MUMBAI:case _e.MATIC_AMOY:return j.Network.MATIC;case _e.BSC_MAINNET:return j.Network.BSC;case _e.OPTIMISM_MAINNET:return j.Network.OPTIMISM;case _e.ARBITRUM_MAINNET:return j.Network.ARBITRUM;case _e.FANTOM_MAINNET:return j.Network.FANTOM;case _e.AVALANCHE_MAINNET:return j.Network.AVALANCHE}}a.getNetwork=at,function(ct){ct.schema={type:"number",enum:Object.values(ct)},ct.validate=(0,_.generateLazyValidator)(ct.schema)}(_e=a.ChainId||(a.ChainId={}))}(chainId$2)),chainId$2}var chainIdExports=requireChainId$2(),providerType$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.ProviderType=void 0;const _=validation$5;(function($){$.INJECTED="injected",$.MAGIC="magic",$.MAGIC_TEST="magic_test",$.FORTMATIC="formatic",$.NETWORK="network",$.WALLET_CONNECT="wallet_connect",$.WALLET_CONNECT_V2="wallet_connect_v2",$.WALLET_LINK="wallet_link",$.METAMASK_MOBILE="metamask_mobile",$.AUTH_SERVER="auth_server"})(a.ProviderType||(a.ProviderType={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.ProviderType||(a.ProviderType={}))})(providerType$2);var ConnectorEvent;(function(a){a.Update="Web3ReactUpdate",a.Error="Web3ReactError",a.Deactivate="Web3ReactDeactivate"})(ConnectorEvent||(ConnectorEvent={}));var events$1={exports:{}},R=typeof Reflect=="object"?Reflect:null,ReflectApply=R&&typeof R.apply=="function"?R.apply:function(_,$,j){return Function.prototype.apply.call(_,$,j)},ReflectOwnKeys;R&&typeof R.ownKeys=="function"?ReflectOwnKeys=R.ownKeys:Object.getOwnPropertySymbols?ReflectOwnKeys=function(_){return Object.getOwnPropertyNames(_).concat(Object.getOwnPropertySymbols(_))}:ReflectOwnKeys=function(_){return Object.getOwnPropertyNames(_)};function ProcessEmitWarning(a){console&&console.warn&&console.warn(a)}var NumberIsNaN=Number.isNaN||function(_){return _!==_};function EventEmitter(){EventEmitter.init.call(this)}events$1.exports=EventEmitter;events$1.exports.once=once$2;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=void 0;EventEmitter.prototype._eventsCount=0;EventEmitter.prototype._maxListeners=void 0;var defaultMaxListeners=10;function checkListener(a){if(typeof a!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof a)}Object.defineProperty(EventEmitter,"defaultMaxListeners",{enumerable:!0,get:function(){return defaultMaxListeners},set:function(a){if(typeof a!="number"||a<0||NumberIsNaN(a))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+a+".");defaultMaxListeners=a}});EventEmitter.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};EventEmitter.prototype.setMaxListeners=function(_){if(typeof _!="number"||_<0||NumberIsNaN(_))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+_+".");return this._maxListeners=_,this};function _getMaxListeners(a){return a._maxListeners===void 0?EventEmitter.defaultMaxListeners:a._maxListeners}EventEmitter.prototype.getMaxListeners=function(){return _getMaxListeners(this)};EventEmitter.prototype.emit=function(_){for(var $=[],j=1;j<arguments.length;j++)$.push(arguments[j]);var _e=_==="error",et=this._events;if(et!==void 0)_e=_e&&et.error===void 0;else if(!_e)return!1;if(_e){var tt;if($.length>0&&(tt=$[0]),tt instanceof Error)throw tt;var rt=new Error("Unhandled error."+(tt?" ("+tt.message+")":""));throw rt.context=tt,rt}var at=et[_];if(at===void 0)return!1;if(typeof at=="function")ReflectApply(at,this,$);else for(var ct=at.length,dt=arrayClone(at,ct),j=0;j<ct;++j)ReflectApply(dt[j],this,$);return!0};function _addListener(a,_,$,j){var _e,et,tt;if(checkListener($),et=a._events,et===void 0?(et=a._events=Object.create(null),a._eventsCount=0):(et.newListener!==void 0&&(a.emit("newListener",_,$.listener?$.listener:$),et=a._events),tt=et[_]),tt===void 0)tt=et[_]=$,++a._eventsCount;else if(typeof tt=="function"?tt=et[_]=j?[$,tt]:[tt,$]:j?tt.unshift($):tt.push($),_e=_getMaxListeners(a),_e>0&&tt.length>_e&&!tt.warned){tt.warned=!0;var rt=new Error("Possible EventEmitter memory leak detected. "+tt.length+" "+String(_)+" listeners added. Use emitter.setMaxListeners() to increase limit");rt.name="MaxListenersExceededWarning",rt.emitter=a,rt.type=_,rt.count=tt.length,ProcessEmitWarning(rt)}return a}EventEmitter.prototype.addListener=function(_,$){return _addListener(this,_,$,!1)};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.prependListener=function(_,$){return _addListener(this,_,$,!0)};function onceWrapper(){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 _onceWrap(a,_,$){var j={fired:!1,wrapFn:void 0,target:a,type:_,listener:$},_e=onceWrapper.bind(j);return _e.listener=$,j.wrapFn=_e,_e}EventEmitter.prototype.once=function(_,$){return checkListener($),this.on(_,_onceWrap(this,_,$)),this};EventEmitter.prototype.prependOnceListener=function(_,$){return checkListener($),this.prependListener(_,_onceWrap(this,_,$)),this};EventEmitter.prototype.removeListener=function(_,$){var j,_e,et,tt,rt;if(checkListener($),_e=this._events,_e===void 0)return this;if(j=_e[_],j===void 0)return this;if(j===$||j.listener===$)--this._eventsCount===0?this._events=Object.create(null):(delete _e[_],_e.removeListener&&this.emit("removeListener",_,j.listener||$));else if(typeof j!="function"){for(et=-1,tt=j.length-1;tt>=0;tt--)if(j[tt]===$||j[tt].listener===$){rt=j[tt].listener,et=tt;break}if(et<0)return this;et===0?j.shift():spliceOne(j,et),j.length===1&&(_e[_]=j[0]),_e.removeListener!==void 0&&this.emit("removeListener",_,rt||$)}return this};EventEmitter.prototype.off=EventEmitter.prototype.removeListener;EventEmitter.prototype.removeAllListeners=function(_){var $,j,_e;if(j=this._events,j===void 0)return this;if(j.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):j[_]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete j[_]),this;if(arguments.length===0){var et=Object.keys(j),tt;for(_e=0;_e<et.length;++_e)tt=et[_e],tt!=="removeListener"&&this.removeAllListeners(tt);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if($=j[_],typeof $=="function")this.removeListener(_,$);else if($!==void 0)for(_e=$.length-1;_e>=0;_e--)this.removeListener(_,$[_e]);return this};function _listeners(a,_,$){var j=a._events;if(j===void 0)return[];var _e=j[_];return _e===void 0?[]:typeof _e=="function"?$?[_e.listener||_e]:[_e]:$?unwrapListeners(_e):arrayClone(_e,_e.length)}EventEmitter.prototype.listeners=function(_){return _listeners(this,_,!0)};EventEmitter.prototype.rawListeners=function(_){return _listeners(this,_,!1)};EventEmitter.listenerCount=function(a,_){return typeof a.listenerCount=="function"?a.listenerCount(_):listenerCount.call(a,_)};EventEmitter.prototype.listenerCount=listenerCount;function listenerCount(a){var _=this._events;if(_!==void 0){var $=_[a];if(typeof $=="function")return 1;if($!==void 0)return $.length}return 0}EventEmitter.prototype.eventNames=function(){return this._eventsCount>0?ReflectOwnKeys(this._events):[]};function arrayClone(a,_){for(var $=new Array(_),j=0;j<_;++j)$[j]=a[j];return $}function spliceOne(a,_){for(;_+1<a.length;_++)a[_]=a[_+1];a.pop()}function unwrapListeners(a){for(var _=new Array(a.length),$=0;$<_.length;++$)_[$]=a[$].listener||a[$];return _}function once$2(a,_){return new Promise(function($,j){function _e(tt){a.removeListener(_,et),j(tt)}function et(){typeof a.removeListener=="function"&&a.removeListener("error",_e),$([].slice.call(arguments))}eventTargetAgnosticAddListener(a,_,et,{once:!0}),_!=="error"&&addErrorHandlerIfEventEmitter(a,_e,{once:!0})})}function addErrorHandlerIfEventEmitter(a,_,$){typeof a.on=="function"&&eventTargetAgnosticAddListener(a,"error",_,$)}function eventTargetAgnosticAddListener(a,_,$,j){if(typeof a.on=="function")j.once?a.once(_,$):a.on(_,$);else if(typeof a.addEventListener=="function")a.addEventListener(_,function _e(et){j.once&&a.removeEventListener(_,_e),$(et)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof a)}var eventsExports=events$1.exports;const it=getDefaultExportFromCjs$1(eventsExports);function _inheritsLoose$5(a,_){a.prototype=Object.create(_.prototype),a.prototype.constructor=a,a.__proto__=_}var AbstractConnector=function(a){_inheritsLoose$5(_,a);function _(j){var _e,et=j===void 0?{}:j,tt=et.supportedChainIds;return _e=a.call(this)||this,_e.supportedChainIds=tt,_e}var $=_.prototype;return $.emitUpdate=function(_e){this.emit(ConnectorEvent.Update,_e)},$.emitError=function(_e){this.emit(ConnectorEvent.Error,_e)},$.emitDeactivate=function(){this.emit(ConnectorEvent.Deactivate)},_}(eventsExports.EventEmitter);const scriptRel="modulepreload",assetsURL=function(a){return"https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239233428.commit-2de01c8/"+a},seen={},__vitePreload=function(_,$,j){if(!$||$.length===0)return _();const _e=document.getElementsByTagName("link");return Promise.all($.map(et=>{if(et=assetsURL(et),et in seen)return;seen[et]=!0;const tt=et.endsWith(".css"),rt=tt?'[rel="stylesheet"]':"";if(!!j)for(let dt=_e.length-1;dt>=0;dt--){const yt=_e[dt];if(yt.href===et&&(!tt||yt.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${et}"]${rt}`))return;const ct=document.createElement("link");if(ct.rel=tt?"stylesheet":scriptRel,tt||(ct.as="script",ct.crossOrigin=""),ct.href=et,document.head.appendChild(ct),tt)return new Promise((dt,yt)=>{ct.addEventListener("load",dt),ct.addEventListener("error",()=>yt(new Error(`Unable to preload CSS for ${et}`)))})})).then(()=>_()).catch(et=>{const tt=new Event("vite:preloadError",{cancelable:!0});if(tt.payload=et,window.dispatchEvent(tt),!tt.defaultPrevented)throw et})};var dist$8={},sdk$2={},ws$2={},sceneUpdate$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.SceneUpdate=a.SCENE_UPDATE=void 0;const _=validation$5;a.SCENE_UPDATE="SCENE_UPDATE",function($){$.schema={type:"object",properties:{type:{type:"string",enum:[a.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},$.validate=(0,_.generateLazyValidator)($.schema)}(a.SceneUpdate||(a.SceneUpdate={}))})(sceneUpdate$2);var update$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Update=a.UPDATE=void 0;const _=validation$5;a.UPDATE="update",function($){$.schema={type:"object",properties:{type:{type:"string",enum:[a.UPDATE]}},required:["type"]},$.validate=(0,_.generateLazyValidator)($.schema)}(a.Update||(a.Update={}))})(update$2);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(sceneUpdate$2,a),$(update$2,a)})(ws$2);var project$2={},type$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.ProjectType=void 0;const _=validation$5;(function($){$.SCENE="scene",$.SMART_ITEM="smart-item",$.PORTABLE_EXPERIENCE="portable-experience",$.LIBRARY="library"})(a.ProjectType||(a.ProjectType={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.ProjectType||(a.ProjectType={}))})(type$2);var wearableJson$2={},rarity$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Rarity=void 0;const _=validation$5;(function($){$.UNIQUE="unique",$.MYTHIC="mythic",$.EXOTIC="exotic",$.LEGENDARY="legendary",$.EPIC="epic",$.RARE="rare",$.UNCOMMON="uncommon",$.COMMON="common"})(a.Rarity||(a.Rarity={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema);const j={[$.UNIQUE]:1,[$.MYTHIC]:10,[$.EXOTIC]:50,[$.LEGENDARY]:100,[$.EPIC]:1e3,[$.RARE]:5e3,[$.UNCOMMON]:1e4,[$.COMMON]:1e5},_e={[$.UNIQUE]:"#FFE617",[$.MYTHIC]:"#FB7DE3",[$.EXOTIC]:"#E4FFB8",[$.LEGENDARY]:"#A657ED",[$.EPIC]:"#6397F2",[$.RARE]:"#3AD682",[$.UNCOMMON]:"#FF8563",[$.COMMON]:"#D4E0E0"},et={[$.UNIQUE]:"#FFB626",[$.MYTHIC]:"#FF63E1",[$.EXOTIC]:"#CAFF73",[$.LEGENDARY]:"#842DDA",[$.EPIC]:"#3D85E6",[$.RARE]:"#36CF75",[$.UNCOMMON]:"#ED6D4F",[$.COMMON]:"#ABC1C1"};function tt(dt){return j[dt]}$.getMaxSupply=tt;function rt(dt){return et[dt]}$.getColor=rt;function at(){return[$.UNIQUE,$.MYTHIC,$.EXOTIC,$.LEGENDARY,$.EPIC,$.RARE,$.UNCOMMON,$.COMMON]}$.getRarities=at;function ct(dt){return[_e[dt],et[dt]]}$.getGradient=ct}(a.Rarity||(a.Rarity={}))})(rarity$2);var wearableCategory$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.WearableCategory=void 0;const _=validation$5;(function($){$.EYEBROWS="eyebrows",$.EYES="eyes",$.FACIAL_HAIR="facial_hair",$.HAIR="hair",$.BODY_SHAPE="body_shape",$.MOUTH="mouth",$.UPPER_BODY="upper_body",$.LOWER_BODY="lower_body",$.FEET="feet",$.EARRING="earring",$.EYEWEAR="eyewear",$.HAT="hat",$.HELMET="helmet",$.MASK="mask",$.TIARA="tiara",$.TOP_HEAD="top_head",$.SKIN="skin",$.HANDS_WEAR="hands_wear"})(a.WearableCategory||(a.WearableCategory={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.WearableCategory||(a.WearableCategory={}))})(wearableCategory$2);var representation$2={},bodyShape$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.BodyShape=void 0;const _=validation$5;(function($){$.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",$.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(a.BodyShape||(a.BodyShape={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.BodyShape||(a.BodyShape={}))})(bodyShape$2);var hideableCategory$2={},bodyPartCategory$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.BodyPartCategory=void 0;const _=validation$5;(function($){$.HEAD="head",$.HANDS="hands"})(a.BodyPartCategory||(a.BodyPartCategory={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.BodyPartCategory||(a.BodyPartCategory={}))})(bodyPartCategory$2);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.HideableWearableCategory=void 0;const _=wearableCategory$2,$=validation$5,j=bodyPartCategory$2;(function(_e){_e.schema={oneOf:[Object.assign({},_.WearableCategory.schema),Object.assign({},j.BodyPartCategory.schema)]},_e.validate=(0,$.generateLazyValidator)(_e.schema)})(a.HideableWearableCategory||(a.HideableWearableCategory={}))})(hideableCategory$2);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.WearableRepresentation=void 0;const _=validation$5,$=bodyShape$2,j=hideableCategory$2;(function(_e){_e.schema={type:"object",properties:{bodyShapes:{type:"array",items:$.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:j.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:j.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},_e.validate=(0,_.generateLazyValidator)(_e.schema)})(a.WearableRepresentation||(a.WearableRepresentation={}))})(representation$2);var platform$2={},profile$5={},avatar$2={},misc$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.IPFSv1=a.IPFSv2=a.EthAddress=a.Color3=void 0;const _=validation$5;(function($){$.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 j=(0,_.generateLazyValidator)($.schema);$.validate=_e=>j(_e)})(a.Color3||(a.Color3={})),function($){$.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const j=new RegExp($.schema.pattern);$.validate=_e=>j.test(_e)}(a.EthAddress||(a.EthAddress={})),function($){$.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const j=new RegExp($.schema.pattern);$.validate=_e=>j.test(_e)}(a.IPFSv2||(a.IPFSv2={})),function($){$.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const j=new RegExp($.schema.pattern);$.validate=_e=>j.test(_e)}(a.IPFSv1||(a.IPFSv1={}))})(misc$2);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Avatar=a.Link=a.LinkUrl=a.AvatarInfo=a.Snapshots=void 0;const _=wearableCategory$2,$=misc$2,j=validation$5;var _e;(function(at){at.schema={type:"object",required:["face256","body"],properties:{face256:$.IPFSv2.schema,body:$.IPFSv2.schema}},at.validate=(0,j.generateLazyValidator)(at.schema)})(_e=a.Snapshots||(a.Snapshots={}));var et;(function(at){at.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:$.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:$.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:$.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:_.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:_e.schema},additionalProperties:!0},at.validate=(0,j.generateLazyValidator)(at.schema)})(et=a.AvatarInfo||(a.AvatarInfo={}));var tt;(function(at){at.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const ct=new RegExp(at.schema.pattern,"i");at.validate=dt=>ct.test(dt)})(tt=a.LinkUrl||(a.LinkUrl={}));var rt;(function(at){at.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:tt.schema}}})(rt=a.Link||(a.Link={})),function(at){at.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:rt.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:$.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:et.schema},additionalProperties:!0},at.validate=(0,j.generateLazyValidator)(at.schema)}(a.Avatar||(a.Avatar={}))})(avatar$2);var profile$4={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Profile=void 0;const _=validation$5,$=avatar$2;(function(j){j.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:$.Avatar.schema}},additionalProperties:!0},j.validate=(0,_.generateLazyValidator)(j.schema)})(a.Profile||(a.Profile={}))})(profile$4);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(avatar$2,a),$(profile$4,a)})(profile$5);var scene$5={},featureToggles$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.FeatureToggles=a.portableExperiencesToggles=a.toggles=void 0;const _=validation$5;a.toggles=["enabled","disabled"],a.portableExperiencesToggles=[...a.toggles,"hideUi"],function($){$.schema={type:"object",properties:{voiceChat:{type:"string",enum:a.toggles,nullable:!0},portableExperiences:{type:"string",enum:a.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${a.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${a.toggles.join(", ")}`,required:[]},$.validate=(0,_.generateLazyValidator)($.schema)}(a.FeatureToggles||(a.FeatureToggles={}))})(featureToggles$2);var worldConfiguration$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.WorldConfiguration=void 0;const _=validation$5;(function($){$.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:[]},$.validate=(0,_.generateLazyValidator)($.schema)})(a.WorldConfiguration||(a.WorldConfiguration={}))})(worldConfiguration$2);var sceneParcels$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.SceneParcels=void 0;const _=validation$5;(function($){$.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"]},$.schemaValidator=(0,_.generateLazyValidator)($.schema),$.validate=j=>$.schemaValidator(j)&&j.parcels.includes(j.base)})(a.SceneParcels||(a.SceneParcels={}))})(sceneParcels$2);var scene$4={},displayable$2={};Object.defineProperty(displayable$2,"__esModule",{value:!0});displayable$2.displayableProperties=void 0;displayable$2.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}};var source$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Source=void 0;const _=validation$5;(function($){$.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"]},$.validate=(0,_.generateLazyValidator)($.schema)})(a.Source||(a.Source={}))})(source$2);var spawnPoint$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.SpawnPoint=void 0;const _=validation$5;(function($){$.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"]}}},$.validate=(0,_.generateLazyValidator)($.schema)})(a.SpawnPoint||(a.SpawnPoint={}))})(spawnPoint$2);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Scene=a.RequiredPermission=void 0;const _=validation$5,$=displayable$2,j=featureToggles$2,_e=sceneParcels$2,et=source$2,tt=spawnPoint$2,rt=worldConfiguration$2;var at;(function(ct){ct.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",ct.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",ct.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",ct.USE_WEB3_API="USE_WEB3_API",ct.USE_FETCH="USE_FETCH",ct.USE_WEBSOCKET="USE_WEBSOCKET",ct.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(at=a.RequiredPermission||(a.RequiredPermission={})),function(ct){ct.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:_e.SceneParcels.schema},$.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({},et.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:tt.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(at)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},j.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},rt.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:at.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}}}}}},ct.validate=(0,_.generateLazyValidator)(ct.schema)}(a.Scene||(a.Scene={}))})(scene$4);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.SpawnPoint=a.Source=a.RequiredPermission=a.Scene=a.SceneParcels=a.WorldConfiguration=a.FeatureToggles=void 0;var _=featureToggles$2;Object.defineProperty(a,"FeatureToggles",{enumerable:!0,get:function(){return _.FeatureToggles}});var $=worldConfiguration$2;Object.defineProperty(a,"WorldConfiguration",{enumerable:!0,get:function(){return $.WorldConfiguration}});var j=sceneParcels$2;Object.defineProperty(a,"SceneParcels",{enumerable:!0,get:function(){return j.SceneParcels}});var _e=scene$4;Object.defineProperty(a,"Scene",{enumerable:!0,get:function(){return _e.Scene}}),Object.defineProperty(a,"RequiredPermission",{enumerable:!0,get:function(){return _e.RequiredPermission}});var et=source$2;Object.defineProperty(a,"Source",{enumerable:!0,get:function(){return et.Source}});var tt=spawnPoint$2;Object.defineProperty(a,"SpawnPoint",{enumerable:!0,get:function(){return tt.SpawnPoint}})})(scene$5);var item$5={},i18n$2={},locale$3={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Locale=void 0;const _=validation$5;(function($){$.EN="en",$.ES="es"})(a.Locale||(a.Locale={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.Locale||(a.Locale={}))})(locale$3);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.I18N=void 0;const _=validation$5,$=locale$3;(function(j){j.schema={type:"object",properties:{code:$.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},j.validate=(0,_.generateLazyValidator)(j.schema)})(a.I18N||(a.I18N={}))})(i18n$2);var metrics$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Metrics=void 0;const _=validation$5;(function($){$.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"]},$.validate=(0,_.generateLazyValidator)($.schema)})(a.Metrics||(a.Metrics={}))})(metrics$2);var standardProps$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.isStandard=a.standardProperties=void 0;const _=rarity$2,$=validation$5;a.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:_.Rarity.schema};const j={type:"object",properties:Object.assign({},a.standardProperties),required:["collectionAddress","rarity"]},_e=(0,$.generateLazyValidator)(j);function et(tt){return _e(tt)}a.isStandard=et})(standardProps$2);var thirdPartyProps$2={},merkleTree$2={},merkleProof$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.MerkleProof=void 0;const _=validation$5;(function($){$.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},$.validate=(0,_.generateLazyValidator)($.schema)})(a.MerkleProof||(a.MerkleProof={}))})(merkleProof$2);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(merkleProof$2,a)})(merkleTree$2);var linkedWearableMappings={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.createMappingsHelper=a.AddMappingError=a.Mappings=a.Mapping=a.MultipleMapping=a.RangeMapping=a.AnyMapping=a.SingleMapping=a.ContractNetwork=a.MappingType=void 0;const _=validation$5;var $;(function(yt){yt.SINGLE="single",yt.ANY="any",yt.MULTIPLE="multiple",yt.RANGE="range"})($=a.MappingType||(a.MappingType={}));var j;(function(yt){yt.MAINNET="mainnet",yt.MATIC="matic",yt.SEPOLIA="sepolia",yt.AMOY="amoy"})(j=a.ContractNetwork||(a.ContractNetwork={}));var _e;(function(yt){yt.schema={type:"object",properties:{type:{type:"string",const:$.SINGLE},id:{type:"string",pattern:"^[0-9]+$"}},required:["type","id"],additionalProperties:!1},yt.validate=(0,_.generateLazyValidator)(yt.schema)})(_e=a.SingleMapping||(a.SingleMapping={}));var et;(function(yt){yt.schema={type:"object",properties:{type:{type:"string",const:$.ANY}},required:["type"],additionalProperties:!1},yt.validate=(0,_.generateLazyValidator)(yt.schema)})(et=a.AnyMapping||(a.AnyMapping={}));var tt;(function(yt){yt._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(Et,$t){if(!$t||!$t.from||!$t.to)return!1;let{to:_t,from:xt}=$t;return(typeof xt!="bigint"||typeof _t!="bigint")&&(xt=BigInt(xt),_t=BigInt(_t)),xt<=_t},errors:!1},yt.schema={type:"object",properties:{type:{type:"string",const:$.RANGE},from:{type:"string",pattern:"^[0-9]+$"},to:{type:"string",pattern:"^[0-9]+$"}},required:["type","from","to"],additionalProperties:!1,_fromLessThanOrEqualTo:!0},yt.validate=(0,_.generateLazyValidator)(yt.schema,[yt._fromLessThanOrEqualTo])})(tt=a.RangeMapping||(a.RangeMapping={}));var rt;(function(yt){yt.schema={type:"object",properties:{type:{type:"string",const:$.MULTIPLE},ids:{type:"array",items:{type:"string",pattern:"^[0-9]+$"},minItems:1,uniqueItems:!0}},required:["type","ids"],additionalProperties:!1},yt.validate=(0,_.generateLazyValidator)(yt.schema)})(rt=a.MultipleMapping||(a.MultipleMapping={}));var at;(function(yt){yt.schema={type:"object",properties:{type:{type:"string",enum:Object.values($)}},required:["type"],oneOf:[_e.schema,et.schema,tt.schema,rt.schema]},yt.validate=(0,_.generateLazyValidator)(yt.schema,[tt._fromLessThanOrEqualTo])})(at=a.Mapping||(a.Mapping={})),function(yt){yt._isMappingsValid={keyword:"_isMappingsValid",validate:function(Et,$t){try{dt($t)}catch{return!1}return!0},errors:!1},yt.innerSchema={type:"object",patternProperties:{"^0x[0-9a-fA-F]{40}$":{type:"array",items:at.schema}},minProperties:1,required:[],additionalProperties:!1};const bt=Object.values(j).reduce((Et,$t)=>(Et[$t]=yt.innerSchema,Et),{});yt.schema={type:"object",properties:bt,minProperties:1,additionalProperties:!1,_isMappingsValid:!0},yt.validate=(0,_.generateLazyValidator)(yt.schema,[tt._fromLessThanOrEqualTo,yt._isMappingsValid])}(a.Mappings||(a.Mappings={}));class ct extends Error{constructor(bt,Et,$t){super(bt),this.existingMapping=Et,this.conflictingMapping=$t}}a.AddMappingError=ct;function dt(yt={}){const bt={};for(const[Ct,It]of Object.entries(yt)){bt[Ct]={};for(const[kt,Dt]of Object.entries(It))for(const Bt of Dt)Tt(Ct,kt,Bt)}function Et(){return JSON.parse(JSON.stringify(bt))}function $t(Ct,It,kt){const Dt=BigInt(Ct);return Dt>=BigInt(It)&&Dt<=BigInt(kt)}function _t(Ct,It){switch(It.type){case $.SINGLE:return Ct.id===It.id;case $.MULTIPLE:return It.ids.includes(Ct.id);case $.RANGE:return $t(Ct.id,It.from,It.to);default:return!1}}function xt(Ct,It){switch(It.type){case $.SINGLE:return Ct.ids.includes(It.id);case $.MULTIPLE:return Ct.ids.some(kt=>It.ids.includes(kt));case $.RANGE:return Ct.ids.some(kt=>$t(kt,It.from,It.to));default:return!1}}function St(Ct,It){switch(It.type){case $.SINGLE:return $t(It.id,Ct.from,Ct.to);case $.MULTIPLE:return It.ids.some(kt=>$t(kt,Ct.from,Ct.to));case $.RANGE:return BigInt(Ct.from)<=BigInt(It.to)&&BigInt(Ct.to)>=BigInt(It.from)}}function Mt(Ct,It){if(Ct.type===$.ANY||It.type===$.ANY)return!0;switch(Ct.type){case $.SINGLE:return _t(Ct,It);case $.MULTIPLE:return xt(Ct,It);case $.RANGE:return St(Ct,It)}}function Tt(Ct,It,kt){var Dt,Bt;const zt=It.toLowerCase();bt[Ct]=(Dt=bt[Ct])!==null&&Dt!==void 0?Dt:{},bt[Ct][zt]=(Bt=bt[Ct][zt])!==null&&Bt!==void 0?Bt:[];for(const vt of bt[Ct][zt])if(Mt(vt,kt))throw new ct(`Cannot add mapping to contract ${zt} on network ${Ct} because it overlaps with existing mapping`,vt,kt);bt[Ct][zt].push(kt)}function Rt(Ct,It,kt){var Dt;return!((Dt=bt[Ct])===null||Dt===void 0)&&Dt[It]?bt[Ct][It].some(Bt=>{switch(Bt.type){case $.SINGLE:return Bt.id===kt;case $.ANY:return!0;case $.MULTIPLE:return Bt.ids.includes(kt);case $.RANGE:return BigInt(kt)>=BigInt(Bt.from)&&BigInt(kt)<=BigInt(Bt.to)}}):!1}return{addMapping:Tt,getMappings:Et,includesNft:Rt}}a.createMappingsHelper=dt})(linkedWearableMappings);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.isThirdParty=a.schema=void 0;const _=validation$5,$=merkleTree$2,j=linkedWearableMappings;a.schema={type:"object",properties:{merkleProof:$.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]},mappings:Object.assign({nullable:!0},j.Mappings.schema)},required:["merkleProof","content"],_containsHashingKeys:!0};const _e={keyword:"_containsHashingKeys",validate:function(rt,at){var ct;const dt=at;return!((ct=dt==null?void 0:dt.merkleProof)===null||ct===void 0)&&ct.hashingKeys?dt.merkleProof.hashingKeys.every(yt=>dt.hasOwnProperty(yt)):!1},errors:!1},et=(0,_.generateLazyValidator)(a.schema,[_e,j.RangeMapping._fromLessThanOrEqualTo,j.Mappings._isMappingsValid]);function tt(rt){return et(rt)}a.isThirdParty=tt})(thirdPartyProps$2);var wearable$5={},wearable$4={},baseItem$2={};Object.defineProperty(baseItem$2,"__esModule",{value:!0});baseItem$2.isBaseEmote=baseItem$2.isBaseAvatar=baseItem$2.requiredBaseItemProps=baseItem$2.baseItemProperties=void 0;const i18n_1$2=i18n$2,metrics_1$2=metrics$2,displayable_1$2=displayable$2;baseItem$2.baseItemProperties=Object.assign(Object.assign({},displayable_1$2.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:i18n_1$2.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({},metrics_1$2.Metrics.schema),{nullable:!0})});baseItem$2.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function isBaseAvatar$2(a){if(!a||!a.id)return!1;const _=a.id.split(":"),$=_[1]==="decentraland",j=_[3]==="base-avatars";return _.length===5&&$&&j}baseItem$2.isBaseAvatar=isBaseAvatar$2;function isBaseEmote(a){if(!a||!a.id)return!1;const _=a.id.split(":");return _.length===5&&_[1]==="decentraland"&&_[3]==="base-emotes"}baseItem$2.isBaseEmote=isBaseEmote;(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Wearable=void 0;const _=validation$5,$=wearableCategory$2,j=representation$2,_e=baseItem$2,et=standardProps$2,tt=thirdPartyProps$2,rt=hideableCategory$2,at=linkedWearableMappings;(function(ct){ct.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},_e.baseItemProperties),et.standardProperties),tt.schema.properties.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:rt.HideableWearableCategory.schema},hides:{type:"array",items:rt.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:j.WearableRepresentation.schema,minItems:1},category:$.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:rt.HideableWearableCategory.schema},blockVrmExport:{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:[..._e.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content","mappings"]},{required:[..._e.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const dt={keyword:"_isThirdParty",validate:(bt,Et)=>!bt||(0,tt.isThirdParty)(Et),errors:!1},yt={keyword:"_isBaseAvatar",validate:(bt,Et)=>!bt||(0,_e.isBaseAvatar)(Et),errors:!1};ct.validate=(0,_.generateLazyValidator)(ct.schema,[dt,yt,at.RangeMapping._fromLessThanOrEqualTo,at.Mappings._isMappingsValid])})(a.Wearable||(a.Wearable={}))})(wearable$4);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.HideableWearableCategory=a.BodyPartCategory=a.WearableCategory=a.Wearable=a.WearableRepresentation=void 0;var _=representation$2;Object.defineProperty(a,"WearableRepresentation",{enumerable:!0,get:function(){return _.WearableRepresentation}});var $=wearable$4;Object.defineProperty(a,"Wearable",{enumerable:!0,get:function(){return $.Wearable}});var j=wearableCategory$2;Object.defineProperty(a,"WearableCategory",{enumerable:!0,get:function(){return j.WearableCategory}});var _e=bodyPartCategory$2;Object.defineProperty(a,"BodyPartCategory",{enumerable:!0,get:function(){return _e.BodyPartCategory}});var et=hideableCategory$2;Object.defineProperty(a,"HideableWearableCategory",{enumerable:!0,get:function(){return et.HideableWearableCategory}})})(wearable$5);var emote$5={},emote$4={},emoteDataAdr74$2={},emoteCategory$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.EmoteCategory=void 0;const _=validation$5;(function($){$.DANCE="dance",$.STUNT="stunt",$.GREETINGS="greetings",$.FUN="fun",$.POSES="poses",$.REACTIONS="reactions",$.HORROR="horror",$.MISCELLANEOUS="miscellaneous"})(a.EmoteCategory||(a.EmoteCategory={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.EmoteCategory||(a.EmoteCategory={}))})(emoteCategory$2);var representationAdr74$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.EmoteRepresentationADR74=void 0;const _=validation$5,$=bodyShape$2;(function(j){j.schema={type:"object",properties:{bodyShapes:{type:"array",items:$.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"]},j.validate=(0,_.generateLazyValidator)(j.schema)})(a.EmoteRepresentationADR74||(a.EmoteRepresentationADR74={}))})(representationAdr74$2);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.EmoteDataADR74=void 0;const _=emoteCategory$2,$=validation$5,j=representationAdr74$2;(function(_e){_e.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:j.EmoteRepresentationADR74.schema,minItems:1},category:_.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},_e.validate=(0,$.generateLazyValidator)(_e.schema)})(a.EmoteDataADR74||(a.EmoteDataADR74={}))})(emoteDataAdr74$2);var hasRequiredEmote$5;function requireEmote$5(){return hasRequiredEmote$5||(hasRequiredEmote$5=1,function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Emote=void 0;const _=requireItem$2(),$=validation$5,j=baseItem$2,_e=standardProps$2,et=thirdPartyProps$2,tt=emoteDataAdr74$2;(function(rt){rt.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},j.baseItemProperties),_e.standardProperties),et.schema.properties),{emoteDataADR74:tt.EmoteDataADR74.schema}),additionalProperties:!0,required:[...j.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 at={keyword:"_isThirdParty",validate:(dt,yt)=>!dt||(0,_.isThirdParty)(yt),errors:!1},ct={keyword:"_isBaseEmote",validate:(dt,yt)=>!dt||(0,j.isBaseEmote)(yt),errors:!1};rt.validate=(0,$.generateLazyValidator)(rt.schema,[at,ct,_.RangeMapping._fromLessThanOrEqualTo,_.Mappings._isMappingsValid])})(a.Emote||(a.Emote={}))}(emote$4)),emote$4}var emotePlayMode$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.EmotePlayMode=void 0;const _=validation$5;(function($){$.SIMPLE="simple",$.LOOP="loop"})(a.EmotePlayMode||(a.EmotePlayMode={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.EmotePlayMode||(a.EmotePlayMode={}))})(emotePlayMode$2);var hasRequiredEmote$4;function requireEmote$4(){return hasRequiredEmote$4||(hasRequiredEmote$4=1,function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.EmotePlayMode=a.EmoteCategory=a.EmoteDataADR74=a.EmoteRepresentationADR74=a.Emote=void 0;var _=requireEmote$5();Object.defineProperty(a,"Emote",{enumerable:!0,get:function(){return _.Emote}});var $=representationAdr74$2;Object.defineProperty(a,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return $.EmoteRepresentationADR74}});var j=emoteDataAdr74$2;Object.defineProperty(a,"EmoteDataADR74",{enumerable:!0,get:function(){return j.EmoteDataADR74}});var _e=emoteCategory$2;Object.defineProperty(a,"EmoteCategory",{enumerable:!0,get:function(){return _e.EmoteCategory}});var et=emotePlayMode$2;Object.defineProperty(a,"EmotePlayMode",{enumerable:!0,get:function(){return et.EmotePlayMode}})}(emote$5)),emote$5}var hasRequiredItem$2;function requireItem$2(){return hasRequiredItem$2||(hasRequiredItem$2=1,function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(ct,dt,yt,bt){bt===void 0&&(bt=yt);var Et=Object.getOwnPropertyDescriptor(dt,yt);(!Et||("get"in Et?!dt.__esModule:Et.writable||Et.configurable))&&(Et={enumerable:!0,get:function(){return dt[yt]}}),Object.defineProperty(ct,bt,Et)}:function(ct,dt,yt,bt){bt===void 0&&(bt=yt),ct[bt]=dt[yt]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(ct,dt){for(var yt in ct)yt!=="default"&&!Object.prototype.hasOwnProperty.call(dt,yt)&&_(dt,ct,yt)};Object.defineProperty(a,"__esModule",{value:!0}),a.isThirdParty=a.isStandard=a.BodyShape=a.Metrics=a.Locale=a.I18N=void 0;var j=i18n$2;Object.defineProperty(a,"I18N",{enumerable:!0,get:function(){return j.I18N}});var _e=locale$3;Object.defineProperty(a,"Locale",{enumerable:!0,get:function(){return _e.Locale}});var et=metrics$2;Object.defineProperty(a,"Metrics",{enumerable:!0,get:function(){return et.Metrics}});var tt=bodyShape$2;Object.defineProperty(a,"BodyShape",{enumerable:!0,get:function(){return tt.BodyShape}});var rt=standardProps$2;Object.defineProperty(a,"isStandard",{enumerable:!0,get:function(){return rt.isStandard}});var at=thirdPartyProps$2;Object.defineProperty(a,"isThirdParty",{enumerable:!0,get:function(){return at.isThirdParty}}),$(linkedWearableMappings,a),$(wearable$5,a),$(requireEmote$4(),a)}(item$5)),item$5}var syncDeployments$2={},authChain$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.AuthChain=a.AuthLink=a.AuthLinkType=void 0;const _=validation$5;var $;(function(_e){_e.SIGNER="SIGNER",_e.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",_e.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",_e.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",_e.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})($=a.AuthLinkType||(a.AuthLinkType={}));var j;(function(_e){_e.schema={type:"object",properties:{type:{type:"string",enum:Object.values($)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:$.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},_e.validate=(0,_.generateLazyValidator)(_e.schema)})(j=a.AuthLink||(a.AuthLink={})),function(_e){_e.schema={type:"array",items:j.schema,minItems:1},_e.validate=(0,_.generateLazyValidator)(_e.schema)}(a.AuthChain||(a.AuthChain={}))})(authChain$2);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PointerChangesSyncDeployment=a.SnapshotSyncDeployment=void 0;const _=misc$2,$=authChain$2,j=validation$5;(function(_e){_e.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:$.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:_.IPFSv1.schema}},{properties:{entityId:_.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},_e.validate=(0,j.generateLazyValidator)(_e.schema)})(a.SnapshotSyncDeployment||(a.SnapshotSyncDeployment={})),function(_e){_e.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:$.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:_.IPFSv1.schema}},{properties:{entityId:_.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},_e.validate=(0,j.generateLazyValidator)(_e.schema)}(a.PointerChangesSyncDeployment||(a.PointerChangesSyncDeployment={}))})(syncDeployments$2);var entity$2={},contentMapping$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.ContentMapping=void 0;const _=misc$2,$=validation$5;(function(j){j.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[_.IPFSv1.schema,_.IPFSv2.schema]}},required:["file","hash"]},j.validate=(0,$.generateLazyValidator)(j.schema)})(a.ContentMapping||(a.ContentMapping={}))})(contentMapping$2);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Entity=a.EntityType=void 0;const _=misc$2,$=contentMapping$2,j=validation$5;(function(_e){_e.SCENE="scene",_e.PROFILE="profile",_e.WEARABLE="wearable",_e.STORE="store",_e.EMOTE="emote",_e.OUTFITS="outfits"})(a.EntityType||(a.EntityType={})),function(_e){_e.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[_.IPFSv1.schema,_.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:$.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},_e.validate=(0,j.generateLazyValidator)(_e.schema)}(a.Entity||(a.Entity={}))})(entity$2);var deploymentWithAuthChain$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.DeploymentWithAuthChain=void 0;const _=authChain$2,$=validation$5;(function(j){j.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:_.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},j.validate=(0,$.generateLazyValidator)(j.schema)})(a.DeploymentWithAuthChain||(a.DeploymentWithAuthChain={}))})(deploymentWithAuthChain$2);var outfits$5={},outfits$4={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Outfits=a.Outfit=void 0;const _=wearableCategory$2,$=misc$2,j=validation$5;var _e;(function(et){et.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:$.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:$.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:$.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:_.WearableCategory.schema}},additionalProperties:!0},et.validate=(0,j.generateLazyValidator)(et.schema)})(_e=a.Outfit||(a.Outfit={})),function(et){et.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:_e.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},et.validate=(0,j.generateLazyValidator)(et.schema)}(a.Outfits||(a.Outfits={}))})(outfits$4);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(outfits$4,a)})(outfits$5);var notifications$1={},notifications={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.NotificationType=void 0,function(_){_.BADGE_GRANTED="badge_granted",_.BID_ACCEPTED="bid_accepted",_.BID_RECEIVED="bid_received",_.EVENTS_STARTED="events_started",_.EVENTS_STARTS_SOON="events_starts_soon",_.GOVERNANCE_ANNOUNCEMENT="governance_announcement",_.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",_.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",_.GOVERNANCE_CLIFF_ENDED="governance_cliff_ended",_.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",_.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",_.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",_.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",_.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",_.GOVERNANCE_TENDER_PASSED="governance_tender_passed",_.GOVERNANCE_WHALE_VOTE="governance_whale_vote",_.GOVERNANCE_VOTED_ON_BEHALF="governance_voted_on_behalf",_.ITEM_SOLD="item_sold",_.ITEM_PUBLISHED="item_published",_.LAND_RENTAL_ENDED="rental_ended",_.LAND_RENTED="rental_started",_.REWARD_ASSIGNED="reward_assignment",_.REWARD_CAMPAIGN_OUT_OF_FUNDS="reward_campaign_out_of_funds",_.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="reward_campaign_gas_price_higher_than_expected",_.REWARD_CAMPAIGN_OUT_OF_STOCK="reward_campaign_out_of_stock",_.REWARD_DELAYED="reward_delayed",_.REWARD_IN_PROGRESS="reward_in_progress",_.ROYALTIES_EARNED="royalties_earned",_.WORLDS_ACCESS_RESTORED="worlds_access_restored",_.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",_.WORLDS_MISSING_RESOURCES="worlds_missing_resources",_.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",_.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked"}(a.NotificationType||(a.NotificationType={}))})(notifications);var subscription={},subscriptionDetails={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.SubscriptionDetails=void 0;const _=validation$5,$=notifications,j={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},_e=Object.values($.NotificationType).reduce((et,tt)=>(et[tt]=j,et),{});(function(et){et.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($.NotificationType),additionalProperties:!1,properties:_e}}},et.validate=(0,_.generateLazyValidator)(et.schema)})(a.SubscriptionDetails||(a.SubscriptionDetails={}))})(subscriptionDetails);var email={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Email=void 0,function(_){_.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const $=new RegExp(_.schema.pattern);_.validate=j=>$.test(j)}(a.Email||(a.Email={}))})(email);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Subscription=void 0;const _=validation$5,$=subscriptionDetails,j=misc$2,_e=email;(function(et){et.schema={type:"object",required:["address","details"],properties:{address:j.EthAddress.schema,email:Object.assign(Object.assign({},_e.Email.schema),{nullable:!0}),details:$.SubscriptionDetails.schema}},et.validate=(0,_.generateLazyValidator)(et.schema)})(a.Subscription||(a.Subscription={}))})(subscription);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(notifications,a),$(subscription,a),$(subscriptionDetails,a)})(notifications$1);var events={},base$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Events=void 0,function(_){(function($){$.BLOCKCHAIN="blockchain",$.CATALYST_DEPLOYMENT="catalyst-deployment",$.CLIENT="client",$.MARKETPLACE="marketplace",$.REWARDS="rewards",$.BADGE="badge"})(_.Type||(_.Type={})),function($){(function(j){j.BID_ACCEPTED="bid-accepted",j.ITEM_SOLD="item-sold",j.RENTAL_ENDED="land-rental-ended",j.RENTAL_STARTED="land-rental-started",j.ROYALTIES_EARNED="royalties-earned",j.COLLECTION_CREATED="collection-created",j.ITEM_PUBLISHED="item-published"})($.Blockchain||($.Blockchain={})),function(j){j.BID_RECEIVED="bid-received"}($.Marketplace||($.Marketplace={})),function(j){j.SCENE="scene",j.PROFILE="profile",j.WEARABLE="wearable",j.STORE="store",j.EMOTE="emote",j.OUTFITS="outfits"}($.CatalystDeployment||($.CatalystDeployment={})),function(j){j.MOVE_TO_PARCEL="move-to-parcel",j.USED_EMOTE="used-emote",j.PASSPORT_OPENED="passport-opened",j.WALKED_DISTANCE="walked-distance",j.VERTICAL_HEIGHT_REACHED="vertical-height-reached"}($.Client||($.Client={})),function(j){j.REWARD_IN_PROGRESS="reward-in-progress",j.REWARD_ASSIGNED="reward-assigned",j.CAMPAIGN_OUT_OF_FUNDS="campaign-out-of-funds",j.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="campaign-gas-price-higher-than-expected",j.CAMPAIGN_OUT_OF_STOCK="campaign-out-of-stock",j.REWARD_DELAYED="reward-delayed"}($.Rewards||($.Rewards={})),function(j){j.GRANTED="badge-granted"}($.Badge||($.Badge={}))}(_.SubType||(_.SubType={}))}(a.Events||(a.Events={}))})(base$2);var blockchain={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.CollectionCreatedEvent=a.RoyaltiesEarnedEvent=a.RentalStartedEvent=a.RentalEndedEvent=a.ItemPublishedEvent=a.ItemSoldEvent=a.BidAcceptedEvent=void 0;const _=validation$5,$=base$2;(function(j){j.schema={type:"object",properties:{type:{type:"string",const:$.Events.Type.BLOCKCHAIN},subType:{type:"string",const:$.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},j.validate=(0,_.generateLazyValidator)(j.schema)})(a.BidAcceptedEvent||(a.BidAcceptedEvent={})),function(j){j.schema={type:"object",properties:{type:{type:"string",const:$.Events.Type.BLOCKCHAIN},subType:{type:"string",const:$.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},j.validate=(0,_.generateLazyValidator)(j.schema)}(a.ItemSoldEvent||(a.ItemSoldEvent={})),function(j){j.schema={type:"object",properties:{type:{type:"string",const:$.Events.Type.BLOCKCHAIN},subType:{type:"string",const:$.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},j.validate=(0,_.generateLazyValidator)(j.schema)}(a.ItemPublishedEvent||(a.ItemPublishedEvent={})),function(j){j.schema={type:"object",properties:{type:{type:"string",const:$.Events.Type.BLOCKCHAIN},subType:{type:"string",const:$.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},j.validate=(0,_.generateLazyValidator)(j.schema)}(a.RentalEndedEvent||(a.RentalEndedEvent={})),function(j){j.schema={type:"object",properties:{type:{type:"string",const:$.Events.Type.BLOCKCHAIN},subType:{type:"string",const:$.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},j.validate=(0,_.generateLazyValidator)(j.schema)}(a.RentalStartedEvent||(a.RentalStartedEvent={})),function(j){j.schema={type:"object",properties:{type:{type:"string",const:$.Events.Type.BLOCKCHAIN},subType:{type:"string",const:$.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},j.validate=(0,_.generateLazyValidator)(j.schema)}(a.RoyaltiesEarnedEvent||(a.RoyaltiesEarnedEvent={})),function(j){j.schema={type:"object",properties:{type:{type:"string",const:$.Events.Type.BLOCKCHAIN},subType:{type:"string",const:$.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},j.validate=(0,_.generateLazyValidator)(j.schema)}(a.CollectionCreatedEvent||(a.CollectionCreatedEvent={}))})(blockchain);var catalyst={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.CatalystDeploymentEvent=void 0;const _=authChain$2,$=validation$5,j=entity$2,_e=base$2;(function(et){et.schema={type:"object",properties:{type:{type:"string",const:_e.Events.Type.CATALYST_DEPLOYMENT},subType:{type:"string",enum:Object.values(_e.Events.SubType.CatalystDeployment)},key:{type:"string"},timestamp:{type:"number",minimum:1},entity:j.Entity.schema,authChain:_.AuthChain.schema},required:["type","subType","entity","authChain","key","timestamp"],additionalProperties:!1},et.validate=(0,$.generateLazyValidator)(et.schema)})(a.CatalystDeploymentEvent||(a.CatalystDeploymentEvent={}))})(catalyst);var client$1={};Object.defineProperty(client$1,"__esModule",{value:!0});var marketplace={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.BidReceivedEvent=void 0;const _=validation$5,$=base$2;(function(j){j.schema={type:"object",properties:{type:{type:"string",const:$.Events.Type.MARKETPLACE},subType:{type:"string",const:$.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},j.validate=(0,_.generateLazyValidator)(j.schema)})(a.BidReceivedEvent||(a.BidReceivedEvent={}))})(marketplace);var rewards={},utils$t={};Object.defineProperty(utils$t,"__esModule",{value:!0});utils$t.createEventSchema=void 0;function createEventSchema(a,_,$){return{type:"object",properties:{type:{type:"string",const:a},subType:{type:"string",const:_},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:$},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}}utils$t.createEventSchema=createEventSchema;(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.RewardDelayedEvent=a.CampaignOutOfStockEvent=a.CampaignGasPriceHigherThanExpectedEvent=a.CampaignOutOfFundsEvent=a.RewardAssignedEvent=a.RewardInProgressEvent=void 0;const _=validation$5,$=base$2,j=utils$t,_e={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},et={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(tt){tt.schema=(0,j.createEventSchema)($.Events.Type.REWARDS,$.Events.SubType.Rewards.REWARD_IN_PROGRESS,_e),tt.validate=(0,_.generateLazyValidator)(tt.schema)})(a.RewardInProgressEvent||(a.RewardInProgressEvent={})),function(tt){tt.schema=(0,j.createEventSchema)($.Events.Type.REWARDS,$.Events.SubType.Rewards.REWARD_ASSIGNED,_e),tt.validate=(0,_.generateLazyValidator)(tt.schema)}(a.RewardAssignedEvent||(a.RewardAssignedEvent={})),function(tt){tt.schema=(0,j.createEventSchema)($.Events.Type.REWARDS,$.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,et),tt.validate=(0,_.generateLazyValidator)(tt.schema)}(a.CampaignOutOfFundsEvent||(a.CampaignOutOfFundsEvent={})),function(tt){tt.schema=(0,j.createEventSchema)($.Events.Type.REWARDS,$.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,et),tt.validate=(0,_.generateLazyValidator)(tt.schema)}(a.CampaignGasPriceHigherThanExpectedEvent||(a.CampaignGasPriceHigherThanExpectedEvent={})),function(tt){tt.schema=(0,j.createEventSchema)($.Events.Type.REWARDS,$.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,et),tt.validate=(0,_.generateLazyValidator)(tt.schema)}(a.CampaignOutOfStockEvent||(a.CampaignOutOfStockEvent={})),function(tt){tt.schema=(0,j.createEventSchema)($.Events.Type.REWARDS,$.Events.SubType.Rewards.REWARD_DELAYED,_e),tt.validate=(0,_.generateLazyValidator)(tt.schema)}(a.RewardDelayedEvent||(a.RewardDelayedEvent={}))})(rewards);var services={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.BadgeGrantedEvent=void 0;const _=validation$5,$=base$2;(function(j){j.schema={type:"object",properties:{type:{type:"string",const:$.Events.Type.BADGE},subType:{type:"string",const:$.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},j.validate=(0,_.generateLazyValidator)(j.schema)})(a.BadgeGrantedEvent||(a.BadgeGrantedEvent={}))})(services);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(base$2,a),$(blockchain,a),$(catalyst,a),$(client$1,a),$(marketplace,a),$(rewards,a),$(services,a)})(events);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(profile$5,a),$(scene$5,a),$(requireItem$2(),a),$(displayable$2,a),$(merkleTree$2,a),$(syncDeployments$2,a),$(entity$2,a),$(deploymentWithAuthChain$2,a),$(outfits$5,a),$(notifications$1,a),$(events,a)})(platform$2);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.WearableJson=void 0;const _=rarity$2,$=wearableCategory$2,j=representation$2,_e=validation$5,et=platform$2;(function(tt){tt.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},_.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:$.WearableCategory.schema},hides:{type:"array",items:$.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:j.WearableRepresentation.schema,minItems:1},category:$.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:et.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},tt.validate=(0,_e.generateLazyValidator)(tt.schema)})(a.WearableJson||(a.WearableJson={}))})(wearableJson$2);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(type$2,a),$(wearableJson$2,a)})(project$2);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(ws$2,a),$(project$2,a)})(sdk$2);var dapps={},account$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Account=a.AccountSortBy=void 0;const _=validation$5;(function($){$.MOST_SALES="most_sales",$.MOST_PURCHASES="most_purchases",$.MOST_SPENT="most_spent",$.MOST_EARNED="most_earned",$.MOST_ROYALTIES="most_royalties",$.MOST_COLLECTIONS="most_collections"})(a.AccountSortBy||(a.AccountSortBy={})),function($){$.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"]},$.validate=(0,_.generateLazyValidator)($.schema)}(a.Account||(a.Account={}))})(account$2);var collection$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Collection=a.CollectionSortBy=void 0;const _=validation$5,$=requireChainId$2(),j=network$2;(function(_e){_e.NEWEST="newest",_e.NAME="name",_e.RECENTLY_REVIEWED="recently_reviewed",_e.RECENTLY_LISTED="recently_listed",_e.SIZE="size"})(a.CollectionSortBy||(a.CollectionSortBy={})),function(_e){_e.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:j.Network.schema,chainId:$.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},_e.validate=(0,_.generateLazyValidator)(_e.schema)}(a.Collection||(a.Collection={}))})(collection$2);var contract$2={},nftCategory$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.NFTCategory=void 0;const _=validation$5;(function($){$.PARCEL="parcel",$.ESTATE="estate",$.WEARABLE="wearable",$.ENS="ens",$.EMOTE="emote"})(a.NFTCategory||(a.NFTCategory={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.NFTCategory||(a.NFTCategory={}))})(nftCategory$2);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Contract=a.ContractSortBy=void 0;const _=validation$5,$=requireChainId$2(),j=network$2,_e=nftCategory$2;(function(et){et.NAME="name"})(a.ContractSortBy||(a.ContractSortBy={})),function(et){et.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:_e.NFTCategory.schema,network:j.Network.schema,chainId:$.ChainId.schema},required:["name","address","category","network","chainId"]},et.validate=(0,_.generateLazyValidator)(et.schema)}(a.Contract||(a.Contract={}))})(contract$2);var item$4={},nft$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.NFT=a.NFTSortBy=void 0;const _=validation$5,$=requireChainId$2(),j=platform$2,_e=network$2,et=nftCategory$2,tt=rarity$2,rt=wearableCategory$2;(function(at){at.NAME="name",at.NEWEST="newest",at.RECENTLY_LISTED="recently_listed",at.RECENTLY_SOLD="recently_sold",at.CHEAPEST="cheapest",at.RENTAL_LISTING_DATE="rental_listing_date",at.RENTAL_DATE="rented_date",at.MAX_RENTAL_PRICE="max_rental_price",at.MIN_RENTAL_PRICE="min_rental_price"})(a.NFTSortBy||(a.NFTSortBy={})),function(at){at.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:j.BodyShape.schema},category:rt.WearableCategory.schema,description:{type:"string"},rarity:tt.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:j.BodyShape.schema},category:j.EmoteCategory.schema,description:{type:"string"},rarity:tt.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:et.NFTCategory.schema,network:_e.Network.schema,chainId:$.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"]},at.validate=(0,_.generateLazyValidator)(at.schema)}(a.NFT||(a.NFT={}))})(nft$2);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Item=a.ItemSortBy=void 0;const _=validation$5,$=requireChainId$2(),j=network$2,_e=nft$2,et=nftCategory$2;(function(tt){tt.NAME="name",tt.NEWEST="newest",tt.RECENTLY_REVIEWED="recently_reviewed",tt.RECENTLY_SOLD="recently_sold",tt.RECENTLY_LISTED="recently_listed",tt.CHEAPEST="cheapest"})(a.ItemSortBy||(a.ItemSortBy={})),function(tt){tt.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:et.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:_e.NFT.schema.properties.data,network:j.Network.schema,chainId:$.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"]},tt.validate=(0,_.generateLazyValidator)(tt.schema)}(a.Item||(a.Item={}))})(item$4);var listingStatus$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.ListingStatus=void 0;const _=validation$5;(function($){$.OPEN="open",$.SOLD="sold",$.CANCELLED="cancelled"})(a.ListingStatus||(a.ListingStatus={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.ListingStatus||(a.ListingStatus={}))})(listingStatus$2);var metaTransactions$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.MetaTransaction=void 0;const _=validation$5;(function($){$.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},$.validate=(0,_.generateLazyValidator)($.schema)})(a.MetaTransaction||(a.MetaTransaction={}))})(metaTransactions$2);var mint$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Mint=a.MintSortBy=void 0;const _=validation$5,$=requireChainId$2(),j=network$2;(function(_e){_e.RECENTLY_MINTED="recently_minted",_e.MOST_EXPENSIVE="most_expensive"})(a.MintSortBy||(a.MintSortBy={})),function(_e){_e.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:j.Network.schema,chainId:$.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},_e.validate=(0,_.generateLazyValidator)(_e.schema)}(a.Mint||(a.Mint={}))})(mint$2);var catalog$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.CatalogSortDirection=a.CatalogSortBy=void 0,function(_){_.NEWEST="newest",_.RECENTLY_SOLD="recently_sold",_.CHEAPEST="cheapest",_.MOST_EXPENSIVE="most_expensive",_.RECENTLY_LISTED="recently_listed"}(a.CatalogSortBy||(a.CatalogSortBy={})),function(_){_.ASC="asc",_.DESC="desc"}(a.CatalogSortDirection||(a.CatalogSortDirection={}))})(catalog$2);var order$3={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Order=a.OrderSortBy=void 0;const _=validation$5,$=requireChainId$2(),j=listingStatus$2,_e=network$2;(function(et){et.RECENTLY_LISTED="recently_listed",et.RECENTLY_UPDATED="recently_updated",et.CHEAPEST="cheapest",et.ISSUED_ID_ASC="issued_id_asc",et.ISSUED_ID_DESC="issued_id_desc",et.OLDEST="oldest"})(a.OrderSortBy||(a.OrderSortBy={})),function(et){et.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:j.ListingStatus.schema,network:_e.Network.schema,chainId:$.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"]},et.validate=(0,_.generateLazyValidator)(et.schema)}(a.Order||(a.Order={}))})(order$3);var saleType$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.SaleType=void 0;const _=validation$5;(function($){$.ORDER="order",$.BID="bid",$.MINT="mint"})(a.SaleType||(a.SaleType={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.SaleType||(a.SaleType={}))})(saleType$2);var sale$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Sale=a.SaleSortBy=void 0;const _=validation$5,$=requireChainId$2(),j=saleType$2,_e=network$2;(function(et){et.RECENTLY_SOLD="recently_sold",et.MOST_EXPENSIVE="most_expensive"})(a.SaleSortBy||(a.SaleSortBy={})),function(et){et.schema={type:"object",properties:{id:{type:"string"},type:j.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:_e.Network.schema,chainId:$.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},et.validate=(0,_.generateLazyValidator)(et.schema)}(a.Sale||(a.Sale={}))})(sale$2);var rentalsListings$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.RentalListingCreation=a.PeriodCreation=a.RentalsListingsSortBy=a.RentalsListingsFilterByCategory=a.RentalsListingSortDirection=a.RentalStatus=void 0;const _=validation$5,$=requireChainId$2(),j=network$2;(function(et){et.OPEN="open",et.CANCELLED="cancelled",et.EXECUTED="executed",et.CLAIMED="claimed"})(a.RentalStatus||(a.RentalStatus={})),function(et){et.ASC="asc",et.DESC="desc"}(a.RentalsListingSortDirection||(a.RentalsListingSortDirection={})),function(et){et.PARCEL="parcel",et.ESTATE="estate"}(a.RentalsListingsFilterByCategory||(a.RentalsListingsFilterByCategory={})),function(et){et.LAND_CREATION_DATE="land_creation_date",et.RENTAL_LISTING_DATE="rental_listing_date",et.RENTAL_DATE="rented_date",et.NAME="name",et.MAX_RENTAL_PRICE="max_rental_price",et.MIN_RENTAL_PRICE="min_rental_price"}(a.RentalsListingsSortBy||(a.RentalsListingsSortBy={}));var _e;(function(et){et.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"]},et.validate=(0,_.generateLazyValidator)(et.schema)})(_e=a.PeriodCreation||(a.PeriodCreation={})),function(et){et.schema={type:"object",properties:{network:j.Network.schema,chainId:$.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:_e.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},et.validate=(0,_.generateLazyValidator)(et.schema)}(a.RentalListingCreation||(a.RentalListingCreation={}))})(rentalsListings$2);var analyticsDayData$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.AnalyticsDayDataSortBy=void 0,function(_){_.DATE="date",_.MOST_SALES="most_sales"}(a.AnalyticsDayDataSortBy||(a.AnalyticsDayDataSortBy={}))})(analyticsDayData$2);var store$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Store=void 0;const _=validation$5;(function($){$.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"]},$.validate=(0,_.generateLazyValidator)($.schema)})(a.Store||(a.Store={}))})(store$2);var wearableGender$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.GenderFilterOption=a.WearableGender=void 0;const _=validation$5;(function($){$.MALE="male",$.FEMALE="female"})(a.WearableGender||(a.WearableGender={})),function($){$.MALE="male",$.FEMALE="female",$.UNISEX="unisex"}(a.GenderFilterOption||(a.GenderFilterOption={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.WearableGender||(a.WearableGender={}))})(wearableGender$2);var world$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.World=a.isInsideWorldLimits=a.getWorld=void 0;const _=validation$5;function $(){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}]}}a.getWorld=$;function j(_e,et){const tt=$().validWorldRanges;for(const rt of tt)if(_e>=rt.xMin&&_e<=rt.xMax&&et>=rt.yMin&&et<=rt.yMax)return!0;return!1}a.isInsideWorldLimits=j,function(_e){_e.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},_e.validate=(0,_.generateLazyValidator)(_e.schema)}(a.World||(a.World={}))})(world$2);var bid$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Bid=a.BidSortBy=void 0;const _=validation$5,$=requireChainId$2(),j=listingStatus$2,_e=network$2;(function(et){et.RECENTLY_OFFERED="recently_offered",et.RECENTLY_UPDATED="recently_updated",et.MOST_EXPENSIVE="most_expensive"})(a.BidSortBy||(a.BidSortBy={})),function(et){const tt={type:"object",properties:{id:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:j.ListingStatus.schema,contractAddress:{type:"string"},network:_e.Network.schema,chainId:$.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidder","seller","price","fingerprint","status","contractAddress","network","chainId","expiresAt","createdAt","updatedAt"]};et.schema={type:"object",required:[],oneOf:[{properties:Object.assign(Object.assign({},tt.properties),{tradeId:{type:"string"},tokenId:{type:"string"}}),required:[...tt.required,"tradeId","tokenId"]},{type:"object",properties:Object.assign(Object.assign({},tt.properties),{tradeId:{type:"string"},itemId:{type:"string"}}),required:[...tt.required,"tradeId","itemId"]},{type:"object",properties:Object.assign(Object.assign({},tt.properties),{bidAddress:{type:"string"},blockchainId:{type:"string"},blockNumber:{type:"string"},tokenId:{type:"string"}}),required:[...tt.required,"bidAddress","blockchainId","blockNumber","tokenId"]}]},et.validate=(0,_.generateLazyValidator)(et.schema)}(a.Bid||(a.Bid={}))})(bid$2);var common$6={};Object.defineProperty(common$6,"__esModule",{value:!0});var trade={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.TradeAssetDirection=a.TradeAssetType=a.TradeType=void 0,function(_){_.BID="bid",_.PUBLIC_NFT_ORDER="public_nft_order",_.PUBLIC_ITEM_ORDER="public_item_order"}(a.TradeType||(a.TradeType={})),function(_){_[_.ERC20=1]="ERC20",_[_.USD_PEGGED_MANA=2]="USD_PEGGED_MANA",_[_.ERC721=3]="ERC721",_[_.COLLECTION_ITEM=4]="COLLECTION_ITEM"}(a.TradeAssetType||(a.TradeAssetType={})),function(_){_.SENT="sent",_.RECEIVED="received"}(a.TradeAssetDirection||(a.TradeAssetDirection={}))})(trade);var preview$3={},previewCamera$3={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PreviewCamera=void 0;const _=validation$5;(function($){$.STATIC="static",$.INTERACTIVE="interactive"})(a.PreviewCamera||(a.PreviewCamera={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.PreviewCamera||(a.PreviewCamera={}))})(previewCamera$3);var previewConfig$3={};Object.defineProperty(previewConfig$3,"__esModule",{value:!0});var previewController$3={};Object.defineProperty(previewController$3,"__esModule",{value:!0});var previewEmoteEventType$3={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PreviewEmoteEventType=void 0;const _=validation$5;(function($){$.ANIMATION_PLAY="animation_play",$.ANIMATION_PAUSE="animation_pause",$.ANIMATION_LOOP="animation_loop",$.ANIMATION_END="animation_end",$.ANIMATION_PLAYING="animation_playing"})(a.PreviewEmoteEventType||(a.PreviewEmoteEventType={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.PreviewEmoteEventType||(a.PreviewEmoteEventType={}))})(previewEmoteEventType$3);var previewEmote$3={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PreviewEmote=void 0;const _=validation$5;(function($){$.IDLE="idle",$.WALK="walk",$.RUN="run",$.JUMP="jump",$.CLAP="clap",$.DAB="dab",$.DANCE="dance",$.FASHION="fashion",$.FASHION_2="fashion-2",$.FASHION_3="fashion-3",$.FASHION_4="fashion-4",$.LOVE="love",$.MONEY="money",$.FIST_PUMP="fist-pump",$.HEAD_EXPLODE="head-explode",$.WAVE="wave"})(a.PreviewEmote||(a.PreviewEmote={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.PreviewEmote||(a.PreviewEmote={}))})(previewEmote$3);var previewMessage$3={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.sendMessage=a.PreviewMessageType=void 0;const _=validation$5;(function(j){j.READY="ready",j.LOAD="load",j.ERROR="error",j.UPDATE="update",j.CONTROLLER_REQUEST="controller_request",j.CONTROLLER_RESPONSE="controller_response",j.EMOTE_EVENT="emote_event"})(a.PreviewMessageType||(a.PreviewMessageType={})),function(j){j.schema={type:"string",enum:Object.values(j)},j.validate=(0,_.generateLazyValidator)(j.schema)}(a.PreviewMessageType||(a.PreviewMessageType={}));const $=(j,_e,et,tt="*")=>{const rt={type:_e,payload:et};j.postMessage(rt,tt)};a.sendMessage=$})(previewMessage$3);var previewOptions$3={};Object.defineProperty(previewOptions$3,"__esModule",{value:!0});var previewProjection$3={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PreviewProjection=void 0;const _=validation$5;(function($){$.ORTHOGRAPHIC="orthographic",$.PERSPECTIVE="perspective"})(a.PreviewProjection||(a.PreviewProjection={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.PreviewProjection||(a.PreviewProjection={}))})(previewProjection$3);var previewType$3={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PreviewType=void 0;const _=validation$5;(function($){$.TEXTURE="texture",$.WEARABLE="wearable",$.AVATAR="avatar"})(a.PreviewType||(a.PreviewType={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.PreviewType||(a.PreviewType={}))})(previewType$3);var wearableRepresentationDefinition$3={};Object.defineProperty(wearableRepresentationDefinition$3,"__esModule",{value:!0});var wearableRepresentationWithBlobs$3={};Object.defineProperty(wearableRepresentationWithBlobs$3,"__esModule",{value:!0});var wearableDefinition$3={};Object.defineProperty(wearableDefinition$3,"__esModule",{value:!0});var wearableWithBlobs$3={};Object.defineProperty(wearableWithBlobs$3,"__esModule",{value:!0});var emoteRepresentationDefinition$3={};Object.defineProperty(emoteRepresentationDefinition$3,"__esModule",{value:!0});var emoteRepresentationWithBlobs$3={};Object.defineProperty(emoteRepresentationWithBlobs$3,"__esModule",{value:!0});var emoteDefinition$3={};Object.defineProperty(emoteDefinition$3,"__esModule",{value:!0});var emoteWithBlobs$3={};Object.defineProperty(emoteWithBlobs$3,"__esModule",{value:!0});(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(previewCamera$3,a),$(previewConfig$3,a),$(previewController$3,a),$(previewEmoteEventType$3,a),$(previewEmote$3,a),$(previewMessage$3,a),$(previewOptions$3,a),$(previewProjection$3,a),$(previewType$3,a),$(wearableRepresentationDefinition$3,a),$(wearableRepresentationWithBlobs$3,a),$(wearableDefinition$3,a),$(wearableWithBlobs$3,a),$(emoteRepresentationDefinition$3,a),$(emoteRepresentationWithBlobs$3,a),$(emoteDefinition$3,a),$(emoteWithBlobs$3,a)})(preview$3);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(zt,vt,nt,st){st===void 0&&(st=nt);var lt=Object.getOwnPropertyDescriptor(vt,nt);(!lt||("get"in lt?!vt.__esModule:lt.writable||lt.configurable))&&(lt={enumerable:!0,get:function(){return vt[nt]}}),Object.defineProperty(zt,st,lt)}:function(zt,vt,nt,st){st===void 0&&(st=nt),zt[st]=vt[nt]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(zt,vt){for(var nt in zt)nt!=="default"&&!Object.prototype.hasOwnProperty.call(vt,nt)&&_(vt,zt,nt)};Object.defineProperty(a,"__esModule",{value:!0}),a.isInsideWorldLimits=a.getWorld=a.World=a.GenderFilterOption=a.WearableGender=a.Store=a.AnalyticsDayDataSortBy=a.PeriodCreation=a.RentalListingCreation=a.RentalsListingsSortBy=a.RentalsListingsFilterByCategory=a.RentalsListingSortDirection=a.RentalStatus=a.SaleSortBy=a.Sale=a.SaleType=a.Rarity=a.ProviderType=a.OrderSortBy=a.Order=a.CatalogSortDirection=a.CatalogSortBy=a.NFTSortBy=a.NFT=a.NFTCategory=a.Network=a.MintSortBy=a.Mint=a.MetaTransaction=a.ListingStatus=a.ItemSortBy=a.Item=a.ContractSortBy=a.Contract=a.CollectionSortBy=a.Collection=a.getChainId=a.ChainName=a.getURNProtocol=a.getChainName=a.ChainId=a.AccountSortBy=a.Account=void 0;var j=account$2;Object.defineProperty(a,"Account",{enumerable:!0,get:function(){return j.Account}}),Object.defineProperty(a,"AccountSortBy",{enumerable:!0,get:function(){return j.AccountSortBy}});var _e=requireChainId$2();Object.defineProperty(a,"ChainId",{enumerable:!0,get:function(){return _e.ChainId}}),Object.defineProperty(a,"getChainName",{enumerable:!0,get:function(){return _e.getChainName}}),Object.defineProperty(a,"getURNProtocol",{enumerable:!0,get:function(){return _e.getURNProtocol}});var et=requireChainName$2();Object.defineProperty(a,"ChainName",{enumerable:!0,get:function(){return et.ChainName}}),Object.defineProperty(a,"getChainId",{enumerable:!0,get:function(){return et.getChainId}});var tt=collection$2;Object.defineProperty(a,"Collection",{enumerable:!0,get:function(){return tt.Collection}}),Object.defineProperty(a,"CollectionSortBy",{enumerable:!0,get:function(){return tt.CollectionSortBy}});var rt=contract$2;Object.defineProperty(a,"Contract",{enumerable:!0,get:function(){return rt.Contract}}),Object.defineProperty(a,"ContractSortBy",{enumerable:!0,get:function(){return rt.ContractSortBy}});var at=item$4;Object.defineProperty(a,"Item",{enumerable:!0,get:function(){return at.Item}}),Object.defineProperty(a,"ItemSortBy",{enumerable:!0,get:function(){return at.ItemSortBy}});var ct=listingStatus$2;Object.defineProperty(a,"ListingStatus",{enumerable:!0,get:function(){return ct.ListingStatus}});var dt=metaTransactions$2;Object.defineProperty(a,"MetaTransaction",{enumerable:!0,get:function(){return dt.MetaTransaction}});var yt=mint$2;Object.defineProperty(a,"Mint",{enumerable:!0,get:function(){return yt.Mint}}),Object.defineProperty(a,"MintSortBy",{enumerable:!0,get:function(){return yt.MintSortBy}});var bt=network$2;Object.defineProperty(a,"Network",{enumerable:!0,get:function(){return bt.Network}});var Et=nftCategory$2;Object.defineProperty(a,"NFTCategory",{enumerable:!0,get:function(){return Et.NFTCategory}});var $t=nft$2;Object.defineProperty(a,"NFT",{enumerable:!0,get:function(){return $t.NFT}}),Object.defineProperty(a,"NFTSortBy",{enumerable:!0,get:function(){return $t.NFTSortBy}});var _t=catalog$2;Object.defineProperty(a,"CatalogSortBy",{enumerable:!0,get:function(){return _t.CatalogSortBy}}),Object.defineProperty(a,"CatalogSortDirection",{enumerable:!0,get:function(){return _t.CatalogSortDirection}});var xt=order$3;Object.defineProperty(a,"Order",{enumerable:!0,get:function(){return xt.Order}}),Object.defineProperty(a,"OrderSortBy",{enumerable:!0,get:function(){return xt.OrderSortBy}});var St=providerType$2;Object.defineProperty(a,"ProviderType",{enumerable:!0,get:function(){return St.ProviderType}});var Mt=rarity$2;Object.defineProperty(a,"Rarity",{enumerable:!0,get:function(){return Mt.Rarity}});var Tt=saleType$2;Object.defineProperty(a,"SaleType",{enumerable:!0,get:function(){return Tt.SaleType}});var Rt=sale$2;Object.defineProperty(a,"Sale",{enumerable:!0,get:function(){return Rt.Sale}}),Object.defineProperty(a,"SaleSortBy",{enumerable:!0,get:function(){return Rt.SaleSortBy}});var Ct=rentalsListings$2;Object.defineProperty(a,"RentalStatus",{enumerable:!0,get:function(){return Ct.RentalStatus}}),Object.defineProperty(a,"RentalsListingSortDirection",{enumerable:!0,get:function(){return Ct.RentalsListingSortDirection}}),Object.defineProperty(a,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return Ct.RentalsListingsFilterByCategory}}),Object.defineProperty(a,"RentalsListingsSortBy",{enumerable:!0,get:function(){return Ct.RentalsListingsSortBy}}),Object.defineProperty(a,"RentalListingCreation",{enumerable:!0,get:function(){return Ct.RentalListingCreation}}),Object.defineProperty(a,"PeriodCreation",{enumerable:!0,get:function(){return Ct.PeriodCreation}});var It=analyticsDayData$2;Object.defineProperty(a,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return It.AnalyticsDayDataSortBy}});var kt=store$2;Object.defineProperty(a,"Store",{enumerable:!0,get:function(){return kt.Store}});var Dt=wearableGender$2;Object.defineProperty(a,"WearableGender",{enumerable:!0,get:function(){return Dt.WearableGender}}),Object.defineProperty(a,"GenderFilterOption",{enumerable:!0,get:function(){return Dt.GenderFilterOption}});var Bt=world$2;Object.defineProperty(a,"World",{enumerable:!0,get:function(){return Bt.World}}),Object.defineProperty(a,"getWorld",{enumerable:!0,get:function(){return Bt.getWorld}}),Object.defineProperty(a,"isInsideWorldLimits",{enumerable:!0,get:function(){return Bt.isInsideWorldLimits}}),$(bid$2,a),$(common$6,a),$(trade,a),$(preview$3,a)})(dapps);var linkerAuthorization$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.LinkerAuthorization=void 0;const _=validation$5;(function($){$.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"]},$.validate=(0,_.generateLazyValidator)($.schema)})(a.LinkerAuthorization||(a.LinkerAuthorization={}))})(linkerAuthorization$2);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(tt,rt,at,ct){ct===void 0&&(ct=at);var dt=Object.getOwnPropertyDescriptor(rt,at);(!dt||("get"in dt?!rt.__esModule:dt.writable||dt.configurable))&&(dt={enumerable:!0,get:function(){return rt[at]}}),Object.defineProperty(tt,ct,dt)}:function(tt,rt,at,ct){ct===void 0&&(ct=at),tt[ct]=rt[at]}),$=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(tt,rt){Object.defineProperty(tt,"default",{enumerable:!0,value:rt})}:function(tt,rt){tt.default=rt}),j=commonjsGlobal&&commonjsGlobal.__importStar||function(tt){if(tt&&tt.__esModule)return tt;var rt={};if(tt!=null)for(var at in tt)at!=="default"&&Object.prototype.hasOwnProperty.call(tt,at)&&_(rt,tt,at);return $(rt,tt),rt},_e=commonjsGlobal&&commonjsGlobal.__exportStar||function(tt,rt){for(var at in tt)at!=="default"&&!Object.prototype.hasOwnProperty.call(rt,at)&&_(rt,tt,at)};Object.defineProperty(a,"__esModule",{value:!0}),a.sdk=void 0;const et=j(sdk$2);a.sdk=et,_e(validation$5,a),_e(dapps,a),_e(platform$2,a),_e(misc$2,a),_e(linkerAuthorization$2,a),_e(authChain$2,a),_e(contentMapping$2,a),_e(email,a)})(dist$8);const configuration=Object.freeze({storageKey:"decentraland-connect-storage-key",[providerType$2.ProviderType.INJECTED]:{},[providerType$2.ProviderType.FORTMATIC]:{apiKeys:{[chainIdExports.ChainId.ETHEREUM_MAINNET]:"pk_live_F8E24DF8DD5BCBC5",[chainIdExports.ChainId.ETHEREUM_SEPOLIA]:"pk_test_5B728BEFE5C10911"},urls:getRpcUrls(providerType$2.ProviderType.FORTMATIC)},[providerType$2.ProviderType.NETWORK]:{urls:getRpcUrls(providerType$2.ProviderType.NETWORK)},[providerType$2.ProviderType.WALLET_LINK]:{appName:"Decentraland",urls:getRpcUrls(providerType$2.ProviderType.WALLET_LINK)},[providerType$2.ProviderType.WALLET_CONNECT_V2]:{projectId:"61570c542c2d66c659492e5b24a41522",urls:getRpcUrls(providerType$2.ProviderType.WALLET_CONNECT_V2),chains:{[chainIdExports.ChainId.ETHEREUM_MAINNET]:{chains:[chainIdExports.ChainId.ETHEREUM_MAINNET],optionalChains:[chainIdExports.ChainId.MATIC_MAINNET,chainIdExports.ChainId.ARBITRUM_MAINNET,chainIdExports.ChainId.OPTIMISM_MAINNET,chainIdExports.ChainId.AVALANCHE_MAINNET,chainIdExports.ChainId.BSC_MAINNET,chainIdExports.ChainId.FANTOM_MAINNET]},[chainIdExports.ChainId.ETHEREUM_SEPOLIA]:{chains:[chainIdExports.ChainId.ETHEREUM_SEPOLIA],optionalChains:[chainIdExports.ChainId.MATIC_AMOY]}}},[providerType$2.ProviderType.MAGIC]:{apiKey:"pk_live_212568025B158355",urls:getRpcUrls(providerType$2.ProviderType.MAGIC),chains:[chainIdExports.ChainId.ETHEREUM_MAINNET,chainIdExports.ChainId.ETHEREUM_SEPOLIA,chainIdExports.ChainId.MATIC_MAINNET,chainIdExports.ChainId.MATIC_AMOY,chainIdExports.ChainId.OPTIMISM_MAINNET,chainIdExports.ChainId.ARBITRUM_MAINNET,chainIdExports.ChainId.AVALANCHE_MAINNET,chainIdExports.ChainId.BSC_MAINNET,chainIdExports.ChainId.FANTOM_MAINNET]},[providerType$2.ProviderType.MAGIC_TEST]:{apiKey:"pk_live_CE856A4938B36648",urls:getRpcUrls(providerType$2.ProviderType.MAGIC),chains:[chainIdExports.ChainId.ETHEREUM_MAINNET,chainIdExports.ChainId.ETHEREUM_SEPOLIA,chainIdExports.ChainId.MATIC_MAINNET,chainIdExports.ChainId.MATIC_AMOY,chainIdExports.ChainId.OPTIMISM_MAINNET,chainIdExports.ChainId.ARBITRUM_MAINNET,chainIdExports.ChainId.AVALANCHE_MAINNET,chainIdExports.ChainId.BSC_MAINNET,chainIdExports.ChainId.FANTOM_MAINNET]}});function getConfiguration(){return configuration}function getRpcUrls(a){const _={[chainIdExports.ChainId.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet",[chainIdExports.ChainId.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia",[chainIdExports.ChainId.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon",[chainIdExports.ChainId.MATIC_AMOY]:"https://rpc.decentraland.org/amoy",[chainIdExports.ChainId.ARBITRUM_MAINNET]:"https://rpc.decentraland.org/arbitrum",[chainIdExports.ChainId.OPTIMISM_MAINNET]:"https://rpc.decentraland.org/optimism",[chainIdExports.ChainId.AVALANCHE_MAINNET]:"https://rpc.decentraland.org/avalanche",[chainIdExports.ChainId.BSC_MAINNET]:"https://rpc.decentraland.org/binance",[chainIdExports.ChainId.FANTOM_MAINNET]:"https://rpc.decentraland.org/fantom"};let $="";switch(a){case providerType$2.ProviderType.WALLET_LINK:$="walletlink";break;case providerType$2.ProviderType.FORTMATIC:$="fortmatic";break;case providerType$2.ProviderType.MAGIC:$="magic";break;case providerType$2.ProviderType.MAGIC_TEST:$="magic";break;case providerType$2.ProviderType.WALLET_CONNECT_V2:$="walletconnect-v2";break;case providerType$2.ProviderType.AUTH_SERVER:$="auth-server";break}if($)for(const j in _)_[j]+=`?project=${$}`;return _}class FortmaticConnector extends AbstractConnector{constructor(_){const $=getConfiguration()[dist$8.ProviderType.FORTMATIC],j=Object.keys($.apiKeys).map(_e=>Number(_e));if(!j.includes(_))throw new Error(`Invariant error: Unsupported chainId ${_}`);super({supportedChainIds:j}),this.apiKey=$.apiKeys[_],this.chainId=_,this.rpcUrl=$.urls[_]}async activate(){if(!this.fortmatic){const{default:$}=await __vitePreload(()=>import("./fortmatic-4e836c9b.js").then(j=>j.f),[]);this.fortmatic=new $(this.apiKey,{rpcUrl:this.rpcUrl,chainId:this.chainId})}const _=await this.fortmatic.getProvider().enable().then($=>$[0]);return{provider:this.fortmatic.getProvider(),chainId:this.chainId,account:_}}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(_=>_[0])}deactivate(){}close(){return this.fortmatic.user.logout()}}function warning$2(a,_){}function _extends$4(){return _extends$4=Object.assign||function(a){for(var _=1;_<arguments.length;_++){var $=arguments[_];for(var j in $)Object.prototype.hasOwnProperty.call($,j)&&(a[j]=$[j])}return a},_extends$4.apply(this,arguments)}function _inheritsLoose$4(a,_){a.prototype=Object.create(_.prototype),a.prototype.constructor=a,a.__proto__=_}function _getPrototypeOf$x(a){return _getPrototypeOf$x=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$x(a)}function _setPrototypeOf$z(a,_){return _setPrototypeOf$z=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$z(a,_)}function isNativeReflectConstruct(){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 _construct$1(a,_,$){return isNativeReflectConstruct()?_construct$1=Reflect.construct:_construct$1=function(_e,et,tt){var rt=[null];rt.push.apply(rt,et);var at=Function.bind.apply(_e,rt),ct=new at;return tt&&_setPrototypeOf$z(ct,tt.prototype),ct},_construct$1.apply(null,arguments)}function _isNativeFunction$1(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function _wrapNativeSuper$1(a){var _=typeof Map=="function"?new Map:void 0;return _wrapNativeSuper$1=function(j){if(j===null||!_isNativeFunction$1(j))return j;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(typeof _<"u"){if(_.has(j))return _.get(j);_.set(j,_e)}function _e(){return _construct$1(j,arguments,_getPrototypeOf$x(this).constructor)}return _e.prototype=Object.create(j.prototype,{constructor:{value:_e,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf$z(_e,j)},_wrapNativeSuper$1(a)}function _assertThisInitialized$y(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")));typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));function _catch(a,_){try{var $=a()}catch(j){return _(j)}return $&&$.then?$.then(void 0,_):$}function parseSendReturn(a){return a.hasOwnProperty("result")?a.result:a}var NoEthereumProviderError=function(a){_inheritsLoose$4(_,a);function _(){var $;return $=a.call(this)||this,$.name=$.constructor.name,$.message="No Ethereum provider was found on window.ethereum.",$}return _}(_wrapNativeSuper$1(Error)),UserRejectedRequestError=function(a){_inheritsLoose$4(_,a);function _(){var $;return $=a.call(this)||this,$.name=$.constructor.name,$.message="The user rejected the request.",$}return _}(_wrapNativeSuper$1(Error)),InjectedConnector$1=function(a){_inheritsLoose$4(_,a);function _(j){var _e;return _e=a.call(this,j)||this,_e.handleNetworkChanged=_e.handleNetworkChanged.bind(_assertThisInitialized$y(_e)),_e.handleChainChanged=_e.handleChainChanged.bind(_assertThisInitialized$y(_e)),_e.handleAccountsChanged=_e.handleAccountsChanged.bind(_assertThisInitialized$y(_e)),_e.handleClose=_e.handleClose.bind(_assertThisInitialized$y(_e)),_e}var $=_.prototype;return $.handleChainChanged=function(_e){this.emitUpdate({chainId:_e,provider:window.ethereum})},$.handleAccountsChanged=function(_e){_e.length===0?this.emitDeactivate():this.emitUpdate({account:_e[0]})},$.handleClose=function(_e,et){this.emitDeactivate()},$.handleNetworkChanged=function(_e){this.emitUpdate({chainId:_e,provider:window.ethereum})},$.activate=function(){try{var _e=function(dt){if(et)return dt;function yt(){return _extends$4({provider:window.ethereum},rt?{account:rt}:{})}var bt=function(){if(!rt)return Promise.resolve(window.ethereum.enable().then(function(Et){return Et&&parseSendReturn(Et)[0]})).then(function(Et){rt=Et})}();return bt&&bt.then?bt.then(yt):yt(bt)},et=!1,tt=this;if(!window.ethereum)throw new NoEthereumProviderError;window.ethereum.on&&(window.ethereum.on("chainChanged",tt.handleChainChanged),window.ethereum.on("accountsChanged",tt.handleAccountsChanged),window.ethereum.on("close",tt.handleClose),window.ethereum.on("networkChanged",tt.handleNetworkChanged)),window.ethereum.isMetaMask&&(window.ethereum.autoRefreshOnNetworkChange=!1);var rt,at=_catch(function(){return Promise.resolve(window.ethereum.send("eth_requestAccounts").then(function(ct){return parseSendReturn(ct)[0]})).then(function(ct){rt=ct})},function(ct){if(ct.code===4001)throw new UserRejectedRequestError});return Promise.resolve(at&&at.then?at.then(_e):_e(at))}catch(ct){return Promise.reject(ct)}},$.getProvider=function(){try{return Promise.resolve(window.ethereum)}catch(_e){return Promise.reject(_e)}},$.getChainId=function(){try{var _e=function(){function at(){if(!et)try{et=parseSendReturn(window.ethereum.send({method:"net_version"}))}catch{}return et||(window.ethereum.isDapper?et=parseSendReturn(window.ethereum.cachedResults.net_version):et=window.ethereum.chainId||window.ethereum.netVersion||window.ethereum.networkVersion||window.ethereum._chainId),et}var ct=function(){if(!et){var dt=_catch(function(){return Promise.resolve(window.ethereum.send("net_version").then(parseSendReturn)).then(function(yt){et=yt})},function(){});if(dt&&dt.then)return dt.then(function(){})}}();return ct&&ct.then?ct.then(at):at(ct)};if(!window.ethereum)throw new NoEthereumProviderError;var et,tt=_catch(function(){return Promise.resolve(window.ethereum.send("eth_chainId").then(parseSendReturn)).then(function(rt){et=rt})},function(){});return Promise.resolve(tt&&tt.then?tt.then(_e):_e(tt))}catch(rt){return Promise.reject(rt)}},$.getAccount=function(){try{var _e=function(){function at(){return et||(et=parseSendReturn(window.ethereum.send({method:"eth_accounts"}))[0]),et}var ct=function(){if(!et){var dt=_catch(function(){return Promise.resolve(window.ethereum.enable().then(function(yt){return parseSendReturn(yt)[0]})).then(function(yt){et=yt})},function(){});if(dt&&dt.then)return dt.then(function(){})}}();return ct&&ct.then?ct.then(at):at(ct)};if(!window.ethereum)throw new NoEthereumProviderError;var et,tt=_catch(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(rt){return parseSendReturn(rt)[0]})).then(function(rt){et=rt})},function(){});return Promise.resolve(tt&&tt.then?tt.then(_e):_e(tt))}catch(rt){return Promise.reject(rt)}},$.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))},$.isAuthorized=function(){try{return window.ethereum?Promise.resolve(_catch(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(_e){return parseSendReturn(_e).length>0}))},function(){return!1})):Promise.resolve(!1)}catch(_e){return Promise.reject(_e)}},_}(AbstractConnector);class ErrorUnlockingWallet 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 UNLOCK_WALLET_TIMEOUT=60*1e3;class InjectedConnector extends InjectedConnector$1{constructor(_){super({supportedChainIds:[_]})}async activate(){const _=new Promise((j,_e)=>{setTimeout(()=>{_e(new ErrorUnlockingWallet)},UNLOCK_WALLET_TIMEOUT)}),$=super.activate();return Promise.race([$,_])}}var prefix="Invariant failed";function invariant(a,_){if(!a)throw new Error(prefix)}function _inheritsLoose$3(a,_){a.prototype=Object.create(_.prototype),a.prototype.constructor=a,_setPrototypeOf$y(a,_)}function _getPrototypeOf$w(a){return _getPrototypeOf$w=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$w(a)}function _setPrototypeOf$y(a,_){return _setPrototypeOf$y=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$y(a,_)}function _isNativeReflectConstruct$w(){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 _construct(a,_,$){return _isNativeReflectConstruct$w()?_construct=Reflect.construct:_construct=function(_e,et,tt){var rt=[null];rt.push.apply(rt,et);var at=Function.bind.apply(_e,rt),ct=new at;return tt&&_setPrototypeOf$y(ct,tt.prototype),ct},_construct.apply(null,arguments)}function _isNativeFunction(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function _wrapNativeSuper(a){var _=typeof Map=="function"?new Map:void 0;return _wrapNativeSuper=function(j){if(j===null||!_isNativeFunction(j))return j;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(typeof _<"u"){if(_.has(j))return _.get(j);_.set(j,_e)}function _e(){return _construct(j,arguments,_getPrototypeOf$w(this).constructor)}return _e.prototype=Object.create(j.prototype,{constructor:{value:_e,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf$y(_e,j)},_wrapNativeSuper(a)}var RequestError=function(a){_inheritsLoose$3(_,a);function _($,j,_e){var et;return et=a.call(this)||this,et.code=j,et.data=_e,et.name=et.constructor.name,et.message=$,et}return _}(_wrapNativeSuper(Error)),MiniRpcProvider=function(_,$){var j=this,_e=this;this.isMetaMask=!1,this.sendAsync=function(tt,rt){console.log("sendAsync",tt.method,tt.params),_e.request(tt.method,tt.params).then(function(at){return rt(null,{jsonrpc:"2.0",id:tt.id,result:at})}).catch(function(at){return rt(at,null)})},this.request=function(tt,rt){try{return typeof tt!="string"&&(rt=tt.params,tt=tt.method),Promise.resolve(fetch(j.url,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:1,method:tt,params:rt}),headers:{"Content-Type":"application/json"}})).then(function(at){if(!at.ok)throw new RequestError(at.status+": "+at.statusText,-32e3);return Promise.resolve(at.json()).then(function(ct){if("error"in ct){var dt,yt,bt;throw new RequestError(ct==null||(dt=ct.error)==null?void 0:dt.message,ct==null||(yt=ct.error)==null?void 0:yt.code,ct==null||(bt=ct.error)==null?void 0:bt.data)}else{if("result"in ct)return ct.result;throw new RequestError("Received unexpected JSON-RPC response to "+tt+" request.",-32e3,ct)}})})}catch(at){return Promise.reject(at)}},this.chainId=_,this.url=$;var et=new URL($);this.host=et.host,this.path=et.pathname},NetworkConnector$1=function(a){_inheritsLoose$3(_,a);function _(j){var _e,et=j.urls,tt=j.defaultChainId;return tt||Object.keys(et).length===1||invariant(!1),_e=a.call(this,{supportedChainIds:Object.keys(et).map(function(rt){return Number(rt)})})||this,_e.currentChainId=tt||Number(Object.keys(et)[0]),_e.providers=Object.keys(et).reduce(function(rt,at){return rt[Number(at)]=new MiniRpcProvider(Number(at),et[Number(at)]),rt},{}),_e}var $=_.prototype;return $.activate=function(){try{var _e=this;return Promise.resolve({provider:_e.providers[_e.currentChainId],chainId:_e.currentChainId,account:null})}catch(et){return Promise.reject(et)}},$.getProvider=function(){try{var _e=this;return Promise.resolve(_e.providers[_e.currentChainId])}catch(et){return Promise.reject(et)}},$.getChainId=function(){try{var _e=this;return Promise.resolve(_e.currentChainId)}catch(et){return Promise.reject(et)}},$.getAccount=function(){return Promise.resolve(null)},$.deactivate=function(){},$.changeChainId=function(_e){Object.keys(this.providers).includes(_e.toString())||invariant(!1),this.currentChainId=_e,this.emitUpdate({provider:this.providers[this.currentChainId],chainId:_e})},_}(AbstractConnector);class NetworkConnector extends NetworkConnector$1{constructor(_){super({urls:getConfiguration()[providerType$2.ProviderType.NETWORK].urls,defaultChainId:_})}}function _extends$3(){return _extends$3=Object.assign||function(a){for(var _=1;_<arguments.length;_++){var $=arguments[_];for(var j in $)Object.prototype.hasOwnProperty.call($,j)&&(a[j]=$[j])}return a},_extends$3.apply(this,arguments)}function _inheritsLoose$2(a,_){a.prototype=Object.create(_.prototype),a.prototype.constructor=a,_setPrototypeOf$x(a,_)}function _setPrototypeOf$x(a,_){return _setPrototypeOf$x=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$x(a,_)}function _assertThisInitialized$x(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}var CHAIN_ID=1,WalletLinkConnector$1=function(a){_inheritsLoose$2(_,a);function _(j){var _e,et=j.url,tt=j.appName,rt=j.appLogoUrl,at=j.darkMode,ct=j.supportedChainIds;return _e=a.call(this,{supportedChainIds:ct})||this,_e.url=et,_e.appName=tt,_e.appLogoUrl=rt,_e.darkMode=at||!1,_e.handleChainChanged=_e.handleChainChanged.bind(_assertThisInitialized$x(_e)),_e.handleAccountsChanged=_e.handleAccountsChanged.bind(_assertThisInitialized$x(_e)),_e}var $=_.prototype;return $.activate=function(){try{var _e=this,et=function(){return Promise.resolve(_e.provider.request({method:"eth_requestAccounts"})).then(function(at){var ct=at[0];return _e.provider.on("chainChanged",_e.handleChainChanged),_e.provider.on("accountsChanged",_e.handleAccountsChanged),{provider:_e.provider,account:ct}})},tt=function(){if(window.ethereum&&window.ethereum.isCoinbaseWallet===!0)_e.provider=window.ethereum;else{var rt=function(){if(!_e.walletLink)return Promise.resolve(__vitePreload(()=>import("./index-72063309.js").then(at=>at.i),["assets/index-72063309.js","assets/tslib.es6-c2094241.js"]).then(function(at){var ct;return(ct=at==null?void 0:at.default)!=null?ct:at})).then(function(at){_e.walletLink=new at(_extends$3({appName:_e.appName,darkMode:_e.darkMode},_e.appLogoUrl?{appLogoUrl:_e.appLogoUrl}:{})),_e.provider=_e.walletLink.makeWeb3Provider(_e.url,CHAIN_ID)})}();if(rt&&rt.then)return rt.then(function(){})}}();return Promise.resolve(tt&&tt.then?tt.then(et):et(tt))}catch(rt){return Promise.reject(rt)}},$.getProvider=function(){try{var _e=this;return Promise.resolve(_e.provider)}catch(et){return Promise.reject(et)}},$.getChainId=function(){try{var _e=this;return Promise.resolve(_e.provider.chainId)}catch(et){return Promise.reject(et)}},$.getAccount=function(){try{var _e=this;return Promise.resolve(_e.provider.request({method:"eth_requestAccounts"})).then(function(et){return et[0]})}catch(et){return Promise.reject(et)}},$.deactivate=function(){this.provider.removeListener("chainChanged",this.handleChainChanged),this.provider.removeListener("accountsChanged",this.handleAccountsChanged)},$.close=function(){try{var _e=this;return _e.provider.close(),_e.emitDeactivate(),Promise.resolve()}catch(et){return Promise.reject(et)}},$.handleChainChanged=function(_e){this.emitUpdate({chainId:_e})},$.handleAccountsChanged=function(_e){this.emitUpdate({account:_e[0]})},_}(AbstractConnector);class WalletLinkConnector extends WalletLinkConnector$1{constructor(_){const $=getConfiguration()[dist$8.ProviderType.WALLET_LINK];super({url:$.urls[_],appName:$.appName,supportedChainIds:[_]})}}class WalletConnectV2Connector extends AbstractConnector{constructor(_){super({supportedChainIds:(()=>{const{chains:$,optionalChains:j}=WalletConnectV2Connector.configuration.chains[_];return[...$,...j]})()}),this.desiredChainId=_,this.activate=async()=>{const $=await __vitePreload(()=>import("./index.es-ea74b66d.js"),["assets/index.es-ea74b66d.js","assets/tslib.es6-c2094241.js"]).then(_e=>{const{chains:et,optionalChains:tt}=WalletConnectV2Connector.configuration.chains[this.desiredChainId];return _e.default.init({projectId:WalletConnectV2Connector.configuration.projectId,rpcMap:WalletConnectV2Connector.configuration.urls,chains:et,optionalChains:tt,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"]})}),j=await $.enable();return $.on("accountsChanged",this.handleAccountsChanged),$.on("chainChanged",this.handleChainChanged),$.on("disconnect",this.handleDisconnect),this.provider=$,{chainId:$.chainId,account:j[0],provider:$}},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=()=>{var $,j;return(j=($=this.provider)==null?void 0:$.session)==null?void 0:j.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=$=>{this.emitUpdate({account:$[0]})},this.handleChainChanged=$=>{this.emitUpdate({chainId:$})},this.handleDisconnect=()=>{if(!this.provider)throw new Error("Provider is undefined");return this.emitDeactivate()}}}WalletConnectV2Connector.configuration=getConfiguration()[dist$8.ProviderType.WALLET_CONNECT_V2];WalletConnectV2Connector.clearStorage=a=>{a.removeRegExp(new RegExp("^wc@2:"))};class MagicConnector extends AbstractConnector{constructor(_,$=!1){super({supportedChainIds:getConfiguration()[dist$8.ProviderType.MAGIC].chains}),this.isTest=$,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 _e=await this.getProvider(),et=await _e.request({method:"eth_accounts"});return this.account=et[0]??null,{provider:_e,chainId:this.chainId,account:this.account}},this.getProvider=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");const j=await this.magic.wallet.getProvider();return{...j,request:new Proxy(j.request,{apply:async(_e,et,tt)=>{var rt,at,ct;if(((rt=tt[0])==null?void 0:rt.method)==="wallet_switchEthereumChain")try{const dt=parseInt((ct=(at=tt[0])==null?void 0:at.params[0])==null?void 0:ct.chainId,16);return this.supportedChainIds&&!this.supportedChainIds.includes(dt)?{code:2020202,message:"Unsupported Magic ChainId"}:(this.magic=await this.buildMagicInstance(dt),this.emitUpdate({chainId:dt}),null)}catch{return{code:2020201,message:"Error changing the Magic ChainId"}}return _e.bind(j)(...tt)}}),sendAsync:new Proxy(j.send,{apply:async(_e,et,tt)=>_e.bind(j)(...tt)})}},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 j=>{const{Magic:_e}=await __vitePreload(()=>import("./index-34c625fd.js"),["assets/index-34c625fd.js","assets/index-7fb3637e.js"]),{OAuthExtension:et}=await __vitePreload(()=>import("./index-604dcebc.js"),["assets/index-604dcebc.js","assets/index-7fb3637e.js"]),tt=getConfiguration()[this.isTest?dist$8.ProviderType.MAGIC_TEST:dist$8.ProviderType.MAGIC];return new _e(tt.apiKey,{extensions:[new et],network:{rpcUrl:tt.urls[j],chainId:j}})},this.chainId=_,this.account=null}close(){if(!this.magic)throw new Error("Magic: instance was not initialized");return this.magic.user.logout()}}class MagicTestConnector extends MagicConnector{constructor(_){super(_,!0)}}var dist$7={},Authenticator={};function getDefaultExportFromCjs(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var browser$d={exports:{}},process=browser$d.exports={},cachedSetTimeout,cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?cachedSetTimeout=setTimeout:cachedSetTimeout=defaultSetTimout}catch{cachedSetTimeout=defaultSetTimout}try{typeof clearTimeout=="function"?cachedClearTimeout=clearTimeout:cachedClearTimeout=defaultClearTimeout}catch{cachedClearTimeout=defaultClearTimeout}})();function runTimeout(a){if(cachedSetTimeout===setTimeout)return setTimeout(a,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(a,0);try{return cachedSetTimeout(a,0)}catch{try{return cachedSetTimeout.call(null,a,0)}catch{return cachedSetTimeout.call(this,a,0)}}}function runClearTimeout(a){if(cachedClearTimeout===clearTimeout)return clearTimeout(a);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(a);try{return cachedClearTimeout(a)}catch{try{return cachedClearTimeout.call(null,a)}catch{return cachedClearTimeout.call(this,a)}}}var queue=[],draining=!1,currentQueue,queueIndex=-1;function cleanUpNextTick(){!draining||!currentQueue||(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var a=runTimeout(cleanUpNextTick);draining=!0;for(var _=queue.length;_;){for(currentQueue=queue,queue=[];++queueIndex<_;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,_=queue.length}currentQueue=null,draining=!1,runClearTimeout(a)}}process.nextTick=function(a){var _=new Array(arguments.length-1);if(arguments.length>1)for(var $=1;$<arguments.length;$++)_[$-1]=arguments[$];queue.push(new Item(a,_)),queue.length===1&&!draining&&runTimeout(drainQueue)};function Item(a,_){this.fun=a,this.array=_}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=!0;process.env={};process.argv=[];process.version="";process.versions={};function noop$4(){}process.on=noop$4;process.addListener=noop$4;process.once=noop$4;process.off=noop$4;process.removeListener=noop$4;process.removeAllListeners=noop$4;process.emit=noop$4;process.prependListener=noop$4;process.prependOnceListener=noop$4;process.listeners=function(a){return[]};process.binding=function(a){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(a){throw new Error("process.chdir is not supported")};process.umask=function(){return 0};var browserExports$1=browser$d.exports;const process$1=getDefaultExportFromCjs(browserExports$1);var ethConnect={exports:{}};(function(a,_){(function($,j){j(_)})(commonjsGlobal,function($){function j(qt){if(qt.jsonrpc="2.0",!qt.id||typeof qt.id!="number"||Math.floor(qt.id)!==qt.id)throw new Error(`Invalid RPC message(invalid id) message: ${JSON.stringify(qt)}`);if(!qt.method||typeof qt.method!="string"||qt.method.trim().length===0)throw new Error(`Invalid RPC message(invalid method) message: ${JSON.stringify(qt)}`);if(!qt.params||typeof qt.params!="object")throw new Error(`Invalid RPC message(invalid params) message: ${JSON.stringify(qt)}`);return qt}var _e={};function et(){let qt,Gt;const nr=new Promise((xr,Tr)=>{qt=Lr=>{xr(Lr),nr.isPending=!1},Gt=Lr=>{Tr(Lr),nr.isPending=!1}}).catch(xr=>Promise.reject(xr));return nr.resolve=qt,nr.reject=Gt,"finally"in nr||(nr.finally=xr=>{nr.then(xr),nr.catch(xr)}),nr.isPending=!0,nr}Object.defineProperty(_e,"__esModule",{value:!0});var tt=_e.future=et;_e.default=et;var rt={exports:{}};/**
110
+ deps: ${dt}}`};const _e={keyword:"dependencies",type:"object",schemaType:"object",error:a.error,code(at){const[ct,dt]=et(at);tt(at,ct),rt(at,dt)}};function et({schema:at}){const ct={},dt={};for(const yt in at){if(yt==="__proto__")continue;const bt=Array.isArray(at[yt])?ct:dt;bt[yt]=at[yt]}return[ct,dt]}function tt(at,ct=at.schema){const{gen:dt,data:yt,it:bt}=at;if(Object.keys(ct).length===0)return;const Et=dt.let("missing");for(const $t in ct){const _t=ct[$t];if(_t.length===0)continue;const xt=(0,j.propertyInData)(dt,yt,$t,bt.opts.ownProperties);at.setParams({property:$t,depsCount:_t.length,deps:_t.join(", ")}),bt.allErrors?dt.if(xt,()=>{for(const St of _t)(0,j.checkReportMissingProp)(at,St)}):(dt.if((0,_._)`${xt} && (${(0,j.checkMissingProp)(at,_t,Et)})`),(0,j.reportMissingProp)(at,Et),dt.else())}}a.validatePropertyDeps=tt;function rt(at,ct=at.schema){const{gen:dt,data:yt,keyword:bt,it:Et}=at,$t=dt.name("valid");for(const _t in ct)(0,$.alwaysValidSchema)(Et,ct[_t])||(dt.if((0,j.propertyInData)(dt,yt,_t,Et.opts.ownProperties),()=>{const xt=at.subschema({keyword:bt,schemaProp:_t},$t);at.mergeValidEvaluated(xt,$t)},()=>dt.var($t,!0)),at.ok($t))}a.validateSchemaDeps=rt,a.default=_e})(dependencies$2);var propertyNames={};Object.defineProperty(propertyNames,"__esModule",{value:!0});const codegen_1$7=codegen,util_1$9=util$1,error$6={message:"property name must be valid",params:({params:a})=>(0,codegen_1$7._)`{propertyName: ${a.propertyName}}`},def$b={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:error$6,code(a){const{gen:_,schema:$,data:j,it:_e}=a;if((0,util_1$9.alwaysValidSchema)(_e,$))return;const et=_.name("valid");_.forIn("key",j,tt=>{a.setParams({propertyName:tt}),a.subschema({keyword:"propertyNames",data:tt,dataTypes:["string"],propertyName:tt,compositeRule:!0},et),_.if((0,codegen_1$7.not)(et),()=>{a.error(!0),_e.allErrors||_.break()})}),a.ok(et)}};propertyNames.default=def$b;var additionalProperties={};Object.defineProperty(additionalProperties,"__esModule",{value:!0});const code_1$3=code$1,codegen_1$6=codegen,names_1=names$1,util_1$8=util$1,error$5={message:"must NOT have additional properties",params:({params:a})=>(0,codegen_1$6._)`{additionalProperty: ${a.additionalProperty}}`},def$a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:error$5,code(a){const{gen:_,schema:$,parentSchema:j,data:_e,errsCount:et,it:tt}=a;if(!et)throw new Error("ajv implementation error");const{allErrors:rt,opts:at}=tt;if(tt.props=!0,at.removeAdditional!=="all"&&(0,util_1$8.alwaysValidSchema)(tt,$))return;const ct=(0,code_1$3.allSchemaProperties)(j.properties),dt=(0,code_1$3.allSchemaProperties)(j.patternProperties);yt(),a.ok((0,codegen_1$6._)`${et} === ${names_1.default.errors}`);function yt(){_.forIn("key",_e,xt=>{!ct.length&&!dt.length?$t(xt):_.if(bt(xt),()=>$t(xt))})}function bt(xt){let St;if(ct.length>8){const Mt=(0,util_1$8.schemaRefOrVal)(tt,j.properties,"properties");St=(0,code_1$3.isOwnProperty)(_,Mt,xt)}else ct.length?St=(0,codegen_1$6.or)(...ct.map(Mt=>(0,codegen_1$6._)`${xt} === ${Mt}`)):St=codegen_1$6.nil;return dt.length&&(St=(0,codegen_1$6.or)(St,...dt.map(Mt=>(0,codegen_1$6._)`${(0,code_1$3.usePattern)(a,Mt)}.test(${xt})`))),(0,codegen_1$6.not)(St)}function Et(xt){_.code((0,codegen_1$6._)`delete ${_e}[${xt}]`)}function $t(xt){if(at.removeAdditional==="all"||at.removeAdditional&&$===!1){Et(xt);return}if($===!1){a.setParams({additionalProperty:xt}),a.error(),rt||_.break();return}if(typeof $=="object"&&!(0,util_1$8.alwaysValidSchema)(tt,$)){const St=_.name("valid");at.removeAdditional==="failing"?(_t(xt,St,!1),_.if((0,codegen_1$6.not)(St),()=>{a.reset(),Et(xt)})):(_t(xt,St),rt||_.if((0,codegen_1$6.not)(St),()=>_.break()))}}function _t(xt,St,Mt){const Tt={keyword:"additionalProperties",dataProp:xt,dataPropType:util_1$8.Type.Str};Mt===!1&&Object.assign(Tt,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(Tt,St)}}};additionalProperties.default=def$a;var properties$1={};Object.defineProperty(properties$1,"__esModule",{value:!0});const validate_1=validate,code_1$2=code$1,util_1$7=util$1,additionalProperties_1$1=additionalProperties,def$9={keyword:"properties",type:"object",schemaType:"object",code(a){const{gen:_,schema:$,parentSchema:j,data:_e,it:et}=a;et.opts.removeAdditional==="all"&&j.additionalProperties===void 0&&additionalProperties_1$1.default.code(new validate_1.KeywordCxt(et,additionalProperties_1$1.default,"additionalProperties"));const tt=(0,code_1$2.allSchemaProperties)($);for(const yt of tt)et.definedProperties.add(yt);et.opts.unevaluated&&tt.length&&et.props!==!0&&(et.props=util_1$7.mergeEvaluated.props(_,(0,util_1$7.toHash)(tt),et.props));const rt=tt.filter(yt=>!(0,util_1$7.alwaysValidSchema)(et,$[yt]));if(rt.length===0)return;const at=_.name("valid");for(const yt of rt)ct(yt)?dt(yt):(_.if((0,code_1$2.propertyInData)(_,_e,yt,et.opts.ownProperties)),dt(yt),et.allErrors||_.else().var(at,!0),_.endIf()),a.it.definedProperties.add(yt),a.ok(at);function ct(yt){return et.opts.useDefaults&&!et.compositeRule&&$[yt].default!==void 0}function dt(yt){a.subschema({keyword:"properties",schemaProp:yt,dataProp:yt},at)}}};properties$1.default=def$9;var patternProperties={};Object.defineProperty(patternProperties,"__esModule",{value:!0});const code_1$1=code$1,codegen_1$5=codegen,util_1$6=util$1,util_2=util$1,def$8={keyword:"patternProperties",type:"object",schemaType:"object",code(a){const{gen:_,schema:$,data:j,parentSchema:_e,it:et}=a,{opts:tt}=et,rt=(0,code_1$1.allSchemaProperties)($),at=rt.filter(_t=>(0,util_1$6.alwaysValidSchema)(et,$[_t]));if(rt.length===0||at.length===rt.length&&(!et.opts.unevaluated||et.props===!0))return;const ct=tt.strictSchema&&!tt.allowMatchingProperties&&_e.properties,dt=_.name("valid");et.props!==!0&&!(et.props instanceof codegen_1$5.Name)&&(et.props=(0,util_2.evaluatedPropsToName)(_,et.props));const{props:yt}=et;bt();function bt(){for(const _t of rt)ct&&Et(_t),et.allErrors?$t(_t):(_.var(dt,!0),$t(_t),_.if(dt))}function Et(_t){for(const xt in ct)new RegExp(_t).test(xt)&&(0,util_1$6.checkStrictMode)(et,`property ${xt} matches pattern ${_t} (use allowMatchingProperties)`)}function $t(_t){_.forIn("key",j,xt=>{_.if((0,codegen_1$5._)`${(0,code_1$1.usePattern)(a,_t)}.test(${xt})`,()=>{const St=at.includes(_t);St||a.subschema({keyword:"patternProperties",schemaProp:_t,dataProp:xt,dataPropType:util_2.Type.Str},dt),et.opts.unevaluated&&yt!==!0?_.assign((0,codegen_1$5._)`${yt}[${xt}]`,!0):!St&&!et.allErrors&&_.if((0,codegen_1$5.not)(dt),()=>_.break())})})}}};patternProperties.default=def$8;var not={};Object.defineProperty(not,"__esModule",{value:!0});const util_1$5=util$1,def$7={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(a){const{gen:_,schema:$,it:j}=a;if((0,util_1$5.alwaysValidSchema)(j,$)){a.fail();return}const _e=_.name("valid");a.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},_e),a.failResult(_e,()=>a.reset(),()=>a.error())},error:{message:"must NOT be valid"}};not.default=def$7;var anyOf={};Object.defineProperty(anyOf,"__esModule",{value:!0});const code_1=code$1,def$6={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:code_1.validateUnion,error:{message:"must match a schema in anyOf"}};anyOf.default=def$6;var oneOf$1={};Object.defineProperty(oneOf$1,"__esModule",{value:!0});const codegen_1$4=codegen,util_1$4=util$1,error$4={message:"must match exactly one schema in oneOf",params:({params:a})=>(0,codegen_1$4._)`{passingSchemas: ${a.passing}}`},def$5={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:error$4,code(a){const{gen:_,schema:$,parentSchema:j,it:_e}=a;if(!Array.isArray($))throw new Error("ajv implementation error");if(_e.opts.discriminator&&j.discriminator)return;const et=$,tt=_.let("valid",!1),rt=_.let("passing",null),at=_.name("_valid");a.setParams({passing:rt}),_.block(ct),a.result(tt,()=>a.reset(),()=>a.error(!0));function ct(){et.forEach((dt,yt)=>{let bt;(0,util_1$4.alwaysValidSchema)(_e,dt)?_.var(at,!0):bt=a.subschema({keyword:"oneOf",schemaProp:yt,compositeRule:!0},at),yt>0&&_.if((0,codegen_1$4._)`${at} && ${tt}`).assign(tt,!1).assign(rt,(0,codegen_1$4._)`[${rt}, ${yt}]`).else(),_.if(at,()=>{_.assign(tt,!0),_.assign(rt,yt),bt&&a.mergeEvaluated(bt,codegen_1$4.Name)})})}}};oneOf$1.default=def$5;var allOf={};Object.defineProperty(allOf,"__esModule",{value:!0});const util_1$3=util$1,def$4={keyword:"allOf",schemaType:"array",code(a){const{gen:_,schema:$,it:j}=a;if(!Array.isArray($))throw new Error("ajv implementation error");const _e=_.name("valid");$.forEach((et,tt)=>{if((0,util_1$3.alwaysValidSchema)(j,et))return;const rt=a.subschema({keyword:"allOf",schemaProp:tt},_e);a.ok(_e),a.mergeEvaluated(rt)})}};allOf.default=def$4;var _if={};Object.defineProperty(_if,"__esModule",{value:!0});const codegen_1$3=codegen,util_1$2=util$1,error$3={message:({params:a})=>(0,codegen_1$3.str)`must match "${a.ifClause}" schema`,params:({params:a})=>(0,codegen_1$3._)`{failingKeyword: ${a.ifClause}}`},def$3={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:error$3,code(a){const{gen:_,parentSchema:$,it:j}=a;$.then===void 0&&$.else===void 0&&(0,util_1$2.checkStrictMode)(j,'"if" without "then" and "else" is ignored');const _e=hasSchema(j,"then"),et=hasSchema(j,"else");if(!_e&&!et)return;const tt=_.let("valid",!0),rt=_.name("_valid");if(at(),a.reset(),_e&&et){const dt=_.let("ifClause");a.setParams({ifClause:dt}),_.if(rt,ct("then",dt),ct("else",dt))}else _e?_.if(rt,ct("then")):_.if((0,codegen_1$3.not)(rt),ct("else"));a.pass(tt,()=>a.error(!0));function at(){const dt=a.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},rt);a.mergeEvaluated(dt)}function ct(dt,yt){return()=>{const bt=a.subschema({keyword:dt},rt);_.assign(tt,rt),a.mergeValidEvaluated(bt,tt),yt?_.assign(yt,(0,codegen_1$3._)`${dt}`):a.setParams({ifClause:dt})}}}};function hasSchema(a,_){const $=a.schema[_];return $!==void 0&&!(0,util_1$2.alwaysValidSchema)(a,$)}_if.default=def$3;var thenElse={};Object.defineProperty(thenElse,"__esModule",{value:!0});const util_1$1=util$1,def$2={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:a,parentSchema:_,it:$}){_.if===void 0&&(0,util_1$1.checkStrictMode)($,`"${a}" without "if" is ignored`)}};thenElse.default=def$2;Object.defineProperty(applicator,"__esModule",{value:!0});const additionalItems_1=additionalItems,prefixItems_1=prefixItems,items_1=items,items2020_1=items2020,contains_1=contains$1,dependencies_1=dependencies$2,propertyNames_1=propertyNames,additionalProperties_1=additionalProperties,properties_1=properties$1,patternProperties_1=patternProperties,not_1=not,anyOf_1=anyOf,oneOf_1=oneOf$1,allOf_1=allOf,if_1=_if,thenElse_1=thenElse;function getApplicator(a=!1){const _=[not_1.default,anyOf_1.default,oneOf_1.default,allOf_1.default,if_1.default,thenElse_1.default,propertyNames_1.default,additionalProperties_1.default,dependencies_1.default,properties_1.default,patternProperties_1.default];return a?_.push(prefixItems_1.default,items2020_1.default):_.push(additionalItems_1.default,items_1.default),_.push(contains_1.default),_}applicator.default=getApplicator;var format$3={},format$2={};Object.defineProperty(format$2,"__esModule",{value:!0});const codegen_1$2=codegen,error$2={message:({schemaCode:a})=>(0,codegen_1$2.str)`must match format "${a}"`,params:({schemaCode:a})=>(0,codegen_1$2._)`{format: ${a}}`},def$1={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:error$2,code(a,_){const{gen:$,data:j,$data:_e,schema:et,schemaCode:tt,it:rt}=a,{opts:at,errSchemaPath:ct,schemaEnv:dt,self:yt}=rt;if(!at.validateFormats)return;_e?bt():Et();function bt(){const $t=$.scopeValue("formats",{ref:yt.formats,code:at.code.formats}),_t=$.const("fDef",(0,codegen_1$2._)`${$t}[${tt}]`),xt=$.let("fType"),St=$.let("format");$.if((0,codegen_1$2._)`typeof ${_t} == "object" && !(${_t} instanceof RegExp)`,()=>$.assign(xt,(0,codegen_1$2._)`${_t}.type || "string"`).assign(St,(0,codegen_1$2._)`${_t}.validate`),()=>$.assign(xt,(0,codegen_1$2._)`"string"`).assign(St,_t)),a.fail$data((0,codegen_1$2.or)(Mt(),Tt()));function Mt(){return at.strictSchema===!1?codegen_1$2.nil:(0,codegen_1$2._)`${tt} && !${St}`}function Tt(){const Rt=dt.$async?(0,codegen_1$2._)`(${_t}.async ? await ${St}(${j}) : ${St}(${j}))`:(0,codegen_1$2._)`${St}(${j})`,Ct=(0,codegen_1$2._)`(typeof ${St} == "function" ? ${Rt} : ${St}.test(${j}))`;return(0,codegen_1$2._)`${St} && ${St} !== true && ${xt} === ${_} && !${Ct}`}}function Et(){const $t=yt.formats[et];if(!$t){Mt();return}if($t===!0)return;const[_t,xt,St]=Tt($t);_t===_&&a.pass(Rt());function Mt(){if(at.strictSchema===!1){yt.logger.warn(Ct());return}throw new Error(Ct());function Ct(){return`unknown format "${et}" ignored in schema at path "${ct}"`}}function Tt(Ct){const It=Ct instanceof RegExp?(0,codegen_1$2.regexpCode)(Ct):at.code.formats?(0,codegen_1$2._)`${at.code.formats}${(0,codegen_1$2.getProperty)(et)}`:void 0,kt=$.scopeValue("formats",{key:et,ref:Ct,code:It});return typeof Ct=="object"&&!(Ct instanceof RegExp)?[Ct.type||"string",Ct.validate,(0,codegen_1$2._)`${kt}.validate`]:["string",Ct,kt]}function Rt(){if(typeof $t=="object"&&!($t instanceof RegExp)&&$t.async){if(!dt.$async)throw new Error("async format in sync schema");return(0,codegen_1$2._)`await ${St}(${j})`}return typeof xt=="function"?(0,codegen_1$2._)`${St}(${j})`:(0,codegen_1$2._)`${St}.test(${j})`}}}};format$2.default=def$1;Object.defineProperty(format$3,"__esModule",{value:!0});const format_1$1=format$2,format$1=[format_1$1.default];format$3.default=format$1;var metadata={};Object.defineProperty(metadata,"__esModule",{value:!0});metadata.contentVocabulary=metadata.metadataVocabulary=void 0;metadata.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];metadata.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(draft7,"__esModule",{value:!0});const core_1=core$1,validation_1=validation$4,applicator_1=applicator,format_1=format$3,metadata_1=metadata,draft7Vocabularies=[core_1.default,validation_1.default,(0,applicator_1.default)(),format_1.default,metadata_1.metadataVocabulary,metadata_1.contentVocabulary];draft7.default=draft7Vocabularies;var discriminator={},types$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.DiscrError=void 0,function(_){_.Tag="tag",_.Mapping="mapping"}(a.DiscrError||(a.DiscrError={}))})(types$2);Object.defineProperty(discriminator,"__esModule",{value:!0});const codegen_1$1=codegen,types_1=types$2,compile_1=compile,util_1=util$1,error$1={message:({params:{discrError:a,tagName:_}})=>a===types_1.DiscrError.Tag?`tag "${_}" must be string`:`value of tag "${_}" must be in oneOf`,params:({params:{discrError:a,tag:_,tagName:$}})=>(0,codegen_1$1._)`{error: ${a}, tag: ${$}, tagValue: ${_}}`},def={keyword:"discriminator",type:"object",schemaType:"object",error:error$1,code(a){const{gen:_,data:$,schema:j,parentSchema:_e,it:et}=a,{oneOf:tt}=_e;if(!et.opts.discriminator)throw new Error("discriminator: requires discriminator option");const rt=j.propertyName;if(typeof rt!="string")throw new Error("discriminator: requires propertyName");if(j.mapping)throw new Error("discriminator: mapping is not supported");if(!tt)throw new Error("discriminator: requires oneOf keyword");const at=_.let("valid",!1),ct=_.const("tag",(0,codegen_1$1._)`${$}${(0,codegen_1$1.getProperty)(rt)}`);_.if((0,codegen_1$1._)`typeof ${ct} == "string"`,()=>dt(),()=>a.error(!1,{discrError:types_1.DiscrError.Tag,tag:ct,tagName:rt})),a.ok(at);function dt(){const Et=bt();_.if(!1);for(const $t in Et)_.elseIf((0,codegen_1$1._)`${ct} === ${$t}`),_.assign(at,yt(Et[$t]));_.else(),a.error(!1,{discrError:types_1.DiscrError.Mapping,tag:ct,tagName:rt}),_.endIf()}function yt(Et){const $t=_.name("valid"),_t=a.subschema({keyword:"oneOf",schemaProp:Et},$t);return a.mergeEvaluated(_t,codegen_1$1.Name),$t}function bt(){var Et;const $t={},_t=St(_e);let xt=!0;for(let Rt=0;Rt<tt.length;Rt++){let Ct=tt[Rt];Ct!=null&&Ct.$ref&&!(0,util_1.schemaHasRulesButRef)(Ct,et.self.RULES)&&(Ct=compile_1.resolveRef.call(et.self,et.schemaEnv.root,et.baseId,Ct==null?void 0:Ct.$ref),Ct instanceof compile_1.SchemaEnv&&(Ct=Ct.schema));const It=(Et=Ct==null?void 0:Ct.properties)===null||Et===void 0?void 0:Et[rt];if(typeof It!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${rt}"`);xt=xt&&(_t||St(Ct)),Mt(It,Rt)}if(!xt)throw new Error(`discriminator: "${rt}" must be required`);return $t;function St({required:Rt}){return Array.isArray(Rt)&&Rt.includes(rt)}function Mt(Rt,Ct){if(Rt.const)Tt(Rt.const,Ct);else if(Rt.enum)for(const It of Rt.enum)Tt(It,Ct);else throw new Error(`discriminator: "properties/${rt}" must have "const" or "enum"`)}function Tt(Rt,Ct){if(typeof Rt!="string"||Rt in $t)throw new Error(`discriminator: "${rt}" values must be unique strings`);$t[Rt]=Ct}}}};discriminator.default=def;const $schema="http://json-schema.org/draft-07/schema#",$id="http://json-schema.org/draft-07/schema#",title$5="Core schema meta-schema",definitions={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:[]}},type$3=["object","boolean"],properties={$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:"#"}},require$$3$1={$schema,$id,title:title$5,definitions,type:type$3,properties,default:!0};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0}),_.MissingRefError=_.ValidationError=_.CodeGen=_.Name=_.nil=_.stringify=_.str=_._=_.KeywordCxt=void 0;const $=core$2,j=draft7,_e=discriminator,et=require$$3$1,tt=["/properties"],rt="http://json-schema.org/draft-07/schema";class at extends $.default{_addVocabularies(){super._addVocabularies(),j.default.forEach($t=>this.addVocabulary($t)),this.opts.discriminator&&this.addKeyword(_e.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const $t=this.opts.$data?this.$dataMetaSchema(et,tt):et;this.addMetaSchema($t,rt,!1),this.refs["http://json-schema.org/schema"]=rt}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(rt)?rt:void 0)}}a.exports=_=at,Object.defineProperty(_,"__esModule",{value:!0}),_.default=at;var ct=validate;Object.defineProperty(_,"KeywordCxt",{enumerable:!0,get:function(){return ct.KeywordCxt}});var dt=codegen;Object.defineProperty(_,"_",{enumerable:!0,get:function(){return dt._}}),Object.defineProperty(_,"str",{enumerable:!0,get:function(){return dt.str}}),Object.defineProperty(_,"stringify",{enumerable:!0,get:function(){return dt.stringify}}),Object.defineProperty(_,"nil",{enumerable:!0,get:function(){return dt.nil}}),Object.defineProperty(_,"Name",{enumerable:!0,get:function(){return dt.Name}}),Object.defineProperty(_,"CodeGen",{enumerable:!0,get:function(){return dt.CodeGen}});var yt=validation_error;Object.defineProperty(_,"ValidationError",{enumerable:!0,get:function(){return yt.default}});var bt=ref_error;Object.defineProperty(_,"MissingRefError",{enumerable:!0,get:function(){return bt.default}})})(ajv,ajv.exports);var ajvExports=ajv.exports,dist$a={exports:{}},keywords$2={exports:{}},_typeof$A={exports:{}},_typeof$z={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $=codegen,j=["undefined","string","number","object","function","boolean","symbol"];function _e(){return{keyword:"typeof",schemaType:["string","array"],code(et){const{data:tt,schema:rt,schemaValue:at}=et;et.fail(typeof rt=="string"?(0,$._)`typeof ${tt} != ${rt}`:(0,$._)`${at}.indexOf(typeof ${tt}) < 0`)},metaSchema:{anyOf:[{type:"string",enum:j},{type:"array",items:{type:"string",enum:j}}]}}}_.default=_e,a.exports=_e})(_typeof$z,_typeof$z.exports);var _typeofExports$1=_typeof$z.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(_typeofExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(_typeof$A,_typeof$A.exports);var _typeofExports=_typeof$A.exports,_instanceof$1={exports:{}},_instanceof={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $={Object,Array,Function,Number,String,Date,RegExp};typeof Buffer$G<"u"&&($.Buffer=Buffer$G),typeof Promise<"u"&&($.Promise=Promise);const j=Object.assign(_e,{CONSTRUCTORS:$});function _e(){return{keyword:"instanceof",schemaType:["string","array"],compile(tt){if(typeof tt=="string"){const rt=et(tt);return at=>at instanceof rt}if(Array.isArray(tt)){const rt=tt.map(et);return at=>{for(const ct of rt)if(at instanceof ct)return!0;return!1}}throw new Error("ajv implementation error")},metaSchema:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}}}function et(tt){const rt=$[tt];if(rt)return rt;throw new Error(`invalid "instanceof" keyword value ${tt}`)}_.default=j,a.exports=j})(_instanceof,_instanceof.exports);var _instanceofExports$1=_instanceof.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(_instanceofExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(_instanceof$1,_instanceof$1.exports);var _instanceofExports=_instanceof$1.exports,range$1={exports:{}},range={exports:{}},_range={};Object.defineProperty(_range,"__esModule",{value:!0});function getRangeDef(a){return()=>({keyword:a,type:"number",schemaType:"array",macro:function([$,j]){return _($,j),a==="range"?{minimum:$,maximum:j}:{exclusiveMinimum:$,exclusiveMaximum:j}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}});function _($,j){if($>j||a==="exclusiveRange"&&$===j)throw new Error("There are no numbers in range")}}_range.default=getRangeDef;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const _e=(0,$(_range).default)("range");_.default=_e,a.exports=_e})(range,range.exports);var rangeExports$1=range.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(rangeExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(range$1,range$1.exports);var rangeExports=range$1.exports,exclusiveRange$1={exports:{}},exclusiveRange={exports:{}};(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const _e=(0,$(_range).default)("exclusiveRange");_.default=_e,a.exports=_e})(exclusiveRange,exclusiveRange.exports);var exclusiveRangeExports$1=exclusiveRange.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(exclusiveRangeExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(exclusiveRange$1,exclusiveRange$1.exports);var exclusiveRangeExports=exclusiveRange$1.exports,regexp$1={exports:{}},regexp={exports:{}},_util={};Object.defineProperty(_util,"__esModule",{value:!0});_util.usePattern=_util.metaSchemaRef=void 0;const codegen_1=codegen,META_SCHEMA_ID="http://json-schema.org/schema";function metaSchemaRef({defaultMeta:a}={}){return a===!1?{}:{$ref:a||META_SCHEMA_ID}}_util.metaSchemaRef=metaSchemaRef;function usePattern({gen:a,it:{opts:_}},$,j=_.unicodeRegExp?"u":""){const _e=new RegExp($,j);return a.scopeValue("pattern",{key:_e.toString(),ref:_e,code:(0,codegen_1._)`new RegExp(${$}, ${j})`})}_util.usePattern=usePattern;(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $=codegen,j=_util,_e={type:"object",properties:{pattern:{type:"string"},flags:{type:"string",nullable:!0}},required:["pattern"],additionalProperties:!1},et=/^\/(.*)\/([gimuy]*)$/;function tt(){return{keyword:"regexp",type:"string",schemaType:["string","object"],code(rt){const{data:at,schema:ct}=rt,dt=yt(ct);rt.pass((0,$._)`${dt}.test(${at})`);function yt(bt){if(typeof bt=="object")return(0,j.usePattern)(rt,bt.pattern,bt.flags);const Et=et.exec(bt);if(Et)return(0,j.usePattern)(rt,Et[1],Et[2]);throw new Error("cannot parse string into RegExp")}},metaSchema:{anyOf:[{type:"string"},_e]}}}_.default=tt,a.exports=tt})(regexp,regexp.exports);var regexpExports$1=regexp.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(regexpExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(regexp$1,regexp$1.exports);var regexpExports=regexp$1.exports,transform$1={exports:{}},transform={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $=codegen,j={trimStart:at=>at.trimStart(),trimEnd:at=>at.trimEnd(),trimLeft:at=>at.trimStart(),trimRight:at=>at.trimEnd(),trim:at=>at.trim(),toLowerCase:at=>at.toLowerCase(),toUpperCase:at=>at.toUpperCase(),toEnumCase:(at,ct)=>(ct==null?void 0:ct.hash[rt(at)])||at},_e=Object.assign(et,{transform:j});function et(){return{keyword:"transform",schemaType:"array",before:"enum",code(at){const{gen:ct,data:dt,schema:yt,parentSchema:bt,it:Et}=at,{parentData:$t,parentDataProperty:_t}=Et,xt=yt;if(!xt.length)return;let St;if(xt.includes("toEnumCase")){const Tt=tt(bt);St=ct.scopeValue("obj",{ref:Tt,code:(0,$.stringify)(Tt)})}ct.if((0,$._)`typeof ${dt} == "string" && ${$t} !== undefined`,()=>{ct.assign(dt,Mt(xt.slice())),ct.assign((0,$._)`${$t}[${_t}]`,dt)});function Mt(Tt){if(!Tt.length)return dt;const Rt=Tt.pop();if(!(Rt in j))throw new Error(`transform: unknown transformation ${Rt}`);const Ct=ct.scopeValue("func",{ref:j[Rt],code:(0,$._)`require("ajv-keywords/dist/definitions/transform").transform${(0,$.getProperty)(Rt)}`}),It=Mt(Tt);return St&&Rt==="toEnumCase"?(0,$._)`${Ct}(${It}, ${St})`:(0,$._)`${Ct}(${It})`}},metaSchema:{type:"array",items:{type:"string",enum:Object.keys(j)}}}}function tt(at){const ct={hash:{}};if(!at.enum)throw new Error('transform: "toEnumCase" requires "enum"');for(const dt of at.enum){if(typeof dt!="string")continue;const yt=rt(dt);if(ct.hash[yt])throw new Error('transform: "toEnumCase" requires all lowercased "enum" values to be unique');ct.hash[yt]=dt}return ct}function rt(at){return at.toLowerCase()}_.default=_e,a.exports=_e})(transform,transform.exports);var transformExports$1=transform.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(transformExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(transform$1,transform$1.exports);var transformExports=transform$1.exports,uniqueItemProperties$1={exports:{}},uniqueItemProperties={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $=fastDeepEqual,j=["number","integer","string","boolean","null"];function _e(){return{keyword:"uniqueItemProperties",type:"array",schemaType:"array",compile(tt,rt){const at=et(tt,rt);return ct=>{if(ct.length<=1)return!0;for(let dt=0;dt<tt.length;dt++){const yt=tt[dt];if(at[dt]){const bt={};for(const Et of ct){if(!Et||typeof Et!="object")continue;let $t=Et[yt];if(!($t&&typeof $t=="object")){if(typeof $t=="string"&&($t='"'+$t),bt[$t])return!1;bt[$t]=!0}}}else for(let bt=ct.length;bt--;){const Et=ct[bt];if(!(!Et||typeof Et!="object"))for(let $t=bt;$t--;){const _t=ct[$t];if(_t&&typeof _t=="object"&&$(Et[yt],_t[yt]))return!1}}}return!0}},metaSchema:{type:"array",items:{type:"string"}}}}_.default=_e;function et(tt,rt){return tt.map(at=>{var ct,dt,yt;const bt=(yt=(dt=(ct=rt.items)===null||ct===void 0?void 0:ct.properties)===null||dt===void 0?void 0:dt[at])===null||yt===void 0?void 0:yt.type;return Array.isArray(bt)?!bt.includes("object")&&!bt.includes("array"):j.includes(bt)})}a.exports=_e})(uniqueItemProperties,uniqueItemProperties.exports);var uniqueItemPropertiesExports$1=uniqueItemProperties.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(uniqueItemPropertiesExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(uniqueItemProperties$1,uniqueItemProperties$1.exports);var uniqueItemPropertiesExports=uniqueItemProperties$1.exports,allRequired$1={exports:{}},allRequired={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});function $(){return{keyword:"allRequired",type:"object",schemaType:"boolean",macro(j,_e){if(!j)return!0;const et=Object.keys(_e.properties);return et.length===0?!0:{required:et}},dependencies:["properties"]}}_.default=$,a.exports=$})(allRequired,allRequired.exports);var allRequiredExports$1=allRequired.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(allRequiredExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(allRequired$1,allRequired$1.exports);var allRequiredExports=allRequired$1.exports,anyRequired$1={exports:{}},anyRequired={exports:{}},_required={};Object.defineProperty(_required,"__esModule",{value:!0});function getRequiredDef(a){return()=>({keyword:a,type:"object",schemaType:"array",macro(_){return _.length===0?!0:_.length===1?{required:_}:{[a==="anyRequired"?"anyOf":"oneOf"]:_.map(j=>({required:[j]}))}},metaSchema:{type:"array",items:{type:"string"}}})}_required.default=getRequiredDef;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const _e=(0,$(_required).default)("anyRequired");_.default=_e,a.exports=_e})(anyRequired,anyRequired.exports);var anyRequiredExports$1=anyRequired.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(anyRequiredExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(anyRequired$1,anyRequired$1.exports);var anyRequiredExports=anyRequired$1.exports,oneRequired$1={exports:{}},oneRequired={exports:{}};(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const _e=(0,$(_required).default)("oneRequired");_.default=_e,a.exports=_e})(oneRequired,oneRequired.exports);var oneRequiredExports$1=oneRequired.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(oneRequiredExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(oneRequired$1,oneRequired$1.exports);var oneRequiredExports=oneRequired$1.exports,patternRequired$1={exports:{}},patternRequired={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $=codegen,j=_util,_e={message:({params:{missingPattern:tt}})=>(0,$.str)`should have property matching pattern '${tt}'`,params:({params:{missingPattern:tt}})=>(0,$._)`{missingPattern: ${tt}}`};function et(){return{keyword:"patternRequired",type:"object",schemaType:"array",error:_e,code(tt){const{gen:rt,schema:at,data:ct}=tt;if(at.length===0)return;const dt=rt.let("valid",!0);for(const bt of at)yt(bt);function yt(bt){const Et=rt.let("matched",!1);rt.forIn("key",ct,$t=>{rt.assign(Et,(0,$._)`${(0,j.usePattern)(tt,bt)}.test(${$t})`),rt.if(Et,()=>rt.break())}),tt.setParams({missingPattern:bt}),rt.assign(dt,(0,$.and)(dt,Et)),tt.pass(dt)}},metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:!0}}}_.default=et,a.exports=et})(patternRequired,patternRequired.exports);var patternRequiredExports$1=patternRequired.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(patternRequiredExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(patternRequired$1,patternRequired$1.exports);var patternRequiredExports=patternRequired$1.exports,prohibited$1={exports:{}},prohibited={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});function $(){return{keyword:"prohibited",type:"object",schemaType:"array",macro:function(j){return j.length===0?!0:j.length===1?{not:{required:j}}:{not:{anyOf:j.map(_e=>({required:[_e]}))}}},metaSchema:{type:"array",items:{type:"string"}}}}_.default=$,a.exports=$})(prohibited,prohibited.exports);var prohibitedExports$1=prohibited.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(prohibitedExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(prohibited$1,prohibited$1.exports);var prohibitedExports=prohibited$1.exports,deepProperties$1={exports:{}},deepProperties={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $=_util;function j(tt){return{keyword:"deepProperties",type:"object",schemaType:"object",macro:function(rt){const at=[];for(const ct in rt)at.push(_e(ct,rt[ct]));return{allOf:at}},metaSchema:{type:"object",propertyNames:{type:"string",format:"json-pointer"},additionalProperties:(0,$.metaSchemaRef)(tt)}}}_.default=j;function _e(tt,rt){const at=tt.split("/"),ct={};let dt=ct;for(let yt=1;yt<at.length;yt++){let bt=at[yt];const Et=yt===at.length-1;bt=et(bt);const $t=dt.properties={};let _t;if(/[0-9]+/.test(bt)){let xt=+bt;for(_t=dt.items=[],dt.type=["object","array"];xt--;)_t.push({})}else dt.type="object";dt=Et?rt:{},$t[bt]=dt,_t&&_t.push(dt)}return ct}function et(tt){return tt.replace(/~1/g,"/").replace(/~0/g,"~")}a.exports=j})(deepProperties,deepProperties.exports);var deepPropertiesExports$1=deepProperties.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(deepPropertiesExports$1),_e=(et,tt)=>et.addKeyword((0,j.default)(tt));_.default=_e,a.exports=_e})(deepProperties$1,deepProperties$1.exports);var deepPropertiesExports=deepProperties$1.exports,deepRequired$1={exports:{}},deepRequired={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $=codegen;function j(){return{keyword:"deepRequired",type:"object",schemaType:"array",code(et){const{schema:tt,data:rt}=et,at=tt.map(dt=>(0,$._)`(${ct(dt)}) === undefined`);et.fail((0,$.or)(...at));function ct(dt){if(dt==="")throw new Error("empty JSON pointer not allowed");const yt=dt.split("/");let bt=rt;const Et=yt.map(($t,_t)=>_t?bt=(0,$._)`${bt}${(0,$.getProperty)(_e($t))}`:bt);return(0,$.and)(...Et)}},metaSchema:{type:"array",items:{type:"string",format:"json-pointer"}}}}_.default=j;function _e(et){return et.replace(/~1/g,"/").replace(/~0/g,"~")}a.exports=j})(deepRequired,deepRequired.exports);var deepRequiredExports$1=deepRequired.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(deepRequiredExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(deepRequired$1,deepRequired$1.exports);var deepRequiredExports=deepRequired$1.exports,dynamicDefaults$1={exports:{}},dynamicDefaults={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $={},j={timestamp:()=>()=>Date.now(),datetime:()=>()=>new Date().toISOString(),date:()=>()=>new Date().toISOString().slice(0,10),time:()=>()=>new Date().toISOString().slice(11),random:()=>()=>Math.random(),randomint:dt=>{var yt;const bt=(yt=dt==null?void 0:dt.max)!==null&&yt!==void 0?yt:2;return()=>Math.floor(Math.random()*bt)},seq:dt=>{var yt;const bt=(yt=dt==null?void 0:dt.name)!==null&&yt!==void 0?yt:"";return $[bt]||($[bt]=0),()=>$[bt]++}},_e=Object.assign(et,{DEFAULTS:j});function et(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(dt,yt,bt){if(!bt.opts.useDefaults||bt.compositeRule)return()=>!0;const Et={};for(const _t in dt)Et[_t]=tt(dt[_t]);const $t=bt.opts.useDefaults==="empty";return _t=>{for(const xt in dt)(_t[xt]===void 0||$t&&(_t[xt]===null||_t[xt]===""))&&(_t[xt]=Et[xt]());return!0}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}function tt(dt){return typeof dt=="object"?rt(dt):at(dt)}function rt({func:dt,args:yt}){const bt=j[dt];return ct(dt,bt),bt(yt)}function at(dt=""){const yt=j[dt];return ct(dt,yt),yt()}function ct(dt,yt){if(!yt)throw new Error(`invalid "dynamicDefaults" keyword property value: ${dt}`)}_.default=_e,a.exports=_e})(dynamicDefaults,dynamicDefaults.exports);var dynamicDefaultsExports$1=dynamicDefaults.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(dynamicDefaultsExports$1),_e=et=>et.addKeyword((0,j.default)());_.default=_e,a.exports=_e})(dynamicDefaults$1,dynamicDefaults$1.exports);var dynamicDefaultsExports=dynamicDefaults$1.exports,select$1={exports:{}},select={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $=codegen,j=_util,_e={message:({params:{schemaProp:tt}})=>tt?(0,$.str)`should match case "${tt}" schema`:(0,$.str)`should match default case schema`,params:({params:{schemaProp:tt}})=>tt?(0,$._)`{failingCase: ${tt}}`:(0,$._)`{failingDefault: true}`};function et(tt){const rt=(0,j.metaSchemaRef)(tt);return[{keyword:"select",schemaType:["string","number","boolean","null"],$data:!0,error:_e,dependencies:["selectCases"],code(at){const{gen:ct,schemaCode:dt,parentSchema:yt}=at;at.block$data($.nil,()=>{const bt=ct.let("valid",!0),Et=ct.name("_valid"),$t=ct.const("value",(0,$._)`${dt} === null ? "null" : ${dt}`);ct.if(!1);for(const _t in yt.selectCases){at.setParams({schemaProp:_t}),ct.elseIf((0,$._)`"" + ${$t} == ${_t}`);const xt=at.subschema({keyword:"selectCases",schemaProp:_t},Et);at.mergeEvaluated(xt,$.Name),ct.assign(bt,Et)}if(ct.else(),yt.selectDefault!==void 0){at.setParams({schemaProp:void 0});const _t=at.subschema({keyword:"selectDefault"},Et);at.mergeEvaluated(_t,$.Name),ct.assign(bt,Et)}ct.endIf(),at.pass(bt)})}},{keyword:"selectCases",dependencies:["select"],metaSchema:{type:"object",additionalProperties:rt}},{keyword:"selectDefault",dependencies:["select","selectCases"],metaSchema:rt}]}_.default=et,a.exports=et})(select,select.exports);var selectExports$1=select.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(et){return et&&et.__esModule?et:{default:et}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(selectExports$1),_e=(et,tt)=>((0,j.default)(tt).forEach(rt=>et.addKeyword(rt)),et);_.default=_e,a.exports=_e})(select$1,select$1.exports);var selectExports=select$1.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(Rt){return Rt&&Rt.__esModule?Rt:{default:Rt}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(_typeofExports),_e=$(_instanceofExports),et=$(rangeExports),tt=$(exclusiveRangeExports),rt=$(regexpExports),at=$(transformExports),ct=$(uniqueItemPropertiesExports),dt=$(allRequiredExports),yt=$(anyRequiredExports),bt=$(oneRequiredExports),Et=$(patternRequiredExports),$t=$(prohibitedExports),_t=$(deepPropertiesExports),xt=$(deepRequiredExports),St=$(dynamicDefaultsExports),Mt=$(selectExports),Tt={typeof:j.default,instanceof:_e.default,range:et.default,exclusiveRange:tt.default,regexp:rt.default,transform:at.default,uniqueItemProperties:ct.default,allRequired:dt.default,anyRequired:yt.default,oneRequired:bt.default,patternRequired:Et.default,prohibited:$t.default,deepProperties:_t.default,deepRequired:xt.default,dynamicDefaults:St.default,select:Mt.default};_.default=Tt,a.exports=Tt})(keywords$2,keywords$2.exports);var keywordsExports=keywords$2.exports;(function(a,_){var $=commonjsGlobal&&commonjsGlobal.__importDefault||function(tt){return tt&&tt.__esModule?tt:{default:tt}};Object.defineProperty(_,"__esModule",{value:!0});const j=$(keywordsExports),_e=(tt,rt)=>{if(Array.isArray(rt)){for(const at of rt)et(at)(tt);return tt}if(rt)return et(rt)(tt),tt;for(rt in j.default)et(rt)(tt);return tt};_e.get=et;function et(tt){const rt=j.default[tt];if(!rt)throw new Error("Unknown keyword "+tt);return rt}_.default=_e,a.exports=_e,a.exports.default=_e})(dist$a,dist$a.exports);var distExports$2=dist$a.exports,dist$9={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0});const $=ajvExports,j=codegen,_e=code$2,et=validate,tt=errors,rt=names$1,at="errorMessage",ct=new $.Name("emUsed"),dt={required:"missingProperty",dependencies:"property",dependentRequired:"property"},yt=/\$\{[^}]+\}/,bt=/\$\{([^}]+)\}/g,Et=/^""\s*\+\s*|\s*\+\s*""$/g;function $t(xt){return{keyword:at,schemaType:["string","object"],post:!0,code(St){const{gen:Mt,data:Tt,schema:Rt,schemaValue:Ct,it:It}=St;if(It.createErrors===!1)return;const kt=Rt,Dt=j.strConcat(rt.default.instancePath,It.errorPath);Mt.if($._`${rt.default.errors} > 0`,()=>{if(typeof kt=="object"){const[Ot,Nt]=zt(kt);Nt&&vt(Nt),Ot&&nt(Ot),st(Bt(kt))}const Pt=typeof kt=="string"?kt:kt._;Pt&&lt(Pt),xt.keepErrors||ht()});function Bt({properties:Pt,items:Ot}){const Nt={};if(Pt){Nt.props={};for(const jt in Pt)Nt.props[jt]=[]}if(Ot){Nt.items={};for(let jt=0;jt<Ot.length;jt++)Nt.items[jt]=[]}return Nt}function zt(Pt){let Ot,Nt;for(const jt in Pt){if(jt==="properties"||jt==="items")continue;const Ut=Pt[jt];if(typeof Ut=="object"){Ot||(Ot={});const Vt=Ot[jt]={};for(const rr in Ut)Vt[rr]=[]}else Nt||(Nt={}),Nt[jt]=[]}return[Ot,Nt]}function vt(Pt){const Ot=Mt.const("emErrors",$.stringify(Pt)),Nt=Mt.const("templates",gt(Pt,Rt));Mt.forOf("err",rt.default.vErrors,rr=>Mt.if(mt(rr,Ot),()=>Mt.code($._`${Ot}[${rr}.keyword].push(${rr})`).assign($._`${rr}.${ct}`,!0)));const{singleError:jt}=xt;if(jt){const rr=Mt.let("message",$._`""`),tr=Mt.let("paramsErrors",$._`[]`);Ut(Zt=>{Mt.if(rr,()=>Mt.code($._`${rr} += ${typeof jt=="string"?jt:";"}`)),Mt.code($._`${rr} += ${Vt(Zt)}`),Mt.assign(tr,$._`${tr}.concat(${Ot}[${Zt}])`)}),tt.reportError(St,{message:rr,params:$._`{errors: ${tr}}`})}else Ut(rr=>tt.reportError(St,{message:Vt(rr),params:$._`{errors: ${Ot}[${rr}]}`}));function Ut(rr){Mt.forIn("key",Ot,tr=>Mt.if($._`${Ot}[${tr}].length`,()=>rr(tr)))}function Vt(rr){return $._`${rr} in ${Nt} ? ${Nt}[${rr}]() : ${Ct}[${rr}]`}}function nt(Pt){const Ot=Mt.const("emErrors",$.stringify(Pt)),Nt=[];for(const tr in Pt)Nt.push([tr,gt(Pt[tr],Rt[tr])]);const jt=Mt.const("templates",Mt.object(...Nt)),Ut=Mt.scopeValue("obj",{ref:dt,code:$.stringify(dt)}),Vt=Mt.let("emPropParams"),rr=Mt.let("emParamsErrors");Mt.forOf("err",rt.default.vErrors,tr=>Mt.if(mt(tr,Ot),()=>{Mt.assign(Vt,$._`${Ut}[${tr}.keyword]`),Mt.assign(rr,$._`${Ot}[${tr}.keyword][${tr}.params[${Vt}]]`),Mt.if(rr,()=>Mt.code($._`${rr}.push(${tr})`).assign($._`${tr}.${ct}`,!0))})),Mt.forIn("key",Ot,tr=>Mt.forIn("keyProp",$._`${Ot}[${tr}]`,Zt=>{Mt.assign(rr,$._`${Ot}[${tr}][${Zt}]`),Mt.if($._`${rr}.length`,()=>{const Yt=Mt.const("tmpl",$._`${jt}[${tr}] && ${jt}[${tr}][${Zt}]`);tt.reportError(St,{message:$._`${Yt} ? ${Yt}() : ${Ct}[${tr}][${Zt}]`,params:$._`{errors: ${rr}}`})})}))}function st(Pt){const{props:Ot,items:Nt}=Pt;if(!Ot&&!Nt)return;const jt=$._`typeof ${Tt} == "object"`,Ut=$._`Array.isArray(${Tt})`,Vt=Mt.let("emErrors");let rr,tr;const Zt=Mt.let("templates");Ot&&Nt?(rr=Mt.let("emChildKwd"),Mt.if(jt),Mt.if(Ut,()=>{Yt(Nt,Rt.items),Mt.assign(rr,$.str`items`)},()=>{Yt(Ot,Rt.properties),Mt.assign(rr,$.str`properties`)}),tr=$._`[${rr}]`):Nt?(Mt.if(Ut),Yt(Nt,Rt.items),tr=$._`.items`):Ot&&(Mt.if(j.and(jt,j.not(Ut))),Yt(Ot,Rt.properties),tr=$._`.properties`),Mt.forOf("err",rt.default.vErrors,Wt=>wt(Wt,Vt,fr=>Mt.code($._`${Vt}[${fr}].push(${Wt})`).assign($._`${Wt}.${ct}`,!0))),Mt.forIn("key",Vt,Wt=>Mt.if($._`${Vt}[${Wt}].length`,()=>{tt.reportError(St,{message:$._`${Wt} in ${Zt} ? ${Zt}[${Wt}]() : ${Ct}${tr}[${Wt}]`,params:$._`{errors: ${Vt}[${Wt}]}`}),Mt.assign($._`${rt.default.vErrors}[${rt.default.errors}-1].instancePath`,$._`${Dt} + "/" + ${Wt}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),Mt.endIf();function Yt(Wt,fr){Mt.assign(Vt,$.stringify(Wt)),Mt.assign(Zt,gt(Wt,fr))}}function lt(Pt){const Ot=Mt.const("emErrs",$._`[]`);Mt.forOf("err",rt.default.vErrors,Nt=>Mt.if(At(Nt),()=>Mt.code($._`${Ot}.push(${Nt})`).assign($._`${Nt}.${ct}`,!0))),Mt.if($._`${Ot}.length`,()=>tt.reportError(St,{message:ot(Pt),params:$._`{errors: ${Ot}}`}))}function ht(){const Pt=Mt.const("emErrs",$._`[]`);Mt.forOf("err",rt.default.vErrors,Ot=>Mt.if($._`!${Ot}.${ct}`,()=>Mt.code($._`${Pt}.push(${Ot})`))),Mt.assign(rt.default.vErrors,Pt).assign(rt.default.errors,$._`${Pt}.length`)}function mt(Pt,Ot){return j.and($._`${Pt}.keyword !== ${at}`,$._`!${Pt}.${ct}`,$._`${Pt}.instancePath === ${Dt}`,$._`${Pt}.keyword in ${Ot}`,$._`${Pt}.schemaPath.indexOf(${It.errSchemaPath}) === 0`,$._`/^\\/[^\\/]*$/.test(${Pt}.schemaPath.slice(${It.errSchemaPath.length}))`)}function wt(Pt,Ot,Nt){Mt.if(j.and($._`${Pt}.keyword !== ${at}`,$._`!${Pt}.${ct}`,$._`${Pt}.instancePath.indexOf(${Dt}) === 0`),()=>{const jt=Mt.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:$._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),Ut=Mt.const("emMatches",$._`${jt}.exec(${Pt}.instancePath.slice(${Dt}.length))`),Vt=Mt.const("emChild",$._`${Ut} && ${Ut}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);Mt.if($._`${Vt} !== undefined && ${Vt} in ${Ot}`,()=>Nt(Vt))})}function At(Pt){return j.and($._`${Pt}.keyword !== ${at}`,$._`!${Pt}.${ct}`,j.or($._`${Pt}.instancePath === ${Dt}`,j.and($._`${Pt}.instancePath.indexOf(${Dt}) === 0`,$._`${Pt}.instancePath[${Dt}.length] === "/"`)),$._`${Pt}.schemaPath.indexOf(${It.errSchemaPath}) === 0`,$._`${Pt}.schemaPath[${It.errSchemaPath}.length] === "/"`)}function gt(Pt,Ot){const Nt=[];for(const jt in Pt){const Ut=Ot[jt];yt.test(Ut)&&Nt.push([jt,pt(Ut)])}return Mt.object(...Nt)}function ot(Pt){return yt.test(Pt)?new _e._Code(_e.safeStringify(Pt).replace(bt,(Ot,Nt)=>`" + JSON.stringify(${et.getData(Nt,It)}) + "`).replace(Et,"")):$.stringify(Pt)}function pt(Pt){return $._`function(){return ${ot(Pt)}}`}},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 _t=(xt,St={})=>{if(!xt.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(xt.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return xt.addKeyword($t(St))};_.default=_t,a.exports=_t,a.exports.default=_t})(dist$9,dist$9.exports);var distExports$1=dist$9.exports,__importDefault$8=commonjsGlobal&&commonjsGlobal.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(validation$5,"__esModule",{value:!0});validation$5.validateType=validation$5.generateLazyValidator=validation$5.Ajv=void 0;const ajv_1$3=__importDefault$8(ajvExports);validation$5.Ajv=ajv_1$3.default;const ajv_keywords_1$3=__importDefault$8(distExports$2),ajv_errors_1$3=__importDefault$8(distExports$1);function generateLazyValidator$3(a,_){let $=null;const j=(_e,et)=>{if(!$){const tt=new ajv_1$3.default({$data:!0,allErrors:!0});(0,ajv_keywords_1$3.default)(tt),(0,ajv_errors_1$3.default)(tt,{singleError:!0}),_==null||_.forEach(rt=>tt.addKeyword(rt)),$=tt.compile(a),Object.defineProperty(j,"errors",{get(){return $==null?void 0:$.errors}})}return $(_e,et)};return j}validation$5.generateLazyValidator=generateLazyValidator$3;function validateType$3(a,_){return a.validate(_)}validation$5.validateType=validateType$3;var chainName$2={},hasRequiredChainName$2;function requireChainName$2(){return hasRequiredChainName$2||(hasRequiredChainName$2=1,function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.getChainId=a.ChainName=void 0;const _=validation$5,$=requireChainId$2();var j;(function(et){et.ETHEREUM_MAINNET="Ethereum Mainnet",et.ETHEREUM_ROPSTEN="Ropsten",et.ETHEREUM_RINKEBY="Rinkeby",et.ETHEREUM_GOERLI="Goerli",et.ETHEREUM_KOVAN="Kovan",et.ETHEREUM_SEPOLIA="Sepolia",et.MATIC_MAINNET="Polygon",et.MATIC_MUMBAI="Mumbai",et.MATIC_AMOY="Amoy",et.AVALANCHE_MAINNET="Avalanche",et.BINANCE_MAINNET="Binance Smart Chain",et.ARBITRUM_MAINNET="Arbitrum",et.OPTIMISM_MAINNET="Optimism",et.FANTOM_MAINNET="Fantom"})(j=a.ChainName||(a.ChainName={}));function _e(et){switch(et){case j.ETHEREUM_MAINNET:return $.ChainId.ETHEREUM_MAINNET;case j.ETHEREUM_ROPSTEN:return $.ChainId.ETHEREUM_ROPSTEN;case j.ETHEREUM_RINKEBY:return $.ChainId.ETHEREUM_RINKEBY;case j.ETHEREUM_GOERLI:return $.ChainId.ETHEREUM_GOERLI;case j.ETHEREUM_KOVAN:return $.ChainId.ETHEREUM_KOVAN;case j.ETHEREUM_SEPOLIA:return $.ChainId.ETHEREUM_SEPOLIA;case j.MATIC_MAINNET:return $.ChainId.MATIC_MAINNET;case j.MATIC_MUMBAI:return $.ChainId.MATIC_MUMBAI;case j.MATIC_AMOY:return $.ChainId.MATIC_AMOY;case j.AVALANCHE_MAINNET:return $.ChainId.AVALANCHE_MAINNET;case j.BINANCE_MAINNET:return $.ChainId.BSC_MAINNET;case j.ARBITRUM_MAINNET:return $.ChainId.ARBITRUM_MAINNET;case j.OPTIMISM_MAINNET:return $.ChainId.OPTIMISM_MAINNET;case j.FANTOM_MAINNET:return $.ChainId.FANTOM_MAINNET;default:return null}}a.getChainId=_e,function(et){et.schema={type:"string",enum:Object.values(et)},et.validate=(0,_.generateLazyValidator)(et.schema)}(j=a.ChainName||(a.ChainName={}))}(chainName$2)),chainName$2}var network$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Network=void 0;const _=validation$5;(function($){$.ETHEREUM="ETHEREUM",$.MATIC="MATIC",$.AVALANCHE="AVALANCHE",$.BSC="BINANCE SMART CHAIN",$.OPTIMISM="OPTIMISM",$.ARBITRUM="ARBITRUM",$.FANTOM="FANTOM"})(a.Network||(a.Network={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.Network||(a.Network={}))})(network$2);var hasRequiredChainId$2;function requireChainId$2(){return hasRequiredChainId$2||(hasRequiredChainId$2=1,function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.getNetwork=a.getNetworkMapping=a.getURNProtocol=a.getChainName=a.ChainId=void 0;const _=validation$5,$=requireChainName$2(),j=network$2;var _e;(function(ct){ct[ct.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",ct[ct.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",ct[ct.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",ct[ct.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",ct[ct.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",ct[ct.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",ct[ct.MATIC_MAINNET=137]="MATIC_MAINNET",ct[ct.MATIC_MUMBAI=80001]="MATIC_MUMBAI",ct[ct.MATIC_AMOY=80002]="MATIC_AMOY",ct[ct.BSC_MAINNET=56]="BSC_MAINNET",ct[ct.OPTIMISM_MAINNET=10]="OPTIMISM_MAINNET",ct[ct.ARBITRUM_MAINNET=42161]="ARBITRUM_MAINNET",ct[ct.FANTOM_MAINNET=250]="FANTOM_MAINNET",ct[ct.AVALANCHE_MAINNET=43114]="AVALANCHE_MAINNET"})(_e=a.ChainId||(a.ChainId={}));function et(ct){switch(ct){case _e.ETHEREUM_MAINNET:return $.ChainName.ETHEREUM_MAINNET;case _e.ETHEREUM_ROPSTEN:return $.ChainName.ETHEREUM_ROPSTEN;case _e.ETHEREUM_RINKEBY:return $.ChainName.ETHEREUM_RINKEBY;case _e.ETHEREUM_GOERLI:return $.ChainName.ETHEREUM_GOERLI;case _e.ETHEREUM_KOVAN:return $.ChainName.ETHEREUM_KOVAN;case _e.ETHEREUM_SEPOLIA:return $.ChainName.ETHEREUM_SEPOLIA;case _e.MATIC_MAINNET:return $.ChainName.MATIC_MAINNET;case _e.MATIC_MUMBAI:return $.ChainName.MATIC_MUMBAI;case _e.MATIC_AMOY:return $.ChainName.MATIC_AMOY;case _e.BSC_MAINNET:return $.ChainName.BINANCE_MAINNET;case _e.ARBITRUM_MAINNET:return $.ChainName.ARBITRUM_MAINNET;case _e.OPTIMISM_MAINNET:return $.ChainName.OPTIMISM_MAINNET;case _e.FANTOM_MAINNET:return $.ChainName.FANTOM_MAINNET;case _e.AVALANCHE_MAINNET:return $.ChainName.AVALANCHE_MAINNET;default:return null}}a.getChainName=et;function tt(ct){switch(ct){case _e.ETHEREUM_MAINNET:return"ethereum";case _e.ETHEREUM_ROPSTEN:return"ropsten";case _e.ETHEREUM_RINKEBY:return"rinkeby";case _e.ETHEREUM_GOERLI:return"goerli";case _e.ETHEREUM_KOVAN:return"kovan";case _e.ETHEREUM_SEPOLIA:return"sepolia";case _e.MATIC_MAINNET:return"matic";case _e.MATIC_MUMBAI:return"mumbai";case _e.MATIC_AMOY:return"amoy";default:return""}}a.getURNProtocol=tt;function rt(ct){const dt={[j.Network.BSC]:_e.BSC_MAINNET,[j.Network.OPTIMISM]:_e.OPTIMISM_MAINNET,[j.Network.ARBITRUM]:_e.ARBITRUM_MAINNET,[j.Network.FANTOM]:_e.FANTOM_MAINNET,[j.Network.AVALANCHE]:_e.AVALANCHE_MAINNET};switch(ct){case _e.ETHEREUM_MAINNET:return Object.assign({[j.Network.ETHEREUM]:_e.ETHEREUM_MAINNET,[j.Network.MATIC]:_e.MATIC_MAINNET},dt);case _e.ETHEREUM_ROPSTEN:return Object.assign({[j.Network.ETHEREUM]:_e.ETHEREUM_ROPSTEN,[j.Network.MATIC]:_e.MATIC_MUMBAI},dt);case _e.ETHEREUM_RINKEBY:return Object.assign({[j.Network.ETHEREUM]:_e.ETHEREUM_RINKEBY,[j.Network.MATIC]:_e.MATIC_MUMBAI},dt);case _e.ETHEREUM_GOERLI:return Object.assign({[j.Network.ETHEREUM]:_e.ETHEREUM_GOERLI,[j.Network.MATIC]:_e.MATIC_MUMBAI},dt);case _e.ETHEREUM_KOVAN:return Object.assign({[j.Network.ETHEREUM]:_e.ETHEREUM_KOVAN,[j.Network.MATIC]:_e.MATIC_MUMBAI},dt);case _e.ETHEREUM_SEPOLIA:return Object.assign({[j.Network.ETHEREUM]:_e.ETHEREUM_SEPOLIA,[j.Network.MATIC]:_e.MATIC_AMOY},dt);case _e.MATIC_MAINNET:return Object.assign({[j.Network.ETHEREUM]:_e.MATIC_MAINNET,[j.Network.MATIC]:_e.MATIC_MAINNET},dt);case _e.MATIC_MUMBAI:return Object.assign({[j.Network.ETHEREUM]:_e.MATIC_MUMBAI,[j.Network.MATIC]:_e.MATIC_MUMBAI},dt);case _e.MATIC_AMOY:return Object.assign({[j.Network.ETHEREUM]:_e.MATIC_AMOY,[j.Network.MATIC]:_e.MATIC_AMOY},dt);default:return Object.assign({[j.Network.ETHEREUM]:_e.ETHEREUM_MAINNET,[j.Network.MATIC]:_e.MATIC_MAINNET},dt)}}a.getNetworkMapping=rt;function at(ct){switch(ct){case _e.ETHEREUM_MAINNET:case _e.ETHEREUM_ROPSTEN:case _e.ETHEREUM_GOERLI:case _e.ETHEREUM_KOVAN:case _e.ETHEREUM_RINKEBY:case _e.ETHEREUM_SEPOLIA:return j.Network.ETHEREUM;case _e.MATIC_MAINNET:case _e.MATIC_MUMBAI:case _e.MATIC_AMOY:return j.Network.MATIC;case _e.BSC_MAINNET:return j.Network.BSC;case _e.OPTIMISM_MAINNET:return j.Network.OPTIMISM;case _e.ARBITRUM_MAINNET:return j.Network.ARBITRUM;case _e.FANTOM_MAINNET:return j.Network.FANTOM;case _e.AVALANCHE_MAINNET:return j.Network.AVALANCHE}}a.getNetwork=at,function(ct){ct.schema={type:"number",enum:Object.values(ct)},ct.validate=(0,_.generateLazyValidator)(ct.schema)}(_e=a.ChainId||(a.ChainId={}))}(chainId$2)),chainId$2}var chainIdExports=requireChainId$2(),providerType$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.ProviderType=void 0;const _=validation$5;(function($){$.INJECTED="injected",$.MAGIC="magic",$.MAGIC_TEST="magic_test",$.FORTMATIC="formatic",$.NETWORK="network",$.WALLET_CONNECT="wallet_connect",$.WALLET_CONNECT_V2="wallet_connect_v2",$.WALLET_LINK="wallet_link",$.METAMASK_MOBILE="metamask_mobile",$.AUTH_SERVER="auth_server"})(a.ProviderType||(a.ProviderType={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.ProviderType||(a.ProviderType={}))})(providerType$2);var ConnectorEvent;(function(a){a.Update="Web3ReactUpdate",a.Error="Web3ReactError",a.Deactivate="Web3ReactDeactivate"})(ConnectorEvent||(ConnectorEvent={}));var events$1={exports:{}},R=typeof Reflect=="object"?Reflect:null,ReflectApply=R&&typeof R.apply=="function"?R.apply:function(_,$,j){return Function.prototype.apply.call(_,$,j)},ReflectOwnKeys;R&&typeof R.ownKeys=="function"?ReflectOwnKeys=R.ownKeys:Object.getOwnPropertySymbols?ReflectOwnKeys=function(_){return Object.getOwnPropertyNames(_).concat(Object.getOwnPropertySymbols(_))}:ReflectOwnKeys=function(_){return Object.getOwnPropertyNames(_)};function ProcessEmitWarning(a){console&&console.warn&&console.warn(a)}var NumberIsNaN=Number.isNaN||function(_){return _!==_};function EventEmitter(){EventEmitter.init.call(this)}events$1.exports=EventEmitter;events$1.exports.once=once$2;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=void 0;EventEmitter.prototype._eventsCount=0;EventEmitter.prototype._maxListeners=void 0;var defaultMaxListeners=10;function checkListener(a){if(typeof a!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof a)}Object.defineProperty(EventEmitter,"defaultMaxListeners",{enumerable:!0,get:function(){return defaultMaxListeners},set:function(a){if(typeof a!="number"||a<0||NumberIsNaN(a))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+a+".");defaultMaxListeners=a}});EventEmitter.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};EventEmitter.prototype.setMaxListeners=function(_){if(typeof _!="number"||_<0||NumberIsNaN(_))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+_+".");return this._maxListeners=_,this};function _getMaxListeners(a){return a._maxListeners===void 0?EventEmitter.defaultMaxListeners:a._maxListeners}EventEmitter.prototype.getMaxListeners=function(){return _getMaxListeners(this)};EventEmitter.prototype.emit=function(_){for(var $=[],j=1;j<arguments.length;j++)$.push(arguments[j]);var _e=_==="error",et=this._events;if(et!==void 0)_e=_e&&et.error===void 0;else if(!_e)return!1;if(_e){var tt;if($.length>0&&(tt=$[0]),tt instanceof Error)throw tt;var rt=new Error("Unhandled error."+(tt?" ("+tt.message+")":""));throw rt.context=tt,rt}var at=et[_];if(at===void 0)return!1;if(typeof at=="function")ReflectApply(at,this,$);else for(var ct=at.length,dt=arrayClone(at,ct),j=0;j<ct;++j)ReflectApply(dt[j],this,$);return!0};function _addListener(a,_,$,j){var _e,et,tt;if(checkListener($),et=a._events,et===void 0?(et=a._events=Object.create(null),a._eventsCount=0):(et.newListener!==void 0&&(a.emit("newListener",_,$.listener?$.listener:$),et=a._events),tt=et[_]),tt===void 0)tt=et[_]=$,++a._eventsCount;else if(typeof tt=="function"?tt=et[_]=j?[$,tt]:[tt,$]:j?tt.unshift($):tt.push($),_e=_getMaxListeners(a),_e>0&&tt.length>_e&&!tt.warned){tt.warned=!0;var rt=new Error("Possible EventEmitter memory leak detected. "+tt.length+" "+String(_)+" listeners added. Use emitter.setMaxListeners() to increase limit");rt.name="MaxListenersExceededWarning",rt.emitter=a,rt.type=_,rt.count=tt.length,ProcessEmitWarning(rt)}return a}EventEmitter.prototype.addListener=function(_,$){return _addListener(this,_,$,!1)};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.prependListener=function(_,$){return _addListener(this,_,$,!0)};function onceWrapper(){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 _onceWrap(a,_,$){var j={fired:!1,wrapFn:void 0,target:a,type:_,listener:$},_e=onceWrapper.bind(j);return _e.listener=$,j.wrapFn=_e,_e}EventEmitter.prototype.once=function(_,$){return checkListener($),this.on(_,_onceWrap(this,_,$)),this};EventEmitter.prototype.prependOnceListener=function(_,$){return checkListener($),this.prependListener(_,_onceWrap(this,_,$)),this};EventEmitter.prototype.removeListener=function(_,$){var j,_e,et,tt,rt;if(checkListener($),_e=this._events,_e===void 0)return this;if(j=_e[_],j===void 0)return this;if(j===$||j.listener===$)--this._eventsCount===0?this._events=Object.create(null):(delete _e[_],_e.removeListener&&this.emit("removeListener",_,j.listener||$));else if(typeof j!="function"){for(et=-1,tt=j.length-1;tt>=0;tt--)if(j[tt]===$||j[tt].listener===$){rt=j[tt].listener,et=tt;break}if(et<0)return this;et===0?j.shift():spliceOne(j,et),j.length===1&&(_e[_]=j[0]),_e.removeListener!==void 0&&this.emit("removeListener",_,rt||$)}return this};EventEmitter.prototype.off=EventEmitter.prototype.removeListener;EventEmitter.prototype.removeAllListeners=function(_){var $,j,_e;if(j=this._events,j===void 0)return this;if(j.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):j[_]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete j[_]),this;if(arguments.length===0){var et=Object.keys(j),tt;for(_e=0;_e<et.length;++_e)tt=et[_e],tt!=="removeListener"&&this.removeAllListeners(tt);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if($=j[_],typeof $=="function")this.removeListener(_,$);else if($!==void 0)for(_e=$.length-1;_e>=0;_e--)this.removeListener(_,$[_e]);return this};function _listeners(a,_,$){var j=a._events;if(j===void 0)return[];var _e=j[_];return _e===void 0?[]:typeof _e=="function"?$?[_e.listener||_e]:[_e]:$?unwrapListeners(_e):arrayClone(_e,_e.length)}EventEmitter.prototype.listeners=function(_){return _listeners(this,_,!0)};EventEmitter.prototype.rawListeners=function(_){return _listeners(this,_,!1)};EventEmitter.listenerCount=function(a,_){return typeof a.listenerCount=="function"?a.listenerCount(_):listenerCount.call(a,_)};EventEmitter.prototype.listenerCount=listenerCount;function listenerCount(a){var _=this._events;if(_!==void 0){var $=_[a];if(typeof $=="function")return 1;if($!==void 0)return $.length}return 0}EventEmitter.prototype.eventNames=function(){return this._eventsCount>0?ReflectOwnKeys(this._events):[]};function arrayClone(a,_){for(var $=new Array(_),j=0;j<_;++j)$[j]=a[j];return $}function spliceOne(a,_){for(;_+1<a.length;_++)a[_]=a[_+1];a.pop()}function unwrapListeners(a){for(var _=new Array(a.length),$=0;$<_.length;++$)_[$]=a[$].listener||a[$];return _}function once$2(a,_){return new Promise(function($,j){function _e(tt){a.removeListener(_,et),j(tt)}function et(){typeof a.removeListener=="function"&&a.removeListener("error",_e),$([].slice.call(arguments))}eventTargetAgnosticAddListener(a,_,et,{once:!0}),_!=="error"&&addErrorHandlerIfEventEmitter(a,_e,{once:!0})})}function addErrorHandlerIfEventEmitter(a,_,$){typeof a.on=="function"&&eventTargetAgnosticAddListener(a,"error",_,$)}function eventTargetAgnosticAddListener(a,_,$,j){if(typeof a.on=="function")j.once?a.once(_,$):a.on(_,$);else if(typeof a.addEventListener=="function")a.addEventListener(_,function _e(et){j.once&&a.removeEventListener(_,_e),$(et)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof a)}var eventsExports=events$1.exports;const it=getDefaultExportFromCjs$1(eventsExports);function _inheritsLoose$5(a,_){a.prototype=Object.create(_.prototype),a.prototype.constructor=a,a.__proto__=_}var AbstractConnector=function(a){_inheritsLoose$5(_,a);function _(j){var _e,et=j===void 0?{}:j,tt=et.supportedChainIds;return _e=a.call(this)||this,_e.supportedChainIds=tt,_e}var $=_.prototype;return $.emitUpdate=function(_e){this.emit(ConnectorEvent.Update,_e)},$.emitError=function(_e){this.emit(ConnectorEvent.Error,_e)},$.emitDeactivate=function(){this.emit(ConnectorEvent.Deactivate)},_}(eventsExports.EventEmitter);const scriptRel="modulepreload",assetsURL=function(a){return"https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239440432.commit-2fa6a22/"+a},seen={},__vitePreload=function(_,$,j){if(!$||$.length===0)return _();const _e=document.getElementsByTagName("link");return Promise.all($.map(et=>{if(et=assetsURL(et),et in seen)return;seen[et]=!0;const tt=et.endsWith(".css"),rt=tt?'[rel="stylesheet"]':"";if(!!j)for(let dt=_e.length-1;dt>=0;dt--){const yt=_e[dt];if(yt.href===et&&(!tt||yt.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${et}"]${rt}`))return;const ct=document.createElement("link");if(ct.rel=tt?"stylesheet":scriptRel,tt||(ct.as="script",ct.crossOrigin=""),ct.href=et,document.head.appendChild(ct),tt)return new Promise((dt,yt)=>{ct.addEventListener("load",dt),ct.addEventListener("error",()=>yt(new Error(`Unable to preload CSS for ${et}`)))})})).then(()=>_()).catch(et=>{const tt=new Event("vite:preloadError",{cancelable:!0});if(tt.payload=et,window.dispatchEvent(tt),!tt.defaultPrevented)throw et})};var dist$8={},sdk$2={},ws$2={},sceneUpdate$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.SceneUpdate=a.SCENE_UPDATE=void 0;const _=validation$5;a.SCENE_UPDATE="SCENE_UPDATE",function($){$.schema={type:"object",properties:{type:{type:"string",enum:[a.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},$.validate=(0,_.generateLazyValidator)($.schema)}(a.SceneUpdate||(a.SceneUpdate={}))})(sceneUpdate$2);var update$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Update=a.UPDATE=void 0;const _=validation$5;a.UPDATE="update",function($){$.schema={type:"object",properties:{type:{type:"string",enum:[a.UPDATE]}},required:["type"]},$.validate=(0,_.generateLazyValidator)($.schema)}(a.Update||(a.Update={}))})(update$2);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(sceneUpdate$2,a),$(update$2,a)})(ws$2);var project$2={},type$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.ProjectType=void 0;const _=validation$5;(function($){$.SCENE="scene",$.SMART_ITEM="smart-item",$.PORTABLE_EXPERIENCE="portable-experience",$.LIBRARY="library"})(a.ProjectType||(a.ProjectType={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.ProjectType||(a.ProjectType={}))})(type$2);var wearableJson$2={},rarity$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Rarity=void 0;const _=validation$5;(function($){$.UNIQUE="unique",$.MYTHIC="mythic",$.EXOTIC="exotic",$.LEGENDARY="legendary",$.EPIC="epic",$.RARE="rare",$.UNCOMMON="uncommon",$.COMMON="common"})(a.Rarity||(a.Rarity={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema);const j={[$.UNIQUE]:1,[$.MYTHIC]:10,[$.EXOTIC]:50,[$.LEGENDARY]:100,[$.EPIC]:1e3,[$.RARE]:5e3,[$.UNCOMMON]:1e4,[$.COMMON]:1e5},_e={[$.UNIQUE]:"#FFE617",[$.MYTHIC]:"#FB7DE3",[$.EXOTIC]:"#E4FFB8",[$.LEGENDARY]:"#A657ED",[$.EPIC]:"#6397F2",[$.RARE]:"#3AD682",[$.UNCOMMON]:"#FF8563",[$.COMMON]:"#D4E0E0"},et={[$.UNIQUE]:"#FFB626",[$.MYTHIC]:"#FF63E1",[$.EXOTIC]:"#CAFF73",[$.LEGENDARY]:"#842DDA",[$.EPIC]:"#3D85E6",[$.RARE]:"#36CF75",[$.UNCOMMON]:"#ED6D4F",[$.COMMON]:"#ABC1C1"};function tt(dt){return j[dt]}$.getMaxSupply=tt;function rt(dt){return et[dt]}$.getColor=rt;function at(){return[$.UNIQUE,$.MYTHIC,$.EXOTIC,$.LEGENDARY,$.EPIC,$.RARE,$.UNCOMMON,$.COMMON]}$.getRarities=at;function ct(dt){return[_e[dt],et[dt]]}$.getGradient=ct}(a.Rarity||(a.Rarity={}))})(rarity$2);var wearableCategory$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.WearableCategory=void 0;const _=validation$5;(function($){$.EYEBROWS="eyebrows",$.EYES="eyes",$.FACIAL_HAIR="facial_hair",$.HAIR="hair",$.BODY_SHAPE="body_shape",$.MOUTH="mouth",$.UPPER_BODY="upper_body",$.LOWER_BODY="lower_body",$.FEET="feet",$.EARRING="earring",$.EYEWEAR="eyewear",$.HAT="hat",$.HELMET="helmet",$.MASK="mask",$.TIARA="tiara",$.TOP_HEAD="top_head",$.SKIN="skin",$.HANDS_WEAR="hands_wear"})(a.WearableCategory||(a.WearableCategory={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.WearableCategory||(a.WearableCategory={}))})(wearableCategory$2);var representation$2={},bodyShape$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.BodyShape=void 0;const _=validation$5;(function($){$.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",$.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(a.BodyShape||(a.BodyShape={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.BodyShape||(a.BodyShape={}))})(bodyShape$2);var hideableCategory$2={},bodyPartCategory$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.BodyPartCategory=void 0;const _=validation$5;(function($){$.HEAD="head",$.HANDS="hands"})(a.BodyPartCategory||(a.BodyPartCategory={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.BodyPartCategory||(a.BodyPartCategory={}))})(bodyPartCategory$2);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.HideableWearableCategory=void 0;const _=wearableCategory$2,$=validation$5,j=bodyPartCategory$2;(function(_e){_e.schema={oneOf:[Object.assign({},_.WearableCategory.schema),Object.assign({},j.BodyPartCategory.schema)]},_e.validate=(0,$.generateLazyValidator)(_e.schema)})(a.HideableWearableCategory||(a.HideableWearableCategory={}))})(hideableCategory$2);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.WearableRepresentation=void 0;const _=validation$5,$=bodyShape$2,j=hideableCategory$2;(function(_e){_e.schema={type:"object",properties:{bodyShapes:{type:"array",items:$.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:j.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:j.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},_e.validate=(0,_.generateLazyValidator)(_e.schema)})(a.WearableRepresentation||(a.WearableRepresentation={}))})(representation$2);var platform$2={},profile$5={},avatar$2={},misc$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.IPFSv1=a.IPFSv2=a.EthAddress=a.Color3=void 0;const _=validation$5;(function($){$.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 j=(0,_.generateLazyValidator)($.schema);$.validate=_e=>j(_e)})(a.Color3||(a.Color3={})),function($){$.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const j=new RegExp($.schema.pattern);$.validate=_e=>j.test(_e)}(a.EthAddress||(a.EthAddress={})),function($){$.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const j=new RegExp($.schema.pattern);$.validate=_e=>j.test(_e)}(a.IPFSv2||(a.IPFSv2={})),function($){$.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const j=new RegExp($.schema.pattern);$.validate=_e=>j.test(_e)}(a.IPFSv1||(a.IPFSv1={}))})(misc$2);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Avatar=a.Link=a.LinkUrl=a.AvatarInfo=a.Snapshots=void 0;const _=wearableCategory$2,$=misc$2,j=validation$5;var _e;(function(at){at.schema={type:"object",required:["face256","body"],properties:{face256:$.IPFSv2.schema,body:$.IPFSv2.schema}},at.validate=(0,j.generateLazyValidator)(at.schema)})(_e=a.Snapshots||(a.Snapshots={}));var et;(function(at){at.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:$.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:$.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:$.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:_.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:_e.schema},additionalProperties:!0},at.validate=(0,j.generateLazyValidator)(at.schema)})(et=a.AvatarInfo||(a.AvatarInfo={}));var tt;(function(at){at.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const ct=new RegExp(at.schema.pattern,"i");at.validate=dt=>ct.test(dt)})(tt=a.LinkUrl||(a.LinkUrl={}));var rt;(function(at){at.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:tt.schema}}})(rt=a.Link||(a.Link={})),function(at){at.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:rt.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:$.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:et.schema},additionalProperties:!0},at.validate=(0,j.generateLazyValidator)(at.schema)}(a.Avatar||(a.Avatar={}))})(avatar$2);var profile$4={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Profile=void 0;const _=validation$5,$=avatar$2;(function(j){j.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:$.Avatar.schema}},additionalProperties:!0},j.validate=(0,_.generateLazyValidator)(j.schema)})(a.Profile||(a.Profile={}))})(profile$4);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(avatar$2,a),$(profile$4,a)})(profile$5);var scene$5={},featureToggles$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.FeatureToggles=a.portableExperiencesToggles=a.toggles=void 0;const _=validation$5;a.toggles=["enabled","disabled"],a.portableExperiencesToggles=[...a.toggles,"hideUi"],function($){$.schema={type:"object",properties:{voiceChat:{type:"string",enum:a.toggles,nullable:!0},portableExperiences:{type:"string",enum:a.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${a.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${a.toggles.join(", ")}`,required:[]},$.validate=(0,_.generateLazyValidator)($.schema)}(a.FeatureToggles||(a.FeatureToggles={}))})(featureToggles$2);var worldConfiguration$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.WorldConfiguration=void 0;const _=validation$5;(function($){$.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:[]},$.validate=(0,_.generateLazyValidator)($.schema)})(a.WorldConfiguration||(a.WorldConfiguration={}))})(worldConfiguration$2);var sceneParcels$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.SceneParcels=void 0;const _=validation$5;(function($){$.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"]},$.schemaValidator=(0,_.generateLazyValidator)($.schema),$.validate=j=>$.schemaValidator(j)&&j.parcels.includes(j.base)})(a.SceneParcels||(a.SceneParcels={}))})(sceneParcels$2);var scene$4={},displayable$2={};Object.defineProperty(displayable$2,"__esModule",{value:!0});displayable$2.displayableProperties=void 0;displayable$2.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}};var source$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Source=void 0;const _=validation$5;(function($){$.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"]},$.validate=(0,_.generateLazyValidator)($.schema)})(a.Source||(a.Source={}))})(source$2);var spawnPoint$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.SpawnPoint=void 0;const _=validation$5;(function($){$.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"]}}},$.validate=(0,_.generateLazyValidator)($.schema)})(a.SpawnPoint||(a.SpawnPoint={}))})(spawnPoint$2);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Scene=a.RequiredPermission=void 0;const _=validation$5,$=displayable$2,j=featureToggles$2,_e=sceneParcels$2,et=source$2,tt=spawnPoint$2,rt=worldConfiguration$2;var at;(function(ct){ct.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",ct.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",ct.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",ct.USE_WEB3_API="USE_WEB3_API",ct.USE_FETCH="USE_FETCH",ct.USE_WEBSOCKET="USE_WEBSOCKET",ct.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(at=a.RequiredPermission||(a.RequiredPermission={})),function(ct){ct.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:_e.SceneParcels.schema},$.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({},et.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:tt.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(at)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},j.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},rt.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:at.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}}}}}},ct.validate=(0,_.generateLazyValidator)(ct.schema)}(a.Scene||(a.Scene={}))})(scene$4);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.SpawnPoint=a.Source=a.RequiredPermission=a.Scene=a.SceneParcels=a.WorldConfiguration=a.FeatureToggles=void 0;var _=featureToggles$2;Object.defineProperty(a,"FeatureToggles",{enumerable:!0,get:function(){return _.FeatureToggles}});var $=worldConfiguration$2;Object.defineProperty(a,"WorldConfiguration",{enumerable:!0,get:function(){return $.WorldConfiguration}});var j=sceneParcels$2;Object.defineProperty(a,"SceneParcels",{enumerable:!0,get:function(){return j.SceneParcels}});var _e=scene$4;Object.defineProperty(a,"Scene",{enumerable:!0,get:function(){return _e.Scene}}),Object.defineProperty(a,"RequiredPermission",{enumerable:!0,get:function(){return _e.RequiredPermission}});var et=source$2;Object.defineProperty(a,"Source",{enumerable:!0,get:function(){return et.Source}});var tt=spawnPoint$2;Object.defineProperty(a,"SpawnPoint",{enumerable:!0,get:function(){return tt.SpawnPoint}})})(scene$5);var item$5={},i18n$2={},locale$3={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Locale=void 0;const _=validation$5;(function($){$.EN="en",$.ES="es"})(a.Locale||(a.Locale={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.Locale||(a.Locale={}))})(locale$3);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.I18N=void 0;const _=validation$5,$=locale$3;(function(j){j.schema={type:"object",properties:{code:$.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},j.validate=(0,_.generateLazyValidator)(j.schema)})(a.I18N||(a.I18N={}))})(i18n$2);var metrics$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Metrics=void 0;const _=validation$5;(function($){$.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"]},$.validate=(0,_.generateLazyValidator)($.schema)})(a.Metrics||(a.Metrics={}))})(metrics$2);var standardProps$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.isStandard=a.standardProperties=void 0;const _=rarity$2,$=validation$5;a.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:_.Rarity.schema};const j={type:"object",properties:Object.assign({},a.standardProperties),required:["collectionAddress","rarity"]},_e=(0,$.generateLazyValidator)(j);function et(tt){return _e(tt)}a.isStandard=et})(standardProps$2);var thirdPartyProps$2={},merkleTree$2={},merkleProof$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.MerkleProof=void 0;const _=validation$5;(function($){$.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},$.validate=(0,_.generateLazyValidator)($.schema)})(a.MerkleProof||(a.MerkleProof={}))})(merkleProof$2);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(merkleProof$2,a)})(merkleTree$2);var linkedWearableMappings={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.createMappingsHelper=a.AddMappingError=a.Mappings=a.Mapping=a.MultipleMapping=a.RangeMapping=a.AnyMapping=a.SingleMapping=a.ContractNetwork=a.MappingType=void 0;const _=validation$5;var $;(function(yt){yt.SINGLE="single",yt.ANY="any",yt.MULTIPLE="multiple",yt.RANGE="range"})($=a.MappingType||(a.MappingType={}));var j;(function(yt){yt.MAINNET="mainnet",yt.MATIC="matic",yt.SEPOLIA="sepolia",yt.AMOY="amoy"})(j=a.ContractNetwork||(a.ContractNetwork={}));var _e;(function(yt){yt.schema={type:"object",properties:{type:{type:"string",const:$.SINGLE},id:{type:"string",pattern:"^[0-9]+$"}},required:["type","id"],additionalProperties:!1},yt.validate=(0,_.generateLazyValidator)(yt.schema)})(_e=a.SingleMapping||(a.SingleMapping={}));var et;(function(yt){yt.schema={type:"object",properties:{type:{type:"string",const:$.ANY}},required:["type"],additionalProperties:!1},yt.validate=(0,_.generateLazyValidator)(yt.schema)})(et=a.AnyMapping||(a.AnyMapping={}));var tt;(function(yt){yt._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(Et,$t){if(!$t||!$t.from||!$t.to)return!1;let{to:_t,from:xt}=$t;return(typeof xt!="bigint"||typeof _t!="bigint")&&(xt=BigInt(xt),_t=BigInt(_t)),xt<=_t},errors:!1},yt.schema={type:"object",properties:{type:{type:"string",const:$.RANGE},from:{type:"string",pattern:"^[0-9]+$"},to:{type:"string",pattern:"^[0-9]+$"}},required:["type","from","to"],additionalProperties:!1,_fromLessThanOrEqualTo:!0},yt.validate=(0,_.generateLazyValidator)(yt.schema,[yt._fromLessThanOrEqualTo])})(tt=a.RangeMapping||(a.RangeMapping={}));var rt;(function(yt){yt.schema={type:"object",properties:{type:{type:"string",const:$.MULTIPLE},ids:{type:"array",items:{type:"string",pattern:"^[0-9]+$"},minItems:1,uniqueItems:!0}},required:["type","ids"],additionalProperties:!1},yt.validate=(0,_.generateLazyValidator)(yt.schema)})(rt=a.MultipleMapping||(a.MultipleMapping={}));var at;(function(yt){yt.schema={type:"object",properties:{type:{type:"string",enum:Object.values($)}},required:["type"],oneOf:[_e.schema,et.schema,tt.schema,rt.schema]},yt.validate=(0,_.generateLazyValidator)(yt.schema,[tt._fromLessThanOrEqualTo])})(at=a.Mapping||(a.Mapping={})),function(yt){yt._isMappingsValid={keyword:"_isMappingsValid",validate:function(Et,$t){try{dt($t)}catch{return!1}return!0},errors:!1},yt.innerSchema={type:"object",patternProperties:{"^0x[0-9a-fA-F]{40}$":{type:"array",items:at.schema}},minProperties:1,required:[],additionalProperties:!1};const bt=Object.values(j).reduce((Et,$t)=>(Et[$t]=yt.innerSchema,Et),{});yt.schema={type:"object",properties:bt,minProperties:1,additionalProperties:!1,_isMappingsValid:!0},yt.validate=(0,_.generateLazyValidator)(yt.schema,[tt._fromLessThanOrEqualTo,yt._isMappingsValid])}(a.Mappings||(a.Mappings={}));class ct extends Error{constructor(bt,Et,$t){super(bt),this.existingMapping=Et,this.conflictingMapping=$t}}a.AddMappingError=ct;function dt(yt={}){const bt={};for(const[Ct,It]of Object.entries(yt)){bt[Ct]={};for(const[kt,Dt]of Object.entries(It))for(const Bt of Dt)Tt(Ct,kt,Bt)}function Et(){return JSON.parse(JSON.stringify(bt))}function $t(Ct,It,kt){const Dt=BigInt(Ct);return Dt>=BigInt(It)&&Dt<=BigInt(kt)}function _t(Ct,It){switch(It.type){case $.SINGLE:return Ct.id===It.id;case $.MULTIPLE:return It.ids.includes(Ct.id);case $.RANGE:return $t(Ct.id,It.from,It.to);default:return!1}}function xt(Ct,It){switch(It.type){case $.SINGLE:return Ct.ids.includes(It.id);case $.MULTIPLE:return Ct.ids.some(kt=>It.ids.includes(kt));case $.RANGE:return Ct.ids.some(kt=>$t(kt,It.from,It.to));default:return!1}}function St(Ct,It){switch(It.type){case $.SINGLE:return $t(It.id,Ct.from,Ct.to);case $.MULTIPLE:return It.ids.some(kt=>$t(kt,Ct.from,Ct.to));case $.RANGE:return BigInt(Ct.from)<=BigInt(It.to)&&BigInt(Ct.to)>=BigInt(It.from)}}function Mt(Ct,It){if(Ct.type===$.ANY||It.type===$.ANY)return!0;switch(Ct.type){case $.SINGLE:return _t(Ct,It);case $.MULTIPLE:return xt(Ct,It);case $.RANGE:return St(Ct,It)}}function Tt(Ct,It,kt){var Dt,Bt;const zt=It.toLowerCase();bt[Ct]=(Dt=bt[Ct])!==null&&Dt!==void 0?Dt:{},bt[Ct][zt]=(Bt=bt[Ct][zt])!==null&&Bt!==void 0?Bt:[];for(const vt of bt[Ct][zt])if(Mt(vt,kt))throw new ct(`Cannot add mapping to contract ${zt} on network ${Ct} because it overlaps with existing mapping`,vt,kt);bt[Ct][zt].push(kt)}function Rt(Ct,It,kt){var Dt;return!((Dt=bt[Ct])===null||Dt===void 0)&&Dt[It]?bt[Ct][It].some(Bt=>{switch(Bt.type){case $.SINGLE:return Bt.id===kt;case $.ANY:return!0;case $.MULTIPLE:return Bt.ids.includes(kt);case $.RANGE:return BigInt(kt)>=BigInt(Bt.from)&&BigInt(kt)<=BigInt(Bt.to)}}):!1}return{addMapping:Tt,getMappings:Et,includesNft:Rt}}a.createMappingsHelper=dt})(linkedWearableMappings);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.isThirdParty=a.schema=void 0;const _=validation$5,$=merkleTree$2,j=linkedWearableMappings;a.schema={type:"object",properties:{merkleProof:$.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]},mappings:Object.assign({nullable:!0},j.Mappings.schema)},required:["merkleProof","content"],_containsHashingKeys:!0};const _e={keyword:"_containsHashingKeys",validate:function(rt,at){var ct;const dt=at;return!((ct=dt==null?void 0:dt.merkleProof)===null||ct===void 0)&&ct.hashingKeys?dt.merkleProof.hashingKeys.every(yt=>dt.hasOwnProperty(yt)):!1},errors:!1},et=(0,_.generateLazyValidator)(a.schema,[_e,j.RangeMapping._fromLessThanOrEqualTo,j.Mappings._isMappingsValid]);function tt(rt){return et(rt)}a.isThirdParty=tt})(thirdPartyProps$2);var wearable$5={},wearable$4={},baseItem$2={};Object.defineProperty(baseItem$2,"__esModule",{value:!0});baseItem$2.isBaseEmote=baseItem$2.isBaseAvatar=baseItem$2.requiredBaseItemProps=baseItem$2.baseItemProperties=void 0;const i18n_1$2=i18n$2,metrics_1$2=metrics$2,displayable_1$2=displayable$2;baseItem$2.baseItemProperties=Object.assign(Object.assign({},displayable_1$2.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:i18n_1$2.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({},metrics_1$2.Metrics.schema),{nullable:!0})});baseItem$2.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function isBaseAvatar$2(a){if(!a||!a.id)return!1;const _=a.id.split(":"),$=_[1]==="decentraland",j=_[3]==="base-avatars";return _.length===5&&$&&j}baseItem$2.isBaseAvatar=isBaseAvatar$2;function isBaseEmote(a){if(!a||!a.id)return!1;const _=a.id.split(":");return _.length===5&&_[1]==="decentraland"&&_[3]==="base-emotes"}baseItem$2.isBaseEmote=isBaseEmote;(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Wearable=void 0;const _=validation$5,$=wearableCategory$2,j=representation$2,_e=baseItem$2,et=standardProps$2,tt=thirdPartyProps$2,rt=hideableCategory$2,at=linkedWearableMappings;(function(ct){ct.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},_e.baseItemProperties),et.standardProperties),tt.schema.properties.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:rt.HideableWearableCategory.schema},hides:{type:"array",items:rt.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:j.WearableRepresentation.schema,minItems:1},category:$.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:rt.HideableWearableCategory.schema},blockVrmExport:{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:[..._e.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content","mappings"]},{required:[..._e.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const dt={keyword:"_isThirdParty",validate:(bt,Et)=>!bt||(0,tt.isThirdParty)(Et),errors:!1},yt={keyword:"_isBaseAvatar",validate:(bt,Et)=>!bt||(0,_e.isBaseAvatar)(Et),errors:!1};ct.validate=(0,_.generateLazyValidator)(ct.schema,[dt,yt,at.RangeMapping._fromLessThanOrEqualTo,at.Mappings._isMappingsValid])})(a.Wearable||(a.Wearable={}))})(wearable$4);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.HideableWearableCategory=a.BodyPartCategory=a.WearableCategory=a.Wearable=a.WearableRepresentation=void 0;var _=representation$2;Object.defineProperty(a,"WearableRepresentation",{enumerable:!0,get:function(){return _.WearableRepresentation}});var $=wearable$4;Object.defineProperty(a,"Wearable",{enumerable:!0,get:function(){return $.Wearable}});var j=wearableCategory$2;Object.defineProperty(a,"WearableCategory",{enumerable:!0,get:function(){return j.WearableCategory}});var _e=bodyPartCategory$2;Object.defineProperty(a,"BodyPartCategory",{enumerable:!0,get:function(){return _e.BodyPartCategory}});var et=hideableCategory$2;Object.defineProperty(a,"HideableWearableCategory",{enumerable:!0,get:function(){return et.HideableWearableCategory}})})(wearable$5);var emote$5={},emote$4={},emoteDataAdr74$2={},emoteCategory$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.EmoteCategory=void 0;const _=validation$5;(function($){$.DANCE="dance",$.STUNT="stunt",$.GREETINGS="greetings",$.FUN="fun",$.POSES="poses",$.REACTIONS="reactions",$.HORROR="horror",$.MISCELLANEOUS="miscellaneous"})(a.EmoteCategory||(a.EmoteCategory={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.EmoteCategory||(a.EmoteCategory={}))})(emoteCategory$2);var representationAdr74$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.EmoteRepresentationADR74=void 0;const _=validation$5,$=bodyShape$2;(function(j){j.schema={type:"object",properties:{bodyShapes:{type:"array",items:$.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"]},j.validate=(0,_.generateLazyValidator)(j.schema)})(a.EmoteRepresentationADR74||(a.EmoteRepresentationADR74={}))})(representationAdr74$2);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.EmoteDataADR74=void 0;const _=emoteCategory$2,$=validation$5,j=representationAdr74$2;(function(_e){_e.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:j.EmoteRepresentationADR74.schema,minItems:1},category:_.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},_e.validate=(0,$.generateLazyValidator)(_e.schema)})(a.EmoteDataADR74||(a.EmoteDataADR74={}))})(emoteDataAdr74$2);var hasRequiredEmote$5;function requireEmote$5(){return hasRequiredEmote$5||(hasRequiredEmote$5=1,function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Emote=void 0;const _=requireItem$2(),$=validation$5,j=baseItem$2,_e=standardProps$2,et=thirdPartyProps$2,tt=emoteDataAdr74$2;(function(rt){rt.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},j.baseItemProperties),_e.standardProperties),et.schema.properties),{emoteDataADR74:tt.EmoteDataADR74.schema}),additionalProperties:!0,required:[...j.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 at={keyword:"_isThirdParty",validate:(dt,yt)=>!dt||(0,_.isThirdParty)(yt),errors:!1},ct={keyword:"_isBaseEmote",validate:(dt,yt)=>!dt||(0,j.isBaseEmote)(yt),errors:!1};rt.validate=(0,$.generateLazyValidator)(rt.schema,[at,ct,_.RangeMapping._fromLessThanOrEqualTo,_.Mappings._isMappingsValid])})(a.Emote||(a.Emote={}))}(emote$4)),emote$4}var emotePlayMode$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.EmotePlayMode=void 0;const _=validation$5;(function($){$.SIMPLE="simple",$.LOOP="loop"})(a.EmotePlayMode||(a.EmotePlayMode={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.EmotePlayMode||(a.EmotePlayMode={}))})(emotePlayMode$2);var hasRequiredEmote$4;function requireEmote$4(){return hasRequiredEmote$4||(hasRequiredEmote$4=1,function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.EmotePlayMode=a.EmoteCategory=a.EmoteDataADR74=a.EmoteRepresentationADR74=a.Emote=void 0;var _=requireEmote$5();Object.defineProperty(a,"Emote",{enumerable:!0,get:function(){return _.Emote}});var $=representationAdr74$2;Object.defineProperty(a,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return $.EmoteRepresentationADR74}});var j=emoteDataAdr74$2;Object.defineProperty(a,"EmoteDataADR74",{enumerable:!0,get:function(){return j.EmoteDataADR74}});var _e=emoteCategory$2;Object.defineProperty(a,"EmoteCategory",{enumerable:!0,get:function(){return _e.EmoteCategory}});var et=emotePlayMode$2;Object.defineProperty(a,"EmotePlayMode",{enumerable:!0,get:function(){return et.EmotePlayMode}})}(emote$5)),emote$5}var hasRequiredItem$2;function requireItem$2(){return hasRequiredItem$2||(hasRequiredItem$2=1,function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(ct,dt,yt,bt){bt===void 0&&(bt=yt);var Et=Object.getOwnPropertyDescriptor(dt,yt);(!Et||("get"in Et?!dt.__esModule:Et.writable||Et.configurable))&&(Et={enumerable:!0,get:function(){return dt[yt]}}),Object.defineProperty(ct,bt,Et)}:function(ct,dt,yt,bt){bt===void 0&&(bt=yt),ct[bt]=dt[yt]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(ct,dt){for(var yt in ct)yt!=="default"&&!Object.prototype.hasOwnProperty.call(dt,yt)&&_(dt,ct,yt)};Object.defineProperty(a,"__esModule",{value:!0}),a.isThirdParty=a.isStandard=a.BodyShape=a.Metrics=a.Locale=a.I18N=void 0;var j=i18n$2;Object.defineProperty(a,"I18N",{enumerable:!0,get:function(){return j.I18N}});var _e=locale$3;Object.defineProperty(a,"Locale",{enumerable:!0,get:function(){return _e.Locale}});var et=metrics$2;Object.defineProperty(a,"Metrics",{enumerable:!0,get:function(){return et.Metrics}});var tt=bodyShape$2;Object.defineProperty(a,"BodyShape",{enumerable:!0,get:function(){return tt.BodyShape}});var rt=standardProps$2;Object.defineProperty(a,"isStandard",{enumerable:!0,get:function(){return rt.isStandard}});var at=thirdPartyProps$2;Object.defineProperty(a,"isThirdParty",{enumerable:!0,get:function(){return at.isThirdParty}}),$(linkedWearableMappings,a),$(wearable$5,a),$(requireEmote$4(),a)}(item$5)),item$5}var syncDeployments$2={},authChain$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.AuthChain=a.AuthLink=a.AuthLinkType=void 0;const _=validation$5;var $;(function(_e){_e.SIGNER="SIGNER",_e.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",_e.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",_e.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",_e.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})($=a.AuthLinkType||(a.AuthLinkType={}));var j;(function(_e){_e.schema={type:"object",properties:{type:{type:"string",enum:Object.values($)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:$.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},_e.validate=(0,_.generateLazyValidator)(_e.schema)})(j=a.AuthLink||(a.AuthLink={})),function(_e){_e.schema={type:"array",items:j.schema,minItems:1},_e.validate=(0,_.generateLazyValidator)(_e.schema)}(a.AuthChain||(a.AuthChain={}))})(authChain$2);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PointerChangesSyncDeployment=a.SnapshotSyncDeployment=void 0;const _=misc$2,$=authChain$2,j=validation$5;(function(_e){_e.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:$.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:_.IPFSv1.schema}},{properties:{entityId:_.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},_e.validate=(0,j.generateLazyValidator)(_e.schema)})(a.SnapshotSyncDeployment||(a.SnapshotSyncDeployment={})),function(_e){_e.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:$.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:_.IPFSv1.schema}},{properties:{entityId:_.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},_e.validate=(0,j.generateLazyValidator)(_e.schema)}(a.PointerChangesSyncDeployment||(a.PointerChangesSyncDeployment={}))})(syncDeployments$2);var entity$2={},contentMapping$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.ContentMapping=void 0;const _=misc$2,$=validation$5;(function(j){j.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[_.IPFSv1.schema,_.IPFSv2.schema]}},required:["file","hash"]},j.validate=(0,$.generateLazyValidator)(j.schema)})(a.ContentMapping||(a.ContentMapping={}))})(contentMapping$2);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Entity=a.EntityType=void 0;const _=misc$2,$=contentMapping$2,j=validation$5;(function(_e){_e.SCENE="scene",_e.PROFILE="profile",_e.WEARABLE="wearable",_e.STORE="store",_e.EMOTE="emote",_e.OUTFITS="outfits"})(a.EntityType||(a.EntityType={})),function(_e){_e.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[_.IPFSv1.schema,_.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:$.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},_e.validate=(0,j.generateLazyValidator)(_e.schema)}(a.Entity||(a.Entity={}))})(entity$2);var deploymentWithAuthChain$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.DeploymentWithAuthChain=void 0;const _=authChain$2,$=validation$5;(function(j){j.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:_.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},j.validate=(0,$.generateLazyValidator)(j.schema)})(a.DeploymentWithAuthChain||(a.DeploymentWithAuthChain={}))})(deploymentWithAuthChain$2);var outfits$5={},outfits$4={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Outfits=a.Outfit=void 0;const _=wearableCategory$2,$=misc$2,j=validation$5;var _e;(function(et){et.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:$.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:$.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:$.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:_.WearableCategory.schema}},additionalProperties:!0},et.validate=(0,j.generateLazyValidator)(et.schema)})(_e=a.Outfit||(a.Outfit={})),function(et){et.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:_e.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},et.validate=(0,j.generateLazyValidator)(et.schema)}(a.Outfits||(a.Outfits={}))})(outfits$4);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(outfits$4,a)})(outfits$5);var notifications$1={},notifications={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.NotificationType=void 0,function(_){_.BADGE_GRANTED="badge_granted",_.BID_ACCEPTED="bid_accepted",_.BID_RECEIVED="bid_received",_.EVENTS_STARTED="events_started",_.EVENTS_STARTS_SOON="events_starts_soon",_.GOVERNANCE_ANNOUNCEMENT="governance_announcement",_.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",_.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",_.GOVERNANCE_CLIFF_ENDED="governance_cliff_ended",_.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",_.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",_.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",_.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",_.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",_.GOVERNANCE_TENDER_PASSED="governance_tender_passed",_.GOVERNANCE_WHALE_VOTE="governance_whale_vote",_.GOVERNANCE_VOTED_ON_BEHALF="governance_voted_on_behalf",_.ITEM_SOLD="item_sold",_.ITEM_PUBLISHED="item_published",_.LAND_RENTAL_ENDED="rental_ended",_.LAND_RENTED="rental_started",_.REWARD_ASSIGNED="reward_assignment",_.REWARD_CAMPAIGN_OUT_OF_FUNDS="reward_campaign_out_of_funds",_.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="reward_campaign_gas_price_higher_than_expected",_.REWARD_CAMPAIGN_OUT_OF_STOCK="reward_campaign_out_of_stock",_.REWARD_DELAYED="reward_delayed",_.REWARD_IN_PROGRESS="reward_in_progress",_.ROYALTIES_EARNED="royalties_earned",_.WORLDS_ACCESS_RESTORED="worlds_access_restored",_.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",_.WORLDS_MISSING_RESOURCES="worlds_missing_resources",_.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",_.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked"}(a.NotificationType||(a.NotificationType={}))})(notifications);var subscription={},subscriptionDetails={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.SubscriptionDetails=void 0;const _=validation$5,$=notifications,j={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},_e=Object.values($.NotificationType).reduce((et,tt)=>(et[tt]=j,et),{});(function(et){et.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($.NotificationType),additionalProperties:!1,properties:_e}}},et.validate=(0,_.generateLazyValidator)(et.schema)})(a.SubscriptionDetails||(a.SubscriptionDetails={}))})(subscriptionDetails);var email={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Email=void 0,function(_){_.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const $=new RegExp(_.schema.pattern);_.validate=j=>$.test(j)}(a.Email||(a.Email={}))})(email);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Subscription=void 0;const _=validation$5,$=subscriptionDetails,j=misc$2,_e=email;(function(et){et.schema={type:"object",required:["address","details"],properties:{address:j.EthAddress.schema,email:Object.assign(Object.assign({},_e.Email.schema),{nullable:!0}),details:$.SubscriptionDetails.schema}},et.validate=(0,_.generateLazyValidator)(et.schema)})(a.Subscription||(a.Subscription={}))})(subscription);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(notifications,a),$(subscription,a),$(subscriptionDetails,a)})(notifications$1);var events={},base$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Events=void 0,function(_){(function($){$.BLOCKCHAIN="blockchain",$.CATALYST_DEPLOYMENT="catalyst-deployment",$.CLIENT="client",$.MARKETPLACE="marketplace",$.REWARDS="rewards",$.BADGE="badge"})(_.Type||(_.Type={})),function($){(function(j){j.BID_ACCEPTED="bid-accepted",j.ITEM_SOLD="item-sold",j.RENTAL_ENDED="land-rental-ended",j.RENTAL_STARTED="land-rental-started",j.ROYALTIES_EARNED="royalties-earned",j.COLLECTION_CREATED="collection-created",j.ITEM_PUBLISHED="item-published"})($.Blockchain||($.Blockchain={})),function(j){j.BID_RECEIVED="bid-received"}($.Marketplace||($.Marketplace={})),function(j){j.SCENE="scene",j.PROFILE="profile",j.WEARABLE="wearable",j.STORE="store",j.EMOTE="emote",j.OUTFITS="outfits"}($.CatalystDeployment||($.CatalystDeployment={})),function(j){j.MOVE_TO_PARCEL="move-to-parcel",j.USED_EMOTE="used-emote",j.PASSPORT_OPENED="passport-opened",j.WALKED_DISTANCE="walked-distance",j.VERTICAL_HEIGHT_REACHED="vertical-height-reached"}($.Client||($.Client={})),function(j){j.REWARD_IN_PROGRESS="reward-in-progress",j.REWARD_ASSIGNED="reward-assigned",j.CAMPAIGN_OUT_OF_FUNDS="campaign-out-of-funds",j.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="campaign-gas-price-higher-than-expected",j.CAMPAIGN_OUT_OF_STOCK="campaign-out-of-stock",j.REWARD_DELAYED="reward-delayed"}($.Rewards||($.Rewards={})),function(j){j.GRANTED="badge-granted"}($.Badge||($.Badge={}))}(_.SubType||(_.SubType={}))}(a.Events||(a.Events={}))})(base$2);var blockchain={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.CollectionCreatedEvent=a.RoyaltiesEarnedEvent=a.RentalStartedEvent=a.RentalEndedEvent=a.ItemPublishedEvent=a.ItemSoldEvent=a.BidAcceptedEvent=void 0;const _=validation$5,$=base$2;(function(j){j.schema={type:"object",properties:{type:{type:"string",const:$.Events.Type.BLOCKCHAIN},subType:{type:"string",const:$.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},j.validate=(0,_.generateLazyValidator)(j.schema)})(a.BidAcceptedEvent||(a.BidAcceptedEvent={})),function(j){j.schema={type:"object",properties:{type:{type:"string",const:$.Events.Type.BLOCKCHAIN},subType:{type:"string",const:$.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},j.validate=(0,_.generateLazyValidator)(j.schema)}(a.ItemSoldEvent||(a.ItemSoldEvent={})),function(j){j.schema={type:"object",properties:{type:{type:"string",const:$.Events.Type.BLOCKCHAIN},subType:{type:"string",const:$.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},j.validate=(0,_.generateLazyValidator)(j.schema)}(a.ItemPublishedEvent||(a.ItemPublishedEvent={})),function(j){j.schema={type:"object",properties:{type:{type:"string",const:$.Events.Type.BLOCKCHAIN},subType:{type:"string",const:$.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},j.validate=(0,_.generateLazyValidator)(j.schema)}(a.RentalEndedEvent||(a.RentalEndedEvent={})),function(j){j.schema={type:"object",properties:{type:{type:"string",const:$.Events.Type.BLOCKCHAIN},subType:{type:"string",const:$.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},j.validate=(0,_.generateLazyValidator)(j.schema)}(a.RentalStartedEvent||(a.RentalStartedEvent={})),function(j){j.schema={type:"object",properties:{type:{type:"string",const:$.Events.Type.BLOCKCHAIN},subType:{type:"string",const:$.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},j.validate=(0,_.generateLazyValidator)(j.schema)}(a.RoyaltiesEarnedEvent||(a.RoyaltiesEarnedEvent={})),function(j){j.schema={type:"object",properties:{type:{type:"string",const:$.Events.Type.BLOCKCHAIN},subType:{type:"string",const:$.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},j.validate=(0,_.generateLazyValidator)(j.schema)}(a.CollectionCreatedEvent||(a.CollectionCreatedEvent={}))})(blockchain);var catalyst={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.CatalystDeploymentEvent=void 0;const _=authChain$2,$=validation$5,j=entity$2,_e=base$2;(function(et){et.schema={type:"object",properties:{type:{type:"string",const:_e.Events.Type.CATALYST_DEPLOYMENT},subType:{type:"string",enum:Object.values(_e.Events.SubType.CatalystDeployment)},key:{type:"string"},timestamp:{type:"number",minimum:1},entity:j.Entity.schema,authChain:_.AuthChain.schema},required:["type","subType","entity","authChain","key","timestamp"],additionalProperties:!1},et.validate=(0,$.generateLazyValidator)(et.schema)})(a.CatalystDeploymentEvent||(a.CatalystDeploymentEvent={}))})(catalyst);var client$1={};Object.defineProperty(client$1,"__esModule",{value:!0});var marketplace={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.BidReceivedEvent=void 0;const _=validation$5,$=base$2;(function(j){j.schema={type:"object",properties:{type:{type:"string",const:$.Events.Type.MARKETPLACE},subType:{type:"string",const:$.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},j.validate=(0,_.generateLazyValidator)(j.schema)})(a.BidReceivedEvent||(a.BidReceivedEvent={}))})(marketplace);var rewards={},utils$t={};Object.defineProperty(utils$t,"__esModule",{value:!0});utils$t.createEventSchema=void 0;function createEventSchema(a,_,$){return{type:"object",properties:{type:{type:"string",const:a},subType:{type:"string",const:_},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:$},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}}utils$t.createEventSchema=createEventSchema;(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.RewardDelayedEvent=a.CampaignOutOfStockEvent=a.CampaignGasPriceHigherThanExpectedEvent=a.CampaignOutOfFundsEvent=a.RewardAssignedEvent=a.RewardInProgressEvent=void 0;const _=validation$5,$=base$2,j=utils$t,_e={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},et={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(tt){tt.schema=(0,j.createEventSchema)($.Events.Type.REWARDS,$.Events.SubType.Rewards.REWARD_IN_PROGRESS,_e),tt.validate=(0,_.generateLazyValidator)(tt.schema)})(a.RewardInProgressEvent||(a.RewardInProgressEvent={})),function(tt){tt.schema=(0,j.createEventSchema)($.Events.Type.REWARDS,$.Events.SubType.Rewards.REWARD_ASSIGNED,_e),tt.validate=(0,_.generateLazyValidator)(tt.schema)}(a.RewardAssignedEvent||(a.RewardAssignedEvent={})),function(tt){tt.schema=(0,j.createEventSchema)($.Events.Type.REWARDS,$.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,et),tt.validate=(0,_.generateLazyValidator)(tt.schema)}(a.CampaignOutOfFundsEvent||(a.CampaignOutOfFundsEvent={})),function(tt){tt.schema=(0,j.createEventSchema)($.Events.Type.REWARDS,$.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,et),tt.validate=(0,_.generateLazyValidator)(tt.schema)}(a.CampaignGasPriceHigherThanExpectedEvent||(a.CampaignGasPriceHigherThanExpectedEvent={})),function(tt){tt.schema=(0,j.createEventSchema)($.Events.Type.REWARDS,$.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,et),tt.validate=(0,_.generateLazyValidator)(tt.schema)}(a.CampaignOutOfStockEvent||(a.CampaignOutOfStockEvent={})),function(tt){tt.schema=(0,j.createEventSchema)($.Events.Type.REWARDS,$.Events.SubType.Rewards.REWARD_DELAYED,_e),tt.validate=(0,_.generateLazyValidator)(tt.schema)}(a.RewardDelayedEvent||(a.RewardDelayedEvent={}))})(rewards);var services={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.BadgeGrantedEvent=void 0;const _=validation$5,$=base$2;(function(j){j.schema={type:"object",properties:{type:{type:"string",const:$.Events.Type.BADGE},subType:{type:"string",const:$.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},j.validate=(0,_.generateLazyValidator)(j.schema)})(a.BadgeGrantedEvent||(a.BadgeGrantedEvent={}))})(services);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(base$2,a),$(blockchain,a),$(catalyst,a),$(client$1,a),$(marketplace,a),$(rewards,a),$(services,a)})(events);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(profile$5,a),$(scene$5,a),$(requireItem$2(),a),$(displayable$2,a),$(merkleTree$2,a),$(syncDeployments$2,a),$(entity$2,a),$(deploymentWithAuthChain$2,a),$(outfits$5,a),$(notifications$1,a),$(events,a)})(platform$2);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.WearableJson=void 0;const _=rarity$2,$=wearableCategory$2,j=representation$2,_e=validation$5,et=platform$2;(function(tt){tt.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},_.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:$.WearableCategory.schema},hides:{type:"array",items:$.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:j.WearableRepresentation.schema,minItems:1},category:$.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:et.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},tt.validate=(0,_e.generateLazyValidator)(tt.schema)})(a.WearableJson||(a.WearableJson={}))})(wearableJson$2);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(type$2,a),$(wearableJson$2,a)})(project$2);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(ws$2,a),$(project$2,a)})(sdk$2);var dapps={},account$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Account=a.AccountSortBy=void 0;const _=validation$5;(function($){$.MOST_SALES="most_sales",$.MOST_PURCHASES="most_purchases",$.MOST_SPENT="most_spent",$.MOST_EARNED="most_earned",$.MOST_ROYALTIES="most_royalties",$.MOST_COLLECTIONS="most_collections"})(a.AccountSortBy||(a.AccountSortBy={})),function($){$.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"]},$.validate=(0,_.generateLazyValidator)($.schema)}(a.Account||(a.Account={}))})(account$2);var collection$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Collection=a.CollectionSortBy=void 0;const _=validation$5,$=requireChainId$2(),j=network$2;(function(_e){_e.NEWEST="newest",_e.NAME="name",_e.RECENTLY_REVIEWED="recently_reviewed",_e.RECENTLY_LISTED="recently_listed",_e.SIZE="size"})(a.CollectionSortBy||(a.CollectionSortBy={})),function(_e){_e.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:j.Network.schema,chainId:$.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},_e.validate=(0,_.generateLazyValidator)(_e.schema)}(a.Collection||(a.Collection={}))})(collection$2);var contract$2={},nftCategory$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.NFTCategory=void 0;const _=validation$5;(function($){$.PARCEL="parcel",$.ESTATE="estate",$.WEARABLE="wearable",$.ENS="ens",$.EMOTE="emote"})(a.NFTCategory||(a.NFTCategory={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.NFTCategory||(a.NFTCategory={}))})(nftCategory$2);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Contract=a.ContractSortBy=void 0;const _=validation$5,$=requireChainId$2(),j=network$2,_e=nftCategory$2;(function(et){et.NAME="name"})(a.ContractSortBy||(a.ContractSortBy={})),function(et){et.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:_e.NFTCategory.schema,network:j.Network.schema,chainId:$.ChainId.schema},required:["name","address","category","network","chainId"]},et.validate=(0,_.generateLazyValidator)(et.schema)}(a.Contract||(a.Contract={}))})(contract$2);var item$4={},nft$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.NFT=a.NFTSortBy=void 0;const _=validation$5,$=requireChainId$2(),j=platform$2,_e=network$2,et=nftCategory$2,tt=rarity$2,rt=wearableCategory$2;(function(at){at.NAME="name",at.NEWEST="newest",at.RECENTLY_LISTED="recently_listed",at.RECENTLY_SOLD="recently_sold",at.CHEAPEST="cheapest",at.RENTAL_LISTING_DATE="rental_listing_date",at.RENTAL_DATE="rented_date",at.MAX_RENTAL_PRICE="max_rental_price",at.MIN_RENTAL_PRICE="min_rental_price"})(a.NFTSortBy||(a.NFTSortBy={})),function(at){at.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:j.BodyShape.schema},category:rt.WearableCategory.schema,description:{type:"string"},rarity:tt.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:j.BodyShape.schema},category:j.EmoteCategory.schema,description:{type:"string"},rarity:tt.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:et.NFTCategory.schema,network:_e.Network.schema,chainId:$.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"]},at.validate=(0,_.generateLazyValidator)(at.schema)}(a.NFT||(a.NFT={}))})(nft$2);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Item=a.ItemSortBy=void 0;const _=validation$5,$=requireChainId$2(),j=network$2,_e=nft$2,et=nftCategory$2;(function(tt){tt.NAME="name",tt.NEWEST="newest",tt.RECENTLY_REVIEWED="recently_reviewed",tt.RECENTLY_SOLD="recently_sold",tt.RECENTLY_LISTED="recently_listed",tt.CHEAPEST="cheapest"})(a.ItemSortBy||(a.ItemSortBy={})),function(tt){tt.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:et.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:_e.NFT.schema.properties.data,network:j.Network.schema,chainId:$.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"]},tt.validate=(0,_.generateLazyValidator)(tt.schema)}(a.Item||(a.Item={}))})(item$4);var listingStatus$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.ListingStatus=void 0;const _=validation$5;(function($){$.OPEN="open",$.SOLD="sold",$.CANCELLED="cancelled"})(a.ListingStatus||(a.ListingStatus={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.ListingStatus||(a.ListingStatus={}))})(listingStatus$2);var metaTransactions$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.MetaTransaction=void 0;const _=validation$5;(function($){$.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},$.validate=(0,_.generateLazyValidator)($.schema)})(a.MetaTransaction||(a.MetaTransaction={}))})(metaTransactions$2);var mint$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Mint=a.MintSortBy=void 0;const _=validation$5,$=requireChainId$2(),j=network$2;(function(_e){_e.RECENTLY_MINTED="recently_minted",_e.MOST_EXPENSIVE="most_expensive"})(a.MintSortBy||(a.MintSortBy={})),function(_e){_e.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:j.Network.schema,chainId:$.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},_e.validate=(0,_.generateLazyValidator)(_e.schema)}(a.Mint||(a.Mint={}))})(mint$2);var catalog$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.CatalogSortDirection=a.CatalogSortBy=void 0,function(_){_.NEWEST="newest",_.RECENTLY_SOLD="recently_sold",_.CHEAPEST="cheapest",_.MOST_EXPENSIVE="most_expensive",_.RECENTLY_LISTED="recently_listed"}(a.CatalogSortBy||(a.CatalogSortBy={})),function(_){_.ASC="asc",_.DESC="desc"}(a.CatalogSortDirection||(a.CatalogSortDirection={}))})(catalog$2);var order$3={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Order=a.OrderSortBy=void 0;const _=validation$5,$=requireChainId$2(),j=listingStatus$2,_e=network$2;(function(et){et.RECENTLY_LISTED="recently_listed",et.RECENTLY_UPDATED="recently_updated",et.CHEAPEST="cheapest",et.ISSUED_ID_ASC="issued_id_asc",et.ISSUED_ID_DESC="issued_id_desc",et.OLDEST="oldest"})(a.OrderSortBy||(a.OrderSortBy={})),function(et){et.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:j.ListingStatus.schema,network:_e.Network.schema,chainId:$.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"]},et.validate=(0,_.generateLazyValidator)(et.schema)}(a.Order||(a.Order={}))})(order$3);var saleType$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.SaleType=void 0;const _=validation$5;(function($){$.ORDER="order",$.BID="bid",$.MINT="mint"})(a.SaleType||(a.SaleType={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.SaleType||(a.SaleType={}))})(saleType$2);var sale$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Sale=a.SaleSortBy=void 0;const _=validation$5,$=requireChainId$2(),j=saleType$2,_e=network$2;(function(et){et.RECENTLY_SOLD="recently_sold",et.MOST_EXPENSIVE="most_expensive"})(a.SaleSortBy||(a.SaleSortBy={})),function(et){et.schema={type:"object",properties:{id:{type:"string"},type:j.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:_e.Network.schema,chainId:$.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},et.validate=(0,_.generateLazyValidator)(et.schema)}(a.Sale||(a.Sale={}))})(sale$2);var rentalsListings$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.RentalListingCreation=a.PeriodCreation=a.RentalsListingsSortBy=a.RentalsListingsFilterByCategory=a.RentalsListingSortDirection=a.RentalStatus=void 0;const _=validation$5,$=requireChainId$2(),j=network$2;(function(et){et.OPEN="open",et.CANCELLED="cancelled",et.EXECUTED="executed",et.CLAIMED="claimed"})(a.RentalStatus||(a.RentalStatus={})),function(et){et.ASC="asc",et.DESC="desc"}(a.RentalsListingSortDirection||(a.RentalsListingSortDirection={})),function(et){et.PARCEL="parcel",et.ESTATE="estate"}(a.RentalsListingsFilterByCategory||(a.RentalsListingsFilterByCategory={})),function(et){et.LAND_CREATION_DATE="land_creation_date",et.RENTAL_LISTING_DATE="rental_listing_date",et.RENTAL_DATE="rented_date",et.NAME="name",et.MAX_RENTAL_PRICE="max_rental_price",et.MIN_RENTAL_PRICE="min_rental_price"}(a.RentalsListingsSortBy||(a.RentalsListingsSortBy={}));var _e;(function(et){et.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"]},et.validate=(0,_.generateLazyValidator)(et.schema)})(_e=a.PeriodCreation||(a.PeriodCreation={})),function(et){et.schema={type:"object",properties:{network:j.Network.schema,chainId:$.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:_e.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},et.validate=(0,_.generateLazyValidator)(et.schema)}(a.RentalListingCreation||(a.RentalListingCreation={}))})(rentalsListings$2);var analyticsDayData$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.AnalyticsDayDataSortBy=void 0,function(_){_.DATE="date",_.MOST_SALES="most_sales"}(a.AnalyticsDayDataSortBy||(a.AnalyticsDayDataSortBy={}))})(analyticsDayData$2);var store$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Store=void 0;const _=validation$5;(function($){$.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"]},$.validate=(0,_.generateLazyValidator)($.schema)})(a.Store||(a.Store={}))})(store$2);var wearableGender$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.GenderFilterOption=a.WearableGender=void 0;const _=validation$5;(function($){$.MALE="male",$.FEMALE="female"})(a.WearableGender||(a.WearableGender={})),function($){$.MALE="male",$.FEMALE="female",$.UNISEX="unisex"}(a.GenderFilterOption||(a.GenderFilterOption={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.WearableGender||(a.WearableGender={}))})(wearableGender$2);var world$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.World=a.isInsideWorldLimits=a.getWorld=void 0;const _=validation$5;function $(){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}]}}a.getWorld=$;function j(_e,et){const tt=$().validWorldRanges;for(const rt of tt)if(_e>=rt.xMin&&_e<=rt.xMax&&et>=rt.yMin&&et<=rt.yMax)return!0;return!1}a.isInsideWorldLimits=j,function(_e){_e.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},_e.validate=(0,_.generateLazyValidator)(_e.schema)}(a.World||(a.World={}))})(world$2);var bid$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Bid=a.BidSortBy=void 0;const _=validation$5,$=requireChainId$2(),j=listingStatus$2,_e=network$2;(function(et){et.RECENTLY_OFFERED="recently_offered",et.RECENTLY_UPDATED="recently_updated",et.MOST_EXPENSIVE="most_expensive"})(a.BidSortBy||(a.BidSortBy={})),function(et){const tt={type:"object",properties:{id:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:j.ListingStatus.schema,contractAddress:{type:"string"},network:_e.Network.schema,chainId:$.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidder","seller","price","fingerprint","status","contractAddress","network","chainId","expiresAt","createdAt","updatedAt"]};et.schema={type:"object",required:[],oneOf:[{properties:Object.assign(Object.assign({},tt.properties),{tradeId:{type:"string"},tokenId:{type:"string"}}),required:[...tt.required,"tradeId","tokenId"]},{type:"object",properties:Object.assign(Object.assign({},tt.properties),{tradeId:{type:"string"},itemId:{type:"string"}}),required:[...tt.required,"tradeId","itemId"]},{type:"object",properties:Object.assign(Object.assign({},tt.properties),{bidAddress:{type:"string"},blockchainId:{type:"string"},blockNumber:{type:"string"},tokenId:{type:"string"}}),required:[...tt.required,"bidAddress","blockchainId","blockNumber","tokenId"]}]},et.validate=(0,_.generateLazyValidator)(et.schema)}(a.Bid||(a.Bid={}))})(bid$2);var common$6={};Object.defineProperty(common$6,"__esModule",{value:!0});var trade={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.TradeAssetDirection=a.TradeAssetType=a.TradeType=void 0,function(_){_.BID="bid",_.PUBLIC_NFT_ORDER="public_nft_order",_.PUBLIC_ITEM_ORDER="public_item_order"}(a.TradeType||(a.TradeType={})),function(_){_[_.ERC20=1]="ERC20",_[_.USD_PEGGED_MANA=2]="USD_PEGGED_MANA",_[_.ERC721=3]="ERC721",_[_.COLLECTION_ITEM=4]="COLLECTION_ITEM"}(a.TradeAssetType||(a.TradeAssetType={})),function(_){_.SENT="sent",_.RECEIVED="received"}(a.TradeAssetDirection||(a.TradeAssetDirection={}))})(trade);var preview$3={},previewCamera$3={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PreviewCamera=void 0;const _=validation$5;(function($){$.STATIC="static",$.INTERACTIVE="interactive"})(a.PreviewCamera||(a.PreviewCamera={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.PreviewCamera||(a.PreviewCamera={}))})(previewCamera$3);var previewConfig$3={};Object.defineProperty(previewConfig$3,"__esModule",{value:!0});var previewController$3={};Object.defineProperty(previewController$3,"__esModule",{value:!0});var previewEmoteEventType$3={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PreviewEmoteEventType=void 0;const _=validation$5;(function($){$.ANIMATION_PLAY="animation_play",$.ANIMATION_PAUSE="animation_pause",$.ANIMATION_LOOP="animation_loop",$.ANIMATION_END="animation_end",$.ANIMATION_PLAYING="animation_playing"})(a.PreviewEmoteEventType||(a.PreviewEmoteEventType={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.PreviewEmoteEventType||(a.PreviewEmoteEventType={}))})(previewEmoteEventType$3);var previewEmote$3={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PreviewEmote=void 0;const _=validation$5;(function($){$.IDLE="idle",$.WALK="walk",$.RUN="run",$.JUMP="jump",$.CLAP="clap",$.DAB="dab",$.DANCE="dance",$.FASHION="fashion",$.FASHION_2="fashion-2",$.FASHION_3="fashion-3",$.FASHION_4="fashion-4",$.LOVE="love",$.MONEY="money",$.FIST_PUMP="fist-pump",$.HEAD_EXPLODE="head-explode",$.WAVE="wave"})(a.PreviewEmote||(a.PreviewEmote={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.PreviewEmote||(a.PreviewEmote={}))})(previewEmote$3);var previewMessage$3={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.sendMessage=a.PreviewMessageType=void 0;const _=validation$5;(function(j){j.READY="ready",j.LOAD="load",j.ERROR="error",j.UPDATE="update",j.CONTROLLER_REQUEST="controller_request",j.CONTROLLER_RESPONSE="controller_response",j.EMOTE_EVENT="emote_event"})(a.PreviewMessageType||(a.PreviewMessageType={})),function(j){j.schema={type:"string",enum:Object.values(j)},j.validate=(0,_.generateLazyValidator)(j.schema)}(a.PreviewMessageType||(a.PreviewMessageType={}));const $=(j,_e,et,tt="*")=>{const rt={type:_e,payload:et};j.postMessage(rt,tt)};a.sendMessage=$})(previewMessage$3);var previewOptions$3={};Object.defineProperty(previewOptions$3,"__esModule",{value:!0});var previewProjection$3={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PreviewProjection=void 0;const _=validation$5;(function($){$.ORTHOGRAPHIC="orthographic",$.PERSPECTIVE="perspective"})(a.PreviewProjection||(a.PreviewProjection={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.PreviewProjection||(a.PreviewProjection={}))})(previewProjection$3);var previewType$3={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PreviewType=void 0;const _=validation$5;(function($){$.TEXTURE="texture",$.WEARABLE="wearable",$.AVATAR="avatar"})(a.PreviewType||(a.PreviewType={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.PreviewType||(a.PreviewType={}))})(previewType$3);var wearableRepresentationDefinition$3={};Object.defineProperty(wearableRepresentationDefinition$3,"__esModule",{value:!0});var wearableRepresentationWithBlobs$3={};Object.defineProperty(wearableRepresentationWithBlobs$3,"__esModule",{value:!0});var wearableDefinition$3={};Object.defineProperty(wearableDefinition$3,"__esModule",{value:!0});var wearableWithBlobs$3={};Object.defineProperty(wearableWithBlobs$3,"__esModule",{value:!0});var emoteRepresentationDefinition$3={};Object.defineProperty(emoteRepresentationDefinition$3,"__esModule",{value:!0});var emoteRepresentationWithBlobs$3={};Object.defineProperty(emoteRepresentationWithBlobs$3,"__esModule",{value:!0});var emoteDefinition$3={};Object.defineProperty(emoteDefinition$3,"__esModule",{value:!0});var emoteWithBlobs$3={};Object.defineProperty(emoteWithBlobs$3,"__esModule",{value:!0});(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(previewCamera$3,a),$(previewConfig$3,a),$(previewController$3,a),$(previewEmoteEventType$3,a),$(previewEmote$3,a),$(previewMessage$3,a),$(previewOptions$3,a),$(previewProjection$3,a),$(previewType$3,a),$(wearableRepresentationDefinition$3,a),$(wearableRepresentationWithBlobs$3,a),$(wearableDefinition$3,a),$(wearableWithBlobs$3,a),$(emoteRepresentationDefinition$3,a),$(emoteRepresentationWithBlobs$3,a),$(emoteDefinition$3,a),$(emoteWithBlobs$3,a)})(preview$3);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(zt,vt,nt,st){st===void 0&&(st=nt);var lt=Object.getOwnPropertyDescriptor(vt,nt);(!lt||("get"in lt?!vt.__esModule:lt.writable||lt.configurable))&&(lt={enumerable:!0,get:function(){return vt[nt]}}),Object.defineProperty(zt,st,lt)}:function(zt,vt,nt,st){st===void 0&&(st=nt),zt[st]=vt[nt]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(zt,vt){for(var nt in zt)nt!=="default"&&!Object.prototype.hasOwnProperty.call(vt,nt)&&_(vt,zt,nt)};Object.defineProperty(a,"__esModule",{value:!0}),a.isInsideWorldLimits=a.getWorld=a.World=a.GenderFilterOption=a.WearableGender=a.Store=a.AnalyticsDayDataSortBy=a.PeriodCreation=a.RentalListingCreation=a.RentalsListingsSortBy=a.RentalsListingsFilterByCategory=a.RentalsListingSortDirection=a.RentalStatus=a.SaleSortBy=a.Sale=a.SaleType=a.Rarity=a.ProviderType=a.OrderSortBy=a.Order=a.CatalogSortDirection=a.CatalogSortBy=a.NFTSortBy=a.NFT=a.NFTCategory=a.Network=a.MintSortBy=a.Mint=a.MetaTransaction=a.ListingStatus=a.ItemSortBy=a.Item=a.ContractSortBy=a.Contract=a.CollectionSortBy=a.Collection=a.getChainId=a.ChainName=a.getURNProtocol=a.getChainName=a.ChainId=a.AccountSortBy=a.Account=void 0;var j=account$2;Object.defineProperty(a,"Account",{enumerable:!0,get:function(){return j.Account}}),Object.defineProperty(a,"AccountSortBy",{enumerable:!0,get:function(){return j.AccountSortBy}});var _e=requireChainId$2();Object.defineProperty(a,"ChainId",{enumerable:!0,get:function(){return _e.ChainId}}),Object.defineProperty(a,"getChainName",{enumerable:!0,get:function(){return _e.getChainName}}),Object.defineProperty(a,"getURNProtocol",{enumerable:!0,get:function(){return _e.getURNProtocol}});var et=requireChainName$2();Object.defineProperty(a,"ChainName",{enumerable:!0,get:function(){return et.ChainName}}),Object.defineProperty(a,"getChainId",{enumerable:!0,get:function(){return et.getChainId}});var tt=collection$2;Object.defineProperty(a,"Collection",{enumerable:!0,get:function(){return tt.Collection}}),Object.defineProperty(a,"CollectionSortBy",{enumerable:!0,get:function(){return tt.CollectionSortBy}});var rt=contract$2;Object.defineProperty(a,"Contract",{enumerable:!0,get:function(){return rt.Contract}}),Object.defineProperty(a,"ContractSortBy",{enumerable:!0,get:function(){return rt.ContractSortBy}});var at=item$4;Object.defineProperty(a,"Item",{enumerable:!0,get:function(){return at.Item}}),Object.defineProperty(a,"ItemSortBy",{enumerable:!0,get:function(){return at.ItemSortBy}});var ct=listingStatus$2;Object.defineProperty(a,"ListingStatus",{enumerable:!0,get:function(){return ct.ListingStatus}});var dt=metaTransactions$2;Object.defineProperty(a,"MetaTransaction",{enumerable:!0,get:function(){return dt.MetaTransaction}});var yt=mint$2;Object.defineProperty(a,"Mint",{enumerable:!0,get:function(){return yt.Mint}}),Object.defineProperty(a,"MintSortBy",{enumerable:!0,get:function(){return yt.MintSortBy}});var bt=network$2;Object.defineProperty(a,"Network",{enumerable:!0,get:function(){return bt.Network}});var Et=nftCategory$2;Object.defineProperty(a,"NFTCategory",{enumerable:!0,get:function(){return Et.NFTCategory}});var $t=nft$2;Object.defineProperty(a,"NFT",{enumerable:!0,get:function(){return $t.NFT}}),Object.defineProperty(a,"NFTSortBy",{enumerable:!0,get:function(){return $t.NFTSortBy}});var _t=catalog$2;Object.defineProperty(a,"CatalogSortBy",{enumerable:!0,get:function(){return _t.CatalogSortBy}}),Object.defineProperty(a,"CatalogSortDirection",{enumerable:!0,get:function(){return _t.CatalogSortDirection}});var xt=order$3;Object.defineProperty(a,"Order",{enumerable:!0,get:function(){return xt.Order}}),Object.defineProperty(a,"OrderSortBy",{enumerable:!0,get:function(){return xt.OrderSortBy}});var St=providerType$2;Object.defineProperty(a,"ProviderType",{enumerable:!0,get:function(){return St.ProviderType}});var Mt=rarity$2;Object.defineProperty(a,"Rarity",{enumerable:!0,get:function(){return Mt.Rarity}});var Tt=saleType$2;Object.defineProperty(a,"SaleType",{enumerable:!0,get:function(){return Tt.SaleType}});var Rt=sale$2;Object.defineProperty(a,"Sale",{enumerable:!0,get:function(){return Rt.Sale}}),Object.defineProperty(a,"SaleSortBy",{enumerable:!0,get:function(){return Rt.SaleSortBy}});var Ct=rentalsListings$2;Object.defineProperty(a,"RentalStatus",{enumerable:!0,get:function(){return Ct.RentalStatus}}),Object.defineProperty(a,"RentalsListingSortDirection",{enumerable:!0,get:function(){return Ct.RentalsListingSortDirection}}),Object.defineProperty(a,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return Ct.RentalsListingsFilterByCategory}}),Object.defineProperty(a,"RentalsListingsSortBy",{enumerable:!0,get:function(){return Ct.RentalsListingsSortBy}}),Object.defineProperty(a,"RentalListingCreation",{enumerable:!0,get:function(){return Ct.RentalListingCreation}}),Object.defineProperty(a,"PeriodCreation",{enumerable:!0,get:function(){return Ct.PeriodCreation}});var It=analyticsDayData$2;Object.defineProperty(a,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return It.AnalyticsDayDataSortBy}});var kt=store$2;Object.defineProperty(a,"Store",{enumerable:!0,get:function(){return kt.Store}});var Dt=wearableGender$2;Object.defineProperty(a,"WearableGender",{enumerable:!0,get:function(){return Dt.WearableGender}}),Object.defineProperty(a,"GenderFilterOption",{enumerable:!0,get:function(){return Dt.GenderFilterOption}});var Bt=world$2;Object.defineProperty(a,"World",{enumerable:!0,get:function(){return Bt.World}}),Object.defineProperty(a,"getWorld",{enumerable:!0,get:function(){return Bt.getWorld}}),Object.defineProperty(a,"isInsideWorldLimits",{enumerable:!0,get:function(){return Bt.isInsideWorldLimits}}),$(bid$2,a),$(common$6,a),$(trade,a),$(preview$3,a)})(dapps);var linkerAuthorization$2={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.LinkerAuthorization=void 0;const _=validation$5;(function($){$.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"]},$.validate=(0,_.generateLazyValidator)($.schema)})(a.LinkerAuthorization||(a.LinkerAuthorization={}))})(linkerAuthorization$2);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(tt,rt,at,ct){ct===void 0&&(ct=at);var dt=Object.getOwnPropertyDescriptor(rt,at);(!dt||("get"in dt?!rt.__esModule:dt.writable||dt.configurable))&&(dt={enumerable:!0,get:function(){return rt[at]}}),Object.defineProperty(tt,ct,dt)}:function(tt,rt,at,ct){ct===void 0&&(ct=at),tt[ct]=rt[at]}),$=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(tt,rt){Object.defineProperty(tt,"default",{enumerable:!0,value:rt})}:function(tt,rt){tt.default=rt}),j=commonjsGlobal&&commonjsGlobal.__importStar||function(tt){if(tt&&tt.__esModule)return tt;var rt={};if(tt!=null)for(var at in tt)at!=="default"&&Object.prototype.hasOwnProperty.call(tt,at)&&_(rt,tt,at);return $(rt,tt),rt},_e=commonjsGlobal&&commonjsGlobal.__exportStar||function(tt,rt){for(var at in tt)at!=="default"&&!Object.prototype.hasOwnProperty.call(rt,at)&&_(rt,tt,at)};Object.defineProperty(a,"__esModule",{value:!0}),a.sdk=void 0;const et=j(sdk$2);a.sdk=et,_e(validation$5,a),_e(dapps,a),_e(platform$2,a),_e(misc$2,a),_e(linkerAuthorization$2,a),_e(authChain$2,a),_e(contentMapping$2,a),_e(email,a)})(dist$8);const configuration=Object.freeze({storageKey:"decentraland-connect-storage-key",[providerType$2.ProviderType.INJECTED]:{},[providerType$2.ProviderType.FORTMATIC]:{apiKeys:{[chainIdExports.ChainId.ETHEREUM_MAINNET]:"pk_live_F8E24DF8DD5BCBC5",[chainIdExports.ChainId.ETHEREUM_SEPOLIA]:"pk_test_5B728BEFE5C10911"},urls:getRpcUrls(providerType$2.ProviderType.FORTMATIC)},[providerType$2.ProviderType.NETWORK]:{urls:getRpcUrls(providerType$2.ProviderType.NETWORK)},[providerType$2.ProviderType.WALLET_LINK]:{appName:"Decentraland",urls:getRpcUrls(providerType$2.ProviderType.WALLET_LINK)},[providerType$2.ProviderType.WALLET_CONNECT_V2]:{projectId:"61570c542c2d66c659492e5b24a41522",urls:getRpcUrls(providerType$2.ProviderType.WALLET_CONNECT_V2),chains:{[chainIdExports.ChainId.ETHEREUM_MAINNET]:{chains:[chainIdExports.ChainId.ETHEREUM_MAINNET],optionalChains:[chainIdExports.ChainId.MATIC_MAINNET,chainIdExports.ChainId.ARBITRUM_MAINNET,chainIdExports.ChainId.OPTIMISM_MAINNET,chainIdExports.ChainId.AVALANCHE_MAINNET,chainIdExports.ChainId.BSC_MAINNET,chainIdExports.ChainId.FANTOM_MAINNET]},[chainIdExports.ChainId.ETHEREUM_SEPOLIA]:{chains:[chainIdExports.ChainId.ETHEREUM_SEPOLIA],optionalChains:[chainIdExports.ChainId.MATIC_AMOY]}}},[providerType$2.ProviderType.MAGIC]:{apiKey:"pk_live_212568025B158355",urls:getRpcUrls(providerType$2.ProviderType.MAGIC),chains:[chainIdExports.ChainId.ETHEREUM_MAINNET,chainIdExports.ChainId.ETHEREUM_SEPOLIA,chainIdExports.ChainId.MATIC_MAINNET,chainIdExports.ChainId.MATIC_AMOY,chainIdExports.ChainId.OPTIMISM_MAINNET,chainIdExports.ChainId.ARBITRUM_MAINNET,chainIdExports.ChainId.AVALANCHE_MAINNET,chainIdExports.ChainId.BSC_MAINNET,chainIdExports.ChainId.FANTOM_MAINNET]},[providerType$2.ProviderType.MAGIC_TEST]:{apiKey:"pk_live_CE856A4938B36648",urls:getRpcUrls(providerType$2.ProviderType.MAGIC),chains:[chainIdExports.ChainId.ETHEREUM_MAINNET,chainIdExports.ChainId.ETHEREUM_SEPOLIA,chainIdExports.ChainId.MATIC_MAINNET,chainIdExports.ChainId.MATIC_AMOY,chainIdExports.ChainId.OPTIMISM_MAINNET,chainIdExports.ChainId.ARBITRUM_MAINNET,chainIdExports.ChainId.AVALANCHE_MAINNET,chainIdExports.ChainId.BSC_MAINNET,chainIdExports.ChainId.FANTOM_MAINNET]}});function getConfiguration(){return configuration}function getRpcUrls(a){const _={[chainIdExports.ChainId.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet",[chainIdExports.ChainId.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia",[chainIdExports.ChainId.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon",[chainIdExports.ChainId.MATIC_AMOY]:"https://rpc.decentraland.org/amoy",[chainIdExports.ChainId.ARBITRUM_MAINNET]:"https://rpc.decentraland.org/arbitrum",[chainIdExports.ChainId.OPTIMISM_MAINNET]:"https://rpc.decentraland.org/optimism",[chainIdExports.ChainId.AVALANCHE_MAINNET]:"https://rpc.decentraland.org/avalanche",[chainIdExports.ChainId.BSC_MAINNET]:"https://rpc.decentraland.org/binance",[chainIdExports.ChainId.FANTOM_MAINNET]:"https://rpc.decentraland.org/fantom"};let $="";switch(a){case providerType$2.ProviderType.WALLET_LINK:$="walletlink";break;case providerType$2.ProviderType.FORTMATIC:$="fortmatic";break;case providerType$2.ProviderType.MAGIC:$="magic";break;case providerType$2.ProviderType.MAGIC_TEST:$="magic";break;case providerType$2.ProviderType.WALLET_CONNECT_V2:$="walletconnect-v2";break;case providerType$2.ProviderType.AUTH_SERVER:$="auth-server";break}if($)for(const j in _)_[j]+=`?project=${$}`;return _}class FortmaticConnector extends AbstractConnector{constructor(_){const $=getConfiguration()[dist$8.ProviderType.FORTMATIC],j=Object.keys($.apiKeys).map(_e=>Number(_e));if(!j.includes(_))throw new Error(`Invariant error: Unsupported chainId ${_}`);super({supportedChainIds:j}),this.apiKey=$.apiKeys[_],this.chainId=_,this.rpcUrl=$.urls[_]}async activate(){if(!this.fortmatic){const{default:$}=await __vitePreload(()=>import("./fortmatic-e82cbbca.js").then(j=>j.f),[]);this.fortmatic=new $(this.apiKey,{rpcUrl:this.rpcUrl,chainId:this.chainId})}const _=await this.fortmatic.getProvider().enable().then($=>$[0]);return{provider:this.fortmatic.getProvider(),chainId:this.chainId,account:_}}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(_=>_[0])}deactivate(){}close(){return this.fortmatic.user.logout()}}function warning$2(a,_){}function _extends$4(){return _extends$4=Object.assign||function(a){for(var _=1;_<arguments.length;_++){var $=arguments[_];for(var j in $)Object.prototype.hasOwnProperty.call($,j)&&(a[j]=$[j])}return a},_extends$4.apply(this,arguments)}function _inheritsLoose$4(a,_){a.prototype=Object.create(_.prototype),a.prototype.constructor=a,a.__proto__=_}function _getPrototypeOf$x(a){return _getPrototypeOf$x=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$x(a)}function _setPrototypeOf$z(a,_){return _setPrototypeOf$z=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$z(a,_)}function isNativeReflectConstruct(){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 _construct$1(a,_,$){return isNativeReflectConstruct()?_construct$1=Reflect.construct:_construct$1=function(_e,et,tt){var rt=[null];rt.push.apply(rt,et);var at=Function.bind.apply(_e,rt),ct=new at;return tt&&_setPrototypeOf$z(ct,tt.prototype),ct},_construct$1.apply(null,arguments)}function _isNativeFunction$1(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function _wrapNativeSuper$1(a){var _=typeof Map=="function"?new Map:void 0;return _wrapNativeSuper$1=function(j){if(j===null||!_isNativeFunction$1(j))return j;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(typeof _<"u"){if(_.has(j))return _.get(j);_.set(j,_e)}function _e(){return _construct$1(j,arguments,_getPrototypeOf$x(this).constructor)}return _e.prototype=Object.create(j.prototype,{constructor:{value:_e,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf$z(_e,j)},_wrapNativeSuper$1(a)}function _assertThisInitialized$y(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")));typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));function _catch(a,_){try{var $=a()}catch(j){return _(j)}return $&&$.then?$.then(void 0,_):$}function parseSendReturn(a){return a.hasOwnProperty("result")?a.result:a}var NoEthereumProviderError=function(a){_inheritsLoose$4(_,a);function _(){var $;return $=a.call(this)||this,$.name=$.constructor.name,$.message="No Ethereum provider was found on window.ethereum.",$}return _}(_wrapNativeSuper$1(Error)),UserRejectedRequestError=function(a){_inheritsLoose$4(_,a);function _(){var $;return $=a.call(this)||this,$.name=$.constructor.name,$.message="The user rejected the request.",$}return _}(_wrapNativeSuper$1(Error)),InjectedConnector$1=function(a){_inheritsLoose$4(_,a);function _(j){var _e;return _e=a.call(this,j)||this,_e.handleNetworkChanged=_e.handleNetworkChanged.bind(_assertThisInitialized$y(_e)),_e.handleChainChanged=_e.handleChainChanged.bind(_assertThisInitialized$y(_e)),_e.handleAccountsChanged=_e.handleAccountsChanged.bind(_assertThisInitialized$y(_e)),_e.handleClose=_e.handleClose.bind(_assertThisInitialized$y(_e)),_e}var $=_.prototype;return $.handleChainChanged=function(_e){this.emitUpdate({chainId:_e,provider:window.ethereum})},$.handleAccountsChanged=function(_e){_e.length===0?this.emitDeactivate():this.emitUpdate({account:_e[0]})},$.handleClose=function(_e,et){this.emitDeactivate()},$.handleNetworkChanged=function(_e){this.emitUpdate({chainId:_e,provider:window.ethereum})},$.activate=function(){try{var _e=function(dt){if(et)return dt;function yt(){return _extends$4({provider:window.ethereum},rt?{account:rt}:{})}var bt=function(){if(!rt)return Promise.resolve(window.ethereum.enable().then(function(Et){return Et&&parseSendReturn(Et)[0]})).then(function(Et){rt=Et})}();return bt&&bt.then?bt.then(yt):yt(bt)},et=!1,tt=this;if(!window.ethereum)throw new NoEthereumProviderError;window.ethereum.on&&(window.ethereum.on("chainChanged",tt.handleChainChanged),window.ethereum.on("accountsChanged",tt.handleAccountsChanged),window.ethereum.on("close",tt.handleClose),window.ethereum.on("networkChanged",tt.handleNetworkChanged)),window.ethereum.isMetaMask&&(window.ethereum.autoRefreshOnNetworkChange=!1);var rt,at=_catch(function(){return Promise.resolve(window.ethereum.send("eth_requestAccounts").then(function(ct){return parseSendReturn(ct)[0]})).then(function(ct){rt=ct})},function(ct){if(ct.code===4001)throw new UserRejectedRequestError});return Promise.resolve(at&&at.then?at.then(_e):_e(at))}catch(ct){return Promise.reject(ct)}},$.getProvider=function(){try{return Promise.resolve(window.ethereum)}catch(_e){return Promise.reject(_e)}},$.getChainId=function(){try{var _e=function(){function at(){if(!et)try{et=parseSendReturn(window.ethereum.send({method:"net_version"}))}catch{}return et||(window.ethereum.isDapper?et=parseSendReturn(window.ethereum.cachedResults.net_version):et=window.ethereum.chainId||window.ethereum.netVersion||window.ethereum.networkVersion||window.ethereum._chainId),et}var ct=function(){if(!et){var dt=_catch(function(){return Promise.resolve(window.ethereum.send("net_version").then(parseSendReturn)).then(function(yt){et=yt})},function(){});if(dt&&dt.then)return dt.then(function(){})}}();return ct&&ct.then?ct.then(at):at(ct)};if(!window.ethereum)throw new NoEthereumProviderError;var et,tt=_catch(function(){return Promise.resolve(window.ethereum.send("eth_chainId").then(parseSendReturn)).then(function(rt){et=rt})},function(){});return Promise.resolve(tt&&tt.then?tt.then(_e):_e(tt))}catch(rt){return Promise.reject(rt)}},$.getAccount=function(){try{var _e=function(){function at(){return et||(et=parseSendReturn(window.ethereum.send({method:"eth_accounts"}))[0]),et}var ct=function(){if(!et){var dt=_catch(function(){return Promise.resolve(window.ethereum.enable().then(function(yt){return parseSendReturn(yt)[0]})).then(function(yt){et=yt})},function(){});if(dt&&dt.then)return dt.then(function(){})}}();return ct&&ct.then?ct.then(at):at(ct)};if(!window.ethereum)throw new NoEthereumProviderError;var et,tt=_catch(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(rt){return parseSendReturn(rt)[0]})).then(function(rt){et=rt})},function(){});return Promise.resolve(tt&&tt.then?tt.then(_e):_e(tt))}catch(rt){return Promise.reject(rt)}},$.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))},$.isAuthorized=function(){try{return window.ethereum?Promise.resolve(_catch(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(_e){return parseSendReturn(_e).length>0}))},function(){return!1})):Promise.resolve(!1)}catch(_e){return Promise.reject(_e)}},_}(AbstractConnector);class ErrorUnlockingWallet 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 UNLOCK_WALLET_TIMEOUT=60*1e3;class InjectedConnector extends InjectedConnector$1{constructor(_){super({supportedChainIds:[_]})}async activate(){const _=new Promise((j,_e)=>{setTimeout(()=>{_e(new ErrorUnlockingWallet)},UNLOCK_WALLET_TIMEOUT)}),$=super.activate();return Promise.race([$,_])}}var prefix="Invariant failed";function invariant(a,_){if(!a)throw new Error(prefix)}function _inheritsLoose$3(a,_){a.prototype=Object.create(_.prototype),a.prototype.constructor=a,_setPrototypeOf$y(a,_)}function _getPrototypeOf$w(a){return _getPrototypeOf$w=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$w(a)}function _setPrototypeOf$y(a,_){return _setPrototypeOf$y=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$y(a,_)}function _isNativeReflectConstruct$w(){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 _construct(a,_,$){return _isNativeReflectConstruct$w()?_construct=Reflect.construct:_construct=function(_e,et,tt){var rt=[null];rt.push.apply(rt,et);var at=Function.bind.apply(_e,rt),ct=new at;return tt&&_setPrototypeOf$y(ct,tt.prototype),ct},_construct.apply(null,arguments)}function _isNativeFunction(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function _wrapNativeSuper(a){var _=typeof Map=="function"?new Map:void 0;return _wrapNativeSuper=function(j){if(j===null||!_isNativeFunction(j))return j;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(typeof _<"u"){if(_.has(j))return _.get(j);_.set(j,_e)}function _e(){return _construct(j,arguments,_getPrototypeOf$w(this).constructor)}return _e.prototype=Object.create(j.prototype,{constructor:{value:_e,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf$y(_e,j)},_wrapNativeSuper(a)}var RequestError=function(a){_inheritsLoose$3(_,a);function _($,j,_e){var et;return et=a.call(this)||this,et.code=j,et.data=_e,et.name=et.constructor.name,et.message=$,et}return _}(_wrapNativeSuper(Error)),MiniRpcProvider=function(_,$){var j=this,_e=this;this.isMetaMask=!1,this.sendAsync=function(tt,rt){console.log("sendAsync",tt.method,tt.params),_e.request(tt.method,tt.params).then(function(at){return rt(null,{jsonrpc:"2.0",id:tt.id,result:at})}).catch(function(at){return rt(at,null)})},this.request=function(tt,rt){try{return typeof tt!="string"&&(rt=tt.params,tt=tt.method),Promise.resolve(fetch(j.url,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:1,method:tt,params:rt}),headers:{"Content-Type":"application/json"}})).then(function(at){if(!at.ok)throw new RequestError(at.status+": "+at.statusText,-32e3);return Promise.resolve(at.json()).then(function(ct){if("error"in ct){var dt,yt,bt;throw new RequestError(ct==null||(dt=ct.error)==null?void 0:dt.message,ct==null||(yt=ct.error)==null?void 0:yt.code,ct==null||(bt=ct.error)==null?void 0:bt.data)}else{if("result"in ct)return ct.result;throw new RequestError("Received unexpected JSON-RPC response to "+tt+" request.",-32e3,ct)}})})}catch(at){return Promise.reject(at)}},this.chainId=_,this.url=$;var et=new URL($);this.host=et.host,this.path=et.pathname},NetworkConnector$1=function(a){_inheritsLoose$3(_,a);function _(j){var _e,et=j.urls,tt=j.defaultChainId;return tt||Object.keys(et).length===1||invariant(!1),_e=a.call(this,{supportedChainIds:Object.keys(et).map(function(rt){return Number(rt)})})||this,_e.currentChainId=tt||Number(Object.keys(et)[0]),_e.providers=Object.keys(et).reduce(function(rt,at){return rt[Number(at)]=new MiniRpcProvider(Number(at),et[Number(at)]),rt},{}),_e}var $=_.prototype;return $.activate=function(){try{var _e=this;return Promise.resolve({provider:_e.providers[_e.currentChainId],chainId:_e.currentChainId,account:null})}catch(et){return Promise.reject(et)}},$.getProvider=function(){try{var _e=this;return Promise.resolve(_e.providers[_e.currentChainId])}catch(et){return Promise.reject(et)}},$.getChainId=function(){try{var _e=this;return Promise.resolve(_e.currentChainId)}catch(et){return Promise.reject(et)}},$.getAccount=function(){return Promise.resolve(null)},$.deactivate=function(){},$.changeChainId=function(_e){Object.keys(this.providers).includes(_e.toString())||invariant(!1),this.currentChainId=_e,this.emitUpdate({provider:this.providers[this.currentChainId],chainId:_e})},_}(AbstractConnector);class NetworkConnector extends NetworkConnector$1{constructor(_){super({urls:getConfiguration()[providerType$2.ProviderType.NETWORK].urls,defaultChainId:_})}}function _extends$3(){return _extends$3=Object.assign||function(a){for(var _=1;_<arguments.length;_++){var $=arguments[_];for(var j in $)Object.prototype.hasOwnProperty.call($,j)&&(a[j]=$[j])}return a},_extends$3.apply(this,arguments)}function _inheritsLoose$2(a,_){a.prototype=Object.create(_.prototype),a.prototype.constructor=a,_setPrototypeOf$x(a,_)}function _setPrototypeOf$x(a,_){return _setPrototypeOf$x=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$x(a,_)}function _assertThisInitialized$x(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}var CHAIN_ID=1,WalletLinkConnector$1=function(a){_inheritsLoose$2(_,a);function _(j){var _e,et=j.url,tt=j.appName,rt=j.appLogoUrl,at=j.darkMode,ct=j.supportedChainIds;return _e=a.call(this,{supportedChainIds:ct})||this,_e.url=et,_e.appName=tt,_e.appLogoUrl=rt,_e.darkMode=at||!1,_e.handleChainChanged=_e.handleChainChanged.bind(_assertThisInitialized$x(_e)),_e.handleAccountsChanged=_e.handleAccountsChanged.bind(_assertThisInitialized$x(_e)),_e}var $=_.prototype;return $.activate=function(){try{var _e=this,et=function(){return Promise.resolve(_e.provider.request({method:"eth_requestAccounts"})).then(function(at){var ct=at[0];return _e.provider.on("chainChanged",_e.handleChainChanged),_e.provider.on("accountsChanged",_e.handleAccountsChanged),{provider:_e.provider,account:ct}})},tt=function(){if(window.ethereum&&window.ethereum.isCoinbaseWallet===!0)_e.provider=window.ethereum;else{var rt=function(){if(!_e.walletLink)return Promise.resolve(__vitePreload(()=>import("./index-0991cb95.js").then(at=>at.i),["assets/index-0991cb95.js","assets/tslib.es6-c2094241.js"]).then(function(at){var ct;return(ct=at==null?void 0:at.default)!=null?ct:at})).then(function(at){_e.walletLink=new at(_extends$3({appName:_e.appName,darkMode:_e.darkMode},_e.appLogoUrl?{appLogoUrl:_e.appLogoUrl}:{})),_e.provider=_e.walletLink.makeWeb3Provider(_e.url,CHAIN_ID)})}();if(rt&&rt.then)return rt.then(function(){})}}();return Promise.resolve(tt&&tt.then?tt.then(et):et(tt))}catch(rt){return Promise.reject(rt)}},$.getProvider=function(){try{var _e=this;return Promise.resolve(_e.provider)}catch(et){return Promise.reject(et)}},$.getChainId=function(){try{var _e=this;return Promise.resolve(_e.provider.chainId)}catch(et){return Promise.reject(et)}},$.getAccount=function(){try{var _e=this;return Promise.resolve(_e.provider.request({method:"eth_requestAccounts"})).then(function(et){return et[0]})}catch(et){return Promise.reject(et)}},$.deactivate=function(){this.provider.removeListener("chainChanged",this.handleChainChanged),this.provider.removeListener("accountsChanged",this.handleAccountsChanged)},$.close=function(){try{var _e=this;return _e.provider.close(),_e.emitDeactivate(),Promise.resolve()}catch(et){return Promise.reject(et)}},$.handleChainChanged=function(_e){this.emitUpdate({chainId:_e})},$.handleAccountsChanged=function(_e){this.emitUpdate({account:_e[0]})},_}(AbstractConnector);class WalletLinkConnector extends WalletLinkConnector$1{constructor(_){const $=getConfiguration()[dist$8.ProviderType.WALLET_LINK];super({url:$.urls[_],appName:$.appName,supportedChainIds:[_]})}}class WalletConnectV2Connector extends AbstractConnector{constructor(_){super({supportedChainIds:(()=>{const{chains:$,optionalChains:j}=WalletConnectV2Connector.configuration.chains[_];return[...$,...j]})()}),this.desiredChainId=_,this.activate=async()=>{const $=await __vitePreload(()=>import("./index.es-7e5c2c63.js"),["assets/index.es-7e5c2c63.js","assets/tslib.es6-c2094241.js"]).then(_e=>{const{chains:et,optionalChains:tt}=WalletConnectV2Connector.configuration.chains[this.desiredChainId];return _e.default.init({projectId:WalletConnectV2Connector.configuration.projectId,rpcMap:WalletConnectV2Connector.configuration.urls,chains:et,optionalChains:tt,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"]})}),j=await $.enable();return $.on("accountsChanged",this.handleAccountsChanged),$.on("chainChanged",this.handleChainChanged),$.on("disconnect",this.handleDisconnect),this.provider=$,{chainId:$.chainId,account:j[0],provider:$}},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=()=>{var $,j;return(j=($=this.provider)==null?void 0:$.session)==null?void 0:j.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=$=>{this.emitUpdate({account:$[0]})},this.handleChainChanged=$=>{this.emitUpdate({chainId:$})},this.handleDisconnect=()=>{if(!this.provider)throw new Error("Provider is undefined");return this.emitDeactivate()}}}WalletConnectV2Connector.configuration=getConfiguration()[dist$8.ProviderType.WALLET_CONNECT_V2];WalletConnectV2Connector.clearStorage=a=>{a.removeRegExp(new RegExp("^wc@2:"))};class MagicConnector extends AbstractConnector{constructor(_,$=!1){super({supportedChainIds:getConfiguration()[dist$8.ProviderType.MAGIC].chains}),this.isTest=$,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 _e=await this.getProvider(),et=await _e.request({method:"eth_accounts"});return this.account=et[0]??null,{provider:_e,chainId:this.chainId,account:this.account}},this.getProvider=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");const j=await this.magic.wallet.getProvider();return{...j,request:new Proxy(j.request,{apply:async(_e,et,tt)=>{var rt,at,ct;if(((rt=tt[0])==null?void 0:rt.method)==="wallet_switchEthereumChain")try{const dt=parseInt((ct=(at=tt[0])==null?void 0:at.params[0])==null?void 0:ct.chainId,16);return this.supportedChainIds&&!this.supportedChainIds.includes(dt)?{code:2020202,message:"Unsupported Magic ChainId"}:(this.magic=await this.buildMagicInstance(dt),this.emitUpdate({chainId:dt}),null)}catch{return{code:2020201,message:"Error changing the Magic ChainId"}}return _e.bind(j)(...tt)}}),sendAsync:new Proxy(j.send,{apply:async(_e,et,tt)=>_e.bind(j)(...tt)})}},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 j=>{const{Magic:_e}=await __vitePreload(()=>import("./index-0ee79f8d.js"),["assets/index-0ee79f8d.js","assets/index-cd62a0db.js"]),{OAuthExtension:et}=await __vitePreload(()=>import("./index-d364b022.js"),["assets/index-d364b022.js","assets/index-cd62a0db.js"]),tt=getConfiguration()[this.isTest?dist$8.ProviderType.MAGIC_TEST:dist$8.ProviderType.MAGIC];return new _e(tt.apiKey,{extensions:[new et],network:{rpcUrl:tt.urls[j],chainId:j}})},this.chainId=_,this.account=null}close(){if(!this.magic)throw new Error("Magic: instance was not initialized");return this.magic.user.logout()}}class MagicTestConnector extends MagicConnector{constructor(_){super(_,!0)}}var dist$7={},Authenticator={};function getDefaultExportFromCjs(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var browser$d={exports:{}},process=browser$d.exports={},cachedSetTimeout,cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?cachedSetTimeout=setTimeout:cachedSetTimeout=defaultSetTimout}catch{cachedSetTimeout=defaultSetTimout}try{typeof clearTimeout=="function"?cachedClearTimeout=clearTimeout:cachedClearTimeout=defaultClearTimeout}catch{cachedClearTimeout=defaultClearTimeout}})();function runTimeout(a){if(cachedSetTimeout===setTimeout)return setTimeout(a,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(a,0);try{return cachedSetTimeout(a,0)}catch{try{return cachedSetTimeout.call(null,a,0)}catch{return cachedSetTimeout.call(this,a,0)}}}function runClearTimeout(a){if(cachedClearTimeout===clearTimeout)return clearTimeout(a);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(a);try{return cachedClearTimeout(a)}catch{try{return cachedClearTimeout.call(null,a)}catch{return cachedClearTimeout.call(this,a)}}}var queue=[],draining=!1,currentQueue,queueIndex=-1;function cleanUpNextTick(){!draining||!currentQueue||(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var a=runTimeout(cleanUpNextTick);draining=!0;for(var _=queue.length;_;){for(currentQueue=queue,queue=[];++queueIndex<_;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,_=queue.length}currentQueue=null,draining=!1,runClearTimeout(a)}}process.nextTick=function(a){var _=new Array(arguments.length-1);if(arguments.length>1)for(var $=1;$<arguments.length;$++)_[$-1]=arguments[$];queue.push(new Item(a,_)),queue.length===1&&!draining&&runTimeout(drainQueue)};function Item(a,_){this.fun=a,this.array=_}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=!0;process.env={};process.argv=[];process.version="";process.versions={};function noop$4(){}process.on=noop$4;process.addListener=noop$4;process.once=noop$4;process.off=noop$4;process.removeListener=noop$4;process.removeAllListeners=noop$4;process.emit=noop$4;process.prependListener=noop$4;process.prependOnceListener=noop$4;process.listeners=function(a){return[]};process.binding=function(a){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(a){throw new Error("process.chdir is not supported")};process.umask=function(){return 0};var browserExports$1=browser$d.exports;const process$1=getDefaultExportFromCjs(browserExports$1);var ethConnect={exports:{}};(function(a,_){(function($,j){j(_)})(commonjsGlobal,function($){function j(qt){if(qt.jsonrpc="2.0",!qt.id||typeof qt.id!="number"||Math.floor(qt.id)!==qt.id)throw new Error(`Invalid RPC message(invalid id) message: ${JSON.stringify(qt)}`);if(!qt.method||typeof qt.method!="string"||qt.method.trim().length===0)throw new Error(`Invalid RPC message(invalid method) message: ${JSON.stringify(qt)}`);if(!qt.params||typeof qt.params!="object")throw new Error(`Invalid RPC message(invalid params) message: ${JSON.stringify(qt)}`);return qt}var _e={};function et(){let qt,Gt;const nr=new Promise((xr,Tr)=>{qt=Lr=>{xr(Lr),nr.isPending=!1},Gt=Lr=>{Tr(Lr),nr.isPending=!1}}).catch(xr=>Promise.reject(xr));return nr.resolve=qt,nr.reject=Gt,"finally"in nr||(nr.finally=xr=>{nr.then(xr),nr.catch(xr)}),nr.isPending=!0,nr}Object.defineProperty(_e,"__esModule",{value:!0});var tt=_e.future=et;_e.default=et;var rt={exports:{}};/**
111
111
  * [js-sha3]{@link https://github.com/emn178/js-sha3}
112
112
  *
113
113
  * @version 0.8.0
@@ -132,7 +132,7 @@ use chrome, FireFox or Internet Explorer 11`)}var safeBuffer=safeBufferExports,r
132
132
  Ephemeral address: ${ot}
133
133
  Expiration: ${pt.toISOString()}`}Bt.getEphemeralMessage=gt})(bt=a.Authenticator||(a.Authenticator={}));const Et=async(Bt,zt)=>({nextAuthority:zt.payload});a.SIGNER_VALIDATOR=Et;const $t=async(Bt,zt)=>{if(!zt.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'");const vt=(0,dt.recoverAddressFromEthSignature)(zt.signature,zt.payload),nt=Bt.toLocaleLowerCase(),st=vt.toLocaleLowerCase();if(nt===st)return{nextAuthority:zt.payload};throw new Error(`Invalid signer address. Expected: ${nt}. Actual: ${st}`)};a.ECDSA_SIGNED_ENTITY_VALIDATOR=$t;const _t=async(Bt,zt,vt)=>{if(!zt.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'");const{message:nt,ephemeralAddress:st,expiration:lt}=Ct(zt.payload),ht=vt.dateToValidateExpirationInMillis?vt.dateToValidateExpirationInMillis:Date.now();if(lt>ht){const mt=(0,dt.recoverAddressFromEthSignature)(zt.signature,nt),wt=Bt.toLocaleLowerCase(),At=mt.toLocaleLowerCase();if(wt===At)return{nextAuthority:st};throw new Error(`Invalid signer address. Expected: ${wt}. Actual: ${At}`)}throw new Error(`Ephemeral key expired. Expiration: ${lt}. Test: ${ht}`)};a.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=_t;const xt=async(Bt,zt,vt)=>{if(!zt.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'");const{message:nt,ephemeralAddress:st,expiration:lt}=Ct(zt.payload),ht=vt!=null&&vt.dateToValidateExpirationInMillis?vt==null?void 0:vt.dateToValidateExpirationInMillis:Date.now();if(lt>ht&&await kt(vt.provider,Bt,nt,zt.signature,ht))return{nextAuthority:st};throw new Error(`Ephemeral key expired. Expiration: ${lt}. Test: ${ht}`)};a.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=xt;const St=async(Bt,zt,vt)=>{if(!zt.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(await kt(vt.provider,Bt,zt.payload,zt.signature,vt.dateToValidateExpirationInMillis))return{nextAuthority:zt.payload};throw new Error("Invalid validation")};a.EIP_1654_SIGNED_ENTITY_VALIDATOR=St;const Mt=async(Bt,zt)=>({error:"Error Validator."});function Tt(Bt){return Bt.length===yt?rt.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:rt.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL}a.getEphemeralSignatureType=Tt;function Rt(Bt){return Bt.length===yt?rt.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:rt.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY}a.getSignedIdentitySignatureType=Rt;function Ct(Bt){const zt=Bt.replace(/\r/g,""),vt=zt.split(`
134
134
  `),nt=vt[1].substring(19),st=vt[2].substring(12),lt=Date.parse(st);return{message:zt,ephemeralAddress:nt,expiration:lt}}a.parseEmphemeralPayload=Ct;async function It(Bt,zt,vt,nt){const st=bt.createEIP1271MessageHash(zt),lt=(0,et.hexToBytes)(vt);let ht;try{ht=(0,et.bytesToHex)(await Bt.isValidSignature(st,lt,nt))}catch{}if(ht===a.ERC1654_MAGIC_VALUE)return!0;const mt=(0,dt.createEthereumMessageHash)(zt);try{ht=(0,et.bytesToHex)(await Bt.isValidSignature(mt,lt,nt))}catch{}return ht===a.ERC1654_MAGIC_VALUE}a.isValidEIP1271Signature=It;async function kt(Bt,zt,vt,nt,st){if(!Bt)throw new Error("Missing provider");const lt=new et.default(Bt),ht=await(0,tt.SignatureValidator)(lt,zt);let mt=await It(ht,vt,nt);if(mt)return!0;const wt=new ct.default(lt);try{const{block:At}=await wt.getDate(st,!1);if(mt=await It(ht,vt,nt,At),mt)return!0}catch(At){throw new Error(`Invalid validation. Error: ${At.message}`)}throw new Error(`Invalid validation. Expected: ${a.ERC1654_MAGIC_VALUE}. Actual: ${mt}`)}function Dt(Bt){switch(Bt){case rt.AuthLinkType.SIGNER:return a.SIGNER_VALIDATOR;case rt.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:return a.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR;case rt.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:return a.ECDSA_SIGNED_ENTITY_VALIDATOR;case rt.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL:return a.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR;case rt.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY:return a.EIP_1654_SIGNED_ENTITY_VALIDATOR;default:return Mt}}})(Authenticator);(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(Authenticator,a),$(types$1,a)})(dist$7);var dist$5={},SingleSignOn={},isURL={exports:{}},assertString={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=j;function $(_e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$=function(tt){return typeof tt}:$=function(tt){return tt&&typeof Symbol=="function"&&tt.constructor===Symbol&&tt!==Symbol.prototype?"symbol":typeof tt},$(_e)}function j(_e){var et=typeof _e=="string"||_e instanceof String;if(!et){var tt=$(_e);throw _e===null?tt="null":tt==="object"&&(tt=_e.constructor.name),new TypeError("Expected a string but received a ".concat(tt))}}a.exports=_.default,a.exports.default=_.default})(assertString,assertString.exports);var assertStringExports=assertString.exports,isFQDN={exports:{}},merge={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=$;function $(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_e=arguments.length>1?arguments[1]:void 0;for(var et in _e)typeof j[et]>"u"&&(j[et]=_e[et]);return j}a.exports=_.default,a.exports.default=_.default})(merge,merge.exports);var mergeExports=merge.exports;(function(a,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=tt;var $=_e(assertStringExports),j=_e(mergeExports);function _e(rt){return rt&&rt.__esModule?rt:{default:rt}}var et={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function tt(rt,at){(0,$.default)(rt),at=(0,j.default)(at,et),at.allow_trailing_dot&&rt[rt.length-1]==="."&&(rt=rt.substring(0,rt.length-1)),at.allow_wildcard===!0&&rt.indexOf("*.")===0&&(rt=rt.substring(2));var ct=rt.split("."),dt=ct[ct.length-1];return at.require_tld&&(ct.length<2||!at.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(dt)||/\s/.test(dt))||!at.allow_numeric_tld&&/^\d+$/.test(dt)?!1:ct.every(function(yt){return!(yt.length>63&&!at.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(yt)||/[\uff01-\uff5e]/.test(yt)||/^-|-$/.test(yt)||!at.allow_underscores&&/_/.test(yt))})}a.exports=_.default,a.exports.default=_.default})(isFQDN,isFQDN.exports);var isFQDNExports=isFQDN.exports,isIP={exports:{}};(function(a,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=ct;var $=j(assertStringExports);function j(dt){return dt&&dt.__esModule?dt:{default:dt}}var _e="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",et="(".concat(_e,"[.]){3}").concat(_e),tt=new RegExp("^".concat(et,"$")),rt="(?:[0-9a-fA-F]{1,4})",at=new RegExp("^("+"(?:".concat(rt,":){7}(?:").concat(rt,"|:)|")+"(?:".concat(rt,":){6}(?:").concat(et,"|:").concat(rt,"|:)|")+"(?:".concat(rt,":){5}(?::").concat(et,"|(:").concat(rt,"){1,2}|:)|")+"(?:".concat(rt,":){4}(?:(:").concat(rt,"){0,1}:").concat(et,"|(:").concat(rt,"){1,3}|:)|")+"(?:".concat(rt,":){3}(?:(:").concat(rt,"){0,2}:").concat(et,"|(:").concat(rt,"){1,4}|:)|")+"(?:".concat(rt,":){2}(?:(:").concat(rt,"){0,3}:").concat(et,"|(:").concat(rt,"){1,5}|:)|")+"(?:".concat(rt,":){1}(?:(:").concat(rt,"){0,4}:").concat(et,"|(:").concat(rt,"){1,6}|:)|")+"(?::((?::".concat(rt,"){0,5}:").concat(et,"|(?::").concat(rt,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function ct(dt){var yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,$.default)(dt),yt=String(yt),yt?yt==="4"?tt.test(dt):yt==="6"?at.test(dt):!1:ct(dt,4)||ct(dt,6)}a.exports=_.default,a.exports.default=_.default})(isIP,isIP.exports);var isIPExports=isIP.exports;(function(a,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=St;var $=tt(assertStringExports),j=tt(isFQDNExports),_e=tt(isIPExports),et=tt(mergeExports);function tt(Mt){return Mt&&Mt.__esModule?Mt:{default:Mt}}function rt(Mt,Tt){return bt(Mt)||yt(Mt,Tt)||ct(Mt,Tt)||at()}function at(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
135
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ct(Mt,Tt){if(Mt){if(typeof Mt=="string")return dt(Mt,Tt);var Rt=Object.prototype.toString.call(Mt).slice(8,-1);if(Rt==="Object"&&Mt.constructor&&(Rt=Mt.constructor.name),Rt==="Map"||Rt==="Set")return Array.from(Mt);if(Rt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Rt))return dt(Mt,Tt)}}function dt(Mt,Tt){(Tt==null||Tt>Mt.length)&&(Tt=Mt.length);for(var Rt=0,Ct=new Array(Tt);Rt<Tt;Rt++)Ct[Rt]=Mt[Rt];return Ct}function yt(Mt,Tt){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(Mt)))){var Rt=[],Ct=!0,It=!1,kt=void 0;try{for(var Dt=Mt[Symbol.iterator](),Bt;!(Ct=(Bt=Dt.next()).done)&&(Rt.push(Bt.value),!(Tt&&Rt.length===Tt));Ct=!0);}catch(zt){It=!0,kt=zt}finally{try{!Ct&&Dt.return!=null&&Dt.return()}finally{if(It)throw kt}}return Rt}}function bt(Mt){if(Array.isArray(Mt))return Mt}var Et={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},$t=/^\[([^\]]+)\](?::([0-9]+))?$/;function _t(Mt){return Object.prototype.toString.call(Mt)==="[object RegExp]"}function xt(Mt,Tt){for(var Rt=0;Rt<Tt.length;Rt++){var Ct=Tt[Rt];if(Mt===Ct||_t(Ct)&&Ct.test(Mt))return!0}return!1}function St(Mt,Tt){if((0,$.default)(Mt),!Mt||/[\s<>]/.test(Mt)||Mt.indexOf("mailto:")===0||(Tt=(0,et.default)(Tt,Et),Tt.validate_length&&Mt.length>=2083)||!Tt.allow_fragments&&Mt.includes("#")||!Tt.allow_query_components&&(Mt.includes("?")||Mt.includes("&")))return!1;var Rt,Ct,It,kt,Dt,Bt,zt,vt;if(zt=Mt.split("#"),Mt=zt.shift(),zt=Mt.split("?"),Mt=zt.shift(),zt=Mt.split("://"),zt.length>1){if(Rt=zt.shift().toLowerCase(),Tt.require_valid_protocol&&Tt.protocols.indexOf(Rt)===-1)return!1}else{if(Tt.require_protocol)return!1;if(Mt.slice(0,2)==="//"){if(!Tt.allow_protocol_relative_urls)return!1;zt[0]=Mt.slice(2)}}if(Mt=zt.join("://"),Mt==="")return!1;if(zt=Mt.split("/"),Mt=zt.shift(),Mt===""&&!Tt.require_host)return!0;if(zt=Mt.split("@"),zt.length>1){if(Tt.disallow_auth||zt[0]===""||(Ct=zt.shift(),Ct.indexOf(":")>=0&&Ct.split(":").length>2))return!1;var nt=Ct.split(":"),st=rt(nt,2),lt=st[0],ht=st[1];if(lt===""&&ht==="")return!1}kt=zt.join("@"),Bt=null,vt=null;var mt=kt.match($t);if(mt?(It="",vt=mt[1],Bt=mt[2]||null):(zt=kt.split(":"),It=zt.shift(),zt.length&&(Bt=zt.join(":"))),Bt!==null&&Bt.length>0){if(Dt=parseInt(Bt,10),!/^[0-9]+$/.test(Bt)||Dt<=0||Dt>65535)return!1}else if(Tt.require_port)return!1;return Tt.host_whitelist?xt(It,Tt.host_whitelist):It===""&&!Tt.require_host?!0:!(!(0,_e.default)(It)&&!(0,j.default)(It,Tt)&&(!vt||!(0,_e.default)(vt,6))||(It=It||vt,Tt.host_blacklist&&xt(It,Tt.host_blacklist)))}a.exports=_.default,a.exports.default=_.default})(isURL,isURL.exports);var isURLExports=isURL.exports,SingleSignOn_shared={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.localStorageClearIdentity=a.localStorageStoreIdentity=a.localStorageGetIdentity=a.createMessage=a.SINGLE_SIGN_ON_TARGET=a.Action=void 0;var _;(function(rt){rt.GET="get",rt.STORE="store",rt.CLEAR="clear",rt.PING="ping"})(_||(a.Action=_={})),a.SINGLE_SIGN_ON_TARGET="single-sign-on";function $(rt){return{target:a.SINGLE_SIGN_ON_TARGET,...rt}}a.createMessage=$;function j(rt){const at=localStorage.getItem(tt(rt));if(!at)return null;let ct;try{ct=JSON.parse(at)}catch{return et(rt),null}return ct.expiration=new Date(ct.expiration),ct.expiration.getTime()<=Date.now()?(et(rt),null):ct}a.localStorageGetIdentity=j;function _e(rt,at){new Date(at.expiration).getTime()>Date.now()&&localStorage.setItem(tt(rt),JSON.stringify(at))}a.localStorageStoreIdentity=_e;function et(rt){localStorage.removeItem(tt(rt))}a.localStorageClearIdentity=et;function tt(rt){if(!/^0x[a-fA-F0-9]{40}$/.test(rt))throw new Error("User must be a valid ethereum address");return`single-sign-on-${rt.toLowerCase()}`}})(SingleSignOn_shared);Object.defineProperty(SingleSignOn,"__esModule",{value:!0});SingleSignOn.clearIdentity=SingleSignOn.storeIdentity=SingleSignOn.getIdentity=SingleSignOn.init=void 0;const isURL_1=isURLExports,SingleSignOn_shared_1=SingleSignOn_shared,IFRAME_ID=SingleSignOn_shared_1.SINGLE_SIGN_ON_TARGET,GET_IFRAME_TIMEOUT=500,GET_IFRAME_RETRIES=5;let _counter=0,_src="";const defaultOptions$1={protocols:["https"],require_protocol:!0};function init(a,_={}){if(!(0,isURL_1.default)(a,{...defaultOptions$1,..._}))throw new Error(`Invalid url: ${a}`);if(_src)throw new Error("Already initialized");const $=document.createElement("iframe");$.id=IFRAME_ID,$.src=a,$.style.width="0",$.style.height="0",$.style.border="none",$.style.position="absolute",document.body.appendChild($),_src=a}SingleSignOn.init=init;async function getIdentity(a){let _;try{_=(await postMessage(await getIframe(),SingleSignOn_shared_1.Action.GET,{user:a})).identity??null}catch($){logFallback($),_=(0,SingleSignOn_shared_1.localStorageGetIdentity)(a)}return _}SingleSignOn.getIdentity=getIdentity;async function storeIdentity(a,_){try{await postMessage(await getIframe(),SingleSignOn_shared_1.Action.STORE,{user:a,identity:_})}catch($){logFallback($),(0,SingleSignOn_shared_1.localStorageStoreIdentity)(a,_)}}SingleSignOn.storeIdentity=storeIdentity;async function clearIdentity(a){try{await postMessage(await getIframe(),SingleSignOn_shared_1.Action.CLEAR,{user:a})}catch(_){logFallback(_),(0,SingleSignOn_shared_1.localStorageClearIdentity)(a)}}SingleSignOn.clearIdentity=clearIdentity;async function getIframe(){if(!_src)throw new Error("Not initialized");for(let a=0;a<GET_IFRAME_RETRIES;a++){const _=document.getElementById(IFRAME_ID),$=_==null?void 0:_.contentWindow;if(!$){await wait$1(GET_IFRAME_TIMEOUT);continue}try{await postMessage($,SingleSignOn_shared_1.Action.PING,{},GET_IFRAME_TIMEOUT)}catch{continue}return $}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function postMessage(a,_,$,j=0){_counter++;const _e=_counter;let et=null;const tt=new Promise((rt,at)=>{et=({data:ct})=>{!ct||ct.target!==SingleSignOn_shared_1.SINGLE_SIGN_ON_TARGET||ct.id!==_e||(ct.error?at(new Error(ct.error)):rt(ct))},window.addEventListener("message",et)});a.postMessage((0,SingleSignOn_shared_1.createMessage)({id:_e,action:_,...$}),_src);try{return await(j?Promise.race([tt,new Promise((rt,at)=>setTimeout(()=>at(new Error("Did not receive a response in time")),j))]):tt)}catch(rt){throw rt}finally{et&&window.removeEventListener("message",et)}}function wait$1(a){return new Promise(_=>setTimeout(_,a))}function logFallback(a){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",a.message)}(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(SingleSignOn,a),$(SingleSignOn_shared,a)})(dist$5);const STORAGE_KEY_ADDRESS="auth-server-provider-address",STORAGE_KEY_CHAIN_ID="auth-server-provider-chain-id";function isRPCError(a){return typeof a=="object"&&a!==void 0&&a!==null&&"message"in a&&"code"in a}function isErrorWithMessage$1(a){return typeof a=="object"&&a!==void 0&&a!==null&&"message"in a}class AuthServerProvider{constructor(){this.getChainId=()=>{const _=localStorage.getItem(STORAGE_KEY_CHAIN_ID);return _?Number(_):dist$8.ChainId.ETHEREUM_MAINNET},this.getAccount=()=>AuthServerProvider.getAccount(),this.request=async({method:_,params:$})=>{if(_==="wallet_switchEthereumChain"){const rt=parseInt($[0].chainId,16).toString();localStorage.setItem(STORAGE_KEY_CHAIN_ID,rt);return}if(["eth_chainId","net_version"].includes(_))return this.getChainId();if(["eth_accounts","eth_requestAccounts"].includes(_)){const rt=this.getAccount();return rt?[rt]:[]}if(["eth_getTransactionReceipt","eth_estimateGas","eth_call","eth_getBalance","eth_getStorageAt","eth_blockNumber","eth_gasPrice","eth_protocolVersion","net_version","web3_sha3","web3_clientVersion","eth_getTransactionCount","eth_getBlockByNumber","eth_getCode"].includes(_))return new JsonRpcProvider(getRpcUrls(dist$8.ProviderType.AUTH_SERVER)[this.getChainId()]).send(_,$);const j=await AuthServerProvider.getSocket(),_e=this.getIdentity(),et=await AuthServerProvider.createRequest(j,{method:_,params:$,authChain:_e==null?void 0:_e.authChain});AuthServerProvider.openAuthDapp(et);const tt=await AuthServerProvider.awaitOutcomeWithTimeout(j,et);if(tt.error)throw tt.error;return tt.result},this.sendAsync=async(_,$)=>{try{const j=await this.request(_);$(null,j)}catch(j){isRPCError(j)?$(j,{error:j,id:void 0,jsonrpc:"2.0"}):$({code:999,message:isErrorWithMessage$1(j)?j.message:"Unknown error"},{error:{code:0,message:isErrorWithMessage$1(j)?j.message:"Unknown error"},id:void 0,jsonrpc:"2.0"})}},this.deactivate=()=>{AuthServerProvider.deactivate()},this.getIdentity=()=>{const _=AuthServerProvider.getAccount();return _?dist$5.localStorageGetIdentity(_):null}}static setAuthServerUrl(_){AuthServerProvider.authServerUrl=_}static setAuthDappUrl(_){AuthServerProvider.authDappUrl=_}static setIdentityExpiration(_){AuthServerProvider.identityExpirationInMillis=_}static setOpenBrowser(_){AuthServerProvider.openBrowser=_}}AuthServerProvider.authServerUrl="";AuthServerProvider.authDappUrl="";AuthServerProvider.identityExpirationInMillis=30*24*60*60*1e3;AuthServerProvider.initSignIn=async()=>{const a=await AuthServerProvider.getSocket(),_=Wallet.createRandom(),$=new Date(Date.now()+AuthServerProvider.identityExpirationInMillis),j=dist$7.Authenticator.getEphemeralMessage(_.address,$),_e=await AuthServerProvider.createRequest(a,{method:"dcl_personal_sign",params:[j]});return{socket:a,ephemeralAccount:_,expiration:$,ephemeralMessage:j,requestResponse:_e}};AuthServerProvider.finishSignIn=async({socket:a,ephemeralAccount:_,expiration:$,ephemeralMessage:j,requestResponse:_e})=>{AuthServerProvider.openAuthDapp(_e);const{sender:et,result:tt}=await AuthServerProvider.awaitOutcomeWithTimeout(a,_e),rt={expiration:$,ephemeralIdentity:{address:_.address,privateKey:_.privateKey,publicKey:_.publicKey},authChain:[{type:dist$7.AuthLinkType.SIGNER,payload:et.toLowerCase(),signature:""},{type:dist$7.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL,payload:j,signature:tt}]};localStorage.setItem(STORAGE_KEY_ADDRESS,et.toLowerCase()),dist$5.localStorageStoreIdentity(et,rt)};AuthServerProvider.getAccount=()=>localStorage.getItem(STORAGE_KEY_ADDRESS);AuthServerProvider.deactivate=()=>{const a=AuthServerProvider.getAccount();a&&dist$5.localStorageClearIdentity(a),localStorage.removeItem(STORAGE_KEY_ADDRESS),localStorage.removeItem(STORAGE_KEY_CHAIN_ID)};AuthServerProvider.hasValidIdentity=()=>{const a=AuthServerProvider.getAccount();return a?!!dist$5.localStorageGetIdentity(a):!1};AuthServerProvider.awaitOutcomeWithTimeout=async(a,_)=>{const $=new Promise((_e,et)=>{setTimeout(()=>{et(new Error("Timeout"))},new Date(_.expiration).getTime()-Date.now())}),j=new Promise(_e=>{const et=tt=>{tt.requestId===_.requestId&&(a.off("message",et),_e(tt))};a.on("outcome",et)});try{return await Promise.race([$,j])}finally{a.disconnect()}};AuthServerProvider.openAuthDapp=a=>{const _=`${AuthServerProvider.authDappUrl}/requests/${a.requestId}`,$="_blank",j="noopener,noreferrer";AuthServerProvider.openBrowser?AuthServerProvider.openBrowser(_,$,j):window.open(_,$,j)};AuthServerProvider.getSocket=async()=>{const a=lookup(AuthServerProvider.authServerUrl);return await new Promise(_=>{const $=()=>{a.off("connect",$),_()};a.on("connect",$)}),a};AuthServerProvider.createRequest=async(a,_)=>{const $=await a.emitWithAck("request",{method:_.method,params:_.params,authChain:_.authChain});if($.error)throw a.disconnect(),new Error($.error);return $};class AuthServerConnector extends AbstractConnector{constructor(){super(),this.activate=async()=>{const _=this.provider.getAccount();if(!_)throw new Error("Cannot activate the Auth Server Connector");return{provider:this.provider,chainId:this.provider.getChainId(),account:_}},this.getProvider=async()=>this.provider,this.getChainId=async()=>this.provider.getChainId(),this.getAccount=async()=>this.provider.getAccount(),this.provider=new AuthServerProvider}deactivate(){this.provider.deactivate()}}class Storage{}class LocalStorage extends Storage{get(_){const $=window.localStorage.getItem(_);return $===null?void 0:$}set(_,$){window.localStorage.setItem(_,$)}remove(_){window.localStorage.removeItem(_)}removeRegExp(_){for(let $=localStorage.length-1;$>=0;$--){const j=localStorage.key($);j&&_.test(j)&&localStorage.removeItem(j)}}}class ProviderAdapter{constructor(_){this.provider=_,this.id=0,this.on=($,j)=>this.provider.on($,j),this.emit=($,...j)=>this.provider.emit($,j),this.removeListener=($,j)=>this.provider.removeListener($,j),this.request=async({method:$,params:j})=>this.isModernProvider()?this.provider.request({method:$,params:j}):this.send($,j),this.sendAsync=async($,j)=>this.hasSendAsync()?this.provider.sendAsync($,(_e,et)=>{et&&!et.hasOwnProperty("result")?j(_e,{id:0,jsonrpc:"2.0",result:et}):j(_e,et)}):this.send($,j)}static adapt(_){const $=new ProviderAdapter(_);return{..._,on:$.on,emit:$.emit,removeListener:$.removeListener,request:$.request,sendAsync:$.sendAsync,send:$.send.bind($)}}async send(_,$){let j,_e,et;const tt=typeof $=="function";if(tt){const rt=_;_e=rt.params||[],j=rt.method,et=$}else j=_,_e=$||[],et=(rt,at)=>{if(rt)throw rt;return at};if(this.isModernProvider()){const[rt,at]=await this.provider.request({method:j,params:_e}).then(dt=>[null,dt]).catch(dt=>[dt,void 0]);return et(rt,tt?{id:"",jsonrpc:"2.0",result:at}:at)}else{this.patchOldMobile();const[rt,at]=tt?await new Promise(ct=>this.provider.send(_,(dt,yt)=>{ct([dt,yt])})):await new Promise(ct=>this.provider.send({jsonrpc:"2.0",id:++this.id,method:j,params:_e},(dt,yt)=>{ct([yt&&yt.hasOwnProperty("error")?yt.error:dt,yt&&yt.hasOwnProperty("result")?yt.result:yt])}));return et(rt,at)}}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 ConnectionManager{constructor(_){this.storage=_,this.getWalletName=()=>{if(this.connector instanceof WalletConnectV2Connector)return this.connector.getWalletName()},this.clearConnectionData=()=>{const{storageKey:$}=getConfiguration();this.storage.remove($),WalletConnectV2Connector.clearStorage(this.storage)},this.handleWeb3ReactDeactivate=async()=>{try{await this.disconnect()}catch($){console.error($)}}}async connect(_,$=chainIdExports.ChainId.ETHEREUM_MAINNET){if(this.connector)try{await this.disconnect()}catch(rt){console.error("Error disconnecting previous connection",rt)}const j=this.buildConnector(_,$);j.on(ConnectorEvent.Deactivate,this.handleWeb3ReactDeactivate);let{provider:_e,account:et}={};try{const rt=await j.activate();_e=rt.provider,et=rt.account}catch(rt){throw console.error("Error activating the connector",rt),rt}(_===providerType$2.ProviderType.MAGIC||_===providerType$2.ProviderType.MAGIC_TEST)&&j.on(ConnectorEvent.Update,({chainId:rt})=>{rt&&this.setConnectionData(_,rt)});let tt=$;if(_===providerType$2.ProviderType.INJECTED){const rt=await _e.request({method:"eth_chainId"});tt=rt?parseInt(rt,16):tt}return this.connector=j,this.setConnectionData(_,tt),{provider:ProviderAdapter.adapt(_e),providerType:_,account:et||"",chainId:tt}}isConnected(){return!!this.connector&&!!this.getConnectionData()}async tryPreviousConnection(){const _=this.getConnectionData();if(!_)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:_.providerType,chainId:_.chainId,account:await this.connector.getAccount()};const $=this.promiseOfConnection?await this.promiseOfConnection:await(this.promiseOfConnection=this.connect(_.providerType,_.chainId));return this.promiseOfConnection=void 0,{...$,chainId:this.getConnectionData().chainId}}getAvailableProviders(){const _=[providerType$2.ProviderType.FORTMATIC,providerType$2.ProviderType.WALLET_CONNECT,providerType$2.ProviderType.WALLET_LINK];return typeof window<"u"&&window.ethereum!==void 0?_.unshift(providerType$2.ProviderType.INJECTED):_.unshift(providerType$2.ProviderType.METAMASK_MOBILE),_}async disconnect(){this.connector&&(this.connector.removeAllListeners(ConnectorEvent.Deactivate),this.connector.removeAllListeners(ConnectorEvent.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(_,$=chainIdExports.ChainId.ETHEREUM_MAINNET){const _e=await this.buildConnector(_,$).getProvider();return ProviderAdapter.adapt(_e)}buildConnector(_,$){switch(_){case providerType$2.ProviderType.INJECTED:return new InjectedConnector($);case providerType$2.ProviderType.FORTMATIC:return new FortmaticConnector($);case providerType$2.ProviderType.MAGIC:return new MagicConnector($);case providerType$2.ProviderType.MAGIC_TEST:return new MagicTestConnector($);case providerType$2.ProviderType.WALLET_LINK:return new WalletLinkConnector($);case providerType$2.ProviderType.NETWORK:return new NetworkConnector($);case providerType$2.ProviderType.WALLET_CONNECT_V2:return new WalletConnectV2Connector($);case providerType$2.ProviderType.AUTH_SERVER:return new AuthServerConnector;default:throw new Error(`Invalid provider ${_}`)}}getConnectionData(){const{storageKey:_}=getConfiguration(),$=this.storage.get(_);return $?JSON.parse($):void 0}setConnectionData(_,$){const{storageKey:j}=getConfiguration(),_e=JSON.stringify({providerType:_,chainId:$});this.storage.set(j,_e)}isClosableConnector(){return this.connector&&typeof this.connector.close<"u"}}const connection$1=new ConnectionManager(new LocalStorage),useNavigateWithSearchParams=()=>{const a=useNavigate(),_=useLocation();return reactExports.useCallback(j=>{if(!j)throw new Error("Path cannot be empty");let _e;try{if(_e=new URL(j,window.location.origin),!_e.pathname)throw new Error("Invalid path provided")}catch{throw new Error("Invalid path provided")}const et=_e.pathname,tt=new URLSearchParams(_e.search),at=new URLSearchParams(_.search).get("targetConfigId");at&&tt.set("targetConfigId",at);const ct=tt.toString();a({pathname:et,search:ct?`?${ct}`:void 0})},[a,_])},logoImg="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239233428.commit-2de01c8/assets/logo-9a364aec.svg",ONE_MONTH_IN_MINUTES=60*24*30;function fromConnectionOptionToProviderType(a,_){switch(a){case ConnectionOptionType.DISCORD:case ConnectionOptionType.X:case ConnectionOptionType.GOOGLE:case ConnectionOptionType.APPLE:return _?providerType$2.ProviderType.MAGIC_TEST:providerType$2.ProviderType.MAGIC;case ConnectionOptionType.WALLET_CONNECT:case ConnectionOptionType.METAMASK_MOBILE:return providerType$2.ProviderType.WALLET_CONNECT_V2;case ConnectionOptionType.COINBASE:case ConnectionOptionType.WALLET_LINK:return providerType$2.ProviderType.WALLET_LINK;case ConnectionOptionType.FORTMATIC:return providerType$2.ProviderType.FORTMATIC;case ConnectionOptionType.METAMASK:case ConnectionOptionType.DAPPER:case ConnectionOptionType.SAMSUNG:return providerType$2.ProviderType.INJECTED;default:throw new Error("Invalid provider")}}async function generateIdentity(a,_){const $=new BrowserProvider(_),j=Wallet.createRandom(),_e={address:j.address.toString(),publicKey:hexlify(j.publicKey),privateKey:hexlify(j.privateKey)},et=await $.getSigner();return dist$7.Authenticator.initializeAuthChain(a,_e,ONE_MONTH_IN_MINUTES,tt=>et.signMessage(tt))}async function connectToSocialProvider(a,_,$){const j=_?getConfiguration().magic_test.apiKey:getConfiguration().magic.apiKey,_e=fromConnectionOptionToProviderType(a,_);if(providerType$2.ProviderType.MAGIC===_e||providerType$2.ProviderType.MAGIC_TEST===_e){const{Magic:et}=await __vitePreload(()=>import("./index-34c625fd.js"),["assets/index-34c625fd.js","assets/index-7fb3637e.js"]),{OAuthExtension:tt}=await __vitePreload(()=>import("./index-604dcebc.js"),["assets/index-604dcebc.js","assets/index-7fb3637e.js"]),rt=new et(j,{extensions:[new tt]}),at=new URL(window.location.href);at.pathname="/auth/callback",at.search="",await(rt==null?void 0:rt.oauth2.loginWithRedirect({provider:a===ConnectionOptionType.X?"twitter":a,redirectURI:at.href,customData:$}))}}async function connectToProvider(a){const _=fromConnectionOptionToProviderType(a);let $;try{$=await connection$1.connect(_)}catch(j){throw console.error("Error connecting to provider",j),j}if(!$.account||!$.provider)throw new Error("Could not get provider");return $}function isSocialLogin(a){return[ConnectionOptionType.APPLE,ConnectionOptionType.GOOGLE,ConnectionOptionType.X,ConnectionOptionType.DISCORD].includes(a)}async function getIdentitySignature(a,_){let $;const j=dist$5.localStorageGetIdentity(a);return j?$=j:($=await generateIdentity(a,_),dist$5.localStorageStoreIdentity(a,$)),$}function isMobile$1(){const a=navigator.userAgent;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)}var Popup={},isElement_1,hasRequiredIsElement;function requireIsElement(){if(hasRequiredIsElement)return isElement_1;hasRequiredIsElement=1;var a=requireIsObjectLike(),_=requireIsPlainObject();function $(j){return a(j)&&j.nodeType===1&&!_(j)}return isElement_1=$,isElement_1}var _arrayReduce,hasRequired_arrayReduce;function require_arrayReduce(){if(hasRequired_arrayReduce)return _arrayReduce;hasRequired_arrayReduce=1;function a(_,$,j,_e){var et=-1,tt=_==null?0:_.length;for(_e&&tt&&(j=_[++et]);++et<tt;)j=$(j,_[et],et,_);return j}return _arrayReduce=a,_arrayReduce}var _baseReduce,hasRequired_baseReduce;function require_baseReduce(){if(hasRequired_baseReduce)return _baseReduce;hasRequired_baseReduce=1;function a(_,$,j,_e,et){return et(_,function(tt,rt,at){j=_e?(_e=!1,tt):$(j,tt,rt,at)}),j}return _baseReduce=a,_baseReduce}var reduce_1,hasRequiredReduce;function requireReduce(){if(hasRequiredReduce)return reduce_1;hasRequiredReduce=1;var a=require_arrayReduce(),_=require_baseEach(),$=require_baseIteratee(),j=require_baseReduce(),_e=requireIsArray();function et(tt,rt,at){var ct=_e(tt)?a:j,dt=arguments.length<3;return ct(tt,$(rt,4),at,dt,_)}return reduce_1=et,reduce_1}var ManagerReferenceNodeContext=reactExports.createContext(),ManagerReferenceNodeSetterContext=reactExports.createContext();function Manager(a){var _=a.children,$=reactExports.useState(null),j=$[0],_e=$[1],et=reactExports.useRef(!1);reactExports.useEffect(function(){return function(){et.current=!0}},[]);var tt=reactExports.useCallback(function(rt){et.current||_e(rt)},[]);return reactExports.createElement(ManagerReferenceNodeContext.Provider,{value:j},reactExports.createElement(ManagerReferenceNodeSetterContext.Provider,{value:tt},_))}var unwrapArray=function(_){return Array.isArray(_)?_[0]:_},safeInvoke=function(_){if(typeof _=="function"){for(var $=arguments.length,j=new Array($>1?$-1:0),_e=1;_e<$;_e++)j[_e-1]=arguments[_e];return _.apply(void 0,j)}},setRef=function(_,$){if(typeof _=="function")return safeInvoke(_,$);_!=null&&(_.current=$)},fromEntries=function(_){return _.reduce(function($,j){var _e=j[0],et=j[1];return $[_e]=et,$},{})},useIsomorphicLayoutEffect=typeof window<"u"&&window.document&&window.document.createElement?reactExports.useLayoutEffect:reactExports.useEffect,top="top",bottom="bottom",right$3="right",left$3="left",auto="auto",basePlacements=[top,bottom,right$3,left$3],start="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce(function(a,_){return a.concat([_+"-"+start,_+"-"+end])},[]),placements=[].concat(basePlacements,[auto]).reduce(function(a,_){return a.concat([_,_+"-"+start,_+"-"+end])},[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main$7="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main$7,afterMain,beforeWrite,write,afterWrite];function getNodeName(a){return a?(a.nodeName||"").toLowerCase():null}function getWindow(a){if(a==null)return window;if(a.toString()!=="[object Window]"){var _=a.ownerDocument;return _&&_.defaultView||window}return a}function isElement$1(a){var _=getWindow(a).Element;return a instanceof _||a instanceof Element}function isHTMLElement(a){var _=getWindow(a).HTMLElement;return a instanceof _||a instanceof HTMLElement}function isShadowRoot(a){if(typeof ShadowRoot>"u")return!1;var _=getWindow(a).ShadowRoot;return a instanceof _||a instanceof ShadowRoot}function applyStyles(a){var _=a.state;Object.keys(_.elements).forEach(function($){var j=_.styles[$]||{},_e=_.attributes[$]||{},et=_.elements[$];!isHTMLElement(et)||!getNodeName(et)||(Object.assign(et.style,j),Object.keys(_e).forEach(function(tt){var rt=_e[tt];rt===!1?et.removeAttribute(tt):et.setAttribute(tt,rt===!0?"":rt)}))})}function effect$2(a){var _=a.state,$={popper:{position:_.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(_.elements.popper.style,$.popper),_.styles=$,_.elements.arrow&&Object.assign(_.elements.arrow.style,$.arrow),function(){Object.keys(_.elements).forEach(function(j){var _e=_.elements[j],et=_.attributes[j]||{},tt=Object.keys(_.styles.hasOwnProperty(j)?_.styles[j]:$[j]),rt=tt.reduce(function(at,ct){return at[ct]="",at},{});!isHTMLElement(_e)||!getNodeName(_e)||(Object.assign(_e.style,rt),Object.keys(et).forEach(function(at){_e.removeAttribute(at)}))})}}const applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(a){return a.split("-")[0]}var max=Math.max,min=Math.min,round=Math.round;function getUAString(){var a=navigator.userAgentData;return a!=null&&a.brands&&Array.isArray(a.brands)?a.brands.map(function(_){return _.brand+"/"+_.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(a,_,$){_===void 0&&(_=!1),$===void 0&&($=!1);var j=a.getBoundingClientRect(),_e=1,et=1;_&&isHTMLElement(a)&&(_e=a.offsetWidth>0&&round(j.width)/a.offsetWidth||1,et=a.offsetHeight>0&&round(j.height)/a.offsetHeight||1);var tt=isElement$1(a)?getWindow(a):window,rt=tt.visualViewport,at=!isLayoutViewport()&&$,ct=(j.left+(at&&rt?rt.offsetLeft:0))/_e,dt=(j.top+(at&&rt?rt.offsetTop:0))/et,yt=j.width/_e,bt=j.height/et;return{width:yt,height:bt,top:dt,right:ct+yt,bottom:dt+bt,left:ct,x:ct,y:dt}}function getLayoutRect(a){var _=getBoundingClientRect(a),$=a.offsetWidth,j=a.offsetHeight;return Math.abs(_.width-$)<=1&&($=_.width),Math.abs(_.height-j)<=1&&(j=_.height),{x:a.offsetLeft,y:a.offsetTop,width:$,height:j}}function contains(a,_){var $=_.getRootNode&&_.getRootNode();if(a.contains(_))return!0;if($&&isShadowRoot($)){var j=_;do{if(j&&a.isSameNode(j))return!0;j=j.parentNode||j.host}while(j)}return!1}function getComputedStyle(a){return getWindow(a).getComputedStyle(a)}function isTableElement(a){return["table","td","th"].indexOf(getNodeName(a))>=0}function getDocumentElement(a){return((isElement$1(a)?a.ownerDocument:a.document)||window.document).documentElement}function getParentNode(a){return getNodeName(a)==="html"?a:a.assignedSlot||a.parentNode||(isShadowRoot(a)?a.host:null)||getDocumentElement(a)}function getTrueOffsetParent(a){return!isHTMLElement(a)||getComputedStyle(a).position==="fixed"?null:a.offsetParent}function getContainingBlock(a){var _=/firefox/i.test(getUAString()),$=/Trident/i.test(getUAString());if($&&isHTMLElement(a)){var j=getComputedStyle(a);if(j.position==="fixed")return null}var _e=getParentNode(a);for(isShadowRoot(_e)&&(_e=_e.host);isHTMLElement(_e)&&["html","body"].indexOf(getNodeName(_e))<0;){var et=getComputedStyle(_e);if(et.transform!=="none"||et.perspective!=="none"||et.contain==="paint"||["transform","perspective"].indexOf(et.willChange)!==-1||_&&et.willChange==="filter"||_&&et.filter&&et.filter!=="none")return _e;_e=_e.parentNode}return null}function getOffsetParent(a){for(var _=getWindow(a),$=getTrueOffsetParent(a);$&&isTableElement($)&&getComputedStyle($).position==="static";)$=getTrueOffsetParent($);return $&&(getNodeName($)==="html"||getNodeName($)==="body"&&getComputedStyle($).position==="static")?_:$||getContainingBlock(a)||_}function getMainAxisFromPlacement(a){return["top","bottom"].indexOf(a)>=0?"x":"y"}function within(a,_,$){return max(a,min(_,$))}function withinMaxClamp(a,_,$){var j=within(a,_,$);return j>$?$:j}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(a){return Object.assign({},getFreshSideObject(),a)}function expandToHashMap(a,_){return _.reduce(function($,j){return $[j]=a,$},{})}var toPaddingObject=function(_,$){return _=typeof _=="function"?_(Object.assign({},$.rects,{placement:$.placement})):_,mergePaddingObject(typeof _!="number"?_:expandToHashMap(_,basePlacements))};function arrow(a){var _,$=a.state,j=a.name,_e=a.options,et=$.elements.arrow,tt=$.modifiersData.popperOffsets,rt=getBasePlacement($.placement),at=getMainAxisFromPlacement(rt),ct=[left$3,right$3].indexOf(rt)>=0,dt=ct?"height":"width";if(!(!et||!tt)){var yt=toPaddingObject(_e.padding,$),bt=getLayoutRect(et),Et=at==="y"?top:left$3,$t=at==="y"?bottom:right$3,_t=$.rects.reference[dt]+$.rects.reference[at]-tt[at]-$.rects.popper[dt],xt=tt[at]-$.rects.reference[at],St=getOffsetParent(et),Mt=St?at==="y"?St.clientHeight||0:St.clientWidth||0:0,Tt=_t/2-xt/2,Rt=yt[Et],Ct=Mt-bt[dt]-yt[$t],It=Mt/2-bt[dt]/2+Tt,kt=within(Rt,It,Ct),Dt=at;$.modifiersData[j]=(_={},_[Dt]=kt,_.centerOffset=kt-It,_)}}function effect$1(a){var _=a.state,$=a.options,j=$.element,_e=j===void 0?"[data-popper-arrow]":j;_e!=null&&(typeof _e=="string"&&(_e=_.elements.popper.querySelector(_e),!_e)||contains(_.elements.popper,_e)&&(_.elements.arrow=_e))}const arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(a){return a.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(a,_){var $=a.x,j=a.y,_e=_.devicePixelRatio||1;return{x:round($*_e)/_e||0,y:round(j*_e)/_e||0}}function mapToStyles(a){var _,$=a.popper,j=a.popperRect,_e=a.placement,et=a.variation,tt=a.offsets,rt=a.position,at=a.gpuAcceleration,ct=a.adaptive,dt=a.roundOffsets,yt=a.isFixed,bt=tt.x,Et=bt===void 0?0:bt,$t=tt.y,_t=$t===void 0?0:$t,xt=typeof dt=="function"?dt({x:Et,y:_t}):{x:Et,y:_t};Et=xt.x,_t=xt.y;var St=tt.hasOwnProperty("x"),Mt=tt.hasOwnProperty("y"),Tt=left$3,Rt=top,Ct=window;if(ct){var It=getOffsetParent($),kt="clientHeight",Dt="clientWidth";if(It===getWindow($)&&(It=getDocumentElement($),getComputedStyle(It).position!=="static"&&rt==="absolute"&&(kt="scrollHeight",Dt="scrollWidth")),It=It,_e===top||(_e===left$3||_e===right$3)&&et===end){Rt=bottom;var Bt=yt&&It===Ct&&Ct.visualViewport?Ct.visualViewport.height:It[kt];_t-=Bt-j.height,_t*=at?1:-1}if(_e===left$3||(_e===top||_e===bottom)&&et===end){Tt=right$3;var zt=yt&&It===Ct&&Ct.visualViewport?Ct.visualViewport.width:It[Dt];Et-=zt-j.width,Et*=at?1:-1}}var vt=Object.assign({position:rt},ct&&unsetSides),nt=dt===!0?roundOffsetsByDPR({x:Et,y:_t},getWindow($)):{x:Et,y:_t};if(Et=nt.x,_t=nt.y,at){var st;return Object.assign({},vt,(st={},st[Rt]=Mt?"0":"",st[Tt]=St?"0":"",st.transform=(Ct.devicePixelRatio||1)<=1?"translate("+Et+"px, "+_t+"px)":"translate3d("+Et+"px, "+_t+"px, 0)",st))}return Object.assign({},vt,(_={},_[Rt]=Mt?_t+"px":"",_[Tt]=St?Et+"px":"",_.transform="",_))}function computeStyles(a){var _=a.state,$=a.options,j=$.gpuAcceleration,_e=j===void 0?!0:j,et=$.adaptive,tt=et===void 0?!0:et,rt=$.roundOffsets,at=rt===void 0?!0:rt,ct={placement:getBasePlacement(_.placement),variation:getVariation(_.placement),popper:_.elements.popper,popperRect:_.rects.popper,gpuAcceleration:_e,isFixed:_.options.strategy==="fixed"};_.modifiersData.popperOffsets!=null&&(_.styles.popper=Object.assign({},_.styles.popper,mapToStyles(Object.assign({},ct,{offsets:_.modifiersData.popperOffsets,position:_.options.strategy,adaptive:tt,roundOffsets:at})))),_.modifiersData.arrow!=null&&(_.styles.arrow=Object.assign({},_.styles.arrow,mapToStyles(Object.assign({},ct,{offsets:_.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:at})))),_.attributes.popper=Object.assign({},_.attributes.popper,{"data-popper-placement":_.placement})}const computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:!0};function effect(a){var _=a.state,$=a.instance,j=a.options,_e=j.scroll,et=_e===void 0?!0:_e,tt=j.resize,rt=tt===void 0?!0:tt,at=getWindow(_.elements.popper),ct=[].concat(_.scrollParents.reference,_.scrollParents.popper);return et&&ct.forEach(function(dt){dt.addEventListener("scroll",$.update,passive)}),rt&&at.addEventListener("resize",$.update,passive),function(){et&&ct.forEach(function(dt){dt.removeEventListener("scroll",$.update,passive)}),rt&&at.removeEventListener("resize",$.update,passive)}}const eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect,data:{}};var hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(a){return a.replace(/left|right|bottom|top/g,function(_){return hash$1[_]})}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(a){return a.replace(/start|end/g,function(_){return hash[_]})}function getWindowScroll(a){var _=getWindow(a),$=_.pageXOffset,j=_.pageYOffset;return{scrollLeft:$,scrollTop:j}}function getWindowScrollBarX(a){return getBoundingClientRect(getDocumentElement(a)).left+getWindowScroll(a).scrollLeft}function getViewportRect(a,_){var $=getWindow(a),j=getDocumentElement(a),_e=$.visualViewport,et=j.clientWidth,tt=j.clientHeight,rt=0,at=0;if(_e){et=_e.width,tt=_e.height;var ct=isLayoutViewport();(ct||!ct&&_==="fixed")&&(rt=_e.offsetLeft,at=_e.offsetTop)}return{width:et,height:tt,x:rt+getWindowScrollBarX(a),y:at}}function getDocumentRect(a){var _,$=getDocumentElement(a),j=getWindowScroll(a),_e=(_=a.ownerDocument)==null?void 0:_.body,et=max($.scrollWidth,$.clientWidth,_e?_e.scrollWidth:0,_e?_e.clientWidth:0),tt=max($.scrollHeight,$.clientHeight,_e?_e.scrollHeight:0,_e?_e.clientHeight:0),rt=-j.scrollLeft+getWindowScrollBarX(a),at=-j.scrollTop;return getComputedStyle(_e||$).direction==="rtl"&&(rt+=max($.clientWidth,_e?_e.clientWidth:0)-et),{width:et,height:tt,x:rt,y:at}}function isScrollParent(a){var _=getComputedStyle(a),$=_.overflow,j=_.overflowX,_e=_.overflowY;return/auto|scroll|overlay|hidden/.test($+_e+j)}function getScrollParent(a){return["html","body","#document"].indexOf(getNodeName(a))>=0?a.ownerDocument.body:isHTMLElement(a)&&isScrollParent(a)?a:getScrollParent(getParentNode(a))}function listScrollParents(a,_){var $;_===void 0&&(_=[]);var j=getScrollParent(a),_e=j===(($=a.ownerDocument)==null?void 0:$.body),et=getWindow(j),tt=_e?[et].concat(et.visualViewport||[],isScrollParent(j)?j:[]):j,rt=_.concat(tt);return _e?rt:rt.concat(listScrollParents(getParentNode(tt)))}function rectToClientRect(a){return Object.assign({},a,{left:a.x,top:a.y,right:a.x+a.width,bottom:a.y+a.height})}function getInnerBoundingClientRect(a,_){var $=getBoundingClientRect(a,!1,_==="fixed");return $.top=$.top+a.clientTop,$.left=$.left+a.clientLeft,$.bottom=$.top+a.clientHeight,$.right=$.left+a.clientWidth,$.width=a.clientWidth,$.height=a.clientHeight,$.x=$.left,$.y=$.top,$}function getClientRectFromMixedType(a,_,$){return _===viewport?rectToClientRect(getViewportRect(a,$)):isElement$1(_)?getInnerBoundingClientRect(_,$):rectToClientRect(getDocumentRect(getDocumentElement(a)))}function getClippingParents(a){var _=listScrollParents(getParentNode(a)),$=["absolute","fixed"].indexOf(getComputedStyle(a).position)>=0,j=$&&isHTMLElement(a)?getOffsetParent(a):a;return isElement$1(j)?_.filter(function(_e){return isElement$1(_e)&&contains(_e,j)&&getNodeName(_e)!=="body"}):[]}function getClippingRect(a,_,$,j){var _e=_==="clippingParents"?getClippingParents(a):[].concat(_),et=[].concat(_e,[$]),tt=et[0],rt=et.reduce(function(at,ct){var dt=getClientRectFromMixedType(a,ct,j);return at.top=max(dt.top,at.top),at.right=min(dt.right,at.right),at.bottom=min(dt.bottom,at.bottom),at.left=max(dt.left,at.left),at},getClientRectFromMixedType(a,tt,j));return rt.width=rt.right-rt.left,rt.height=rt.bottom-rt.top,rt.x=rt.left,rt.y=rt.top,rt}function computeOffsets(a){var _=a.reference,$=a.element,j=a.placement,_e=j?getBasePlacement(j):null,et=j?getVariation(j):null,tt=_.x+_.width/2-$.width/2,rt=_.y+_.height/2-$.height/2,at;switch(_e){case top:at={x:tt,y:_.y-$.height};break;case bottom:at={x:tt,y:_.y+_.height};break;case right$3:at={x:_.x+_.width,y:rt};break;case left$3:at={x:_.x-$.width,y:rt};break;default:at={x:_.x,y:_.y}}var ct=_e?getMainAxisFromPlacement(_e):null;if(ct!=null){var dt=ct==="y"?"height":"width";switch(et){case start:at[ct]=at[ct]-(_[dt]/2-$[dt]/2);break;case end:at[ct]=at[ct]+(_[dt]/2-$[dt]/2);break}}return at}function detectOverflow(a,_){_===void 0&&(_={});var $=_,j=$.placement,_e=j===void 0?a.placement:j,et=$.strategy,tt=et===void 0?a.strategy:et,rt=$.boundary,at=rt===void 0?clippingParents:rt,ct=$.rootBoundary,dt=ct===void 0?viewport:ct,yt=$.elementContext,bt=yt===void 0?popper:yt,Et=$.altBoundary,$t=Et===void 0?!1:Et,_t=$.padding,xt=_t===void 0?0:_t,St=mergePaddingObject(typeof xt!="number"?xt:expandToHashMap(xt,basePlacements)),Mt=bt===popper?reference:popper,Tt=a.rects.popper,Rt=a.elements[$t?Mt:bt],Ct=getClippingRect(isElement$1(Rt)?Rt:Rt.contextElement||getDocumentElement(a.elements.popper),at,dt,tt),It=getBoundingClientRect(a.elements.reference),kt=computeOffsets({reference:It,element:Tt,strategy:"absolute",placement:_e}),Dt=rectToClientRect(Object.assign({},Tt,kt)),Bt=bt===popper?Dt:It,zt={top:Ct.top-Bt.top+St.top,bottom:Bt.bottom-Ct.bottom+St.bottom,left:Ct.left-Bt.left+St.left,right:Bt.right-Ct.right+St.right},vt=a.modifiersData.offset;if(bt===popper&&vt){var nt=vt[_e];Object.keys(zt).forEach(function(st){var lt=[right$3,bottom].indexOf(st)>=0?1:-1,ht=[top,bottom].indexOf(st)>=0?"y":"x";zt[st]+=nt[ht]*lt})}return zt}function computeAutoPlacement(a,_){_===void 0&&(_={});var $=_,j=$.placement,_e=$.boundary,et=$.rootBoundary,tt=$.padding,rt=$.flipVariations,at=$.allowedAutoPlacements,ct=at===void 0?placements:at,dt=getVariation(j),yt=dt?rt?variationPlacements:variationPlacements.filter(function($t){return getVariation($t)===dt}):basePlacements,bt=yt.filter(function($t){return ct.indexOf($t)>=0});bt.length===0&&(bt=yt);var Et=bt.reduce(function($t,_t){return $t[_t]=detectOverflow(a,{placement:_t,boundary:_e,rootBoundary:et,padding:tt})[getBasePlacement(_t)],$t},{});return Object.keys(Et).sort(function($t,_t){return Et[$t]-Et[_t]})}function getExpandedFallbackPlacements(a){if(getBasePlacement(a)===auto)return[];var _=getOppositePlacement(a);return[getOppositeVariationPlacement(a),_,getOppositeVariationPlacement(_)]}function flip(a){var _=a.state,$=a.options,j=a.name;if(!_.modifiersData[j]._skip){for(var _e=$.mainAxis,et=_e===void 0?!0:_e,tt=$.altAxis,rt=tt===void 0?!0:tt,at=$.fallbackPlacements,ct=$.padding,dt=$.boundary,yt=$.rootBoundary,bt=$.altBoundary,Et=$.flipVariations,$t=Et===void 0?!0:Et,_t=$.allowedAutoPlacements,xt=_.options.placement,St=getBasePlacement(xt),Mt=St===xt,Tt=at||(Mt||!$t?[getOppositePlacement(xt)]:getExpandedFallbackPlacements(xt)),Rt=[xt].concat(Tt).reduce(function(Nt,jt){return Nt.concat(getBasePlacement(jt)===auto?computeAutoPlacement(_,{placement:jt,boundary:dt,rootBoundary:yt,padding:ct,flipVariations:$t,allowedAutoPlacements:_t}):jt)},[]),Ct=_.rects.reference,It=_.rects.popper,kt=new Map,Dt=!0,Bt=Rt[0],zt=0;zt<Rt.length;zt++){var vt=Rt[zt],nt=getBasePlacement(vt),st=getVariation(vt)===start,lt=[top,bottom].indexOf(nt)>=0,ht=lt?"width":"height",mt=detectOverflow(_,{placement:vt,boundary:dt,rootBoundary:yt,altBoundary:bt,padding:ct}),wt=lt?st?right$3:left$3:st?bottom:top;Ct[ht]>It[ht]&&(wt=getOppositePlacement(wt));var At=getOppositePlacement(wt),gt=[];if(et&&gt.push(mt[nt]<=0),rt&&gt.push(mt[wt]<=0,mt[At]<=0),gt.every(function(Nt){return Nt})){Bt=vt,Dt=!1;break}kt.set(vt,gt)}if(Dt)for(var ot=$t?3:1,pt=function(jt){var Ut=Rt.find(function(Vt){var rr=kt.get(Vt);if(rr)return rr.slice(0,jt).every(function(tr){return tr})});if(Ut)return Bt=Ut,"break"},Pt=ot;Pt>0;Pt--){var Ot=pt(Pt);if(Ot==="break")break}_.placement!==Bt&&(_.modifiersData[j]._skip=!0,_.placement=Bt,_.reset=!0)}}const flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(a,_,$){return $===void 0&&($={x:0,y:0}),{top:a.top-_.height-$.y,right:a.right-_.width+$.x,bottom:a.bottom-_.height+$.y,left:a.left-_.width-$.x}}function isAnySideFullyClipped(a){return[top,right$3,bottom,left$3].some(function(_){return a[_]>=0})}function hide(a){var _=a.state,$=a.name,j=_.rects.reference,_e=_.rects.popper,et=_.modifiersData.preventOverflow,tt=detectOverflow(_,{elementContext:"reference"}),rt=detectOverflow(_,{altBoundary:!0}),at=getSideOffsets(tt,j),ct=getSideOffsets(rt,_e,et),dt=isAnySideFullyClipped(at),yt=isAnySideFullyClipped(ct);_.modifiersData[$]={referenceClippingOffsets:at,popperEscapeOffsets:ct,isReferenceHidden:dt,hasPopperEscaped:yt},_.attributes.popper=Object.assign({},_.attributes.popper,{"data-popper-reference-hidden":dt,"data-popper-escaped":yt})}const hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(a,_,$){var j=getBasePlacement(a),_e=[left$3,top].indexOf(j)>=0?-1:1,et=typeof $=="function"?$(Object.assign({},_,{placement:a})):$,tt=et[0],rt=et[1];return tt=tt||0,rt=(rt||0)*_e,[left$3,right$3].indexOf(j)>=0?{x:rt,y:tt}:{x:tt,y:rt}}function offset(a){var _=a.state,$=a.options,j=a.name,_e=$.offset,et=_e===void 0?[0,0]:_e,tt=placements.reduce(function(dt,yt){return dt[yt]=distanceAndSkiddingToXY(yt,_.rects,et),dt},{}),rt=tt[_.placement],at=rt.x,ct=rt.y;_.modifiersData.popperOffsets!=null&&(_.modifiersData.popperOffsets.x+=at,_.modifiersData.popperOffsets.y+=ct),_.modifiersData[j]=tt}const offset$1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset};function popperOffsets(a){var _=a.state,$=a.name;_.modifiersData[$]=computeOffsets({reference:_.rects.reference,element:_.rects.popper,strategy:"absolute",placement:_.placement})}const popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(a){return a==="x"?"y":"x"}function preventOverflow(a){var _=a.state,$=a.options,j=a.name,_e=$.mainAxis,et=_e===void 0?!0:_e,tt=$.altAxis,rt=tt===void 0?!1:tt,at=$.boundary,ct=$.rootBoundary,dt=$.altBoundary,yt=$.padding,bt=$.tether,Et=bt===void 0?!0:bt,$t=$.tetherOffset,_t=$t===void 0?0:$t,xt=detectOverflow(_,{boundary:at,rootBoundary:ct,padding:yt,altBoundary:dt}),St=getBasePlacement(_.placement),Mt=getVariation(_.placement),Tt=!Mt,Rt=getMainAxisFromPlacement(St),Ct=getAltAxis(Rt),It=_.modifiersData.popperOffsets,kt=_.rects.reference,Dt=_.rects.popper,Bt=typeof _t=="function"?_t(Object.assign({},_.rects,{placement:_.placement})):_t,zt=typeof Bt=="number"?{mainAxis:Bt,altAxis:Bt}:Object.assign({mainAxis:0,altAxis:0},Bt),vt=_.modifiersData.offset?_.modifiersData.offset[_.placement]:null,nt={x:0,y:0};if(It){if(et){var st,lt=Rt==="y"?top:left$3,ht=Rt==="y"?bottom:right$3,mt=Rt==="y"?"height":"width",wt=It[Rt],At=wt+xt[lt],gt=wt-xt[ht],ot=Et?-Dt[mt]/2:0,pt=Mt===start?kt[mt]:Dt[mt],Pt=Mt===start?-Dt[mt]:-kt[mt],Ot=_.elements.arrow,Nt=Et&&Ot?getLayoutRect(Ot):{width:0,height:0},jt=_.modifiersData["arrow#persistent"]?_.modifiersData["arrow#persistent"].padding:getFreshSideObject(),Ut=jt[lt],Vt=jt[ht],rr=within(0,kt[mt],Nt[mt]),tr=Tt?kt[mt]/2-ot-rr-Ut-zt.mainAxis:pt-rr-Ut-zt.mainAxis,Zt=Tt?-kt[mt]/2+ot+rr+Vt+zt.mainAxis:Pt+rr+Vt+zt.mainAxis,Yt=_.elements.arrow&&getOffsetParent(_.elements.arrow),Wt=Yt?Rt==="y"?Yt.clientTop||0:Yt.clientLeft||0:0,fr=(st=vt==null?void 0:vt[Rt])!=null?st:0,jr=wt+tr-fr-Wt,Sr=wt+Zt-fr,Er=within(Et?min(At,jr):At,wt,Et?max(gt,Sr):gt);It[Rt]=Er,nt[Rt]=Er-wt}if(rt){var sn,Ir=Rt==="x"?top:left$3,gr=Rt==="x"?bottom:right$3,ln=It[Ct],Mr=Ct==="y"?"height":"width",Vr=ln+xt[Ir],pn=ln-xt[gr],Gr=[top,left$3].indexOf(St)!==-1,Zr=(sn=vt==null?void 0:vt[Ct])!=null?sn:0,Mn=Gr?Vr:ln-kt[Mr]-Dt[Mr]-Zr+zt.altAxis,Wr=Gr?ln+kt[Mr]+Dt[Mr]-Zr-zt.altAxis:pn,Qr=Et&&Gr?withinMaxClamp(Mn,ln,Wr):within(Et?Mn:Vr,ln,Et?Wr:pn);It[Ct]=Qr,nt[Ct]=Qr-ln}_.modifiersData[j]=nt}}const preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(a){return{scrollLeft:a.scrollLeft,scrollTop:a.scrollTop}}function getNodeScroll(a){return a===getWindow(a)||!isHTMLElement(a)?getWindowScroll(a):getHTMLElementScroll(a)}function isElementScaled(a){var _=a.getBoundingClientRect(),$=round(_.width)/a.offsetWidth||1,j=round(_.height)/a.offsetHeight||1;return $!==1||j!==1}function getCompositeRect(a,_,$){$===void 0&&($=!1);var j=isHTMLElement(_),_e=isHTMLElement(_)&&isElementScaled(_),et=getDocumentElement(_),tt=getBoundingClientRect(a,_e,$),rt={scrollLeft:0,scrollTop:0},at={x:0,y:0};return(j||!j&&!$)&&((getNodeName(_)!=="body"||isScrollParent(et))&&(rt=getNodeScroll(_)),isHTMLElement(_)?(at=getBoundingClientRect(_,!0),at.x+=_.clientLeft,at.y+=_.clientTop):et&&(at.x=getWindowScrollBarX(et))),{x:tt.left+rt.scrollLeft-at.x,y:tt.top+rt.scrollTop-at.y,width:tt.width,height:tt.height}}function order$1(a){var _=new Map,$=new Set,j=[];a.forEach(function(et){_.set(et.name,et)});function _e(et){$.add(et.name);var tt=[].concat(et.requires||[],et.requiresIfExists||[]);tt.forEach(function(rt){if(!$.has(rt)){var at=_.get(rt);at&&_e(at)}}),j.push(et)}return a.forEach(function(et){$.has(et.name)||_e(et)}),j}function orderModifiers(a){var _=order$1(a);return modifierPhases.reduce(function($,j){return $.concat(_.filter(function(_e){return _e.phase===j}))},[])}function debounce$2(a){var _;return function(){return _||(_=new Promise(function($){Promise.resolve().then(function(){_=void 0,$(a())})})),_}}function mergeByName(a){var _=a.reduce(function($,j){var _e=$[j.name];return $[j.name]=_e?Object.assign({},_e,j,{options:Object.assign({},_e.options,j.options),data:Object.assign({},_e.data,j.data)}):j,$},{});return Object.keys(_).map(function($){return _[$]})}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var a=arguments.length,_=new Array(a),$=0;$<a;$++)_[$]=arguments[$];return!_.some(function(j){return!(j&&typeof j.getBoundingClientRect=="function")})}function popperGenerator(a){a===void 0&&(a={});var _=a,$=_.defaultModifiers,j=$===void 0?[]:$,_e=_.defaultOptions,et=_e===void 0?DEFAULT_OPTIONS:_e;return function(rt,at,ct){ct===void 0&&(ct=et);var dt={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,et),modifiersData:{},elements:{reference:rt,popper:at},attributes:{},styles:{}},yt=[],bt=!1,Et={state:dt,setOptions:function(St){var Mt=typeof St=="function"?St(dt.options):St;_t(),dt.options=Object.assign({},et,dt.options,Mt),dt.scrollParents={reference:isElement$1(rt)?listScrollParents(rt):rt.contextElement?listScrollParents(rt.contextElement):[],popper:listScrollParents(at)};var Tt=orderModifiers(mergeByName([].concat(j,dt.options.modifiers)));return dt.orderedModifiers=Tt.filter(function(Rt){return Rt.enabled}),$t(),Et.update()},forceUpdate:function(){if(!bt){var St=dt.elements,Mt=St.reference,Tt=St.popper;if(areValidElements(Mt,Tt)){dt.rects={reference:getCompositeRect(Mt,getOffsetParent(Tt),dt.options.strategy==="fixed"),popper:getLayoutRect(Tt)},dt.reset=!1,dt.placement=dt.options.placement,dt.orderedModifiers.forEach(function(zt){return dt.modifiersData[zt.name]=Object.assign({},zt.data)});for(var Rt=0;Rt<dt.orderedModifiers.length;Rt++){if(dt.reset===!0){dt.reset=!1,Rt=-1;continue}var Ct=dt.orderedModifiers[Rt],It=Ct.fn,kt=Ct.options,Dt=kt===void 0?{}:kt,Bt=Ct.name;typeof It=="function"&&(dt=It({state:dt,options:Dt,name:Bt,instance:Et})||dt)}}}},update:debounce$2(function(){return new Promise(function(xt){Et.forceUpdate(),xt(dt)})}),destroy:function(){_t(),bt=!0}};if(!areValidElements(rt,at))return Et;Et.setOptions(ct).then(function(xt){!bt&&ct.onFirstUpdate&&ct.onFirstUpdate(xt)});function $t(){dt.orderedModifiers.forEach(function(xt){var St=xt.name,Mt=xt.options,Tt=Mt===void 0?{}:Mt,Rt=xt.effect;if(typeof Rt=="function"){var Ct=Rt({state:dt,name:St,instance:Et,options:Tt}),It=function(){};yt.push(Ct||It)}})}function _t(){yt.forEach(function(xt){return xt()}),yt=[]}return Et}}var defaultModifiers=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1,offset$1,flip$1,preventOverflow$1,arrow$1,hide$1],createPopper=popperGenerator({defaultModifiers}),hasElementType=typeof Element<"u",hasMap$1=typeof Map=="function",hasSet$1=typeof Set=="function",hasArrayBuffer=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function equal(a,_){if(a===_)return!0;if(a&&_&&typeof a=="object"&&typeof _=="object"){if(a.constructor!==_.constructor)return!1;var $,j,_e;if(Array.isArray(a)){if($=a.length,$!=_.length)return!1;for(j=$;j--!==0;)if(!equal(a[j],_[j]))return!1;return!0}var et;if(hasMap$1&&a instanceof Map&&_ instanceof Map){if(a.size!==_.size)return!1;for(et=a.entries();!(j=et.next()).done;)if(!_.has(j.value[0]))return!1;for(et=a.entries();!(j=et.next()).done;)if(!equal(j.value[1],_.get(j.value[0])))return!1;return!0}if(hasSet$1&&a instanceof Set&&_ instanceof Set){if(a.size!==_.size)return!1;for(et=a.entries();!(j=et.next()).done;)if(!_.has(j.value[0]))return!1;return!0}if(hasArrayBuffer&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(_)){if($=a.length,$!=_.length)return!1;for(j=$;j--!==0;)if(a[j]!==_[j])return!1;return!0}if(a.constructor===RegExp)return a.source===_.source&&a.flags===_.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===_.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===_.toString();if(_e=Object.keys(a),$=_e.length,$!==Object.keys(_).length)return!1;for(j=$;j--!==0;)if(!Object.prototype.hasOwnProperty.call(_,_e[j]))return!1;if(hasElementType&&a instanceof Element)return!1;for(j=$;j--!==0;)if(!((_e[j]==="_owner"||_e[j]==="__v"||_e[j]==="__o")&&a.$$typeof)&&!equal(a[_e[j]],_[_e[j]]))return!1;return!0}return a!==a&&_!==_}var reactFastCompare=function(_,$){try{return equal(_,$)}catch(j){if((j.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw j}};const isEqual$1=getDefaultExportFromCjs$1(reactFastCompare);var EMPTY_MODIFIERS$1=[],usePopper=function(_,$,j){j===void 0&&(j={});var _e=reactExports.useRef(null),et={onFirstUpdate:j.onFirstUpdate,placement:j.placement||"bottom",strategy:j.strategy||"absolute",modifiers:j.modifiers||EMPTY_MODIFIERS$1},tt=reactExports.useState({styles:{popper:{position:et.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),rt=tt[0],at=tt[1],ct=reactExports.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(Et){var $t=Et.state,_t=Object.keys($t.elements);reactDomExports.flushSync(function(){at({styles:fromEntries(_t.map(function(xt){return[xt,$t.styles[xt]||{}]})),attributes:fromEntries(_t.map(function(xt){return[xt,$t.attributes[xt]]}))})})},requires:["computeStyles"]}},[]),dt=reactExports.useMemo(function(){var bt={onFirstUpdate:et.onFirstUpdate,placement:et.placement,strategy:et.strategy,modifiers:[].concat(et.modifiers,[ct,{name:"applyStyles",enabled:!1}])};return isEqual$1(_e.current,bt)?_e.current||bt:(_e.current=bt,bt)},[et.onFirstUpdate,et.placement,et.strategy,et.modifiers,ct]),yt=reactExports.useRef();return useIsomorphicLayoutEffect(function(){yt.current&&yt.current.setOptions(dt)},[dt]),useIsomorphicLayoutEffect(function(){if(!(_==null||$==null)){var bt=j.createPopper||createPopper,Et=bt(_,$,dt);return yt.current=Et,function(){Et.destroy(),yt.current=null}}},[_,$,j.createPopper]),{state:yt.current?yt.current.state:null,styles:rt.styles,attributes:rt.attributes,update:yt.current?yt.current.update:null,forceUpdate:yt.current?yt.current.forceUpdate:null}},NOOP=function(){},NOOP_PROMISE=function(){return Promise.resolve(null)},EMPTY_MODIFIERS=[];function Popper(a){var _=a.placement,$=_===void 0?"bottom":_,j=a.strategy,_e=j===void 0?"absolute":j,et=a.modifiers,tt=et===void 0?EMPTY_MODIFIERS:et,rt=a.referenceElement,at=a.onFirstUpdate,ct=a.innerRef,dt=a.children,yt=reactExports.useContext(ManagerReferenceNodeContext),bt=reactExports.useState(null),Et=bt[0],$t=bt[1],_t=reactExports.useState(null),xt=_t[0],St=_t[1];reactExports.useEffect(function(){setRef(ct,Et)},[ct,Et]);var Mt=reactExports.useMemo(function(){return{placement:$,strategy:_e,onFirstUpdate:at,modifiers:[].concat(tt,[{name:"arrow",enabled:xt!=null,options:{element:xt}}])}},[$,_e,at,tt,xt]),Tt=usePopper(rt||yt,Et,Mt),Rt=Tt.state,Ct=Tt.styles,It=Tt.forceUpdate,kt=Tt.update,Dt=reactExports.useMemo(function(){return{ref:$t,style:Ct.popper,placement:Rt?Rt.placement:$,hasPopperEscaped:Rt&&Rt.modifiersData.hide?Rt.modifiersData.hide.hasPopperEscaped:null,isReferenceHidden:Rt&&Rt.modifiersData.hide?Rt.modifiersData.hide.isReferenceHidden:null,arrowProps:{style:Ct.arrow,ref:St},forceUpdate:It||NOOP,update:kt||NOOP_PROMISE}},[$t,St,$,Rt,Ct,kt,It]);return unwrapArray(dt)(Dt)}var warning=function(){},warning_1=warning;const warning$1=getDefaultExportFromCjs$1(warning_1);function Reference(a){var _=a.children,$=a.innerRef,j=reactExports.useContext(ManagerReferenceNodeSetterContext),_e=reactExports.useCallback(function(et){setRef($,et),safeInvoke(j,et)},[$,j]);return reactExports.useEffect(function(){return function(){return setRef($,null)}},[]),reactExports.useEffect(function(){warning$1(!!j,"`Reference` should not be used outside of a `Manager` component.")},[j]),unwrapArray(_)({ref:_e})}const esm=Object.freeze(Object.defineProperty({__proto__:null,Manager,Popper,Reference,usePopper},Symbol.toStringTag,{value:"Module"})),require$$17=getAugmentedNamespace(esm);var shallowequal,hasRequiredShallowequal;function requireShallowequal(){return hasRequiredShallowequal||(hasRequiredShallowequal=1,shallowequal=function(_,$,j,_e){var et=j?j.call(_e,_,$):void 0;if(et!==void 0)return!!et;if(_===$)return!0;if(typeof _!="object"||!_||typeof $!="object"||!$)return!1;var tt=Object.keys(_),rt=Object.keys($);if(tt.length!==rt.length)return!1;for(var at=Object.prototype.hasOwnProperty.bind($),ct=0;ct<tt.length;ct++){var dt=tt[ct];if(!at(dt))return!1;var yt=_[dt],bt=$[dt];if(et=j?j.call(_e,yt,bt,dt):void 0,et===!1||et===void 0&&yt!==bt)return!1}return!0}),shallowequal}var positions={},_baseInverter,hasRequired_baseInverter;function require_baseInverter(){if(hasRequired_baseInverter)return _baseInverter;hasRequired_baseInverter=1;var a=require_baseForOwn();function _($,j,_e,et){return a($,function(tt,rt,at){j(et,_e(tt),rt,at)}),et}return _baseInverter=_,_baseInverter}var _createInverter,hasRequired_createInverter;function require_createInverter(){if(hasRequired_createInverter)return _createInverter;hasRequired_createInverter=1;var a=require_baseInverter();function _($,j){return function(_e,et){return a(_e,$,j(et),{})}}return _createInverter=_,_createInverter}var invert_1,hasRequiredInvert;function requireInvert(){if(hasRequiredInvert)return invert_1;hasRequiredInvert=1;var a=requireConstant(),_=require_createInverter(),$=requireIdentity(),j=Object.prototype,_e=j.toString,et=_(function(tt,rt,at){rt!=null&&typeof rt.toString!="function"&&(rt=_e.call(rt)),tt[rt]=at},a($));return invert_1=et,invert_1}var hasRequiredPositions;function requirePositions(){if(hasRequiredPositions)return positions;hasRequiredPositions=1;var a=interopRequireDefaultExports;positions.__esModule=!0,positions.placementMapping=positions.positions=positions.positionsMapping=void 0;var _=a(requireInvert()),$=a(requireKeys()),j={"top center":"top","top left":"top-start","top right":"top-end","bottom center":"bottom","bottom left":"bottom-start","bottom right":"bottom-end","right center":"right","left center":"left"};positions.positionsMapping=j;var _e=(0,$.default)(j);positions.positions=_e;var et=(0,_.default)(j);return positions.placementMapping=et,positions}var createReferenceProxy={},createClass={exports:{}},toPropertyKey={exports:{}},toPrimitive={exports:{}},hasRequiredToPrimitive;function requireToPrimitive(){return hasRequiredToPrimitive||(hasRequiredToPrimitive=1,function(a){var _=_typeofExports$2.default;function $(j,_e){if(_(j)!=="object"||j===null)return j;var et=j[Symbol.toPrimitive];if(et!==void 0){var tt=et.call(j,_e||"default");if(_(tt)!=="object")return tt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(_e==="string"?String:Number)(j)}a.exports=$,a.exports.__esModule=!0,a.exports.default=a.exports}(toPrimitive)),toPrimitive.exports}var hasRequiredToPropertyKey;function requireToPropertyKey(){return hasRequiredToPropertyKey||(hasRequiredToPropertyKey=1,function(a){var _=_typeofExports$2.default,$=requireToPrimitive();function j(_e){var et=$(_e,"string");return _(et)==="symbol"?et:String(et)}a.exports=j,a.exports.__esModule=!0,a.exports.default=a.exports}(toPropertyKey)),toPropertyKey.exports}var hasRequiredCreateClass;function requireCreateClass(){return hasRequiredCreateClass||(hasRequiredCreateClass=1,function(a){var _=requireToPropertyKey();function $(_e,et){for(var tt=0;tt<et.length;tt++){var rt=et[tt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(_e,_(rt.key),rt)}}function j(_e,et,tt){return et&&$(_e.prototype,et),tt&&$(_e,tt),Object.defineProperty(_e,"prototype",{writable:!1}),_e}a.exports=j,a.exports.__esModule=!0,a.exports.default=a.exports}(createClass)),createClass.exports}var hasRequiredCreateReferenceProxy;function requireCreateReferenceProxy(){if(hasRequiredCreateReferenceProxy)return createReferenceProxy;hasRequiredCreateReferenceProxy=1;var a=interopRequireDefaultExports;createReferenceProxy.__esModule=!0,createReferenceProxy.default=void 0;var _=a(requireCreateClass()),$=a(requireMemoize()),j=a(requireInvoke()),_e=require$$10,et=function(){function at(dt){this.ref=dt}var ct=at.prototype;return ct.getBoundingClientRect=function(){return(0,j.default)(this.ref.current,"getBoundingClientRect")||{}},(0,_.default)(at,[{key:"clientWidth",get:function(){return this.getBoundingClientRect().width}},{key:"clientHeight",get:function(){return this.getBoundingClientRect().height}},{key:"parentNode",get:function(){return this.ref.current?this.ref.current.parentNode:void 0}}]),at}(),tt=(0,$.default)(function(at){return new et((0,_e.isRefObject)(at)?at:{current:at})}),rt=tt;return createReferenceProxy.default=rt,createReferenceProxy}var PopupContent={},hasRequiredPopupContent;function requirePopupContent(){if(hasRequiredPopupContent)return PopupContent;hasRequiredPopupContent=1;var a=interopRequireDefaultExports;PopupContent.__esModule=!0,PopupContent.default=et;var _=a(require_extends()),$=a(require$$0$4);a(requirePropTypes());var j=a(reactExports),_e=requireLib();function et(tt){var rt=tt.children,at=tt.className,ct=tt.content,dt=(0,$.default)("content",at),yt=(0,_e.getUnhandledProps)(et,tt),bt=(0,_e.getElementType)(et,tt);return j.default.createElement(bt,(0,_.default)({},yt,{className:dt}),_e.childrenUtils.isNil(rt)?ct:rt)}return et.handledProps=["as","children","className","content"],et.propTypes={},et.create=(0,_e.createShorthandFactory)(et,function(tt){return{children:tt}}),PopupContent}var PopupHeader={},hasRequiredPopupHeader;function requirePopupHeader(){if(hasRequiredPopupHeader)return PopupHeader;hasRequiredPopupHeader=1;var a=interopRequireDefaultExports;PopupHeader.__esModule=!0,PopupHeader.default=et;var _=a(require_extends()),$=a(require$$0$4);a(requirePropTypes());var j=a(reactExports),_e=requireLib();function et(tt){var rt=tt.children,at=tt.className,ct=tt.content,dt=(0,$.default)("header",at),yt=(0,_e.getUnhandledProps)(et,tt),bt=(0,_e.getElementType)(et,tt);return j.default.createElement(bt,(0,_.default)({},yt,{className:dt}),_e.childrenUtils.isNil(rt)?ct:rt)}return et.handledProps=["as","children","className","content"],et.propTypes={},et.create=(0,_e.createShorthandFactory)(et,function(tt){return{children:tt}}),PopupHeader}var hasRequiredPopup;function requirePopup(){if(hasRequiredPopup)return Popup;hasRequiredPopup=1;var a=interopRequireWildcardExports,_=interopRequireDefaultExports;Popup.__esModule=!0,Popup.default=void 0;var $=_(require_extends()),j=_(requireInheritsLoose());_(requireWithout());var _e=_(requireIsNil()),et=_(requireIsUndefined()),tt=_(requireInvoke()),rt=_(requireIsElement()),at=_(requireIsArray()),ct=_(requirePick()),dt=_(requireIncludes()),yt=_(requireReduce()),bt=_(requireLib$1()),Et=_(require$$0$4);_(requirePropTypes());var $t=a(reactExports),_t=require$$17,xt=_(requireShallowequal()),St=requireLib(),Mt=_(requirePortal()),Tt=requirePositions(),Rt=_(requireCreateReferenceProxy()),Ct=_(requirePopupContent()),It=_(requirePopupHeader()),kt=function(Dt){(0,j.default)(Bt,Dt);function Bt(){for(var vt,nt=arguments.length,st=new Array(nt),lt=0;lt<nt;lt++)st[lt]=arguments[lt];return vt=Dt.call.apply(Dt,[this].concat(st))||this,vt.state={},vt.open=!1,vt.zIndexWasSynced=!1,vt.triggerRef=$t.default.createRef(),vt.elementRef=$t.default.createRef(),vt.getPortalProps=function(){var ht={},mt=vt.props,wt=mt.on,At=mt.hoverable,gt=(0,at.default)(wt)?wt:[wt];return At&&(ht.closeOnPortalMouseLeave=!0,ht.mouseLeaveDelay=300),(0,dt.default)(gt,"hover")&&(ht.openOnTriggerClick=!1,ht.closeOnTriggerClick=!1,ht.openOnTriggerMouseEnter=!0,ht.closeOnTriggerMouseLeave=!0,ht.mouseLeaveDelay=70,ht.mouseEnterDelay=50),(0,dt.default)(gt,"click")&&(ht.openOnTriggerClick=!0,ht.closeOnTriggerClick=!0,ht.closeOnDocumentClick=!0),(0,dt.default)(gt,"focus")&&(ht.openOnTriggerFocus=!0,ht.closeOnTriggerBlur=!0),ht},vt.hideOnScroll=function(ht){(0,rt.default)(ht.target)&&vt.elementRef.current.contains(ht.target)||(vt.setState({closed:!0}),St.eventStack.unsub("scroll",vt.hideOnScroll,{target:window}),vt.timeoutId=setTimeout(function(){vt.setState({closed:!1})},50),vt.handleClose(ht))},vt.handleClose=function(ht){(0,tt.default)(vt.props,"onClose",ht,(0,$.default)({},vt.props,{open:!1}))},vt.handleOpen=function(ht){(0,tt.default)(vt.props,"onOpen",ht,(0,$.default)({},vt.props,{open:!0}))},vt.handlePortalMount=function(ht){(0,tt.default)(vt.props,"onMount",ht,vt.props)},vt.handlePortalUnmount=function(ht){vt.positionUpdate=null,(0,tt.default)(vt.props,"onUnmount",ht,vt.props)},vt.renderContent=function(ht){var mt=ht.placement,wt=ht.ref,At=ht.update,gt=ht.style,ot=vt.props,pt=ot.basic,Pt=ot.children,Ot=ot.className,Nt=ot.content,jt=ot.hideOnScroll,Ut=ot.flowing,Vt=ot.header,rr=ot.inverted,tr=ot.popper,Zt=ot.size,Yt=ot.style,Wt=ot.wide,fr=vt.state.contentRestProps;vt.positionUpdate=At;var jr=(0,Et.default)("ui",Tt.placementMapping[mt],Zt,(0,St.useKeyOrValueAndKey)(Wt,"wide"),(0,St.useKeyOnly)(pt,"basic"),(0,St.useKeyOnly)(Ut,"flowing"),(0,St.useKeyOnly)(rr,"inverted"),"popup transition visible",Ot),Sr=(0,St.getElementType)(Bt,vt.props),Er=(0,$.default)({left:"auto",right:"auto",position:"initial"},Yt),sn=$t.default.createElement(Sr,(0,$.default)({},fr,{className:jr,style:Er,ref:vt.elementRef}),St.childrenUtils.isNil(Pt)?$t.default.createElement($t.default.Fragment,null,It.default.create(Vt,{autoGenerateKey:!1}),Ct.default.create(Nt,{autoGenerateKey:!1})):Pt,jt&&$t.default.createElement(bt.default,{on:vt.hideOnScroll,name:"scroll",target:"window"}));return(0,St.createHTMLDivision)(tr||{},{overrideProps:{children:sn,ref:wt,style:(0,$.default)({display:"flex"},gt)}})},vt}Bt.getDerivedStateFromProps=function(nt,st){if(st.closed||st.disabled)return{};var lt=(0,St.getUnhandledProps)(Bt,nt),ht=(0,yt.default)(lt,function(wt,At,gt){return(0,dt.default)(Mt.default.handledProps,gt)||(wt[gt]=At),wt},{}),mt=(0,ct.default)(lt,Mt.default.handledProps);return{contentRestProps:ht,portalRestProps:mt}};var zt=Bt.prototype;return zt.componentDidUpdate=function(nt){var st=(0,xt.default)(this.props.popperDependencies,nt.popperDependencies);st||this.handleUpdate()},zt.componentWillUnmount=function(){clearTimeout(this.timeoutId)},zt.handleUpdate=function(){this.positionUpdate&&this.positionUpdate()},zt.render=function(){var nt=this,st=this.props,lt=st.context,ht=st.disabled,mt=st.eventsEnabled,wt=st.offset,At=st.pinned,gt=st.popper,ot=st.popperModifiers,pt=st.position,Pt=st.positionFixed,Ot=st.trigger,Nt=this.state,jt=Nt.closed,Ut=Nt.portalRestProps;if(jt||ht)return Ot;var Vt=[{name:"arrow",enabled:!1},{name:"eventListeners",options:{scroll:!!mt,resize:!!mt}},{name:"flip",enabled:!At},{name:"preventOverflow",enabled:!!wt},{name:"offset",enabled:!!wt,options:{offset:wt}}].concat(ot,[{name:"syncZIndex",enabled:!0,phase:"beforeRead",fn:function(Yt){var Wt,fr=Yt.state;if(!nt.zIndexWasSynced){var jr=gt==null||(Wt=gt.style)==null?void 0:Wt.zIndex;(0,et.default)(jr)&&(fr.elements.popper.style.zIndex=window.getComputedStyle(fr.elements.popper.firstChild).zIndex),nt.zIndexWasSynced=!0}},effect:function(){return function(){nt.zIndexWasSynced=!1}}}]),rr=(0,Rt.default)((0,_e.default)(lt)?this.triggerRef:lt),tr=(0,$.default)({},this.getPortalProps(),Ut);return $t.default.createElement(Mt.default,(0,$.default)({},tr,{onClose:this.handleClose,onMount:this.handlePortalMount,onOpen:this.handleOpen,onUnmount:this.handlePortalUnmount,trigger:Ot,triggerRef:this.triggerRef}),$t.default.createElement(_t.Popper,{modifiers:Vt,placement:Tt.positionsMapping[pt],strategy:Pt?"fixed":null,referenceElement:rr},this.renderContent))},Bt}($t.Component);return Popup.default=kt,kt.handledProps=["as","basic","children","className","content","context","disabled","eventsEnabled","flowing","header","hideOnScroll","hoverable","inverted","offset","on","onClose","onMount","onOpen","onUnmount","pinned","popper","popperDependencies","popperModifiers","position","positionFixed","size","style","trigger","wide"],kt.propTypes={},kt.defaultProps={disabled:!1,eventsEnabled:!0,on:["click","hover"],pinned:!1,popperModifiers:[],position:"top left"},kt.Content=Ct.default,kt.Header=It.default,Popup}var _interopRequireDefault$4=interopRequireDefaultExports,_Popup=_interopRequireDefault$4(requirePopup()),_default$3=_Popup.default;const capitalize=a=>a.charAt(0).toUpperCase()+a.slice(1),button="_button_1uvkr_1",icon="_icon_1uvkr_5",styles$a={button,icon,"icon-metamask-mobile":"_icon-metamask-mobile_1uvkr_13","icon-metamask":"_icon-metamask_1uvkr_13","icon-dapper":"_icon-dapper_1uvkr_18","icon-fortmatic":"_icon-fortmatic_1uvkr_22","icon-wallet-connect":"_icon-wallet-connect_1uvkr_26","icon-samsung-blockchain-wallet":"_icon-samsung-blockchain-wallet_1uvkr_30","icon-coinbase":"_icon-coinbase_1uvkr_34","icon-wallet-link":"_icon-wallet-link_1uvkr_35","icon-google":"_icon-google_1uvkr_39","icon-discord":"_icon-discord_1uvkr_43","icon-apple":"_icon-apple_1uvkr_47","icon-x":"_icon-x_1uvkr_51"},ConnectionOption=a=>{const{className:_,children:$,type:j,testId:_e,showTooltip:et,tooltipPosition:tt,disabled:rt,info:at,loading:ct,onClick:dt}=a;return jsxRuntimeExports.jsx(_default$3,{position:et&&tt?tt:"top center",disabled:!et,trigger:jsxRuntimeExports.jsxs(Button$5.Button,{primary:!0,size:"small","data-testid":`${_e}-${j}-button`,className:classNames(_,styles$a.button),onClick:()=>dt(j),disabled:rt,loading:ct,children:[ct?null:jsxRuntimeExports.jsx("div",{role:"img","aria-label":j,className:classNames(styles$a.icon,styles$a[`icon-${j}`],styles$a.primaryImage)}),$]},j),content:at??capitalize(j),on:"hover"})},PRIMARY_TEST_ID="primary-test-id",SECONDARY_TEST_ID="secondary-test-id",EXTRA_TEST_ID="extra-options-test-id",SHOW_MORE_BUTTON_TEST_ID="show-more-button-test-id";var ConnectionOptionType=(a=>(a.METAMASK="metamask",a.DAPPER="dapper",a.FORTMATIC="fortmatic",a.COINBASE="coinbase",a.SAMSUNG="samsung-blockchain-wallet",a.WALLET_CONNECT="wallet-connect",a.WALLET_LINK="wallet-link",a.METAMASK_MOBILE="metamask-mobile",a.GOOGLE="google",a.APPLE="apple",a.DISCORD="discord",a.X="x",a))(ConnectionOptionType||{});const connectionOptionTitles={metamask:"MetaMask",dapper:"Dapper",fortmatic:"Fortmatic",coinbase:"Coinbase","samsung-blockchain-wallet":"Samsung Blockchain Wallet","wallet-connect":"WalletConnect","wallet-link":"WalletLink","metamask-mobile":"MetaMask Mobile",google:"Google",apple:"Apple",discord:"Discord",x:"X"},connection="_connection_6rtpa_3",dclLogo="_dclLogo_6rtpa_9",title$4="_title_6rtpa_15",primaryButton="_primaryButton_6rtpa_22",primaryImage="_primaryImage_6rtpa_32",primaryMessage="_primaryMessage_6rtpa_36",primaryMagic="_primaryMagic_6rtpa_45",primaryLearnMore="_primaryLearnMore_6rtpa_54",primary="_primary_6rtpa_22",showMore="_showMore_6rtpa_67",showMoreButton="_showMoreButton_6rtpa_71",showMoreSecondaryOptions="_showMoreSecondaryOptions_6rtpa_80",primaryOption="_primaryOption_6rtpa_93",secondaryOptionButton="_secondaryOptionButton_6rtpa_97",styles$9={connection,dclLogo,title:title$4,primaryButton,primaryImage,primaryMessage,primaryMagic,primaryLearnMore,primary,showMore,showMoreButton,showMoreSecondaryOptions,primaryOption,secondaryOptionButton},Primary=({message:a,children:_,option:$,testId:j,loadingOption:_e,error:et,onConnect:tt})=>jsxRuntimeExports.jsxs("div",{className:styles$9.primary,"data-testid":j,children:[jsxRuntimeExports.jsx("div",{className:styles$9.primaryMessage,children:a}),jsxRuntimeExports.jsx(ConnectionOption,{disabled:!!_e||!!et,loading:_e===$,showTooltip:!!et,type:$,info:et,onClick:tt,className:classNames(styles$9.primaryButton,styles$9.primaryOption),testId:j,children:_})]}),Secondary=({options:a,tooltipDirection:_,testId:$,loadingOption:j,onConnect:_e})=>jsxRuntimeExports.jsx("div",{className:styles$9.showMoreSecondaryOptions,"data-testid":$,children:a.map(et=>jsxRuntimeExports.jsx(ConnectionOption,{className:classNames(styles$9.primaryButton,styles$9.secondaryOptionButton),showTooltip:!0,tooltipPosition:_,type:et,onClick:_e,testId:$,loading:j===et,disabled:!!j},et))}),defaultProps$2={i18n:{title:"Sign In to Decentraland",accessWith:a=>`Continue with ${connectionOptionTitles[a]}`,connectWith:a=>`Continue with ${connectionOptionTitles[a]}`,moreOptions:"More Options",socialMessage:a=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Access secured by ",a]}),web3Message:a=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Have a digital wallet? ",a("Learn More")]})}},Connection=a=>{var Et;const{i18n:_=defaultProps$2.i18n,onConnect:$,onLearnMore:j,connectionOptions:_e,className:et,loadingOption:tt}=a,[rt,at]=reactExports.useState(!1),ct=reactExports.useCallback(()=>{at(!rt)},[rt]),dt=(Et=window.ethereum)==null?void 0:Et.isMetaMask,yt=(_e==null?void 0:_e.extraOptions)&&_e.extraOptions.length>0,bt=($t,_t)=>jsxRuntimeExports.jsx(Primary,{onConnect:$,testId:_t,option:$t,loadingOption:tt,error:!dt&&$t===ConnectionOptionType.METAMASK?"You need to install the MetaMask Browser Extension to proceed. Please install it and try again.":void 0,message:isSocialLogin($t)?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[_.socialMessage(jsxRuntimeExports.jsx("div",{className:styles$9.primaryMagic,role:"img","aria-label":"Magic"})),jsxRuntimeExports.jsx("span",{className:styles$9.primaryLearnMore,role:"button",onClick:()=>j($t),children:"Learn More"})]}):_.web3Message(xt=>jsxRuntimeExports.jsx("span",{className:styles$9.primaryLearnMore,role:"button",onClick:()=>j($t),children:xt})),children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:isSocialLogin($t)?_.accessWith($t):_.connectWith($t)})});return jsxRuntimeExports.jsxs("div",{className:classNames(et,styles$9.connection),children:[jsxRuntimeExports.jsx("img",{className:styles$9.dclLogo,src:logoImg,alt:"Decentraland logo"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{className:styles$9.title,children:_.title}),_e&&bt(_e.primary,PRIMARY_TEST_ID),(_e==null?void 0:_e.secondary)&&bt(_e.secondary,SECONDARY_TEST_ID)]}),jsxRuntimeExports.jsxs("div",{className:styles$9.showMore,children:[yt&&jsxRuntimeExports.jsxs(Button$5.Button,{"data-testid":SHOW_MORE_BUTTON_TEST_ID,basic:!0,size:"medium",fluid:!0,className:styles$9.showMoreButton,onClick:ct,children:[_.moreOptions,jsxRuntimeExports.jsx(default_1,{name:rt?"chevron up":"chevron down"})]}),rt&&yt&&_e.extraOptions&&jsxRuntimeExports.jsx(Secondary,{testId:EXTRA_TEST_ID,options:_e.extraOptions,onConnect:$,tooltipDirection:"top center",loadingOption:tt})]})]})},locations={home:()=>"/",login:a=>`/login${a?`?redirectTo=${encodeURIComponent(a)}`:""}`,setup:a=>`/setup${a?`?redirectTo=${encodeURIComponent(a)}`:""}`},extractRedirectToFromSearchParameters=a=>{let _=a.get("redirectTo");try{const j=a.get("state");if(j){const _e=atob(j),et=JSON.parse(_e).customData;et&&(_=et??null)}}catch{console.error("Can't decode state parameter")}let $=locations.home();if(_)try{$=decodeURIComponent(_)}catch{console.error("Can't decode redirectTo parameter")}return $},defaultConfig={skipSetup:!1,showWearablePreview:!0,explorerText:"Desktop App",connectionOptions:{primary:ConnectionOptionType.GOOGLE,secondary:ConnectionOptionType.METAMASK,extraOptions:[ConnectionOptionType.DISCORD,ConnectionOptionType.APPLE,ConnectionOptionType.X,ConnectionOptionType.FORTMATIC,ConnectionOptionType.COINBASE,ConnectionOptionType.WALLET_CONNECT]}},defaultMobileConfig={...defaultConfig,skipSetup:!0,showWearablePreview:!1,explorerText:"Mobile App",deepLink:"decentraland://"},targetConfigs={default:{...defaultConfig},alternative:{...defaultConfig,skipSetup:!0,showWearablePreview:!1,explorerText:"Explorer"},ios:{...defaultMobileConfig,connectionOptions:{primary:ConnectionOptionType.APPLE,secondary:ConnectionOptionType.WALLET_CONNECT,extraOptions:[ConnectionOptionType.GOOGLE,ConnectionOptionType.DISCORD,ConnectionOptionType.X,ConnectionOptionType.FORTMATIC,ConnectionOptionType.COINBASE]}},android:{...defaultMobileConfig,connectionOptions:{primary:ConnectionOptionType.GOOGLE,secondary:ConnectionOptionType.WALLET_CONNECT,extraOptions:[ConnectionOptionType.DISCORD,ConnectionOptionType.APPLE,ConnectionOptionType.X,ConnectionOptionType.FORTMATIC,ConnectionOptionType.COINBASE]}},androidSocial:{...defaultMobileConfig,connectionOptions:{primary:ConnectionOptionType.GOOGLE,secondary:ConnectionOptionType.X,extraOptions:[ConnectionOptionType.APPLE,ConnectionOptionType.DISCORD]}},androidWeb3:{...defaultMobileConfig,connectionOptions:{primary:ConnectionOptionType.WALLET_CONNECT}}},adjustWeb3OptionsForMobile=a=>{let{primary:_,secondary:$,extraOptions:j}=a.connectionOptions;return _===ConnectionOptionType.METAMASK&&(_=ConnectionOptionType.WALLET_CONNECT,j=j==null?void 0:j.filter(_e=>_e!==ConnectionOptionType.WALLET_CONNECT)),$===ConnectionOptionType.METAMASK&&($=ConnectionOptionType.WALLET_CONNECT,j=j==null?void 0:j.filter(_e=>_e!==ConnectionOptionType.WALLET_CONNECT)),j=j==null?void 0:j.filter(_e=>_e!==ConnectionOptionType.METAMASK),{...a,connectionOptions:{primary:_,secondary:$,extraOptions:j}}},getTargetConfigId=a=>{const _=new URLSearchParams(a.search),$=_.get("targetConfigId"),j=extractRedirectToFromSearchParameters(_);if($ in targetConfigs)return $;if(j)try{let _e;j.startsWith("/")?_e=new URLSearchParams(j):_e=new URL(j).searchParams;const et=_e.get("targetConfigId");if(et)return et}catch{console.error("Can't parse redirectTo URL")}return"default"},useTargetConfig=()=>{const a=useLocation(),_=getTargetConfigId(a);let $=targetConfigs[_];return isMobile$1()&&($=adjustWeb3OptionsForMobile($)),[$,_]};function getAnalytics(){return window.analytics}const usePageTracking=()=>{reactExports.useEffect(()=>{const a=getAnalytics();a&&a.page()},[])};var TrackingEvents=(a=>(a.LOGIN_CLICK="Click Login Button",a.LOGIN_SUCCESS="Login Success",a.LOGIN_ERROR="Login Error",a.CLICK="Click Button",a.AVATAR_EDIT_SUCCESS="Avatar Edit Success",a.TERMS_OF_SERVICE_SUCCESS="Terms of service success",a))(TrackingEvents||{}),ClickEvents=(a=>(a.LEARN_MORE="Learn More",a.DENY_SIGN_IN="Deny Sign In",a.DENY_WALLET_INTERACTION="Deny Wallet Interaction",a.APPROVE_SING_IN="Approve Sign In",a.APPROVE_WALLET_INTERACTION="Approve Wallet Interaction",a.RANDOMIZE="Randomize default profile",a.BACK_TO_AVATAR_RANDOMIZATION_VIEW="Back to avatar randomization view",a.SUBMIT_PROFILE="Submit profile",a))(ClickEvents||{}),ConnectionType=(a=>(a.WEB3="web3",a.WEB2="web2",a.GUEST="guest",a))(ConnectionType||{}),dist$4={},config$2={},env={},location$1={},hasRequiredLocation;function requireLocation(){if(hasRequiredLocation)return location$1;hasRequiredLocation=1,Object.defineProperty(location$1,"__esModule",{value:!0}),location$1.getEnvFromQueryParam=location$1.getEnvFromTLD=void 0;const a=requireEnv();function _(j){const{host:_e}=j;return _e.endsWith(".org")?a.Env.PRODUCTION:_e.endsWith(".today")||_e.endsWith(".net")?a.Env.STAGING:_e.endsWith(".io")||_e.endsWith(".zone")?a.Env.DEVELOPMENT:null}location$1.getEnvFromTLD=_;function $(j){const _e=new URLSearchParams(j.search),et=_e.get("ENV")||_e.get("env");if(et){const tt=et.toLowerCase();if((0,a.isEnv)(tt))return tt}return null}return location$1.getEnvFromQueryParam=$,location$1}var hasRequiredEnv;function requireEnv(){return hasRequiredEnv||(hasRequiredEnv=1,function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.getEnv=a.getDefaultEnv=a.parseEnvVar=a.isEnv=a.getEnvList=a.Env=void 0;const _=requireLocation();var $;(function(at){at.DEVELOPMENT="dev",at.STAGING="stg",at.PRODUCTION="prod"})($=a.Env||(a.Env={}));function j(){return Object.values($)}a.getEnvList=j;function _e(at){return j().includes(at)}a.isEnv=_e;function et(at){if(_e(at))return at;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${at}", possible values are ${j().map(ct=>`"${ct}"`).join(", ")}.`)}a.parseEnvVar=et;function tt(at={}){const{DCL_DEFAULT_ENV:ct,REACT_APP_DCL_DEFAULT_ENV:dt,GATSBY_DCL_DEFAULT_ENV:yt}=at;if(ct&&dt&&ct!==dt)throw new Error("You have defined both DCL_DEFAULT_ENV and REACT_APP_DCL_DEFAULT_ENV with different values");if(ct&&yt&&ct!==yt)throw new Error("You have defined both DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");if(dt&&yt&&dt!==yt)throw new Error("You have defined both REACT_APP_DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");return ct?et(ct):dt?et(dt):yt?et(yt):$.PRODUCTION}a.getDefaultEnv=tt;function rt(at={}){if(typeof window<"u"){const ct=(0,_.getEnvFromQueryParam)(window.location);if(ct)return ct;const dt=(0,_.getEnvFromTLD)(window.location);if(dt)return dt}return tt(at)}a.getEnv=rt}(env)),env}Object.defineProperty(config$2,"__esModule",{value:!0});config$2.createConfig=void 0;const env_1=requireEnv();function createConfig(a,_){const $=(0,env_1.getEnv)(_==null?void 0:_.systemEnvVariables),j=a[$];return{get:(_e,et="")=>{if(!j)throw new Error(`Could not find a config for env=${$}`);return _e in j?j[_e]:et},is:_e=>$===_e,getEnv:()=>$}}config$2.createConfig=createConfig;(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.getEnv=a.Env=a.createConfig=void 0;var _=config$2;Object.defineProperty(a,"createConfig",{enumerable:!0,get:function(){return _.createConfig}});var $=requireEnv();Object.defineProperty(a,"Env",{enumerable:!0,get:function(){return $.Env}}),Object.defineProperty(a,"getEnv",{enumerable:!0,get:function(){return $.getEnv}})})(dist$4);const AUTH_SERVER_URL$2="https://auth-api.decentraland.zone",SEGMENT_API_KEY$2="FQqbzV2KeUKe2RPOeFkedKRPkJAFsU9r",PEER_URL$2="https://peer.decentraland.zone",FEATURE_FLAGS_URL$2="https://feature-flags.decentraland.org",FEATURE_FLAGS_INTERVAL$2="60000",BUILDER_SERVER_URL$2="https://builder-api.decentraland.zone",INTERCOM_APP_ID$2="z0h94kay",dev={AUTH_SERVER_URL:AUTH_SERVER_URL$2,SEGMENT_API_KEY:SEGMENT_API_KEY$2,PEER_URL:PEER_URL$2,FEATURE_FLAGS_URL:FEATURE_FLAGS_URL$2,FEATURE_FLAGS_INTERVAL:FEATURE_FLAGS_INTERVAL$2,BUILDER_SERVER_URL:BUILDER_SERVER_URL$2,INTERCOM_APP_ID:INTERCOM_APP_ID$2},AUTH_SERVER_URL$1="https://auth-api.decentraland.org",SEGMENT_API_KEY$1="FQqbzV2KeUKe2RPOeFkedKRPkJAFsU9r",PEER_URL$1="https://peer.decentraland.org",FEATURE_FLAGS_URL$1="https://feature-flags.decentraland.org",FEATURE_FLAGS_INTERVAL$1="60000",BUILDER_SERVER_URL$1="https://builder-api.decentraland.org",INTERCOM_APP_ID$1="z0h94kay",prod={AUTH_SERVER_URL:AUTH_SERVER_URL$1,SEGMENT_API_KEY:SEGMENT_API_KEY$1,PEER_URL:PEER_URL$1,FEATURE_FLAGS_URL:FEATURE_FLAGS_URL$1,FEATURE_FLAGS_INTERVAL:FEATURE_FLAGS_INTERVAL$1,BUILDER_SERVER_URL:BUILDER_SERVER_URL$1,INTERCOM_APP_ID:INTERCOM_APP_ID$1},AUTH_SERVER_URL="https://auth-api.decentraland.today",SEGMENT_API_KEY="FQqbzV2KeUKe2RPOeFkedKRPkJAFsU9r",PEER_URL="https://peer-testing.decentraland.org",FEATURE_FLAGS_URL="https://feature-flags.decentraland.org",FEATURE_FLAGS_INTERVAL="60000",BUILDER_SERVER_URL="https://builder-api.decentraland.today",INTERCOM_APP_ID="z0h94kay",stg={AUTH_SERVER_URL,SEGMENT_API_KEY,PEER_URL,FEATURE_FLAGS_URL,FEATURE_FLAGS_INTERVAL,BUILDER_SERVER_URL,INTERCOM_APP_ID},config$1=dist$4.createConfig({[dist$4.Env.DEVELOPMENT]:dev,[dist$4.Env.STAGING]:stg,[dist$4.Env.PRODUCTION]:prod},{systemEnvVariables:{REACT_APP_DCL_DEFAULT_ENV:{}.VITE_REACT_APP_DCL_DEFAULT_ENV??"dev"}});var dist$3={},fetcher$1={},browserPonyfill={exports:{}};(function(a,_){var $=typeof self<"u"?self:commonjsGlobal,j=function(){function et(){this.fetch=!1,this.DOMException=$.DOMException}return et.prototype=$,new et}();(function(et){(function(tt){var rt={searchParams:"URLSearchParams"in et,iterable:"Symbol"in et&&"iterator"in Symbol,blob:"FileReader"in et&&"Blob"in et&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in et,arrayBuffer:"ArrayBuffer"in et};function at(lt){return lt&&DataView.prototype.isPrototypeOf(lt)}if(rt.arrayBuffer)var ct=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],dt=ArrayBuffer.isView||function(lt){return lt&&ct.indexOf(Object.prototype.toString.call(lt))>-1};function yt(lt){if(typeof lt!="string"&&(lt=String(lt)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(lt))throw new TypeError("Invalid character in header field name");return lt.toLowerCase()}function bt(lt){return typeof lt!="string"&&(lt=String(lt)),lt}function Et(lt){var ht={next:function(){var mt=lt.shift();return{done:mt===void 0,value:mt}}};return rt.iterable&&(ht[Symbol.iterator]=function(){return ht}),ht}function $t(lt){this.map={},lt instanceof $t?lt.forEach(function(ht,mt){this.append(mt,ht)},this):Array.isArray(lt)?lt.forEach(function(ht){this.append(ht[0],ht[1])},this):lt&&Object.getOwnPropertyNames(lt).forEach(function(ht){this.append(ht,lt[ht])},this)}$t.prototype.append=function(lt,ht){lt=yt(lt),ht=bt(ht);var mt=this.map[lt];this.map[lt]=mt?mt+", "+ht:ht},$t.prototype.delete=function(lt){delete this.map[yt(lt)]},$t.prototype.get=function(lt){return lt=yt(lt),this.has(lt)?this.map[lt]:null},$t.prototype.has=function(lt){return this.map.hasOwnProperty(yt(lt))},$t.prototype.set=function(lt,ht){this.map[yt(lt)]=bt(ht)},$t.prototype.forEach=function(lt,ht){for(var mt in this.map)this.map.hasOwnProperty(mt)&&lt.call(ht,this.map[mt],mt,this)},$t.prototype.keys=function(){var lt=[];return this.forEach(function(ht,mt){lt.push(mt)}),Et(lt)},$t.prototype.values=function(){var lt=[];return this.forEach(function(ht){lt.push(ht)}),Et(lt)},$t.prototype.entries=function(){var lt=[];return this.forEach(function(ht,mt){lt.push([mt,ht])}),Et(lt)},rt.iterable&&($t.prototype[Symbol.iterator]=$t.prototype.entries);function _t(lt){if(lt.bodyUsed)return Promise.reject(new TypeError("Already read"));lt.bodyUsed=!0}function xt(lt){return new Promise(function(ht,mt){lt.onload=function(){ht(lt.result)},lt.onerror=function(){mt(lt.error)}})}function St(lt){var ht=new FileReader,mt=xt(ht);return ht.readAsArrayBuffer(lt),mt}function Mt(lt){var ht=new FileReader,mt=xt(ht);return ht.readAsText(lt),mt}function Tt(lt){for(var ht=new Uint8Array(lt),mt=new Array(ht.length),wt=0;wt<ht.length;wt++)mt[wt]=String.fromCharCode(ht[wt]);return mt.join("")}function Rt(lt){if(lt.slice)return lt.slice(0);var ht=new Uint8Array(lt.byteLength);return ht.set(new Uint8Array(lt)),ht.buffer}function Ct(){return this.bodyUsed=!1,this._initBody=function(lt){this._bodyInit=lt,lt?typeof lt=="string"?this._bodyText=lt:rt.blob&&Blob.prototype.isPrototypeOf(lt)?this._bodyBlob=lt:rt.formData&&FormData.prototype.isPrototypeOf(lt)?this._bodyFormData=lt:rt.searchParams&&URLSearchParams.prototype.isPrototypeOf(lt)?this._bodyText=lt.toString():rt.arrayBuffer&&rt.blob&&at(lt)?(this._bodyArrayBuffer=Rt(lt.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):rt.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(lt)||dt(lt))?this._bodyArrayBuffer=Rt(lt):this._bodyText=lt=Object.prototype.toString.call(lt):this._bodyText="",this.headers.get("content-type")||(typeof lt=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):rt.searchParams&&URLSearchParams.prototype.isPrototypeOf(lt)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},rt.blob&&(this.blob=function(){var lt=_t(this);if(lt)return lt;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?_t(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(St)}),this.text=function(){var lt=_t(this);if(lt)return lt;if(this._bodyBlob)return Mt(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(Tt(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},rt.formData&&(this.formData=function(){return this.text().then(Bt)}),this.json=function(){return this.text().then(JSON.parse)},this}var It=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function kt(lt){var ht=lt.toUpperCase();return It.indexOf(ht)>-1?ht:lt}function Dt(lt,ht){ht=ht||{};var mt=ht.body;if(lt instanceof Dt){if(lt.bodyUsed)throw new TypeError("Already read");this.url=lt.url,this.credentials=lt.credentials,ht.headers||(this.headers=new $t(lt.headers)),this.method=lt.method,this.mode=lt.mode,this.signal=lt.signal,!mt&&lt._bodyInit!=null&&(mt=lt._bodyInit,lt.bodyUsed=!0)}else this.url=String(lt);if(this.credentials=ht.credentials||this.credentials||"same-origin",(ht.headers||!this.headers)&&(this.headers=new $t(ht.headers)),this.method=kt(ht.method||this.method||"GET"),this.mode=ht.mode||this.mode||null,this.signal=ht.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&mt)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(mt)}Dt.prototype.clone=function(){return new Dt(this,{body:this._bodyInit})};function Bt(lt){var ht=new FormData;return lt.trim().split("&").forEach(function(mt){if(mt){var wt=mt.split("="),At=wt.shift().replace(/\+/g," "),gt=wt.join("=").replace(/\+/g," ");ht.append(decodeURIComponent(At),decodeURIComponent(gt))}}),ht}function zt(lt){var ht=new $t,mt=lt.replace(/\r?\n[\t ]+/g," ");return mt.split(/\r?\n/).forEach(function(wt){var At=wt.split(":"),gt=At.shift().trim();if(gt){var ot=At.join(":").trim();ht.append(gt,ot)}}),ht}Ct.call(Dt.prototype);function vt(lt,ht){ht||(ht={}),this.type="default",this.status=ht.status===void 0?200:ht.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in ht?ht.statusText:"OK",this.headers=new $t(ht.headers),this.url=ht.url||"",this._initBody(lt)}Ct.call(vt.prototype),vt.prototype.clone=function(){return new vt(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new $t(this.headers),url:this.url})},vt.error=function(){var lt=new vt(null,{status:0,statusText:""});return lt.type="error",lt};var nt=[301,302,303,307,308];vt.redirect=function(lt,ht){if(nt.indexOf(ht)===-1)throw new RangeError("Invalid status code");return new vt(null,{status:ht,headers:{location:lt}})},tt.DOMException=et.DOMException;try{new tt.DOMException}catch{tt.DOMException=function(ht,mt){this.message=ht,this.name=mt;var wt=Error(ht);this.stack=wt.stack},tt.DOMException.prototype=Object.create(Error.prototype),tt.DOMException.prototype.constructor=tt.DOMException}function st(lt,ht){return new Promise(function(mt,wt){var At=new Dt(lt,ht);if(At.signal&&At.signal.aborted)return wt(new tt.DOMException("Aborted","AbortError"));var gt=new XMLHttpRequest;function ot(){gt.abort()}gt.onload=function(){var pt={status:gt.status,statusText:gt.statusText,headers:zt(gt.getAllResponseHeaders()||"")};pt.url="responseURL"in gt?gt.responseURL:pt.headers.get("X-Request-URL");var Pt="response"in gt?gt.response:gt.responseText;mt(new vt(Pt,pt))},gt.onerror=function(){wt(new TypeError("Network request failed"))},gt.ontimeout=function(){wt(new TypeError("Network request failed"))},gt.onabort=function(){wt(new tt.DOMException("Aborted","AbortError"))},gt.open(At.method,At.url,!0),At.credentials==="include"?gt.withCredentials=!0:At.credentials==="omit"&&(gt.withCredentials=!1),"responseType"in gt&&rt.blob&&(gt.responseType="blob"),At.headers.forEach(function(pt,Pt){gt.setRequestHeader(Pt,pt)}),At.signal&&(At.signal.addEventListener("abort",ot),gt.onreadystatechange=function(){gt.readyState===4&&At.signal.removeEventListener("abort",ot)}),gt.send(typeof At._bodyInit>"u"?null:At._bodyInit)})}return st.polyfill=!0,et.fetch||(et.fetch=st,et.Headers=$t,et.Request=Dt,et.Response=vt),tt.Headers=$t,tt.Request=Dt,tt.Response=vt,tt.fetch=st,Object.defineProperty(tt,"__esModule",{value:!0}),tt})({})})(j),j.fetch.ponyfill=!0,delete j.fetch.polyfill;var _e=j;_=_e.fetch,_.default=_e.fetch,_.fetch=_e.fetch,_.Headers=_e.Headers,_.Request=_e.Request,_.Response=_e.Response,a.exports=_})(browserPonyfill,browserPonyfill.exports);var browserPonyfillExports=browserPonyfill.exports;const o=getDefaultExportFromCjs$1(browserPonyfillExports);var environment={};Object.defineProperty(environment,"__esModule",{value:!0});environment.isUsingNode=void 0;function isUsingNode(){return typeof process$1<"u"&&process$1.release&&process$1.release.name==="node"}environment.isUsingNode=isUsingNode;var __createBinding$5=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(a,_,$,j){j===void 0&&(j=$);var _e=Object.getOwnPropertyDescriptor(_,$);(!_e||("get"in _e?!_.__esModule:_e.writable||_e.configurable))&&(_e={enumerable:!0,get:function(){return _[$]}}),Object.defineProperty(a,j,_e)}:function(a,_,$,j){j===void 0&&(j=$),a[j]=_[$]}),__setModuleDefault$5=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(a,_){Object.defineProperty(a,"default",{enumerable:!0,value:_})}:function(a,_){a.default=_}),__importStar$5=commonjsGlobal&&commonjsGlobal.__importStar||function(a){if(a&&a.__esModule)return a;var _={};if(a!=null)for(var $ in a)$!=="default"&&Object.prototype.hasOwnProperty.call(a,$)&&__createBinding$5(_,a,$);return __setModuleDefault$5(_,a),_},__rest$2=commonjsGlobal&&commonjsGlobal.__rest||function(a,_){var $={};for(var j in a)Object.prototype.hasOwnProperty.call(a,j)&&_.indexOf(j)<0&&($[j]=a[j]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,j=Object.getOwnPropertySymbols(a);_e<j.length;_e++)_.indexOf(j[_e])<0&&Object.prototype.propertyIsEnumerable.call(a,j[_e])&&($[j[_e]]=a[j[_e]]);return $};Object.defineProperty(fetcher$1,"__esModule",{value:!0});fetcher$1.createFetchComponent=void 0;const crossFetch=__importStar$5(browserPonyfillExports),environment_1=environment,NON_RETRYABLE_STATUS_CODES=[400,401,403,404],IDEMPOTENT_HTTP_METHODS=["GET","HEAD","OPTIONS","PUT","DELETE"];async function fetchWithRetriesAndTimeout(a,_){const{timeout:$,abortController:j,signal:_e,retryDelay:et}=_;let tt=_.attempts,rt=null,at;do try{$&&(rt=setTimeout(()=>{j.abort()},$));const ct=crossFetch.default(a.toString(),Object.assign(Object.assign({},_),{signal:_e})),dt=Promise.race([ct,new Promise((yt,bt)=>{_e.addEventListener("abort",()=>{yt(new crossFetch.Response("timeout",{status:408,statusText:"Request Timeout"}))})})]);--tt,at=await dt,rt&&clearTimeout(rt)}finally{if(at&&(at.ok||NON_RETRYABLE_STATUS_CODES.includes(at.status)||tt===0))break;await new Promise(ct=>setTimeout(ct,et))}while((!at||!at.ok)&&tt>0);return at}function createFetchComponent(a){async function _($,j){const et=Object.assign(Object.assign({},a==null?void 0:a.defaultFetcherOptions),j)||{},{timeout:tt,method:rt="GET",retryDelay:at=0,abortController:ct}=et,dt=__rest$2(et,["timeout","method","retryDelay","abortController"]);let yt=dt.attempts||1;const bt=ct||new AbortController,{signal:Et}=bt;a!=null&&a.defaultHeaders&&(dt.headers=Object.assign(Object.assign({},a==null?void 0:a.defaultHeaders),dt.headers||{})),IDEMPOTENT_HTTP_METHODS.includes(rt.toUpperCase())||(yt=1);const $t=await fetchWithRetriesAndTimeout($,Object.assign(Object.assign({},dt),{attempts:yt,method:rt,timeout:tt,retryDelay:at,signal:Et,abortController:bt}));if(!($t!=null&&$t.ok)){const _t=await($t==null?void 0:$t.text());throw new Error(`Failed to fetch ${$}. Got status ${$t==null?void 0:$t.status}. Response was '${_t}'`)}return!(0,environment_1.isUsingNode)()&&$t&&Object.defineProperty($t,"buffer",{value:async function(){return Buffer$G.from(await $t.arrayBuffer())},configurable:!0}),Et.aborted?void 0:$t}return{fetch:_}}fetcher$1.createFetchComponent=createFetchComponent;(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.createFetchComponent=void 0;var _=fetcher$1;Object.defineProperty(a,"createFetchComponent",{enumerable:!0,get:function(){return _.createFetchComponent}})})(dist$3);var dist$2={},CatalystClient={},ContentClient={},dist$1={exports:{}};dist$1.exports;(function(module){var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__commonJS=(a,_)=>function(){return _||(0,a[__getOwnPropNames(a)[0]])((_={exports:{}}).exports,_),_.exports},__export=(a,_)=>{for(var $ in _)__defProp(a,$,{get:_[$],enumerable:!0})},__copyProps=(a,_,$,j)=>{if(_&&typeof _=="object"||typeof _=="function")for(let _e of __getOwnPropNames(_))!__hasOwnProp.call(a,_e)&&_e!==$&&__defProp(a,_e,{get:()=>_[_e],enumerable:!(j=__getOwnPropDesc(_,_e))||j.enumerable});return a},__toESM=(a,_,$)=>($=a!=null?__create(__getProtoOf(a)):{},__copyProps(_||!a||!a.__esModule?__defProp($,"default",{value:a,enumerable:!0}):$,a)),__toCommonJS=a=>__copyProps(__defProp({},"__esModule",{value:!0}),a),require_err_code=__commonJS({"node_modules/err-code/index.js"(a,_){function $(_e,et){for(const tt in et)Object.defineProperty(_e,tt,{value:et[tt],enumerable:!0,configurable:!0});return _e}function j(_e,et,tt){if(!_e||typeof _e=="string")throw new TypeError("Please pass an Error to err-code");tt||(tt={}),typeof et=="object"&&(tt=et,et=""),et&&(tt.code=et);try{return $(_e,tt)}catch{tt.message=_e.message,tt.stack=_e.stack;const at=function(){};return at.prototype=Object.create(Object.getPrototypeOf(_e)),$(new at,tt)}}_.exports=j}}),require_aspromise=__commonJS({"node_modules/@protobufjs/aspromise/index.js"(a,_){_.exports=$;function $(j,_e){for(var et=new Array(arguments.length-1),tt=0,rt=2,at=!0;rt<arguments.length;)et[tt++]=arguments[rt++];return new Promise(function(dt,yt){et[tt]=function(Et){if(at)if(at=!1,Et)yt(Et);else{for(var $t=new Array(arguments.length-1),_t=0;_t<$t.length;)$t[_t++]=arguments[_t];dt.apply(null,$t)}};try{j.apply(_e||null,et)}catch(bt){at&&(at=!1,yt(bt))}})}}}),require_base64=__commonJS({"node_modules/@protobufjs/base64/index.js"(a){var _=a;_.length=function(rt){var at=rt.length;if(!at)return 0;for(var ct=0;--at%4>1&&rt.charAt(at)==="=";)++ct;return Math.ceil(rt.length*3)/4-ct};var $=new Array(64),j=new Array(123);for(_e=0;_e<64;)j[$[_e]=_e<26?_e+65:_e<52?_e+71:_e<62?_e-4:_e-59|43]=_e++;var _e;_.encode=function(rt,at,ct){for(var dt=null,yt=[],bt=0,Et=0,$t;at<ct;){var _t=rt[at++];switch(Et){case 0:yt[bt++]=$[_t>>2],$t=(_t&3)<<4,Et=1;break;case 1:yt[bt++]=$[$t|_t>>4],$t=(_t&15)<<2,Et=2;break;case 2:yt[bt++]=$[$t|_t>>6],yt[bt++]=$[_t&63],Et=0;break}bt>8191&&((dt||(dt=[])).push(String.fromCharCode.apply(String,yt)),bt=0)}return Et&&(yt[bt++]=$[$t],yt[bt++]=61,Et===1&&(yt[bt++]=61)),dt?(bt&&dt.push(String.fromCharCode.apply(String,yt.slice(0,bt))),dt.join("")):String.fromCharCode.apply(String,yt.slice(0,bt))};var et="invalid encoding";_.decode=function(rt,at,ct){for(var dt=ct,yt=0,bt,Et=0;Et<rt.length;){var $t=rt.charCodeAt(Et++);if($t===61&&yt>1)break;if(($t=j[$t])===void 0)throw Error(et);switch(yt){case 0:bt=$t,yt=1;break;case 1:at[ct++]=bt<<2|($t&48)>>4,bt=$t,yt=2;break;case 2:at[ct++]=(bt&15)<<4|($t&60)>>2,bt=$t,yt=3;break;case 3:at[ct++]=(bt&3)<<6|$t,yt=0;break}}if(yt===1)throw Error(et);return ct-dt},_.test=function(rt){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(rt)}}}),require_eventemitter=__commonJS({"node_modules/@protobufjs/eventemitter/index.js"(a,_){_.exports=$;function $(){this._listeners={}}$.prototype.on=function(_e,et,tt){return(this._listeners[_e]||(this._listeners[_e]=[])).push({fn:et,ctx:tt||this}),this},$.prototype.off=function(_e,et){if(_e===void 0)this._listeners={};else if(et===void 0)this._listeners[_e]=[];else for(var tt=this._listeners[_e],rt=0;rt<tt.length;)tt[rt].fn===et?tt.splice(rt,1):++rt;return this},$.prototype.emit=function(_e){var et=this._listeners[_e];if(et){for(var tt=[],rt=1;rt<arguments.length;)tt.push(arguments[rt++]);for(rt=0;rt<et.length;)et[rt].fn.apply(et[rt++].ctx,tt)}return this}}}),require_float=__commonJS({"node_modules/@protobufjs/float/index.js"(a,_){_.exports=$($);function $(rt){return typeof Float32Array<"u"?function(){var at=new Float32Array([-0]),ct=new Uint8Array(at.buffer),dt=ct[3]===128;function yt(_t,xt,St){at[0]=_t,xt[St]=ct[0],xt[St+1]=ct[1],xt[St+2]=ct[2],xt[St+3]=ct[3]}function bt(_t,xt,St){at[0]=_t,xt[St]=ct[3],xt[St+1]=ct[2],xt[St+2]=ct[1],xt[St+3]=ct[0]}rt.writeFloatLE=dt?yt:bt,rt.writeFloatBE=dt?bt:yt;function Et(_t,xt){return ct[0]=_t[xt],ct[1]=_t[xt+1],ct[2]=_t[xt+2],ct[3]=_t[xt+3],at[0]}function $t(_t,xt){return ct[3]=_t[xt],ct[2]=_t[xt+1],ct[1]=_t[xt+2],ct[0]=_t[xt+3],at[0]}rt.readFloatLE=dt?Et:$t,rt.readFloatBE=dt?$t:Et}():function(){function at(dt,yt,bt,Et){var $t=yt<0?1:0;if($t&&(yt=-yt),yt===0)dt(1/yt>0?0:2147483648,bt,Et);else if(isNaN(yt))dt(2143289344,bt,Et);else if(yt>34028234663852886e22)dt(($t<<31|2139095040)>>>0,bt,Et);else if(yt<11754943508222875e-54)dt(($t<<31|Math.round(yt/1401298464324817e-60))>>>0,bt,Et);else{var _t=Math.floor(Math.log(yt)/Math.LN2),xt=Math.round(yt*Math.pow(2,-_t)*8388608)&8388607;dt(($t<<31|_t+127<<23|xt)>>>0,bt,Et)}}rt.writeFloatLE=at.bind(null,j),rt.writeFloatBE=at.bind(null,_e);function ct(dt,yt,bt){var Et=dt(yt,bt),$t=(Et>>31)*2+1,_t=Et>>>23&255,xt=Et&8388607;return _t===255?xt?NaN:$t*(1/0):_t===0?$t*1401298464324817e-60*xt:$t*Math.pow(2,_t-150)*(xt+8388608)}rt.readFloatLE=ct.bind(null,et),rt.readFloatBE=ct.bind(null,tt)}(),typeof Float64Array<"u"?function(){var at=new Float64Array([-0]),ct=new Uint8Array(at.buffer),dt=ct[7]===128;function yt(_t,xt,St){at[0]=_t,xt[St]=ct[0],xt[St+1]=ct[1],xt[St+2]=ct[2],xt[St+3]=ct[3],xt[St+4]=ct[4],xt[St+5]=ct[5],xt[St+6]=ct[6],xt[St+7]=ct[7]}function bt(_t,xt,St){at[0]=_t,xt[St]=ct[7],xt[St+1]=ct[6],xt[St+2]=ct[5],xt[St+3]=ct[4],xt[St+4]=ct[3],xt[St+5]=ct[2],xt[St+6]=ct[1],xt[St+7]=ct[0]}rt.writeDoubleLE=dt?yt:bt,rt.writeDoubleBE=dt?bt:yt;function Et(_t,xt){return ct[0]=_t[xt],ct[1]=_t[xt+1],ct[2]=_t[xt+2],ct[3]=_t[xt+3],ct[4]=_t[xt+4],ct[5]=_t[xt+5],ct[6]=_t[xt+6],ct[7]=_t[xt+7],at[0]}function $t(_t,xt){return ct[7]=_t[xt],ct[6]=_t[xt+1],ct[5]=_t[xt+2],ct[4]=_t[xt+3],ct[3]=_t[xt+4],ct[2]=_t[xt+5],ct[1]=_t[xt+6],ct[0]=_t[xt+7],at[0]}rt.readDoubleLE=dt?Et:$t,rt.readDoubleBE=dt?$t:Et}():function(){function at(dt,yt,bt,Et,$t,_t){var xt=Et<0?1:0;if(xt&&(Et=-Et),Et===0)dt(0,$t,_t+yt),dt(1/Et>0?0:2147483648,$t,_t+bt);else if(isNaN(Et))dt(0,$t,_t+yt),dt(2146959360,$t,_t+bt);else if(Et>17976931348623157e292)dt(0,$t,_t+yt),dt((xt<<31|2146435072)>>>0,$t,_t+bt);else{var St;if(Et<22250738585072014e-324)St=Et/5e-324,dt(St>>>0,$t,_t+yt),dt((xt<<31|St/4294967296)>>>0,$t,_t+bt);else{var Mt=Math.floor(Math.log(Et)/Math.LN2);Mt===1024&&(Mt=1023),St=Et*Math.pow(2,-Mt),dt(St*4503599627370496>>>0,$t,_t+yt),dt((xt<<31|Mt+1023<<20|St*1048576&1048575)>>>0,$t,_t+bt)}}}rt.writeDoubleLE=at.bind(null,j,0,4),rt.writeDoubleBE=at.bind(null,_e,4,0);function ct(dt,yt,bt,Et,$t){var _t=dt(Et,$t+yt),xt=dt(Et,$t+bt),St=(xt>>31)*2+1,Mt=xt>>>20&2047,Tt=4294967296*(xt&1048575)+_t;return Mt===2047?Tt?NaN:St*(1/0):Mt===0?St*5e-324*Tt:St*Math.pow(2,Mt-1075)*(Tt+4503599627370496)}rt.readDoubleLE=ct.bind(null,et,0,4),rt.readDoubleBE=ct.bind(null,tt,4,0)}(),rt}function j(rt,at,ct){at[ct]=rt&255,at[ct+1]=rt>>>8&255,at[ct+2]=rt>>>16&255,at[ct+3]=rt>>>24}function _e(rt,at,ct){at[ct]=rt>>>24,at[ct+1]=rt>>>16&255,at[ct+2]=rt>>>8&255,at[ct+3]=rt&255}function et(rt,at){return(rt[at]|rt[at+1]<<8|rt[at+2]<<16|rt[at+3]<<24)>>>0}function tt(rt,at){return(rt[at]<<24|rt[at+1]<<16|rt[at+2]<<8|rt[at+3])>>>0}}}),require_inquire=__commonJS({"node_modules/@protobufjs/inquire/index.js"(exports,module){module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(a){}return null}}}),require_utf8=__commonJS({"node_modules/@protobufjs/utf8/index.js"(a){var _=a;_.length=function(j){for(var _e=0,et=0,tt=0;tt<j.length;++tt)et=j.charCodeAt(tt),et<128?_e+=1:et<2048?_e+=2:(et&64512)===55296&&(j.charCodeAt(tt+1)&64512)===56320?(++tt,_e+=4):_e+=3;return _e},_.read=function(j,_e,et){var tt=et-_e;if(tt<1)return"";for(var rt=null,at=[],ct=0,dt;_e<et;)dt=j[_e++],dt<128?at[ct++]=dt:dt>191&&dt<224?at[ct++]=(dt&31)<<6|j[_e++]&63:dt>239&&dt<365?(dt=((dt&7)<<18|(j[_e++]&63)<<12|(j[_e++]&63)<<6|j[_e++]&63)-65536,at[ct++]=55296+(dt>>10),at[ct++]=56320+(dt&1023)):at[ct++]=(dt&15)<<12|(j[_e++]&63)<<6|j[_e++]&63,ct>8191&&((rt||(rt=[])).push(String.fromCharCode.apply(String,at)),ct=0);return rt?(ct&&rt.push(String.fromCharCode.apply(String,at.slice(0,ct))),rt.join("")):String.fromCharCode.apply(String,at.slice(0,ct))},_.write=function(j,_e,et){for(var tt=et,rt,at,ct=0;ct<j.length;++ct)rt=j.charCodeAt(ct),rt<128?_e[et++]=rt:rt<2048?(_e[et++]=rt>>6|192,_e[et++]=rt&63|128):(rt&64512)===55296&&((at=j.charCodeAt(ct+1))&64512)===56320?(rt=65536+((rt&1023)<<10)+(at&1023),++ct,_e[et++]=rt>>18|240,_e[et++]=rt>>12&63|128,_e[et++]=rt>>6&63|128,_e[et++]=rt&63|128):(_e[et++]=rt>>12|224,_e[et++]=rt>>6&63|128,_e[et++]=rt&63|128);return et-tt}}}),require_pool=__commonJS({"node_modules/@protobufjs/pool/index.js"(a,_){_.exports=$;function $(j,_e,et){var tt=et||8192,rt=tt>>>1,at=null,ct=tt;return function(yt){if(yt<1||yt>rt)return j(yt);ct+yt>tt&&(at=j(tt),ct=0);var bt=_e.call(at,ct,ct+=yt);return ct&7&&(ct=(ct|7)+1),bt}}}}),require_longbits=__commonJS({"node_modules/protobufjs/src/util/longbits.js"(a,_){_.exports=j;var $=require_minimal();function j(rt,at){this.lo=rt>>>0,this.hi=at>>>0}var _e=j.zero=new j(0,0);_e.toNumber=function(){return 0},_e.zzEncode=_e.zzDecode=function(){return this},_e.length=function(){return 1};var et=j.zeroHash="\0\0\0\0\0\0\0\0";j.fromNumber=function(at){if(at===0)return _e;var ct=at<0;ct&&(at=-at);var dt=at>>>0,yt=(at-dt)/4294967296>>>0;return ct&&(yt=~yt>>>0,dt=~dt>>>0,++dt>4294967295&&(dt=0,++yt>4294967295&&(yt=0))),new j(dt,yt)},j.from=function(at){if(typeof at=="number")return j.fromNumber(at);if($.isString(at))if($.Long)at=$.Long.fromString(at);else return j.fromNumber(parseInt(at,10));return at.low||at.high?new j(at.low>>>0,at.high>>>0):_e},j.prototype.toNumber=function(at){if(!at&&this.hi>>>31){var ct=~this.lo+1>>>0,dt=~this.hi>>>0;return ct||(dt=dt+1>>>0),-(ct+dt*4294967296)}return this.lo+this.hi*4294967296},j.prototype.toLong=function(at){return $.Long?new $.Long(this.lo|0,this.hi|0,!!at):{low:this.lo|0,high:this.hi|0,unsigned:!!at}};var tt=String.prototype.charCodeAt;j.fromHash=function(at){return at===et?_e:new j((tt.call(at,0)|tt.call(at,1)<<8|tt.call(at,2)<<16|tt.call(at,3)<<24)>>>0,(tt.call(at,4)|tt.call(at,5)<<8|tt.call(at,6)<<16|tt.call(at,7)<<24)>>>0)},j.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},j.prototype.zzEncode=function(){var at=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^at)>>>0,this.lo=(this.lo<<1^at)>>>0,this},j.prototype.zzDecode=function(){var at=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^at)>>>0,this.hi=(this.hi>>>1^at)>>>0,this},j.prototype.length=function(){var at=this.lo,ct=(this.lo>>>28|this.hi<<4)>>>0,dt=this.hi>>>24;return dt===0?ct===0?at<16384?at<128?1:2:at<2097152?3:4:ct<16384?ct<128?5:6:ct<2097152?7:8:dt<128?9:10}}}),require_minimal=__commonJS({"node_modules/protobufjs/src/util/minimal.js"(a){var _=a;_.asPromise=require_aspromise(),_.base64=require_base64(),_.EventEmitter=require_eventemitter(),_.float=require_float(),_.inquire=require_inquire(),_.utf8=require_utf8(),_.pool=require_pool(),_.LongBits=require_longbits(),_.isNode=!!(typeof commonjsGlobal<"u"&&commonjsGlobal&&commonjsGlobal.process&&commonjsGlobal.process.versions&&commonjsGlobal.process.versions.node),_.global=_.isNode&&commonjsGlobal||typeof window<"u"&&window||typeof self<"u"&&self||a,_.emptyArray=Object.freeze?Object.freeze([]):[],_.emptyObject=Object.freeze?Object.freeze({}):{},_.isInteger=Number.isInteger||function(et){return typeof et=="number"&&isFinite(et)&&Math.floor(et)===et},_.isString=function(et){return typeof et=="string"||et instanceof String},_.isObject=function(et){return et&&typeof et=="object"},_.isset=_.isSet=function(et,tt){var rt=et[tt];return rt!=null&&et.hasOwnProperty(tt)?typeof rt!="object"||(Array.isArray(rt)?rt.length:Object.keys(rt).length)>0:!1},_.Buffer=function(){try{var _e=_.inquire("buffer").Buffer;return _e.prototype.utf8Write?_e:null}catch{return null}}(),_._Buffer_from=null,_._Buffer_allocUnsafe=null,_.newBuffer=function(et){return typeof et=="number"?_.Buffer?_._Buffer_allocUnsafe(et):new _.Array(et):_.Buffer?_._Buffer_from(et):typeof Uint8Array>"u"?et:new Uint8Array(et)},_.Array=typeof Uint8Array<"u"?Uint8Array:Array,_.Long=_.global.dcodeIO&&_.global.dcodeIO.Long||_.global.Long||_.inquire("long"),_.key2Re=/^true|false|0|1$/,_.key32Re=/^-?(?:0|[1-9][0-9]*)$/,_.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,_.longToHash=function(et){return et?_.LongBits.from(et).toHash():_.LongBits.zeroHash},_.longFromHash=function(et,tt){var rt=_.LongBits.fromHash(et);return _.Long?_.Long.fromBits(rt.lo,rt.hi,tt):rt.toNumber(!!tt)};function $(_e,et,tt){for(var rt=Object.keys(et),at=0;at<rt.length;++at)(_e[rt[at]]===void 0||!tt)&&(_e[rt[at]]=et[rt[at]]);return _e}_.merge=$,_.lcFirst=function(et){return et.charAt(0).toLowerCase()+et.substring(1)};function j(_e){function et(tt,rt){if(!(this instanceof et))return new et(tt,rt);Object.defineProperty(this,"message",{get:function(){return tt}}),Error.captureStackTrace?Error.captureStackTrace(this,et):Object.defineProperty(this,"stack",{value:new Error().stack||""}),rt&&$(this,rt)}return et.prototype=Object.create(Error.prototype,{constructor:{value:et,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return _e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),et}_.newError=j,_.ProtocolError=j("ProtocolError"),_.oneOfGetter=function(et){for(var tt={},rt=0;rt<et.length;++rt)tt[et[rt]]=1;return function(){for(var at=Object.keys(this),ct=at.length-1;ct>-1;--ct)if(tt[at[ct]]===1&&this[at[ct]]!==void 0&&this[at[ct]]!==null)return at[ct]}},_.oneOfSetter=function(et){return function(tt){for(var rt=0;rt<et.length;++rt)et[rt]!==tt&&delete this[et[rt]]}},_.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},_._configure=function(){var _e=_.Buffer;if(!_e){_._Buffer_from=_._Buffer_allocUnsafe=null;return}_._Buffer_from=_e.from!==Uint8Array.from&&_e.from||function(tt,rt){return new _e(tt,rt)},_._Buffer_allocUnsafe=_e.allocUnsafe||function(tt){return new _e(tt)}}}}),require_reader=__commonJS({"node_modules/protobufjs/src/reader.js"(a,_){_.exports=rt;var $=require_minimal(),j,_e=$.LongBits,et=$.utf8;function tt(Et,$t){return RangeError("index out of range: "+Et.pos+" + "+($t||1)+" > "+Et.len)}function rt(Et){this.buf=Et,this.pos=0,this.len=Et.length}var at=typeof Uint8Array<"u"?function($t){if($t instanceof Uint8Array||Array.isArray($t))return new rt($t);throw Error("illegal buffer")}:function($t){if(Array.isArray($t))return new rt($t);throw Error("illegal buffer")},ct=function(){return $.Buffer?function(_t){return(rt.create=function(St){return $.Buffer.isBuffer(St)?new j(St):at(St)})(_t)}:at};rt.create=ct(),rt.prototype._slice=$.Array.prototype.subarray||$.Array.prototype.slice,rt.prototype.uint32=function(){var $t=4294967295;return function(){if($t=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||($t=($t|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||($t=($t|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||($t=($t|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||($t=($t|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return $t;if((this.pos+=5)>this.len)throw this.pos=this.len,tt(this,10);return $t}}(),rt.prototype.int32=function(){return this.uint32()|0},rt.prototype.sint32=function(){var $t=this.uint32();return $t>>>1^-($t&1)|0};function dt(){var Et=new _e(0,0),$t=0;if(this.len-this.pos>4){for(;$t<4;++$t)if(Et.lo=(Et.lo|(this.buf[this.pos]&127)<<$t*7)>>>0,this.buf[this.pos++]<128)return Et;if(Et.lo=(Et.lo|(this.buf[this.pos]&127)<<28)>>>0,Et.hi=(Et.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return Et;$t=0}else{for(;$t<3;++$t){if(this.pos>=this.len)throw tt(this);if(Et.lo=(Et.lo|(this.buf[this.pos]&127)<<$t*7)>>>0,this.buf[this.pos++]<128)return Et}return Et.lo=(Et.lo|(this.buf[this.pos++]&127)<<$t*7)>>>0,Et}if(this.len-this.pos>4){for(;$t<5;++$t)if(Et.hi=(Et.hi|(this.buf[this.pos]&127)<<$t*7+3)>>>0,this.buf[this.pos++]<128)return Et}else for(;$t<5;++$t){if(this.pos>=this.len)throw tt(this);if(Et.hi=(Et.hi|(this.buf[this.pos]&127)<<$t*7+3)>>>0,this.buf[this.pos++]<128)return Et}throw Error("invalid varint encoding")}rt.prototype.bool=function(){return this.uint32()!==0};function yt(Et,$t){return(Et[$t-4]|Et[$t-3]<<8|Et[$t-2]<<16|Et[$t-1]<<24)>>>0}rt.prototype.fixed32=function(){if(this.pos+4>this.len)throw tt(this,4);return yt(this.buf,this.pos+=4)},rt.prototype.sfixed32=function(){if(this.pos+4>this.len)throw tt(this,4);return yt(this.buf,this.pos+=4)|0};function bt(){if(this.pos+8>this.len)throw tt(this,8);return new _e(yt(this.buf,this.pos+=4),yt(this.buf,this.pos+=4))}rt.prototype.float=function(){if(this.pos+4>this.len)throw tt(this,4);var $t=$.float.readFloatLE(this.buf,this.pos);return this.pos+=4,$t},rt.prototype.double=function(){if(this.pos+8>this.len)throw tt(this,4);var $t=$.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,$t},rt.prototype.bytes=function(){var $t=this.uint32(),_t=this.pos,xt=this.pos+$t;if(xt>this.len)throw tt(this,$t);return this.pos+=$t,Array.isArray(this.buf)?this.buf.slice(_t,xt):_t===xt?new this.buf.constructor(0):this._slice.call(this.buf,_t,xt)},rt.prototype.string=function(){var $t=this.bytes();return et.read($t,0,$t.length)},rt.prototype.skip=function($t){if(typeof $t=="number"){if(this.pos+$t>this.len)throw tt(this,$t);this.pos+=$t}else do if(this.pos>=this.len)throw tt(this);while(this.buf[this.pos++]&128);return this},rt.prototype.skipType=function(Et){switch(Et){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(Et=this.uint32()&7)!==4;)this.skipType(Et);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+Et+" at offset "+this.pos)}return this},rt._configure=function(Et){j=Et,rt.create=ct(),j._configure();var $t=$.Long?"toLong":"toNumber";$.merge(rt.prototype,{int64:function(){return dt.call(this)[$t](!1)},uint64:function(){return dt.call(this)[$t](!0)},sint64:function(){return dt.call(this).zzDecode()[$t](!1)},fixed64:function(){return bt.call(this)[$t](!0)},sfixed64:function(){return bt.call(this)[$t](!1)}})}}}),require_reader_buffer=__commonJS({"node_modules/protobufjs/src/reader_buffer.js"(a,_){_.exports=_e;var $=require_reader();(_e.prototype=Object.create($.prototype)).constructor=_e;var j=require_minimal();function _e(et){$.call(this,et)}_e._configure=function(){j.Buffer&&(_e.prototype._slice=j.Buffer.prototype.slice)},_e.prototype.string=function(){var tt=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+tt,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+tt,this.len))},_e._configure()}}),require_writer=__commonJS({"node_modules/protobufjs/src/writer.js"(a,_){_.exports=dt;var $=require_minimal(),j,_e=$.LongBits,et=$.base64,tt=$.utf8;function rt(Mt,Tt,Rt){this.fn=Mt,this.len=Tt,this.next=void 0,this.val=Rt}function at(){}function ct(Mt){this.head=Mt.head,this.tail=Mt.tail,this.len=Mt.len,this.next=Mt.states}function dt(){this.len=0,this.head=new rt(at,0,0),this.tail=this.head,this.states=null}var yt=function(){return $.Buffer?function(){return(dt.create=function(){return new j})()}:function(){return new dt}};dt.create=yt(),dt.alloc=function(Tt){return new $.Array(Tt)},$.Array!==Array&&(dt.alloc=$.pool(dt.alloc,$.Array.prototype.subarray)),dt.prototype._push=function(Tt,Rt,Ct){return this.tail=this.tail.next=new rt(Tt,Rt,Ct),this.len+=Rt,this};function bt(Mt,Tt,Rt){Tt[Rt]=Mt&255}function Et(Mt,Tt,Rt){for(;Mt>127;)Tt[Rt++]=Mt&127|128,Mt>>>=7;Tt[Rt]=Mt}function $t(Mt,Tt){this.len=Mt,this.next=void 0,this.val=Tt}$t.prototype=Object.create(rt.prototype),$t.prototype.fn=Et,dt.prototype.uint32=function(Tt){return this.len+=(this.tail=this.tail.next=new $t((Tt=Tt>>>0)<128?1:Tt<16384?2:Tt<2097152?3:Tt<268435456?4:5,Tt)).len,this},dt.prototype.int32=function(Tt){return Tt<0?this._push(_t,10,_e.fromNumber(Tt)):this.uint32(Tt)},dt.prototype.sint32=function(Tt){return this.uint32((Tt<<1^Tt>>31)>>>0)};function _t(Mt,Tt,Rt){for(;Mt.hi;)Tt[Rt++]=Mt.lo&127|128,Mt.lo=(Mt.lo>>>7|Mt.hi<<25)>>>0,Mt.hi>>>=7;for(;Mt.lo>127;)Tt[Rt++]=Mt.lo&127|128,Mt.lo=Mt.lo>>>7;Tt[Rt++]=Mt.lo}dt.prototype.uint64=function(Tt){var Rt=_e.from(Tt);return this._push(_t,Rt.length(),Rt)},dt.prototype.int64=dt.prototype.uint64,dt.prototype.sint64=function(Tt){var Rt=_e.from(Tt).zzEncode();return this._push(_t,Rt.length(),Rt)},dt.prototype.bool=function(Tt){return this._push(bt,1,Tt?1:0)};function xt(Mt,Tt,Rt){Tt[Rt]=Mt&255,Tt[Rt+1]=Mt>>>8&255,Tt[Rt+2]=Mt>>>16&255,Tt[Rt+3]=Mt>>>24}dt.prototype.fixed32=function(Tt){return this._push(xt,4,Tt>>>0)},dt.prototype.sfixed32=dt.prototype.fixed32,dt.prototype.fixed64=function(Tt){var Rt=_e.from(Tt);return this._push(xt,4,Rt.lo)._push(xt,4,Rt.hi)},dt.prototype.sfixed64=dt.prototype.fixed64,dt.prototype.float=function(Tt){return this._push($.float.writeFloatLE,4,Tt)},dt.prototype.double=function(Tt){return this._push($.float.writeDoubleLE,8,Tt)};var St=$.Array.prototype.set?function(Tt,Rt,Ct){Rt.set(Tt,Ct)}:function(Tt,Rt,Ct){for(var It=0;It<Tt.length;++It)Rt[Ct+It]=Tt[It]};dt.prototype.bytes=function(Tt){var Rt=Tt.length>>>0;if(!Rt)return this._push(bt,1,0);if($.isString(Tt)){var Ct=dt.alloc(Rt=et.length(Tt));et.decode(Tt,Ct,0),Tt=Ct}return this.uint32(Rt)._push(St,Rt,Tt)},dt.prototype.string=function(Tt){var Rt=tt.length(Tt);return Rt?this.uint32(Rt)._push(tt.write,Rt,Tt):this._push(bt,1,0)},dt.prototype.fork=function(){return this.states=new ct(this),this.head=this.tail=new rt(at,0,0),this.len=0,this},dt.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new rt(at,0,0),this.len=0),this},dt.prototype.ldelim=function(){var Tt=this.head,Rt=this.tail,Ct=this.len;return this.reset().uint32(Ct),Ct&&(this.tail.next=Tt.next,this.tail=Rt,this.len+=Ct),this},dt.prototype.finish=function(){for(var Tt=this.head.next,Rt=this.constructor.alloc(this.len),Ct=0;Tt;)Tt.fn(Tt.val,Rt,Ct),Ct+=Tt.len,Tt=Tt.next;return Rt},dt._configure=function(Mt){j=Mt,dt.create=yt(),j._configure()}}}),require_writer_buffer=__commonJS({"node_modules/protobufjs/src/writer_buffer.js"(a,_){_.exports=_e;var $=require_writer();(_e.prototype=Object.create($.prototype)).constructor=_e;var j=require_minimal();function _e(){$.call(this)}_e._configure=function(){_e.alloc=j._Buffer_allocUnsafe,_e.writeBytesBuffer=j.Buffer&&j.Buffer.prototype instanceof Uint8Array&&j.Buffer.prototype.set.name==="set"?function(rt,at,ct){at.set(rt,ct)}:function(rt,at,ct){if(rt.copy)rt.copy(at,ct,0,rt.length);else for(var dt=0;dt<rt.length;)at[ct++]=rt[dt++]}},_e.prototype.bytes=function(rt){j.isString(rt)&&(rt=j._Buffer_from(rt,"base64"));var at=rt.length>>>0;return this.uint32(at),at&&this._push(_e.writeBytesBuffer,at,rt),this};function et(tt,rt,at){tt.length<40?j.utf8.write(tt,rt,at):rt.utf8Write?rt.utf8Write(tt,at):rt.write(tt,at)}_e.prototype.string=function(rt){var at=j.Buffer.byteLength(rt);return this.uint32(at),at&&this._push(et,at,rt),this},_e._configure()}}),require_murmurHash3js=__commonJS({"node_modules/murmurhash3js-revisited/lib/murmurHash3js.js"(a,_){(function($,j){var _e={version:"3.0.0",x86:{},x64:{},inputValidation:!0};function et(_t){if(!Array.isArray(_t)&&!ArrayBuffer.isView(_t))return!1;for(var xt=0;xt<_t.length;xt++)if(!Number.isInteger(_t[xt])||_t[xt]<0||_t[xt]>255)return!1;return!0}function tt(_t,xt){return(_t&65535)*xt+(((_t>>>16)*xt&65535)<<16)}function rt(_t,xt){return _t<<xt|_t>>>32-xt}function at(_t){return _t^=_t>>>16,_t=tt(_t,2246822507),_t^=_t>>>13,_t=tt(_t,3266489909),_t^=_t>>>16,_t}function ct(_t,xt){_t=[_t[0]>>>16,_t[0]&65535,_t[1]>>>16,_t[1]&65535],xt=[xt[0]>>>16,xt[0]&65535,xt[1]>>>16,xt[1]&65535];var St=[0,0,0,0];return St[3]+=_t[3]+xt[3],St[2]+=St[3]>>>16,St[3]&=65535,St[2]+=_t[2]+xt[2],St[1]+=St[2]>>>16,St[2]&=65535,St[1]+=_t[1]+xt[1],St[0]+=St[1]>>>16,St[1]&=65535,St[0]+=_t[0]+xt[0],St[0]&=65535,[St[0]<<16|St[1],St[2]<<16|St[3]]}function dt(_t,xt){_t=[_t[0]>>>16,_t[0]&65535,_t[1]>>>16,_t[1]&65535],xt=[xt[0]>>>16,xt[0]&65535,xt[1]>>>16,xt[1]&65535];var St=[0,0,0,0];return St[3]+=_t[3]*xt[3],St[2]+=St[3]>>>16,St[3]&=65535,St[2]+=_t[2]*xt[3],St[1]+=St[2]>>>16,St[2]&=65535,St[2]+=_t[3]*xt[2],St[1]+=St[2]>>>16,St[2]&=65535,St[1]+=_t[1]*xt[3],St[0]+=St[1]>>>16,St[1]&=65535,St[1]+=_t[2]*xt[2],St[0]+=St[1]>>>16,St[1]&=65535,St[1]+=_t[3]*xt[1],St[0]+=St[1]>>>16,St[1]&=65535,St[0]+=_t[0]*xt[3]+_t[1]*xt[2]+_t[2]*xt[1]+_t[3]*xt[0],St[0]&=65535,[St[0]<<16|St[1],St[2]<<16|St[3]]}function yt(_t,xt){return xt%=64,xt===32?[_t[1],_t[0]]:xt<32?[_t[0]<<xt|_t[1]>>>32-xt,_t[1]<<xt|_t[0]>>>32-xt]:(xt-=32,[_t[1]<<xt|_t[0]>>>32-xt,_t[0]<<xt|_t[1]>>>32-xt])}function bt(_t,xt){return xt%=64,xt===0?_t:xt<32?[_t[0]<<xt|_t[1]>>>32-xt,_t[1]<<xt]:[_t[1]<<xt-32,0]}function Et(_t,xt){return[_t[0]^xt[0],_t[1]^xt[1]]}function $t(_t){return _t=Et(_t,[0,_t[0]>>>1]),_t=dt(_t,[4283543511,3981806797]),_t=Et(_t,[0,_t[0]>>>1]),_t=dt(_t,[3301882366,444984403]),_t=Et(_t,[0,_t[0]>>>1]),_t}_e.x86.hash32=function(_t,xt){if(_e.inputValidation&&!et(_t))return j;xt=xt||0;for(var St=_t.length%4,Mt=_t.length-St,Tt=xt,Rt=0,Ct=3432918353,It=461845907,kt=0;kt<Mt;kt=kt+4)Rt=_t[kt]|_t[kt+1]<<8|_t[kt+2]<<16|_t[kt+3]<<24,Rt=tt(Rt,Ct),Rt=rt(Rt,15),Rt=tt(Rt,It),Tt^=Rt,Tt=rt(Tt,13),Tt=tt(Tt,5)+3864292196;switch(Rt=0,St){case 3:Rt^=_t[kt+2]<<16;case 2:Rt^=_t[kt+1]<<8;case 1:Rt^=_t[kt],Rt=tt(Rt,Ct),Rt=rt(Rt,15),Rt=tt(Rt,It),Tt^=Rt}return Tt^=_t.length,Tt=at(Tt),Tt>>>0},_e.x86.hash128=function(_t,xt){if(_e.inputValidation&&!et(_t))return j;xt=xt||0;for(var St=_t.length%16,Mt=_t.length-St,Tt=xt,Rt=xt,Ct=xt,It=xt,kt=0,Dt=0,Bt=0,zt=0,vt=597399067,nt=2869860233,st=951274213,lt=2716044179,ht=0;ht<Mt;ht=ht+16)kt=_t[ht]|_t[ht+1]<<8|_t[ht+2]<<16|_t[ht+3]<<24,Dt=_t[ht+4]|_t[ht+5]<<8|_t[ht+6]<<16|_t[ht+7]<<24,Bt=_t[ht+8]|_t[ht+9]<<8|_t[ht+10]<<16|_t[ht+11]<<24,zt=_t[ht+12]|_t[ht+13]<<8|_t[ht+14]<<16|_t[ht+15]<<24,kt=tt(kt,vt),kt=rt(kt,15),kt=tt(kt,nt),Tt^=kt,Tt=rt(Tt,19),Tt+=Rt,Tt=tt(Tt,5)+1444728091,Dt=tt(Dt,nt),Dt=rt(Dt,16),Dt=tt(Dt,st),Rt^=Dt,Rt=rt(Rt,17),Rt+=Ct,Rt=tt(Rt,5)+197830471,Bt=tt(Bt,st),Bt=rt(Bt,17),Bt=tt(Bt,lt),Ct^=Bt,Ct=rt(Ct,15),Ct+=It,Ct=tt(Ct,5)+2530024501,zt=tt(zt,lt),zt=rt(zt,18),zt=tt(zt,vt),It^=zt,It=rt(It,13),It+=Tt,It=tt(It,5)+850148119;switch(kt=0,Dt=0,Bt=0,zt=0,St){case 15:zt^=_t[ht+14]<<16;case 14:zt^=_t[ht+13]<<8;case 13:zt^=_t[ht+12],zt=tt(zt,lt),zt=rt(zt,18),zt=tt(zt,vt),It^=zt;case 12:Bt^=_t[ht+11]<<24;case 11:Bt^=_t[ht+10]<<16;case 10:Bt^=_t[ht+9]<<8;case 9:Bt^=_t[ht+8],Bt=tt(Bt,st),Bt=rt(Bt,17),Bt=tt(Bt,lt),Ct^=Bt;case 8:Dt^=_t[ht+7]<<24;case 7:Dt^=_t[ht+6]<<16;case 6:Dt^=_t[ht+5]<<8;case 5:Dt^=_t[ht+4],Dt=tt(Dt,nt),Dt=rt(Dt,16),Dt=tt(Dt,st),Rt^=Dt;case 4:kt^=_t[ht+3]<<24;case 3:kt^=_t[ht+2]<<16;case 2:kt^=_t[ht+1]<<8;case 1:kt^=_t[ht],kt=tt(kt,vt),kt=rt(kt,15),kt=tt(kt,nt),Tt^=kt}return Tt^=_t.length,Rt^=_t.length,Ct^=_t.length,It^=_t.length,Tt+=Rt,Tt+=Ct,Tt+=It,Rt+=Tt,Ct+=Tt,It+=Tt,Tt=at(Tt),Rt=at(Rt),Ct=at(Ct),It=at(It),Tt+=Rt,Tt+=Ct,Tt+=It,Rt+=Tt,Ct+=Tt,It+=Tt,("00000000"+(Tt>>>0).toString(16)).slice(-8)+("00000000"+(Rt>>>0).toString(16)).slice(-8)+("00000000"+(Ct>>>0).toString(16)).slice(-8)+("00000000"+(It>>>0).toString(16)).slice(-8)},_e.x64.hash128=function(_t,xt){if(_e.inputValidation&&!et(_t))return j;xt=xt||0;for(var St=_t.length%16,Mt=_t.length-St,Tt=[0,xt],Rt=[0,xt],Ct=[0,0],It=[0,0],kt=[2277735313,289559509],Dt=[1291169091,658871167],Bt=0;Bt<Mt;Bt=Bt+16)Ct=[_t[Bt+4]|_t[Bt+5]<<8|_t[Bt+6]<<16|_t[Bt+7]<<24,_t[Bt]|_t[Bt+1]<<8|_t[Bt+2]<<16|_t[Bt+3]<<24],It=[_t[Bt+12]|_t[Bt+13]<<8|_t[Bt+14]<<16|_t[Bt+15]<<24,_t[Bt+8]|_t[Bt+9]<<8|_t[Bt+10]<<16|_t[Bt+11]<<24],Ct=dt(Ct,kt),Ct=yt(Ct,31),Ct=dt(Ct,Dt),Tt=Et(Tt,Ct),Tt=yt(Tt,27),Tt=ct(Tt,Rt),Tt=ct(dt(Tt,[0,5]),[0,1390208809]),It=dt(It,Dt),It=yt(It,33),It=dt(It,kt),Rt=Et(Rt,It),Rt=yt(Rt,31),Rt=ct(Rt,Tt),Rt=ct(dt(Rt,[0,5]),[0,944331445]);switch(Ct=[0,0],It=[0,0],St){case 15:It=Et(It,bt([0,_t[Bt+14]],48));case 14:It=Et(It,bt([0,_t[Bt+13]],40));case 13:It=Et(It,bt([0,_t[Bt+12]],32));case 12:It=Et(It,bt([0,_t[Bt+11]],24));case 11:It=Et(It,bt([0,_t[Bt+10]],16));case 10:It=Et(It,bt([0,_t[Bt+9]],8));case 9:It=Et(It,[0,_t[Bt+8]]),It=dt(It,Dt),It=yt(It,33),It=dt(It,kt),Rt=Et(Rt,It);case 8:Ct=Et(Ct,bt([0,_t[Bt+7]],56));case 7:Ct=Et(Ct,bt([0,_t[Bt+6]],48));case 6:Ct=Et(Ct,bt([0,_t[Bt+5]],40));case 5:Ct=Et(Ct,bt([0,_t[Bt+4]],32));case 4:Ct=Et(Ct,bt([0,_t[Bt+3]],24));case 3:Ct=Et(Ct,bt([0,_t[Bt+2]],16));case 2:Ct=Et(Ct,bt([0,_t[Bt+1]],8));case 1:Ct=Et(Ct,[0,_t[Bt]]),Ct=dt(Ct,kt),Ct=yt(Ct,31),Ct=dt(Ct,Dt),Tt=Et(Tt,Ct)}return Tt=Et(Tt,[0,_t.length]),Rt=Et(Rt,[0,_t.length]),Tt=ct(Tt,Rt),Rt=ct(Rt,Tt),Tt=$t(Tt),Rt=$t(Rt),Tt=ct(Tt,Rt),Rt=ct(Rt,Tt),("00000000"+(Tt[0]>>>0).toString(16)).slice(-8)+("00000000"+(Tt[1]>>>0).toString(16)).slice(-8)+("00000000"+(Rt[0]>>>0).toString(16)).slice(-8)+("00000000"+(Rt[1]>>>0).toString(16)).slice(-8)},typeof a<"u"?(typeof _<"u"&&_.exports&&(a=_.exports=_e),a.murmurHash3=_e):(_e._murmurHash3=$.murmurHash3,_e.noConflict=function(){return $.murmurHash3=_e._murmurHash3,_e._murmurHash3=j,_e.noConflict=j,_e},$.murmurHash3=_e)})(a)}}),require_murmurhash3js_revisited=__commonJS({"node_modules/murmurhash3js-revisited/index.js"(a,_){_.exports=require_murmurHash3js()}}),require_sparse_array=__commonJS({"node_modules/sparse-array/index.js"(a,_){var $=7;_.exports=class{constructor(){this._bitArrays=[],this._data=[],this._length=0,this._changedLength=!1,this._changedData=!1}set(at,ct){let dt=this._internalPositionFor(at,!1);if(ct===void 0)dt!==-1&&(this._unsetInternalPos(dt),this._unsetBit(at),this._changedLength=!0,this._changedData=!0);else{let yt=!1;dt===-1?(dt=this._data.length,this._setBit(at),this._changedData=!0):yt=!0,this._setInternalPos(dt,at,ct,yt),this._changedLength=!0}}unset(at){this.set(at,void 0)}get(at){this._sortData();const ct=this._internalPositionFor(at,!0);if(ct!==-1)return this._data[ct][1]}push(at){return this.set(this.length,at),this.length}get length(){if(this._sortData(),this._changedLength){const at=this._data[this._data.length-1];this._length=at?at[0]+1:0,this._changedLength=!1}return this._length}forEach(at){let ct=0;for(;ct<this.length;)at(this.get(ct),ct,this),ct++}map(at){let ct=0,dt=new Array(this.length);for(;ct<this.length;)dt[ct]=at(this.get(ct),ct,this),ct++;return dt}reduce(at,ct){let dt=0,yt=ct;for(;dt<this.length;){const bt=this.get(dt);yt=at(yt,bt,dt),dt++}return yt}find(at){let ct=0,dt,yt;for(;ct<this.length&&!dt;)yt=this.get(ct),dt=at(yt),ct++;return dt?yt:void 0}_internalPositionFor(at,ct){const dt=this._bytePosFor(at,ct);if(dt>=this._bitArrays.length)return-1;const yt=this._bitArrays[dt],bt=at-dt*$;if(!((yt&1<<bt)>0))return-1;const $t=this._bitArrays.slice(0,dt).reduce(j,0),_t=~(4294967295<<bt+1),xt=_e(yt&_t);return $t+xt-1}_bytePosFor(at,ct){const dt=Math.floor(at/$),yt=dt+1;for(;!ct&&this._bitArrays.length<yt;)this._bitArrays.push(0);return dt}_setBit(at){const ct=this._bytePosFor(at,!1);this._bitArrays[ct]|=1<<at-ct*$}_unsetBit(at){const ct=this._bytePosFor(at,!1);this._bitArrays[ct]&=~(1<<at-ct*$)}_setInternalPos(at,ct,dt,yt){const bt=this._data,Et=[ct,dt];if(yt)this._sortData(),bt[at]=Et;else{if(bt.length)if(bt[bt.length-1][0]>=ct)bt.push(Et);else if(bt[0][0]<=ct)bt.unshift(Et);else{const $t=Math.round(bt.length/2);this._data=bt.slice(0,$t).concat(Et).concat(bt.slice($t))}else this._data.push(Et);this._changedData=!0,this._changedLength=!0}}_unsetInternalPos(at){this._data.splice(at,1)}_sortData(){this._changedData&&this._data.sort(et),this._changedData=!1}bitField(){const at=[];let ct=8,dt=0,yt=0,bt;const Et=this._bitArrays.slice();for(;Et.length||dt;){dt===0&&(bt=Et.shift(),dt=7);const _t=Math.min(dt,ct),xt=~(255<<_t),St=bt&xt;yt|=St<<8-ct,bt=bt>>>_t,dt-=_t,ct-=_t,(!ct||!dt&&!Et.length)&&(at.push(yt),yt=0,ct=8)}for(var $t=at.length-1;$t>0&&at[$t]===0;$t--)at.pop();return at}compactArray(){return this._sortData(),this._data.map(tt)}};function j(rt,at){return rt+_e(at)}function _e(rt){let at=rt;return at=at-(at>>1&1431655765),at=(at&858993459)+(at>>2&858993459),(at+(at>>4)&252645135)*16843009>>24}function et(rt,at){return rt[0]-at[0]}function tt(rt){return rt[1]}}}),src_exports2={};__export(src_exports2,{calculateMultipleHashesADR32:()=>calculateMultipleHashesADR32,calculateMultipleHashesADR32LegacyQmHash:()=>calculateMultipleHashesADR32LegacyQmHash,compareStrings:()=>compareStrings,hashV0:()=>hashV0,hashV1:()=>hashV1,keccak256Hash:()=>keccak256Hash,prepareADR32Data:()=>prepareADR32Data,sortKeys:()=>sortKeys}),module.exports=__toCommonJS(src_exports2);var import_crypto3=__toESM(requireCryptoBrowserify(),1),bytes_exports={};__export(bytes_exports,{coerce:()=>coerce,empty:()=>empty,equals:()=>equals,fromHex:()=>fromHex,fromString:()=>fromString,isBinary:()=>isBinary,toHex:()=>toHex,toString:()=>toString});var empty=new Uint8Array(0),toHex=a=>a.reduce((_,$)=>_+$.toString(16).padStart(2,"0"),""),fromHex=a=>{const _=a.match(/../g);return _?new Uint8Array(_.map($=>parseInt($,16))):empty},equals=(a,_)=>{if(a===_)return!0;if(a.byteLength!==_.byteLength)return!1;for(let $=0;$<a.byteLength;$++)if(a[$]!==_[$])return!1;return!0},coerce=a=>{if(a instanceof Uint8Array&&a.constructor.name==="Uint8Array")return a;if(a instanceof ArrayBuffer)return new Uint8Array(a);if(ArrayBuffer.isView(a))return new Uint8Array(a.buffer,a.byteOffset,a.byteLength);throw new Error("Unknown type, must be binary type")},isBinary=a=>a instanceof ArrayBuffer||ArrayBuffer.isView(a),fromString=a=>new TextEncoder().encode(a),toString=a=>new TextDecoder().decode(a),encode_1=encode,MSB=128,REST=127,MSBALL=~REST,INT=Math.pow(2,31);function encode(a,_,$){_=_||[],$=$||0;for(var j=$;a>=INT;)_[$++]=a&255|MSB,a/=128;for(;a&MSBALL;)_[$++]=a&255|MSB,a>>>=7;return _[$]=a|0,encode.bytes=$-j+1,_}var decode=read,MSB$1=128,REST$1=127;function read(a,j){var $=0,j=j||0,_e=0,et=j,tt,rt=a.length;do{if(et>=rt)throw read.bytes=0,new RangeError("Could not decode varint");tt=a[et++],$+=_e<28?(tt&REST$1)<<_e:(tt&REST$1)*Math.pow(2,_e),_e+=7}while(tt>=MSB$1);return read.bytes=et-j,$}var N1=Math.pow(2,7),N2=Math.pow(2,14),N3=Math.pow(2,21),N4=Math.pow(2,28),N5=Math.pow(2,35),N6=Math.pow(2,42),N7=Math.pow(2,49),N8=Math.pow(2,56),N9=Math.pow(2,63),length=function(a){return a<N1?1:a<N2?2:a<N3?3:a<N4?4:a<N5?5:a<N6?6:a<N7?7:a<N8?8:a<N9?9:10},varint={encode:encode_1,decode,encodingLength:length},_brrp_varint=varint,varint_default=_brrp_varint,decode2=(a,_=0)=>[varint_default.decode(a,_),varint_default.decode.bytes],encodeTo=(a,_,$=0)=>(varint_default.encode(a,_,$),_),encodingLength=a=>varint_default.encodingLength(a),create=(a,_)=>{const $=_.byteLength,j=encodingLength(a),_e=j+encodingLength($),et=new Uint8Array(_e+$);return encodeTo(a,et,0),encodeTo($,et,j),et.set(_,_e),new Digest(a,$,_,et)},decode3=a=>{const _=coerce(a),[$,j]=decode2(_),[_e,et]=decode2(_.subarray(j)),tt=_.subarray(j+et);if(tt.byteLength!==_e)throw new Error("Incorrect length");return new Digest($,_e,tt,_)},equals2=(a,_)=>{if(a===_)return!0;{const $=_;return a.code===$.code&&a.size===$.size&&$.bytes instanceof Uint8Array&&equals(a.bytes,$.bytes)}},Digest=class{constructor(a,_,$,j){this.code=a,this.size=_,this.digest=$,this.bytes=j}};function base(a,_){if(a.length>=255)throw new TypeError("Alphabet too long");for(var $=new Uint8Array(256),j=0;j<$.length;j++)$[j]=255;for(var _e=0;_e<a.length;_e++){var et=a.charAt(_e),tt=et.charCodeAt(0);if($[tt]!==255)throw new TypeError(et+" is ambiguous");$[tt]=_e}var rt=a.length,at=a.charAt(0),ct=Math.log(rt)/Math.log(256),dt=Math.log(256)/Math.log(rt);function yt($t){if($t instanceof Uint8Array||(ArrayBuffer.isView($t)?$t=new Uint8Array($t.buffer,$t.byteOffset,$t.byteLength):Array.isArray($t)&&($t=Uint8Array.from($t))),!($t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if($t.length===0)return"";for(var _t=0,xt=0,St=0,Mt=$t.length;St!==Mt&&$t[St]===0;)St++,_t++;for(var Tt=(Mt-St)*dt+1>>>0,Rt=new Uint8Array(Tt);St!==Mt;){for(var Ct=$t[St],It=0,kt=Tt-1;(Ct!==0||It<xt)&&kt!==-1;kt--,It++)Ct+=256*Rt[kt]>>>0,Rt[kt]=Ct%rt>>>0,Ct=Ct/rt>>>0;if(Ct!==0)throw new Error("Non-zero carry");xt=It,St++}for(var Dt=Tt-xt;Dt!==Tt&&Rt[Dt]===0;)Dt++;for(var Bt=at.repeat(_t);Dt<Tt;++Dt)Bt+=a.charAt(Rt[Dt]);return Bt}function bt($t){if(typeof $t!="string")throw new TypeError("Expected String");if($t.length===0)return new Uint8Array;var _t=0;if($t[_t]!==" "){for(var xt=0,St=0;$t[_t]===at;)xt++,_t++;for(var Mt=($t.length-_t)*ct+1>>>0,Tt=new Uint8Array(Mt);$t[_t];){var Rt=$[$t.charCodeAt(_t)];if(Rt===255)return;for(var Ct=0,It=Mt-1;(Rt!==0||Ct<St)&&It!==-1;It--,Ct++)Rt+=rt*Tt[It]>>>0,Tt[It]=Rt%256>>>0,Rt=Rt/256>>>0;if(Rt!==0)throw new Error("Non-zero carry");St=Ct,_t++}if($t[_t]!==" "){for(var kt=Mt-St;kt!==Mt&&Tt[kt]===0;)kt++;for(var Dt=new Uint8Array(xt+(Mt-kt)),Bt=xt;kt!==Mt;)Dt[Bt++]=Tt[kt++];return Dt}}}function Et($t){var _t=bt($t);if(_t)return _t;throw new Error(`Non-${_} character`)}return{encode:yt,decodeUnsafe:bt,decode:Et}}var src=base,_brrp__multiformats_scope_baseX=src,base_x_default=_brrp__multiformats_scope_baseX,Encoder=class{constructor(a,_,$){this.name=a,this.prefix=_,this.baseEncode=$}encode(a){if(a instanceof Uint8Array)return`${this.prefix}${this.baseEncode(a)}`;throw Error("Unknown type, must be binary type")}},Decoder=class{constructor(a,_,$){if(this.name=a,this.prefix=_,_.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=_.codePointAt(0),this.baseDecode=$}decode(a){if(typeof a=="string"){if(a.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(a)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(a.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(a){return or(this,a)}},ComposedDecoder=class{constructor(a){this.decoders=a}or(a){return or(this,a)}decode(a){const _=a[0],$=this.decoders[_];if($)return $.decode(a);throw RangeError(`Unable to decode multibase string ${JSON.stringify(a)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},or=(a,_)=>new ComposedDecoder({...a.decoders||{[a.prefix]:a},..._.decoders||{[_.prefix]:_}}),Codec=class{constructor(a,_,$,j){this.name=a,this.prefix=_,this.baseEncode=$,this.baseDecode=j,this.encoder=new Encoder(a,_,$),this.decoder=new Decoder(a,_,j)}encode(a){return this.encoder.encode(a)}decode(a){return this.decoder.decode(a)}},from=({name:a,prefix:_,encode:$,decode:j})=>new Codec(a,_,$,j),baseX=({prefix:a,name:_,alphabet:$})=>{const{encode:j,decode:_e}=base_x_default($,_);return from({prefix:a,name:_,encode:j,decode:et=>coerce(_e(et))})},decode4=(a,_,$,j)=>{const _e={};for(let dt=0;dt<_.length;++dt)_e[_[dt]]=dt;let et=a.length;for(;a[et-1]==="=";)--et;const tt=new Uint8Array(et*$/8|0);let rt=0,at=0,ct=0;for(let dt=0;dt<et;++dt){const yt=_e[a[dt]];if(yt===void 0)throw new SyntaxError(`Non-${j} character`);at=at<<$|yt,rt+=$,rt>=8&&(rt-=8,tt[ct++]=255&at>>rt)}if(rt>=$||255&at<<8-rt)throw new SyntaxError("Unexpected end of data");return tt},encode2=(a,_,$)=>{const j=_[_.length-1]==="=",_e=(1<<$)-1;let et="",tt=0,rt=0;for(let at=0;at<a.length;++at)for(rt=rt<<8|a[at],tt+=8;tt>$;)tt-=$,et+=_[_e&rt>>tt];if(tt&&(et+=_[_e&rt<<$-tt]),j)for(;et.length*$&7;)et+="=";return et},rfc4648=({name:a,prefix:_,bitsPerChar:$,alphabet:j})=>from({prefix:_,name:a,encode(_e){return encode2(_e,j,$)},decode(_e){return decode4(_e,j,$,a)}}),base58btc=baseX({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"});baseX({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var base32=rfc4648({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5});rfc4648({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),rfc4648({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),rfc4648({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),rfc4648({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),rfc4648({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),rfc4648({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),rfc4648({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),rfc4648({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var format=(a,_)=>{const{bytes:$,version:j}=a;switch(j){case 0:return toStringV0($,baseCache(a),_||base58btc.encoder);default:return toStringV1($,baseCache(a),_||base32.encoder)}},cache=new WeakMap,baseCache=a=>{const _=cache.get(a);if(_==null){const $=new Map;return cache.set(a,$),$}return _},CID=class vo{constructor(_,$,j,_e){this.code=$,this.version=_,this.multihash=j,this.bytes=_e,this["/"]=_e}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{const{code:_,multihash:$}=this;if(_!==DAG_PB_CODE)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if($.code!==SHA_256_CODE)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return vo.createV0($)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{const{code:_,digest:$}=this.multihash,j=create(_,$);return vo.createV1(this.code,j)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(_){return vo.equals(this,_)}static equals(_,$){const j=$;return j&&_.code===j.code&&_.version===j.version&&equals2(_.multihash,j.multihash)}toString(_){return format(this,_)}toJSON(){return{"/":format(this)}}link(){return this}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(_){if(_==null)return null;const $=_;if($ instanceof vo)return $;if($["/"]!=null&&$["/"]===$.bytes||$.asCID===$){const{version:j,code:_e,multihash:et,bytes:tt}=$;return new vo(j,_e,et,tt||encodeCID(j,_e,et.bytes))}else if($[cidSymbol]===!0){const{version:j,multihash:_e,code:et}=$,tt=decode3(_e);return vo.create(j,et,tt)}else return null}static create(_,$,j){if(typeof $!="number")throw new Error("String codecs are no longer supported");if(!(j.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(_){case 0:{if($!==DAG_PB_CODE)throw new Error(`Version 0 CID must use dag-pb (code: ${DAG_PB_CODE}) block encoding`);return new vo(_,$,j,j.bytes)}case 1:{const _e=encodeCID(_,$,j.bytes);return new vo(_,$,j,_e)}default:throw new Error("Invalid version")}}static createV0(_){return vo.create(0,DAG_PB_CODE,_)}static createV1(_,$){return vo.create(1,_,$)}static decode(_){const[$,j]=vo.decodeFirst(_);if(j.length)throw new Error("Incorrect length");return $}static decodeFirst(_){const $=vo.inspectBytes(_),j=$.size-$.multihashSize,_e=coerce(_.subarray(j,j+$.multihashSize));if(_e.byteLength!==$.multihashSize)throw new Error("Incorrect length");const et=_e.subarray($.multihashSize-$.digestSize),tt=new Digest($.multihashCode,$.digestSize,et,_e);return[$.version===0?vo.createV0(tt):vo.createV1($.codec,tt),_.subarray($.size)]}static inspectBytes(_){let $=0;const j=()=>{const[yt,bt]=decode2(_.subarray($));return $+=bt,yt};let _e=j(),et=DAG_PB_CODE;if(_e===18?(_e=0,$=0):et=j(),_e!==0&&_e!==1)throw new RangeError(`Invalid CID version ${_e}`);const tt=$,rt=j(),at=j(),ct=$+at,dt=ct-tt;return{version:_e,codec:et,multihashCode:rt,digestSize:at,multihashSize:dt,size:ct}}static parse(_,$){const[j,_e]=parseCIDtoBytes(_,$),et=vo.decode(_e);if(et.version===0&&_[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return baseCache(et).set(j,_),et}},parseCIDtoBytes=(a,_)=>{switch(a[0]){case"Q":{const $=_||base58btc;return[base58btc.prefix,$.decode(`${base58btc.prefix}${a}`)]}case base58btc.prefix:{const $=_||base58btc;return[base58btc.prefix,$.decode(a)]}case base32.prefix:{const $=_||base32;return[base32.prefix,$.decode(a)]}default:{if(_==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[a[0],_.decode(a)]}}},toStringV0=(a,_,$)=>{const{prefix:j}=$;if(j!==base58btc.prefix)throw Error(`Cannot string encode V0 in ${$.name} encoding`);const _e=_.get(j);if(_e==null){const et=$.encode(a).slice(1);return _.set(j,et),et}else return _e},toStringV1=(a,_,$)=>{const{prefix:j}=$,_e=_.get(j);if(_e==null){const et=$.encode(a);return _.set(j,et),et}else return _e},DAG_PB_CODE=112,SHA_256_CODE=18,encodeCID=(a,_,$)=>{const j=encodingLength(a),_e=j+encodingLength(_),et=new Uint8Array(_e+$.byteLength);return encodeTo(a,et,0),encodeTo(_,et,j),et.set($,_e),et},cidSymbol=Symbol.for("@ipld/js-cid/CID");__toESM(require_err_code(),1);function isAsyncIterable(a){return a[Symbol.asyncIterator]!=null}function batch(a,_=1){return _=Number(_),isAsyncIterable(a)?async function*(){let $=[];if(_<1&&(_=1),_!==Math.round(_))throw new Error("Batch size must be an integer");for await(const j of a)for($.push(j);$.length>=_;)yield $.slice(0,_),$=$.slice(_);for(;$.length>0;)yield $.slice(0,_),$=$.slice(_)}():function*(){let $=[];if(_<1&&(_=1),_!==Math.round(_))throw new Error("Batch size must be an integer");for(const j of a)for($.push(j);$.length>=_;)yield $.slice(0,_),$=$.slice(_);for(;$.length>0;)yield $.slice(0,_),$=$.slice(_)}()}var src_default=batch;async function*parallelBatch(a,_=1){for await(const $ of src_default(a,_)){const j=$.map(async _e=>_e().then(et=>({ok:!0,value:et}),et=>({ok:!1,err:et})));for(let _e=0;_e<j.length;_e++){const et=await j[_e];if(et.ok)yield et.value;else throw et.err}}}function asUint8Array(a){return globalThis.Buffer!=null?new Uint8Array(a.buffer,a.byteOffset,a.byteLength):a}function alloc(a=0){var _;return((_=globalThis.Buffer)==null?void 0:_.alloc)!=null?asUint8Array(globalThis.Buffer.alloc(a)):new Uint8Array(a)}function allocUnsafe(a=0){var _;return((_=globalThis.Buffer)==null?void 0:_.allocUnsafe)!=null?asUint8Array(globalThis.Buffer.allocUnsafe(a)):new Uint8Array(a)}function concat(a,_){_==null&&(_=a.reduce((_e,et)=>_e+et.length,0));const $=allocUnsafe(_);let j=0;for(const _e of a)$.set(_e,j),j+=_e.length;return asUint8Array($)}function equals3(a,_){if(a===_)return!0;if(a.byteLength!==_.byteLength)return!1;for(let $=0;$<a.byteLength;$++)if(a[$]!==_[$])return!1;return!0}var symbol=Symbol.for("@achingbrain/uint8arraylist");function findBufAndOffset(a,_){if(_==null||_<0)throw new RangeError("index is out of bounds");let $=0;for(const j of a){const _e=$+j.byteLength;if(_<_e)return{buf:j,index:_-$};$=_e}throw new RangeError("index is out of bounds")}function isUint8ArrayList(a){return!!(a!=null&&a[symbol])}var Uint8ArrayList=class qp{constructor(..._){Object.defineProperty(this,symbol,{value:!0}),this.bufs=[],this.length=0,_.length>0&&this.appendAll(_)}*[Symbol.iterator](){yield*this.bufs}get byteLength(){return this.length}append(..._){this.appendAll(_)}appendAll(_){let $=0;for(const j of _)if(j instanceof Uint8Array)$+=j.byteLength,this.bufs.push(j);else if(isUint8ArrayList(j))$+=j.byteLength,this.bufs.push(...j.bufs);else throw new Error("Could not append value, must be an Uint8Array or a Uint8ArrayList");this.length+=$}prepend(..._){this.prependAll(_)}prependAll(_){let $=0;for(const j of _.reverse())if(j instanceof Uint8Array)$+=j.byteLength,this.bufs.unshift(j);else if(isUint8ArrayList(j))$+=j.byteLength,this.bufs.unshift(...j.bufs);else throw new Error("Could not prepend value, must be an Uint8Array or a Uint8ArrayList");this.length+=$}get(_){const $=findBufAndOffset(this.bufs,_);return $.buf[$.index]}set(_,$){const j=findBufAndOffset(this.bufs,_);j.buf[j.index]=$}write(_,$=0){if(_ instanceof Uint8Array)for(let j=0;j<_.length;j++)this.set($+j,_[j]);else if(isUint8ArrayList(_))for(let j=0;j<_.length;j++)this.set($+j,_.get(j));else throw new Error("Could not write value, must be an Uint8Array or a Uint8ArrayList")}consume(_){if(_=Math.trunc(_),!(Number.isNaN(_)||_<=0)){if(_===this.byteLength){this.bufs=[],this.length=0;return}for(;this.bufs.length>0;)if(_>=this.bufs[0].byteLength)_-=this.bufs[0].byteLength,this.length-=this.bufs[0].byteLength,this.bufs.shift();else{this.bufs[0]=this.bufs[0].subarray(_),this.length-=_;break}}}slice(_,$){const{bufs:j,length:_e}=this._subList(_,$);return concat(j,_e)}subarray(_,$){const{bufs:j,length:_e}=this._subList(_,$);return j.length===1?j[0]:concat(j,_e)}sublist(_,$){const{bufs:j,length:_e}=this._subList(_,$),et=new qp;return et.length=_e,et.bufs=j,et}_subList(_,$){if(_=_??0,$=$??this.length,_<0&&(_=this.length+_),$<0&&($=this.length+$),_<0||$>this.length)throw new RangeError("index is out of bounds");if(_===$)return{bufs:[],length:0};if(_===0&&$===this.length)return{bufs:[...this.bufs],length:this.length};const j=[];let _e=0;for(let et=0;et<this.bufs.length;et++){const tt=this.bufs[et],rt=_e,at=rt+tt.byteLength;if(_e=at,_>=at)continue;const ct=_>=rt&&_<at,dt=$>rt&&$<=at;if(ct&&dt){if(_===rt&&$===at){j.push(tt);break}const yt=_-rt;j.push(tt.subarray(yt,yt+($-_)));break}if(ct){if(_===0){j.push(tt);continue}j.push(tt.subarray(_-rt));continue}if(dt){if($===at){j.push(tt);break}j.push(tt.subarray(0,$-rt));break}j.push(tt)}return{bufs:j,length:$-_}}indexOf(_,$=0){if(!isUint8ArrayList(_)&&!(_ instanceof Uint8Array))throw new TypeError('The "value" argument must be a Uint8ArrayList or Uint8Array');const j=_ instanceof Uint8Array?_:_.subarray();if($=Number($??0),isNaN($)&&($=0),$<0&&($=this.length+$),$<0&&($=0),_.length===0)return $>this.length?this.length:$;const _e=j.byteLength;if(_e===0)throw new TypeError("search must be at least 1 byte long");const et=256,tt=new Int32Array(et);for(let yt=0;yt<et;yt++)tt[yt]=-1;for(let yt=0;yt<_e;yt++)tt[j[yt]]=yt;const rt=tt,at=this.byteLength-j.byteLength,ct=j.byteLength-1;let dt;for(let yt=$;yt<=at;yt+=dt){dt=0;for(let bt=ct;bt>=0;bt--){const Et=this.get(yt+bt);if(j[bt]!==Et){dt=Math.max(1,bt-rt[Et]);break}}if(dt===0)return yt}return-1}getInt8(_){const $=this.subarray(_,_+1);return new DataView($.buffer,$.byteOffset,$.byteLength).getInt8(0)}setInt8(_,$){const j=allocUnsafe(1);new DataView(j.buffer,j.byteOffset,j.byteLength).setInt8(0,$),this.write(j,_)}getInt16(_,$){const j=this.subarray(_,_+2);return new DataView(j.buffer,j.byteOffset,j.byteLength).getInt16(0,$)}setInt16(_,$,j){const _e=alloc(2);new DataView(_e.buffer,_e.byteOffset,_e.byteLength).setInt16(0,$,j),this.write(_e,_)}getInt32(_,$){const j=this.subarray(_,_+4);return new DataView(j.buffer,j.byteOffset,j.byteLength).getInt32(0,$)}setInt32(_,$,j){const _e=alloc(4);new DataView(_e.buffer,_e.byteOffset,_e.byteLength).setInt32(0,$,j),this.write(_e,_)}getBigInt64(_,$){const j=this.subarray(_,_+8);return new DataView(j.buffer,j.byteOffset,j.byteLength).getBigInt64(0,$)}setBigInt64(_,$,j){const _e=alloc(8);new DataView(_e.buffer,_e.byteOffset,_e.byteLength).setBigInt64(0,$,j),this.write(_e,_)}getUint8(_){const $=this.subarray(_,_+1);return new DataView($.buffer,$.byteOffset,$.byteLength).getUint8(0)}setUint8(_,$){const j=allocUnsafe(1);new DataView(j.buffer,j.byteOffset,j.byteLength).setUint8(0,$),this.write(j,_)}getUint16(_,$){const j=this.subarray(_,_+2);return new DataView(j.buffer,j.byteOffset,j.byteLength).getUint16(0,$)}setUint16(_,$,j){const _e=alloc(2);new DataView(_e.buffer,_e.byteOffset,_e.byteLength).setUint16(0,$,j),this.write(_e,_)}getUint32(_,$){const j=this.subarray(_,_+4);return new DataView(j.buffer,j.byteOffset,j.byteLength).getUint32(0,$)}setUint32(_,$,j){const _e=alloc(4);new DataView(_e.buffer,_e.byteOffset,_e.byteLength).setUint32(0,$,j),this.write(_e,_)}getBigUint64(_,$){const j=this.subarray(_,_+8);return new DataView(j.buffer,j.byteOffset,j.byteLength).getBigUint64(0,$)}setBigUint64(_,$,j){const _e=alloc(8);new DataView(_e.buffer,_e.byteOffset,_e.byteLength).setBigUint64(0,$,j),this.write(_e,_)}getFloat32(_,$){const j=this.subarray(_,_+4);return new DataView(j.buffer,j.byteOffset,j.byteLength).getFloat32(0,$)}setFloat32(_,$,j){const _e=alloc(4);new DataView(_e.buffer,_e.byteOffset,_e.byteLength).setFloat32(0,$,j),this.write(_e,_)}getFloat64(_,$){const j=this.subarray(_,_+8);return new DataView(j.buffer,j.byteOffset,j.byteLength).getFloat64(0,$)}setFloat64(_,$,j){const _e=alloc(8);new DataView(_e.buffer,_e.byteOffset,_e.byteLength).setFloat64(0,$,j),this.write(_e,_)}equals(_){if(_==null||!(_ instanceof qp)||_.bufs.length!==this.bufs.length)return!1;for(let $=0;$<this.bufs.length;$++)if(!equals3(this.bufs[$],_.bufs[$]))return!1;return!0}static fromUint8Arrays(_,$){const j=new qp;return j.bufs=_,$==null&&($=_.reduce((_e,et)=>_e+et.byteLength,0)),j.length=$,j}},DEFAULT_CHUNK_SIZE=262144,fixedSize=(a={})=>{const _=a.chunkSize??DEFAULT_CHUNK_SIZE;return async function*(j){let _e=new Uint8ArrayList,et=0,tt=!1;for await(const rt of j)for(_e.append(rt),et+=rt.length;et>=_;)if(yield _e.slice(0,_),tt=!0,_===_e.length)_e=new Uint8ArrayList,et=0;else{const at=new Uint8ArrayList;at.append(_e.sublist(_)),_e=at,et-=_}(!tt||et>0)&&(yield _e.subarray(0,et))}},src_exports={};__export(src_exports,{code:()=>code,createLink:()=>createLink,createNode:()=>createNode,decode:()=>decode5,encode:()=>encode3,name:()=>name,prepare:()=>prepare,validate:()=>validate});var textDecoder=new TextDecoder;function decodeVarint(a,_){let $=0;for(let j=0;;j+=7){if(j>=64)throw new Error("protobuf: varint overflow");if(_>=a.length)throw new Error("protobuf: unexpected end of data");const _e=a[_++];if($+=j<28?(_e&127)<<j:(_e&127)*2**j,_e<128)break}return[$,_]}function decodeBytes(a,_){let $;[$,_]=decodeVarint(a,_);const j=_+$;if($<0||j<0)throw new Error("protobuf: invalid length");if(j>a.length)throw new Error("protobuf: unexpected end of data");return[a.subarray(_,j),j]}function decodeKey(a,_){let $;return[$,_]=decodeVarint(a,_),[$&7,$>>3,_]}function decodeLink(a){const _={},$=a.length;let j=0;for(;j<$;){let _e,et;if([_e,et,j]=decodeKey(a,j),et===1){if(_.Hash)throw new Error("protobuf: (PBLink) duplicate Hash section");if(_e!==2)throw new Error(`protobuf: (PBLink) wrong wireType (${_e}) for Hash`);if(_.Name!==void 0)throw new Error("protobuf: (PBLink) invalid order, found Name before Hash");if(_.Tsize!==void 0)throw new Error("protobuf: (PBLink) invalid order, found Tsize before Hash");[_.Hash,j]=decodeBytes(a,j)}else if(et===2){if(_.Name!==void 0)throw new Error("protobuf: (PBLink) duplicate Name section");if(_e!==2)throw new Error(`protobuf: (PBLink) wrong wireType (${_e}) for Name`);if(_.Tsize!==void 0)throw new Error("protobuf: (PBLink) invalid order, found Tsize before Name");let tt;[tt,j]=decodeBytes(a,j),_.Name=textDecoder.decode(tt)}else if(et===3){if(_.Tsize!==void 0)throw new Error("protobuf: (PBLink) duplicate Tsize section");if(_e!==0)throw new Error(`protobuf: (PBLink) wrong wireType (${_e}) for Tsize`);[_.Tsize,j]=decodeVarint(a,j)}else throw new Error(`protobuf: (PBLink) invalid fieldNumber, expected 1, 2 or 3, got ${et}`)}if(j>$)throw new Error("protobuf: (PBLink) unexpected end of data");return _}function decodeNode(a){const _=a.length;let $=0,j,_e=!1,et;for(;$<_;){let rt,at;if([rt,at,$]=decodeKey(a,$),rt!==2)throw new Error(`protobuf: (PBNode) invalid wireType, expected 2, got ${rt}`);if(at===1){if(et)throw new Error("protobuf: (PBNode) duplicate Data section");[et,$]=decodeBytes(a,$),j&&(_e=!0)}else if(at===2){if(_e)throw new Error("protobuf: (PBNode) duplicate Links section");j||(j=[]);let ct;[ct,$]=decodeBytes(a,$),j.push(decodeLink(ct))}else throw new Error(`protobuf: (PBNode) invalid fieldNumber, expected 1 or 2, got ${at}`)}if($>_)throw new Error("protobuf: (PBNode) unexpected end of data");const tt={};return et&&(tt.Data=et),tt.Links=j||[],tt}var textEncoder=new TextEncoder,maxInt32=2**32,maxUInt32=2**31;function encodeLink(a,_){let $=_.length;if(typeof a.Tsize=="number"){if(a.Tsize<0)throw new Error("Tsize cannot be negative");if(!Number.isSafeInteger(a.Tsize))throw new Error("Tsize too large for encoding");$=encodeVarint(_,$,a.Tsize)-1,_[$]=24}if(typeof a.Name=="string"){const j=textEncoder.encode(a.Name);$-=j.length,_.set(j,$),$=encodeVarint(_,$,j.length)-1,_[$]=18}return a.Hash&&($-=a.Hash.length,_.set(a.Hash,$),$=encodeVarint(_,$,a.Hash.length)-1,_[$]=10),_.length-$}function encodeNode(a){const _=sizeNode(a),$=new Uint8Array(_);let j=_;if(a.Data&&(j-=a.Data.length,$.set(a.Data,j),j=encodeVarint($,j,a.Data.length)-1,$[j]=10),a.Links)for(let _e=a.Links.length-1;_e>=0;_e--){const et=encodeLink(a.Links[_e],$.subarray(0,j));j-=et,j=encodeVarint($,j,et)-1,$[j]=18}return $}function sizeLink(a){let _=0;if(a.Hash){const $=a.Hash.length;_+=1+$+sov($)}if(typeof a.Name=="string"){const $=textEncoder.encode(a.Name).length;_+=1+$+sov($)}return typeof a.Tsize=="number"&&(_+=1+sov(a.Tsize)),_}function sizeNode(a){let _=0;if(a.Data){const $=a.Data.length;_+=1+$+sov($)}if(a.Links)for(const $ of a.Links){const j=sizeLink($);_+=1+j+sov(j)}return _}function encodeVarint(a,_,$){_-=sov($);const j=_;for(;$>=maxUInt32;)a[_++]=$&127|128,$/=128;for(;$>=128;)a[_++]=$&127|128,$>>>=7;return a[_]=$,j}function sov(a){return a%2===0&&a++,Math.floor((len64(a)+6)/7)}function len64(a){let _=0;return a>=maxInt32&&(a=Math.floor(a/maxInt32),_=32),a>=65536&&(a>>>=16,_+=16),a>=256&&(a>>>=8,_+=8),_+len8tab[a]}var len8tab=[0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8],pbNodeProperties=["Data","Links"],pbLinkProperties=["Hash","Name","Tsize"],textEncoder2=new TextEncoder;function linkComparator(a,_){if(a===_)return 0;const $=a.Name?textEncoder2.encode(a.Name):[],j=_.Name?textEncoder2.encode(_.Name):[];let _e=$.length,et=j.length;for(let tt=0,rt=Math.min(_e,et);tt<rt;++tt)if($[tt]!==j[tt]){_e=$[tt],et=j[tt];break}return _e<et?-1:et<_e?1:0}function hasOnlyProperties(a,_){return!Object.keys(a).some($=>!_.includes($))}function asLink(a){if(typeof a.asCID=="object"){const $=CID.asCID(a);if(!$)throw new TypeError("Invalid DAG-PB form");return{Hash:$}}if(typeof a!="object"||Array.isArray(a))throw new TypeError("Invalid DAG-PB form");const _={};if(a.Hash){let $=CID.asCID(a.Hash);try{$||(typeof a.Hash=="string"?$=CID.parse(a.Hash):a.Hash instanceof Uint8Array&&($=CID.decode(a.Hash)))}catch(j){throw new TypeError(`Invalid DAG-PB form: ${j.message}`)}$&&(_.Hash=$)}if(!_.Hash)throw new TypeError("Invalid DAG-PB form");return typeof a.Name=="string"&&(_.Name=a.Name),typeof a.Tsize=="number"&&(_.Tsize=a.Tsize),_}function prepare(a){if((a instanceof Uint8Array||typeof a=="string")&&(a={Data:a}),typeof a!="object"||Array.isArray(a))throw new TypeError("Invalid DAG-PB form");const _={};if(a.Data!==void 0)if(typeof a.Data=="string")_.Data=textEncoder2.encode(a.Data);else if(a.Data instanceof Uint8Array)_.Data=a.Data;else throw new TypeError("Invalid DAG-PB form");if(a.Links!==void 0)if(Array.isArray(a.Links))_.Links=a.Links.map(asLink),_.Links.sort(linkComparator);else throw new TypeError("Invalid DAG-PB form");else _.Links=[];return _}function validate(a){if(!a||typeof a!="object"||Array.isArray(a)||a instanceof Uint8Array||a["/"]&&a["/"]===a.bytes)throw new TypeError("Invalid DAG-PB form");if(!hasOnlyProperties(a,pbNodeProperties))throw new TypeError("Invalid DAG-PB form (extraneous properties)");if(a.Data!==void 0&&!(a.Data instanceof Uint8Array))throw new TypeError("Invalid DAG-PB form (Data must be bytes)");if(!Array.isArray(a.Links))throw new TypeError("Invalid DAG-PB form (Links must be a list)");for(let _=0;_<a.Links.length;_++){const $=a.Links[_];if(!$||typeof $!="object"||Array.isArray($)||$ instanceof Uint8Array||$["/"]&&$["/"]===$.bytes)throw new TypeError("Invalid DAG-PB form (bad link)");if(!hasOnlyProperties($,pbLinkProperties))throw new TypeError("Invalid DAG-PB form (extraneous properties on link)");if($.Hash===void 0)throw new TypeError("Invalid DAG-PB form (link must have a Hash)");if($.Hash==null||!$.Hash["/"]||$.Hash["/"]!==$.Hash.bytes)throw new TypeError("Invalid DAG-PB form (link Hash must be a CID)");if($.Name!==void 0&&typeof $.Name!="string")throw new TypeError("Invalid DAG-PB form (link Name must be a string)");if($.Tsize!==void 0){if(typeof $.Tsize!="number"||$.Tsize%1!==0)throw new TypeError("Invalid DAG-PB form (link Tsize must be an integer)");if($.Tsize<0)throw new TypeError("Invalid DAG-PB form (link Tsize cannot be negative)")}if(_>0&&linkComparator($,a.Links[_-1])===-1)throw new TypeError("Invalid DAG-PB form (links must be sorted by Name bytes)")}}function createNode(a,_=[]){return prepare({Data:a,Links:_})}function createLink(a,_,$){return asLink({Hash:$,Name:a,Tsize:_})}var name="dag-pb",code=112;function encode3(a){validate(a);const _={};return a.Links&&(_.Links=a.Links.map($=>{const j={};return $.Hash&&(j.Hash=$.Hash.bytes),$.Name!==void 0&&(j.Name=$.Name),$.Tsize!==void 0&&(j.Tsize=$.Tsize),j})),a.Data&&(_.Data=a.Data),encodeNode(_)}function decode5(a){const _=decodeNode(a),$={};return _.Data&&($.Data=_.Data),_.Links&&($.Links=_.Links.map(j=>{const _e={};try{_e.Hash=CID.decode(j.Hash)}catch{}if(!_e.Hash)throw new Error("Invalid Hash field found in link, expected CID");return j.Name!==void 0&&(_e.Name=j.Name),j.Tsize!==void 0&&(_e.Tsize=j.Tsize),_e})),$}var import_err_code=__toESM(require_err_code(),1),import_reader=__toESM(require_reader(),1),import_reader_buffer=__toESM(require_reader_buffer(),1),import_minimal=__toESM(require_minimal(),1),import_writer=__toESM(require_writer(),1),import_writer_buffer=__toESM(require_writer_buffer(),1);function configure(){import_minimal.default._configure(),import_reader.default._configure(import_reader_buffer.default),import_writer.default._configure(import_writer_buffer.default)}configure();var methods=["uint64","int64","sint64","fixed64","sfixed64"];function patchReader(a){for(const _ of methods){if(a[_]==null)continue;const $=a[_];a[_]=function(){return BigInt($.call(this).toString())}}return a}function reader(a){return patchReader(new import_reader.default(a))}function patchWriter(a){for(const _ of methods){if(a[_]==null)continue;const $=a[_];a[_]=function(j){return $.call(this,j.toString())}}return a}function writer(){return patchWriter(import_writer.default.create())}function decodeMessage(a,_){const $=reader(a instanceof Uint8Array?a:a.subarray());return _.decode($)}function encodeMessage(a,_){const $=writer();return _.encode(a,$,{lengthDelimited:!1}),$.finish()}var CODEC_TYPES;(function(a){a[a.VARINT=0]="VARINT",a[a.BIT64=1]="BIT64",a[a.LENGTH_DELIMITED=2]="LENGTH_DELIMITED",a[a.START_GROUP=3]="START_GROUP",a[a.END_GROUP=4]="END_GROUP",a[a.BIT32=5]="BIT32"})(CODEC_TYPES||(CODEC_TYPES={}));function createCodec(a,_,$,j){return{name:a,type:_,encode:$,decode:j}}function enumeration(a){function _(_e){if(a[_e.toString()]==null)throw new Error("Invalid enum value");return a[_e]}const $=function(et,tt){const rt=_(et);tt.int32(rt)},j=function(et){const tt=et.int32();return _(tt)};return createCodec("enum",CODEC_TYPES.VARINT,$,j)}function message(a,_){return createCodec("message",CODEC_TYPES.LENGTH_DELIMITED,a,_)}var Data;(function(a){(function(j){j.Raw="Raw",j.Directory="Directory",j.File="File",j.Metadata="Metadata",j.Symlink="Symlink",j.HAMTShard="HAMTShard"})(a.DataType||(a.DataType={}));let _;(function(j){j[j.Raw=0]="Raw",j[j.Directory=1]="Directory",j[j.File=2]="File",j[j.Metadata=3]="Metadata",j[j.Symlink=4]="Symlink",j[j.HAMTShard=5]="HAMTShard"})(_||(_={})),function(j){j.codec=()=>enumeration(_)}(a.DataType||(a.DataType={}));let $;a.codec=()=>($==null&&($=message((j,_e,et={})=>{if(et.lengthDelimited!==!1&&_e.fork(),j.Type!=null&&(_e.uint32(8),a.DataType.codec().encode(j.Type,_e)),j.Data!=null&&(_e.uint32(18),_e.bytes(j.Data)),j.filesize!=null&&(_e.uint32(24),_e.uint64(j.filesize)),j.blocksizes!=null)for(const tt of j.blocksizes)_e.uint32(32),_e.uint64(tt);j.hashType!=null&&(_e.uint32(40),_e.uint64(j.hashType)),j.fanout!=null&&(_e.uint32(48),_e.uint64(j.fanout)),j.mode!=null&&(_e.uint32(56),_e.uint32(j.mode)),j.mtime!=null&&(_e.uint32(66),UnixTime.codec().encode(j.mtime,_e)),et.lengthDelimited!==!1&&_e.ldelim()},(j,_e)=>{const et={blocksizes:[]},tt=_e==null?j.len:j.pos+_e;for(;j.pos<tt;){const rt=j.uint32();switch(rt>>>3){case 1:et.Type=a.DataType.codec().decode(j);break;case 2:et.Data=j.bytes();break;case 3:et.filesize=j.uint64();break;case 4:et.blocksizes.push(j.uint64());break;case 5:et.hashType=j.uint64();break;case 6:et.fanout=j.uint64();break;case 7:et.mode=j.uint32();break;case 8:et.mtime=UnixTime.codec().decode(j,j.uint32());break;default:j.skipType(rt&7);break}}return et})),$),a.encode=j=>encodeMessage(j,a.codec()),a.decode=j=>decodeMessage(j,a.codec())})(Data||(Data={}));var UnixTime;(function(a){let _;a.codec=()=>(_==null&&(_=message(($,j,_e={})=>{_e.lengthDelimited!==!1&&j.fork(),$.Seconds!=null&&(j.uint32(8),j.int64($.Seconds)),$.FractionalNanoseconds!=null&&(j.uint32(21),j.fixed32($.FractionalNanoseconds)),_e.lengthDelimited!==!1&&j.ldelim()},($,j)=>{const _e={},et=j==null?$.len:$.pos+j;for(;$.pos<et;){const tt=$.uint32();switch(tt>>>3){case 1:_e.Seconds=$.int64();break;case 2:_e.FractionalNanoseconds=$.fixed32();break;default:$.skipType(tt&7);break}}return _e})),_),a.encode=$=>encodeMessage($,a.codec()),a.decode=$=>decodeMessage($,a.codec())})(UnixTime||(UnixTime={}));var Metadata;(function(a){let _;a.codec=()=>(_==null&&(_=message(($,j,_e={})=>{_e.lengthDelimited!==!1&&j.fork(),$.MimeType!=null&&(j.uint32(10),j.string($.MimeType)),_e.lengthDelimited!==!1&&j.ldelim()},($,j)=>{const _e={},et=j==null?$.len:$.pos+j;for(;$.pos<et;){const tt=$.uint32();switch(tt>>>3){case 1:_e.MimeType=$.string();break;default:$.skipType(tt&7);break}}return _e})),_),a.encode=$=>encodeMessage($,a.codec()),a.decode=$=>decodeMessage($,a.codec())})(Metadata||(Metadata={}));var types={Raw:"raw",Directory:"directory",File:"file",Metadata:"metadata",Symlink:"symlink",HAMTShard:"hamt-sharded-directory"},dirTypes=["directory","hamt-sharded-directory"],DEFAULT_FILE_MODE=parseInt("0644",8),DEFAULT_DIRECTORY_MODE=parseInt("0755",8),UnixFS=class A0{constructor(_={type:"file"}){Dr(this,"type");Dr(this,"data");Dr(this,"blockSizes");Dr(this,"hashType");Dr(this,"fanout");Dr(this,"mtime");Dr(this,"_mode");Dr(this,"_originalMode");const{type:$,data:j,blockSizes:_e,hashType:et,fanout:tt,mtime:rt,mode:at}=_;if($!=null&&!Object.values(types).includes($))throw(0,import_err_code.default)(new Error("Type: "+$+" is not valid"),"ERR_INVALID_TYPE");this.type=$??"file",this.data=j,this.hashType=et,this.fanout=tt,this.blockSizes=_e??[],this._originalMode=0,this.mode=at,this.mtime=rt}static unmarshal(_){const $=Data.decode(_),j=new A0({type:types[$.Type!=null?$.Type.toString():"File"],data:$.Data,blockSizes:$.blocksizes,mode:$.mode,mtime:$.mtime!=null?{secs:$.mtime.Seconds??0n,nsecs:$.mtime.FractionalNanoseconds}:void 0});return j._originalMode=$.mode??0,j}set mode(_){_==null?this._mode=this.isDirectory()?DEFAULT_DIRECTORY_MODE:DEFAULT_FILE_MODE:this._mode=_&4095}get mode(){return this._mode}isDirectory(){return dirTypes.includes(this.type)}addBlockSize(_){this.blockSizes.push(_)}removeBlockSize(_){this.blockSizes.splice(_,1)}fileSize(){if(this.isDirectory())return 0n;let _=0n;return this.blockSizes.forEach($=>{_+=$}),this.data!=null&&(_+=BigInt(this.data.length)),_}marshal(){let _;switch(this.type){case"raw":_=Data.DataType.Raw;break;case"directory":_=Data.DataType.Directory;break;case"file":_=Data.DataType.File;break;case"metadata":_=Data.DataType.Metadata;break;case"symlink":_=Data.DataType.Symlink;break;case"hamt-sharded-directory":_=Data.DataType.HAMTShard;break;default:throw(0,import_err_code.default)(new Error(`Type: ${_} is not valid`),"ERR_INVALID_TYPE")}let $=this.data;(this.data==null||this.data.length===0)&&($=void 0);let j;this.mode!=null&&(j=this._originalMode&4294963200|(this.mode??0),j===DEFAULT_FILE_MODE&&!this.isDirectory()&&(j=void 0),j===DEFAULT_DIRECTORY_MODE&&this.isDirectory()&&(j=void 0));let _e;return this.mtime!=null&&(_e={Seconds:this.mtime.secs,FractionalNanoseconds:this.mtime.nsecs}),Data.encode({Type:_,Data:$,filesize:this.isDirectory()?void 0:this.fileSize(),blocksizes:this.blockSizes,hashType:this.hashType,fanout:this.fanout,mode:j,mtime:_e})}},raw_exports={};__export(raw_exports,{code:()=>code2,decode:()=>decode6,encode:()=>encode4,name:()=>name2});var equals4=(a,_)=>{if(a===_)return!0;if(a.byteLength!==_.byteLength)return!1;for(let $=0;$<a.byteLength;$++)if(a[$]!==_[$])return!1;return!0},coerce2=a=>{if(a instanceof Uint8Array&&a.constructor.name==="Uint8Array")return a;if(a instanceof ArrayBuffer)return new Uint8Array(a);if(ArrayBuffer.isView(a))return new Uint8Array(a.buffer,a.byteOffset,a.byteLength);throw new Error("Unknown type, must be binary type")},name2="raw",code2=85,encode4=a=>coerce2(a),decode6=a=>coerce2(a),CustomProgressEvent=class extends Event{constructor(a,_){super(a),this.detail=_}},encode_12=encode5,MSB2=128,REST2=127,MSBALL2=~REST2,INT2=Math.pow(2,31);function encode5(a,_,$){_=_||[],$=$||0;for(var j=$;a>=INT2;)_[$++]=a&255|MSB2,a/=128;for(;a&MSBALL2;)_[$++]=a&255|MSB2,a>>>=7;return _[$]=a|0,encode5.bytes=$-j+1,_}var decode7=read2,MSB$12=128,REST$12=127;function read2(a,j){var $=0,j=j||0,_e=0,et=j,tt,rt=a.length;do{if(et>=rt)throw read2.bytes=0,new RangeError("Could not decode varint");tt=a[et++],$+=_e<28?(tt&REST$12)<<_e:(tt&REST$12)*Math.pow(2,_e),_e+=7}while(tt>=MSB$12);return read2.bytes=et-j,$}var N12=Math.pow(2,7),N22=Math.pow(2,14),N32=Math.pow(2,21),N42=Math.pow(2,28),N52=Math.pow(2,35),N62=Math.pow(2,42),N72=Math.pow(2,49),N82=Math.pow(2,56),N92=Math.pow(2,63),length2=function(a){return a<N12?1:a<N22?2:a<N32?3:a<N42?4:a<N52?5:a<N62?6:a<N72?7:a<N82?8:a<N92?9:10},varint2={encode:encode_12,decode:decode7,encodingLength:length2},_brrp_varint2=varint2,varint_default2=_brrp_varint2,decode8=(a,_=0)=>[varint_default2.decode(a,_),varint_default2.decode.bytes],encodeTo2=(a,_,$=0)=>(varint_default2.encode(a,_,$),_),encodingLength2=a=>varint_default2.encodingLength(a),create2=(a,_)=>{const $=_.byteLength,j=encodingLength2(a),_e=j+encodingLength2($),et=new Uint8Array(_e+$);return encodeTo2(a,et,0),encodeTo2($,et,j),et.set(_,_e),new Digest2(a,$,_,et)},decode9=a=>{const _=coerce2(a),[$,j]=decode8(_),[_e,et]=decode8(_.subarray(j)),tt=_.subarray(j+et);if(tt.byteLength!==_e)throw new Error("Incorrect length");return new Digest2($,_e,tt,_)},equals5=(a,_)=>{if(a===_)return!0;{const $=_;return a.code===$.code&&a.size===$.size&&$.bytes instanceof Uint8Array&&equals4(a.bytes,$.bytes)}},Digest2=class{constructor(a,_,$,j){this.code=a,this.size=_,this.digest=$,this.bytes=j}};function base2(a,_){if(a.length>=255)throw new TypeError("Alphabet too long");for(var $=new Uint8Array(256),j=0;j<$.length;j++)$[j]=255;for(var _e=0;_e<a.length;_e++){var et=a.charAt(_e),tt=et.charCodeAt(0);if($[tt]!==255)throw new TypeError(et+" is ambiguous");$[tt]=_e}var rt=a.length,at=a.charAt(0),ct=Math.log(rt)/Math.log(256),dt=Math.log(256)/Math.log(rt);function yt($t){if($t instanceof Uint8Array||(ArrayBuffer.isView($t)?$t=new Uint8Array($t.buffer,$t.byteOffset,$t.byteLength):Array.isArray($t)&&($t=Uint8Array.from($t))),!($t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if($t.length===0)return"";for(var _t=0,xt=0,St=0,Mt=$t.length;St!==Mt&&$t[St]===0;)St++,_t++;for(var Tt=(Mt-St)*dt+1>>>0,Rt=new Uint8Array(Tt);St!==Mt;){for(var Ct=$t[St],It=0,kt=Tt-1;(Ct!==0||It<xt)&&kt!==-1;kt--,It++)Ct+=256*Rt[kt]>>>0,Rt[kt]=Ct%rt>>>0,Ct=Ct/rt>>>0;if(Ct!==0)throw new Error("Non-zero carry");xt=It,St++}for(var Dt=Tt-xt;Dt!==Tt&&Rt[Dt]===0;)Dt++;for(var Bt=at.repeat(_t);Dt<Tt;++Dt)Bt+=a.charAt(Rt[Dt]);return Bt}function bt($t){if(typeof $t!="string")throw new TypeError("Expected String");if($t.length===0)return new Uint8Array;var _t=0;if($t[_t]!==" "){for(var xt=0,St=0;$t[_t]===at;)xt++,_t++;for(var Mt=($t.length-_t)*ct+1>>>0,Tt=new Uint8Array(Mt);$t[_t];){var Rt=$[$t.charCodeAt(_t)];if(Rt===255)return;for(var Ct=0,It=Mt-1;(Rt!==0||Ct<St)&&It!==-1;It--,Ct++)Rt+=rt*Tt[It]>>>0,Tt[It]=Rt%256>>>0,Rt=Rt/256>>>0;if(Rt!==0)throw new Error("Non-zero carry");St=Ct,_t++}if($t[_t]!==" "){for(var kt=Mt-St;kt!==Mt&&Tt[kt]===0;)kt++;for(var Dt=new Uint8Array(xt+(Mt-kt)),Bt=xt;kt!==Mt;)Dt[Bt++]=Tt[kt++];return Dt}}}function Et($t){var _t=bt($t);if(_t)return _t;throw new Error(`Non-${_} character`)}return{encode:yt,decodeUnsafe:bt,decode:Et}}var src2=base2,_brrp__multiformats_scope_baseX2=src2,base_x_default2=_brrp__multiformats_scope_baseX2,Encoder2=class{constructor(a,_,$){this.name=a,this.prefix=_,this.baseEncode=$}encode(a){if(a instanceof Uint8Array)return`${this.prefix}${this.baseEncode(a)}`;throw Error("Unknown type, must be binary type")}},Decoder2=class{constructor(a,_,$){if(this.name=a,this.prefix=_,_.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=_.codePointAt(0),this.baseDecode=$}decode(a){if(typeof a=="string"){if(a.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(a)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(a.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(a){return or2(this,a)}},ComposedDecoder2=class{constructor(a){this.decoders=a}or(a){return or2(this,a)}decode(a){const _=a[0],$=this.decoders[_];if($)return $.decode(a);throw RangeError(`Unable to decode multibase string ${JSON.stringify(a)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},or2=(a,_)=>new ComposedDecoder2({...a.decoders||{[a.prefix]:a},..._.decoders||{[_.prefix]:_}}),Codec2=class{constructor(a,_,$,j){this.name=a,this.prefix=_,this.baseEncode=$,this.baseDecode=j,this.encoder=new Encoder2(a,_,$),this.decoder=new Decoder2(a,_,j)}encode(a){return this.encoder.encode(a)}decode(a){return this.decoder.decode(a)}},from2=({name:a,prefix:_,encode:$,decode:j})=>new Codec2(a,_,$,j),baseX2=({prefix:a,name:_,alphabet:$})=>{const{encode:j,decode:_e}=base_x_default2($,_);return from2({prefix:a,name:_,encode:j,decode:et=>coerce2(_e(et))})},decode10=(a,_,$,j)=>{const _e={};for(let dt=0;dt<_.length;++dt)_e[_[dt]]=dt;let et=a.length;for(;a[et-1]==="=";)--et;const tt=new Uint8Array(et*$/8|0);let rt=0,at=0,ct=0;for(let dt=0;dt<et;++dt){const yt=_e[a[dt]];if(yt===void 0)throw new SyntaxError(`Non-${j} character`);at=at<<$|yt,rt+=$,rt>=8&&(rt-=8,tt[ct++]=255&at>>rt)}if(rt>=$||255&at<<8-rt)throw new SyntaxError("Unexpected end of data");return tt},encode6=(a,_,$)=>{const j=_[_.length-1]==="=",_e=(1<<$)-1;let et="",tt=0,rt=0;for(let at=0;at<a.length;++at)for(rt=rt<<8|a[at],tt+=8;tt>$;)tt-=$,et+=_[_e&rt>>tt];if(tt&&(et+=_[_e&rt<<$-tt]),j)for(;et.length*$&7;)et+="=";return et},rfc46482=({name:a,prefix:_,bitsPerChar:$,alphabet:j})=>from2({prefix:_,name:a,encode(_e){return encode6(_e,j,$)},decode(_e){return decode10(_e,j,$,a)}}),base58btc2=baseX2({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"});baseX2({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var base322=rfc46482({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5});rfc46482({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),rfc46482({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),rfc46482({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),rfc46482({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),rfc46482({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),rfc46482({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),rfc46482({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),rfc46482({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var format2=(a,_)=>{const{bytes:$,version:j}=a;switch(j){case 0:return toStringV02($,baseCache2(a),_||base58btc2.encoder);default:return toStringV12($,baseCache2(a),_||base322.encoder)}},cache2=new WeakMap,baseCache2=a=>{const _=cache2.get(a);if(_==null){const $=new Map;return cache2.set(a,$),$}return _},CID2=class bo{constructor(_,$,j,_e){this.code=$,this.version=_,this.multihash=j,this.bytes=_e,this["/"]=_e}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{const{code:_,multihash:$}=this;if(_!==DAG_PB_CODE2)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if($.code!==SHA_256_CODE2)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return bo.createV0($)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{const{code:_,digest:$}=this.multihash,j=create2(_,$);return bo.createV1(this.code,j)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(_){return bo.equals(this,_)}static equals(_,$){const j=$;return j&&_.code===j.code&&_.version===j.version&&equals5(_.multihash,j.multihash)}toString(_){return format2(this,_)}toJSON(){return{"/":format2(this)}}link(){return this}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(_){if(_==null)return null;const $=_;if($ instanceof bo)return $;if($["/"]!=null&&$["/"]===$.bytes||$.asCID===$){const{version:j,code:_e,multihash:et,bytes:tt}=$;return new bo(j,_e,et,tt||encodeCID2(j,_e,et.bytes))}else if($[cidSymbol2]===!0){const{version:j,multihash:_e,code:et}=$,tt=decode9(_e);return bo.create(j,et,tt)}else return null}static create(_,$,j){if(typeof $!="number")throw new Error("String codecs are no longer supported");if(!(j.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(_){case 0:{if($!==DAG_PB_CODE2)throw new Error(`Version 0 CID must use dag-pb (code: ${DAG_PB_CODE2}) block encoding`);return new bo(_,$,j,j.bytes)}case 1:{const _e=encodeCID2(_,$,j.bytes);return new bo(_,$,j,_e)}default:throw new Error("Invalid version")}}static createV0(_){return bo.create(0,DAG_PB_CODE2,_)}static createV1(_,$){return bo.create(1,_,$)}static decode(_){const[$,j]=bo.decodeFirst(_);if(j.length)throw new Error("Incorrect length");return $}static decodeFirst(_){const $=bo.inspectBytes(_),j=$.size-$.multihashSize,_e=coerce2(_.subarray(j,j+$.multihashSize));if(_e.byteLength!==$.multihashSize)throw new Error("Incorrect length");const et=_e.subarray($.multihashSize-$.digestSize),tt=new Digest2($.multihashCode,$.digestSize,et,_e);return[$.version===0?bo.createV0(tt):bo.createV1($.codec,tt),_.subarray($.size)]}static inspectBytes(_){let $=0;const j=()=>{const[yt,bt]=decode8(_.subarray($));return $+=bt,yt};let _e=j(),et=DAG_PB_CODE2;if(_e===18?(_e=0,$=0):et=j(),_e!==0&&_e!==1)throw new RangeError(`Invalid CID version ${_e}`);const tt=$,rt=j(),at=j(),ct=$+at,dt=ct-tt;return{version:_e,codec:et,multihashCode:rt,digestSize:at,multihashSize:dt,size:ct}}static parse(_,$){const[j,_e]=parseCIDtoBytes2(_,$),et=bo.decode(_e);if(et.version===0&&_[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return baseCache2(et).set(j,_),et}},parseCIDtoBytes2=(a,_)=>{switch(a[0]){case"Q":{const $=_||base58btc2;return[base58btc2.prefix,$.decode(`${base58btc2.prefix}${a}`)]}case base58btc2.prefix:{const $=_||base58btc2;return[base58btc2.prefix,$.decode(a)]}case base322.prefix:{const $=_||base322;return[base322.prefix,$.decode(a)]}default:{if(_==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[a[0],_.decode(a)]}}},toStringV02=(a,_,$)=>{const{prefix:j}=$;if(j!==base58btc2.prefix)throw Error(`Cannot string encode V0 in ${$.name} encoding`);const _e=_.get(j);if(_e==null){const et=$.encode(a).slice(1);return _.set(j,et),et}else return _e},toStringV12=(a,_,$)=>{const{prefix:j}=$,_e=_.get(j);if(_e==null){const et=$.encode(a);return _.set(j,et),et}else return _e},DAG_PB_CODE2=112,SHA_256_CODE2=18,encodeCID2=(a,_,$)=>{const j=encodingLength2(a),_e=j+encodingLength2(_),et=new Uint8Array(_e+$.byteLength);return encodeTo2(a,et,0),encodeTo2(_,et,j),et.set($,_e),et},cidSymbol2=Symbol.for("@ipld/js-cid/CID"),import_crypto=__toESM(requireCryptoBrowserify(),1),from3=({name:a,code:_,encode:$})=>new Hasher(a,_,$),Hasher=class{constructor(a,_,$){this.name=a,this.code=_,this.encode=$}digest(a){if(a instanceof Uint8Array){const _=this.encode(a);return _ instanceof Uint8Array?create2(this.code,_):_.then($=>create2(this.code,$))}else throw Error("Unknown type, must be binary type")}},sha256=from3({name:"sha2-256",code:18,encode:a=>coerce2(import_crypto.default.createHash("sha256").update(a).digest())}),persist=async(a,_,$)=>{$.codec==null&&($.codec=src_exports);const j=await sha256.digest(a),_e=CID2.create($.cidVersion,$.codec.code,j);return await _.put(_e,a,$),_e};function defaultBufferImporter(a){return async function*($,j){let _e=0n;for await(let et of $.content)yield async()=>{var ct;let tt;const rt={codec:src_exports,cidVersion:a.cidVersion,onProgress:a.onProgress};a.rawLeaves?(rt.codec=raw_exports,rt.cidVersion=1):(tt=new UnixFS({type:a.leafType,data:et}),et=encode3({Data:tt.marshal(),Links:[]}));const at=await persist(et,j,rt);return _e+=BigInt(et.byteLength),(ct=a.onProgress)==null||ct.call(a,new CustomProgressEvent("unixfs:importer:progress:file:write",{bytesWritten:_e,cid:at,path:$.path})),{cid:at,unixfs:tt,size:BigInt(et.length),block:et}}}}var import_err_code2=__toESM(require_err_code(),1),dirBuilder=async(a,_,$)=>{const j=new UnixFS({type:"directory",mtime:a.mtime,mode:a.mode}),_e=encode3(prepare({Data:j.marshal()})),et=await persist(_e,_,$),tt=a.path;return{cid:et,path:tt,unixfs:j,size:BigInt(_e.length),originalPath:a.originalPath,block:_e}};async function*buildFileBatch(a,_,$){let j=-1,_e;for await(const et of parallelBatch($.bufferImporter(a,_),$.blockWriteConcurrency)){if(j++,j===0){_e={...et,single:!0};continue}else j===1&&_e!=null&&(yield{..._e,block:void 0,single:void 0},_e=void 0);yield{...et,block:void 0}}_e!=null&&(yield _e)}function isSingleBlockImport(a){return a.single===!0}var reduce=(a,_,$)=>async function(_e){var dt,yt;if(_e.length===1&&isSingleBlockImport(_e[0])&&$.reduceSingleLeafToSelf){const bt=_e[0];let Et=bt.block;return isSingleBlockImport(bt)&&(a.mtime!==void 0||a.mode!==void 0)&&(bt.unixfs=new UnixFS({type:"file",mtime:a.mtime,mode:a.mode,data:bt.block}),Et={Data:bt.unixfs.marshal(),Links:[]},bt.block=encode3(prepare(Et)),bt.cid=await persist(bt.block,_,{...$,cidVersion:$.cidVersion}),bt.size=BigInt(bt.block.length)),(dt=$.onProgress)==null||dt.call($,new CustomProgressEvent("unixfs:importer:progress:file:layout",{cid:bt.cid,path:bt.originalPath})),{cid:bt.cid,path:a.path,unixfs:bt.unixfs,size:bt.size,originalPath:bt.originalPath}}const et=new UnixFS({type:"file",mtime:a.mtime,mode:a.mode}),tt=_e.filter(bt=>{var Et,$t;return bt.cid.code===code2&&bt.size>0||bt.unixfs!=null&&bt.unixfs.data==null&&bt.unixfs.fileSize()>0n?!0:!!(($t=(Et=bt.unixfs)==null?void 0:Et.data)!=null&&$t.length)}).map(bt=>{var Et;return bt.cid.code===code2?(et.addBlockSize(bt.size),{Name:"",Tsize:Number(bt.size),Hash:bt.cid}):(bt.unixfs==null||bt.unixfs.data==null?et.addBlockSize(((Et=bt.unixfs)==null?void 0:Et.fileSize())??0n):et.addBlockSize(BigInt(bt.unixfs.data.length)),{Name:"",Tsize:Number(bt.size),Hash:bt.cid})}),rt={Data:et.marshal(),Links:tt},at=encode3(prepare(rt)),ct=await persist(at,_,$);return(yt=$.onProgress)==null||yt.call($,new CustomProgressEvent("unixfs:importer:progress:file:layout",{cid:ct,path:a.originalPath})),{cid:ct,path:a.path,unixfs:et,size:BigInt(at.length+rt.Links.reduce((bt,Et)=>bt+(Et.Tsize??0),0)),originalPath:a.originalPath,block:at}},fileBuilder=async(a,_,$)=>$.layout(buildFileBatch(a,_,$),reduce(a,_,$));function isIterable(a){return Symbol.iterator in a}function isAsyncIterable2(a){return Symbol.asyncIterator in a}function contentAsAsyncIterable(a){try{if(a instanceof Uint8Array)return async function*(){yield a}();if(isIterable(a))return async function*(){yield*a}();if(isAsyncIterable2(a))return a}catch{throw(0,import_err_code2.default)(new Error("Content was invalid"),"ERR_INVALID_CONTENT")}throw(0,import_err_code2.default)(new Error("Content was invalid"),"ERR_INVALID_CONTENT")}function defaultDagBuilder(a){return async function*($,j){for await(const _e of $){let et;if(_e.path!=null&&(et=_e.path,_e.path=_e.path.split("/").filter(tt=>tt!=null&&tt!==".").join("/")),isFileCandidate(_e)){const tt={path:_e.path,mtime:_e.mtime,mode:_e.mode,content:async function*(){var at;let rt=0n;for await(const ct of a.chunker(a.chunkValidator(contentAsAsyncIterable(_e.content)))){const dt=BigInt(ct.byteLength);rt+=dt,(at=a.onProgress)==null||at.call(a,new CustomProgressEvent("unixfs:importer:progress:file:read",{bytesRead:rt,chunkSize:dt,path:_e.path})),yield ct}}(),originalPath:et};yield async()=>fileBuilder(tt,j,a)}else if(_e.path!=null){const tt={path:_e.path,mtime:_e.mtime,mode:_e.mode,originalPath:et};yield async()=>dirBuilder(tt,j,a)}else throw new Error("Import candidate must have content or path or both")}}}function isFileCandidate(a){return a.content!=null}var import_err_code3=__toESM(require_err_code(),1),identity_exports={};__export(identity_exports,{identity:()=>identity});function base3(a,_){if(a.length>=255)throw new TypeError("Alphabet too long");for(var $=new Uint8Array(256),j=0;j<$.length;j++)$[j]=255;for(var _e=0;_e<a.length;_e++){var et=a.charAt(_e),tt=et.charCodeAt(0);if($[tt]!==255)throw new TypeError(et+" is ambiguous");$[tt]=_e}var rt=a.length,at=a.charAt(0),ct=Math.log(rt)/Math.log(256),dt=Math.log(256)/Math.log(rt);function yt($t){if($t instanceof Uint8Array||(ArrayBuffer.isView($t)?$t=new Uint8Array($t.buffer,$t.byteOffset,$t.byteLength):Array.isArray($t)&&($t=Uint8Array.from($t))),!($t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if($t.length===0)return"";for(var _t=0,xt=0,St=0,Mt=$t.length;St!==Mt&&$t[St]===0;)St++,_t++;for(var Tt=(Mt-St)*dt+1>>>0,Rt=new Uint8Array(Tt);St!==Mt;){for(var Ct=$t[St],It=0,kt=Tt-1;(Ct!==0||It<xt)&&kt!==-1;kt--,It++)Ct+=256*Rt[kt]>>>0,Rt[kt]=Ct%rt>>>0,Ct=Ct/rt>>>0;if(Ct!==0)throw new Error("Non-zero carry");xt=It,St++}for(var Dt=Tt-xt;Dt!==Tt&&Rt[Dt]===0;)Dt++;for(var Bt=at.repeat(_t);Dt<Tt;++Dt)Bt+=a.charAt(Rt[Dt]);return Bt}function bt($t){if(typeof $t!="string")throw new TypeError("Expected String");if($t.length===0)return new Uint8Array;var _t=0;if($t[_t]!==" "){for(var xt=0,St=0;$t[_t]===at;)xt++,_t++;for(var Mt=($t.length-_t)*ct+1>>>0,Tt=new Uint8Array(Mt);$t[_t];){var Rt=$[$t.charCodeAt(_t)];if(Rt===255)return;for(var Ct=0,It=Mt-1;(Rt!==0||Ct<St)&&It!==-1;It--,Ct++)Rt+=rt*Tt[It]>>>0,Tt[It]=Rt%256>>>0,Rt=Rt/256>>>0;if(Rt!==0)throw new Error("Non-zero carry");St=Ct,_t++}if($t[_t]!==" "){for(var kt=Mt-St;kt!==Mt&&Tt[kt]===0;)kt++;for(var Dt=new Uint8Array(xt+(Mt-kt)),Bt=xt;kt!==Mt;)Dt[Bt++]=Tt[kt++];return Dt}}}function Et($t){var _t=bt($t);if(_t)return _t;throw new Error(`Non-${_} character`)}return{encode:yt,decodeUnsafe:bt,decode:Et}}var src3=base3,_brrp__multiformats_scope_baseX3=src3,base_x_default3=_brrp__multiformats_scope_baseX3,coerce3=a=>{if(a instanceof Uint8Array&&a.constructor.name==="Uint8Array")return a;if(a instanceof ArrayBuffer)return new Uint8Array(a);if(ArrayBuffer.isView(a))return new Uint8Array(a.buffer,a.byteOffset,a.byteLength);throw new Error("Unknown type, must be binary type")},fromString2=a=>new TextEncoder().encode(a),toString2=a=>new TextDecoder().decode(a),Encoder3=class{constructor(a,_,$){this.name=a,this.prefix=_,this.baseEncode=$}encode(a){if(a instanceof Uint8Array)return`${this.prefix}${this.baseEncode(a)}`;throw Error("Unknown type, must be binary type")}},Decoder3=class{constructor(a,_,$){if(this.name=a,this.prefix=_,_.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=_.codePointAt(0),this.baseDecode=$}decode(a){if(typeof a=="string"){if(a.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(a)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(a.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(a){return or3(this,a)}},ComposedDecoder3=class{constructor(a){this.decoders=a}or(a){return or3(this,a)}decode(a){const _=a[0],$=this.decoders[_];if($)return $.decode(a);throw RangeError(`Unable to decode multibase string ${JSON.stringify(a)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},or3=(a,_)=>new ComposedDecoder3({...a.decoders||{[a.prefix]:a},..._.decoders||{[_.prefix]:_}}),Codec3=class{constructor(a,_,$,j){this.name=a,this.prefix=_,this.baseEncode=$,this.baseDecode=j,this.encoder=new Encoder3(a,_,$),this.decoder=new Decoder3(a,_,j)}encode(a){return this.encoder.encode(a)}decode(a){return this.decoder.decode(a)}},from4=({name:a,prefix:_,encode:$,decode:j})=>new Codec3(a,_,$,j),baseX3=({prefix:a,name:_,alphabet:$})=>{const{encode:j,decode:_e}=base_x_default3($,_);return from4({prefix:a,name:_,encode:j,decode:et=>coerce3(_e(et))})},decode11=(a,_,$,j)=>{const _e={};for(let dt=0;dt<_.length;++dt)_e[_[dt]]=dt;let et=a.length;for(;a[et-1]==="=";)--et;const tt=new Uint8Array(et*$/8|0);let rt=0,at=0,ct=0;for(let dt=0;dt<et;++dt){const yt=_e[a[dt]];if(yt===void 0)throw new SyntaxError(`Non-${j} character`);at=at<<$|yt,rt+=$,rt>=8&&(rt-=8,tt[ct++]=255&at>>rt)}if(rt>=$||255&at<<8-rt)throw new SyntaxError("Unexpected end of data");return tt},encode7=(a,_,$)=>{const j=_[_.length-1]==="=",_e=(1<<$)-1;let et="",tt=0,rt=0;for(let at=0;at<a.length;++at)for(rt=rt<<8|a[at],tt+=8;tt>$;)tt-=$,et+=_[_e&rt>>tt];if(tt&&(et+=_[_e&rt<<$-tt]),j)for(;et.length*$&7;)et+="=";return et},rfc46483=({name:a,prefix:_,bitsPerChar:$,alphabet:j})=>from4({prefix:_,name:a,encode(_e){return encode7(_e,j,$)},decode(_e){return decode11(_e,j,$,a)}}),identity=from4({prefix:"\0",name:"identity",encode:a=>toString2(a),decode:a=>fromString2(a)}),base2_exports={};__export(base2_exports,{base2:()=>base22});var base22=rfc46483({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),base8_exports={};__export(base8_exports,{base8:()=>base8});var base8=rfc46483({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),base10_exports={};__export(base10_exports,{base10:()=>base10});var base10=baseX3({prefix:"9",name:"base10",alphabet:"0123456789"}),base16_exports={};__export(base16_exports,{base16:()=>base16,base16upper:()=>base16upper});var base16=rfc46483({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),base16upper=rfc46483({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),base32_exports={};__export(base32_exports,{base32:()=>base323,base32hex:()=>base32hex3,base32hexpad:()=>base32hexpad3,base32hexpadupper:()=>base32hexpadupper3,base32hexupper:()=>base32hexupper3,base32pad:()=>base32pad3,base32padupper:()=>base32padupper3,base32upper:()=>base32upper3,base32z:()=>base32z3});var base323=rfc46483({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),base32upper3=rfc46483({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),base32pad3=rfc46483({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),base32padupper3=rfc46483({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),base32hex3=rfc46483({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),base32hexupper3=rfc46483({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),base32hexpad3=rfc46483({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),base32hexpadupper3=rfc46483({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),base32z3=rfc46483({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),base36_exports={};__export(base36_exports,{base36:()=>base36,base36upper:()=>base36upper});var base36=baseX3({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),base36upper=baseX3({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),base58_exports={};__export(base58_exports,{base58btc:()=>base58btc3,base58flickr:()=>base58flickr3});var base58btc3=baseX3({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),base58flickr3=baseX3({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),base64_exports={};__export(base64_exports,{base64:()=>base64,base64pad:()=>base64pad,base64url:()=>base64url,base64urlpad:()=>base64urlpad});var base64=rfc46483({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),base64pad=rfc46483({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),base64url=rfc46483({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),base64urlpad=rfc46483({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),base256emoji_exports={};__export(base256emoji_exports,{base256emoji:()=>base256emoji});var alphabet=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),alphabetBytesToChars=alphabet.reduce((a,_,$)=>(a[$]=_,a),[]),alphabetCharsToBytes=alphabet.reduce((a,_,$)=>(a[_.codePointAt(0)]=$,a),[]);function encode8(a){return a.reduce((_,$)=>(_+=alphabetBytesToChars[$],_),"")}function decode12(a){const _=[];for(const $ of a){const j=alphabetCharsToBytes[$.codePointAt(0)];if(j===void 0)throw new Error(`Non-base256emoji character: ${$}`);_.push(j)}return new Uint8Array(_)}var base256emoji=from4({prefix:"🚀",name:"base256emoji",encode:encode8,decode:decode12}),sha2_exports={};__export(sha2_exports,{sha256:()=>sha2562,sha512:()=>sha5122});var import_crypto2=__toESM(requireCryptoBrowserify(),1),encode_13=encode9,MSB3=128,REST3=127,MSBALL3=~REST3,INT3=Math.pow(2,31);function encode9(a,_,$){_=_||[],$=$||0;for(var j=$;a>=INT3;)_[$++]=a&255|MSB3,a/=128;for(;a&MSBALL3;)_[$++]=a&255|MSB3,a>>>=7;return _[$]=a|0,encode9.bytes=$-j+1,_}var decode13=read3,MSB$13=128,REST$13=127;function read3(a,j){var $=0,j=j||0,_e=0,et=j,tt,rt=a.length;do{if(et>=rt)throw read3.bytes=0,new RangeError("Could not decode varint");tt=a[et++],$+=_e<28?(tt&REST$13)<<_e:(tt&REST$13)*Math.pow(2,_e),_e+=7}while(tt>=MSB$13);return read3.bytes=et-j,$}var N13=Math.pow(2,7),N23=Math.pow(2,14),N33=Math.pow(2,21),N43=Math.pow(2,28),N53=Math.pow(2,35),N63=Math.pow(2,42),N73=Math.pow(2,49),N83=Math.pow(2,56),N93=Math.pow(2,63),length3=function(a){return a<N13?1:a<N23?2:a<N33?3:a<N43?4:a<N53?5:a<N63?6:a<N73?7:a<N83?8:a<N93?9:10},varint3={encode:encode_13,decode:decode13,encodingLength:length3},_brrp_varint3=varint3,varint_default3=_brrp_varint3,encodeTo3=(a,_,$=0)=>(varint_default3.encode(a,_,$),_),encodingLength3=a=>varint_default3.encodingLength(a),create3=(a,_)=>{const $=_.byteLength,j=encodingLength3(a),_e=j+encodingLength3($),et=new Uint8Array(_e+$);return encodeTo3(a,et,0),encodeTo3($,et,j),et.set(_,_e),new Digest3(a,$,_,et)},Digest3=class{constructor(a,_,$,j){this.code=a,this.size=_,this.digest=$,this.bytes=j}},from5=({name:a,code:_,encode:$})=>new Hasher2(a,_,$),Hasher2=class{constructor(a,_,$){this.name=a,this.code=_,this.encode=$}digest(a){if(a instanceof Uint8Array){const _=this.encode(a);return _ instanceof Uint8Array?create3(this.code,_):_.then($=>create3(this.code,$))}else throw Error("Unknown type, must be binary type")}},sha2562=from5({name:"sha2-256",code:18,encode:a=>coerce3(import_crypto2.default.createHash("sha256").update(a).digest())}),sha5122=from5({name:"sha2-512",code:19,encode:a=>coerce3(import_crypto2.default.createHash("sha512").update(a).digest())}),identity_exports2={};__export(identity_exports2,{identity:()=>identity2});var code3=0,name3="identity",encode10=coerce3,digest=a=>create3(code3,encode10(a)),identity2={code:code3,name:name3,encode:encode10,digest};new TextEncoder,new TextDecoder;var bases={...identity_exports,...base2_exports,...base8_exports,...base10_exports,...base16_exports,...base32_exports,...base36_exports,...base58_exports,...base64_exports,...base256emoji_exports};({...sha2_exports,...identity_exports2});function createCodec2(a,_,$,j){return{name:a,prefix:_,encoder:{name:a,prefix:_,encode:$},decoder:{decode:j}}}var string=createCodec2("utf8","u",a=>"u"+new TextDecoder("utf8").decode(a),a=>new TextEncoder().encode(a.substring(1))),ascii=createCodec2("ascii","a",a=>{let _="a";for(let $=0;$<a.length;$++)_+=String.fromCharCode(a[$]);return _},a=>{a=a.substring(1);const _=allocUnsafe(a.length);for(let $=0;$<a.length;$++)_[$]=a.charCodeAt($);return _}),BASES={utf8:string,"utf-8":string,hex:bases.base16,latin1:ascii,ascii,binary:ascii,...bases},bases_default=BASES;function fromString3(a,_="utf8"){const $=bases_default[_];if($==null)throw new Error(`Unsupported encoding "${_}"`);return(_==="utf8"||_==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?asUint8Array(globalThis.Buffer.from(a,"utf-8")):$.decoder.decode(`${$.prefix}${a}`)}var defaultChunkValidator=()=>async function*(_){for await(const $ of _){if($.length===void 0)throw(0,import_err_code3.default)(new Error("Content was invalid"),"ERR_INVALID_CONTENT");if(typeof $=="string"||$ instanceof String)yield fromString3($.toString());else if(Array.isArray($))yield Uint8Array.from($);else if($ instanceof Uint8Array)yield $;else throw(0,import_err_code3.default)(new Error("Content was invalid"),"ERR_INVALID_CONTENT")}},DEFAULT_MAX_CHILDREN_PER_NODE=174;function balanced(a){const _=(a==null?void 0:a.maxChildrenPerNode)??DEFAULT_MAX_CHILDREN_PER_NODE;return async function $(j,_e){const et=[];for await(const tt of src_default(j,_))et.push(await _e(tt));return et.length>1?$(et,_e):et[0]}}var Dir=class{constructor(a,_){Dr(this,"options");Dr(this,"root");Dr(this,"dir");Dr(this,"path");Dr(this,"dirty");Dr(this,"flat");Dr(this,"parent");Dr(this,"parentKey");Dr(this,"unixfs");Dr(this,"mode");Dr(this,"mtime");Dr(this,"cid");Dr(this,"size");Dr(this,"nodeSize");this.options=_??{},this.root=a.root,this.dir=a.dir,this.path=a.path,this.dirty=a.dirty,this.flat=a.flat,this.parent=a.parent,this.parentKey=a.parentKey,this.unixfs=a.unixfs,this.mode=a.mode,this.mtime=a.mtime}},CID_V0=CID2.parse("QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn"),CID_V1=CID2.parse("zdj7WbTaiJT1fgatdet9Ei9iDB5hdCxkbVyhyh8YTUnXMiwYi"),DirFlat=class extends Dir{constructor(_,$){super(_,$);Dr(this,"_children");this._children=new Map}async put(_,$){this.cid=void 0,this.size=void 0,this.nodeSize=void 0,this._children.set(_,$)}async get(_){return Promise.resolve(this._children.get(_))}childCount(){return this._children.size}directChildrenCount(){return this.childCount()}onlyChild(){return this._children.values().next().value}async*eachChildSeries(){for(const[_,$]of this._children.entries())yield{key:_,child:$}}estimateNodeSize(){if(this.nodeSize!==void 0)return this.nodeSize;this.nodeSize=0;for(const[_,$]of this._children.entries())$.size!=null&&$.cid!=null&&(this.nodeSize+=_.length+(this.options.cidVersion===1?CID_V1.bytes.byteLength:CID_V0.bytes.byteLength));return this.nodeSize}async*flush(_){const $=[];for(const[at,ct]of this._children.entries()){let dt=ct;if(ct instanceof Dir)for await(const yt of ct.flush(_))dt=yt,yield yt;dt.size!=null&&dt.cid!=null&&$.push({Name:at,Tsize:Number(dt.size),Hash:dt.cid})}const j=new UnixFS({type:"directory",mtime:this.mtime,mode:this.mode}),_e={Data:j.marshal(),Links:$},et=encode3(prepare(_e)),tt=await persist(et,_,this.options),rt=et.length+_e.Links.reduce((at,ct)=>at+(ct.Tsize==null?0:ct.Tsize),0);this.cid=tt,this.size=rt,yield{cid:tt,unixfs:j,path:this.path,size:BigInt(rt)}}},from6=({name:a,code:_,encode:$})=>new Hasher3(a,_,$),Hasher3=class{constructor(a,_,$){this.name=a,this.code=_,this.encode=$}digest(a){if(a instanceof Uint8Array){const _=this.encode(a);return _ instanceof Uint8Array?create(this.code,_):_.then($=>create(this.code,$))}else throw Error("Unknown type, must be binary type")}},import_murmurhash3js_revisited=__toESM(require_murmurhash3js_revisited(),1),murmur3128=from6({name:"murmur3-128",code:34,encode:a=>bytes_exports.fromHex(import_murmurhash3js_revisited.default.x64.hash128(a))}),import_sparse_array=__toESM(require_sparse_array(),1),Bucket=class Os{constructor(_,$,j=0){this._options=_,this._popCount=0,this._parent=$,this._posAtParent=j,this._children=new import_sparse_array.default,this.key=null}async put(_,$){const j=await this._findNewBucketAndPos(_);await j.bucket._putAt(j,_,$)}async get(_){const $=await this._findChild(_);if($!=null)return $.value}async del(_){const $=await this._findPlace(_),j=$.bucket._at($.pos);j!=null&&j.key===_&&$.bucket._delAt($.pos)}leafCount(){return this._children.compactArray().reduce(($,j)=>j instanceof Os?$+j.leafCount():$+1,0)}childrenCount(){return this._children.length}onlyChild(){return this._children.get(0)}*eachLeafSeries(){const _=this._children.compactArray();for(const $ of _)$ instanceof Os?yield*$.eachLeafSeries():yield $}serialize(_,$){const j=[];return $(this._children.reduce((_e,et,tt)=>(et!=null&&(et instanceof Os?_e.push(et.serialize(_,$)):_e.push(_(et,tt))),_e),j))}async asyncTransform(_,$){return await asyncTransformBucket(this,_,$)}toJSON(){return this.serialize(mapNode,reduceNodes)}prettyPrint(){return JSON.stringify(this.toJSON(),null," ")}tableSize(){return Math.pow(2,this._options.bits)}async _findChild(_){const $=await this._findPlace(_),j=$.bucket._at($.pos);if(!(j instanceof Os)&&j!=null&&j.key===_)return j}async _findPlace(_){const $=this._options.hash(typeof _=="string"?fromString3(_):_),j=await $.take(this._options.bits),_e=this._children.get(j);return _e instanceof Os?await _e._findPlace($):{bucket:this,pos:j,hash:$,existingChild:_e}}async _findNewBucketAndPos(_){const $=await this._findPlace(_);if($.existingChild!=null&&$.existingChild.key!==_){const j=new Os(this._options,$.bucket,$.pos);$.bucket._putObjectAt($.pos,j);const _e=await j._findPlace($.existingChild.hash);return _e.bucket._putAt(_e,$.existingChild.key,$.existingChild.value),await j._findNewBucketAndPos($.hash)}return $}_putAt(_,$,j){this._putObjectAt(_.pos,{key:$,value:j,hash:_.hash})}_putObjectAt(_,$){this._children.get(_)==null&&this._popCount++,this._children.set(_,$)}_delAt(_){if(_===-1)throw new Error("Invalid position");this._children.get(_)!=null&&this._popCount--,this._children.unset(_),this._level()}_level(){if(this._parent!=null&&this._popCount<=1)if(this._popCount===1){const _=this._children.find(exists);if(_!=null&&!(_ instanceof Os)){const $=_.hash;$.untake(this._options.bits);const j={pos:this._posAtParent,hash:$,bucket:this._parent};this._parent._putAt(j,_.key,_.value)}}else this._parent._delAt(this._posAtParent)}_at(_){return this._children.get(_)}};function exists(a){return!!a}function mapNode(a,_){return a.key}function reduceNodes(a){return a}async function asyncTransformBucket(a,_,$){const j=[];for(const _e of a._children.compactArray())if(_e instanceof Bucket)await asyncTransformBucket(_e,_,$);else{const et=await _(_e);j.push({bitField:a._children.bitField(),children:et})}return await $(j)}var START_MASKS=[255,254,252,248,240,224,192,128],STOP_MASKS=[1,3,7,15,31,63,127,255],ConsumableBuffer=class{constructor(a){this._value=a,this._currentBytePos=a.length-1,this._currentBitPos=7}availableBits(){return this._currentBitPos+1+this._currentBytePos*8}totalBits(){return this._value.length*8}take(a){let _=a,$=0;for(;_>0&&this._haveBits();){const j=this._value[this._currentBytePos],_e=this._currentBitPos+1,et=Math.min(_e,_),tt=byteBitsToInt(j,_e-et,et);$=($<<et)+tt,_-=et,this._currentBitPos-=et,this._currentBitPos<0&&(this._currentBitPos=7,this._currentBytePos--)}return $}untake(a){for(this._currentBitPos+=a;this._currentBitPos>7;)this._currentBitPos-=8,this._currentBytePos+=1}_haveBits(){return this._currentBytePos>=0}};function byteBitsToInt(a,_,$){const j=maskFor(_,$);return(a&j)>>>_}function maskFor(a,_){return START_MASKS[a]&STOP_MASKS[Math.min(_+a-1,7)]}function wrapHash(a){function _($){return $ instanceof InfiniteHash?$:new InfiniteHash($,a)}return _}var InfiniteHash=class{constructor(a,_){if(!(a instanceof Uint8Array))throw new Error("can only hash Uint8Arrays");this._value=a,this._hashFn=_,this._depth=-1,this._availableBits=0,this._currentBufferIndex=0,this._buffers=[]}async take(a){let _=a;for(;this._availableBits<_;)await this._produceMoreBits();let $=0;for(;_>0;){const j=this._buffers[this._currentBufferIndex],_e=Math.min(j.availableBits(),_),et=j.take(_e);$=($<<_e)+et,_-=_e,this._availableBits-=_e,j.availableBits()===0&&this._currentBufferIndex++}return $}untake(a){let _=a;for(;_>0;){const $=this._buffers[this._currentBufferIndex],j=Math.min($.totalBits()-$.availableBits(),_);$.untake(j),_-=j,this._availableBits+=j,this._currentBufferIndex>0&&$.totalBits()===$.availableBits()&&(this._depth--,this._currentBufferIndex--)}}async _produceMoreBits(){this._depth++;const a=this._depth>0?concat([this._value,Uint8Array.from([this._depth])]):this._value,_=await this._hashFn(a),$=new ConsumableBuffer(_);this._buffers.push($),this._availableBits+=$.availableBits()}};function createHAMT(a){if(a==null||a.hashFn==null)throw new Error("please define an options.hashFn");const _={bits:a.bits??8,hash:wrapHash(a.hashFn)};return new Bucket(_)}async function hamtHashFn(a){return(await murmur3128.encode(a)).slice(0,8).reverse()}var HAMT_HASH_CODE=BigInt(34),DirSharded=class extends Dir{constructor(_,$){super(_,$);Dr(this,"_bucket");this._bucket=createHAMT({hashFn:hamtHashFn,bits:8})}async put(_,$){this.cid=void 0,this.size=void 0,this.nodeSize=void 0,await this._bucket.put(_,$)}async get(_){return this._bucket.get(_)}childCount(){return this._bucket.leafCount()}directChildrenCount(){return this._bucket.childrenCount()}onlyChild(){return this._bucket.onlyChild()}async*eachChildSeries(){for await(const{key:_,value:$}of this._bucket.eachLeafSeries())yield{key:_,child:$}}estimateNodeSize(){return this.nodeSize!==void 0?this.nodeSize:(this.nodeSize=calculateSize(this._bucket,this,this.options),this.nodeSize)}async*flush(_){for await(const $ of flush(this._bucket,_,this,this.options))yield{...$,path:this.path}}},dir_sharded_default=DirSharded;async function*flush(a,_,$,j){const _e=a._children,et=[];let tt=0n;for(let Et=0;Et<_e.length;Et++){const $t=_e.get(Et);if($t==null)continue;const _t=Et.toString(16).toUpperCase().padStart(2,"0");if($t instanceof Bucket){let xt;for await(const St of flush($t,_,null,j))xt=St;if(xt==null)throw new Error("Could not flush sharded directory, no subshard found");et.push({Name:_t,Tsize:Number(xt.size),Hash:xt.cid}),tt+=xt.size}else if(isDir($t.value)){const xt=$t.value;let St;for await(const Tt of xt.flush(_))St=Tt,yield St;if(St==null)throw new Error("Did not flush dir");const Mt=_t+$t.key;et.push({Name:Mt,Tsize:Number(St.size),Hash:St.cid}),tt+=St.size}else{const xt=$t.value;if(xt.cid==null)continue;const St=_t+$t.key,Mt=xt.size;et.push({Name:St,Tsize:Number(Mt),Hash:xt.cid}),tt+=BigInt(Mt??0)}}const rt=Uint8Array.from(_e.bitField().reverse()),at=new UnixFS({type:"hamt-sharded-directory",data:rt,fanout:BigInt(a.tableSize()),hashType:HAMT_HASH_CODE,mtime:$==null?void 0:$.mtime,mode:$==null?void 0:$.mode}),ct={Data:at.marshal(),Links:et},dt=encode3(prepare(ct)),yt=await persist(dt,_,j),bt=BigInt(dt.byteLength)+tt;yield{cid:yt,unixfs:at,size:bt}}function isDir(a){return typeof a.flush=="function"}function calculateSize(a,_,$){const j=a._children,_e=[];for(let at=0;at<j.length;at++){const ct=j.get(at);if(ct==null)continue;const dt=at.toString(16).toUpperCase().padStart(2,"0");if(ct instanceof Bucket){const yt=calculateSize(ct,null,$);_e.push({Name:dt,Tsize:Number(yt),Hash:$.cidVersion===0?CID_V0:CID_V1})}else if(typeof ct.value.flush=="function"){const bt=ct.value.nodeSize();_e.push({Name:dt+ct.key,Tsize:Number(bt),Hash:$.cidVersion===0?CID_V0:CID_V1})}else{const yt=ct.value;if(yt.cid==null)continue;const bt=dt+ct.key,Et=yt.size;_e.push({Name:bt,Tsize:Number(Et),Hash:yt.cid})}}const et=Uint8Array.from(j.bitField().reverse()),tt=new UnixFS({type:"hamt-sharded-directory",data:et,fanout:BigInt(a.tableSize()),hashType:HAMT_HASH_CODE,mtime:_==null?void 0:_.mtime,mode:_==null?void 0:_.mode});return encode3(prepare({Data:tt.marshal(),Links:_e})).length}async function flatToShard(a,_,$,j){let _e=_;_ instanceof DirFlat&&_.estimateNodeSize()>$&&(_e=await convertToShard(_,j));const et=_e.parent;if(et!=null){if(_e!==_){if(a!=null&&(a.parent=_e),_e.parentKey==null)throw new Error("No parent key found");await et.put(_e.parentKey,_e)}return flatToShard(_e,et,$,j)}return _e}async function convertToShard(a,_){const $=new dir_sharded_default({root:a.root,dir:!0,parent:a.parent,parentKey:a.parentKey,path:a.path,dirty:a.dirty,flat:!1,mtime:a.mtime,mode:a.mode},_);for await(const{key:j,child:_e}of a.eachChildSeries())await $.put(j,_e);return $}var toPathComponents=(a="")=>(a.trim().match(/([^\\/]|\\\/)+/g)??[]).filter(Boolean);async function addToTree(a,_,$){var rt,at;const j=toPathComponents(a.path??""),_e=j.length-1;let et=_,tt="";for(let ct=0;ct<j.length;ct++){const dt=j[ct];tt+=`${tt!==""?"/":""}${dt}`;const yt=ct===_e;if(et.dirty=!0,et.cid=void 0,et.size=void 0,yt)await et.put(dt,a),_=await flatToShard(null,et,$.shardSplitThresholdBytes,$);else{let bt=await et.get(dt);(bt==null||!(bt instanceof Dir))&&(bt=new DirFlat({root:!1,dir:!0,parent:et,parentKey:dt,path:tt,dirty:!0,flat:!0,mtime:(rt=bt==null?void 0:bt.unixfs)==null?void 0:rt.mtime,mode:(at=bt==null?void 0:bt.unixfs)==null?void 0:at.mode},$)),await et.put(dt,bt),et=bt}}return _}async function*flushAndYield(a,_){var $;if(!(a instanceof Dir)){(($=a.unixfs)==null?void 0:$.isDirectory())===!0&&(yield a);return}yield*a.flush(_)}function defaultTreeBuilder(a){return async function*($,j){let _e=new DirFlat({root:!0,dir:!0,path:"",dirty:!0,flat:!0},a),et,tt=!1;for await(const rt of $){if(rt==null)continue;const at=`${rt.originalPath??""}`.split("/")[0];at!=null&&at!==""&&(et==null?(et=at,tt=!0):et!==at&&(tt=!1)),_e=await addToTree(rt,_e,a),(rt.unixfs==null||!rt.unixfs.isDirectory())&&(yield rt)}if(a.wrapWithDirectory||tt&&_e.childCount()>1)yield*flushAndYield(_e,j);else for await(const rt of _e.eachChildSeries())rt!=null&&(yield*flushAndYield(rt.child,j))}}async function*importer(a,_,$={}){let j;Symbol.asyncIterator in a||Symbol.iterator in a?j=a:j=[a];const _e=$.wrapWithDirectory??!1,et=$.shardSplitThresholdBytes??262144,tt=$.cidVersion??1,rt=$.rawLeaves??!0,at=$.leafType??"file",ct=$.fileImportConcurrency??50,dt=$.blockWriteConcurrency??10,yt=$.reduceSingleLeafToSelf??!0,bt=$.chunker??fixedSize(),Et=$.chunkValidator??defaultChunkValidator(),$t=$.dagBuilder??defaultDagBuilder({chunker:bt,chunkValidator:Et,wrapWithDirectory:_e,layout:$.layout??balanced(),bufferImporter:$.bufferImporter??defaultBufferImporter({cidVersion:tt,rawLeaves:rt,leafType:at,onProgress:$.onProgress}),blockWriteConcurrency:dt,reduceSingleLeafToSelf:yt,cidVersion:tt,onProgress:$.onProgress}),_t=$.treeBuilder??defaultTreeBuilder({wrapWithDirectory:_e,shardSplitThresholdBytes:et,cidVersion:tt,onProgress:$.onProgress});for await(const xt of _t(parallelBatch($t(j,_),ct),_))yield{cid:xt.cid,path:xt.path,unixfs:xt.unixfs,size:xt.size}}var errors_exports={};__export(errors_exports,{abortedError:()=>abortedError,closeFailedError:()=>closeFailedError,deleteFailedError:()=>deleteFailedError,getFailedError:()=>getFailedError,hasFailedError:()=>hasFailedError,notFoundError:()=>notFoundError,openFailedError:()=>openFailedError,putFailedError:()=>putFailedError});var import_err_code5=__toESM(require_err_code(),1);function openFailedError(a){return a=a??new Error("Open failed"),(0,import_err_code5.default)(a,"ERR_OPEN_FAILED")}function closeFailedError(a){return a=a??new Error("Close failed"),(0,import_err_code5.default)(a,"ERR_CLOSE_FAILED")}function putFailedError(a){return a=a??new Error("Put failed"),(0,import_err_code5.default)(a,"ERR_PUT_FAILED")}function getFailedError(a){return a=a??new Error("Get failed"),(0,import_err_code5.default)(a,"ERR_GET_FAILED")}function deleteFailedError(a){return a=a??new Error("Delete failed"),(0,import_err_code5.default)(a,"ERR_DELETE_FAILED")}function hasFailedError(a){return a=a??new Error("Has failed"),(0,import_err_code5.default)(a,"ERR_HAS_FAILED")}function notFoundError(a){return a=a??new Error("Not Found"),(0,import_err_code5.default)(a,"ERR_NOT_FOUND")}function abortedError(a){return a=a??new Error("Aborted"),(0,import_err_code5.default)(a,"ERR_ABORTED")}var BaseBlockstore=class{has(a,_){return Promise.reject(new Error(".has is not implemented"))}put(a,_,$){return Promise.reject(new Error(".put is not implemented"))}async*putMany(a,_){for await(const{cid:$,block:j}of a)await this.put($,j,_),yield $}get(a,_){return Promise.reject(new Error(".get is not implemented"))}async*getMany(a,_){for await(const $ of a)yield{cid:$,block:await this.get($,_)}}async delete(a,_){await Promise.reject(new Error(".delete is not implemented"))}async*deleteMany(a,_){for await(const $ of a)await this.delete($,_),yield $}async*getAll(a){throw new Error(".getAll is not implemented")}};function base4(a,_){if(a.length>=255)throw new TypeError("Alphabet too long");for(var $=new Uint8Array(256),j=0;j<$.length;j++)$[j]=255;for(var _e=0;_e<a.length;_e++){var et=a.charAt(_e),tt=et.charCodeAt(0);if($[tt]!==255)throw new TypeError(et+" is ambiguous");$[tt]=_e}var rt=a.length,at=a.charAt(0),ct=Math.log(rt)/Math.log(256),dt=Math.log(256)/Math.log(rt);function yt($t){if($t instanceof Uint8Array||(ArrayBuffer.isView($t)?$t=new Uint8Array($t.buffer,$t.byteOffset,$t.byteLength):Array.isArray($t)&&($t=Uint8Array.from($t))),!($t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if($t.length===0)return"";for(var _t=0,xt=0,St=0,Mt=$t.length;St!==Mt&&$t[St]===0;)St++,_t++;for(var Tt=(Mt-St)*dt+1>>>0,Rt=new Uint8Array(Tt);St!==Mt;){for(var Ct=$t[St],It=0,kt=Tt-1;(Ct!==0||It<xt)&&kt!==-1;kt--,It++)Ct+=256*Rt[kt]>>>0,Rt[kt]=Ct%rt>>>0,Ct=Ct/rt>>>0;if(Ct!==0)throw new Error("Non-zero carry");xt=It,St++}for(var Dt=Tt-xt;Dt!==Tt&&Rt[Dt]===0;)Dt++;for(var Bt=at.repeat(_t);Dt<Tt;++Dt)Bt+=a.charAt(Rt[Dt]);return Bt}function bt($t){if(typeof $t!="string")throw new TypeError("Expected String");if($t.length===0)return new Uint8Array;var _t=0;if($t[_t]!==" "){for(var xt=0,St=0;$t[_t]===at;)xt++,_t++;for(var Mt=($t.length-_t)*ct+1>>>0,Tt=new Uint8Array(Mt);$t[_t];){var Rt=$[$t.charCodeAt(_t)];if(Rt===255)return;for(var Ct=0,It=Mt-1;(Rt!==0||Ct<St)&&It!==-1;It--,Ct++)Rt+=rt*Tt[It]>>>0,Tt[It]=Rt%256>>>0,Rt=Rt/256>>>0;if(Rt!==0)throw new Error("Non-zero carry");St=Ct,_t++}if($t[_t]!==" "){for(var kt=Mt-St;kt!==Mt&&Tt[kt]===0;)kt++;for(var Dt=new Uint8Array(xt+(Mt-kt)),Bt=xt;kt!==Mt;)Dt[Bt++]=Tt[kt++];return Dt}}}function Et($t){var _t=bt($t);if(_t)return _t;throw new Error(`Non-${_} character`)}return{encode:yt,decodeUnsafe:bt,decode:Et}}var src4=base4,_brrp__multiformats_scope_baseX4=src4,base_x_default4=_brrp__multiformats_scope_baseX4,equals8=(a,_)=>{if(a===_)return!0;if(a.byteLength!==_.byteLength)return!1;for(let $=0;$<a.byteLength;$++)if(a[$]!==_[$])return!1;return!0},coerce4=a=>{if(a instanceof Uint8Array&&a.constructor.name==="Uint8Array")return a;if(a instanceof ArrayBuffer)return new Uint8Array(a);if(ArrayBuffer.isView(a))return new Uint8Array(a.buffer,a.byteOffset,a.byteLength);throw new Error("Unknown type, must be binary type")},Encoder4=class{constructor(a,_,$){this.name=a,this.prefix=_,this.baseEncode=$}encode(a){if(a instanceof Uint8Array)return`${this.prefix}${this.baseEncode(a)}`;throw Error("Unknown type, must be binary type")}},Decoder4=class{constructor(a,_,$){if(this.name=a,this.prefix=_,_.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=_.codePointAt(0),this.baseDecode=$}decode(a){if(typeof a=="string"){if(a.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(a)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(a.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(a){return or4(this,a)}},ComposedDecoder4=class{constructor(a){this.decoders=a}or(a){return or4(this,a)}decode(a){const _=a[0],$=this.decoders[_];if($)return $.decode(a);throw RangeError(`Unable to decode multibase string ${JSON.stringify(a)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},or4=(a,_)=>new ComposedDecoder4({...a.decoders||{[a.prefix]:a},..._.decoders||{[_.prefix]:_}}),Codec4=class{constructor(a,_,$,j){this.name=a,this.prefix=_,this.baseEncode=$,this.baseDecode=j,this.encoder=new Encoder4(a,_,$),this.decoder=new Decoder4(a,_,j)}encode(a){return this.encoder.encode(a)}decode(a){return this.decoder.decode(a)}},from7=({name:a,prefix:_,encode:$,decode:j})=>new Codec4(a,_,$,j),baseX4=({prefix:a,name:_,alphabet:$})=>{const{encode:j,decode:_e}=base_x_default4($,_);return from7({prefix:a,name:_,encode:j,decode:et=>coerce4(_e(et))})},decode16=(a,_,$,j)=>{const _e={};for(let dt=0;dt<_.length;++dt)_e[_[dt]]=dt;let et=a.length;for(;a[et-1]==="=";)--et;const tt=new Uint8Array(et*$/8|0);let rt=0,at=0,ct=0;for(let dt=0;dt<et;++dt){const yt=_e[a[dt]];if(yt===void 0)throw new SyntaxError(`Non-${j} character`);at=at<<$|yt,rt+=$,rt>=8&&(rt-=8,tt[ct++]=255&at>>rt)}if(rt>=$||255&at<<8-rt)throw new SyntaxError("Unexpected end of data");return tt},encode11=(a,_,$)=>{const j=_[_.length-1]==="=",_e=(1<<$)-1;let et="",tt=0,rt=0;for(let at=0;at<a.length;++at)for(rt=rt<<8|a[at],tt+=8;tt>$;)tt-=$,et+=_[_e&rt>>tt];if(tt&&(et+=_[_e&rt<<$-tt]),j)for(;et.length*$&7;)et+="=";return et},rfc46484=({name:a,prefix:_,bitsPerChar:$,alphabet:j})=>from7({prefix:_,name:a,encode(_e){return encode11(_e,j,$)},decode(_e){return decode16(_e,j,$,a)}}),base324=rfc46484({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5});rfc46484({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),rfc46484({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),rfc46484({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),rfc46484({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),rfc46484({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),rfc46484({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),rfc46484({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),rfc46484({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var encode_14=encode12,MSB4=128,REST4=127,MSBALL4=~REST4,INT4=Math.pow(2,31);function encode12(a,_,$){_=_||[],$=$||0;for(var j=$;a>=INT4;)_[$++]=a&255|MSB4,a/=128;for(;a&MSBALL4;)_[$++]=a&255|MSB4,a>>>=7;return _[$]=a|0,encode12.bytes=$-j+1,_}var decode17=read4,MSB$14=128,REST$14=127;function read4(a,j){var $=0,j=j||0,_e=0,et=j,tt,rt=a.length;do{if(et>=rt)throw read4.bytes=0,new RangeError("Could not decode varint");tt=a[et++],$+=_e<28?(tt&REST$14)<<_e:(tt&REST$14)*Math.pow(2,_e),_e+=7}while(tt>=MSB$14);return read4.bytes=et-j,$}var N14=Math.pow(2,7),N24=Math.pow(2,14),N34=Math.pow(2,21),N44=Math.pow(2,28),N54=Math.pow(2,35),N64=Math.pow(2,42),N74=Math.pow(2,49),N84=Math.pow(2,56),N94=Math.pow(2,63),length4=function(a){return a<N14?1:a<N24?2:a<N34?3:a<N44?4:a<N54?5:a<N64?6:a<N74?7:a<N84?8:a<N94?9:10},varint4={encode:encode_14,decode:decode17,encodingLength:length4},_brrp_varint4=varint4,varint_default4=_brrp_varint4,decode18=(a,_=0)=>[varint_default4.decode(a,_),varint_default4.decode.bytes],encodeTo4=(a,_,$=0)=>(varint_default4.encode(a,_,$),_),encodingLength4=a=>varint_default4.encodingLength(a),create4=(a,_)=>{const $=_.byteLength,j=encodingLength4(a),_e=j+encodingLength4($),et=new Uint8Array(_e+$);return encodeTo4(a,et,0),encodeTo4($,et,j),et.set(_,_e),new Digest4(a,$,_,et)},decode19=a=>{const _=coerce4(a),[$,j]=decode18(_),[_e,et]=decode18(_.subarray(j)),tt=_.subarray(j+et);if(tt.byteLength!==_e)throw new Error("Incorrect length");return new Digest4($,_e,tt,_)},equals9=(a,_)=>{if(a===_)return!0;{const $=_;return a.code===$.code&&a.size===$.size&&$.bytes instanceof Uint8Array&&equals8(a.bytes,$.bytes)}},Digest4=class{constructor(a,_,$,j){this.code=a,this.size=_,this.digest=$,this.bytes=j}},base58btc4=baseX4({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"});baseX4({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var format4=(a,_)=>{const{bytes:$,version:j}=a;switch(j){case 0:return toStringV04($,baseCache4(a),_||base58btc4.encoder);default:return toStringV14($,baseCache4(a),_||base324.encoder)}},cache4=new WeakMap,baseCache4=a=>{const _=cache4.get(a);if(_==null){const $=new Map;return cache4.set(a,$),$}return _},CID4=class _o{constructor(_,$,j,_e){this.code=$,this.version=_,this.multihash=j,this.bytes=_e,this["/"]=_e}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{const{code:_,multihash:$}=this;if(_!==DAG_PB_CODE4)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if($.code!==SHA_256_CODE4)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return _o.createV0($)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{const{code:_,digest:$}=this.multihash,j=create4(_,$);return _o.createV1(this.code,j)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(_){return _o.equals(this,_)}static equals(_,$){const j=$;return j&&_.code===j.code&&_.version===j.version&&equals9(_.multihash,j.multihash)}toString(_){return format4(this,_)}toJSON(){return{"/":format4(this)}}link(){return this}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(_){if(_==null)return null;const $=_;if($ instanceof _o)return $;if($["/"]!=null&&$["/"]===$.bytes||$.asCID===$){const{version:j,code:_e,multihash:et,bytes:tt}=$;return new _o(j,_e,et,tt||encodeCID4(j,_e,et.bytes))}else if($[cidSymbol4]===!0){const{version:j,multihash:_e,code:et}=$,tt=decode19(_e);return _o.create(j,et,tt)}else return null}static create(_,$,j){if(typeof $!="number")throw new Error("String codecs are no longer supported");if(!(j.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(_){case 0:{if($!==DAG_PB_CODE4)throw new Error(`Version 0 CID must use dag-pb (code: ${DAG_PB_CODE4}) block encoding`);return new _o(_,$,j,j.bytes)}case 1:{const _e=encodeCID4(_,$,j.bytes);return new _o(_,$,j,_e)}default:throw new Error("Invalid version")}}static createV0(_){return _o.create(0,DAG_PB_CODE4,_)}static createV1(_,$){return _o.create(1,_,$)}static decode(_){const[$,j]=_o.decodeFirst(_);if(j.length)throw new Error("Incorrect length");return $}static decodeFirst(_){const $=_o.inspectBytes(_),j=$.size-$.multihashSize,_e=coerce4(_.subarray(j,j+$.multihashSize));if(_e.byteLength!==$.multihashSize)throw new Error("Incorrect length");const et=_e.subarray($.multihashSize-$.digestSize),tt=new Digest4($.multihashCode,$.digestSize,et,_e);return[$.version===0?_o.createV0(tt):_o.createV1($.codec,tt),_.subarray($.size)]}static inspectBytes(_){let $=0;const j=()=>{const[yt,bt]=decode18(_.subarray($));return $+=bt,yt};let _e=j(),et=DAG_PB_CODE4;if(_e===18?(_e=0,$=0):et=j(),_e!==0&&_e!==1)throw new RangeError(`Invalid CID version ${_e}`);const tt=$,rt=j(),at=j(),ct=$+at,dt=ct-tt;return{version:_e,codec:et,multihashCode:rt,digestSize:at,multihashSize:dt,size:ct}}static parse(_,$){const[j,_e]=parseCIDtoBytes4(_,$),et=_o.decode(_e);if(et.version===0&&_[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return baseCache4(et).set(j,_),et}},parseCIDtoBytes4=(a,_)=>{switch(a[0]){case"Q":{const $=_||base58btc4;return[base58btc4.prefix,$.decode(`${base58btc4.prefix}${a}`)]}case base58btc4.prefix:{const $=_||base58btc4;return[base58btc4.prefix,$.decode(a)]}case base324.prefix:{const $=_||base324;return[base324.prefix,$.decode(a)]}default:{if(_==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[a[0],_.decode(a)]}}},toStringV04=(a,_,$)=>{const{prefix:j}=$;if(j!==base58btc4.prefix)throw Error(`Cannot string encode V0 in ${$.name} encoding`);const _e=_.get(j);if(_e==null){const et=$.encode(a).slice(1);return _.set(j,et),et}else return _e},toStringV14=(a,_,$)=>{const{prefix:j}=$,_e=_.get(j);if(_e==null){const et=$.encode(a);return _.set(j,et),et}else return _e},DAG_PB_CODE4=112,SHA_256_CODE4=18,encodeCID4=(a,_,$)=>{const j=encodingLength4(a),_e=j+encodingLength4(_),et=new Uint8Array(_e+$.byteLength);return encodeTo4(a,et,0),encodeTo4(_,et,j),et.set($,_e),et},cidSymbol4=Symbol.for("@ipld/js-cid/CID"),code4=85,MemoryBlockstore=class extends BaseBlockstore{constructor(){super();Dr(this,"data");this.data=new Map}put(_,$){return this.data.set(base324.encode(_.multihash.bytes),$),_}get(_){const $=this.data.get(base324.encode(_.multihash.bytes));if($==null)throw notFoundError();return $}has(_){return this.data.has(base324.encode(_.multihash.bytes))}async delete(_){this.data.delete(base324.encode(_.multihash.bytes))}async*getAll(){for(const[_,$]of this.data.entries())yield{cid:CID4.createV1(code4,decode19(base324.decode(_))),block:$}}};({...errors_exports});async function hashV0(a){const _=import_crypto3.default.createHash("sha256");if(a instanceof Uint8Array)_.update(a);else if(Symbol.asyncIterator in a)for await(const $ of a)_.update($);else throw new Error("Invalid value provided to hashStreamV0. Expected AsyncGenerator<Uint8Array> | AsyncIterable<Uint8Array> | Uint8Array");return CID.createV0(create(18,_.digest())).toString()}async function hashV1(a){const _=new MemoryBlockstore;let $;async function*j(){yield a}if(a instanceof Uint8Array)for await(const{cid:_e}of importer([{content:j()}],_,{cidVersion:1,rawLeaves:!0}))$=_e;else if(Symbol.asyncIterator in a)for await(const{cid:_e}of importer([{content:a}],_,{cidVersion:1,rawLeaves:!0}))$=_e;else throw new Error("Invalid value provided to hashStreamV1. Expected AsyncGenerator<Uint8Array> | AsyncIterable<Uint8Array> | Uint8Array");return`${$}`}function sortKeys(a,_){return compareStrings(a.hash,_.hash)||compareStrings(a.file,_.file)||0}function compareStrings(a,_){if(a===_)return 0;for(let $=0;$<Math.max(a.length,_.length);$++){if(a.charAt($)>_.charAt($))return 1;if(a.charAt($)<_.charAt($))return-1}return a.length>_.length?1:-1}function prepareADR32Data(a,_){return new TextEncoder().encode(JSON.stringify({content:a.sort(sortKeys).map($=>({key:$.file,hash:$.hash})),metadata:_}))}async function calculateMultipleHashesADR32(a,_){const $=prepareADR32Data(a,_);return{data:$,hash:await hashV1($)}}async function calculateMultipleHashesADR32LegacyQmHash(a,_){const $=prepareADR32Data(a,_);return{data:$,hash:await hashV0($)}}function number(a){if(!Number.isSafeInteger(a)||a<0)throw new Error(`Wrong positive integer: ${a}`)}function bool(a){if(typeof a!="boolean")throw new Error(`Expected boolean, not ${a}`)}function bytes(a,..._){if(!(a instanceof Uint8Array))throw new Error("Expected Uint8Array");if(_.length>0&&!_.includes(a.length))throw new Error(`Expected Uint8Array of length ${_}, not of length=${a.length}`)}function hash(a){if(typeof a!="function"||typeof a.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");number(a.outputLen),number(a.blockLen)}function exists2(a,_=!0){if(a.destroyed)throw new Error("Hash instance has been destroyed");if(_&&a.finished)throw new Error("Hash#digest() has already been called")}function output(a,_){bytes(a);const $=_.outputLen;if(a.length<$)throw new Error(`digestInto() expects output buffer of length at least ${$}`)}var assert={number,bool,bytes,hash,exists:exists2,output},assert_default=assert,U32_MASK64=BigInt(2**32-1),_32n=BigInt(32);function fromBig(a,_=!1){return _?{h:Number(a&U32_MASK64),l:Number(a>>_32n&U32_MASK64)}:{h:Number(a>>_32n&U32_MASK64)|0,l:Number(a&U32_MASK64)|0}}function split(a,_=!1){let $=new Uint32Array(a.length),j=new Uint32Array(a.length);for(let _e=0;_e<a.length;_e++){const{h:et,l:tt}=fromBig(a[_e],_);[$[_e],j[_e]]=[et,tt]}return[$,j]}var toBig=(a,_)=>BigInt(a>>>0)<<_32n|BigInt(_>>>0),shrSH=(a,_,$)=>a>>>$,shrSL=(a,_,$)=>a<<32-$|_>>>$,rotrSH=(a,_,$)=>a>>>$|_<<32-$,rotrSL=(a,_,$)=>a<<32-$|_>>>$,rotrBH=(a,_,$)=>a<<64-$|_>>>$-32,rotrBL=(a,_,$)=>a>>>$-32|_<<64-$,rotr32H=(a,_)=>_,rotr32L=(a,_)=>a,rotlSH=(a,_,$)=>a<<$|_>>>32-$,rotlSL=(a,_,$)=>_<<$|a>>>32-$,rotlBH=(a,_,$)=>_<<$-32|a>>>64-$,rotlBL=(a,_,$)=>a<<$-32|_>>>64-$;function add(a,_,$,j){const _e=(_>>>0)+(j>>>0);return{h:a+$+(_e/2**32|0)|0,l:_e|0}}var add3L=(a,_,$)=>(a>>>0)+(_>>>0)+($>>>0),add3H=(a,_,$,j)=>_+$+j+(a/2**32|0)|0,add4L=(a,_,$,j)=>(a>>>0)+(_>>>0)+($>>>0)+(j>>>0),add4H=(a,_,$,j,_e)=>_+$+j+_e+(a/2**32|0)|0,add5L=(a,_,$,j,_e)=>(a>>>0)+(_>>>0)+($>>>0)+(j>>>0)+(_e>>>0),add5H=(a,_,$,j,_e,et)=>_+$+j+_e+et+(a/2**32|0)|0,u64={fromBig,split,toBig,shrSH,shrSL,rotrSH,rotrSL,rotrBH,rotrBL,rotr32H,rotr32L,rotlSH,rotlSL,rotlBH,rotlBL,add,add3L,add3H,add4L,add4H,add5H,add5L},u64_default=u64,u8a=a=>a instanceof Uint8Array,u32=a=>new Uint32Array(a.buffer,a.byteOffset,Math.floor(a.byteLength/4)),isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!isLE)throw new Error("Non little-endian hardware is not supported");var hexes=Array.from({length:256},(a,_)=>_.toString(16).padStart(2,"0"));function bytesToHex(a){if(!u8a(a))throw new Error("Uint8Array expected");let _="";for(let $=0;$<a.length;$++)_+=hexes[a[$]];return _}function utf8ToBytes(a){if(typeof a!="string")throw new Error(`utf8ToBytes expected string, got ${typeof a}`);return new Uint8Array(new TextEncoder().encode(a))}function toBytes(a){if(typeof a=="string"&&(a=utf8ToBytes(a)),!u8a(a))throw new Error(`expected Uint8Array, got ${typeof a}`);return a}var Hash=class{clone(){return this._cloneInto()}};function wrapConstructor(a){const _=j=>a().update(toBytes(j)).digest(),$=a();return _.outputLen=$.outputLen,_.blockLen=$.blockLen,_.create=()=>a(),_}function wrapXOFConstructorWithOpts(a){const _=(j,_e)=>a(_e).update(toBytes(j)).digest(),$=a({});return _.outputLen=$.outputLen,_.blockLen=$.blockLen,_.create=j=>a(j),_}var[SHA3_PI,SHA3_ROTL,_SHA3_IOTA]=[[],[],[]],_0n=BigInt(0),_1n=BigInt(1),_2n=BigInt(2),_7n=BigInt(7),_256n=BigInt(256),_0x71n=BigInt(113);for(let a=0,_=_1n,$=1,j=0;a<24;a++){[$,j]=[j,(2*$+3*j)%5],SHA3_PI.push(2*(5*j+$)),SHA3_ROTL.push((a+1)*(a+2)/2%64);let _e=_0n;for(let et=0;et<7;et++)_=(_<<_1n^(_>>_7n)*_0x71n)%_256n,_&_2n&&(_e^=_1n<<(_1n<<BigInt(et))-_1n);_SHA3_IOTA.push(_e)}var[SHA3_IOTA_H,SHA3_IOTA_L]=u64_default.split(_SHA3_IOTA,!0),rotlH=(a,_,$)=>$>32?u64_default.rotlBH(a,_,$):u64_default.rotlSH(a,_,$),rotlL=(a,_,$)=>$>32?u64_default.rotlBL(a,_,$):u64_default.rotlSL(a,_,$);function keccakP(a,_=24){const $=new Uint32Array(10);for(let j=24-_;j<24;j++){for(let tt=0;tt<10;tt++)$[tt]=a[tt]^a[tt+10]^a[tt+20]^a[tt+30]^a[tt+40];for(let tt=0;tt<10;tt+=2){const rt=(tt+8)%10,at=(tt+2)%10,ct=$[at],dt=$[at+1],yt=rotlH(ct,dt,1)^$[rt],bt=rotlL(ct,dt,1)^$[rt+1];for(let Et=0;Et<50;Et+=10)a[tt+Et]^=yt,a[tt+Et+1]^=bt}let _e=a[2],et=a[3];for(let tt=0;tt<24;tt++){const rt=SHA3_ROTL[tt],at=rotlH(_e,et,rt),ct=rotlL(_e,et,rt),dt=SHA3_PI[tt];_e=a[dt],et=a[dt+1],a[dt]=at,a[dt+1]=ct}for(let tt=0;tt<50;tt+=10){for(let rt=0;rt<10;rt++)$[rt]=a[tt+rt];for(let rt=0;rt<10;rt++)a[tt+rt]^=~$[(rt+2)%10]&$[(rt+4)%10]}a[0]^=SHA3_IOTA_H[j],a[1]^=SHA3_IOTA_L[j]}$.fill(0)}var Keccak=class M0 extends Hash{constructor(_,$,j,_e=!1,et=24){if(super(),this.blockLen=_,this.suffix=$,this.outputLen=j,this.enableXOF=_e,this.rounds=et,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,assert_default.number(j),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=u32(this.state)}keccak(){keccakP(this.state32,this.rounds),this.posOut=0,this.pos=0}update(_){assert_default.exists(this);const{blockLen:$,state:j}=this;_=toBytes(_);const _e=_.length;for(let et=0;et<_e;){const tt=Math.min($-this.pos,_e-et);for(let rt=0;rt<tt;rt++)j[this.pos++]^=_[et++];this.pos===$&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:_,suffix:$,pos:j,blockLen:_e}=this;_[j]^=$,$&128&&j===_e-1&&this.keccak(),_[_e-1]^=128,this.keccak()}writeInto(_){assert_default.exists(this,!1),assert_default.bytes(_),this.finish();const $=this.state,{blockLen:j}=this;for(let _e=0,et=_.length;_e<et;){this.posOut>=j&&this.keccak();const tt=Math.min(j-this.posOut,et-_e);_.set($.subarray(this.posOut,this.posOut+tt),_e),this.posOut+=tt,_e+=tt}return _}xofInto(_){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(_)}xof(_){return assert_default.number(_),this.xofInto(new Uint8Array(_))}digestInto(_){if(assert_default.output(_,this),this.finished)throw new Error("digest() was already called");return this.writeInto(_),this.destroy(),_}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(_){const{blockLen:$,suffix:j,outputLen:_e,rounds:et,enableXOF:tt}=this;return _||(_=new M0($,j,_e,tt,et)),_.state32.set(this.state32),_.pos=this.pos,_.posOut=this.posOut,_.finished=this.finished,_.rounds=et,_.suffix=j,_.outputLen=_e,_.enableXOF=tt,_.destroyed=this.destroyed,_}},gen=(a,_,$)=>wrapConstructor(()=>new Keccak(_,a,$));gen(6,144,224/8),gen(6,136,256/8),gen(6,104,384/8),gen(6,72,512/8),gen(1,144,224/8);var keccak_256=gen(1,136,256/8);gen(1,104,384/8),gen(1,72,512/8);var genShake=(a,_,$)=>wrapXOFConstructorWithOpts((j={})=>new Keccak(_,a,j.dkLen===void 0?$:j.dkLen,!0));genShake(31,168,128/8),genShake(31,136,256/8);function wrapHash2(a){return _=>(assert_default.bytes(_),a(_))}(()=>{const a=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0,_=typeof commonjsRequire=="function"&&commonjsRequire.bind(module);return{node:_&&!a?_("crypto"):void 0,web:a}})();var keccak256=(()=>{const a=wrapHash2(keccak_256);return a.create=keccak_256.create,a})();function keccak256Hash(a,_){const $=JSON.stringify(pick(a,_)),j=new TextEncoder().encode($),_e=keccak256(j);return bytesToHex(_e)}var pick=(a,_)=>Object.fromEntries(_.filter($=>$ in a).map($=>[$,a[$]]));/*! Bundled license information:
135
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ct(Mt,Tt){if(Mt){if(typeof Mt=="string")return dt(Mt,Tt);var Rt=Object.prototype.toString.call(Mt).slice(8,-1);if(Rt==="Object"&&Mt.constructor&&(Rt=Mt.constructor.name),Rt==="Map"||Rt==="Set")return Array.from(Mt);if(Rt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Rt))return dt(Mt,Tt)}}function dt(Mt,Tt){(Tt==null||Tt>Mt.length)&&(Tt=Mt.length);for(var Rt=0,Ct=new Array(Tt);Rt<Tt;Rt++)Ct[Rt]=Mt[Rt];return Ct}function yt(Mt,Tt){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(Mt)))){var Rt=[],Ct=!0,It=!1,kt=void 0;try{for(var Dt=Mt[Symbol.iterator](),Bt;!(Ct=(Bt=Dt.next()).done)&&(Rt.push(Bt.value),!(Tt&&Rt.length===Tt));Ct=!0);}catch(zt){It=!0,kt=zt}finally{try{!Ct&&Dt.return!=null&&Dt.return()}finally{if(It)throw kt}}return Rt}}function bt(Mt){if(Array.isArray(Mt))return Mt}var Et={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},$t=/^\[([^\]]+)\](?::([0-9]+))?$/;function _t(Mt){return Object.prototype.toString.call(Mt)==="[object RegExp]"}function xt(Mt,Tt){for(var Rt=0;Rt<Tt.length;Rt++){var Ct=Tt[Rt];if(Mt===Ct||_t(Ct)&&Ct.test(Mt))return!0}return!1}function St(Mt,Tt){if((0,$.default)(Mt),!Mt||/[\s<>]/.test(Mt)||Mt.indexOf("mailto:")===0||(Tt=(0,et.default)(Tt,Et),Tt.validate_length&&Mt.length>=2083)||!Tt.allow_fragments&&Mt.includes("#")||!Tt.allow_query_components&&(Mt.includes("?")||Mt.includes("&")))return!1;var Rt,Ct,It,kt,Dt,Bt,zt,vt;if(zt=Mt.split("#"),Mt=zt.shift(),zt=Mt.split("?"),Mt=zt.shift(),zt=Mt.split("://"),zt.length>1){if(Rt=zt.shift().toLowerCase(),Tt.require_valid_protocol&&Tt.protocols.indexOf(Rt)===-1)return!1}else{if(Tt.require_protocol)return!1;if(Mt.slice(0,2)==="//"){if(!Tt.allow_protocol_relative_urls)return!1;zt[0]=Mt.slice(2)}}if(Mt=zt.join("://"),Mt==="")return!1;if(zt=Mt.split("/"),Mt=zt.shift(),Mt===""&&!Tt.require_host)return!0;if(zt=Mt.split("@"),zt.length>1){if(Tt.disallow_auth||zt[0]===""||(Ct=zt.shift(),Ct.indexOf(":")>=0&&Ct.split(":").length>2))return!1;var nt=Ct.split(":"),st=rt(nt,2),lt=st[0],ht=st[1];if(lt===""&&ht==="")return!1}kt=zt.join("@"),Bt=null,vt=null;var mt=kt.match($t);if(mt?(It="",vt=mt[1],Bt=mt[2]||null):(zt=kt.split(":"),It=zt.shift(),zt.length&&(Bt=zt.join(":"))),Bt!==null&&Bt.length>0){if(Dt=parseInt(Bt,10),!/^[0-9]+$/.test(Bt)||Dt<=0||Dt>65535)return!1}else if(Tt.require_port)return!1;return Tt.host_whitelist?xt(It,Tt.host_whitelist):It===""&&!Tt.require_host?!0:!(!(0,_e.default)(It)&&!(0,j.default)(It,Tt)&&(!vt||!(0,_e.default)(vt,6))||(It=It||vt,Tt.host_blacklist&&xt(It,Tt.host_blacklist)))}a.exports=_.default,a.exports.default=_.default})(isURL,isURL.exports);var isURLExports=isURL.exports,SingleSignOn_shared={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.localStorageClearIdentity=a.localStorageStoreIdentity=a.localStorageGetIdentity=a.createMessage=a.SINGLE_SIGN_ON_TARGET=a.Action=void 0;var _;(function(rt){rt.GET="get",rt.STORE="store",rt.CLEAR="clear",rt.PING="ping"})(_||(a.Action=_={})),a.SINGLE_SIGN_ON_TARGET="single-sign-on";function $(rt){return{target:a.SINGLE_SIGN_ON_TARGET,...rt}}a.createMessage=$;function j(rt){const at=localStorage.getItem(tt(rt));if(!at)return null;let ct;try{ct=JSON.parse(at)}catch{return et(rt),null}return ct.expiration=new Date(ct.expiration),ct.expiration.getTime()<=Date.now()?(et(rt),null):ct}a.localStorageGetIdentity=j;function _e(rt,at){new Date(at.expiration).getTime()>Date.now()&&localStorage.setItem(tt(rt),JSON.stringify(at))}a.localStorageStoreIdentity=_e;function et(rt){localStorage.removeItem(tt(rt))}a.localStorageClearIdentity=et;function tt(rt){if(!/^0x[a-fA-F0-9]{40}$/.test(rt))throw new Error("User must be a valid ethereum address");return`single-sign-on-${rt.toLowerCase()}`}})(SingleSignOn_shared);Object.defineProperty(SingleSignOn,"__esModule",{value:!0});SingleSignOn.clearIdentity=SingleSignOn.storeIdentity=SingleSignOn.getIdentity=SingleSignOn.init=void 0;const isURL_1=isURLExports,SingleSignOn_shared_1=SingleSignOn_shared,IFRAME_ID=SingleSignOn_shared_1.SINGLE_SIGN_ON_TARGET,GET_IFRAME_TIMEOUT=500,GET_IFRAME_RETRIES=5;let _counter=0,_src="";const defaultOptions$1={protocols:["https"],require_protocol:!0};function init(a,_={}){if(!(0,isURL_1.default)(a,{...defaultOptions$1,..._}))throw new Error(`Invalid url: ${a}`);if(_src)throw new Error("Already initialized");const $=document.createElement("iframe");$.id=IFRAME_ID,$.src=a,$.style.width="0",$.style.height="0",$.style.border="none",$.style.position="absolute",document.body.appendChild($),_src=a}SingleSignOn.init=init;async function getIdentity(a){let _;try{_=(await postMessage(await getIframe(),SingleSignOn_shared_1.Action.GET,{user:a})).identity??null}catch($){logFallback($),_=(0,SingleSignOn_shared_1.localStorageGetIdentity)(a)}return _}SingleSignOn.getIdentity=getIdentity;async function storeIdentity(a,_){try{await postMessage(await getIframe(),SingleSignOn_shared_1.Action.STORE,{user:a,identity:_})}catch($){logFallback($),(0,SingleSignOn_shared_1.localStorageStoreIdentity)(a,_)}}SingleSignOn.storeIdentity=storeIdentity;async function clearIdentity(a){try{await postMessage(await getIframe(),SingleSignOn_shared_1.Action.CLEAR,{user:a})}catch(_){logFallback(_),(0,SingleSignOn_shared_1.localStorageClearIdentity)(a)}}SingleSignOn.clearIdentity=clearIdentity;async function getIframe(){if(!_src)throw new Error("Not initialized");for(let a=0;a<GET_IFRAME_RETRIES;a++){const _=document.getElementById(IFRAME_ID),$=_==null?void 0:_.contentWindow;if(!$){await wait$1(GET_IFRAME_TIMEOUT);continue}try{await postMessage($,SingleSignOn_shared_1.Action.PING,{},GET_IFRAME_TIMEOUT)}catch{continue}return $}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function postMessage(a,_,$,j=0){_counter++;const _e=_counter;let et=null;const tt=new Promise((rt,at)=>{et=({data:ct})=>{!ct||ct.target!==SingleSignOn_shared_1.SINGLE_SIGN_ON_TARGET||ct.id!==_e||(ct.error?at(new Error(ct.error)):rt(ct))},window.addEventListener("message",et)});a.postMessage((0,SingleSignOn_shared_1.createMessage)({id:_e,action:_,...$}),_src);try{return await(j?Promise.race([tt,new Promise((rt,at)=>setTimeout(()=>at(new Error("Did not receive a response in time")),j))]):tt)}catch(rt){throw rt}finally{et&&window.removeEventListener("message",et)}}function wait$1(a){return new Promise(_=>setTimeout(_,a))}function logFallback(a){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",a.message)}(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(SingleSignOn,a),$(SingleSignOn_shared,a)})(dist$5);const STORAGE_KEY_ADDRESS="auth-server-provider-address",STORAGE_KEY_CHAIN_ID="auth-server-provider-chain-id";function isRPCError(a){return typeof a=="object"&&a!==void 0&&a!==null&&"message"in a&&"code"in a}function isErrorWithMessage$1(a){return typeof a=="object"&&a!==void 0&&a!==null&&"message"in a}class AuthServerProvider{constructor(){this.getChainId=()=>{const _=localStorage.getItem(STORAGE_KEY_CHAIN_ID);return _?Number(_):dist$8.ChainId.ETHEREUM_MAINNET},this.getAccount=()=>AuthServerProvider.getAccount(),this.request=async({method:_,params:$})=>{if(_==="wallet_switchEthereumChain"){const rt=parseInt($[0].chainId,16).toString();localStorage.setItem(STORAGE_KEY_CHAIN_ID,rt);return}if(["eth_chainId","net_version"].includes(_))return this.getChainId();if(["eth_accounts","eth_requestAccounts"].includes(_)){const rt=this.getAccount();return rt?[rt]:[]}if(["eth_getTransactionReceipt","eth_estimateGas","eth_call","eth_getBalance","eth_getStorageAt","eth_blockNumber","eth_gasPrice","eth_protocolVersion","net_version","web3_sha3","web3_clientVersion","eth_getTransactionCount","eth_getBlockByNumber","eth_getCode"].includes(_))return new JsonRpcProvider(getRpcUrls(dist$8.ProviderType.AUTH_SERVER)[this.getChainId()]).send(_,$);const j=await AuthServerProvider.getSocket(),_e=this.getIdentity(),et=await AuthServerProvider.createRequest(j,{method:_,params:$,authChain:_e==null?void 0:_e.authChain});AuthServerProvider.openAuthDapp(et);const tt=await AuthServerProvider.awaitOutcomeWithTimeout(j,et);if(tt.error)throw tt.error;return tt.result},this.sendAsync=async(_,$)=>{try{const j=await this.request(_);$(null,j)}catch(j){isRPCError(j)?$(j,{error:j,id:void 0,jsonrpc:"2.0"}):$({code:999,message:isErrorWithMessage$1(j)?j.message:"Unknown error"},{error:{code:0,message:isErrorWithMessage$1(j)?j.message:"Unknown error"},id:void 0,jsonrpc:"2.0"})}},this.deactivate=()=>{AuthServerProvider.deactivate()},this.getIdentity=()=>{const _=AuthServerProvider.getAccount();return _?dist$5.localStorageGetIdentity(_):null}}static setAuthServerUrl(_){AuthServerProvider.authServerUrl=_}static setAuthDappUrl(_){AuthServerProvider.authDappUrl=_}static setIdentityExpiration(_){AuthServerProvider.identityExpirationInMillis=_}static setOpenBrowser(_){AuthServerProvider.openBrowser=_}}AuthServerProvider.authServerUrl="";AuthServerProvider.authDappUrl="";AuthServerProvider.identityExpirationInMillis=30*24*60*60*1e3;AuthServerProvider.initSignIn=async()=>{const a=await AuthServerProvider.getSocket(),_=Wallet.createRandom(),$=new Date(Date.now()+AuthServerProvider.identityExpirationInMillis),j=dist$7.Authenticator.getEphemeralMessage(_.address,$),_e=await AuthServerProvider.createRequest(a,{method:"dcl_personal_sign",params:[j]});return{socket:a,ephemeralAccount:_,expiration:$,ephemeralMessage:j,requestResponse:_e}};AuthServerProvider.finishSignIn=async({socket:a,ephemeralAccount:_,expiration:$,ephemeralMessage:j,requestResponse:_e})=>{AuthServerProvider.openAuthDapp(_e);const{sender:et,result:tt}=await AuthServerProvider.awaitOutcomeWithTimeout(a,_e),rt={expiration:$,ephemeralIdentity:{address:_.address,privateKey:_.privateKey,publicKey:_.publicKey},authChain:[{type:dist$7.AuthLinkType.SIGNER,payload:et.toLowerCase(),signature:""},{type:dist$7.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL,payload:j,signature:tt}]};localStorage.setItem(STORAGE_KEY_ADDRESS,et.toLowerCase()),dist$5.localStorageStoreIdentity(et,rt)};AuthServerProvider.getAccount=()=>localStorage.getItem(STORAGE_KEY_ADDRESS);AuthServerProvider.deactivate=()=>{const a=AuthServerProvider.getAccount();a&&dist$5.localStorageClearIdentity(a),localStorage.removeItem(STORAGE_KEY_ADDRESS),localStorage.removeItem(STORAGE_KEY_CHAIN_ID)};AuthServerProvider.hasValidIdentity=()=>{const a=AuthServerProvider.getAccount();return a?!!dist$5.localStorageGetIdentity(a):!1};AuthServerProvider.awaitOutcomeWithTimeout=async(a,_)=>{const $=new Promise((_e,et)=>{setTimeout(()=>{et(new Error("Timeout"))},new Date(_.expiration).getTime()-Date.now())}),j=new Promise(_e=>{const et=tt=>{tt.requestId===_.requestId&&(a.off("message",et),_e(tt))};a.on("outcome",et)});try{return await Promise.race([$,j])}finally{a.disconnect()}};AuthServerProvider.openAuthDapp=a=>{const _=`${AuthServerProvider.authDappUrl}/requests/${a.requestId}`,$="_blank",j="noopener,noreferrer";AuthServerProvider.openBrowser?AuthServerProvider.openBrowser(_,$,j):window.open(_,$,j)};AuthServerProvider.getSocket=async()=>{const a=lookup(AuthServerProvider.authServerUrl);return await new Promise(_=>{const $=()=>{a.off("connect",$),_()};a.on("connect",$)}),a};AuthServerProvider.createRequest=async(a,_)=>{const $=await a.emitWithAck("request",{method:_.method,params:_.params,authChain:_.authChain});if($.error)throw a.disconnect(),new Error($.error);return $};class AuthServerConnector extends AbstractConnector{constructor(){super(),this.activate=async()=>{const _=this.provider.getAccount();if(!_)throw new Error("Cannot activate the Auth Server Connector");return{provider:this.provider,chainId:this.provider.getChainId(),account:_}},this.getProvider=async()=>this.provider,this.getChainId=async()=>this.provider.getChainId(),this.getAccount=async()=>this.provider.getAccount(),this.provider=new AuthServerProvider}deactivate(){this.provider.deactivate()}}class Storage{}class LocalStorage extends Storage{get(_){const $=window.localStorage.getItem(_);return $===null?void 0:$}set(_,$){window.localStorage.setItem(_,$)}remove(_){window.localStorage.removeItem(_)}removeRegExp(_){for(let $=localStorage.length-1;$>=0;$--){const j=localStorage.key($);j&&_.test(j)&&localStorage.removeItem(j)}}}class ProviderAdapter{constructor(_){this.provider=_,this.id=0,this.on=($,j)=>this.provider.on($,j),this.emit=($,...j)=>this.provider.emit($,j),this.removeListener=($,j)=>this.provider.removeListener($,j),this.request=async({method:$,params:j})=>this.isModernProvider()?this.provider.request({method:$,params:j}):this.send($,j),this.sendAsync=async($,j)=>this.hasSendAsync()?this.provider.sendAsync($,(_e,et)=>{et&&!et.hasOwnProperty("result")?j(_e,{id:0,jsonrpc:"2.0",result:et}):j(_e,et)}):this.send($,j)}static adapt(_){const $=new ProviderAdapter(_);return{..._,on:$.on,emit:$.emit,removeListener:$.removeListener,request:$.request,sendAsync:$.sendAsync,send:$.send.bind($)}}async send(_,$){let j,_e,et;const tt=typeof $=="function";if(tt){const rt=_;_e=rt.params||[],j=rt.method,et=$}else j=_,_e=$||[],et=(rt,at)=>{if(rt)throw rt;return at};if(this.isModernProvider()){const[rt,at]=await this.provider.request({method:j,params:_e}).then(dt=>[null,dt]).catch(dt=>[dt,void 0]);return et(rt,tt?{id:"",jsonrpc:"2.0",result:at}:at)}else{this.patchOldMobile();const[rt,at]=tt?await new Promise(ct=>this.provider.send(_,(dt,yt)=>{ct([dt,yt])})):await new Promise(ct=>this.provider.send({jsonrpc:"2.0",id:++this.id,method:j,params:_e},(dt,yt)=>{ct([yt&&yt.hasOwnProperty("error")?yt.error:dt,yt&&yt.hasOwnProperty("result")?yt.result:yt])}));return et(rt,at)}}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 ConnectionManager{constructor(_){this.storage=_,this.getWalletName=()=>{if(this.connector instanceof WalletConnectV2Connector)return this.connector.getWalletName()},this.clearConnectionData=()=>{const{storageKey:$}=getConfiguration();this.storage.remove($),WalletConnectV2Connector.clearStorage(this.storage)},this.handleWeb3ReactDeactivate=async()=>{try{await this.disconnect()}catch($){console.error($)}}}async connect(_,$=chainIdExports.ChainId.ETHEREUM_MAINNET){if(this.connector)try{await this.disconnect()}catch(rt){console.error("Error disconnecting previous connection",rt)}const j=this.buildConnector(_,$);j.on(ConnectorEvent.Deactivate,this.handleWeb3ReactDeactivate);let{provider:_e,account:et}={};try{const rt=await j.activate();_e=rt.provider,et=rt.account}catch(rt){throw console.error("Error activating the connector",rt),rt}(_===providerType$2.ProviderType.MAGIC||_===providerType$2.ProviderType.MAGIC_TEST)&&j.on(ConnectorEvent.Update,({chainId:rt})=>{rt&&this.setConnectionData(_,rt)});let tt=$;if(_===providerType$2.ProviderType.INJECTED){const rt=await _e.request({method:"eth_chainId"});tt=rt?parseInt(rt,16):tt}return this.connector=j,this.setConnectionData(_,tt),{provider:ProviderAdapter.adapt(_e),providerType:_,account:et||"",chainId:tt}}isConnected(){return!!this.connector&&!!this.getConnectionData()}async tryPreviousConnection(){const _=this.getConnectionData();if(!_)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:_.providerType,chainId:_.chainId,account:await this.connector.getAccount()};const $=this.promiseOfConnection?await this.promiseOfConnection:await(this.promiseOfConnection=this.connect(_.providerType,_.chainId));return this.promiseOfConnection=void 0,{...$,chainId:this.getConnectionData().chainId}}getAvailableProviders(){const _=[providerType$2.ProviderType.FORTMATIC,providerType$2.ProviderType.WALLET_CONNECT,providerType$2.ProviderType.WALLET_LINK];return typeof window<"u"&&window.ethereum!==void 0?_.unshift(providerType$2.ProviderType.INJECTED):_.unshift(providerType$2.ProviderType.METAMASK_MOBILE),_}async disconnect(){this.connector&&(this.connector.removeAllListeners(ConnectorEvent.Deactivate),this.connector.removeAllListeners(ConnectorEvent.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(_,$=chainIdExports.ChainId.ETHEREUM_MAINNET){const _e=await this.buildConnector(_,$).getProvider();return ProviderAdapter.adapt(_e)}buildConnector(_,$){switch(_){case providerType$2.ProviderType.INJECTED:return new InjectedConnector($);case providerType$2.ProviderType.FORTMATIC:return new FortmaticConnector($);case providerType$2.ProviderType.MAGIC:return new MagicConnector($);case providerType$2.ProviderType.MAGIC_TEST:return new MagicTestConnector($);case providerType$2.ProviderType.WALLET_LINK:return new WalletLinkConnector($);case providerType$2.ProviderType.NETWORK:return new NetworkConnector($);case providerType$2.ProviderType.WALLET_CONNECT_V2:return new WalletConnectV2Connector($);case providerType$2.ProviderType.AUTH_SERVER:return new AuthServerConnector;default:throw new Error(`Invalid provider ${_}`)}}getConnectionData(){const{storageKey:_}=getConfiguration(),$=this.storage.get(_);return $?JSON.parse($):void 0}setConnectionData(_,$){const{storageKey:j}=getConfiguration(),_e=JSON.stringify({providerType:_,chainId:$});this.storage.set(j,_e)}isClosableConnector(){return this.connector&&typeof this.connector.close<"u"}}const connection$1=new ConnectionManager(new LocalStorage),useNavigateWithSearchParams=()=>{const a=useNavigate(),_=useLocation();return reactExports.useCallback(j=>{if(!j)throw new Error("Path cannot be empty");let _e;try{if(_e=new URL(j,window.location.origin),!_e.pathname)throw new Error("Invalid path provided")}catch{throw new Error("Invalid path provided")}const et=_e.pathname,tt=new URLSearchParams(_e.search),at=new URLSearchParams(_.search).get("targetConfigId");at&&tt.set("targetConfigId",at);const ct=tt.toString();a({pathname:et,search:ct?`?${ct}`:void 0})},[a,_])},logoImg="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239440432.commit-2fa6a22/assets/logo-9a364aec.svg",ONE_MONTH_IN_MINUTES=60*24*30;function fromConnectionOptionToProviderType(a,_){switch(a){case ConnectionOptionType.DISCORD:case ConnectionOptionType.X:case ConnectionOptionType.GOOGLE:case ConnectionOptionType.APPLE:return _?providerType$2.ProviderType.MAGIC_TEST:providerType$2.ProviderType.MAGIC;case ConnectionOptionType.WALLET_CONNECT:case ConnectionOptionType.METAMASK_MOBILE:return providerType$2.ProviderType.WALLET_CONNECT_V2;case ConnectionOptionType.COINBASE:case ConnectionOptionType.WALLET_LINK:return providerType$2.ProviderType.WALLET_LINK;case ConnectionOptionType.FORTMATIC:return providerType$2.ProviderType.FORTMATIC;case ConnectionOptionType.METAMASK:case ConnectionOptionType.DAPPER:case ConnectionOptionType.SAMSUNG:return providerType$2.ProviderType.INJECTED;default:throw new Error("Invalid provider")}}async function generateIdentity(a,_){const $=new BrowserProvider(_),j=Wallet.createRandom(),_e={address:j.address.toString(),publicKey:hexlify(j.publicKey),privateKey:hexlify(j.privateKey)},et=await $.getSigner();return dist$7.Authenticator.initializeAuthChain(a,_e,ONE_MONTH_IN_MINUTES,tt=>et.signMessage(tt))}async function connectToSocialProvider(a,_,$){const j=_?getConfiguration().magic_test.apiKey:getConfiguration().magic.apiKey,_e=fromConnectionOptionToProviderType(a,_);if(providerType$2.ProviderType.MAGIC===_e||providerType$2.ProviderType.MAGIC_TEST===_e){const{Magic:et}=await __vitePreload(()=>import("./index-0ee79f8d.js"),["assets/index-0ee79f8d.js","assets/index-cd62a0db.js"]),{OAuthExtension:tt}=await __vitePreload(()=>import("./index-d364b022.js"),["assets/index-d364b022.js","assets/index-cd62a0db.js"]),rt=new et(j,{extensions:[new tt]}),at=new URL(window.location.href);at.pathname="/auth/callback",at.search="",await(rt==null?void 0:rt.oauth2.loginWithRedirect({provider:a===ConnectionOptionType.X?"twitter":a,redirectURI:at.href,customData:$}))}}async function connectToProvider(a){const _=fromConnectionOptionToProviderType(a);let $;try{$=await connection$1.connect(_)}catch(j){throw console.error("Error connecting to provider",j),j}if(!$.account||!$.provider)throw new Error("Could not get provider");return $}function isSocialLogin(a){return[ConnectionOptionType.APPLE,ConnectionOptionType.GOOGLE,ConnectionOptionType.X,ConnectionOptionType.DISCORD].includes(a)}async function getIdentitySignature(a,_){let $;const j=dist$5.localStorageGetIdentity(a);return j?$=j:($=await generateIdentity(a,_),dist$5.localStorageStoreIdentity(a,$)),$}function isMobile$1(){const a=navigator.userAgent;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)}var Popup={},isElement_1,hasRequiredIsElement;function requireIsElement(){if(hasRequiredIsElement)return isElement_1;hasRequiredIsElement=1;var a=requireIsObjectLike(),_=requireIsPlainObject();function $(j){return a(j)&&j.nodeType===1&&!_(j)}return isElement_1=$,isElement_1}var _arrayReduce,hasRequired_arrayReduce;function require_arrayReduce(){if(hasRequired_arrayReduce)return _arrayReduce;hasRequired_arrayReduce=1;function a(_,$,j,_e){var et=-1,tt=_==null?0:_.length;for(_e&&tt&&(j=_[++et]);++et<tt;)j=$(j,_[et],et,_);return j}return _arrayReduce=a,_arrayReduce}var _baseReduce,hasRequired_baseReduce;function require_baseReduce(){if(hasRequired_baseReduce)return _baseReduce;hasRequired_baseReduce=1;function a(_,$,j,_e,et){return et(_,function(tt,rt,at){j=_e?(_e=!1,tt):$(j,tt,rt,at)}),j}return _baseReduce=a,_baseReduce}var reduce_1,hasRequiredReduce;function requireReduce(){if(hasRequiredReduce)return reduce_1;hasRequiredReduce=1;var a=require_arrayReduce(),_=require_baseEach(),$=require_baseIteratee(),j=require_baseReduce(),_e=requireIsArray();function et(tt,rt,at){var ct=_e(tt)?a:j,dt=arguments.length<3;return ct(tt,$(rt,4),at,dt,_)}return reduce_1=et,reduce_1}var ManagerReferenceNodeContext=reactExports.createContext(),ManagerReferenceNodeSetterContext=reactExports.createContext();function Manager(a){var _=a.children,$=reactExports.useState(null),j=$[0],_e=$[1],et=reactExports.useRef(!1);reactExports.useEffect(function(){return function(){et.current=!0}},[]);var tt=reactExports.useCallback(function(rt){et.current||_e(rt)},[]);return reactExports.createElement(ManagerReferenceNodeContext.Provider,{value:j},reactExports.createElement(ManagerReferenceNodeSetterContext.Provider,{value:tt},_))}var unwrapArray=function(_){return Array.isArray(_)?_[0]:_},safeInvoke=function(_){if(typeof _=="function"){for(var $=arguments.length,j=new Array($>1?$-1:0),_e=1;_e<$;_e++)j[_e-1]=arguments[_e];return _.apply(void 0,j)}},setRef=function(_,$){if(typeof _=="function")return safeInvoke(_,$);_!=null&&(_.current=$)},fromEntries=function(_){return _.reduce(function($,j){var _e=j[0],et=j[1];return $[_e]=et,$},{})},useIsomorphicLayoutEffect=typeof window<"u"&&window.document&&window.document.createElement?reactExports.useLayoutEffect:reactExports.useEffect,top="top",bottom="bottom",right$3="right",left$3="left",auto="auto",basePlacements=[top,bottom,right$3,left$3],start="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce(function(a,_){return a.concat([_+"-"+start,_+"-"+end])},[]),placements=[].concat(basePlacements,[auto]).reduce(function(a,_){return a.concat([_,_+"-"+start,_+"-"+end])},[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main$7="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main$7,afterMain,beforeWrite,write,afterWrite];function getNodeName(a){return a?(a.nodeName||"").toLowerCase():null}function getWindow(a){if(a==null)return window;if(a.toString()!=="[object Window]"){var _=a.ownerDocument;return _&&_.defaultView||window}return a}function isElement$1(a){var _=getWindow(a).Element;return a instanceof _||a instanceof Element}function isHTMLElement(a){var _=getWindow(a).HTMLElement;return a instanceof _||a instanceof HTMLElement}function isShadowRoot(a){if(typeof ShadowRoot>"u")return!1;var _=getWindow(a).ShadowRoot;return a instanceof _||a instanceof ShadowRoot}function applyStyles(a){var _=a.state;Object.keys(_.elements).forEach(function($){var j=_.styles[$]||{},_e=_.attributes[$]||{},et=_.elements[$];!isHTMLElement(et)||!getNodeName(et)||(Object.assign(et.style,j),Object.keys(_e).forEach(function(tt){var rt=_e[tt];rt===!1?et.removeAttribute(tt):et.setAttribute(tt,rt===!0?"":rt)}))})}function effect$2(a){var _=a.state,$={popper:{position:_.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(_.elements.popper.style,$.popper),_.styles=$,_.elements.arrow&&Object.assign(_.elements.arrow.style,$.arrow),function(){Object.keys(_.elements).forEach(function(j){var _e=_.elements[j],et=_.attributes[j]||{},tt=Object.keys(_.styles.hasOwnProperty(j)?_.styles[j]:$[j]),rt=tt.reduce(function(at,ct){return at[ct]="",at},{});!isHTMLElement(_e)||!getNodeName(_e)||(Object.assign(_e.style,rt),Object.keys(et).forEach(function(at){_e.removeAttribute(at)}))})}}const applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(a){return a.split("-")[0]}var max=Math.max,min=Math.min,round=Math.round;function getUAString(){var a=navigator.userAgentData;return a!=null&&a.brands&&Array.isArray(a.brands)?a.brands.map(function(_){return _.brand+"/"+_.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(a,_,$){_===void 0&&(_=!1),$===void 0&&($=!1);var j=a.getBoundingClientRect(),_e=1,et=1;_&&isHTMLElement(a)&&(_e=a.offsetWidth>0&&round(j.width)/a.offsetWidth||1,et=a.offsetHeight>0&&round(j.height)/a.offsetHeight||1);var tt=isElement$1(a)?getWindow(a):window,rt=tt.visualViewport,at=!isLayoutViewport()&&$,ct=(j.left+(at&&rt?rt.offsetLeft:0))/_e,dt=(j.top+(at&&rt?rt.offsetTop:0))/et,yt=j.width/_e,bt=j.height/et;return{width:yt,height:bt,top:dt,right:ct+yt,bottom:dt+bt,left:ct,x:ct,y:dt}}function getLayoutRect(a){var _=getBoundingClientRect(a),$=a.offsetWidth,j=a.offsetHeight;return Math.abs(_.width-$)<=1&&($=_.width),Math.abs(_.height-j)<=1&&(j=_.height),{x:a.offsetLeft,y:a.offsetTop,width:$,height:j}}function contains(a,_){var $=_.getRootNode&&_.getRootNode();if(a.contains(_))return!0;if($&&isShadowRoot($)){var j=_;do{if(j&&a.isSameNode(j))return!0;j=j.parentNode||j.host}while(j)}return!1}function getComputedStyle(a){return getWindow(a).getComputedStyle(a)}function isTableElement(a){return["table","td","th"].indexOf(getNodeName(a))>=0}function getDocumentElement(a){return((isElement$1(a)?a.ownerDocument:a.document)||window.document).documentElement}function getParentNode(a){return getNodeName(a)==="html"?a:a.assignedSlot||a.parentNode||(isShadowRoot(a)?a.host:null)||getDocumentElement(a)}function getTrueOffsetParent(a){return!isHTMLElement(a)||getComputedStyle(a).position==="fixed"?null:a.offsetParent}function getContainingBlock(a){var _=/firefox/i.test(getUAString()),$=/Trident/i.test(getUAString());if($&&isHTMLElement(a)){var j=getComputedStyle(a);if(j.position==="fixed")return null}var _e=getParentNode(a);for(isShadowRoot(_e)&&(_e=_e.host);isHTMLElement(_e)&&["html","body"].indexOf(getNodeName(_e))<0;){var et=getComputedStyle(_e);if(et.transform!=="none"||et.perspective!=="none"||et.contain==="paint"||["transform","perspective"].indexOf(et.willChange)!==-1||_&&et.willChange==="filter"||_&&et.filter&&et.filter!=="none")return _e;_e=_e.parentNode}return null}function getOffsetParent(a){for(var _=getWindow(a),$=getTrueOffsetParent(a);$&&isTableElement($)&&getComputedStyle($).position==="static";)$=getTrueOffsetParent($);return $&&(getNodeName($)==="html"||getNodeName($)==="body"&&getComputedStyle($).position==="static")?_:$||getContainingBlock(a)||_}function getMainAxisFromPlacement(a){return["top","bottom"].indexOf(a)>=0?"x":"y"}function within(a,_,$){return max(a,min(_,$))}function withinMaxClamp(a,_,$){var j=within(a,_,$);return j>$?$:j}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(a){return Object.assign({},getFreshSideObject(),a)}function expandToHashMap(a,_){return _.reduce(function($,j){return $[j]=a,$},{})}var toPaddingObject=function(_,$){return _=typeof _=="function"?_(Object.assign({},$.rects,{placement:$.placement})):_,mergePaddingObject(typeof _!="number"?_:expandToHashMap(_,basePlacements))};function arrow(a){var _,$=a.state,j=a.name,_e=a.options,et=$.elements.arrow,tt=$.modifiersData.popperOffsets,rt=getBasePlacement($.placement),at=getMainAxisFromPlacement(rt),ct=[left$3,right$3].indexOf(rt)>=0,dt=ct?"height":"width";if(!(!et||!tt)){var yt=toPaddingObject(_e.padding,$),bt=getLayoutRect(et),Et=at==="y"?top:left$3,$t=at==="y"?bottom:right$3,_t=$.rects.reference[dt]+$.rects.reference[at]-tt[at]-$.rects.popper[dt],xt=tt[at]-$.rects.reference[at],St=getOffsetParent(et),Mt=St?at==="y"?St.clientHeight||0:St.clientWidth||0:0,Tt=_t/2-xt/2,Rt=yt[Et],Ct=Mt-bt[dt]-yt[$t],It=Mt/2-bt[dt]/2+Tt,kt=within(Rt,It,Ct),Dt=at;$.modifiersData[j]=(_={},_[Dt]=kt,_.centerOffset=kt-It,_)}}function effect$1(a){var _=a.state,$=a.options,j=$.element,_e=j===void 0?"[data-popper-arrow]":j;_e!=null&&(typeof _e=="string"&&(_e=_.elements.popper.querySelector(_e),!_e)||contains(_.elements.popper,_e)&&(_.elements.arrow=_e))}const arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(a){return a.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(a,_){var $=a.x,j=a.y,_e=_.devicePixelRatio||1;return{x:round($*_e)/_e||0,y:round(j*_e)/_e||0}}function mapToStyles(a){var _,$=a.popper,j=a.popperRect,_e=a.placement,et=a.variation,tt=a.offsets,rt=a.position,at=a.gpuAcceleration,ct=a.adaptive,dt=a.roundOffsets,yt=a.isFixed,bt=tt.x,Et=bt===void 0?0:bt,$t=tt.y,_t=$t===void 0?0:$t,xt=typeof dt=="function"?dt({x:Et,y:_t}):{x:Et,y:_t};Et=xt.x,_t=xt.y;var St=tt.hasOwnProperty("x"),Mt=tt.hasOwnProperty("y"),Tt=left$3,Rt=top,Ct=window;if(ct){var It=getOffsetParent($),kt="clientHeight",Dt="clientWidth";if(It===getWindow($)&&(It=getDocumentElement($),getComputedStyle(It).position!=="static"&&rt==="absolute"&&(kt="scrollHeight",Dt="scrollWidth")),It=It,_e===top||(_e===left$3||_e===right$3)&&et===end){Rt=bottom;var Bt=yt&&It===Ct&&Ct.visualViewport?Ct.visualViewport.height:It[kt];_t-=Bt-j.height,_t*=at?1:-1}if(_e===left$3||(_e===top||_e===bottom)&&et===end){Tt=right$3;var zt=yt&&It===Ct&&Ct.visualViewport?Ct.visualViewport.width:It[Dt];Et-=zt-j.width,Et*=at?1:-1}}var vt=Object.assign({position:rt},ct&&unsetSides),nt=dt===!0?roundOffsetsByDPR({x:Et,y:_t},getWindow($)):{x:Et,y:_t};if(Et=nt.x,_t=nt.y,at){var st;return Object.assign({},vt,(st={},st[Rt]=Mt?"0":"",st[Tt]=St?"0":"",st.transform=(Ct.devicePixelRatio||1)<=1?"translate("+Et+"px, "+_t+"px)":"translate3d("+Et+"px, "+_t+"px, 0)",st))}return Object.assign({},vt,(_={},_[Rt]=Mt?_t+"px":"",_[Tt]=St?Et+"px":"",_.transform="",_))}function computeStyles(a){var _=a.state,$=a.options,j=$.gpuAcceleration,_e=j===void 0?!0:j,et=$.adaptive,tt=et===void 0?!0:et,rt=$.roundOffsets,at=rt===void 0?!0:rt,ct={placement:getBasePlacement(_.placement),variation:getVariation(_.placement),popper:_.elements.popper,popperRect:_.rects.popper,gpuAcceleration:_e,isFixed:_.options.strategy==="fixed"};_.modifiersData.popperOffsets!=null&&(_.styles.popper=Object.assign({},_.styles.popper,mapToStyles(Object.assign({},ct,{offsets:_.modifiersData.popperOffsets,position:_.options.strategy,adaptive:tt,roundOffsets:at})))),_.modifiersData.arrow!=null&&(_.styles.arrow=Object.assign({},_.styles.arrow,mapToStyles(Object.assign({},ct,{offsets:_.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:at})))),_.attributes.popper=Object.assign({},_.attributes.popper,{"data-popper-placement":_.placement})}const computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:!0};function effect(a){var _=a.state,$=a.instance,j=a.options,_e=j.scroll,et=_e===void 0?!0:_e,tt=j.resize,rt=tt===void 0?!0:tt,at=getWindow(_.elements.popper),ct=[].concat(_.scrollParents.reference,_.scrollParents.popper);return et&&ct.forEach(function(dt){dt.addEventListener("scroll",$.update,passive)}),rt&&at.addEventListener("resize",$.update,passive),function(){et&&ct.forEach(function(dt){dt.removeEventListener("scroll",$.update,passive)}),rt&&at.removeEventListener("resize",$.update,passive)}}const eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect,data:{}};var hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(a){return a.replace(/left|right|bottom|top/g,function(_){return hash$1[_]})}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(a){return a.replace(/start|end/g,function(_){return hash[_]})}function getWindowScroll(a){var _=getWindow(a),$=_.pageXOffset,j=_.pageYOffset;return{scrollLeft:$,scrollTop:j}}function getWindowScrollBarX(a){return getBoundingClientRect(getDocumentElement(a)).left+getWindowScroll(a).scrollLeft}function getViewportRect(a,_){var $=getWindow(a),j=getDocumentElement(a),_e=$.visualViewport,et=j.clientWidth,tt=j.clientHeight,rt=0,at=0;if(_e){et=_e.width,tt=_e.height;var ct=isLayoutViewport();(ct||!ct&&_==="fixed")&&(rt=_e.offsetLeft,at=_e.offsetTop)}return{width:et,height:tt,x:rt+getWindowScrollBarX(a),y:at}}function getDocumentRect(a){var _,$=getDocumentElement(a),j=getWindowScroll(a),_e=(_=a.ownerDocument)==null?void 0:_.body,et=max($.scrollWidth,$.clientWidth,_e?_e.scrollWidth:0,_e?_e.clientWidth:0),tt=max($.scrollHeight,$.clientHeight,_e?_e.scrollHeight:0,_e?_e.clientHeight:0),rt=-j.scrollLeft+getWindowScrollBarX(a),at=-j.scrollTop;return getComputedStyle(_e||$).direction==="rtl"&&(rt+=max($.clientWidth,_e?_e.clientWidth:0)-et),{width:et,height:tt,x:rt,y:at}}function isScrollParent(a){var _=getComputedStyle(a),$=_.overflow,j=_.overflowX,_e=_.overflowY;return/auto|scroll|overlay|hidden/.test($+_e+j)}function getScrollParent(a){return["html","body","#document"].indexOf(getNodeName(a))>=0?a.ownerDocument.body:isHTMLElement(a)&&isScrollParent(a)?a:getScrollParent(getParentNode(a))}function listScrollParents(a,_){var $;_===void 0&&(_=[]);var j=getScrollParent(a),_e=j===(($=a.ownerDocument)==null?void 0:$.body),et=getWindow(j),tt=_e?[et].concat(et.visualViewport||[],isScrollParent(j)?j:[]):j,rt=_.concat(tt);return _e?rt:rt.concat(listScrollParents(getParentNode(tt)))}function rectToClientRect(a){return Object.assign({},a,{left:a.x,top:a.y,right:a.x+a.width,bottom:a.y+a.height})}function getInnerBoundingClientRect(a,_){var $=getBoundingClientRect(a,!1,_==="fixed");return $.top=$.top+a.clientTop,$.left=$.left+a.clientLeft,$.bottom=$.top+a.clientHeight,$.right=$.left+a.clientWidth,$.width=a.clientWidth,$.height=a.clientHeight,$.x=$.left,$.y=$.top,$}function getClientRectFromMixedType(a,_,$){return _===viewport?rectToClientRect(getViewportRect(a,$)):isElement$1(_)?getInnerBoundingClientRect(_,$):rectToClientRect(getDocumentRect(getDocumentElement(a)))}function getClippingParents(a){var _=listScrollParents(getParentNode(a)),$=["absolute","fixed"].indexOf(getComputedStyle(a).position)>=0,j=$&&isHTMLElement(a)?getOffsetParent(a):a;return isElement$1(j)?_.filter(function(_e){return isElement$1(_e)&&contains(_e,j)&&getNodeName(_e)!=="body"}):[]}function getClippingRect(a,_,$,j){var _e=_==="clippingParents"?getClippingParents(a):[].concat(_),et=[].concat(_e,[$]),tt=et[0],rt=et.reduce(function(at,ct){var dt=getClientRectFromMixedType(a,ct,j);return at.top=max(dt.top,at.top),at.right=min(dt.right,at.right),at.bottom=min(dt.bottom,at.bottom),at.left=max(dt.left,at.left),at},getClientRectFromMixedType(a,tt,j));return rt.width=rt.right-rt.left,rt.height=rt.bottom-rt.top,rt.x=rt.left,rt.y=rt.top,rt}function computeOffsets(a){var _=a.reference,$=a.element,j=a.placement,_e=j?getBasePlacement(j):null,et=j?getVariation(j):null,tt=_.x+_.width/2-$.width/2,rt=_.y+_.height/2-$.height/2,at;switch(_e){case top:at={x:tt,y:_.y-$.height};break;case bottom:at={x:tt,y:_.y+_.height};break;case right$3:at={x:_.x+_.width,y:rt};break;case left$3:at={x:_.x-$.width,y:rt};break;default:at={x:_.x,y:_.y}}var ct=_e?getMainAxisFromPlacement(_e):null;if(ct!=null){var dt=ct==="y"?"height":"width";switch(et){case start:at[ct]=at[ct]-(_[dt]/2-$[dt]/2);break;case end:at[ct]=at[ct]+(_[dt]/2-$[dt]/2);break}}return at}function detectOverflow(a,_){_===void 0&&(_={});var $=_,j=$.placement,_e=j===void 0?a.placement:j,et=$.strategy,tt=et===void 0?a.strategy:et,rt=$.boundary,at=rt===void 0?clippingParents:rt,ct=$.rootBoundary,dt=ct===void 0?viewport:ct,yt=$.elementContext,bt=yt===void 0?popper:yt,Et=$.altBoundary,$t=Et===void 0?!1:Et,_t=$.padding,xt=_t===void 0?0:_t,St=mergePaddingObject(typeof xt!="number"?xt:expandToHashMap(xt,basePlacements)),Mt=bt===popper?reference:popper,Tt=a.rects.popper,Rt=a.elements[$t?Mt:bt],Ct=getClippingRect(isElement$1(Rt)?Rt:Rt.contextElement||getDocumentElement(a.elements.popper),at,dt,tt),It=getBoundingClientRect(a.elements.reference),kt=computeOffsets({reference:It,element:Tt,strategy:"absolute",placement:_e}),Dt=rectToClientRect(Object.assign({},Tt,kt)),Bt=bt===popper?Dt:It,zt={top:Ct.top-Bt.top+St.top,bottom:Bt.bottom-Ct.bottom+St.bottom,left:Ct.left-Bt.left+St.left,right:Bt.right-Ct.right+St.right},vt=a.modifiersData.offset;if(bt===popper&&vt){var nt=vt[_e];Object.keys(zt).forEach(function(st){var lt=[right$3,bottom].indexOf(st)>=0?1:-1,ht=[top,bottom].indexOf(st)>=0?"y":"x";zt[st]+=nt[ht]*lt})}return zt}function computeAutoPlacement(a,_){_===void 0&&(_={});var $=_,j=$.placement,_e=$.boundary,et=$.rootBoundary,tt=$.padding,rt=$.flipVariations,at=$.allowedAutoPlacements,ct=at===void 0?placements:at,dt=getVariation(j),yt=dt?rt?variationPlacements:variationPlacements.filter(function($t){return getVariation($t)===dt}):basePlacements,bt=yt.filter(function($t){return ct.indexOf($t)>=0});bt.length===0&&(bt=yt);var Et=bt.reduce(function($t,_t){return $t[_t]=detectOverflow(a,{placement:_t,boundary:_e,rootBoundary:et,padding:tt})[getBasePlacement(_t)],$t},{});return Object.keys(Et).sort(function($t,_t){return Et[$t]-Et[_t]})}function getExpandedFallbackPlacements(a){if(getBasePlacement(a)===auto)return[];var _=getOppositePlacement(a);return[getOppositeVariationPlacement(a),_,getOppositeVariationPlacement(_)]}function flip(a){var _=a.state,$=a.options,j=a.name;if(!_.modifiersData[j]._skip){for(var _e=$.mainAxis,et=_e===void 0?!0:_e,tt=$.altAxis,rt=tt===void 0?!0:tt,at=$.fallbackPlacements,ct=$.padding,dt=$.boundary,yt=$.rootBoundary,bt=$.altBoundary,Et=$.flipVariations,$t=Et===void 0?!0:Et,_t=$.allowedAutoPlacements,xt=_.options.placement,St=getBasePlacement(xt),Mt=St===xt,Tt=at||(Mt||!$t?[getOppositePlacement(xt)]:getExpandedFallbackPlacements(xt)),Rt=[xt].concat(Tt).reduce(function(Nt,jt){return Nt.concat(getBasePlacement(jt)===auto?computeAutoPlacement(_,{placement:jt,boundary:dt,rootBoundary:yt,padding:ct,flipVariations:$t,allowedAutoPlacements:_t}):jt)},[]),Ct=_.rects.reference,It=_.rects.popper,kt=new Map,Dt=!0,Bt=Rt[0],zt=0;zt<Rt.length;zt++){var vt=Rt[zt],nt=getBasePlacement(vt),st=getVariation(vt)===start,lt=[top,bottom].indexOf(nt)>=0,ht=lt?"width":"height",mt=detectOverflow(_,{placement:vt,boundary:dt,rootBoundary:yt,altBoundary:bt,padding:ct}),wt=lt?st?right$3:left$3:st?bottom:top;Ct[ht]>It[ht]&&(wt=getOppositePlacement(wt));var At=getOppositePlacement(wt),gt=[];if(et&&gt.push(mt[nt]<=0),rt&&gt.push(mt[wt]<=0,mt[At]<=0),gt.every(function(Nt){return Nt})){Bt=vt,Dt=!1;break}kt.set(vt,gt)}if(Dt)for(var ot=$t?3:1,pt=function(jt){var Ut=Rt.find(function(Vt){var rr=kt.get(Vt);if(rr)return rr.slice(0,jt).every(function(tr){return tr})});if(Ut)return Bt=Ut,"break"},Pt=ot;Pt>0;Pt--){var Ot=pt(Pt);if(Ot==="break")break}_.placement!==Bt&&(_.modifiersData[j]._skip=!0,_.placement=Bt,_.reset=!0)}}const flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(a,_,$){return $===void 0&&($={x:0,y:0}),{top:a.top-_.height-$.y,right:a.right-_.width+$.x,bottom:a.bottom-_.height+$.y,left:a.left-_.width-$.x}}function isAnySideFullyClipped(a){return[top,right$3,bottom,left$3].some(function(_){return a[_]>=0})}function hide(a){var _=a.state,$=a.name,j=_.rects.reference,_e=_.rects.popper,et=_.modifiersData.preventOverflow,tt=detectOverflow(_,{elementContext:"reference"}),rt=detectOverflow(_,{altBoundary:!0}),at=getSideOffsets(tt,j),ct=getSideOffsets(rt,_e,et),dt=isAnySideFullyClipped(at),yt=isAnySideFullyClipped(ct);_.modifiersData[$]={referenceClippingOffsets:at,popperEscapeOffsets:ct,isReferenceHidden:dt,hasPopperEscaped:yt},_.attributes.popper=Object.assign({},_.attributes.popper,{"data-popper-reference-hidden":dt,"data-popper-escaped":yt})}const hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(a,_,$){var j=getBasePlacement(a),_e=[left$3,top].indexOf(j)>=0?-1:1,et=typeof $=="function"?$(Object.assign({},_,{placement:a})):$,tt=et[0],rt=et[1];return tt=tt||0,rt=(rt||0)*_e,[left$3,right$3].indexOf(j)>=0?{x:rt,y:tt}:{x:tt,y:rt}}function offset(a){var _=a.state,$=a.options,j=a.name,_e=$.offset,et=_e===void 0?[0,0]:_e,tt=placements.reduce(function(dt,yt){return dt[yt]=distanceAndSkiddingToXY(yt,_.rects,et),dt},{}),rt=tt[_.placement],at=rt.x,ct=rt.y;_.modifiersData.popperOffsets!=null&&(_.modifiersData.popperOffsets.x+=at,_.modifiersData.popperOffsets.y+=ct),_.modifiersData[j]=tt}const offset$1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset};function popperOffsets(a){var _=a.state,$=a.name;_.modifiersData[$]=computeOffsets({reference:_.rects.reference,element:_.rects.popper,strategy:"absolute",placement:_.placement})}const popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(a){return a==="x"?"y":"x"}function preventOverflow(a){var _=a.state,$=a.options,j=a.name,_e=$.mainAxis,et=_e===void 0?!0:_e,tt=$.altAxis,rt=tt===void 0?!1:tt,at=$.boundary,ct=$.rootBoundary,dt=$.altBoundary,yt=$.padding,bt=$.tether,Et=bt===void 0?!0:bt,$t=$.tetherOffset,_t=$t===void 0?0:$t,xt=detectOverflow(_,{boundary:at,rootBoundary:ct,padding:yt,altBoundary:dt}),St=getBasePlacement(_.placement),Mt=getVariation(_.placement),Tt=!Mt,Rt=getMainAxisFromPlacement(St),Ct=getAltAxis(Rt),It=_.modifiersData.popperOffsets,kt=_.rects.reference,Dt=_.rects.popper,Bt=typeof _t=="function"?_t(Object.assign({},_.rects,{placement:_.placement})):_t,zt=typeof Bt=="number"?{mainAxis:Bt,altAxis:Bt}:Object.assign({mainAxis:0,altAxis:0},Bt),vt=_.modifiersData.offset?_.modifiersData.offset[_.placement]:null,nt={x:0,y:0};if(It){if(et){var st,lt=Rt==="y"?top:left$3,ht=Rt==="y"?bottom:right$3,mt=Rt==="y"?"height":"width",wt=It[Rt],At=wt+xt[lt],gt=wt-xt[ht],ot=Et?-Dt[mt]/2:0,pt=Mt===start?kt[mt]:Dt[mt],Pt=Mt===start?-Dt[mt]:-kt[mt],Ot=_.elements.arrow,Nt=Et&&Ot?getLayoutRect(Ot):{width:0,height:0},jt=_.modifiersData["arrow#persistent"]?_.modifiersData["arrow#persistent"].padding:getFreshSideObject(),Ut=jt[lt],Vt=jt[ht],rr=within(0,kt[mt],Nt[mt]),tr=Tt?kt[mt]/2-ot-rr-Ut-zt.mainAxis:pt-rr-Ut-zt.mainAxis,Zt=Tt?-kt[mt]/2+ot+rr+Vt+zt.mainAxis:Pt+rr+Vt+zt.mainAxis,Yt=_.elements.arrow&&getOffsetParent(_.elements.arrow),Wt=Yt?Rt==="y"?Yt.clientTop||0:Yt.clientLeft||0:0,fr=(st=vt==null?void 0:vt[Rt])!=null?st:0,jr=wt+tr-fr-Wt,Sr=wt+Zt-fr,Er=within(Et?min(At,jr):At,wt,Et?max(gt,Sr):gt);It[Rt]=Er,nt[Rt]=Er-wt}if(rt){var sn,Ir=Rt==="x"?top:left$3,gr=Rt==="x"?bottom:right$3,ln=It[Ct],Mr=Ct==="y"?"height":"width",Vr=ln+xt[Ir],pn=ln-xt[gr],Gr=[top,left$3].indexOf(St)!==-1,Zr=(sn=vt==null?void 0:vt[Ct])!=null?sn:0,Mn=Gr?Vr:ln-kt[Mr]-Dt[Mr]-Zr+zt.altAxis,Wr=Gr?ln+kt[Mr]+Dt[Mr]-Zr-zt.altAxis:pn,Qr=Et&&Gr?withinMaxClamp(Mn,ln,Wr):within(Et?Mn:Vr,ln,Et?Wr:pn);It[Ct]=Qr,nt[Ct]=Qr-ln}_.modifiersData[j]=nt}}const preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(a){return{scrollLeft:a.scrollLeft,scrollTop:a.scrollTop}}function getNodeScroll(a){return a===getWindow(a)||!isHTMLElement(a)?getWindowScroll(a):getHTMLElementScroll(a)}function isElementScaled(a){var _=a.getBoundingClientRect(),$=round(_.width)/a.offsetWidth||1,j=round(_.height)/a.offsetHeight||1;return $!==1||j!==1}function getCompositeRect(a,_,$){$===void 0&&($=!1);var j=isHTMLElement(_),_e=isHTMLElement(_)&&isElementScaled(_),et=getDocumentElement(_),tt=getBoundingClientRect(a,_e,$),rt={scrollLeft:0,scrollTop:0},at={x:0,y:0};return(j||!j&&!$)&&((getNodeName(_)!=="body"||isScrollParent(et))&&(rt=getNodeScroll(_)),isHTMLElement(_)?(at=getBoundingClientRect(_,!0),at.x+=_.clientLeft,at.y+=_.clientTop):et&&(at.x=getWindowScrollBarX(et))),{x:tt.left+rt.scrollLeft-at.x,y:tt.top+rt.scrollTop-at.y,width:tt.width,height:tt.height}}function order$1(a){var _=new Map,$=new Set,j=[];a.forEach(function(et){_.set(et.name,et)});function _e(et){$.add(et.name);var tt=[].concat(et.requires||[],et.requiresIfExists||[]);tt.forEach(function(rt){if(!$.has(rt)){var at=_.get(rt);at&&_e(at)}}),j.push(et)}return a.forEach(function(et){$.has(et.name)||_e(et)}),j}function orderModifiers(a){var _=order$1(a);return modifierPhases.reduce(function($,j){return $.concat(_.filter(function(_e){return _e.phase===j}))},[])}function debounce$2(a){var _;return function(){return _||(_=new Promise(function($){Promise.resolve().then(function(){_=void 0,$(a())})})),_}}function mergeByName(a){var _=a.reduce(function($,j){var _e=$[j.name];return $[j.name]=_e?Object.assign({},_e,j,{options:Object.assign({},_e.options,j.options),data:Object.assign({},_e.data,j.data)}):j,$},{});return Object.keys(_).map(function($){return _[$]})}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var a=arguments.length,_=new Array(a),$=0;$<a;$++)_[$]=arguments[$];return!_.some(function(j){return!(j&&typeof j.getBoundingClientRect=="function")})}function popperGenerator(a){a===void 0&&(a={});var _=a,$=_.defaultModifiers,j=$===void 0?[]:$,_e=_.defaultOptions,et=_e===void 0?DEFAULT_OPTIONS:_e;return function(rt,at,ct){ct===void 0&&(ct=et);var dt={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,et),modifiersData:{},elements:{reference:rt,popper:at},attributes:{},styles:{}},yt=[],bt=!1,Et={state:dt,setOptions:function(St){var Mt=typeof St=="function"?St(dt.options):St;_t(),dt.options=Object.assign({},et,dt.options,Mt),dt.scrollParents={reference:isElement$1(rt)?listScrollParents(rt):rt.contextElement?listScrollParents(rt.contextElement):[],popper:listScrollParents(at)};var Tt=orderModifiers(mergeByName([].concat(j,dt.options.modifiers)));return dt.orderedModifiers=Tt.filter(function(Rt){return Rt.enabled}),$t(),Et.update()},forceUpdate:function(){if(!bt){var St=dt.elements,Mt=St.reference,Tt=St.popper;if(areValidElements(Mt,Tt)){dt.rects={reference:getCompositeRect(Mt,getOffsetParent(Tt),dt.options.strategy==="fixed"),popper:getLayoutRect(Tt)},dt.reset=!1,dt.placement=dt.options.placement,dt.orderedModifiers.forEach(function(zt){return dt.modifiersData[zt.name]=Object.assign({},zt.data)});for(var Rt=0;Rt<dt.orderedModifiers.length;Rt++){if(dt.reset===!0){dt.reset=!1,Rt=-1;continue}var Ct=dt.orderedModifiers[Rt],It=Ct.fn,kt=Ct.options,Dt=kt===void 0?{}:kt,Bt=Ct.name;typeof It=="function"&&(dt=It({state:dt,options:Dt,name:Bt,instance:Et})||dt)}}}},update:debounce$2(function(){return new Promise(function(xt){Et.forceUpdate(),xt(dt)})}),destroy:function(){_t(),bt=!0}};if(!areValidElements(rt,at))return Et;Et.setOptions(ct).then(function(xt){!bt&&ct.onFirstUpdate&&ct.onFirstUpdate(xt)});function $t(){dt.orderedModifiers.forEach(function(xt){var St=xt.name,Mt=xt.options,Tt=Mt===void 0?{}:Mt,Rt=xt.effect;if(typeof Rt=="function"){var Ct=Rt({state:dt,name:St,instance:Et,options:Tt}),It=function(){};yt.push(Ct||It)}})}function _t(){yt.forEach(function(xt){return xt()}),yt=[]}return Et}}var defaultModifiers=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1,offset$1,flip$1,preventOverflow$1,arrow$1,hide$1],createPopper=popperGenerator({defaultModifiers}),hasElementType=typeof Element<"u",hasMap$1=typeof Map=="function",hasSet$1=typeof Set=="function",hasArrayBuffer=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function equal(a,_){if(a===_)return!0;if(a&&_&&typeof a=="object"&&typeof _=="object"){if(a.constructor!==_.constructor)return!1;var $,j,_e;if(Array.isArray(a)){if($=a.length,$!=_.length)return!1;for(j=$;j--!==0;)if(!equal(a[j],_[j]))return!1;return!0}var et;if(hasMap$1&&a instanceof Map&&_ instanceof Map){if(a.size!==_.size)return!1;for(et=a.entries();!(j=et.next()).done;)if(!_.has(j.value[0]))return!1;for(et=a.entries();!(j=et.next()).done;)if(!equal(j.value[1],_.get(j.value[0])))return!1;return!0}if(hasSet$1&&a instanceof Set&&_ instanceof Set){if(a.size!==_.size)return!1;for(et=a.entries();!(j=et.next()).done;)if(!_.has(j.value[0]))return!1;return!0}if(hasArrayBuffer&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(_)){if($=a.length,$!=_.length)return!1;for(j=$;j--!==0;)if(a[j]!==_[j])return!1;return!0}if(a.constructor===RegExp)return a.source===_.source&&a.flags===_.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===_.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===_.toString();if(_e=Object.keys(a),$=_e.length,$!==Object.keys(_).length)return!1;for(j=$;j--!==0;)if(!Object.prototype.hasOwnProperty.call(_,_e[j]))return!1;if(hasElementType&&a instanceof Element)return!1;for(j=$;j--!==0;)if(!((_e[j]==="_owner"||_e[j]==="__v"||_e[j]==="__o")&&a.$$typeof)&&!equal(a[_e[j]],_[_e[j]]))return!1;return!0}return a!==a&&_!==_}var reactFastCompare=function(_,$){try{return equal(_,$)}catch(j){if((j.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw j}};const isEqual$1=getDefaultExportFromCjs$1(reactFastCompare);var EMPTY_MODIFIERS$1=[],usePopper=function(_,$,j){j===void 0&&(j={});var _e=reactExports.useRef(null),et={onFirstUpdate:j.onFirstUpdate,placement:j.placement||"bottom",strategy:j.strategy||"absolute",modifiers:j.modifiers||EMPTY_MODIFIERS$1},tt=reactExports.useState({styles:{popper:{position:et.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),rt=tt[0],at=tt[1],ct=reactExports.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(Et){var $t=Et.state,_t=Object.keys($t.elements);reactDomExports.flushSync(function(){at({styles:fromEntries(_t.map(function(xt){return[xt,$t.styles[xt]||{}]})),attributes:fromEntries(_t.map(function(xt){return[xt,$t.attributes[xt]]}))})})},requires:["computeStyles"]}},[]),dt=reactExports.useMemo(function(){var bt={onFirstUpdate:et.onFirstUpdate,placement:et.placement,strategy:et.strategy,modifiers:[].concat(et.modifiers,[ct,{name:"applyStyles",enabled:!1}])};return isEqual$1(_e.current,bt)?_e.current||bt:(_e.current=bt,bt)},[et.onFirstUpdate,et.placement,et.strategy,et.modifiers,ct]),yt=reactExports.useRef();return useIsomorphicLayoutEffect(function(){yt.current&&yt.current.setOptions(dt)},[dt]),useIsomorphicLayoutEffect(function(){if(!(_==null||$==null)){var bt=j.createPopper||createPopper,Et=bt(_,$,dt);return yt.current=Et,function(){Et.destroy(),yt.current=null}}},[_,$,j.createPopper]),{state:yt.current?yt.current.state:null,styles:rt.styles,attributes:rt.attributes,update:yt.current?yt.current.update:null,forceUpdate:yt.current?yt.current.forceUpdate:null}},NOOP=function(){},NOOP_PROMISE=function(){return Promise.resolve(null)},EMPTY_MODIFIERS=[];function Popper(a){var _=a.placement,$=_===void 0?"bottom":_,j=a.strategy,_e=j===void 0?"absolute":j,et=a.modifiers,tt=et===void 0?EMPTY_MODIFIERS:et,rt=a.referenceElement,at=a.onFirstUpdate,ct=a.innerRef,dt=a.children,yt=reactExports.useContext(ManagerReferenceNodeContext),bt=reactExports.useState(null),Et=bt[0],$t=bt[1],_t=reactExports.useState(null),xt=_t[0],St=_t[1];reactExports.useEffect(function(){setRef(ct,Et)},[ct,Et]);var Mt=reactExports.useMemo(function(){return{placement:$,strategy:_e,onFirstUpdate:at,modifiers:[].concat(tt,[{name:"arrow",enabled:xt!=null,options:{element:xt}}])}},[$,_e,at,tt,xt]),Tt=usePopper(rt||yt,Et,Mt),Rt=Tt.state,Ct=Tt.styles,It=Tt.forceUpdate,kt=Tt.update,Dt=reactExports.useMemo(function(){return{ref:$t,style:Ct.popper,placement:Rt?Rt.placement:$,hasPopperEscaped:Rt&&Rt.modifiersData.hide?Rt.modifiersData.hide.hasPopperEscaped:null,isReferenceHidden:Rt&&Rt.modifiersData.hide?Rt.modifiersData.hide.isReferenceHidden:null,arrowProps:{style:Ct.arrow,ref:St},forceUpdate:It||NOOP,update:kt||NOOP_PROMISE}},[$t,St,$,Rt,Ct,kt,It]);return unwrapArray(dt)(Dt)}var warning=function(){},warning_1=warning;const warning$1=getDefaultExportFromCjs$1(warning_1);function Reference(a){var _=a.children,$=a.innerRef,j=reactExports.useContext(ManagerReferenceNodeSetterContext),_e=reactExports.useCallback(function(et){setRef($,et),safeInvoke(j,et)},[$,j]);return reactExports.useEffect(function(){return function(){return setRef($,null)}},[]),reactExports.useEffect(function(){warning$1(!!j,"`Reference` should not be used outside of a `Manager` component.")},[j]),unwrapArray(_)({ref:_e})}const esm=Object.freeze(Object.defineProperty({__proto__:null,Manager,Popper,Reference,usePopper},Symbol.toStringTag,{value:"Module"})),require$$17=getAugmentedNamespace(esm);var shallowequal,hasRequiredShallowequal;function requireShallowequal(){return hasRequiredShallowequal||(hasRequiredShallowequal=1,shallowequal=function(_,$,j,_e){var et=j?j.call(_e,_,$):void 0;if(et!==void 0)return!!et;if(_===$)return!0;if(typeof _!="object"||!_||typeof $!="object"||!$)return!1;var tt=Object.keys(_),rt=Object.keys($);if(tt.length!==rt.length)return!1;for(var at=Object.prototype.hasOwnProperty.bind($),ct=0;ct<tt.length;ct++){var dt=tt[ct];if(!at(dt))return!1;var yt=_[dt],bt=$[dt];if(et=j?j.call(_e,yt,bt,dt):void 0,et===!1||et===void 0&&yt!==bt)return!1}return!0}),shallowequal}var positions={},_baseInverter,hasRequired_baseInverter;function require_baseInverter(){if(hasRequired_baseInverter)return _baseInverter;hasRequired_baseInverter=1;var a=require_baseForOwn();function _($,j,_e,et){return a($,function(tt,rt,at){j(et,_e(tt),rt,at)}),et}return _baseInverter=_,_baseInverter}var _createInverter,hasRequired_createInverter;function require_createInverter(){if(hasRequired_createInverter)return _createInverter;hasRequired_createInverter=1;var a=require_baseInverter();function _($,j){return function(_e,et){return a(_e,$,j(et),{})}}return _createInverter=_,_createInverter}var invert_1,hasRequiredInvert;function requireInvert(){if(hasRequiredInvert)return invert_1;hasRequiredInvert=1;var a=requireConstant(),_=require_createInverter(),$=requireIdentity(),j=Object.prototype,_e=j.toString,et=_(function(tt,rt,at){rt!=null&&typeof rt.toString!="function"&&(rt=_e.call(rt)),tt[rt]=at},a($));return invert_1=et,invert_1}var hasRequiredPositions;function requirePositions(){if(hasRequiredPositions)return positions;hasRequiredPositions=1;var a=interopRequireDefaultExports;positions.__esModule=!0,positions.placementMapping=positions.positions=positions.positionsMapping=void 0;var _=a(requireInvert()),$=a(requireKeys()),j={"top center":"top","top left":"top-start","top right":"top-end","bottom center":"bottom","bottom left":"bottom-start","bottom right":"bottom-end","right center":"right","left center":"left"};positions.positionsMapping=j;var _e=(0,$.default)(j);positions.positions=_e;var et=(0,_.default)(j);return positions.placementMapping=et,positions}var createReferenceProxy={},createClass={exports:{}},toPropertyKey={exports:{}},toPrimitive={exports:{}},hasRequiredToPrimitive;function requireToPrimitive(){return hasRequiredToPrimitive||(hasRequiredToPrimitive=1,function(a){var _=_typeofExports$2.default;function $(j,_e){if(_(j)!=="object"||j===null)return j;var et=j[Symbol.toPrimitive];if(et!==void 0){var tt=et.call(j,_e||"default");if(_(tt)!=="object")return tt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(_e==="string"?String:Number)(j)}a.exports=$,a.exports.__esModule=!0,a.exports.default=a.exports}(toPrimitive)),toPrimitive.exports}var hasRequiredToPropertyKey;function requireToPropertyKey(){return hasRequiredToPropertyKey||(hasRequiredToPropertyKey=1,function(a){var _=_typeofExports$2.default,$=requireToPrimitive();function j(_e){var et=$(_e,"string");return _(et)==="symbol"?et:String(et)}a.exports=j,a.exports.__esModule=!0,a.exports.default=a.exports}(toPropertyKey)),toPropertyKey.exports}var hasRequiredCreateClass;function requireCreateClass(){return hasRequiredCreateClass||(hasRequiredCreateClass=1,function(a){var _=requireToPropertyKey();function $(_e,et){for(var tt=0;tt<et.length;tt++){var rt=et[tt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(_e,_(rt.key),rt)}}function j(_e,et,tt){return et&&$(_e.prototype,et),tt&&$(_e,tt),Object.defineProperty(_e,"prototype",{writable:!1}),_e}a.exports=j,a.exports.__esModule=!0,a.exports.default=a.exports}(createClass)),createClass.exports}var hasRequiredCreateReferenceProxy;function requireCreateReferenceProxy(){if(hasRequiredCreateReferenceProxy)return createReferenceProxy;hasRequiredCreateReferenceProxy=1;var a=interopRequireDefaultExports;createReferenceProxy.__esModule=!0,createReferenceProxy.default=void 0;var _=a(requireCreateClass()),$=a(requireMemoize()),j=a(requireInvoke()),_e=require$$10,et=function(){function at(dt){this.ref=dt}var ct=at.prototype;return ct.getBoundingClientRect=function(){return(0,j.default)(this.ref.current,"getBoundingClientRect")||{}},(0,_.default)(at,[{key:"clientWidth",get:function(){return this.getBoundingClientRect().width}},{key:"clientHeight",get:function(){return this.getBoundingClientRect().height}},{key:"parentNode",get:function(){return this.ref.current?this.ref.current.parentNode:void 0}}]),at}(),tt=(0,$.default)(function(at){return new et((0,_e.isRefObject)(at)?at:{current:at})}),rt=tt;return createReferenceProxy.default=rt,createReferenceProxy}var PopupContent={},hasRequiredPopupContent;function requirePopupContent(){if(hasRequiredPopupContent)return PopupContent;hasRequiredPopupContent=1;var a=interopRequireDefaultExports;PopupContent.__esModule=!0,PopupContent.default=et;var _=a(require_extends()),$=a(require$$0$4);a(requirePropTypes());var j=a(reactExports),_e=requireLib();function et(tt){var rt=tt.children,at=tt.className,ct=tt.content,dt=(0,$.default)("content",at),yt=(0,_e.getUnhandledProps)(et,tt),bt=(0,_e.getElementType)(et,tt);return j.default.createElement(bt,(0,_.default)({},yt,{className:dt}),_e.childrenUtils.isNil(rt)?ct:rt)}return et.handledProps=["as","children","className","content"],et.propTypes={},et.create=(0,_e.createShorthandFactory)(et,function(tt){return{children:tt}}),PopupContent}var PopupHeader={},hasRequiredPopupHeader;function requirePopupHeader(){if(hasRequiredPopupHeader)return PopupHeader;hasRequiredPopupHeader=1;var a=interopRequireDefaultExports;PopupHeader.__esModule=!0,PopupHeader.default=et;var _=a(require_extends()),$=a(require$$0$4);a(requirePropTypes());var j=a(reactExports),_e=requireLib();function et(tt){var rt=tt.children,at=tt.className,ct=tt.content,dt=(0,$.default)("header",at),yt=(0,_e.getUnhandledProps)(et,tt),bt=(0,_e.getElementType)(et,tt);return j.default.createElement(bt,(0,_.default)({},yt,{className:dt}),_e.childrenUtils.isNil(rt)?ct:rt)}return et.handledProps=["as","children","className","content"],et.propTypes={},et.create=(0,_e.createShorthandFactory)(et,function(tt){return{children:tt}}),PopupHeader}var hasRequiredPopup;function requirePopup(){if(hasRequiredPopup)return Popup;hasRequiredPopup=1;var a=interopRequireWildcardExports,_=interopRequireDefaultExports;Popup.__esModule=!0,Popup.default=void 0;var $=_(require_extends()),j=_(requireInheritsLoose());_(requireWithout());var _e=_(requireIsNil()),et=_(requireIsUndefined()),tt=_(requireInvoke()),rt=_(requireIsElement()),at=_(requireIsArray()),ct=_(requirePick()),dt=_(requireIncludes()),yt=_(requireReduce()),bt=_(requireLib$1()),Et=_(require$$0$4);_(requirePropTypes());var $t=a(reactExports),_t=require$$17,xt=_(requireShallowequal()),St=requireLib(),Mt=_(requirePortal()),Tt=requirePositions(),Rt=_(requireCreateReferenceProxy()),Ct=_(requirePopupContent()),It=_(requirePopupHeader()),kt=function(Dt){(0,j.default)(Bt,Dt);function Bt(){for(var vt,nt=arguments.length,st=new Array(nt),lt=0;lt<nt;lt++)st[lt]=arguments[lt];return vt=Dt.call.apply(Dt,[this].concat(st))||this,vt.state={},vt.open=!1,vt.zIndexWasSynced=!1,vt.triggerRef=$t.default.createRef(),vt.elementRef=$t.default.createRef(),vt.getPortalProps=function(){var ht={},mt=vt.props,wt=mt.on,At=mt.hoverable,gt=(0,at.default)(wt)?wt:[wt];return At&&(ht.closeOnPortalMouseLeave=!0,ht.mouseLeaveDelay=300),(0,dt.default)(gt,"hover")&&(ht.openOnTriggerClick=!1,ht.closeOnTriggerClick=!1,ht.openOnTriggerMouseEnter=!0,ht.closeOnTriggerMouseLeave=!0,ht.mouseLeaveDelay=70,ht.mouseEnterDelay=50),(0,dt.default)(gt,"click")&&(ht.openOnTriggerClick=!0,ht.closeOnTriggerClick=!0,ht.closeOnDocumentClick=!0),(0,dt.default)(gt,"focus")&&(ht.openOnTriggerFocus=!0,ht.closeOnTriggerBlur=!0),ht},vt.hideOnScroll=function(ht){(0,rt.default)(ht.target)&&vt.elementRef.current.contains(ht.target)||(vt.setState({closed:!0}),St.eventStack.unsub("scroll",vt.hideOnScroll,{target:window}),vt.timeoutId=setTimeout(function(){vt.setState({closed:!1})},50),vt.handleClose(ht))},vt.handleClose=function(ht){(0,tt.default)(vt.props,"onClose",ht,(0,$.default)({},vt.props,{open:!1}))},vt.handleOpen=function(ht){(0,tt.default)(vt.props,"onOpen",ht,(0,$.default)({},vt.props,{open:!0}))},vt.handlePortalMount=function(ht){(0,tt.default)(vt.props,"onMount",ht,vt.props)},vt.handlePortalUnmount=function(ht){vt.positionUpdate=null,(0,tt.default)(vt.props,"onUnmount",ht,vt.props)},vt.renderContent=function(ht){var mt=ht.placement,wt=ht.ref,At=ht.update,gt=ht.style,ot=vt.props,pt=ot.basic,Pt=ot.children,Ot=ot.className,Nt=ot.content,jt=ot.hideOnScroll,Ut=ot.flowing,Vt=ot.header,rr=ot.inverted,tr=ot.popper,Zt=ot.size,Yt=ot.style,Wt=ot.wide,fr=vt.state.contentRestProps;vt.positionUpdate=At;var jr=(0,Et.default)("ui",Tt.placementMapping[mt],Zt,(0,St.useKeyOrValueAndKey)(Wt,"wide"),(0,St.useKeyOnly)(pt,"basic"),(0,St.useKeyOnly)(Ut,"flowing"),(0,St.useKeyOnly)(rr,"inverted"),"popup transition visible",Ot),Sr=(0,St.getElementType)(Bt,vt.props),Er=(0,$.default)({left:"auto",right:"auto",position:"initial"},Yt),sn=$t.default.createElement(Sr,(0,$.default)({},fr,{className:jr,style:Er,ref:vt.elementRef}),St.childrenUtils.isNil(Pt)?$t.default.createElement($t.default.Fragment,null,It.default.create(Vt,{autoGenerateKey:!1}),Ct.default.create(Nt,{autoGenerateKey:!1})):Pt,jt&&$t.default.createElement(bt.default,{on:vt.hideOnScroll,name:"scroll",target:"window"}));return(0,St.createHTMLDivision)(tr||{},{overrideProps:{children:sn,ref:wt,style:(0,$.default)({display:"flex"},gt)}})},vt}Bt.getDerivedStateFromProps=function(nt,st){if(st.closed||st.disabled)return{};var lt=(0,St.getUnhandledProps)(Bt,nt),ht=(0,yt.default)(lt,function(wt,At,gt){return(0,dt.default)(Mt.default.handledProps,gt)||(wt[gt]=At),wt},{}),mt=(0,ct.default)(lt,Mt.default.handledProps);return{contentRestProps:ht,portalRestProps:mt}};var zt=Bt.prototype;return zt.componentDidUpdate=function(nt){var st=(0,xt.default)(this.props.popperDependencies,nt.popperDependencies);st||this.handleUpdate()},zt.componentWillUnmount=function(){clearTimeout(this.timeoutId)},zt.handleUpdate=function(){this.positionUpdate&&this.positionUpdate()},zt.render=function(){var nt=this,st=this.props,lt=st.context,ht=st.disabled,mt=st.eventsEnabled,wt=st.offset,At=st.pinned,gt=st.popper,ot=st.popperModifiers,pt=st.position,Pt=st.positionFixed,Ot=st.trigger,Nt=this.state,jt=Nt.closed,Ut=Nt.portalRestProps;if(jt||ht)return Ot;var Vt=[{name:"arrow",enabled:!1},{name:"eventListeners",options:{scroll:!!mt,resize:!!mt}},{name:"flip",enabled:!At},{name:"preventOverflow",enabled:!!wt},{name:"offset",enabled:!!wt,options:{offset:wt}}].concat(ot,[{name:"syncZIndex",enabled:!0,phase:"beforeRead",fn:function(Yt){var Wt,fr=Yt.state;if(!nt.zIndexWasSynced){var jr=gt==null||(Wt=gt.style)==null?void 0:Wt.zIndex;(0,et.default)(jr)&&(fr.elements.popper.style.zIndex=window.getComputedStyle(fr.elements.popper.firstChild).zIndex),nt.zIndexWasSynced=!0}},effect:function(){return function(){nt.zIndexWasSynced=!1}}}]),rr=(0,Rt.default)((0,_e.default)(lt)?this.triggerRef:lt),tr=(0,$.default)({},this.getPortalProps(),Ut);return $t.default.createElement(Mt.default,(0,$.default)({},tr,{onClose:this.handleClose,onMount:this.handlePortalMount,onOpen:this.handleOpen,onUnmount:this.handlePortalUnmount,trigger:Ot,triggerRef:this.triggerRef}),$t.default.createElement(_t.Popper,{modifiers:Vt,placement:Tt.positionsMapping[pt],strategy:Pt?"fixed":null,referenceElement:rr},this.renderContent))},Bt}($t.Component);return Popup.default=kt,kt.handledProps=["as","basic","children","className","content","context","disabled","eventsEnabled","flowing","header","hideOnScroll","hoverable","inverted","offset","on","onClose","onMount","onOpen","onUnmount","pinned","popper","popperDependencies","popperModifiers","position","positionFixed","size","style","trigger","wide"],kt.propTypes={},kt.defaultProps={disabled:!1,eventsEnabled:!0,on:["click","hover"],pinned:!1,popperModifiers:[],position:"top left"},kt.Content=Ct.default,kt.Header=It.default,Popup}var _interopRequireDefault$4=interopRequireDefaultExports,_Popup=_interopRequireDefault$4(requirePopup()),_default$3=_Popup.default;const capitalize=a=>a.charAt(0).toUpperCase()+a.slice(1),button="_button_1uvkr_1",icon="_icon_1uvkr_5",styles$a={button,icon,"icon-metamask-mobile":"_icon-metamask-mobile_1uvkr_13","icon-metamask":"_icon-metamask_1uvkr_13","icon-dapper":"_icon-dapper_1uvkr_18","icon-fortmatic":"_icon-fortmatic_1uvkr_22","icon-wallet-connect":"_icon-wallet-connect_1uvkr_26","icon-samsung-blockchain-wallet":"_icon-samsung-blockchain-wallet_1uvkr_30","icon-coinbase":"_icon-coinbase_1uvkr_34","icon-wallet-link":"_icon-wallet-link_1uvkr_35","icon-google":"_icon-google_1uvkr_39","icon-discord":"_icon-discord_1uvkr_43","icon-apple":"_icon-apple_1uvkr_47","icon-x":"_icon-x_1uvkr_51"},ConnectionOption=a=>{const{className:_,children:$,type:j,testId:_e,showTooltip:et,tooltipPosition:tt,disabled:rt,info:at,loading:ct,onClick:dt}=a;return jsxRuntimeExports.jsx(_default$3,{position:et&&tt?tt:"top center",disabled:!et,trigger:jsxRuntimeExports.jsxs(Button$5.Button,{primary:!0,size:"small","data-testid":`${_e}-${j}-button`,className:classNames(_,styles$a.button),onClick:()=>dt(j),disabled:rt,loading:ct,children:[ct?null:jsxRuntimeExports.jsx("div",{role:"img","aria-label":j,className:classNames(styles$a.icon,styles$a[`icon-${j}`],styles$a.primaryImage)}),$]},j),content:at??capitalize(j),on:"hover"})},PRIMARY_TEST_ID="primary-test-id",SECONDARY_TEST_ID="secondary-test-id",EXTRA_TEST_ID="extra-options-test-id",SHOW_MORE_BUTTON_TEST_ID="show-more-button-test-id";var ConnectionOptionType=(a=>(a.METAMASK="metamask",a.DAPPER="dapper",a.FORTMATIC="fortmatic",a.COINBASE="coinbase",a.SAMSUNG="samsung-blockchain-wallet",a.WALLET_CONNECT="wallet-connect",a.WALLET_LINK="wallet-link",a.METAMASK_MOBILE="metamask-mobile",a.GOOGLE="google",a.APPLE="apple",a.DISCORD="discord",a.X="x",a))(ConnectionOptionType||{});const connectionOptionTitles={metamask:"MetaMask",dapper:"Dapper",fortmatic:"Fortmatic",coinbase:"Coinbase","samsung-blockchain-wallet":"Samsung Blockchain Wallet","wallet-connect":"WalletConnect","wallet-link":"WalletLink","metamask-mobile":"MetaMask Mobile",google:"Google",apple:"Apple",discord:"Discord",x:"X"},connection="_connection_6rtpa_3",dclLogo="_dclLogo_6rtpa_9",title$4="_title_6rtpa_15",primaryButton="_primaryButton_6rtpa_22",primaryImage="_primaryImage_6rtpa_32",primaryMessage="_primaryMessage_6rtpa_36",primaryMagic="_primaryMagic_6rtpa_45",primaryLearnMore="_primaryLearnMore_6rtpa_54",primary="_primary_6rtpa_22",showMore="_showMore_6rtpa_67",showMoreButton="_showMoreButton_6rtpa_71",showMoreSecondaryOptions="_showMoreSecondaryOptions_6rtpa_80",primaryOption="_primaryOption_6rtpa_93",secondaryOptionButton="_secondaryOptionButton_6rtpa_97",styles$9={connection,dclLogo,title:title$4,primaryButton,primaryImage,primaryMessage,primaryMagic,primaryLearnMore,primary,showMore,showMoreButton,showMoreSecondaryOptions,primaryOption,secondaryOptionButton},Primary=({message:a,children:_,option:$,testId:j,loadingOption:_e,error:et,onConnect:tt})=>jsxRuntimeExports.jsxs("div",{className:styles$9.primary,"data-testid":j,children:[jsxRuntimeExports.jsx("div",{className:styles$9.primaryMessage,children:a}),jsxRuntimeExports.jsx(ConnectionOption,{disabled:!!_e||!!et,loading:_e===$,showTooltip:!!et,type:$,info:et,onClick:tt,className:classNames(styles$9.primaryButton,styles$9.primaryOption),testId:j,children:_})]}),Secondary=({options:a,tooltipDirection:_,testId:$,loadingOption:j,onConnect:_e})=>jsxRuntimeExports.jsx("div",{className:styles$9.showMoreSecondaryOptions,"data-testid":$,children:a.map(et=>jsxRuntimeExports.jsx(ConnectionOption,{className:classNames(styles$9.primaryButton,styles$9.secondaryOptionButton),showTooltip:!0,tooltipPosition:_,type:et,onClick:_e,testId:$,loading:j===et,disabled:!!j},et))}),defaultProps$2={i18n:{title:"Sign In to Decentraland",accessWith:a=>`Continue with ${connectionOptionTitles[a]}`,connectWith:a=>`Continue with ${connectionOptionTitles[a]}`,moreOptions:"More Options",socialMessage:a=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Access secured by ",a]}),web3Message:a=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Have a digital wallet? ",a("Learn More")]})}},Connection=a=>{var Et;const{i18n:_=defaultProps$2.i18n,onConnect:$,onLearnMore:j,connectionOptions:_e,className:et,loadingOption:tt}=a,rt=(_e==null?void 0:_e.extraOptions)&&_e.extraOptions.length>0,[at,ct]=reactExports.useState(rt),dt=reactExports.useCallback(()=>{ct(!at)},[at]),yt=(Et=window.ethereum)==null?void 0:Et.isMetaMask,bt=($t,_t)=>jsxRuntimeExports.jsx(Primary,{onConnect:$,testId:_t,option:$t,loadingOption:tt,error:!yt&&$t===ConnectionOptionType.METAMASK?"You need to install the MetaMask Browser Extension to proceed. Please install it and try again.":void 0,message:isSocialLogin($t)?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[_.socialMessage(jsxRuntimeExports.jsx("div",{className:styles$9.primaryMagic,role:"img","aria-label":"Magic"})),jsxRuntimeExports.jsx("span",{className:styles$9.primaryLearnMore,role:"button",onClick:()=>j($t),children:"Learn More"})]}):_.web3Message(xt=>jsxRuntimeExports.jsx("span",{className:styles$9.primaryLearnMore,role:"button",onClick:()=>j($t),children:xt})),children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:isSocialLogin($t)?_.accessWith($t):_.connectWith($t)})});return jsxRuntimeExports.jsxs("div",{className:classNames(et,styles$9.connection),children:[jsxRuntimeExports.jsx("img",{className:styles$9.dclLogo,src:logoImg,alt:"Decentraland logo"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{className:styles$9.title,children:_.title}),_e&&bt(_e.primary,PRIMARY_TEST_ID),(_e==null?void 0:_e.secondary)&&bt(_e.secondary,SECONDARY_TEST_ID)]}),jsxRuntimeExports.jsxs("div",{className:styles$9.showMore,children:[rt&&jsxRuntimeExports.jsxs(Button$5.Button,{"data-testid":SHOW_MORE_BUTTON_TEST_ID,basic:!0,size:"medium",fluid:!0,className:styles$9.showMoreButton,onClick:dt,children:[_.moreOptions,jsxRuntimeExports.jsx(default_1,{name:at?"chevron up":"chevron down"})]}),at&&rt&&_e.extraOptions&&jsxRuntimeExports.jsx(Secondary,{testId:EXTRA_TEST_ID,options:_e.extraOptions,onConnect:$,tooltipDirection:"top center",loadingOption:tt})]})]})},locations={home:()=>"/",login:a=>`/login${a?`?redirectTo=${encodeURIComponent(a)}`:""}`,setup:a=>`/setup${a?`?redirectTo=${encodeURIComponent(a)}`:""}`},extractRedirectToFromSearchParameters=a=>{let _=a.get("redirectTo");try{const j=a.get("state");if(j){const _e=atob(j),et=JSON.parse(_e).customData;et&&(_=et??null)}}catch{console.error("Can't decode state parameter")}let $=locations.home();if(_)try{$=decodeURIComponent(_)}catch{console.error("Can't decode redirectTo parameter")}return $},defaultConfig={skipSetup:!1,showWearablePreview:!0,explorerText:"Desktop App",connectionOptions:{primary:ConnectionOptionType.GOOGLE,secondary:ConnectionOptionType.METAMASK,extraOptions:[ConnectionOptionType.DISCORD,ConnectionOptionType.APPLE,ConnectionOptionType.X,ConnectionOptionType.FORTMATIC,ConnectionOptionType.COINBASE,ConnectionOptionType.WALLET_CONNECT]}},defaultMobileConfig={...defaultConfig,skipSetup:!0,showWearablePreview:!1,explorerText:"Mobile App",deepLink:"decentraland://"},targetConfigs={default:{...defaultConfig},alternative:{...defaultConfig,skipSetup:!0,showWearablePreview:!1,explorerText:"Explorer"},ios:{...defaultMobileConfig,connectionOptions:{primary:ConnectionOptionType.APPLE,secondary:ConnectionOptionType.WALLET_CONNECT,extraOptions:[ConnectionOptionType.GOOGLE,ConnectionOptionType.DISCORD,ConnectionOptionType.X,ConnectionOptionType.FORTMATIC,ConnectionOptionType.COINBASE]}},android:{...defaultMobileConfig,connectionOptions:{primary:ConnectionOptionType.GOOGLE,secondary:ConnectionOptionType.WALLET_CONNECT,extraOptions:[ConnectionOptionType.DISCORD,ConnectionOptionType.APPLE,ConnectionOptionType.X,ConnectionOptionType.FORTMATIC,ConnectionOptionType.COINBASE]}},androidSocial:{...defaultMobileConfig,connectionOptions:{primary:ConnectionOptionType.GOOGLE,secondary:ConnectionOptionType.X,extraOptions:[ConnectionOptionType.APPLE,ConnectionOptionType.DISCORD]}},androidWeb3:{...defaultMobileConfig,connectionOptions:{primary:ConnectionOptionType.WALLET_CONNECT}}},adjustWeb3OptionsForMobile=a=>{let{primary:_,secondary:$,extraOptions:j}=a.connectionOptions;return _===ConnectionOptionType.METAMASK&&(_=ConnectionOptionType.WALLET_CONNECT,j=j==null?void 0:j.filter(_e=>_e!==ConnectionOptionType.WALLET_CONNECT)),$===ConnectionOptionType.METAMASK&&($=ConnectionOptionType.WALLET_CONNECT,j=j==null?void 0:j.filter(_e=>_e!==ConnectionOptionType.WALLET_CONNECT)),j=j==null?void 0:j.filter(_e=>_e!==ConnectionOptionType.METAMASK),{...a,connectionOptions:{primary:_,secondary:$,extraOptions:j}}},getTargetConfigId=a=>{const _=new URLSearchParams(a.search),$=_.get("targetConfigId"),j=extractRedirectToFromSearchParameters(_);if($ in targetConfigs)return $;if(j)try{let _e;j.startsWith("/")?_e=new URLSearchParams(j):_e=new URL(j).searchParams;const et=_e.get("targetConfigId");if(et)return et}catch{console.error("Can't parse redirectTo URL")}return"default"},useTargetConfig=()=>{const a=useLocation(),_=getTargetConfigId(a);let $=targetConfigs[_];return isMobile$1()&&($=adjustWeb3OptionsForMobile($)),[$,_]};function getAnalytics(){return window.analytics}const usePageTracking=()=>{reactExports.useEffect(()=>{const a=getAnalytics();a&&a.page()},[])};var TrackingEvents=(a=>(a.LOGIN_CLICK="Click Login Button",a.LOGIN_SUCCESS="Login Success",a.LOGIN_ERROR="Login Error",a.CLICK="Click Button",a.AVATAR_EDIT_SUCCESS="Avatar Edit Success",a.TERMS_OF_SERVICE_SUCCESS="Terms of service success",a))(TrackingEvents||{}),ClickEvents=(a=>(a.LEARN_MORE="Learn More",a.DENY_SIGN_IN="Deny Sign In",a.DENY_WALLET_INTERACTION="Deny Wallet Interaction",a.APPROVE_SING_IN="Approve Sign In",a.APPROVE_WALLET_INTERACTION="Approve Wallet Interaction",a.RANDOMIZE="Randomize default profile",a.BACK_TO_AVATAR_RANDOMIZATION_VIEW="Back to avatar randomization view",a.SUBMIT_PROFILE="Submit profile",a))(ClickEvents||{}),ConnectionType=(a=>(a.WEB3="web3",a.WEB2="web2",a.GUEST="guest",a))(ConnectionType||{}),dist$4={},config$2={},env={},location$1={},hasRequiredLocation;function requireLocation(){if(hasRequiredLocation)return location$1;hasRequiredLocation=1,Object.defineProperty(location$1,"__esModule",{value:!0}),location$1.getEnvFromQueryParam=location$1.getEnvFromTLD=void 0;const a=requireEnv();function _(j){const{host:_e}=j;return _e.endsWith(".org")?a.Env.PRODUCTION:_e.endsWith(".today")||_e.endsWith(".net")?a.Env.STAGING:_e.endsWith(".io")||_e.endsWith(".zone")?a.Env.DEVELOPMENT:null}location$1.getEnvFromTLD=_;function $(j){const _e=new URLSearchParams(j.search),et=_e.get("ENV")||_e.get("env");if(et){const tt=et.toLowerCase();if((0,a.isEnv)(tt))return tt}return null}return location$1.getEnvFromQueryParam=$,location$1}var hasRequiredEnv;function requireEnv(){return hasRequiredEnv||(hasRequiredEnv=1,function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.getEnv=a.getDefaultEnv=a.parseEnvVar=a.isEnv=a.getEnvList=a.Env=void 0;const _=requireLocation();var $;(function(at){at.DEVELOPMENT="dev",at.STAGING="stg",at.PRODUCTION="prod"})($=a.Env||(a.Env={}));function j(){return Object.values($)}a.getEnvList=j;function _e(at){return j().includes(at)}a.isEnv=_e;function et(at){if(_e(at))return at;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${at}", possible values are ${j().map(ct=>`"${ct}"`).join(", ")}.`)}a.parseEnvVar=et;function tt(at={}){const{DCL_DEFAULT_ENV:ct,REACT_APP_DCL_DEFAULT_ENV:dt,GATSBY_DCL_DEFAULT_ENV:yt}=at;if(ct&&dt&&ct!==dt)throw new Error("You have defined both DCL_DEFAULT_ENV and REACT_APP_DCL_DEFAULT_ENV with different values");if(ct&&yt&&ct!==yt)throw new Error("You have defined both DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");if(dt&&yt&&dt!==yt)throw new Error("You have defined both REACT_APP_DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");return ct?et(ct):dt?et(dt):yt?et(yt):$.PRODUCTION}a.getDefaultEnv=tt;function rt(at={}){if(typeof window<"u"){const ct=(0,_.getEnvFromQueryParam)(window.location);if(ct)return ct;const dt=(0,_.getEnvFromTLD)(window.location);if(dt)return dt}return tt(at)}a.getEnv=rt}(env)),env}Object.defineProperty(config$2,"__esModule",{value:!0});config$2.createConfig=void 0;const env_1=requireEnv();function createConfig(a,_){const $=(0,env_1.getEnv)(_==null?void 0:_.systemEnvVariables),j=a[$];return{get:(_e,et="")=>{if(!j)throw new Error(`Could not find a config for env=${$}`);return _e in j?j[_e]:et},is:_e=>$===_e,getEnv:()=>$}}config$2.createConfig=createConfig;(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.getEnv=a.Env=a.createConfig=void 0;var _=config$2;Object.defineProperty(a,"createConfig",{enumerable:!0,get:function(){return _.createConfig}});var $=requireEnv();Object.defineProperty(a,"Env",{enumerable:!0,get:function(){return $.Env}}),Object.defineProperty(a,"getEnv",{enumerable:!0,get:function(){return $.getEnv}})})(dist$4);const AUTH_SERVER_URL$2="https://auth-api.decentraland.zone",SEGMENT_API_KEY$2="FQqbzV2KeUKe2RPOeFkedKRPkJAFsU9r",PEER_URL$2="https://peer.decentraland.zone",FEATURE_FLAGS_URL$2="https://feature-flags.decentraland.org",FEATURE_FLAGS_INTERVAL$2="60000",BUILDER_SERVER_URL$2="https://builder-api.decentraland.zone",INTERCOM_APP_ID$2="z0h94kay",dev={AUTH_SERVER_URL:AUTH_SERVER_URL$2,SEGMENT_API_KEY:SEGMENT_API_KEY$2,PEER_URL:PEER_URL$2,FEATURE_FLAGS_URL:FEATURE_FLAGS_URL$2,FEATURE_FLAGS_INTERVAL:FEATURE_FLAGS_INTERVAL$2,BUILDER_SERVER_URL:BUILDER_SERVER_URL$2,INTERCOM_APP_ID:INTERCOM_APP_ID$2},AUTH_SERVER_URL$1="https://auth-api.decentraland.org",SEGMENT_API_KEY$1="FQqbzV2KeUKe2RPOeFkedKRPkJAFsU9r",PEER_URL$1="https://peer.decentraland.org",FEATURE_FLAGS_URL$1="https://feature-flags.decentraland.org",FEATURE_FLAGS_INTERVAL$1="60000",BUILDER_SERVER_URL$1="https://builder-api.decentraland.org",INTERCOM_APP_ID$1="z0h94kay",prod={AUTH_SERVER_URL:AUTH_SERVER_URL$1,SEGMENT_API_KEY:SEGMENT_API_KEY$1,PEER_URL:PEER_URL$1,FEATURE_FLAGS_URL:FEATURE_FLAGS_URL$1,FEATURE_FLAGS_INTERVAL:FEATURE_FLAGS_INTERVAL$1,BUILDER_SERVER_URL:BUILDER_SERVER_URL$1,INTERCOM_APP_ID:INTERCOM_APP_ID$1},AUTH_SERVER_URL="https://auth-api.decentraland.today",SEGMENT_API_KEY="FQqbzV2KeUKe2RPOeFkedKRPkJAFsU9r",PEER_URL="https://peer-testing.decentraland.org",FEATURE_FLAGS_URL="https://feature-flags.decentraland.org",FEATURE_FLAGS_INTERVAL="60000",BUILDER_SERVER_URL="https://builder-api.decentraland.today",INTERCOM_APP_ID="z0h94kay",stg={AUTH_SERVER_URL,SEGMENT_API_KEY,PEER_URL,FEATURE_FLAGS_URL,FEATURE_FLAGS_INTERVAL,BUILDER_SERVER_URL,INTERCOM_APP_ID},config$1=dist$4.createConfig({[dist$4.Env.DEVELOPMENT]:dev,[dist$4.Env.STAGING]:stg,[dist$4.Env.PRODUCTION]:prod},{systemEnvVariables:{REACT_APP_DCL_DEFAULT_ENV:{}.VITE_REACT_APP_DCL_DEFAULT_ENV??"dev"}});var dist$3={},fetcher$1={},browserPonyfill={exports:{}};(function(a,_){var $=typeof self<"u"?self:commonjsGlobal,j=function(){function et(){this.fetch=!1,this.DOMException=$.DOMException}return et.prototype=$,new et}();(function(et){(function(tt){var rt={searchParams:"URLSearchParams"in et,iterable:"Symbol"in et&&"iterator"in Symbol,blob:"FileReader"in et&&"Blob"in et&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in et,arrayBuffer:"ArrayBuffer"in et};function at(lt){return lt&&DataView.prototype.isPrototypeOf(lt)}if(rt.arrayBuffer)var ct=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],dt=ArrayBuffer.isView||function(lt){return lt&&ct.indexOf(Object.prototype.toString.call(lt))>-1};function yt(lt){if(typeof lt!="string"&&(lt=String(lt)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(lt))throw new TypeError("Invalid character in header field name");return lt.toLowerCase()}function bt(lt){return typeof lt!="string"&&(lt=String(lt)),lt}function Et(lt){var ht={next:function(){var mt=lt.shift();return{done:mt===void 0,value:mt}}};return rt.iterable&&(ht[Symbol.iterator]=function(){return ht}),ht}function $t(lt){this.map={},lt instanceof $t?lt.forEach(function(ht,mt){this.append(mt,ht)},this):Array.isArray(lt)?lt.forEach(function(ht){this.append(ht[0],ht[1])},this):lt&&Object.getOwnPropertyNames(lt).forEach(function(ht){this.append(ht,lt[ht])},this)}$t.prototype.append=function(lt,ht){lt=yt(lt),ht=bt(ht);var mt=this.map[lt];this.map[lt]=mt?mt+", "+ht:ht},$t.prototype.delete=function(lt){delete this.map[yt(lt)]},$t.prototype.get=function(lt){return lt=yt(lt),this.has(lt)?this.map[lt]:null},$t.prototype.has=function(lt){return this.map.hasOwnProperty(yt(lt))},$t.prototype.set=function(lt,ht){this.map[yt(lt)]=bt(ht)},$t.prototype.forEach=function(lt,ht){for(var mt in this.map)this.map.hasOwnProperty(mt)&&lt.call(ht,this.map[mt],mt,this)},$t.prototype.keys=function(){var lt=[];return this.forEach(function(ht,mt){lt.push(mt)}),Et(lt)},$t.prototype.values=function(){var lt=[];return this.forEach(function(ht){lt.push(ht)}),Et(lt)},$t.prototype.entries=function(){var lt=[];return this.forEach(function(ht,mt){lt.push([mt,ht])}),Et(lt)},rt.iterable&&($t.prototype[Symbol.iterator]=$t.prototype.entries);function _t(lt){if(lt.bodyUsed)return Promise.reject(new TypeError("Already read"));lt.bodyUsed=!0}function xt(lt){return new Promise(function(ht,mt){lt.onload=function(){ht(lt.result)},lt.onerror=function(){mt(lt.error)}})}function St(lt){var ht=new FileReader,mt=xt(ht);return ht.readAsArrayBuffer(lt),mt}function Mt(lt){var ht=new FileReader,mt=xt(ht);return ht.readAsText(lt),mt}function Tt(lt){for(var ht=new Uint8Array(lt),mt=new Array(ht.length),wt=0;wt<ht.length;wt++)mt[wt]=String.fromCharCode(ht[wt]);return mt.join("")}function Rt(lt){if(lt.slice)return lt.slice(0);var ht=new Uint8Array(lt.byteLength);return ht.set(new Uint8Array(lt)),ht.buffer}function Ct(){return this.bodyUsed=!1,this._initBody=function(lt){this._bodyInit=lt,lt?typeof lt=="string"?this._bodyText=lt:rt.blob&&Blob.prototype.isPrototypeOf(lt)?this._bodyBlob=lt:rt.formData&&FormData.prototype.isPrototypeOf(lt)?this._bodyFormData=lt:rt.searchParams&&URLSearchParams.prototype.isPrototypeOf(lt)?this._bodyText=lt.toString():rt.arrayBuffer&&rt.blob&&at(lt)?(this._bodyArrayBuffer=Rt(lt.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):rt.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(lt)||dt(lt))?this._bodyArrayBuffer=Rt(lt):this._bodyText=lt=Object.prototype.toString.call(lt):this._bodyText="",this.headers.get("content-type")||(typeof lt=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):rt.searchParams&&URLSearchParams.prototype.isPrototypeOf(lt)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},rt.blob&&(this.blob=function(){var lt=_t(this);if(lt)return lt;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?_t(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(St)}),this.text=function(){var lt=_t(this);if(lt)return lt;if(this._bodyBlob)return Mt(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(Tt(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},rt.formData&&(this.formData=function(){return this.text().then(Bt)}),this.json=function(){return this.text().then(JSON.parse)},this}var It=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function kt(lt){var ht=lt.toUpperCase();return It.indexOf(ht)>-1?ht:lt}function Dt(lt,ht){ht=ht||{};var mt=ht.body;if(lt instanceof Dt){if(lt.bodyUsed)throw new TypeError("Already read");this.url=lt.url,this.credentials=lt.credentials,ht.headers||(this.headers=new $t(lt.headers)),this.method=lt.method,this.mode=lt.mode,this.signal=lt.signal,!mt&&lt._bodyInit!=null&&(mt=lt._bodyInit,lt.bodyUsed=!0)}else this.url=String(lt);if(this.credentials=ht.credentials||this.credentials||"same-origin",(ht.headers||!this.headers)&&(this.headers=new $t(ht.headers)),this.method=kt(ht.method||this.method||"GET"),this.mode=ht.mode||this.mode||null,this.signal=ht.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&mt)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(mt)}Dt.prototype.clone=function(){return new Dt(this,{body:this._bodyInit})};function Bt(lt){var ht=new FormData;return lt.trim().split("&").forEach(function(mt){if(mt){var wt=mt.split("="),At=wt.shift().replace(/\+/g," "),gt=wt.join("=").replace(/\+/g," ");ht.append(decodeURIComponent(At),decodeURIComponent(gt))}}),ht}function zt(lt){var ht=new $t,mt=lt.replace(/\r?\n[\t ]+/g," ");return mt.split(/\r?\n/).forEach(function(wt){var At=wt.split(":"),gt=At.shift().trim();if(gt){var ot=At.join(":").trim();ht.append(gt,ot)}}),ht}Ct.call(Dt.prototype);function vt(lt,ht){ht||(ht={}),this.type="default",this.status=ht.status===void 0?200:ht.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in ht?ht.statusText:"OK",this.headers=new $t(ht.headers),this.url=ht.url||"",this._initBody(lt)}Ct.call(vt.prototype),vt.prototype.clone=function(){return new vt(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new $t(this.headers),url:this.url})},vt.error=function(){var lt=new vt(null,{status:0,statusText:""});return lt.type="error",lt};var nt=[301,302,303,307,308];vt.redirect=function(lt,ht){if(nt.indexOf(ht)===-1)throw new RangeError("Invalid status code");return new vt(null,{status:ht,headers:{location:lt}})},tt.DOMException=et.DOMException;try{new tt.DOMException}catch{tt.DOMException=function(ht,mt){this.message=ht,this.name=mt;var wt=Error(ht);this.stack=wt.stack},tt.DOMException.prototype=Object.create(Error.prototype),tt.DOMException.prototype.constructor=tt.DOMException}function st(lt,ht){return new Promise(function(mt,wt){var At=new Dt(lt,ht);if(At.signal&&At.signal.aborted)return wt(new tt.DOMException("Aborted","AbortError"));var gt=new XMLHttpRequest;function ot(){gt.abort()}gt.onload=function(){var pt={status:gt.status,statusText:gt.statusText,headers:zt(gt.getAllResponseHeaders()||"")};pt.url="responseURL"in gt?gt.responseURL:pt.headers.get("X-Request-URL");var Pt="response"in gt?gt.response:gt.responseText;mt(new vt(Pt,pt))},gt.onerror=function(){wt(new TypeError("Network request failed"))},gt.ontimeout=function(){wt(new TypeError("Network request failed"))},gt.onabort=function(){wt(new tt.DOMException("Aborted","AbortError"))},gt.open(At.method,At.url,!0),At.credentials==="include"?gt.withCredentials=!0:At.credentials==="omit"&&(gt.withCredentials=!1),"responseType"in gt&&rt.blob&&(gt.responseType="blob"),At.headers.forEach(function(pt,Pt){gt.setRequestHeader(Pt,pt)}),At.signal&&(At.signal.addEventListener("abort",ot),gt.onreadystatechange=function(){gt.readyState===4&&At.signal.removeEventListener("abort",ot)}),gt.send(typeof At._bodyInit>"u"?null:At._bodyInit)})}return st.polyfill=!0,et.fetch||(et.fetch=st,et.Headers=$t,et.Request=Dt,et.Response=vt),tt.Headers=$t,tt.Request=Dt,tt.Response=vt,tt.fetch=st,Object.defineProperty(tt,"__esModule",{value:!0}),tt})({})})(j),j.fetch.ponyfill=!0,delete j.fetch.polyfill;var _e=j;_=_e.fetch,_.default=_e.fetch,_.fetch=_e.fetch,_.Headers=_e.Headers,_.Request=_e.Request,_.Response=_e.Response,a.exports=_})(browserPonyfill,browserPonyfill.exports);var browserPonyfillExports=browserPonyfill.exports;const o=getDefaultExportFromCjs$1(browserPonyfillExports);var environment={};Object.defineProperty(environment,"__esModule",{value:!0});environment.isUsingNode=void 0;function isUsingNode(){return typeof process$1<"u"&&process$1.release&&process$1.release.name==="node"}environment.isUsingNode=isUsingNode;var __createBinding$5=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(a,_,$,j){j===void 0&&(j=$);var _e=Object.getOwnPropertyDescriptor(_,$);(!_e||("get"in _e?!_.__esModule:_e.writable||_e.configurable))&&(_e={enumerable:!0,get:function(){return _[$]}}),Object.defineProperty(a,j,_e)}:function(a,_,$,j){j===void 0&&(j=$),a[j]=_[$]}),__setModuleDefault$5=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(a,_){Object.defineProperty(a,"default",{enumerable:!0,value:_})}:function(a,_){a.default=_}),__importStar$5=commonjsGlobal&&commonjsGlobal.__importStar||function(a){if(a&&a.__esModule)return a;var _={};if(a!=null)for(var $ in a)$!=="default"&&Object.prototype.hasOwnProperty.call(a,$)&&__createBinding$5(_,a,$);return __setModuleDefault$5(_,a),_},__rest$2=commonjsGlobal&&commonjsGlobal.__rest||function(a,_){var $={};for(var j in a)Object.prototype.hasOwnProperty.call(a,j)&&_.indexOf(j)<0&&($[j]=a[j]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,j=Object.getOwnPropertySymbols(a);_e<j.length;_e++)_.indexOf(j[_e])<0&&Object.prototype.propertyIsEnumerable.call(a,j[_e])&&($[j[_e]]=a[j[_e]]);return $};Object.defineProperty(fetcher$1,"__esModule",{value:!0});fetcher$1.createFetchComponent=void 0;const crossFetch=__importStar$5(browserPonyfillExports),environment_1=environment,NON_RETRYABLE_STATUS_CODES=[400,401,403,404],IDEMPOTENT_HTTP_METHODS=["GET","HEAD","OPTIONS","PUT","DELETE"];async function fetchWithRetriesAndTimeout(a,_){const{timeout:$,abortController:j,signal:_e,retryDelay:et}=_;let tt=_.attempts,rt=null,at;do try{$&&(rt=setTimeout(()=>{j.abort()},$));const ct=crossFetch.default(a.toString(),Object.assign(Object.assign({},_),{signal:_e})),dt=Promise.race([ct,new Promise((yt,bt)=>{_e.addEventListener("abort",()=>{yt(new crossFetch.Response("timeout",{status:408,statusText:"Request Timeout"}))})})]);--tt,at=await dt,rt&&clearTimeout(rt)}finally{if(at&&(at.ok||NON_RETRYABLE_STATUS_CODES.includes(at.status)||tt===0))break;await new Promise(ct=>setTimeout(ct,et))}while((!at||!at.ok)&&tt>0);return at}function createFetchComponent(a){async function _($,j){const et=Object.assign(Object.assign({},a==null?void 0:a.defaultFetcherOptions),j)||{},{timeout:tt,method:rt="GET",retryDelay:at=0,abortController:ct}=et,dt=__rest$2(et,["timeout","method","retryDelay","abortController"]);let yt=dt.attempts||1;const bt=ct||new AbortController,{signal:Et}=bt;a!=null&&a.defaultHeaders&&(dt.headers=Object.assign(Object.assign({},a==null?void 0:a.defaultHeaders),dt.headers||{})),IDEMPOTENT_HTTP_METHODS.includes(rt.toUpperCase())||(yt=1);const $t=await fetchWithRetriesAndTimeout($,Object.assign(Object.assign({},dt),{attempts:yt,method:rt,timeout:tt,retryDelay:at,signal:Et,abortController:bt}));if(!($t!=null&&$t.ok)){const _t=await($t==null?void 0:$t.text());throw new Error(`Failed to fetch ${$}. Got status ${$t==null?void 0:$t.status}. Response was '${_t}'`)}return!(0,environment_1.isUsingNode)()&&$t&&Object.defineProperty($t,"buffer",{value:async function(){return Buffer$G.from(await $t.arrayBuffer())},configurable:!0}),Et.aborted?void 0:$t}return{fetch:_}}fetcher$1.createFetchComponent=createFetchComponent;(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.createFetchComponent=void 0;var _=fetcher$1;Object.defineProperty(a,"createFetchComponent",{enumerable:!0,get:function(){return _.createFetchComponent}})})(dist$3);var dist$2={},CatalystClient={},ContentClient={},dist$1={exports:{}};dist$1.exports;(function(module){var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__commonJS=(a,_)=>function(){return _||(0,a[__getOwnPropNames(a)[0]])((_={exports:{}}).exports,_),_.exports},__export=(a,_)=>{for(var $ in _)__defProp(a,$,{get:_[$],enumerable:!0})},__copyProps=(a,_,$,j)=>{if(_&&typeof _=="object"||typeof _=="function")for(let _e of __getOwnPropNames(_))!__hasOwnProp.call(a,_e)&&_e!==$&&__defProp(a,_e,{get:()=>_[_e],enumerable:!(j=__getOwnPropDesc(_,_e))||j.enumerable});return a},__toESM=(a,_,$)=>($=a!=null?__create(__getProtoOf(a)):{},__copyProps(_||!a||!a.__esModule?__defProp($,"default",{value:a,enumerable:!0}):$,a)),__toCommonJS=a=>__copyProps(__defProp({},"__esModule",{value:!0}),a),require_err_code=__commonJS({"node_modules/err-code/index.js"(a,_){function $(_e,et){for(const tt in et)Object.defineProperty(_e,tt,{value:et[tt],enumerable:!0,configurable:!0});return _e}function j(_e,et,tt){if(!_e||typeof _e=="string")throw new TypeError("Please pass an Error to err-code");tt||(tt={}),typeof et=="object"&&(tt=et,et=""),et&&(tt.code=et);try{return $(_e,tt)}catch{tt.message=_e.message,tt.stack=_e.stack;const at=function(){};return at.prototype=Object.create(Object.getPrototypeOf(_e)),$(new at,tt)}}_.exports=j}}),require_aspromise=__commonJS({"node_modules/@protobufjs/aspromise/index.js"(a,_){_.exports=$;function $(j,_e){for(var et=new Array(arguments.length-1),tt=0,rt=2,at=!0;rt<arguments.length;)et[tt++]=arguments[rt++];return new Promise(function(dt,yt){et[tt]=function(Et){if(at)if(at=!1,Et)yt(Et);else{for(var $t=new Array(arguments.length-1),_t=0;_t<$t.length;)$t[_t++]=arguments[_t];dt.apply(null,$t)}};try{j.apply(_e||null,et)}catch(bt){at&&(at=!1,yt(bt))}})}}}),require_base64=__commonJS({"node_modules/@protobufjs/base64/index.js"(a){var _=a;_.length=function(rt){var at=rt.length;if(!at)return 0;for(var ct=0;--at%4>1&&rt.charAt(at)==="=";)++ct;return Math.ceil(rt.length*3)/4-ct};var $=new Array(64),j=new Array(123);for(_e=0;_e<64;)j[$[_e]=_e<26?_e+65:_e<52?_e+71:_e<62?_e-4:_e-59|43]=_e++;var _e;_.encode=function(rt,at,ct){for(var dt=null,yt=[],bt=0,Et=0,$t;at<ct;){var _t=rt[at++];switch(Et){case 0:yt[bt++]=$[_t>>2],$t=(_t&3)<<4,Et=1;break;case 1:yt[bt++]=$[$t|_t>>4],$t=(_t&15)<<2,Et=2;break;case 2:yt[bt++]=$[$t|_t>>6],yt[bt++]=$[_t&63],Et=0;break}bt>8191&&((dt||(dt=[])).push(String.fromCharCode.apply(String,yt)),bt=0)}return Et&&(yt[bt++]=$[$t],yt[bt++]=61,Et===1&&(yt[bt++]=61)),dt?(bt&&dt.push(String.fromCharCode.apply(String,yt.slice(0,bt))),dt.join("")):String.fromCharCode.apply(String,yt.slice(0,bt))};var et="invalid encoding";_.decode=function(rt,at,ct){for(var dt=ct,yt=0,bt,Et=0;Et<rt.length;){var $t=rt.charCodeAt(Et++);if($t===61&&yt>1)break;if(($t=j[$t])===void 0)throw Error(et);switch(yt){case 0:bt=$t,yt=1;break;case 1:at[ct++]=bt<<2|($t&48)>>4,bt=$t,yt=2;break;case 2:at[ct++]=(bt&15)<<4|($t&60)>>2,bt=$t,yt=3;break;case 3:at[ct++]=(bt&3)<<6|$t,yt=0;break}}if(yt===1)throw Error(et);return ct-dt},_.test=function(rt){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(rt)}}}),require_eventemitter=__commonJS({"node_modules/@protobufjs/eventemitter/index.js"(a,_){_.exports=$;function $(){this._listeners={}}$.prototype.on=function(_e,et,tt){return(this._listeners[_e]||(this._listeners[_e]=[])).push({fn:et,ctx:tt||this}),this},$.prototype.off=function(_e,et){if(_e===void 0)this._listeners={};else if(et===void 0)this._listeners[_e]=[];else for(var tt=this._listeners[_e],rt=0;rt<tt.length;)tt[rt].fn===et?tt.splice(rt,1):++rt;return this},$.prototype.emit=function(_e){var et=this._listeners[_e];if(et){for(var tt=[],rt=1;rt<arguments.length;)tt.push(arguments[rt++]);for(rt=0;rt<et.length;)et[rt].fn.apply(et[rt++].ctx,tt)}return this}}}),require_float=__commonJS({"node_modules/@protobufjs/float/index.js"(a,_){_.exports=$($);function $(rt){return typeof Float32Array<"u"?function(){var at=new Float32Array([-0]),ct=new Uint8Array(at.buffer),dt=ct[3]===128;function yt(_t,xt,St){at[0]=_t,xt[St]=ct[0],xt[St+1]=ct[1],xt[St+2]=ct[2],xt[St+3]=ct[3]}function bt(_t,xt,St){at[0]=_t,xt[St]=ct[3],xt[St+1]=ct[2],xt[St+2]=ct[1],xt[St+3]=ct[0]}rt.writeFloatLE=dt?yt:bt,rt.writeFloatBE=dt?bt:yt;function Et(_t,xt){return ct[0]=_t[xt],ct[1]=_t[xt+1],ct[2]=_t[xt+2],ct[3]=_t[xt+3],at[0]}function $t(_t,xt){return ct[3]=_t[xt],ct[2]=_t[xt+1],ct[1]=_t[xt+2],ct[0]=_t[xt+3],at[0]}rt.readFloatLE=dt?Et:$t,rt.readFloatBE=dt?$t:Et}():function(){function at(dt,yt,bt,Et){var $t=yt<0?1:0;if($t&&(yt=-yt),yt===0)dt(1/yt>0?0:2147483648,bt,Et);else if(isNaN(yt))dt(2143289344,bt,Et);else if(yt>34028234663852886e22)dt(($t<<31|2139095040)>>>0,bt,Et);else if(yt<11754943508222875e-54)dt(($t<<31|Math.round(yt/1401298464324817e-60))>>>0,bt,Et);else{var _t=Math.floor(Math.log(yt)/Math.LN2),xt=Math.round(yt*Math.pow(2,-_t)*8388608)&8388607;dt(($t<<31|_t+127<<23|xt)>>>0,bt,Et)}}rt.writeFloatLE=at.bind(null,j),rt.writeFloatBE=at.bind(null,_e);function ct(dt,yt,bt){var Et=dt(yt,bt),$t=(Et>>31)*2+1,_t=Et>>>23&255,xt=Et&8388607;return _t===255?xt?NaN:$t*(1/0):_t===0?$t*1401298464324817e-60*xt:$t*Math.pow(2,_t-150)*(xt+8388608)}rt.readFloatLE=ct.bind(null,et),rt.readFloatBE=ct.bind(null,tt)}(),typeof Float64Array<"u"?function(){var at=new Float64Array([-0]),ct=new Uint8Array(at.buffer),dt=ct[7]===128;function yt(_t,xt,St){at[0]=_t,xt[St]=ct[0],xt[St+1]=ct[1],xt[St+2]=ct[2],xt[St+3]=ct[3],xt[St+4]=ct[4],xt[St+5]=ct[5],xt[St+6]=ct[6],xt[St+7]=ct[7]}function bt(_t,xt,St){at[0]=_t,xt[St]=ct[7],xt[St+1]=ct[6],xt[St+2]=ct[5],xt[St+3]=ct[4],xt[St+4]=ct[3],xt[St+5]=ct[2],xt[St+6]=ct[1],xt[St+7]=ct[0]}rt.writeDoubleLE=dt?yt:bt,rt.writeDoubleBE=dt?bt:yt;function Et(_t,xt){return ct[0]=_t[xt],ct[1]=_t[xt+1],ct[2]=_t[xt+2],ct[3]=_t[xt+3],ct[4]=_t[xt+4],ct[5]=_t[xt+5],ct[6]=_t[xt+6],ct[7]=_t[xt+7],at[0]}function $t(_t,xt){return ct[7]=_t[xt],ct[6]=_t[xt+1],ct[5]=_t[xt+2],ct[4]=_t[xt+3],ct[3]=_t[xt+4],ct[2]=_t[xt+5],ct[1]=_t[xt+6],ct[0]=_t[xt+7],at[0]}rt.readDoubleLE=dt?Et:$t,rt.readDoubleBE=dt?$t:Et}():function(){function at(dt,yt,bt,Et,$t,_t){var xt=Et<0?1:0;if(xt&&(Et=-Et),Et===0)dt(0,$t,_t+yt),dt(1/Et>0?0:2147483648,$t,_t+bt);else if(isNaN(Et))dt(0,$t,_t+yt),dt(2146959360,$t,_t+bt);else if(Et>17976931348623157e292)dt(0,$t,_t+yt),dt((xt<<31|2146435072)>>>0,$t,_t+bt);else{var St;if(Et<22250738585072014e-324)St=Et/5e-324,dt(St>>>0,$t,_t+yt),dt((xt<<31|St/4294967296)>>>0,$t,_t+bt);else{var Mt=Math.floor(Math.log(Et)/Math.LN2);Mt===1024&&(Mt=1023),St=Et*Math.pow(2,-Mt),dt(St*4503599627370496>>>0,$t,_t+yt),dt((xt<<31|Mt+1023<<20|St*1048576&1048575)>>>0,$t,_t+bt)}}}rt.writeDoubleLE=at.bind(null,j,0,4),rt.writeDoubleBE=at.bind(null,_e,4,0);function ct(dt,yt,bt,Et,$t){var _t=dt(Et,$t+yt),xt=dt(Et,$t+bt),St=(xt>>31)*2+1,Mt=xt>>>20&2047,Tt=4294967296*(xt&1048575)+_t;return Mt===2047?Tt?NaN:St*(1/0):Mt===0?St*5e-324*Tt:St*Math.pow(2,Mt-1075)*(Tt+4503599627370496)}rt.readDoubleLE=ct.bind(null,et,0,4),rt.readDoubleBE=ct.bind(null,tt,4,0)}(),rt}function j(rt,at,ct){at[ct]=rt&255,at[ct+1]=rt>>>8&255,at[ct+2]=rt>>>16&255,at[ct+3]=rt>>>24}function _e(rt,at,ct){at[ct]=rt>>>24,at[ct+1]=rt>>>16&255,at[ct+2]=rt>>>8&255,at[ct+3]=rt&255}function et(rt,at){return(rt[at]|rt[at+1]<<8|rt[at+2]<<16|rt[at+3]<<24)>>>0}function tt(rt,at){return(rt[at]<<24|rt[at+1]<<16|rt[at+2]<<8|rt[at+3])>>>0}}}),require_inquire=__commonJS({"node_modules/@protobufjs/inquire/index.js"(exports,module){module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(a){}return null}}}),require_utf8=__commonJS({"node_modules/@protobufjs/utf8/index.js"(a){var _=a;_.length=function(j){for(var _e=0,et=0,tt=0;tt<j.length;++tt)et=j.charCodeAt(tt),et<128?_e+=1:et<2048?_e+=2:(et&64512)===55296&&(j.charCodeAt(tt+1)&64512)===56320?(++tt,_e+=4):_e+=3;return _e},_.read=function(j,_e,et){var tt=et-_e;if(tt<1)return"";for(var rt=null,at=[],ct=0,dt;_e<et;)dt=j[_e++],dt<128?at[ct++]=dt:dt>191&&dt<224?at[ct++]=(dt&31)<<6|j[_e++]&63:dt>239&&dt<365?(dt=((dt&7)<<18|(j[_e++]&63)<<12|(j[_e++]&63)<<6|j[_e++]&63)-65536,at[ct++]=55296+(dt>>10),at[ct++]=56320+(dt&1023)):at[ct++]=(dt&15)<<12|(j[_e++]&63)<<6|j[_e++]&63,ct>8191&&((rt||(rt=[])).push(String.fromCharCode.apply(String,at)),ct=0);return rt?(ct&&rt.push(String.fromCharCode.apply(String,at.slice(0,ct))),rt.join("")):String.fromCharCode.apply(String,at.slice(0,ct))},_.write=function(j,_e,et){for(var tt=et,rt,at,ct=0;ct<j.length;++ct)rt=j.charCodeAt(ct),rt<128?_e[et++]=rt:rt<2048?(_e[et++]=rt>>6|192,_e[et++]=rt&63|128):(rt&64512)===55296&&((at=j.charCodeAt(ct+1))&64512)===56320?(rt=65536+((rt&1023)<<10)+(at&1023),++ct,_e[et++]=rt>>18|240,_e[et++]=rt>>12&63|128,_e[et++]=rt>>6&63|128,_e[et++]=rt&63|128):(_e[et++]=rt>>12|224,_e[et++]=rt>>6&63|128,_e[et++]=rt&63|128);return et-tt}}}),require_pool=__commonJS({"node_modules/@protobufjs/pool/index.js"(a,_){_.exports=$;function $(j,_e,et){var tt=et||8192,rt=tt>>>1,at=null,ct=tt;return function(yt){if(yt<1||yt>rt)return j(yt);ct+yt>tt&&(at=j(tt),ct=0);var bt=_e.call(at,ct,ct+=yt);return ct&7&&(ct=(ct|7)+1),bt}}}}),require_longbits=__commonJS({"node_modules/protobufjs/src/util/longbits.js"(a,_){_.exports=j;var $=require_minimal();function j(rt,at){this.lo=rt>>>0,this.hi=at>>>0}var _e=j.zero=new j(0,0);_e.toNumber=function(){return 0},_e.zzEncode=_e.zzDecode=function(){return this},_e.length=function(){return 1};var et=j.zeroHash="\0\0\0\0\0\0\0\0";j.fromNumber=function(at){if(at===0)return _e;var ct=at<0;ct&&(at=-at);var dt=at>>>0,yt=(at-dt)/4294967296>>>0;return ct&&(yt=~yt>>>0,dt=~dt>>>0,++dt>4294967295&&(dt=0,++yt>4294967295&&(yt=0))),new j(dt,yt)},j.from=function(at){if(typeof at=="number")return j.fromNumber(at);if($.isString(at))if($.Long)at=$.Long.fromString(at);else return j.fromNumber(parseInt(at,10));return at.low||at.high?new j(at.low>>>0,at.high>>>0):_e},j.prototype.toNumber=function(at){if(!at&&this.hi>>>31){var ct=~this.lo+1>>>0,dt=~this.hi>>>0;return ct||(dt=dt+1>>>0),-(ct+dt*4294967296)}return this.lo+this.hi*4294967296},j.prototype.toLong=function(at){return $.Long?new $.Long(this.lo|0,this.hi|0,!!at):{low:this.lo|0,high:this.hi|0,unsigned:!!at}};var tt=String.prototype.charCodeAt;j.fromHash=function(at){return at===et?_e:new j((tt.call(at,0)|tt.call(at,1)<<8|tt.call(at,2)<<16|tt.call(at,3)<<24)>>>0,(tt.call(at,4)|tt.call(at,5)<<8|tt.call(at,6)<<16|tt.call(at,7)<<24)>>>0)},j.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},j.prototype.zzEncode=function(){var at=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^at)>>>0,this.lo=(this.lo<<1^at)>>>0,this},j.prototype.zzDecode=function(){var at=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^at)>>>0,this.hi=(this.hi>>>1^at)>>>0,this},j.prototype.length=function(){var at=this.lo,ct=(this.lo>>>28|this.hi<<4)>>>0,dt=this.hi>>>24;return dt===0?ct===0?at<16384?at<128?1:2:at<2097152?3:4:ct<16384?ct<128?5:6:ct<2097152?7:8:dt<128?9:10}}}),require_minimal=__commonJS({"node_modules/protobufjs/src/util/minimal.js"(a){var _=a;_.asPromise=require_aspromise(),_.base64=require_base64(),_.EventEmitter=require_eventemitter(),_.float=require_float(),_.inquire=require_inquire(),_.utf8=require_utf8(),_.pool=require_pool(),_.LongBits=require_longbits(),_.isNode=!!(typeof commonjsGlobal<"u"&&commonjsGlobal&&commonjsGlobal.process&&commonjsGlobal.process.versions&&commonjsGlobal.process.versions.node),_.global=_.isNode&&commonjsGlobal||typeof window<"u"&&window||typeof self<"u"&&self||a,_.emptyArray=Object.freeze?Object.freeze([]):[],_.emptyObject=Object.freeze?Object.freeze({}):{},_.isInteger=Number.isInteger||function(et){return typeof et=="number"&&isFinite(et)&&Math.floor(et)===et},_.isString=function(et){return typeof et=="string"||et instanceof String},_.isObject=function(et){return et&&typeof et=="object"},_.isset=_.isSet=function(et,tt){var rt=et[tt];return rt!=null&&et.hasOwnProperty(tt)?typeof rt!="object"||(Array.isArray(rt)?rt.length:Object.keys(rt).length)>0:!1},_.Buffer=function(){try{var _e=_.inquire("buffer").Buffer;return _e.prototype.utf8Write?_e:null}catch{return null}}(),_._Buffer_from=null,_._Buffer_allocUnsafe=null,_.newBuffer=function(et){return typeof et=="number"?_.Buffer?_._Buffer_allocUnsafe(et):new _.Array(et):_.Buffer?_._Buffer_from(et):typeof Uint8Array>"u"?et:new Uint8Array(et)},_.Array=typeof Uint8Array<"u"?Uint8Array:Array,_.Long=_.global.dcodeIO&&_.global.dcodeIO.Long||_.global.Long||_.inquire("long"),_.key2Re=/^true|false|0|1$/,_.key32Re=/^-?(?:0|[1-9][0-9]*)$/,_.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,_.longToHash=function(et){return et?_.LongBits.from(et).toHash():_.LongBits.zeroHash},_.longFromHash=function(et,tt){var rt=_.LongBits.fromHash(et);return _.Long?_.Long.fromBits(rt.lo,rt.hi,tt):rt.toNumber(!!tt)};function $(_e,et,tt){for(var rt=Object.keys(et),at=0;at<rt.length;++at)(_e[rt[at]]===void 0||!tt)&&(_e[rt[at]]=et[rt[at]]);return _e}_.merge=$,_.lcFirst=function(et){return et.charAt(0).toLowerCase()+et.substring(1)};function j(_e){function et(tt,rt){if(!(this instanceof et))return new et(tt,rt);Object.defineProperty(this,"message",{get:function(){return tt}}),Error.captureStackTrace?Error.captureStackTrace(this,et):Object.defineProperty(this,"stack",{value:new Error().stack||""}),rt&&$(this,rt)}return et.prototype=Object.create(Error.prototype,{constructor:{value:et,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return _e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),et}_.newError=j,_.ProtocolError=j("ProtocolError"),_.oneOfGetter=function(et){for(var tt={},rt=0;rt<et.length;++rt)tt[et[rt]]=1;return function(){for(var at=Object.keys(this),ct=at.length-1;ct>-1;--ct)if(tt[at[ct]]===1&&this[at[ct]]!==void 0&&this[at[ct]]!==null)return at[ct]}},_.oneOfSetter=function(et){return function(tt){for(var rt=0;rt<et.length;++rt)et[rt]!==tt&&delete this[et[rt]]}},_.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},_._configure=function(){var _e=_.Buffer;if(!_e){_._Buffer_from=_._Buffer_allocUnsafe=null;return}_._Buffer_from=_e.from!==Uint8Array.from&&_e.from||function(tt,rt){return new _e(tt,rt)},_._Buffer_allocUnsafe=_e.allocUnsafe||function(tt){return new _e(tt)}}}}),require_reader=__commonJS({"node_modules/protobufjs/src/reader.js"(a,_){_.exports=rt;var $=require_minimal(),j,_e=$.LongBits,et=$.utf8;function tt(Et,$t){return RangeError("index out of range: "+Et.pos+" + "+($t||1)+" > "+Et.len)}function rt(Et){this.buf=Et,this.pos=0,this.len=Et.length}var at=typeof Uint8Array<"u"?function($t){if($t instanceof Uint8Array||Array.isArray($t))return new rt($t);throw Error("illegal buffer")}:function($t){if(Array.isArray($t))return new rt($t);throw Error("illegal buffer")},ct=function(){return $.Buffer?function(_t){return(rt.create=function(St){return $.Buffer.isBuffer(St)?new j(St):at(St)})(_t)}:at};rt.create=ct(),rt.prototype._slice=$.Array.prototype.subarray||$.Array.prototype.slice,rt.prototype.uint32=function(){var $t=4294967295;return function(){if($t=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||($t=($t|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||($t=($t|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||($t=($t|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||($t=($t|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return $t;if((this.pos+=5)>this.len)throw this.pos=this.len,tt(this,10);return $t}}(),rt.prototype.int32=function(){return this.uint32()|0},rt.prototype.sint32=function(){var $t=this.uint32();return $t>>>1^-($t&1)|0};function dt(){var Et=new _e(0,0),$t=0;if(this.len-this.pos>4){for(;$t<4;++$t)if(Et.lo=(Et.lo|(this.buf[this.pos]&127)<<$t*7)>>>0,this.buf[this.pos++]<128)return Et;if(Et.lo=(Et.lo|(this.buf[this.pos]&127)<<28)>>>0,Et.hi=(Et.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return Et;$t=0}else{for(;$t<3;++$t){if(this.pos>=this.len)throw tt(this);if(Et.lo=(Et.lo|(this.buf[this.pos]&127)<<$t*7)>>>0,this.buf[this.pos++]<128)return Et}return Et.lo=(Et.lo|(this.buf[this.pos++]&127)<<$t*7)>>>0,Et}if(this.len-this.pos>4){for(;$t<5;++$t)if(Et.hi=(Et.hi|(this.buf[this.pos]&127)<<$t*7+3)>>>0,this.buf[this.pos++]<128)return Et}else for(;$t<5;++$t){if(this.pos>=this.len)throw tt(this);if(Et.hi=(Et.hi|(this.buf[this.pos]&127)<<$t*7+3)>>>0,this.buf[this.pos++]<128)return Et}throw Error("invalid varint encoding")}rt.prototype.bool=function(){return this.uint32()!==0};function yt(Et,$t){return(Et[$t-4]|Et[$t-3]<<8|Et[$t-2]<<16|Et[$t-1]<<24)>>>0}rt.prototype.fixed32=function(){if(this.pos+4>this.len)throw tt(this,4);return yt(this.buf,this.pos+=4)},rt.prototype.sfixed32=function(){if(this.pos+4>this.len)throw tt(this,4);return yt(this.buf,this.pos+=4)|0};function bt(){if(this.pos+8>this.len)throw tt(this,8);return new _e(yt(this.buf,this.pos+=4),yt(this.buf,this.pos+=4))}rt.prototype.float=function(){if(this.pos+4>this.len)throw tt(this,4);var $t=$.float.readFloatLE(this.buf,this.pos);return this.pos+=4,$t},rt.prototype.double=function(){if(this.pos+8>this.len)throw tt(this,4);var $t=$.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,$t},rt.prototype.bytes=function(){var $t=this.uint32(),_t=this.pos,xt=this.pos+$t;if(xt>this.len)throw tt(this,$t);return this.pos+=$t,Array.isArray(this.buf)?this.buf.slice(_t,xt):_t===xt?new this.buf.constructor(0):this._slice.call(this.buf,_t,xt)},rt.prototype.string=function(){var $t=this.bytes();return et.read($t,0,$t.length)},rt.prototype.skip=function($t){if(typeof $t=="number"){if(this.pos+$t>this.len)throw tt(this,$t);this.pos+=$t}else do if(this.pos>=this.len)throw tt(this);while(this.buf[this.pos++]&128);return this},rt.prototype.skipType=function(Et){switch(Et){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(Et=this.uint32()&7)!==4;)this.skipType(Et);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+Et+" at offset "+this.pos)}return this},rt._configure=function(Et){j=Et,rt.create=ct(),j._configure();var $t=$.Long?"toLong":"toNumber";$.merge(rt.prototype,{int64:function(){return dt.call(this)[$t](!1)},uint64:function(){return dt.call(this)[$t](!0)},sint64:function(){return dt.call(this).zzDecode()[$t](!1)},fixed64:function(){return bt.call(this)[$t](!0)},sfixed64:function(){return bt.call(this)[$t](!1)}})}}}),require_reader_buffer=__commonJS({"node_modules/protobufjs/src/reader_buffer.js"(a,_){_.exports=_e;var $=require_reader();(_e.prototype=Object.create($.prototype)).constructor=_e;var j=require_minimal();function _e(et){$.call(this,et)}_e._configure=function(){j.Buffer&&(_e.prototype._slice=j.Buffer.prototype.slice)},_e.prototype.string=function(){var tt=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+tt,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+tt,this.len))},_e._configure()}}),require_writer=__commonJS({"node_modules/protobufjs/src/writer.js"(a,_){_.exports=dt;var $=require_minimal(),j,_e=$.LongBits,et=$.base64,tt=$.utf8;function rt(Mt,Tt,Rt){this.fn=Mt,this.len=Tt,this.next=void 0,this.val=Rt}function at(){}function ct(Mt){this.head=Mt.head,this.tail=Mt.tail,this.len=Mt.len,this.next=Mt.states}function dt(){this.len=0,this.head=new rt(at,0,0),this.tail=this.head,this.states=null}var yt=function(){return $.Buffer?function(){return(dt.create=function(){return new j})()}:function(){return new dt}};dt.create=yt(),dt.alloc=function(Tt){return new $.Array(Tt)},$.Array!==Array&&(dt.alloc=$.pool(dt.alloc,$.Array.prototype.subarray)),dt.prototype._push=function(Tt,Rt,Ct){return this.tail=this.tail.next=new rt(Tt,Rt,Ct),this.len+=Rt,this};function bt(Mt,Tt,Rt){Tt[Rt]=Mt&255}function Et(Mt,Tt,Rt){for(;Mt>127;)Tt[Rt++]=Mt&127|128,Mt>>>=7;Tt[Rt]=Mt}function $t(Mt,Tt){this.len=Mt,this.next=void 0,this.val=Tt}$t.prototype=Object.create(rt.prototype),$t.prototype.fn=Et,dt.prototype.uint32=function(Tt){return this.len+=(this.tail=this.tail.next=new $t((Tt=Tt>>>0)<128?1:Tt<16384?2:Tt<2097152?3:Tt<268435456?4:5,Tt)).len,this},dt.prototype.int32=function(Tt){return Tt<0?this._push(_t,10,_e.fromNumber(Tt)):this.uint32(Tt)},dt.prototype.sint32=function(Tt){return this.uint32((Tt<<1^Tt>>31)>>>0)};function _t(Mt,Tt,Rt){for(;Mt.hi;)Tt[Rt++]=Mt.lo&127|128,Mt.lo=(Mt.lo>>>7|Mt.hi<<25)>>>0,Mt.hi>>>=7;for(;Mt.lo>127;)Tt[Rt++]=Mt.lo&127|128,Mt.lo=Mt.lo>>>7;Tt[Rt++]=Mt.lo}dt.prototype.uint64=function(Tt){var Rt=_e.from(Tt);return this._push(_t,Rt.length(),Rt)},dt.prototype.int64=dt.prototype.uint64,dt.prototype.sint64=function(Tt){var Rt=_e.from(Tt).zzEncode();return this._push(_t,Rt.length(),Rt)},dt.prototype.bool=function(Tt){return this._push(bt,1,Tt?1:0)};function xt(Mt,Tt,Rt){Tt[Rt]=Mt&255,Tt[Rt+1]=Mt>>>8&255,Tt[Rt+2]=Mt>>>16&255,Tt[Rt+3]=Mt>>>24}dt.prototype.fixed32=function(Tt){return this._push(xt,4,Tt>>>0)},dt.prototype.sfixed32=dt.prototype.fixed32,dt.prototype.fixed64=function(Tt){var Rt=_e.from(Tt);return this._push(xt,4,Rt.lo)._push(xt,4,Rt.hi)},dt.prototype.sfixed64=dt.prototype.fixed64,dt.prototype.float=function(Tt){return this._push($.float.writeFloatLE,4,Tt)},dt.prototype.double=function(Tt){return this._push($.float.writeDoubleLE,8,Tt)};var St=$.Array.prototype.set?function(Tt,Rt,Ct){Rt.set(Tt,Ct)}:function(Tt,Rt,Ct){for(var It=0;It<Tt.length;++It)Rt[Ct+It]=Tt[It]};dt.prototype.bytes=function(Tt){var Rt=Tt.length>>>0;if(!Rt)return this._push(bt,1,0);if($.isString(Tt)){var Ct=dt.alloc(Rt=et.length(Tt));et.decode(Tt,Ct,0),Tt=Ct}return this.uint32(Rt)._push(St,Rt,Tt)},dt.prototype.string=function(Tt){var Rt=tt.length(Tt);return Rt?this.uint32(Rt)._push(tt.write,Rt,Tt):this._push(bt,1,0)},dt.prototype.fork=function(){return this.states=new ct(this),this.head=this.tail=new rt(at,0,0),this.len=0,this},dt.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new rt(at,0,0),this.len=0),this},dt.prototype.ldelim=function(){var Tt=this.head,Rt=this.tail,Ct=this.len;return this.reset().uint32(Ct),Ct&&(this.tail.next=Tt.next,this.tail=Rt,this.len+=Ct),this},dt.prototype.finish=function(){for(var Tt=this.head.next,Rt=this.constructor.alloc(this.len),Ct=0;Tt;)Tt.fn(Tt.val,Rt,Ct),Ct+=Tt.len,Tt=Tt.next;return Rt},dt._configure=function(Mt){j=Mt,dt.create=yt(),j._configure()}}}),require_writer_buffer=__commonJS({"node_modules/protobufjs/src/writer_buffer.js"(a,_){_.exports=_e;var $=require_writer();(_e.prototype=Object.create($.prototype)).constructor=_e;var j=require_minimal();function _e(){$.call(this)}_e._configure=function(){_e.alloc=j._Buffer_allocUnsafe,_e.writeBytesBuffer=j.Buffer&&j.Buffer.prototype instanceof Uint8Array&&j.Buffer.prototype.set.name==="set"?function(rt,at,ct){at.set(rt,ct)}:function(rt,at,ct){if(rt.copy)rt.copy(at,ct,0,rt.length);else for(var dt=0;dt<rt.length;)at[ct++]=rt[dt++]}},_e.prototype.bytes=function(rt){j.isString(rt)&&(rt=j._Buffer_from(rt,"base64"));var at=rt.length>>>0;return this.uint32(at),at&&this._push(_e.writeBytesBuffer,at,rt),this};function et(tt,rt,at){tt.length<40?j.utf8.write(tt,rt,at):rt.utf8Write?rt.utf8Write(tt,at):rt.write(tt,at)}_e.prototype.string=function(rt){var at=j.Buffer.byteLength(rt);return this.uint32(at),at&&this._push(et,at,rt),this},_e._configure()}}),require_murmurHash3js=__commonJS({"node_modules/murmurhash3js-revisited/lib/murmurHash3js.js"(a,_){(function($,j){var _e={version:"3.0.0",x86:{},x64:{},inputValidation:!0};function et(_t){if(!Array.isArray(_t)&&!ArrayBuffer.isView(_t))return!1;for(var xt=0;xt<_t.length;xt++)if(!Number.isInteger(_t[xt])||_t[xt]<0||_t[xt]>255)return!1;return!0}function tt(_t,xt){return(_t&65535)*xt+(((_t>>>16)*xt&65535)<<16)}function rt(_t,xt){return _t<<xt|_t>>>32-xt}function at(_t){return _t^=_t>>>16,_t=tt(_t,2246822507),_t^=_t>>>13,_t=tt(_t,3266489909),_t^=_t>>>16,_t}function ct(_t,xt){_t=[_t[0]>>>16,_t[0]&65535,_t[1]>>>16,_t[1]&65535],xt=[xt[0]>>>16,xt[0]&65535,xt[1]>>>16,xt[1]&65535];var St=[0,0,0,0];return St[3]+=_t[3]+xt[3],St[2]+=St[3]>>>16,St[3]&=65535,St[2]+=_t[2]+xt[2],St[1]+=St[2]>>>16,St[2]&=65535,St[1]+=_t[1]+xt[1],St[0]+=St[1]>>>16,St[1]&=65535,St[0]+=_t[0]+xt[0],St[0]&=65535,[St[0]<<16|St[1],St[2]<<16|St[3]]}function dt(_t,xt){_t=[_t[0]>>>16,_t[0]&65535,_t[1]>>>16,_t[1]&65535],xt=[xt[0]>>>16,xt[0]&65535,xt[1]>>>16,xt[1]&65535];var St=[0,0,0,0];return St[3]+=_t[3]*xt[3],St[2]+=St[3]>>>16,St[3]&=65535,St[2]+=_t[2]*xt[3],St[1]+=St[2]>>>16,St[2]&=65535,St[2]+=_t[3]*xt[2],St[1]+=St[2]>>>16,St[2]&=65535,St[1]+=_t[1]*xt[3],St[0]+=St[1]>>>16,St[1]&=65535,St[1]+=_t[2]*xt[2],St[0]+=St[1]>>>16,St[1]&=65535,St[1]+=_t[3]*xt[1],St[0]+=St[1]>>>16,St[1]&=65535,St[0]+=_t[0]*xt[3]+_t[1]*xt[2]+_t[2]*xt[1]+_t[3]*xt[0],St[0]&=65535,[St[0]<<16|St[1],St[2]<<16|St[3]]}function yt(_t,xt){return xt%=64,xt===32?[_t[1],_t[0]]:xt<32?[_t[0]<<xt|_t[1]>>>32-xt,_t[1]<<xt|_t[0]>>>32-xt]:(xt-=32,[_t[1]<<xt|_t[0]>>>32-xt,_t[0]<<xt|_t[1]>>>32-xt])}function bt(_t,xt){return xt%=64,xt===0?_t:xt<32?[_t[0]<<xt|_t[1]>>>32-xt,_t[1]<<xt]:[_t[1]<<xt-32,0]}function Et(_t,xt){return[_t[0]^xt[0],_t[1]^xt[1]]}function $t(_t){return _t=Et(_t,[0,_t[0]>>>1]),_t=dt(_t,[4283543511,3981806797]),_t=Et(_t,[0,_t[0]>>>1]),_t=dt(_t,[3301882366,444984403]),_t=Et(_t,[0,_t[0]>>>1]),_t}_e.x86.hash32=function(_t,xt){if(_e.inputValidation&&!et(_t))return j;xt=xt||0;for(var St=_t.length%4,Mt=_t.length-St,Tt=xt,Rt=0,Ct=3432918353,It=461845907,kt=0;kt<Mt;kt=kt+4)Rt=_t[kt]|_t[kt+1]<<8|_t[kt+2]<<16|_t[kt+3]<<24,Rt=tt(Rt,Ct),Rt=rt(Rt,15),Rt=tt(Rt,It),Tt^=Rt,Tt=rt(Tt,13),Tt=tt(Tt,5)+3864292196;switch(Rt=0,St){case 3:Rt^=_t[kt+2]<<16;case 2:Rt^=_t[kt+1]<<8;case 1:Rt^=_t[kt],Rt=tt(Rt,Ct),Rt=rt(Rt,15),Rt=tt(Rt,It),Tt^=Rt}return Tt^=_t.length,Tt=at(Tt),Tt>>>0},_e.x86.hash128=function(_t,xt){if(_e.inputValidation&&!et(_t))return j;xt=xt||0;for(var St=_t.length%16,Mt=_t.length-St,Tt=xt,Rt=xt,Ct=xt,It=xt,kt=0,Dt=0,Bt=0,zt=0,vt=597399067,nt=2869860233,st=951274213,lt=2716044179,ht=0;ht<Mt;ht=ht+16)kt=_t[ht]|_t[ht+1]<<8|_t[ht+2]<<16|_t[ht+3]<<24,Dt=_t[ht+4]|_t[ht+5]<<8|_t[ht+6]<<16|_t[ht+7]<<24,Bt=_t[ht+8]|_t[ht+9]<<8|_t[ht+10]<<16|_t[ht+11]<<24,zt=_t[ht+12]|_t[ht+13]<<8|_t[ht+14]<<16|_t[ht+15]<<24,kt=tt(kt,vt),kt=rt(kt,15),kt=tt(kt,nt),Tt^=kt,Tt=rt(Tt,19),Tt+=Rt,Tt=tt(Tt,5)+1444728091,Dt=tt(Dt,nt),Dt=rt(Dt,16),Dt=tt(Dt,st),Rt^=Dt,Rt=rt(Rt,17),Rt+=Ct,Rt=tt(Rt,5)+197830471,Bt=tt(Bt,st),Bt=rt(Bt,17),Bt=tt(Bt,lt),Ct^=Bt,Ct=rt(Ct,15),Ct+=It,Ct=tt(Ct,5)+2530024501,zt=tt(zt,lt),zt=rt(zt,18),zt=tt(zt,vt),It^=zt,It=rt(It,13),It+=Tt,It=tt(It,5)+850148119;switch(kt=0,Dt=0,Bt=0,zt=0,St){case 15:zt^=_t[ht+14]<<16;case 14:zt^=_t[ht+13]<<8;case 13:zt^=_t[ht+12],zt=tt(zt,lt),zt=rt(zt,18),zt=tt(zt,vt),It^=zt;case 12:Bt^=_t[ht+11]<<24;case 11:Bt^=_t[ht+10]<<16;case 10:Bt^=_t[ht+9]<<8;case 9:Bt^=_t[ht+8],Bt=tt(Bt,st),Bt=rt(Bt,17),Bt=tt(Bt,lt),Ct^=Bt;case 8:Dt^=_t[ht+7]<<24;case 7:Dt^=_t[ht+6]<<16;case 6:Dt^=_t[ht+5]<<8;case 5:Dt^=_t[ht+4],Dt=tt(Dt,nt),Dt=rt(Dt,16),Dt=tt(Dt,st),Rt^=Dt;case 4:kt^=_t[ht+3]<<24;case 3:kt^=_t[ht+2]<<16;case 2:kt^=_t[ht+1]<<8;case 1:kt^=_t[ht],kt=tt(kt,vt),kt=rt(kt,15),kt=tt(kt,nt),Tt^=kt}return Tt^=_t.length,Rt^=_t.length,Ct^=_t.length,It^=_t.length,Tt+=Rt,Tt+=Ct,Tt+=It,Rt+=Tt,Ct+=Tt,It+=Tt,Tt=at(Tt),Rt=at(Rt),Ct=at(Ct),It=at(It),Tt+=Rt,Tt+=Ct,Tt+=It,Rt+=Tt,Ct+=Tt,It+=Tt,("00000000"+(Tt>>>0).toString(16)).slice(-8)+("00000000"+(Rt>>>0).toString(16)).slice(-8)+("00000000"+(Ct>>>0).toString(16)).slice(-8)+("00000000"+(It>>>0).toString(16)).slice(-8)},_e.x64.hash128=function(_t,xt){if(_e.inputValidation&&!et(_t))return j;xt=xt||0;for(var St=_t.length%16,Mt=_t.length-St,Tt=[0,xt],Rt=[0,xt],Ct=[0,0],It=[0,0],kt=[2277735313,289559509],Dt=[1291169091,658871167],Bt=0;Bt<Mt;Bt=Bt+16)Ct=[_t[Bt+4]|_t[Bt+5]<<8|_t[Bt+6]<<16|_t[Bt+7]<<24,_t[Bt]|_t[Bt+1]<<8|_t[Bt+2]<<16|_t[Bt+3]<<24],It=[_t[Bt+12]|_t[Bt+13]<<8|_t[Bt+14]<<16|_t[Bt+15]<<24,_t[Bt+8]|_t[Bt+9]<<8|_t[Bt+10]<<16|_t[Bt+11]<<24],Ct=dt(Ct,kt),Ct=yt(Ct,31),Ct=dt(Ct,Dt),Tt=Et(Tt,Ct),Tt=yt(Tt,27),Tt=ct(Tt,Rt),Tt=ct(dt(Tt,[0,5]),[0,1390208809]),It=dt(It,Dt),It=yt(It,33),It=dt(It,kt),Rt=Et(Rt,It),Rt=yt(Rt,31),Rt=ct(Rt,Tt),Rt=ct(dt(Rt,[0,5]),[0,944331445]);switch(Ct=[0,0],It=[0,0],St){case 15:It=Et(It,bt([0,_t[Bt+14]],48));case 14:It=Et(It,bt([0,_t[Bt+13]],40));case 13:It=Et(It,bt([0,_t[Bt+12]],32));case 12:It=Et(It,bt([0,_t[Bt+11]],24));case 11:It=Et(It,bt([0,_t[Bt+10]],16));case 10:It=Et(It,bt([0,_t[Bt+9]],8));case 9:It=Et(It,[0,_t[Bt+8]]),It=dt(It,Dt),It=yt(It,33),It=dt(It,kt),Rt=Et(Rt,It);case 8:Ct=Et(Ct,bt([0,_t[Bt+7]],56));case 7:Ct=Et(Ct,bt([0,_t[Bt+6]],48));case 6:Ct=Et(Ct,bt([0,_t[Bt+5]],40));case 5:Ct=Et(Ct,bt([0,_t[Bt+4]],32));case 4:Ct=Et(Ct,bt([0,_t[Bt+3]],24));case 3:Ct=Et(Ct,bt([0,_t[Bt+2]],16));case 2:Ct=Et(Ct,bt([0,_t[Bt+1]],8));case 1:Ct=Et(Ct,[0,_t[Bt]]),Ct=dt(Ct,kt),Ct=yt(Ct,31),Ct=dt(Ct,Dt),Tt=Et(Tt,Ct)}return Tt=Et(Tt,[0,_t.length]),Rt=Et(Rt,[0,_t.length]),Tt=ct(Tt,Rt),Rt=ct(Rt,Tt),Tt=$t(Tt),Rt=$t(Rt),Tt=ct(Tt,Rt),Rt=ct(Rt,Tt),("00000000"+(Tt[0]>>>0).toString(16)).slice(-8)+("00000000"+(Tt[1]>>>0).toString(16)).slice(-8)+("00000000"+(Rt[0]>>>0).toString(16)).slice(-8)+("00000000"+(Rt[1]>>>0).toString(16)).slice(-8)},typeof a<"u"?(typeof _<"u"&&_.exports&&(a=_.exports=_e),a.murmurHash3=_e):(_e._murmurHash3=$.murmurHash3,_e.noConflict=function(){return $.murmurHash3=_e._murmurHash3,_e._murmurHash3=j,_e.noConflict=j,_e},$.murmurHash3=_e)})(a)}}),require_murmurhash3js_revisited=__commonJS({"node_modules/murmurhash3js-revisited/index.js"(a,_){_.exports=require_murmurHash3js()}}),require_sparse_array=__commonJS({"node_modules/sparse-array/index.js"(a,_){var $=7;_.exports=class{constructor(){this._bitArrays=[],this._data=[],this._length=0,this._changedLength=!1,this._changedData=!1}set(at,ct){let dt=this._internalPositionFor(at,!1);if(ct===void 0)dt!==-1&&(this._unsetInternalPos(dt),this._unsetBit(at),this._changedLength=!0,this._changedData=!0);else{let yt=!1;dt===-1?(dt=this._data.length,this._setBit(at),this._changedData=!0):yt=!0,this._setInternalPos(dt,at,ct,yt),this._changedLength=!0}}unset(at){this.set(at,void 0)}get(at){this._sortData();const ct=this._internalPositionFor(at,!0);if(ct!==-1)return this._data[ct][1]}push(at){return this.set(this.length,at),this.length}get length(){if(this._sortData(),this._changedLength){const at=this._data[this._data.length-1];this._length=at?at[0]+1:0,this._changedLength=!1}return this._length}forEach(at){let ct=0;for(;ct<this.length;)at(this.get(ct),ct,this),ct++}map(at){let ct=0,dt=new Array(this.length);for(;ct<this.length;)dt[ct]=at(this.get(ct),ct,this),ct++;return dt}reduce(at,ct){let dt=0,yt=ct;for(;dt<this.length;){const bt=this.get(dt);yt=at(yt,bt,dt),dt++}return yt}find(at){let ct=0,dt,yt;for(;ct<this.length&&!dt;)yt=this.get(ct),dt=at(yt),ct++;return dt?yt:void 0}_internalPositionFor(at,ct){const dt=this._bytePosFor(at,ct);if(dt>=this._bitArrays.length)return-1;const yt=this._bitArrays[dt],bt=at-dt*$;if(!((yt&1<<bt)>0))return-1;const $t=this._bitArrays.slice(0,dt).reduce(j,0),_t=~(4294967295<<bt+1),xt=_e(yt&_t);return $t+xt-1}_bytePosFor(at,ct){const dt=Math.floor(at/$),yt=dt+1;for(;!ct&&this._bitArrays.length<yt;)this._bitArrays.push(0);return dt}_setBit(at){const ct=this._bytePosFor(at,!1);this._bitArrays[ct]|=1<<at-ct*$}_unsetBit(at){const ct=this._bytePosFor(at,!1);this._bitArrays[ct]&=~(1<<at-ct*$)}_setInternalPos(at,ct,dt,yt){const bt=this._data,Et=[ct,dt];if(yt)this._sortData(),bt[at]=Et;else{if(bt.length)if(bt[bt.length-1][0]>=ct)bt.push(Et);else if(bt[0][0]<=ct)bt.unshift(Et);else{const $t=Math.round(bt.length/2);this._data=bt.slice(0,$t).concat(Et).concat(bt.slice($t))}else this._data.push(Et);this._changedData=!0,this._changedLength=!0}}_unsetInternalPos(at){this._data.splice(at,1)}_sortData(){this._changedData&&this._data.sort(et),this._changedData=!1}bitField(){const at=[];let ct=8,dt=0,yt=0,bt;const Et=this._bitArrays.slice();for(;Et.length||dt;){dt===0&&(bt=Et.shift(),dt=7);const _t=Math.min(dt,ct),xt=~(255<<_t),St=bt&xt;yt|=St<<8-ct,bt=bt>>>_t,dt-=_t,ct-=_t,(!ct||!dt&&!Et.length)&&(at.push(yt),yt=0,ct=8)}for(var $t=at.length-1;$t>0&&at[$t]===0;$t--)at.pop();return at}compactArray(){return this._sortData(),this._data.map(tt)}};function j(rt,at){return rt+_e(at)}function _e(rt){let at=rt;return at=at-(at>>1&1431655765),at=(at&858993459)+(at>>2&858993459),(at+(at>>4)&252645135)*16843009>>24}function et(rt,at){return rt[0]-at[0]}function tt(rt){return rt[1]}}}),src_exports2={};__export(src_exports2,{calculateMultipleHashesADR32:()=>calculateMultipleHashesADR32,calculateMultipleHashesADR32LegacyQmHash:()=>calculateMultipleHashesADR32LegacyQmHash,compareStrings:()=>compareStrings,hashV0:()=>hashV0,hashV1:()=>hashV1,keccak256Hash:()=>keccak256Hash,prepareADR32Data:()=>prepareADR32Data,sortKeys:()=>sortKeys}),module.exports=__toCommonJS(src_exports2);var import_crypto3=__toESM(requireCryptoBrowserify(),1),bytes_exports={};__export(bytes_exports,{coerce:()=>coerce,empty:()=>empty,equals:()=>equals,fromHex:()=>fromHex,fromString:()=>fromString,isBinary:()=>isBinary,toHex:()=>toHex,toString:()=>toString});var empty=new Uint8Array(0),toHex=a=>a.reduce((_,$)=>_+$.toString(16).padStart(2,"0"),""),fromHex=a=>{const _=a.match(/../g);return _?new Uint8Array(_.map($=>parseInt($,16))):empty},equals=(a,_)=>{if(a===_)return!0;if(a.byteLength!==_.byteLength)return!1;for(let $=0;$<a.byteLength;$++)if(a[$]!==_[$])return!1;return!0},coerce=a=>{if(a instanceof Uint8Array&&a.constructor.name==="Uint8Array")return a;if(a instanceof ArrayBuffer)return new Uint8Array(a);if(ArrayBuffer.isView(a))return new Uint8Array(a.buffer,a.byteOffset,a.byteLength);throw new Error("Unknown type, must be binary type")},isBinary=a=>a instanceof ArrayBuffer||ArrayBuffer.isView(a),fromString=a=>new TextEncoder().encode(a),toString=a=>new TextDecoder().decode(a),encode_1=encode,MSB=128,REST=127,MSBALL=~REST,INT=Math.pow(2,31);function encode(a,_,$){_=_||[],$=$||0;for(var j=$;a>=INT;)_[$++]=a&255|MSB,a/=128;for(;a&MSBALL;)_[$++]=a&255|MSB,a>>>=7;return _[$]=a|0,encode.bytes=$-j+1,_}var decode=read,MSB$1=128,REST$1=127;function read(a,j){var $=0,j=j||0,_e=0,et=j,tt,rt=a.length;do{if(et>=rt)throw read.bytes=0,new RangeError("Could not decode varint");tt=a[et++],$+=_e<28?(tt&REST$1)<<_e:(tt&REST$1)*Math.pow(2,_e),_e+=7}while(tt>=MSB$1);return read.bytes=et-j,$}var N1=Math.pow(2,7),N2=Math.pow(2,14),N3=Math.pow(2,21),N4=Math.pow(2,28),N5=Math.pow(2,35),N6=Math.pow(2,42),N7=Math.pow(2,49),N8=Math.pow(2,56),N9=Math.pow(2,63),length=function(a){return a<N1?1:a<N2?2:a<N3?3:a<N4?4:a<N5?5:a<N6?6:a<N7?7:a<N8?8:a<N9?9:10},varint={encode:encode_1,decode,encodingLength:length},_brrp_varint=varint,varint_default=_brrp_varint,decode2=(a,_=0)=>[varint_default.decode(a,_),varint_default.decode.bytes],encodeTo=(a,_,$=0)=>(varint_default.encode(a,_,$),_),encodingLength=a=>varint_default.encodingLength(a),create=(a,_)=>{const $=_.byteLength,j=encodingLength(a),_e=j+encodingLength($),et=new Uint8Array(_e+$);return encodeTo(a,et,0),encodeTo($,et,j),et.set(_,_e),new Digest(a,$,_,et)},decode3=a=>{const _=coerce(a),[$,j]=decode2(_),[_e,et]=decode2(_.subarray(j)),tt=_.subarray(j+et);if(tt.byteLength!==_e)throw new Error("Incorrect length");return new Digest($,_e,tt,_)},equals2=(a,_)=>{if(a===_)return!0;{const $=_;return a.code===$.code&&a.size===$.size&&$.bytes instanceof Uint8Array&&equals(a.bytes,$.bytes)}},Digest=class{constructor(a,_,$,j){this.code=a,this.size=_,this.digest=$,this.bytes=j}};function base(a,_){if(a.length>=255)throw new TypeError("Alphabet too long");for(var $=new Uint8Array(256),j=0;j<$.length;j++)$[j]=255;for(var _e=0;_e<a.length;_e++){var et=a.charAt(_e),tt=et.charCodeAt(0);if($[tt]!==255)throw new TypeError(et+" is ambiguous");$[tt]=_e}var rt=a.length,at=a.charAt(0),ct=Math.log(rt)/Math.log(256),dt=Math.log(256)/Math.log(rt);function yt($t){if($t instanceof Uint8Array||(ArrayBuffer.isView($t)?$t=new Uint8Array($t.buffer,$t.byteOffset,$t.byteLength):Array.isArray($t)&&($t=Uint8Array.from($t))),!($t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if($t.length===0)return"";for(var _t=0,xt=0,St=0,Mt=$t.length;St!==Mt&&$t[St]===0;)St++,_t++;for(var Tt=(Mt-St)*dt+1>>>0,Rt=new Uint8Array(Tt);St!==Mt;){for(var Ct=$t[St],It=0,kt=Tt-1;(Ct!==0||It<xt)&&kt!==-1;kt--,It++)Ct+=256*Rt[kt]>>>0,Rt[kt]=Ct%rt>>>0,Ct=Ct/rt>>>0;if(Ct!==0)throw new Error("Non-zero carry");xt=It,St++}for(var Dt=Tt-xt;Dt!==Tt&&Rt[Dt]===0;)Dt++;for(var Bt=at.repeat(_t);Dt<Tt;++Dt)Bt+=a.charAt(Rt[Dt]);return Bt}function bt($t){if(typeof $t!="string")throw new TypeError("Expected String");if($t.length===0)return new Uint8Array;var _t=0;if($t[_t]!==" "){for(var xt=0,St=0;$t[_t]===at;)xt++,_t++;for(var Mt=($t.length-_t)*ct+1>>>0,Tt=new Uint8Array(Mt);$t[_t];){var Rt=$[$t.charCodeAt(_t)];if(Rt===255)return;for(var Ct=0,It=Mt-1;(Rt!==0||Ct<St)&&It!==-1;It--,Ct++)Rt+=rt*Tt[It]>>>0,Tt[It]=Rt%256>>>0,Rt=Rt/256>>>0;if(Rt!==0)throw new Error("Non-zero carry");St=Ct,_t++}if($t[_t]!==" "){for(var kt=Mt-St;kt!==Mt&&Tt[kt]===0;)kt++;for(var Dt=new Uint8Array(xt+(Mt-kt)),Bt=xt;kt!==Mt;)Dt[Bt++]=Tt[kt++];return Dt}}}function Et($t){var _t=bt($t);if(_t)return _t;throw new Error(`Non-${_} character`)}return{encode:yt,decodeUnsafe:bt,decode:Et}}var src=base,_brrp__multiformats_scope_baseX=src,base_x_default=_brrp__multiformats_scope_baseX,Encoder=class{constructor(a,_,$){this.name=a,this.prefix=_,this.baseEncode=$}encode(a){if(a instanceof Uint8Array)return`${this.prefix}${this.baseEncode(a)}`;throw Error("Unknown type, must be binary type")}},Decoder=class{constructor(a,_,$){if(this.name=a,this.prefix=_,_.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=_.codePointAt(0),this.baseDecode=$}decode(a){if(typeof a=="string"){if(a.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(a)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(a.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(a){return or(this,a)}},ComposedDecoder=class{constructor(a){this.decoders=a}or(a){return or(this,a)}decode(a){const _=a[0],$=this.decoders[_];if($)return $.decode(a);throw RangeError(`Unable to decode multibase string ${JSON.stringify(a)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},or=(a,_)=>new ComposedDecoder({...a.decoders||{[a.prefix]:a},..._.decoders||{[_.prefix]:_}}),Codec=class{constructor(a,_,$,j){this.name=a,this.prefix=_,this.baseEncode=$,this.baseDecode=j,this.encoder=new Encoder(a,_,$),this.decoder=new Decoder(a,_,j)}encode(a){return this.encoder.encode(a)}decode(a){return this.decoder.decode(a)}},from=({name:a,prefix:_,encode:$,decode:j})=>new Codec(a,_,$,j),baseX=({prefix:a,name:_,alphabet:$})=>{const{encode:j,decode:_e}=base_x_default($,_);return from({prefix:a,name:_,encode:j,decode:et=>coerce(_e(et))})},decode4=(a,_,$,j)=>{const _e={};for(let dt=0;dt<_.length;++dt)_e[_[dt]]=dt;let et=a.length;for(;a[et-1]==="=";)--et;const tt=new Uint8Array(et*$/8|0);let rt=0,at=0,ct=0;for(let dt=0;dt<et;++dt){const yt=_e[a[dt]];if(yt===void 0)throw new SyntaxError(`Non-${j} character`);at=at<<$|yt,rt+=$,rt>=8&&(rt-=8,tt[ct++]=255&at>>rt)}if(rt>=$||255&at<<8-rt)throw new SyntaxError("Unexpected end of data");return tt},encode2=(a,_,$)=>{const j=_[_.length-1]==="=",_e=(1<<$)-1;let et="",tt=0,rt=0;for(let at=0;at<a.length;++at)for(rt=rt<<8|a[at],tt+=8;tt>$;)tt-=$,et+=_[_e&rt>>tt];if(tt&&(et+=_[_e&rt<<$-tt]),j)for(;et.length*$&7;)et+="=";return et},rfc4648=({name:a,prefix:_,bitsPerChar:$,alphabet:j})=>from({prefix:_,name:a,encode(_e){return encode2(_e,j,$)},decode(_e){return decode4(_e,j,$,a)}}),base58btc=baseX({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"});baseX({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var base32=rfc4648({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5});rfc4648({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),rfc4648({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),rfc4648({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),rfc4648({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),rfc4648({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),rfc4648({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),rfc4648({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),rfc4648({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var format=(a,_)=>{const{bytes:$,version:j}=a;switch(j){case 0:return toStringV0($,baseCache(a),_||base58btc.encoder);default:return toStringV1($,baseCache(a),_||base32.encoder)}},cache=new WeakMap,baseCache=a=>{const _=cache.get(a);if(_==null){const $=new Map;return cache.set(a,$),$}return _},CID=class vo{constructor(_,$,j,_e){this.code=$,this.version=_,this.multihash=j,this.bytes=_e,this["/"]=_e}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{const{code:_,multihash:$}=this;if(_!==DAG_PB_CODE)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if($.code!==SHA_256_CODE)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return vo.createV0($)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{const{code:_,digest:$}=this.multihash,j=create(_,$);return vo.createV1(this.code,j)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(_){return vo.equals(this,_)}static equals(_,$){const j=$;return j&&_.code===j.code&&_.version===j.version&&equals2(_.multihash,j.multihash)}toString(_){return format(this,_)}toJSON(){return{"/":format(this)}}link(){return this}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(_){if(_==null)return null;const $=_;if($ instanceof vo)return $;if($["/"]!=null&&$["/"]===$.bytes||$.asCID===$){const{version:j,code:_e,multihash:et,bytes:tt}=$;return new vo(j,_e,et,tt||encodeCID(j,_e,et.bytes))}else if($[cidSymbol]===!0){const{version:j,multihash:_e,code:et}=$,tt=decode3(_e);return vo.create(j,et,tt)}else return null}static create(_,$,j){if(typeof $!="number")throw new Error("String codecs are no longer supported");if(!(j.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(_){case 0:{if($!==DAG_PB_CODE)throw new Error(`Version 0 CID must use dag-pb (code: ${DAG_PB_CODE}) block encoding`);return new vo(_,$,j,j.bytes)}case 1:{const _e=encodeCID(_,$,j.bytes);return new vo(_,$,j,_e)}default:throw new Error("Invalid version")}}static createV0(_){return vo.create(0,DAG_PB_CODE,_)}static createV1(_,$){return vo.create(1,_,$)}static decode(_){const[$,j]=vo.decodeFirst(_);if(j.length)throw new Error("Incorrect length");return $}static decodeFirst(_){const $=vo.inspectBytes(_),j=$.size-$.multihashSize,_e=coerce(_.subarray(j,j+$.multihashSize));if(_e.byteLength!==$.multihashSize)throw new Error("Incorrect length");const et=_e.subarray($.multihashSize-$.digestSize),tt=new Digest($.multihashCode,$.digestSize,et,_e);return[$.version===0?vo.createV0(tt):vo.createV1($.codec,tt),_.subarray($.size)]}static inspectBytes(_){let $=0;const j=()=>{const[yt,bt]=decode2(_.subarray($));return $+=bt,yt};let _e=j(),et=DAG_PB_CODE;if(_e===18?(_e=0,$=0):et=j(),_e!==0&&_e!==1)throw new RangeError(`Invalid CID version ${_e}`);const tt=$,rt=j(),at=j(),ct=$+at,dt=ct-tt;return{version:_e,codec:et,multihashCode:rt,digestSize:at,multihashSize:dt,size:ct}}static parse(_,$){const[j,_e]=parseCIDtoBytes(_,$),et=vo.decode(_e);if(et.version===0&&_[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return baseCache(et).set(j,_),et}},parseCIDtoBytes=(a,_)=>{switch(a[0]){case"Q":{const $=_||base58btc;return[base58btc.prefix,$.decode(`${base58btc.prefix}${a}`)]}case base58btc.prefix:{const $=_||base58btc;return[base58btc.prefix,$.decode(a)]}case base32.prefix:{const $=_||base32;return[base32.prefix,$.decode(a)]}default:{if(_==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[a[0],_.decode(a)]}}},toStringV0=(a,_,$)=>{const{prefix:j}=$;if(j!==base58btc.prefix)throw Error(`Cannot string encode V0 in ${$.name} encoding`);const _e=_.get(j);if(_e==null){const et=$.encode(a).slice(1);return _.set(j,et),et}else return _e},toStringV1=(a,_,$)=>{const{prefix:j}=$,_e=_.get(j);if(_e==null){const et=$.encode(a);return _.set(j,et),et}else return _e},DAG_PB_CODE=112,SHA_256_CODE=18,encodeCID=(a,_,$)=>{const j=encodingLength(a),_e=j+encodingLength(_),et=new Uint8Array(_e+$.byteLength);return encodeTo(a,et,0),encodeTo(_,et,j),et.set($,_e),et},cidSymbol=Symbol.for("@ipld/js-cid/CID");__toESM(require_err_code(),1);function isAsyncIterable(a){return a[Symbol.asyncIterator]!=null}function batch(a,_=1){return _=Number(_),isAsyncIterable(a)?async function*(){let $=[];if(_<1&&(_=1),_!==Math.round(_))throw new Error("Batch size must be an integer");for await(const j of a)for($.push(j);$.length>=_;)yield $.slice(0,_),$=$.slice(_);for(;$.length>0;)yield $.slice(0,_),$=$.slice(_)}():function*(){let $=[];if(_<1&&(_=1),_!==Math.round(_))throw new Error("Batch size must be an integer");for(const j of a)for($.push(j);$.length>=_;)yield $.slice(0,_),$=$.slice(_);for(;$.length>0;)yield $.slice(0,_),$=$.slice(_)}()}var src_default=batch;async function*parallelBatch(a,_=1){for await(const $ of src_default(a,_)){const j=$.map(async _e=>_e().then(et=>({ok:!0,value:et}),et=>({ok:!1,err:et})));for(let _e=0;_e<j.length;_e++){const et=await j[_e];if(et.ok)yield et.value;else throw et.err}}}function asUint8Array(a){return globalThis.Buffer!=null?new Uint8Array(a.buffer,a.byteOffset,a.byteLength):a}function alloc(a=0){var _;return((_=globalThis.Buffer)==null?void 0:_.alloc)!=null?asUint8Array(globalThis.Buffer.alloc(a)):new Uint8Array(a)}function allocUnsafe(a=0){var _;return((_=globalThis.Buffer)==null?void 0:_.allocUnsafe)!=null?asUint8Array(globalThis.Buffer.allocUnsafe(a)):new Uint8Array(a)}function concat(a,_){_==null&&(_=a.reduce((_e,et)=>_e+et.length,0));const $=allocUnsafe(_);let j=0;for(const _e of a)$.set(_e,j),j+=_e.length;return asUint8Array($)}function equals3(a,_){if(a===_)return!0;if(a.byteLength!==_.byteLength)return!1;for(let $=0;$<a.byteLength;$++)if(a[$]!==_[$])return!1;return!0}var symbol=Symbol.for("@achingbrain/uint8arraylist");function findBufAndOffset(a,_){if(_==null||_<0)throw new RangeError("index is out of bounds");let $=0;for(const j of a){const _e=$+j.byteLength;if(_<_e)return{buf:j,index:_-$};$=_e}throw new RangeError("index is out of bounds")}function isUint8ArrayList(a){return!!(a!=null&&a[symbol])}var Uint8ArrayList=class qp{constructor(..._){Object.defineProperty(this,symbol,{value:!0}),this.bufs=[],this.length=0,_.length>0&&this.appendAll(_)}*[Symbol.iterator](){yield*this.bufs}get byteLength(){return this.length}append(..._){this.appendAll(_)}appendAll(_){let $=0;for(const j of _)if(j instanceof Uint8Array)$+=j.byteLength,this.bufs.push(j);else if(isUint8ArrayList(j))$+=j.byteLength,this.bufs.push(...j.bufs);else throw new Error("Could not append value, must be an Uint8Array or a Uint8ArrayList");this.length+=$}prepend(..._){this.prependAll(_)}prependAll(_){let $=0;for(const j of _.reverse())if(j instanceof Uint8Array)$+=j.byteLength,this.bufs.unshift(j);else if(isUint8ArrayList(j))$+=j.byteLength,this.bufs.unshift(...j.bufs);else throw new Error("Could not prepend value, must be an Uint8Array or a Uint8ArrayList");this.length+=$}get(_){const $=findBufAndOffset(this.bufs,_);return $.buf[$.index]}set(_,$){const j=findBufAndOffset(this.bufs,_);j.buf[j.index]=$}write(_,$=0){if(_ instanceof Uint8Array)for(let j=0;j<_.length;j++)this.set($+j,_[j]);else if(isUint8ArrayList(_))for(let j=0;j<_.length;j++)this.set($+j,_.get(j));else throw new Error("Could not write value, must be an Uint8Array or a Uint8ArrayList")}consume(_){if(_=Math.trunc(_),!(Number.isNaN(_)||_<=0)){if(_===this.byteLength){this.bufs=[],this.length=0;return}for(;this.bufs.length>0;)if(_>=this.bufs[0].byteLength)_-=this.bufs[0].byteLength,this.length-=this.bufs[0].byteLength,this.bufs.shift();else{this.bufs[0]=this.bufs[0].subarray(_),this.length-=_;break}}}slice(_,$){const{bufs:j,length:_e}=this._subList(_,$);return concat(j,_e)}subarray(_,$){const{bufs:j,length:_e}=this._subList(_,$);return j.length===1?j[0]:concat(j,_e)}sublist(_,$){const{bufs:j,length:_e}=this._subList(_,$),et=new qp;return et.length=_e,et.bufs=j,et}_subList(_,$){if(_=_??0,$=$??this.length,_<0&&(_=this.length+_),$<0&&($=this.length+$),_<0||$>this.length)throw new RangeError("index is out of bounds");if(_===$)return{bufs:[],length:0};if(_===0&&$===this.length)return{bufs:[...this.bufs],length:this.length};const j=[];let _e=0;for(let et=0;et<this.bufs.length;et++){const tt=this.bufs[et],rt=_e,at=rt+tt.byteLength;if(_e=at,_>=at)continue;const ct=_>=rt&&_<at,dt=$>rt&&$<=at;if(ct&&dt){if(_===rt&&$===at){j.push(tt);break}const yt=_-rt;j.push(tt.subarray(yt,yt+($-_)));break}if(ct){if(_===0){j.push(tt);continue}j.push(tt.subarray(_-rt));continue}if(dt){if($===at){j.push(tt);break}j.push(tt.subarray(0,$-rt));break}j.push(tt)}return{bufs:j,length:$-_}}indexOf(_,$=0){if(!isUint8ArrayList(_)&&!(_ instanceof Uint8Array))throw new TypeError('The "value" argument must be a Uint8ArrayList or Uint8Array');const j=_ instanceof Uint8Array?_:_.subarray();if($=Number($??0),isNaN($)&&($=0),$<0&&($=this.length+$),$<0&&($=0),_.length===0)return $>this.length?this.length:$;const _e=j.byteLength;if(_e===0)throw new TypeError("search must be at least 1 byte long");const et=256,tt=new Int32Array(et);for(let yt=0;yt<et;yt++)tt[yt]=-1;for(let yt=0;yt<_e;yt++)tt[j[yt]]=yt;const rt=tt,at=this.byteLength-j.byteLength,ct=j.byteLength-1;let dt;for(let yt=$;yt<=at;yt+=dt){dt=0;for(let bt=ct;bt>=0;bt--){const Et=this.get(yt+bt);if(j[bt]!==Et){dt=Math.max(1,bt-rt[Et]);break}}if(dt===0)return yt}return-1}getInt8(_){const $=this.subarray(_,_+1);return new DataView($.buffer,$.byteOffset,$.byteLength).getInt8(0)}setInt8(_,$){const j=allocUnsafe(1);new DataView(j.buffer,j.byteOffset,j.byteLength).setInt8(0,$),this.write(j,_)}getInt16(_,$){const j=this.subarray(_,_+2);return new DataView(j.buffer,j.byteOffset,j.byteLength).getInt16(0,$)}setInt16(_,$,j){const _e=alloc(2);new DataView(_e.buffer,_e.byteOffset,_e.byteLength).setInt16(0,$,j),this.write(_e,_)}getInt32(_,$){const j=this.subarray(_,_+4);return new DataView(j.buffer,j.byteOffset,j.byteLength).getInt32(0,$)}setInt32(_,$,j){const _e=alloc(4);new DataView(_e.buffer,_e.byteOffset,_e.byteLength).setInt32(0,$,j),this.write(_e,_)}getBigInt64(_,$){const j=this.subarray(_,_+8);return new DataView(j.buffer,j.byteOffset,j.byteLength).getBigInt64(0,$)}setBigInt64(_,$,j){const _e=alloc(8);new DataView(_e.buffer,_e.byteOffset,_e.byteLength).setBigInt64(0,$,j),this.write(_e,_)}getUint8(_){const $=this.subarray(_,_+1);return new DataView($.buffer,$.byteOffset,$.byteLength).getUint8(0)}setUint8(_,$){const j=allocUnsafe(1);new DataView(j.buffer,j.byteOffset,j.byteLength).setUint8(0,$),this.write(j,_)}getUint16(_,$){const j=this.subarray(_,_+2);return new DataView(j.buffer,j.byteOffset,j.byteLength).getUint16(0,$)}setUint16(_,$,j){const _e=alloc(2);new DataView(_e.buffer,_e.byteOffset,_e.byteLength).setUint16(0,$,j),this.write(_e,_)}getUint32(_,$){const j=this.subarray(_,_+4);return new DataView(j.buffer,j.byteOffset,j.byteLength).getUint32(0,$)}setUint32(_,$,j){const _e=alloc(4);new DataView(_e.buffer,_e.byteOffset,_e.byteLength).setUint32(0,$,j),this.write(_e,_)}getBigUint64(_,$){const j=this.subarray(_,_+8);return new DataView(j.buffer,j.byteOffset,j.byteLength).getBigUint64(0,$)}setBigUint64(_,$,j){const _e=alloc(8);new DataView(_e.buffer,_e.byteOffset,_e.byteLength).setBigUint64(0,$,j),this.write(_e,_)}getFloat32(_,$){const j=this.subarray(_,_+4);return new DataView(j.buffer,j.byteOffset,j.byteLength).getFloat32(0,$)}setFloat32(_,$,j){const _e=alloc(4);new DataView(_e.buffer,_e.byteOffset,_e.byteLength).setFloat32(0,$,j),this.write(_e,_)}getFloat64(_,$){const j=this.subarray(_,_+8);return new DataView(j.buffer,j.byteOffset,j.byteLength).getFloat64(0,$)}setFloat64(_,$,j){const _e=alloc(8);new DataView(_e.buffer,_e.byteOffset,_e.byteLength).setFloat64(0,$,j),this.write(_e,_)}equals(_){if(_==null||!(_ instanceof qp)||_.bufs.length!==this.bufs.length)return!1;for(let $=0;$<this.bufs.length;$++)if(!equals3(this.bufs[$],_.bufs[$]))return!1;return!0}static fromUint8Arrays(_,$){const j=new qp;return j.bufs=_,$==null&&($=_.reduce((_e,et)=>_e+et.byteLength,0)),j.length=$,j}},DEFAULT_CHUNK_SIZE=262144,fixedSize=(a={})=>{const _=a.chunkSize??DEFAULT_CHUNK_SIZE;return async function*(j){let _e=new Uint8ArrayList,et=0,tt=!1;for await(const rt of j)for(_e.append(rt),et+=rt.length;et>=_;)if(yield _e.slice(0,_),tt=!0,_===_e.length)_e=new Uint8ArrayList,et=0;else{const at=new Uint8ArrayList;at.append(_e.sublist(_)),_e=at,et-=_}(!tt||et>0)&&(yield _e.subarray(0,et))}},src_exports={};__export(src_exports,{code:()=>code,createLink:()=>createLink,createNode:()=>createNode,decode:()=>decode5,encode:()=>encode3,name:()=>name,prepare:()=>prepare,validate:()=>validate});var textDecoder=new TextDecoder;function decodeVarint(a,_){let $=0;for(let j=0;;j+=7){if(j>=64)throw new Error("protobuf: varint overflow");if(_>=a.length)throw new Error("protobuf: unexpected end of data");const _e=a[_++];if($+=j<28?(_e&127)<<j:(_e&127)*2**j,_e<128)break}return[$,_]}function decodeBytes(a,_){let $;[$,_]=decodeVarint(a,_);const j=_+$;if($<0||j<0)throw new Error("protobuf: invalid length");if(j>a.length)throw new Error("protobuf: unexpected end of data");return[a.subarray(_,j),j]}function decodeKey(a,_){let $;return[$,_]=decodeVarint(a,_),[$&7,$>>3,_]}function decodeLink(a){const _={},$=a.length;let j=0;for(;j<$;){let _e,et;if([_e,et,j]=decodeKey(a,j),et===1){if(_.Hash)throw new Error("protobuf: (PBLink) duplicate Hash section");if(_e!==2)throw new Error(`protobuf: (PBLink) wrong wireType (${_e}) for Hash`);if(_.Name!==void 0)throw new Error("protobuf: (PBLink) invalid order, found Name before Hash");if(_.Tsize!==void 0)throw new Error("protobuf: (PBLink) invalid order, found Tsize before Hash");[_.Hash,j]=decodeBytes(a,j)}else if(et===2){if(_.Name!==void 0)throw new Error("protobuf: (PBLink) duplicate Name section");if(_e!==2)throw new Error(`protobuf: (PBLink) wrong wireType (${_e}) for Name`);if(_.Tsize!==void 0)throw new Error("protobuf: (PBLink) invalid order, found Tsize before Name");let tt;[tt,j]=decodeBytes(a,j),_.Name=textDecoder.decode(tt)}else if(et===3){if(_.Tsize!==void 0)throw new Error("protobuf: (PBLink) duplicate Tsize section");if(_e!==0)throw new Error(`protobuf: (PBLink) wrong wireType (${_e}) for Tsize`);[_.Tsize,j]=decodeVarint(a,j)}else throw new Error(`protobuf: (PBLink) invalid fieldNumber, expected 1, 2 or 3, got ${et}`)}if(j>$)throw new Error("protobuf: (PBLink) unexpected end of data");return _}function decodeNode(a){const _=a.length;let $=0,j,_e=!1,et;for(;$<_;){let rt,at;if([rt,at,$]=decodeKey(a,$),rt!==2)throw new Error(`protobuf: (PBNode) invalid wireType, expected 2, got ${rt}`);if(at===1){if(et)throw new Error("protobuf: (PBNode) duplicate Data section");[et,$]=decodeBytes(a,$),j&&(_e=!0)}else if(at===2){if(_e)throw new Error("protobuf: (PBNode) duplicate Links section");j||(j=[]);let ct;[ct,$]=decodeBytes(a,$),j.push(decodeLink(ct))}else throw new Error(`protobuf: (PBNode) invalid fieldNumber, expected 1 or 2, got ${at}`)}if($>_)throw new Error("protobuf: (PBNode) unexpected end of data");const tt={};return et&&(tt.Data=et),tt.Links=j||[],tt}var textEncoder=new TextEncoder,maxInt32=2**32,maxUInt32=2**31;function encodeLink(a,_){let $=_.length;if(typeof a.Tsize=="number"){if(a.Tsize<0)throw new Error("Tsize cannot be negative");if(!Number.isSafeInteger(a.Tsize))throw new Error("Tsize too large for encoding");$=encodeVarint(_,$,a.Tsize)-1,_[$]=24}if(typeof a.Name=="string"){const j=textEncoder.encode(a.Name);$-=j.length,_.set(j,$),$=encodeVarint(_,$,j.length)-1,_[$]=18}return a.Hash&&($-=a.Hash.length,_.set(a.Hash,$),$=encodeVarint(_,$,a.Hash.length)-1,_[$]=10),_.length-$}function encodeNode(a){const _=sizeNode(a),$=new Uint8Array(_);let j=_;if(a.Data&&(j-=a.Data.length,$.set(a.Data,j),j=encodeVarint($,j,a.Data.length)-1,$[j]=10),a.Links)for(let _e=a.Links.length-1;_e>=0;_e--){const et=encodeLink(a.Links[_e],$.subarray(0,j));j-=et,j=encodeVarint($,j,et)-1,$[j]=18}return $}function sizeLink(a){let _=0;if(a.Hash){const $=a.Hash.length;_+=1+$+sov($)}if(typeof a.Name=="string"){const $=textEncoder.encode(a.Name).length;_+=1+$+sov($)}return typeof a.Tsize=="number"&&(_+=1+sov(a.Tsize)),_}function sizeNode(a){let _=0;if(a.Data){const $=a.Data.length;_+=1+$+sov($)}if(a.Links)for(const $ of a.Links){const j=sizeLink($);_+=1+j+sov(j)}return _}function encodeVarint(a,_,$){_-=sov($);const j=_;for(;$>=maxUInt32;)a[_++]=$&127|128,$/=128;for(;$>=128;)a[_++]=$&127|128,$>>>=7;return a[_]=$,j}function sov(a){return a%2===0&&a++,Math.floor((len64(a)+6)/7)}function len64(a){let _=0;return a>=maxInt32&&(a=Math.floor(a/maxInt32),_=32),a>=65536&&(a>>>=16,_+=16),a>=256&&(a>>>=8,_+=8),_+len8tab[a]}var len8tab=[0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8],pbNodeProperties=["Data","Links"],pbLinkProperties=["Hash","Name","Tsize"],textEncoder2=new TextEncoder;function linkComparator(a,_){if(a===_)return 0;const $=a.Name?textEncoder2.encode(a.Name):[],j=_.Name?textEncoder2.encode(_.Name):[];let _e=$.length,et=j.length;for(let tt=0,rt=Math.min(_e,et);tt<rt;++tt)if($[tt]!==j[tt]){_e=$[tt],et=j[tt];break}return _e<et?-1:et<_e?1:0}function hasOnlyProperties(a,_){return!Object.keys(a).some($=>!_.includes($))}function asLink(a){if(typeof a.asCID=="object"){const $=CID.asCID(a);if(!$)throw new TypeError("Invalid DAG-PB form");return{Hash:$}}if(typeof a!="object"||Array.isArray(a))throw new TypeError("Invalid DAG-PB form");const _={};if(a.Hash){let $=CID.asCID(a.Hash);try{$||(typeof a.Hash=="string"?$=CID.parse(a.Hash):a.Hash instanceof Uint8Array&&($=CID.decode(a.Hash)))}catch(j){throw new TypeError(`Invalid DAG-PB form: ${j.message}`)}$&&(_.Hash=$)}if(!_.Hash)throw new TypeError("Invalid DAG-PB form");return typeof a.Name=="string"&&(_.Name=a.Name),typeof a.Tsize=="number"&&(_.Tsize=a.Tsize),_}function prepare(a){if((a instanceof Uint8Array||typeof a=="string")&&(a={Data:a}),typeof a!="object"||Array.isArray(a))throw new TypeError("Invalid DAG-PB form");const _={};if(a.Data!==void 0)if(typeof a.Data=="string")_.Data=textEncoder2.encode(a.Data);else if(a.Data instanceof Uint8Array)_.Data=a.Data;else throw new TypeError("Invalid DAG-PB form");if(a.Links!==void 0)if(Array.isArray(a.Links))_.Links=a.Links.map(asLink),_.Links.sort(linkComparator);else throw new TypeError("Invalid DAG-PB form");else _.Links=[];return _}function validate(a){if(!a||typeof a!="object"||Array.isArray(a)||a instanceof Uint8Array||a["/"]&&a["/"]===a.bytes)throw new TypeError("Invalid DAG-PB form");if(!hasOnlyProperties(a,pbNodeProperties))throw new TypeError("Invalid DAG-PB form (extraneous properties)");if(a.Data!==void 0&&!(a.Data instanceof Uint8Array))throw new TypeError("Invalid DAG-PB form (Data must be bytes)");if(!Array.isArray(a.Links))throw new TypeError("Invalid DAG-PB form (Links must be a list)");for(let _=0;_<a.Links.length;_++){const $=a.Links[_];if(!$||typeof $!="object"||Array.isArray($)||$ instanceof Uint8Array||$["/"]&&$["/"]===$.bytes)throw new TypeError("Invalid DAG-PB form (bad link)");if(!hasOnlyProperties($,pbLinkProperties))throw new TypeError("Invalid DAG-PB form (extraneous properties on link)");if($.Hash===void 0)throw new TypeError("Invalid DAG-PB form (link must have a Hash)");if($.Hash==null||!$.Hash["/"]||$.Hash["/"]!==$.Hash.bytes)throw new TypeError("Invalid DAG-PB form (link Hash must be a CID)");if($.Name!==void 0&&typeof $.Name!="string")throw new TypeError("Invalid DAG-PB form (link Name must be a string)");if($.Tsize!==void 0){if(typeof $.Tsize!="number"||$.Tsize%1!==0)throw new TypeError("Invalid DAG-PB form (link Tsize must be an integer)");if($.Tsize<0)throw new TypeError("Invalid DAG-PB form (link Tsize cannot be negative)")}if(_>0&&linkComparator($,a.Links[_-1])===-1)throw new TypeError("Invalid DAG-PB form (links must be sorted by Name bytes)")}}function createNode(a,_=[]){return prepare({Data:a,Links:_})}function createLink(a,_,$){return asLink({Hash:$,Name:a,Tsize:_})}var name="dag-pb",code=112;function encode3(a){validate(a);const _={};return a.Links&&(_.Links=a.Links.map($=>{const j={};return $.Hash&&(j.Hash=$.Hash.bytes),$.Name!==void 0&&(j.Name=$.Name),$.Tsize!==void 0&&(j.Tsize=$.Tsize),j})),a.Data&&(_.Data=a.Data),encodeNode(_)}function decode5(a){const _=decodeNode(a),$={};return _.Data&&($.Data=_.Data),_.Links&&($.Links=_.Links.map(j=>{const _e={};try{_e.Hash=CID.decode(j.Hash)}catch{}if(!_e.Hash)throw new Error("Invalid Hash field found in link, expected CID");return j.Name!==void 0&&(_e.Name=j.Name),j.Tsize!==void 0&&(_e.Tsize=j.Tsize),_e})),$}var import_err_code=__toESM(require_err_code(),1),import_reader=__toESM(require_reader(),1),import_reader_buffer=__toESM(require_reader_buffer(),1),import_minimal=__toESM(require_minimal(),1),import_writer=__toESM(require_writer(),1),import_writer_buffer=__toESM(require_writer_buffer(),1);function configure(){import_minimal.default._configure(),import_reader.default._configure(import_reader_buffer.default),import_writer.default._configure(import_writer_buffer.default)}configure();var methods=["uint64","int64","sint64","fixed64","sfixed64"];function patchReader(a){for(const _ of methods){if(a[_]==null)continue;const $=a[_];a[_]=function(){return BigInt($.call(this).toString())}}return a}function reader(a){return patchReader(new import_reader.default(a))}function patchWriter(a){for(const _ of methods){if(a[_]==null)continue;const $=a[_];a[_]=function(j){return $.call(this,j.toString())}}return a}function writer(){return patchWriter(import_writer.default.create())}function decodeMessage(a,_){const $=reader(a instanceof Uint8Array?a:a.subarray());return _.decode($)}function encodeMessage(a,_){const $=writer();return _.encode(a,$,{lengthDelimited:!1}),$.finish()}var CODEC_TYPES;(function(a){a[a.VARINT=0]="VARINT",a[a.BIT64=1]="BIT64",a[a.LENGTH_DELIMITED=2]="LENGTH_DELIMITED",a[a.START_GROUP=3]="START_GROUP",a[a.END_GROUP=4]="END_GROUP",a[a.BIT32=5]="BIT32"})(CODEC_TYPES||(CODEC_TYPES={}));function createCodec(a,_,$,j){return{name:a,type:_,encode:$,decode:j}}function enumeration(a){function _(_e){if(a[_e.toString()]==null)throw new Error("Invalid enum value");return a[_e]}const $=function(et,tt){const rt=_(et);tt.int32(rt)},j=function(et){const tt=et.int32();return _(tt)};return createCodec("enum",CODEC_TYPES.VARINT,$,j)}function message(a,_){return createCodec("message",CODEC_TYPES.LENGTH_DELIMITED,a,_)}var Data;(function(a){(function(j){j.Raw="Raw",j.Directory="Directory",j.File="File",j.Metadata="Metadata",j.Symlink="Symlink",j.HAMTShard="HAMTShard"})(a.DataType||(a.DataType={}));let _;(function(j){j[j.Raw=0]="Raw",j[j.Directory=1]="Directory",j[j.File=2]="File",j[j.Metadata=3]="Metadata",j[j.Symlink=4]="Symlink",j[j.HAMTShard=5]="HAMTShard"})(_||(_={})),function(j){j.codec=()=>enumeration(_)}(a.DataType||(a.DataType={}));let $;a.codec=()=>($==null&&($=message((j,_e,et={})=>{if(et.lengthDelimited!==!1&&_e.fork(),j.Type!=null&&(_e.uint32(8),a.DataType.codec().encode(j.Type,_e)),j.Data!=null&&(_e.uint32(18),_e.bytes(j.Data)),j.filesize!=null&&(_e.uint32(24),_e.uint64(j.filesize)),j.blocksizes!=null)for(const tt of j.blocksizes)_e.uint32(32),_e.uint64(tt);j.hashType!=null&&(_e.uint32(40),_e.uint64(j.hashType)),j.fanout!=null&&(_e.uint32(48),_e.uint64(j.fanout)),j.mode!=null&&(_e.uint32(56),_e.uint32(j.mode)),j.mtime!=null&&(_e.uint32(66),UnixTime.codec().encode(j.mtime,_e)),et.lengthDelimited!==!1&&_e.ldelim()},(j,_e)=>{const et={blocksizes:[]},tt=_e==null?j.len:j.pos+_e;for(;j.pos<tt;){const rt=j.uint32();switch(rt>>>3){case 1:et.Type=a.DataType.codec().decode(j);break;case 2:et.Data=j.bytes();break;case 3:et.filesize=j.uint64();break;case 4:et.blocksizes.push(j.uint64());break;case 5:et.hashType=j.uint64();break;case 6:et.fanout=j.uint64();break;case 7:et.mode=j.uint32();break;case 8:et.mtime=UnixTime.codec().decode(j,j.uint32());break;default:j.skipType(rt&7);break}}return et})),$),a.encode=j=>encodeMessage(j,a.codec()),a.decode=j=>decodeMessage(j,a.codec())})(Data||(Data={}));var UnixTime;(function(a){let _;a.codec=()=>(_==null&&(_=message(($,j,_e={})=>{_e.lengthDelimited!==!1&&j.fork(),$.Seconds!=null&&(j.uint32(8),j.int64($.Seconds)),$.FractionalNanoseconds!=null&&(j.uint32(21),j.fixed32($.FractionalNanoseconds)),_e.lengthDelimited!==!1&&j.ldelim()},($,j)=>{const _e={},et=j==null?$.len:$.pos+j;for(;$.pos<et;){const tt=$.uint32();switch(tt>>>3){case 1:_e.Seconds=$.int64();break;case 2:_e.FractionalNanoseconds=$.fixed32();break;default:$.skipType(tt&7);break}}return _e})),_),a.encode=$=>encodeMessage($,a.codec()),a.decode=$=>decodeMessage($,a.codec())})(UnixTime||(UnixTime={}));var Metadata;(function(a){let _;a.codec=()=>(_==null&&(_=message(($,j,_e={})=>{_e.lengthDelimited!==!1&&j.fork(),$.MimeType!=null&&(j.uint32(10),j.string($.MimeType)),_e.lengthDelimited!==!1&&j.ldelim()},($,j)=>{const _e={},et=j==null?$.len:$.pos+j;for(;$.pos<et;){const tt=$.uint32();switch(tt>>>3){case 1:_e.MimeType=$.string();break;default:$.skipType(tt&7);break}}return _e})),_),a.encode=$=>encodeMessage($,a.codec()),a.decode=$=>decodeMessage($,a.codec())})(Metadata||(Metadata={}));var types={Raw:"raw",Directory:"directory",File:"file",Metadata:"metadata",Symlink:"symlink",HAMTShard:"hamt-sharded-directory"},dirTypes=["directory","hamt-sharded-directory"],DEFAULT_FILE_MODE=parseInt("0644",8),DEFAULT_DIRECTORY_MODE=parseInt("0755",8),UnixFS=class A0{constructor(_={type:"file"}){Dr(this,"type");Dr(this,"data");Dr(this,"blockSizes");Dr(this,"hashType");Dr(this,"fanout");Dr(this,"mtime");Dr(this,"_mode");Dr(this,"_originalMode");const{type:$,data:j,blockSizes:_e,hashType:et,fanout:tt,mtime:rt,mode:at}=_;if($!=null&&!Object.values(types).includes($))throw(0,import_err_code.default)(new Error("Type: "+$+" is not valid"),"ERR_INVALID_TYPE");this.type=$??"file",this.data=j,this.hashType=et,this.fanout=tt,this.blockSizes=_e??[],this._originalMode=0,this.mode=at,this.mtime=rt}static unmarshal(_){const $=Data.decode(_),j=new A0({type:types[$.Type!=null?$.Type.toString():"File"],data:$.Data,blockSizes:$.blocksizes,mode:$.mode,mtime:$.mtime!=null?{secs:$.mtime.Seconds??0n,nsecs:$.mtime.FractionalNanoseconds}:void 0});return j._originalMode=$.mode??0,j}set mode(_){_==null?this._mode=this.isDirectory()?DEFAULT_DIRECTORY_MODE:DEFAULT_FILE_MODE:this._mode=_&4095}get mode(){return this._mode}isDirectory(){return dirTypes.includes(this.type)}addBlockSize(_){this.blockSizes.push(_)}removeBlockSize(_){this.blockSizes.splice(_,1)}fileSize(){if(this.isDirectory())return 0n;let _=0n;return this.blockSizes.forEach($=>{_+=$}),this.data!=null&&(_+=BigInt(this.data.length)),_}marshal(){let _;switch(this.type){case"raw":_=Data.DataType.Raw;break;case"directory":_=Data.DataType.Directory;break;case"file":_=Data.DataType.File;break;case"metadata":_=Data.DataType.Metadata;break;case"symlink":_=Data.DataType.Symlink;break;case"hamt-sharded-directory":_=Data.DataType.HAMTShard;break;default:throw(0,import_err_code.default)(new Error(`Type: ${_} is not valid`),"ERR_INVALID_TYPE")}let $=this.data;(this.data==null||this.data.length===0)&&($=void 0);let j;this.mode!=null&&(j=this._originalMode&4294963200|(this.mode??0),j===DEFAULT_FILE_MODE&&!this.isDirectory()&&(j=void 0),j===DEFAULT_DIRECTORY_MODE&&this.isDirectory()&&(j=void 0));let _e;return this.mtime!=null&&(_e={Seconds:this.mtime.secs,FractionalNanoseconds:this.mtime.nsecs}),Data.encode({Type:_,Data:$,filesize:this.isDirectory()?void 0:this.fileSize(),blocksizes:this.blockSizes,hashType:this.hashType,fanout:this.fanout,mode:j,mtime:_e})}},raw_exports={};__export(raw_exports,{code:()=>code2,decode:()=>decode6,encode:()=>encode4,name:()=>name2});var equals4=(a,_)=>{if(a===_)return!0;if(a.byteLength!==_.byteLength)return!1;for(let $=0;$<a.byteLength;$++)if(a[$]!==_[$])return!1;return!0},coerce2=a=>{if(a instanceof Uint8Array&&a.constructor.name==="Uint8Array")return a;if(a instanceof ArrayBuffer)return new Uint8Array(a);if(ArrayBuffer.isView(a))return new Uint8Array(a.buffer,a.byteOffset,a.byteLength);throw new Error("Unknown type, must be binary type")},name2="raw",code2=85,encode4=a=>coerce2(a),decode6=a=>coerce2(a),CustomProgressEvent=class extends Event{constructor(a,_){super(a),this.detail=_}},encode_12=encode5,MSB2=128,REST2=127,MSBALL2=~REST2,INT2=Math.pow(2,31);function encode5(a,_,$){_=_||[],$=$||0;for(var j=$;a>=INT2;)_[$++]=a&255|MSB2,a/=128;for(;a&MSBALL2;)_[$++]=a&255|MSB2,a>>>=7;return _[$]=a|0,encode5.bytes=$-j+1,_}var decode7=read2,MSB$12=128,REST$12=127;function read2(a,j){var $=0,j=j||0,_e=0,et=j,tt,rt=a.length;do{if(et>=rt)throw read2.bytes=0,new RangeError("Could not decode varint");tt=a[et++],$+=_e<28?(tt&REST$12)<<_e:(tt&REST$12)*Math.pow(2,_e),_e+=7}while(tt>=MSB$12);return read2.bytes=et-j,$}var N12=Math.pow(2,7),N22=Math.pow(2,14),N32=Math.pow(2,21),N42=Math.pow(2,28),N52=Math.pow(2,35),N62=Math.pow(2,42),N72=Math.pow(2,49),N82=Math.pow(2,56),N92=Math.pow(2,63),length2=function(a){return a<N12?1:a<N22?2:a<N32?3:a<N42?4:a<N52?5:a<N62?6:a<N72?7:a<N82?8:a<N92?9:10},varint2={encode:encode_12,decode:decode7,encodingLength:length2},_brrp_varint2=varint2,varint_default2=_brrp_varint2,decode8=(a,_=0)=>[varint_default2.decode(a,_),varint_default2.decode.bytes],encodeTo2=(a,_,$=0)=>(varint_default2.encode(a,_,$),_),encodingLength2=a=>varint_default2.encodingLength(a),create2=(a,_)=>{const $=_.byteLength,j=encodingLength2(a),_e=j+encodingLength2($),et=new Uint8Array(_e+$);return encodeTo2(a,et,0),encodeTo2($,et,j),et.set(_,_e),new Digest2(a,$,_,et)},decode9=a=>{const _=coerce2(a),[$,j]=decode8(_),[_e,et]=decode8(_.subarray(j)),tt=_.subarray(j+et);if(tt.byteLength!==_e)throw new Error("Incorrect length");return new Digest2($,_e,tt,_)},equals5=(a,_)=>{if(a===_)return!0;{const $=_;return a.code===$.code&&a.size===$.size&&$.bytes instanceof Uint8Array&&equals4(a.bytes,$.bytes)}},Digest2=class{constructor(a,_,$,j){this.code=a,this.size=_,this.digest=$,this.bytes=j}};function base2(a,_){if(a.length>=255)throw new TypeError("Alphabet too long");for(var $=new Uint8Array(256),j=0;j<$.length;j++)$[j]=255;for(var _e=0;_e<a.length;_e++){var et=a.charAt(_e),tt=et.charCodeAt(0);if($[tt]!==255)throw new TypeError(et+" is ambiguous");$[tt]=_e}var rt=a.length,at=a.charAt(0),ct=Math.log(rt)/Math.log(256),dt=Math.log(256)/Math.log(rt);function yt($t){if($t instanceof Uint8Array||(ArrayBuffer.isView($t)?$t=new Uint8Array($t.buffer,$t.byteOffset,$t.byteLength):Array.isArray($t)&&($t=Uint8Array.from($t))),!($t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if($t.length===0)return"";for(var _t=0,xt=0,St=0,Mt=$t.length;St!==Mt&&$t[St]===0;)St++,_t++;for(var Tt=(Mt-St)*dt+1>>>0,Rt=new Uint8Array(Tt);St!==Mt;){for(var Ct=$t[St],It=0,kt=Tt-1;(Ct!==0||It<xt)&&kt!==-1;kt--,It++)Ct+=256*Rt[kt]>>>0,Rt[kt]=Ct%rt>>>0,Ct=Ct/rt>>>0;if(Ct!==0)throw new Error("Non-zero carry");xt=It,St++}for(var Dt=Tt-xt;Dt!==Tt&&Rt[Dt]===0;)Dt++;for(var Bt=at.repeat(_t);Dt<Tt;++Dt)Bt+=a.charAt(Rt[Dt]);return Bt}function bt($t){if(typeof $t!="string")throw new TypeError("Expected String");if($t.length===0)return new Uint8Array;var _t=0;if($t[_t]!==" "){for(var xt=0,St=0;$t[_t]===at;)xt++,_t++;for(var Mt=($t.length-_t)*ct+1>>>0,Tt=new Uint8Array(Mt);$t[_t];){var Rt=$[$t.charCodeAt(_t)];if(Rt===255)return;for(var Ct=0,It=Mt-1;(Rt!==0||Ct<St)&&It!==-1;It--,Ct++)Rt+=rt*Tt[It]>>>0,Tt[It]=Rt%256>>>0,Rt=Rt/256>>>0;if(Rt!==0)throw new Error("Non-zero carry");St=Ct,_t++}if($t[_t]!==" "){for(var kt=Mt-St;kt!==Mt&&Tt[kt]===0;)kt++;for(var Dt=new Uint8Array(xt+(Mt-kt)),Bt=xt;kt!==Mt;)Dt[Bt++]=Tt[kt++];return Dt}}}function Et($t){var _t=bt($t);if(_t)return _t;throw new Error(`Non-${_} character`)}return{encode:yt,decodeUnsafe:bt,decode:Et}}var src2=base2,_brrp__multiformats_scope_baseX2=src2,base_x_default2=_brrp__multiformats_scope_baseX2,Encoder2=class{constructor(a,_,$){this.name=a,this.prefix=_,this.baseEncode=$}encode(a){if(a instanceof Uint8Array)return`${this.prefix}${this.baseEncode(a)}`;throw Error("Unknown type, must be binary type")}},Decoder2=class{constructor(a,_,$){if(this.name=a,this.prefix=_,_.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=_.codePointAt(0),this.baseDecode=$}decode(a){if(typeof a=="string"){if(a.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(a)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(a.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(a){return or2(this,a)}},ComposedDecoder2=class{constructor(a){this.decoders=a}or(a){return or2(this,a)}decode(a){const _=a[0],$=this.decoders[_];if($)return $.decode(a);throw RangeError(`Unable to decode multibase string ${JSON.stringify(a)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},or2=(a,_)=>new ComposedDecoder2({...a.decoders||{[a.prefix]:a},..._.decoders||{[_.prefix]:_}}),Codec2=class{constructor(a,_,$,j){this.name=a,this.prefix=_,this.baseEncode=$,this.baseDecode=j,this.encoder=new Encoder2(a,_,$),this.decoder=new Decoder2(a,_,j)}encode(a){return this.encoder.encode(a)}decode(a){return this.decoder.decode(a)}},from2=({name:a,prefix:_,encode:$,decode:j})=>new Codec2(a,_,$,j),baseX2=({prefix:a,name:_,alphabet:$})=>{const{encode:j,decode:_e}=base_x_default2($,_);return from2({prefix:a,name:_,encode:j,decode:et=>coerce2(_e(et))})},decode10=(a,_,$,j)=>{const _e={};for(let dt=0;dt<_.length;++dt)_e[_[dt]]=dt;let et=a.length;for(;a[et-1]==="=";)--et;const tt=new Uint8Array(et*$/8|0);let rt=0,at=0,ct=0;for(let dt=0;dt<et;++dt){const yt=_e[a[dt]];if(yt===void 0)throw new SyntaxError(`Non-${j} character`);at=at<<$|yt,rt+=$,rt>=8&&(rt-=8,tt[ct++]=255&at>>rt)}if(rt>=$||255&at<<8-rt)throw new SyntaxError("Unexpected end of data");return tt},encode6=(a,_,$)=>{const j=_[_.length-1]==="=",_e=(1<<$)-1;let et="",tt=0,rt=0;for(let at=0;at<a.length;++at)for(rt=rt<<8|a[at],tt+=8;tt>$;)tt-=$,et+=_[_e&rt>>tt];if(tt&&(et+=_[_e&rt<<$-tt]),j)for(;et.length*$&7;)et+="=";return et},rfc46482=({name:a,prefix:_,bitsPerChar:$,alphabet:j})=>from2({prefix:_,name:a,encode(_e){return encode6(_e,j,$)},decode(_e){return decode10(_e,j,$,a)}}),base58btc2=baseX2({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"});baseX2({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var base322=rfc46482({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5});rfc46482({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),rfc46482({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),rfc46482({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),rfc46482({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),rfc46482({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),rfc46482({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),rfc46482({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),rfc46482({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var format2=(a,_)=>{const{bytes:$,version:j}=a;switch(j){case 0:return toStringV02($,baseCache2(a),_||base58btc2.encoder);default:return toStringV12($,baseCache2(a),_||base322.encoder)}},cache2=new WeakMap,baseCache2=a=>{const _=cache2.get(a);if(_==null){const $=new Map;return cache2.set(a,$),$}return _},CID2=class bo{constructor(_,$,j,_e){this.code=$,this.version=_,this.multihash=j,this.bytes=_e,this["/"]=_e}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{const{code:_,multihash:$}=this;if(_!==DAG_PB_CODE2)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if($.code!==SHA_256_CODE2)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return bo.createV0($)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{const{code:_,digest:$}=this.multihash,j=create2(_,$);return bo.createV1(this.code,j)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(_){return bo.equals(this,_)}static equals(_,$){const j=$;return j&&_.code===j.code&&_.version===j.version&&equals5(_.multihash,j.multihash)}toString(_){return format2(this,_)}toJSON(){return{"/":format2(this)}}link(){return this}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(_){if(_==null)return null;const $=_;if($ instanceof bo)return $;if($["/"]!=null&&$["/"]===$.bytes||$.asCID===$){const{version:j,code:_e,multihash:et,bytes:tt}=$;return new bo(j,_e,et,tt||encodeCID2(j,_e,et.bytes))}else if($[cidSymbol2]===!0){const{version:j,multihash:_e,code:et}=$,tt=decode9(_e);return bo.create(j,et,tt)}else return null}static create(_,$,j){if(typeof $!="number")throw new Error("String codecs are no longer supported");if(!(j.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(_){case 0:{if($!==DAG_PB_CODE2)throw new Error(`Version 0 CID must use dag-pb (code: ${DAG_PB_CODE2}) block encoding`);return new bo(_,$,j,j.bytes)}case 1:{const _e=encodeCID2(_,$,j.bytes);return new bo(_,$,j,_e)}default:throw new Error("Invalid version")}}static createV0(_){return bo.create(0,DAG_PB_CODE2,_)}static createV1(_,$){return bo.create(1,_,$)}static decode(_){const[$,j]=bo.decodeFirst(_);if(j.length)throw new Error("Incorrect length");return $}static decodeFirst(_){const $=bo.inspectBytes(_),j=$.size-$.multihashSize,_e=coerce2(_.subarray(j,j+$.multihashSize));if(_e.byteLength!==$.multihashSize)throw new Error("Incorrect length");const et=_e.subarray($.multihashSize-$.digestSize),tt=new Digest2($.multihashCode,$.digestSize,et,_e);return[$.version===0?bo.createV0(tt):bo.createV1($.codec,tt),_.subarray($.size)]}static inspectBytes(_){let $=0;const j=()=>{const[yt,bt]=decode8(_.subarray($));return $+=bt,yt};let _e=j(),et=DAG_PB_CODE2;if(_e===18?(_e=0,$=0):et=j(),_e!==0&&_e!==1)throw new RangeError(`Invalid CID version ${_e}`);const tt=$,rt=j(),at=j(),ct=$+at,dt=ct-tt;return{version:_e,codec:et,multihashCode:rt,digestSize:at,multihashSize:dt,size:ct}}static parse(_,$){const[j,_e]=parseCIDtoBytes2(_,$),et=bo.decode(_e);if(et.version===0&&_[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return baseCache2(et).set(j,_),et}},parseCIDtoBytes2=(a,_)=>{switch(a[0]){case"Q":{const $=_||base58btc2;return[base58btc2.prefix,$.decode(`${base58btc2.prefix}${a}`)]}case base58btc2.prefix:{const $=_||base58btc2;return[base58btc2.prefix,$.decode(a)]}case base322.prefix:{const $=_||base322;return[base322.prefix,$.decode(a)]}default:{if(_==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[a[0],_.decode(a)]}}},toStringV02=(a,_,$)=>{const{prefix:j}=$;if(j!==base58btc2.prefix)throw Error(`Cannot string encode V0 in ${$.name} encoding`);const _e=_.get(j);if(_e==null){const et=$.encode(a).slice(1);return _.set(j,et),et}else return _e},toStringV12=(a,_,$)=>{const{prefix:j}=$,_e=_.get(j);if(_e==null){const et=$.encode(a);return _.set(j,et),et}else return _e},DAG_PB_CODE2=112,SHA_256_CODE2=18,encodeCID2=(a,_,$)=>{const j=encodingLength2(a),_e=j+encodingLength2(_),et=new Uint8Array(_e+$.byteLength);return encodeTo2(a,et,0),encodeTo2(_,et,j),et.set($,_e),et},cidSymbol2=Symbol.for("@ipld/js-cid/CID"),import_crypto=__toESM(requireCryptoBrowserify(),1),from3=({name:a,code:_,encode:$})=>new Hasher(a,_,$),Hasher=class{constructor(a,_,$){this.name=a,this.code=_,this.encode=$}digest(a){if(a instanceof Uint8Array){const _=this.encode(a);return _ instanceof Uint8Array?create2(this.code,_):_.then($=>create2(this.code,$))}else throw Error("Unknown type, must be binary type")}},sha256=from3({name:"sha2-256",code:18,encode:a=>coerce2(import_crypto.default.createHash("sha256").update(a).digest())}),persist=async(a,_,$)=>{$.codec==null&&($.codec=src_exports);const j=await sha256.digest(a),_e=CID2.create($.cidVersion,$.codec.code,j);return await _.put(_e,a,$),_e};function defaultBufferImporter(a){return async function*($,j){let _e=0n;for await(let et of $.content)yield async()=>{var ct;let tt;const rt={codec:src_exports,cidVersion:a.cidVersion,onProgress:a.onProgress};a.rawLeaves?(rt.codec=raw_exports,rt.cidVersion=1):(tt=new UnixFS({type:a.leafType,data:et}),et=encode3({Data:tt.marshal(),Links:[]}));const at=await persist(et,j,rt);return _e+=BigInt(et.byteLength),(ct=a.onProgress)==null||ct.call(a,new CustomProgressEvent("unixfs:importer:progress:file:write",{bytesWritten:_e,cid:at,path:$.path})),{cid:at,unixfs:tt,size:BigInt(et.length),block:et}}}}var import_err_code2=__toESM(require_err_code(),1),dirBuilder=async(a,_,$)=>{const j=new UnixFS({type:"directory",mtime:a.mtime,mode:a.mode}),_e=encode3(prepare({Data:j.marshal()})),et=await persist(_e,_,$),tt=a.path;return{cid:et,path:tt,unixfs:j,size:BigInt(_e.length),originalPath:a.originalPath,block:_e}};async function*buildFileBatch(a,_,$){let j=-1,_e;for await(const et of parallelBatch($.bufferImporter(a,_),$.blockWriteConcurrency)){if(j++,j===0){_e={...et,single:!0};continue}else j===1&&_e!=null&&(yield{..._e,block:void 0,single:void 0},_e=void 0);yield{...et,block:void 0}}_e!=null&&(yield _e)}function isSingleBlockImport(a){return a.single===!0}var reduce=(a,_,$)=>async function(_e){var dt,yt;if(_e.length===1&&isSingleBlockImport(_e[0])&&$.reduceSingleLeafToSelf){const bt=_e[0];let Et=bt.block;return isSingleBlockImport(bt)&&(a.mtime!==void 0||a.mode!==void 0)&&(bt.unixfs=new UnixFS({type:"file",mtime:a.mtime,mode:a.mode,data:bt.block}),Et={Data:bt.unixfs.marshal(),Links:[]},bt.block=encode3(prepare(Et)),bt.cid=await persist(bt.block,_,{...$,cidVersion:$.cidVersion}),bt.size=BigInt(bt.block.length)),(dt=$.onProgress)==null||dt.call($,new CustomProgressEvent("unixfs:importer:progress:file:layout",{cid:bt.cid,path:bt.originalPath})),{cid:bt.cid,path:a.path,unixfs:bt.unixfs,size:bt.size,originalPath:bt.originalPath}}const et=new UnixFS({type:"file",mtime:a.mtime,mode:a.mode}),tt=_e.filter(bt=>{var Et,$t;return bt.cid.code===code2&&bt.size>0||bt.unixfs!=null&&bt.unixfs.data==null&&bt.unixfs.fileSize()>0n?!0:!!(($t=(Et=bt.unixfs)==null?void 0:Et.data)!=null&&$t.length)}).map(bt=>{var Et;return bt.cid.code===code2?(et.addBlockSize(bt.size),{Name:"",Tsize:Number(bt.size),Hash:bt.cid}):(bt.unixfs==null||bt.unixfs.data==null?et.addBlockSize(((Et=bt.unixfs)==null?void 0:Et.fileSize())??0n):et.addBlockSize(BigInt(bt.unixfs.data.length)),{Name:"",Tsize:Number(bt.size),Hash:bt.cid})}),rt={Data:et.marshal(),Links:tt},at=encode3(prepare(rt)),ct=await persist(at,_,$);return(yt=$.onProgress)==null||yt.call($,new CustomProgressEvent("unixfs:importer:progress:file:layout",{cid:ct,path:a.originalPath})),{cid:ct,path:a.path,unixfs:et,size:BigInt(at.length+rt.Links.reduce((bt,Et)=>bt+(Et.Tsize??0),0)),originalPath:a.originalPath,block:at}},fileBuilder=async(a,_,$)=>$.layout(buildFileBatch(a,_,$),reduce(a,_,$));function isIterable(a){return Symbol.iterator in a}function isAsyncIterable2(a){return Symbol.asyncIterator in a}function contentAsAsyncIterable(a){try{if(a instanceof Uint8Array)return async function*(){yield a}();if(isIterable(a))return async function*(){yield*a}();if(isAsyncIterable2(a))return a}catch{throw(0,import_err_code2.default)(new Error("Content was invalid"),"ERR_INVALID_CONTENT")}throw(0,import_err_code2.default)(new Error("Content was invalid"),"ERR_INVALID_CONTENT")}function defaultDagBuilder(a){return async function*($,j){for await(const _e of $){let et;if(_e.path!=null&&(et=_e.path,_e.path=_e.path.split("/").filter(tt=>tt!=null&&tt!==".").join("/")),isFileCandidate(_e)){const tt={path:_e.path,mtime:_e.mtime,mode:_e.mode,content:async function*(){var at;let rt=0n;for await(const ct of a.chunker(a.chunkValidator(contentAsAsyncIterable(_e.content)))){const dt=BigInt(ct.byteLength);rt+=dt,(at=a.onProgress)==null||at.call(a,new CustomProgressEvent("unixfs:importer:progress:file:read",{bytesRead:rt,chunkSize:dt,path:_e.path})),yield ct}}(),originalPath:et};yield async()=>fileBuilder(tt,j,a)}else if(_e.path!=null){const tt={path:_e.path,mtime:_e.mtime,mode:_e.mode,originalPath:et};yield async()=>dirBuilder(tt,j,a)}else throw new Error("Import candidate must have content or path or both")}}}function isFileCandidate(a){return a.content!=null}var import_err_code3=__toESM(require_err_code(),1),identity_exports={};__export(identity_exports,{identity:()=>identity});function base3(a,_){if(a.length>=255)throw new TypeError("Alphabet too long");for(var $=new Uint8Array(256),j=0;j<$.length;j++)$[j]=255;for(var _e=0;_e<a.length;_e++){var et=a.charAt(_e),tt=et.charCodeAt(0);if($[tt]!==255)throw new TypeError(et+" is ambiguous");$[tt]=_e}var rt=a.length,at=a.charAt(0),ct=Math.log(rt)/Math.log(256),dt=Math.log(256)/Math.log(rt);function yt($t){if($t instanceof Uint8Array||(ArrayBuffer.isView($t)?$t=new Uint8Array($t.buffer,$t.byteOffset,$t.byteLength):Array.isArray($t)&&($t=Uint8Array.from($t))),!($t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if($t.length===0)return"";for(var _t=0,xt=0,St=0,Mt=$t.length;St!==Mt&&$t[St]===0;)St++,_t++;for(var Tt=(Mt-St)*dt+1>>>0,Rt=new Uint8Array(Tt);St!==Mt;){for(var Ct=$t[St],It=0,kt=Tt-1;(Ct!==0||It<xt)&&kt!==-1;kt--,It++)Ct+=256*Rt[kt]>>>0,Rt[kt]=Ct%rt>>>0,Ct=Ct/rt>>>0;if(Ct!==0)throw new Error("Non-zero carry");xt=It,St++}for(var Dt=Tt-xt;Dt!==Tt&&Rt[Dt]===0;)Dt++;for(var Bt=at.repeat(_t);Dt<Tt;++Dt)Bt+=a.charAt(Rt[Dt]);return Bt}function bt($t){if(typeof $t!="string")throw new TypeError("Expected String");if($t.length===0)return new Uint8Array;var _t=0;if($t[_t]!==" "){for(var xt=0,St=0;$t[_t]===at;)xt++,_t++;for(var Mt=($t.length-_t)*ct+1>>>0,Tt=new Uint8Array(Mt);$t[_t];){var Rt=$[$t.charCodeAt(_t)];if(Rt===255)return;for(var Ct=0,It=Mt-1;(Rt!==0||Ct<St)&&It!==-1;It--,Ct++)Rt+=rt*Tt[It]>>>0,Tt[It]=Rt%256>>>0,Rt=Rt/256>>>0;if(Rt!==0)throw new Error("Non-zero carry");St=Ct,_t++}if($t[_t]!==" "){for(var kt=Mt-St;kt!==Mt&&Tt[kt]===0;)kt++;for(var Dt=new Uint8Array(xt+(Mt-kt)),Bt=xt;kt!==Mt;)Dt[Bt++]=Tt[kt++];return Dt}}}function Et($t){var _t=bt($t);if(_t)return _t;throw new Error(`Non-${_} character`)}return{encode:yt,decodeUnsafe:bt,decode:Et}}var src3=base3,_brrp__multiformats_scope_baseX3=src3,base_x_default3=_brrp__multiformats_scope_baseX3,coerce3=a=>{if(a instanceof Uint8Array&&a.constructor.name==="Uint8Array")return a;if(a instanceof ArrayBuffer)return new Uint8Array(a);if(ArrayBuffer.isView(a))return new Uint8Array(a.buffer,a.byteOffset,a.byteLength);throw new Error("Unknown type, must be binary type")},fromString2=a=>new TextEncoder().encode(a),toString2=a=>new TextDecoder().decode(a),Encoder3=class{constructor(a,_,$){this.name=a,this.prefix=_,this.baseEncode=$}encode(a){if(a instanceof Uint8Array)return`${this.prefix}${this.baseEncode(a)}`;throw Error("Unknown type, must be binary type")}},Decoder3=class{constructor(a,_,$){if(this.name=a,this.prefix=_,_.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=_.codePointAt(0),this.baseDecode=$}decode(a){if(typeof a=="string"){if(a.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(a)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(a.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(a){return or3(this,a)}},ComposedDecoder3=class{constructor(a){this.decoders=a}or(a){return or3(this,a)}decode(a){const _=a[0],$=this.decoders[_];if($)return $.decode(a);throw RangeError(`Unable to decode multibase string ${JSON.stringify(a)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},or3=(a,_)=>new ComposedDecoder3({...a.decoders||{[a.prefix]:a},..._.decoders||{[_.prefix]:_}}),Codec3=class{constructor(a,_,$,j){this.name=a,this.prefix=_,this.baseEncode=$,this.baseDecode=j,this.encoder=new Encoder3(a,_,$),this.decoder=new Decoder3(a,_,j)}encode(a){return this.encoder.encode(a)}decode(a){return this.decoder.decode(a)}},from4=({name:a,prefix:_,encode:$,decode:j})=>new Codec3(a,_,$,j),baseX3=({prefix:a,name:_,alphabet:$})=>{const{encode:j,decode:_e}=base_x_default3($,_);return from4({prefix:a,name:_,encode:j,decode:et=>coerce3(_e(et))})},decode11=(a,_,$,j)=>{const _e={};for(let dt=0;dt<_.length;++dt)_e[_[dt]]=dt;let et=a.length;for(;a[et-1]==="=";)--et;const tt=new Uint8Array(et*$/8|0);let rt=0,at=0,ct=0;for(let dt=0;dt<et;++dt){const yt=_e[a[dt]];if(yt===void 0)throw new SyntaxError(`Non-${j} character`);at=at<<$|yt,rt+=$,rt>=8&&(rt-=8,tt[ct++]=255&at>>rt)}if(rt>=$||255&at<<8-rt)throw new SyntaxError("Unexpected end of data");return tt},encode7=(a,_,$)=>{const j=_[_.length-1]==="=",_e=(1<<$)-1;let et="",tt=0,rt=0;for(let at=0;at<a.length;++at)for(rt=rt<<8|a[at],tt+=8;tt>$;)tt-=$,et+=_[_e&rt>>tt];if(tt&&(et+=_[_e&rt<<$-tt]),j)for(;et.length*$&7;)et+="=";return et},rfc46483=({name:a,prefix:_,bitsPerChar:$,alphabet:j})=>from4({prefix:_,name:a,encode(_e){return encode7(_e,j,$)},decode(_e){return decode11(_e,j,$,a)}}),identity=from4({prefix:"\0",name:"identity",encode:a=>toString2(a),decode:a=>fromString2(a)}),base2_exports={};__export(base2_exports,{base2:()=>base22});var base22=rfc46483({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),base8_exports={};__export(base8_exports,{base8:()=>base8});var base8=rfc46483({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),base10_exports={};__export(base10_exports,{base10:()=>base10});var base10=baseX3({prefix:"9",name:"base10",alphabet:"0123456789"}),base16_exports={};__export(base16_exports,{base16:()=>base16,base16upper:()=>base16upper});var base16=rfc46483({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),base16upper=rfc46483({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),base32_exports={};__export(base32_exports,{base32:()=>base323,base32hex:()=>base32hex3,base32hexpad:()=>base32hexpad3,base32hexpadupper:()=>base32hexpadupper3,base32hexupper:()=>base32hexupper3,base32pad:()=>base32pad3,base32padupper:()=>base32padupper3,base32upper:()=>base32upper3,base32z:()=>base32z3});var base323=rfc46483({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),base32upper3=rfc46483({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),base32pad3=rfc46483({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),base32padupper3=rfc46483({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),base32hex3=rfc46483({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),base32hexupper3=rfc46483({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),base32hexpad3=rfc46483({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),base32hexpadupper3=rfc46483({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),base32z3=rfc46483({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),base36_exports={};__export(base36_exports,{base36:()=>base36,base36upper:()=>base36upper});var base36=baseX3({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),base36upper=baseX3({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),base58_exports={};__export(base58_exports,{base58btc:()=>base58btc3,base58flickr:()=>base58flickr3});var base58btc3=baseX3({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),base58flickr3=baseX3({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),base64_exports={};__export(base64_exports,{base64:()=>base64,base64pad:()=>base64pad,base64url:()=>base64url,base64urlpad:()=>base64urlpad});var base64=rfc46483({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),base64pad=rfc46483({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),base64url=rfc46483({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),base64urlpad=rfc46483({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),base256emoji_exports={};__export(base256emoji_exports,{base256emoji:()=>base256emoji});var alphabet=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),alphabetBytesToChars=alphabet.reduce((a,_,$)=>(a[$]=_,a),[]),alphabetCharsToBytes=alphabet.reduce((a,_,$)=>(a[_.codePointAt(0)]=$,a),[]);function encode8(a){return a.reduce((_,$)=>(_+=alphabetBytesToChars[$],_),"")}function decode12(a){const _=[];for(const $ of a){const j=alphabetCharsToBytes[$.codePointAt(0)];if(j===void 0)throw new Error(`Non-base256emoji character: ${$}`);_.push(j)}return new Uint8Array(_)}var base256emoji=from4({prefix:"🚀",name:"base256emoji",encode:encode8,decode:decode12}),sha2_exports={};__export(sha2_exports,{sha256:()=>sha2562,sha512:()=>sha5122});var import_crypto2=__toESM(requireCryptoBrowserify(),1),encode_13=encode9,MSB3=128,REST3=127,MSBALL3=~REST3,INT3=Math.pow(2,31);function encode9(a,_,$){_=_||[],$=$||0;for(var j=$;a>=INT3;)_[$++]=a&255|MSB3,a/=128;for(;a&MSBALL3;)_[$++]=a&255|MSB3,a>>>=7;return _[$]=a|0,encode9.bytes=$-j+1,_}var decode13=read3,MSB$13=128,REST$13=127;function read3(a,j){var $=0,j=j||0,_e=0,et=j,tt,rt=a.length;do{if(et>=rt)throw read3.bytes=0,new RangeError("Could not decode varint");tt=a[et++],$+=_e<28?(tt&REST$13)<<_e:(tt&REST$13)*Math.pow(2,_e),_e+=7}while(tt>=MSB$13);return read3.bytes=et-j,$}var N13=Math.pow(2,7),N23=Math.pow(2,14),N33=Math.pow(2,21),N43=Math.pow(2,28),N53=Math.pow(2,35),N63=Math.pow(2,42),N73=Math.pow(2,49),N83=Math.pow(2,56),N93=Math.pow(2,63),length3=function(a){return a<N13?1:a<N23?2:a<N33?3:a<N43?4:a<N53?5:a<N63?6:a<N73?7:a<N83?8:a<N93?9:10},varint3={encode:encode_13,decode:decode13,encodingLength:length3},_brrp_varint3=varint3,varint_default3=_brrp_varint3,encodeTo3=(a,_,$=0)=>(varint_default3.encode(a,_,$),_),encodingLength3=a=>varint_default3.encodingLength(a),create3=(a,_)=>{const $=_.byteLength,j=encodingLength3(a),_e=j+encodingLength3($),et=new Uint8Array(_e+$);return encodeTo3(a,et,0),encodeTo3($,et,j),et.set(_,_e),new Digest3(a,$,_,et)},Digest3=class{constructor(a,_,$,j){this.code=a,this.size=_,this.digest=$,this.bytes=j}},from5=({name:a,code:_,encode:$})=>new Hasher2(a,_,$),Hasher2=class{constructor(a,_,$){this.name=a,this.code=_,this.encode=$}digest(a){if(a instanceof Uint8Array){const _=this.encode(a);return _ instanceof Uint8Array?create3(this.code,_):_.then($=>create3(this.code,$))}else throw Error("Unknown type, must be binary type")}},sha2562=from5({name:"sha2-256",code:18,encode:a=>coerce3(import_crypto2.default.createHash("sha256").update(a).digest())}),sha5122=from5({name:"sha2-512",code:19,encode:a=>coerce3(import_crypto2.default.createHash("sha512").update(a).digest())}),identity_exports2={};__export(identity_exports2,{identity:()=>identity2});var code3=0,name3="identity",encode10=coerce3,digest=a=>create3(code3,encode10(a)),identity2={code:code3,name:name3,encode:encode10,digest};new TextEncoder,new TextDecoder;var bases={...identity_exports,...base2_exports,...base8_exports,...base10_exports,...base16_exports,...base32_exports,...base36_exports,...base58_exports,...base64_exports,...base256emoji_exports};({...sha2_exports,...identity_exports2});function createCodec2(a,_,$,j){return{name:a,prefix:_,encoder:{name:a,prefix:_,encode:$},decoder:{decode:j}}}var string=createCodec2("utf8","u",a=>"u"+new TextDecoder("utf8").decode(a),a=>new TextEncoder().encode(a.substring(1))),ascii=createCodec2("ascii","a",a=>{let _="a";for(let $=0;$<a.length;$++)_+=String.fromCharCode(a[$]);return _},a=>{a=a.substring(1);const _=allocUnsafe(a.length);for(let $=0;$<a.length;$++)_[$]=a.charCodeAt($);return _}),BASES={utf8:string,"utf-8":string,hex:bases.base16,latin1:ascii,ascii,binary:ascii,...bases},bases_default=BASES;function fromString3(a,_="utf8"){const $=bases_default[_];if($==null)throw new Error(`Unsupported encoding "${_}"`);return(_==="utf8"||_==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?asUint8Array(globalThis.Buffer.from(a,"utf-8")):$.decoder.decode(`${$.prefix}${a}`)}var defaultChunkValidator=()=>async function*(_){for await(const $ of _){if($.length===void 0)throw(0,import_err_code3.default)(new Error("Content was invalid"),"ERR_INVALID_CONTENT");if(typeof $=="string"||$ instanceof String)yield fromString3($.toString());else if(Array.isArray($))yield Uint8Array.from($);else if($ instanceof Uint8Array)yield $;else throw(0,import_err_code3.default)(new Error("Content was invalid"),"ERR_INVALID_CONTENT")}},DEFAULT_MAX_CHILDREN_PER_NODE=174;function balanced(a){const _=(a==null?void 0:a.maxChildrenPerNode)??DEFAULT_MAX_CHILDREN_PER_NODE;return async function $(j,_e){const et=[];for await(const tt of src_default(j,_))et.push(await _e(tt));return et.length>1?$(et,_e):et[0]}}var Dir=class{constructor(a,_){Dr(this,"options");Dr(this,"root");Dr(this,"dir");Dr(this,"path");Dr(this,"dirty");Dr(this,"flat");Dr(this,"parent");Dr(this,"parentKey");Dr(this,"unixfs");Dr(this,"mode");Dr(this,"mtime");Dr(this,"cid");Dr(this,"size");Dr(this,"nodeSize");this.options=_??{},this.root=a.root,this.dir=a.dir,this.path=a.path,this.dirty=a.dirty,this.flat=a.flat,this.parent=a.parent,this.parentKey=a.parentKey,this.unixfs=a.unixfs,this.mode=a.mode,this.mtime=a.mtime}},CID_V0=CID2.parse("QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn"),CID_V1=CID2.parse("zdj7WbTaiJT1fgatdet9Ei9iDB5hdCxkbVyhyh8YTUnXMiwYi"),DirFlat=class extends Dir{constructor(_,$){super(_,$);Dr(this,"_children");this._children=new Map}async put(_,$){this.cid=void 0,this.size=void 0,this.nodeSize=void 0,this._children.set(_,$)}async get(_){return Promise.resolve(this._children.get(_))}childCount(){return this._children.size}directChildrenCount(){return this.childCount()}onlyChild(){return this._children.values().next().value}async*eachChildSeries(){for(const[_,$]of this._children.entries())yield{key:_,child:$}}estimateNodeSize(){if(this.nodeSize!==void 0)return this.nodeSize;this.nodeSize=0;for(const[_,$]of this._children.entries())$.size!=null&&$.cid!=null&&(this.nodeSize+=_.length+(this.options.cidVersion===1?CID_V1.bytes.byteLength:CID_V0.bytes.byteLength));return this.nodeSize}async*flush(_){const $=[];for(const[at,ct]of this._children.entries()){let dt=ct;if(ct instanceof Dir)for await(const yt of ct.flush(_))dt=yt,yield yt;dt.size!=null&&dt.cid!=null&&$.push({Name:at,Tsize:Number(dt.size),Hash:dt.cid})}const j=new UnixFS({type:"directory",mtime:this.mtime,mode:this.mode}),_e={Data:j.marshal(),Links:$},et=encode3(prepare(_e)),tt=await persist(et,_,this.options),rt=et.length+_e.Links.reduce((at,ct)=>at+(ct.Tsize==null?0:ct.Tsize),0);this.cid=tt,this.size=rt,yield{cid:tt,unixfs:j,path:this.path,size:BigInt(rt)}}},from6=({name:a,code:_,encode:$})=>new Hasher3(a,_,$),Hasher3=class{constructor(a,_,$){this.name=a,this.code=_,this.encode=$}digest(a){if(a instanceof Uint8Array){const _=this.encode(a);return _ instanceof Uint8Array?create(this.code,_):_.then($=>create(this.code,$))}else throw Error("Unknown type, must be binary type")}},import_murmurhash3js_revisited=__toESM(require_murmurhash3js_revisited(),1),murmur3128=from6({name:"murmur3-128",code:34,encode:a=>bytes_exports.fromHex(import_murmurhash3js_revisited.default.x64.hash128(a))}),import_sparse_array=__toESM(require_sparse_array(),1),Bucket=class Os{constructor(_,$,j=0){this._options=_,this._popCount=0,this._parent=$,this._posAtParent=j,this._children=new import_sparse_array.default,this.key=null}async put(_,$){const j=await this._findNewBucketAndPos(_);await j.bucket._putAt(j,_,$)}async get(_){const $=await this._findChild(_);if($!=null)return $.value}async del(_){const $=await this._findPlace(_),j=$.bucket._at($.pos);j!=null&&j.key===_&&$.bucket._delAt($.pos)}leafCount(){return this._children.compactArray().reduce(($,j)=>j instanceof Os?$+j.leafCount():$+1,0)}childrenCount(){return this._children.length}onlyChild(){return this._children.get(0)}*eachLeafSeries(){const _=this._children.compactArray();for(const $ of _)$ instanceof Os?yield*$.eachLeafSeries():yield $}serialize(_,$){const j=[];return $(this._children.reduce((_e,et,tt)=>(et!=null&&(et instanceof Os?_e.push(et.serialize(_,$)):_e.push(_(et,tt))),_e),j))}async asyncTransform(_,$){return await asyncTransformBucket(this,_,$)}toJSON(){return this.serialize(mapNode,reduceNodes)}prettyPrint(){return JSON.stringify(this.toJSON(),null," ")}tableSize(){return Math.pow(2,this._options.bits)}async _findChild(_){const $=await this._findPlace(_),j=$.bucket._at($.pos);if(!(j instanceof Os)&&j!=null&&j.key===_)return j}async _findPlace(_){const $=this._options.hash(typeof _=="string"?fromString3(_):_),j=await $.take(this._options.bits),_e=this._children.get(j);return _e instanceof Os?await _e._findPlace($):{bucket:this,pos:j,hash:$,existingChild:_e}}async _findNewBucketAndPos(_){const $=await this._findPlace(_);if($.existingChild!=null&&$.existingChild.key!==_){const j=new Os(this._options,$.bucket,$.pos);$.bucket._putObjectAt($.pos,j);const _e=await j._findPlace($.existingChild.hash);return _e.bucket._putAt(_e,$.existingChild.key,$.existingChild.value),await j._findNewBucketAndPos($.hash)}return $}_putAt(_,$,j){this._putObjectAt(_.pos,{key:$,value:j,hash:_.hash})}_putObjectAt(_,$){this._children.get(_)==null&&this._popCount++,this._children.set(_,$)}_delAt(_){if(_===-1)throw new Error("Invalid position");this._children.get(_)!=null&&this._popCount--,this._children.unset(_),this._level()}_level(){if(this._parent!=null&&this._popCount<=1)if(this._popCount===1){const _=this._children.find(exists);if(_!=null&&!(_ instanceof Os)){const $=_.hash;$.untake(this._options.bits);const j={pos:this._posAtParent,hash:$,bucket:this._parent};this._parent._putAt(j,_.key,_.value)}}else this._parent._delAt(this._posAtParent)}_at(_){return this._children.get(_)}};function exists(a){return!!a}function mapNode(a,_){return a.key}function reduceNodes(a){return a}async function asyncTransformBucket(a,_,$){const j=[];for(const _e of a._children.compactArray())if(_e instanceof Bucket)await asyncTransformBucket(_e,_,$);else{const et=await _(_e);j.push({bitField:a._children.bitField(),children:et})}return await $(j)}var START_MASKS=[255,254,252,248,240,224,192,128],STOP_MASKS=[1,3,7,15,31,63,127,255],ConsumableBuffer=class{constructor(a){this._value=a,this._currentBytePos=a.length-1,this._currentBitPos=7}availableBits(){return this._currentBitPos+1+this._currentBytePos*8}totalBits(){return this._value.length*8}take(a){let _=a,$=0;for(;_>0&&this._haveBits();){const j=this._value[this._currentBytePos],_e=this._currentBitPos+1,et=Math.min(_e,_),tt=byteBitsToInt(j,_e-et,et);$=($<<et)+tt,_-=et,this._currentBitPos-=et,this._currentBitPos<0&&(this._currentBitPos=7,this._currentBytePos--)}return $}untake(a){for(this._currentBitPos+=a;this._currentBitPos>7;)this._currentBitPos-=8,this._currentBytePos+=1}_haveBits(){return this._currentBytePos>=0}};function byteBitsToInt(a,_,$){const j=maskFor(_,$);return(a&j)>>>_}function maskFor(a,_){return START_MASKS[a]&STOP_MASKS[Math.min(_+a-1,7)]}function wrapHash(a){function _($){return $ instanceof InfiniteHash?$:new InfiniteHash($,a)}return _}var InfiniteHash=class{constructor(a,_){if(!(a instanceof Uint8Array))throw new Error("can only hash Uint8Arrays");this._value=a,this._hashFn=_,this._depth=-1,this._availableBits=0,this._currentBufferIndex=0,this._buffers=[]}async take(a){let _=a;for(;this._availableBits<_;)await this._produceMoreBits();let $=0;for(;_>0;){const j=this._buffers[this._currentBufferIndex],_e=Math.min(j.availableBits(),_),et=j.take(_e);$=($<<_e)+et,_-=_e,this._availableBits-=_e,j.availableBits()===0&&this._currentBufferIndex++}return $}untake(a){let _=a;for(;_>0;){const $=this._buffers[this._currentBufferIndex],j=Math.min($.totalBits()-$.availableBits(),_);$.untake(j),_-=j,this._availableBits+=j,this._currentBufferIndex>0&&$.totalBits()===$.availableBits()&&(this._depth--,this._currentBufferIndex--)}}async _produceMoreBits(){this._depth++;const a=this._depth>0?concat([this._value,Uint8Array.from([this._depth])]):this._value,_=await this._hashFn(a),$=new ConsumableBuffer(_);this._buffers.push($),this._availableBits+=$.availableBits()}};function createHAMT(a){if(a==null||a.hashFn==null)throw new Error("please define an options.hashFn");const _={bits:a.bits??8,hash:wrapHash(a.hashFn)};return new Bucket(_)}async function hamtHashFn(a){return(await murmur3128.encode(a)).slice(0,8).reverse()}var HAMT_HASH_CODE=BigInt(34),DirSharded=class extends Dir{constructor(_,$){super(_,$);Dr(this,"_bucket");this._bucket=createHAMT({hashFn:hamtHashFn,bits:8})}async put(_,$){this.cid=void 0,this.size=void 0,this.nodeSize=void 0,await this._bucket.put(_,$)}async get(_){return this._bucket.get(_)}childCount(){return this._bucket.leafCount()}directChildrenCount(){return this._bucket.childrenCount()}onlyChild(){return this._bucket.onlyChild()}async*eachChildSeries(){for await(const{key:_,value:$}of this._bucket.eachLeafSeries())yield{key:_,child:$}}estimateNodeSize(){return this.nodeSize!==void 0?this.nodeSize:(this.nodeSize=calculateSize(this._bucket,this,this.options),this.nodeSize)}async*flush(_){for await(const $ of flush(this._bucket,_,this,this.options))yield{...$,path:this.path}}},dir_sharded_default=DirSharded;async function*flush(a,_,$,j){const _e=a._children,et=[];let tt=0n;for(let Et=0;Et<_e.length;Et++){const $t=_e.get(Et);if($t==null)continue;const _t=Et.toString(16).toUpperCase().padStart(2,"0");if($t instanceof Bucket){let xt;for await(const St of flush($t,_,null,j))xt=St;if(xt==null)throw new Error("Could not flush sharded directory, no subshard found");et.push({Name:_t,Tsize:Number(xt.size),Hash:xt.cid}),tt+=xt.size}else if(isDir($t.value)){const xt=$t.value;let St;for await(const Tt of xt.flush(_))St=Tt,yield St;if(St==null)throw new Error("Did not flush dir");const Mt=_t+$t.key;et.push({Name:Mt,Tsize:Number(St.size),Hash:St.cid}),tt+=St.size}else{const xt=$t.value;if(xt.cid==null)continue;const St=_t+$t.key,Mt=xt.size;et.push({Name:St,Tsize:Number(Mt),Hash:xt.cid}),tt+=BigInt(Mt??0)}}const rt=Uint8Array.from(_e.bitField().reverse()),at=new UnixFS({type:"hamt-sharded-directory",data:rt,fanout:BigInt(a.tableSize()),hashType:HAMT_HASH_CODE,mtime:$==null?void 0:$.mtime,mode:$==null?void 0:$.mode}),ct={Data:at.marshal(),Links:et},dt=encode3(prepare(ct)),yt=await persist(dt,_,j),bt=BigInt(dt.byteLength)+tt;yield{cid:yt,unixfs:at,size:bt}}function isDir(a){return typeof a.flush=="function"}function calculateSize(a,_,$){const j=a._children,_e=[];for(let at=0;at<j.length;at++){const ct=j.get(at);if(ct==null)continue;const dt=at.toString(16).toUpperCase().padStart(2,"0");if(ct instanceof Bucket){const yt=calculateSize(ct,null,$);_e.push({Name:dt,Tsize:Number(yt),Hash:$.cidVersion===0?CID_V0:CID_V1})}else if(typeof ct.value.flush=="function"){const bt=ct.value.nodeSize();_e.push({Name:dt+ct.key,Tsize:Number(bt),Hash:$.cidVersion===0?CID_V0:CID_V1})}else{const yt=ct.value;if(yt.cid==null)continue;const bt=dt+ct.key,Et=yt.size;_e.push({Name:bt,Tsize:Number(Et),Hash:yt.cid})}}const et=Uint8Array.from(j.bitField().reverse()),tt=new UnixFS({type:"hamt-sharded-directory",data:et,fanout:BigInt(a.tableSize()),hashType:HAMT_HASH_CODE,mtime:_==null?void 0:_.mtime,mode:_==null?void 0:_.mode});return encode3(prepare({Data:tt.marshal(),Links:_e})).length}async function flatToShard(a,_,$,j){let _e=_;_ instanceof DirFlat&&_.estimateNodeSize()>$&&(_e=await convertToShard(_,j));const et=_e.parent;if(et!=null){if(_e!==_){if(a!=null&&(a.parent=_e),_e.parentKey==null)throw new Error("No parent key found");await et.put(_e.parentKey,_e)}return flatToShard(_e,et,$,j)}return _e}async function convertToShard(a,_){const $=new dir_sharded_default({root:a.root,dir:!0,parent:a.parent,parentKey:a.parentKey,path:a.path,dirty:a.dirty,flat:!1,mtime:a.mtime,mode:a.mode},_);for await(const{key:j,child:_e}of a.eachChildSeries())await $.put(j,_e);return $}var toPathComponents=(a="")=>(a.trim().match(/([^\\/]|\\\/)+/g)??[]).filter(Boolean);async function addToTree(a,_,$){var rt,at;const j=toPathComponents(a.path??""),_e=j.length-1;let et=_,tt="";for(let ct=0;ct<j.length;ct++){const dt=j[ct];tt+=`${tt!==""?"/":""}${dt}`;const yt=ct===_e;if(et.dirty=!0,et.cid=void 0,et.size=void 0,yt)await et.put(dt,a),_=await flatToShard(null,et,$.shardSplitThresholdBytes,$);else{let bt=await et.get(dt);(bt==null||!(bt instanceof Dir))&&(bt=new DirFlat({root:!1,dir:!0,parent:et,parentKey:dt,path:tt,dirty:!0,flat:!0,mtime:(rt=bt==null?void 0:bt.unixfs)==null?void 0:rt.mtime,mode:(at=bt==null?void 0:bt.unixfs)==null?void 0:at.mode},$)),await et.put(dt,bt),et=bt}}return _}async function*flushAndYield(a,_){var $;if(!(a instanceof Dir)){(($=a.unixfs)==null?void 0:$.isDirectory())===!0&&(yield a);return}yield*a.flush(_)}function defaultTreeBuilder(a){return async function*($,j){let _e=new DirFlat({root:!0,dir:!0,path:"",dirty:!0,flat:!0},a),et,tt=!1;for await(const rt of $){if(rt==null)continue;const at=`${rt.originalPath??""}`.split("/")[0];at!=null&&at!==""&&(et==null?(et=at,tt=!0):et!==at&&(tt=!1)),_e=await addToTree(rt,_e,a),(rt.unixfs==null||!rt.unixfs.isDirectory())&&(yield rt)}if(a.wrapWithDirectory||tt&&_e.childCount()>1)yield*flushAndYield(_e,j);else for await(const rt of _e.eachChildSeries())rt!=null&&(yield*flushAndYield(rt.child,j))}}async function*importer(a,_,$={}){let j;Symbol.asyncIterator in a||Symbol.iterator in a?j=a:j=[a];const _e=$.wrapWithDirectory??!1,et=$.shardSplitThresholdBytes??262144,tt=$.cidVersion??1,rt=$.rawLeaves??!0,at=$.leafType??"file",ct=$.fileImportConcurrency??50,dt=$.blockWriteConcurrency??10,yt=$.reduceSingleLeafToSelf??!0,bt=$.chunker??fixedSize(),Et=$.chunkValidator??defaultChunkValidator(),$t=$.dagBuilder??defaultDagBuilder({chunker:bt,chunkValidator:Et,wrapWithDirectory:_e,layout:$.layout??balanced(),bufferImporter:$.bufferImporter??defaultBufferImporter({cidVersion:tt,rawLeaves:rt,leafType:at,onProgress:$.onProgress}),blockWriteConcurrency:dt,reduceSingleLeafToSelf:yt,cidVersion:tt,onProgress:$.onProgress}),_t=$.treeBuilder??defaultTreeBuilder({wrapWithDirectory:_e,shardSplitThresholdBytes:et,cidVersion:tt,onProgress:$.onProgress});for await(const xt of _t(parallelBatch($t(j,_),ct),_))yield{cid:xt.cid,path:xt.path,unixfs:xt.unixfs,size:xt.size}}var errors_exports={};__export(errors_exports,{abortedError:()=>abortedError,closeFailedError:()=>closeFailedError,deleteFailedError:()=>deleteFailedError,getFailedError:()=>getFailedError,hasFailedError:()=>hasFailedError,notFoundError:()=>notFoundError,openFailedError:()=>openFailedError,putFailedError:()=>putFailedError});var import_err_code5=__toESM(require_err_code(),1);function openFailedError(a){return a=a??new Error("Open failed"),(0,import_err_code5.default)(a,"ERR_OPEN_FAILED")}function closeFailedError(a){return a=a??new Error("Close failed"),(0,import_err_code5.default)(a,"ERR_CLOSE_FAILED")}function putFailedError(a){return a=a??new Error("Put failed"),(0,import_err_code5.default)(a,"ERR_PUT_FAILED")}function getFailedError(a){return a=a??new Error("Get failed"),(0,import_err_code5.default)(a,"ERR_GET_FAILED")}function deleteFailedError(a){return a=a??new Error("Delete failed"),(0,import_err_code5.default)(a,"ERR_DELETE_FAILED")}function hasFailedError(a){return a=a??new Error("Has failed"),(0,import_err_code5.default)(a,"ERR_HAS_FAILED")}function notFoundError(a){return a=a??new Error("Not Found"),(0,import_err_code5.default)(a,"ERR_NOT_FOUND")}function abortedError(a){return a=a??new Error("Aborted"),(0,import_err_code5.default)(a,"ERR_ABORTED")}var BaseBlockstore=class{has(a,_){return Promise.reject(new Error(".has is not implemented"))}put(a,_,$){return Promise.reject(new Error(".put is not implemented"))}async*putMany(a,_){for await(const{cid:$,block:j}of a)await this.put($,j,_),yield $}get(a,_){return Promise.reject(new Error(".get is not implemented"))}async*getMany(a,_){for await(const $ of a)yield{cid:$,block:await this.get($,_)}}async delete(a,_){await Promise.reject(new Error(".delete is not implemented"))}async*deleteMany(a,_){for await(const $ of a)await this.delete($,_),yield $}async*getAll(a){throw new Error(".getAll is not implemented")}};function base4(a,_){if(a.length>=255)throw new TypeError("Alphabet too long");for(var $=new Uint8Array(256),j=0;j<$.length;j++)$[j]=255;for(var _e=0;_e<a.length;_e++){var et=a.charAt(_e),tt=et.charCodeAt(0);if($[tt]!==255)throw new TypeError(et+" is ambiguous");$[tt]=_e}var rt=a.length,at=a.charAt(0),ct=Math.log(rt)/Math.log(256),dt=Math.log(256)/Math.log(rt);function yt($t){if($t instanceof Uint8Array||(ArrayBuffer.isView($t)?$t=new Uint8Array($t.buffer,$t.byteOffset,$t.byteLength):Array.isArray($t)&&($t=Uint8Array.from($t))),!($t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if($t.length===0)return"";for(var _t=0,xt=0,St=0,Mt=$t.length;St!==Mt&&$t[St]===0;)St++,_t++;for(var Tt=(Mt-St)*dt+1>>>0,Rt=new Uint8Array(Tt);St!==Mt;){for(var Ct=$t[St],It=0,kt=Tt-1;(Ct!==0||It<xt)&&kt!==-1;kt--,It++)Ct+=256*Rt[kt]>>>0,Rt[kt]=Ct%rt>>>0,Ct=Ct/rt>>>0;if(Ct!==0)throw new Error("Non-zero carry");xt=It,St++}for(var Dt=Tt-xt;Dt!==Tt&&Rt[Dt]===0;)Dt++;for(var Bt=at.repeat(_t);Dt<Tt;++Dt)Bt+=a.charAt(Rt[Dt]);return Bt}function bt($t){if(typeof $t!="string")throw new TypeError("Expected String");if($t.length===0)return new Uint8Array;var _t=0;if($t[_t]!==" "){for(var xt=0,St=0;$t[_t]===at;)xt++,_t++;for(var Mt=($t.length-_t)*ct+1>>>0,Tt=new Uint8Array(Mt);$t[_t];){var Rt=$[$t.charCodeAt(_t)];if(Rt===255)return;for(var Ct=0,It=Mt-1;(Rt!==0||Ct<St)&&It!==-1;It--,Ct++)Rt+=rt*Tt[It]>>>0,Tt[It]=Rt%256>>>0,Rt=Rt/256>>>0;if(Rt!==0)throw new Error("Non-zero carry");St=Ct,_t++}if($t[_t]!==" "){for(var kt=Mt-St;kt!==Mt&&Tt[kt]===0;)kt++;for(var Dt=new Uint8Array(xt+(Mt-kt)),Bt=xt;kt!==Mt;)Dt[Bt++]=Tt[kt++];return Dt}}}function Et($t){var _t=bt($t);if(_t)return _t;throw new Error(`Non-${_} character`)}return{encode:yt,decodeUnsafe:bt,decode:Et}}var src4=base4,_brrp__multiformats_scope_baseX4=src4,base_x_default4=_brrp__multiformats_scope_baseX4,equals8=(a,_)=>{if(a===_)return!0;if(a.byteLength!==_.byteLength)return!1;for(let $=0;$<a.byteLength;$++)if(a[$]!==_[$])return!1;return!0},coerce4=a=>{if(a instanceof Uint8Array&&a.constructor.name==="Uint8Array")return a;if(a instanceof ArrayBuffer)return new Uint8Array(a);if(ArrayBuffer.isView(a))return new Uint8Array(a.buffer,a.byteOffset,a.byteLength);throw new Error("Unknown type, must be binary type")},Encoder4=class{constructor(a,_,$){this.name=a,this.prefix=_,this.baseEncode=$}encode(a){if(a instanceof Uint8Array)return`${this.prefix}${this.baseEncode(a)}`;throw Error("Unknown type, must be binary type")}},Decoder4=class{constructor(a,_,$){if(this.name=a,this.prefix=_,_.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=_.codePointAt(0),this.baseDecode=$}decode(a){if(typeof a=="string"){if(a.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(a)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(a.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(a){return or4(this,a)}},ComposedDecoder4=class{constructor(a){this.decoders=a}or(a){return or4(this,a)}decode(a){const _=a[0],$=this.decoders[_];if($)return $.decode(a);throw RangeError(`Unable to decode multibase string ${JSON.stringify(a)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},or4=(a,_)=>new ComposedDecoder4({...a.decoders||{[a.prefix]:a},..._.decoders||{[_.prefix]:_}}),Codec4=class{constructor(a,_,$,j){this.name=a,this.prefix=_,this.baseEncode=$,this.baseDecode=j,this.encoder=new Encoder4(a,_,$),this.decoder=new Decoder4(a,_,j)}encode(a){return this.encoder.encode(a)}decode(a){return this.decoder.decode(a)}},from7=({name:a,prefix:_,encode:$,decode:j})=>new Codec4(a,_,$,j),baseX4=({prefix:a,name:_,alphabet:$})=>{const{encode:j,decode:_e}=base_x_default4($,_);return from7({prefix:a,name:_,encode:j,decode:et=>coerce4(_e(et))})},decode16=(a,_,$,j)=>{const _e={};for(let dt=0;dt<_.length;++dt)_e[_[dt]]=dt;let et=a.length;for(;a[et-1]==="=";)--et;const tt=new Uint8Array(et*$/8|0);let rt=0,at=0,ct=0;for(let dt=0;dt<et;++dt){const yt=_e[a[dt]];if(yt===void 0)throw new SyntaxError(`Non-${j} character`);at=at<<$|yt,rt+=$,rt>=8&&(rt-=8,tt[ct++]=255&at>>rt)}if(rt>=$||255&at<<8-rt)throw new SyntaxError("Unexpected end of data");return tt},encode11=(a,_,$)=>{const j=_[_.length-1]==="=",_e=(1<<$)-1;let et="",tt=0,rt=0;for(let at=0;at<a.length;++at)for(rt=rt<<8|a[at],tt+=8;tt>$;)tt-=$,et+=_[_e&rt>>tt];if(tt&&(et+=_[_e&rt<<$-tt]),j)for(;et.length*$&7;)et+="=";return et},rfc46484=({name:a,prefix:_,bitsPerChar:$,alphabet:j})=>from7({prefix:_,name:a,encode(_e){return encode11(_e,j,$)},decode(_e){return decode16(_e,j,$,a)}}),base324=rfc46484({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5});rfc46484({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),rfc46484({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),rfc46484({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),rfc46484({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),rfc46484({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),rfc46484({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),rfc46484({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),rfc46484({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var encode_14=encode12,MSB4=128,REST4=127,MSBALL4=~REST4,INT4=Math.pow(2,31);function encode12(a,_,$){_=_||[],$=$||0;for(var j=$;a>=INT4;)_[$++]=a&255|MSB4,a/=128;for(;a&MSBALL4;)_[$++]=a&255|MSB4,a>>>=7;return _[$]=a|0,encode12.bytes=$-j+1,_}var decode17=read4,MSB$14=128,REST$14=127;function read4(a,j){var $=0,j=j||0,_e=0,et=j,tt,rt=a.length;do{if(et>=rt)throw read4.bytes=0,new RangeError("Could not decode varint");tt=a[et++],$+=_e<28?(tt&REST$14)<<_e:(tt&REST$14)*Math.pow(2,_e),_e+=7}while(tt>=MSB$14);return read4.bytes=et-j,$}var N14=Math.pow(2,7),N24=Math.pow(2,14),N34=Math.pow(2,21),N44=Math.pow(2,28),N54=Math.pow(2,35),N64=Math.pow(2,42),N74=Math.pow(2,49),N84=Math.pow(2,56),N94=Math.pow(2,63),length4=function(a){return a<N14?1:a<N24?2:a<N34?3:a<N44?4:a<N54?5:a<N64?6:a<N74?7:a<N84?8:a<N94?9:10},varint4={encode:encode_14,decode:decode17,encodingLength:length4},_brrp_varint4=varint4,varint_default4=_brrp_varint4,decode18=(a,_=0)=>[varint_default4.decode(a,_),varint_default4.decode.bytes],encodeTo4=(a,_,$=0)=>(varint_default4.encode(a,_,$),_),encodingLength4=a=>varint_default4.encodingLength(a),create4=(a,_)=>{const $=_.byteLength,j=encodingLength4(a),_e=j+encodingLength4($),et=new Uint8Array(_e+$);return encodeTo4(a,et,0),encodeTo4($,et,j),et.set(_,_e),new Digest4(a,$,_,et)},decode19=a=>{const _=coerce4(a),[$,j]=decode18(_),[_e,et]=decode18(_.subarray(j)),tt=_.subarray(j+et);if(tt.byteLength!==_e)throw new Error("Incorrect length");return new Digest4($,_e,tt,_)},equals9=(a,_)=>{if(a===_)return!0;{const $=_;return a.code===$.code&&a.size===$.size&&$.bytes instanceof Uint8Array&&equals8(a.bytes,$.bytes)}},Digest4=class{constructor(a,_,$,j){this.code=a,this.size=_,this.digest=$,this.bytes=j}},base58btc4=baseX4({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"});baseX4({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var format4=(a,_)=>{const{bytes:$,version:j}=a;switch(j){case 0:return toStringV04($,baseCache4(a),_||base58btc4.encoder);default:return toStringV14($,baseCache4(a),_||base324.encoder)}},cache4=new WeakMap,baseCache4=a=>{const _=cache4.get(a);if(_==null){const $=new Map;return cache4.set(a,$),$}return _},CID4=class _o{constructor(_,$,j,_e){this.code=$,this.version=_,this.multihash=j,this.bytes=_e,this["/"]=_e}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{const{code:_,multihash:$}=this;if(_!==DAG_PB_CODE4)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if($.code!==SHA_256_CODE4)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return _o.createV0($)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{const{code:_,digest:$}=this.multihash,j=create4(_,$);return _o.createV1(this.code,j)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(_){return _o.equals(this,_)}static equals(_,$){const j=$;return j&&_.code===j.code&&_.version===j.version&&equals9(_.multihash,j.multihash)}toString(_){return format4(this,_)}toJSON(){return{"/":format4(this)}}link(){return this}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(_){if(_==null)return null;const $=_;if($ instanceof _o)return $;if($["/"]!=null&&$["/"]===$.bytes||$.asCID===$){const{version:j,code:_e,multihash:et,bytes:tt}=$;return new _o(j,_e,et,tt||encodeCID4(j,_e,et.bytes))}else if($[cidSymbol4]===!0){const{version:j,multihash:_e,code:et}=$,tt=decode19(_e);return _o.create(j,et,tt)}else return null}static create(_,$,j){if(typeof $!="number")throw new Error("String codecs are no longer supported");if(!(j.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(_){case 0:{if($!==DAG_PB_CODE4)throw new Error(`Version 0 CID must use dag-pb (code: ${DAG_PB_CODE4}) block encoding`);return new _o(_,$,j,j.bytes)}case 1:{const _e=encodeCID4(_,$,j.bytes);return new _o(_,$,j,_e)}default:throw new Error("Invalid version")}}static createV0(_){return _o.create(0,DAG_PB_CODE4,_)}static createV1(_,$){return _o.create(1,_,$)}static decode(_){const[$,j]=_o.decodeFirst(_);if(j.length)throw new Error("Incorrect length");return $}static decodeFirst(_){const $=_o.inspectBytes(_),j=$.size-$.multihashSize,_e=coerce4(_.subarray(j,j+$.multihashSize));if(_e.byteLength!==$.multihashSize)throw new Error("Incorrect length");const et=_e.subarray($.multihashSize-$.digestSize),tt=new Digest4($.multihashCode,$.digestSize,et,_e);return[$.version===0?_o.createV0(tt):_o.createV1($.codec,tt),_.subarray($.size)]}static inspectBytes(_){let $=0;const j=()=>{const[yt,bt]=decode18(_.subarray($));return $+=bt,yt};let _e=j(),et=DAG_PB_CODE4;if(_e===18?(_e=0,$=0):et=j(),_e!==0&&_e!==1)throw new RangeError(`Invalid CID version ${_e}`);const tt=$,rt=j(),at=j(),ct=$+at,dt=ct-tt;return{version:_e,codec:et,multihashCode:rt,digestSize:at,multihashSize:dt,size:ct}}static parse(_,$){const[j,_e]=parseCIDtoBytes4(_,$),et=_o.decode(_e);if(et.version===0&&_[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return baseCache4(et).set(j,_),et}},parseCIDtoBytes4=(a,_)=>{switch(a[0]){case"Q":{const $=_||base58btc4;return[base58btc4.prefix,$.decode(`${base58btc4.prefix}${a}`)]}case base58btc4.prefix:{const $=_||base58btc4;return[base58btc4.prefix,$.decode(a)]}case base324.prefix:{const $=_||base324;return[base324.prefix,$.decode(a)]}default:{if(_==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[a[0],_.decode(a)]}}},toStringV04=(a,_,$)=>{const{prefix:j}=$;if(j!==base58btc4.prefix)throw Error(`Cannot string encode V0 in ${$.name} encoding`);const _e=_.get(j);if(_e==null){const et=$.encode(a).slice(1);return _.set(j,et),et}else return _e},toStringV14=(a,_,$)=>{const{prefix:j}=$,_e=_.get(j);if(_e==null){const et=$.encode(a);return _.set(j,et),et}else return _e},DAG_PB_CODE4=112,SHA_256_CODE4=18,encodeCID4=(a,_,$)=>{const j=encodingLength4(a),_e=j+encodingLength4(_),et=new Uint8Array(_e+$.byteLength);return encodeTo4(a,et,0),encodeTo4(_,et,j),et.set($,_e),et},cidSymbol4=Symbol.for("@ipld/js-cid/CID"),code4=85,MemoryBlockstore=class extends BaseBlockstore{constructor(){super();Dr(this,"data");this.data=new Map}put(_,$){return this.data.set(base324.encode(_.multihash.bytes),$),_}get(_){const $=this.data.get(base324.encode(_.multihash.bytes));if($==null)throw notFoundError();return $}has(_){return this.data.has(base324.encode(_.multihash.bytes))}async delete(_){this.data.delete(base324.encode(_.multihash.bytes))}async*getAll(){for(const[_,$]of this.data.entries())yield{cid:CID4.createV1(code4,decode19(base324.decode(_))),block:$}}};({...errors_exports});async function hashV0(a){const _=import_crypto3.default.createHash("sha256");if(a instanceof Uint8Array)_.update(a);else if(Symbol.asyncIterator in a)for await(const $ of a)_.update($);else throw new Error("Invalid value provided to hashStreamV0. Expected AsyncGenerator<Uint8Array> | AsyncIterable<Uint8Array> | Uint8Array");return CID.createV0(create(18,_.digest())).toString()}async function hashV1(a){const _=new MemoryBlockstore;let $;async function*j(){yield a}if(a instanceof Uint8Array)for await(const{cid:_e}of importer([{content:j()}],_,{cidVersion:1,rawLeaves:!0}))$=_e;else if(Symbol.asyncIterator in a)for await(const{cid:_e}of importer([{content:a}],_,{cidVersion:1,rawLeaves:!0}))$=_e;else throw new Error("Invalid value provided to hashStreamV1. Expected AsyncGenerator<Uint8Array> | AsyncIterable<Uint8Array> | Uint8Array");return`${$}`}function sortKeys(a,_){return compareStrings(a.hash,_.hash)||compareStrings(a.file,_.file)||0}function compareStrings(a,_){if(a===_)return 0;for(let $=0;$<Math.max(a.length,_.length);$++){if(a.charAt($)>_.charAt($))return 1;if(a.charAt($)<_.charAt($))return-1}return a.length>_.length?1:-1}function prepareADR32Data(a,_){return new TextEncoder().encode(JSON.stringify({content:a.sort(sortKeys).map($=>({key:$.file,hash:$.hash})),metadata:_}))}async function calculateMultipleHashesADR32(a,_){const $=prepareADR32Data(a,_);return{data:$,hash:await hashV1($)}}async function calculateMultipleHashesADR32LegacyQmHash(a,_){const $=prepareADR32Data(a,_);return{data:$,hash:await hashV0($)}}function number(a){if(!Number.isSafeInteger(a)||a<0)throw new Error(`Wrong positive integer: ${a}`)}function bool(a){if(typeof a!="boolean")throw new Error(`Expected boolean, not ${a}`)}function bytes(a,..._){if(!(a instanceof Uint8Array))throw new Error("Expected Uint8Array");if(_.length>0&&!_.includes(a.length))throw new Error(`Expected Uint8Array of length ${_}, not of length=${a.length}`)}function hash(a){if(typeof a!="function"||typeof a.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");number(a.outputLen),number(a.blockLen)}function exists2(a,_=!0){if(a.destroyed)throw new Error("Hash instance has been destroyed");if(_&&a.finished)throw new Error("Hash#digest() has already been called")}function output(a,_){bytes(a);const $=_.outputLen;if(a.length<$)throw new Error(`digestInto() expects output buffer of length at least ${$}`)}var assert={number,bool,bytes,hash,exists:exists2,output},assert_default=assert,U32_MASK64=BigInt(2**32-1),_32n=BigInt(32);function fromBig(a,_=!1){return _?{h:Number(a&U32_MASK64),l:Number(a>>_32n&U32_MASK64)}:{h:Number(a>>_32n&U32_MASK64)|0,l:Number(a&U32_MASK64)|0}}function split(a,_=!1){let $=new Uint32Array(a.length),j=new Uint32Array(a.length);for(let _e=0;_e<a.length;_e++){const{h:et,l:tt}=fromBig(a[_e],_);[$[_e],j[_e]]=[et,tt]}return[$,j]}var toBig=(a,_)=>BigInt(a>>>0)<<_32n|BigInt(_>>>0),shrSH=(a,_,$)=>a>>>$,shrSL=(a,_,$)=>a<<32-$|_>>>$,rotrSH=(a,_,$)=>a>>>$|_<<32-$,rotrSL=(a,_,$)=>a<<32-$|_>>>$,rotrBH=(a,_,$)=>a<<64-$|_>>>$-32,rotrBL=(a,_,$)=>a>>>$-32|_<<64-$,rotr32H=(a,_)=>_,rotr32L=(a,_)=>a,rotlSH=(a,_,$)=>a<<$|_>>>32-$,rotlSL=(a,_,$)=>_<<$|a>>>32-$,rotlBH=(a,_,$)=>_<<$-32|a>>>64-$,rotlBL=(a,_,$)=>a<<$-32|_>>>64-$;function add(a,_,$,j){const _e=(_>>>0)+(j>>>0);return{h:a+$+(_e/2**32|0)|0,l:_e|0}}var add3L=(a,_,$)=>(a>>>0)+(_>>>0)+($>>>0),add3H=(a,_,$,j)=>_+$+j+(a/2**32|0)|0,add4L=(a,_,$,j)=>(a>>>0)+(_>>>0)+($>>>0)+(j>>>0),add4H=(a,_,$,j,_e)=>_+$+j+_e+(a/2**32|0)|0,add5L=(a,_,$,j,_e)=>(a>>>0)+(_>>>0)+($>>>0)+(j>>>0)+(_e>>>0),add5H=(a,_,$,j,_e,et)=>_+$+j+_e+et+(a/2**32|0)|0,u64={fromBig,split,toBig,shrSH,shrSL,rotrSH,rotrSL,rotrBH,rotrBL,rotr32H,rotr32L,rotlSH,rotlSL,rotlBH,rotlBL,add,add3L,add3H,add4L,add4H,add5H,add5L},u64_default=u64,u8a=a=>a instanceof Uint8Array,u32=a=>new Uint32Array(a.buffer,a.byteOffset,Math.floor(a.byteLength/4)),isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!isLE)throw new Error("Non little-endian hardware is not supported");var hexes=Array.from({length:256},(a,_)=>_.toString(16).padStart(2,"0"));function bytesToHex(a){if(!u8a(a))throw new Error("Uint8Array expected");let _="";for(let $=0;$<a.length;$++)_+=hexes[a[$]];return _}function utf8ToBytes(a){if(typeof a!="string")throw new Error(`utf8ToBytes expected string, got ${typeof a}`);return new Uint8Array(new TextEncoder().encode(a))}function toBytes(a){if(typeof a=="string"&&(a=utf8ToBytes(a)),!u8a(a))throw new Error(`expected Uint8Array, got ${typeof a}`);return a}var Hash=class{clone(){return this._cloneInto()}};function wrapConstructor(a){const _=j=>a().update(toBytes(j)).digest(),$=a();return _.outputLen=$.outputLen,_.blockLen=$.blockLen,_.create=()=>a(),_}function wrapXOFConstructorWithOpts(a){const _=(j,_e)=>a(_e).update(toBytes(j)).digest(),$=a({});return _.outputLen=$.outputLen,_.blockLen=$.blockLen,_.create=j=>a(j),_}var[SHA3_PI,SHA3_ROTL,_SHA3_IOTA]=[[],[],[]],_0n=BigInt(0),_1n=BigInt(1),_2n=BigInt(2),_7n=BigInt(7),_256n=BigInt(256),_0x71n=BigInt(113);for(let a=0,_=_1n,$=1,j=0;a<24;a++){[$,j]=[j,(2*$+3*j)%5],SHA3_PI.push(2*(5*j+$)),SHA3_ROTL.push((a+1)*(a+2)/2%64);let _e=_0n;for(let et=0;et<7;et++)_=(_<<_1n^(_>>_7n)*_0x71n)%_256n,_&_2n&&(_e^=_1n<<(_1n<<BigInt(et))-_1n);_SHA3_IOTA.push(_e)}var[SHA3_IOTA_H,SHA3_IOTA_L]=u64_default.split(_SHA3_IOTA,!0),rotlH=(a,_,$)=>$>32?u64_default.rotlBH(a,_,$):u64_default.rotlSH(a,_,$),rotlL=(a,_,$)=>$>32?u64_default.rotlBL(a,_,$):u64_default.rotlSL(a,_,$);function keccakP(a,_=24){const $=new Uint32Array(10);for(let j=24-_;j<24;j++){for(let tt=0;tt<10;tt++)$[tt]=a[tt]^a[tt+10]^a[tt+20]^a[tt+30]^a[tt+40];for(let tt=0;tt<10;tt+=2){const rt=(tt+8)%10,at=(tt+2)%10,ct=$[at],dt=$[at+1],yt=rotlH(ct,dt,1)^$[rt],bt=rotlL(ct,dt,1)^$[rt+1];for(let Et=0;Et<50;Et+=10)a[tt+Et]^=yt,a[tt+Et+1]^=bt}let _e=a[2],et=a[3];for(let tt=0;tt<24;tt++){const rt=SHA3_ROTL[tt],at=rotlH(_e,et,rt),ct=rotlL(_e,et,rt),dt=SHA3_PI[tt];_e=a[dt],et=a[dt+1],a[dt]=at,a[dt+1]=ct}for(let tt=0;tt<50;tt+=10){for(let rt=0;rt<10;rt++)$[rt]=a[tt+rt];for(let rt=0;rt<10;rt++)a[tt+rt]^=~$[(rt+2)%10]&$[(rt+4)%10]}a[0]^=SHA3_IOTA_H[j],a[1]^=SHA3_IOTA_L[j]}$.fill(0)}var Keccak=class M0 extends Hash{constructor(_,$,j,_e=!1,et=24){if(super(),this.blockLen=_,this.suffix=$,this.outputLen=j,this.enableXOF=_e,this.rounds=et,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,assert_default.number(j),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=u32(this.state)}keccak(){keccakP(this.state32,this.rounds),this.posOut=0,this.pos=0}update(_){assert_default.exists(this);const{blockLen:$,state:j}=this;_=toBytes(_);const _e=_.length;for(let et=0;et<_e;){const tt=Math.min($-this.pos,_e-et);for(let rt=0;rt<tt;rt++)j[this.pos++]^=_[et++];this.pos===$&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:_,suffix:$,pos:j,blockLen:_e}=this;_[j]^=$,$&128&&j===_e-1&&this.keccak(),_[_e-1]^=128,this.keccak()}writeInto(_){assert_default.exists(this,!1),assert_default.bytes(_),this.finish();const $=this.state,{blockLen:j}=this;for(let _e=0,et=_.length;_e<et;){this.posOut>=j&&this.keccak();const tt=Math.min(j-this.posOut,et-_e);_.set($.subarray(this.posOut,this.posOut+tt),_e),this.posOut+=tt,_e+=tt}return _}xofInto(_){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(_)}xof(_){return assert_default.number(_),this.xofInto(new Uint8Array(_))}digestInto(_){if(assert_default.output(_,this),this.finished)throw new Error("digest() was already called");return this.writeInto(_),this.destroy(),_}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(_){const{blockLen:$,suffix:j,outputLen:_e,rounds:et,enableXOF:tt}=this;return _||(_=new M0($,j,_e,tt,et)),_.state32.set(this.state32),_.pos=this.pos,_.posOut=this.posOut,_.finished=this.finished,_.rounds=et,_.suffix=j,_.outputLen=_e,_.enableXOF=tt,_.destroyed=this.destroyed,_}},gen=(a,_,$)=>wrapConstructor(()=>new Keccak(_,a,$));gen(6,144,224/8),gen(6,136,256/8),gen(6,104,384/8),gen(6,72,512/8),gen(1,144,224/8);var keccak_256=gen(1,136,256/8);gen(1,104,384/8),gen(1,72,512/8);var genShake=(a,_,$)=>wrapXOFConstructorWithOpts((j={})=>new Keccak(_,a,j.dkLen===void 0?$:j.dkLen,!0));genShake(31,168,128/8),genShake(31,136,256/8);function wrapHash2(a){return _=>(assert_default.bytes(_),a(_))}(()=>{const a=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0,_=typeof commonjsRequire=="function"&&commonjsRequire.bind(module);return{node:_&&!a?_("crypto"):void 0,web:a}})();var keccak256=(()=>{const a=wrapHash2(keccak_256);return a.create=keccak_256.create,a})();function keccak256Hash(a,_){const $=JSON.stringify(pick(a,_)),j=new TextEncoder().encode($),_e=keccak256(j);return bytesToHex(_e)}var pick=(a,_)=>Object.fromEntries(_.filter($=>$ in a).map($=>[$,a[$]]));/*! Bundled license information:
136
136
 
137
137
  @noble/hashes/esm/utils.js:
138
138
  (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
@@ -141,7 +141,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
141
141
  `)));return{entity:ct,entityFile:rt}}DeploymentBuilder.buildEntityAndFile=buildEntityAndFile;async function buildEntity({type:a,pointers:_,files:$,metadata:j,timestamp:_e}){const et=Array.from($||[]).map(([ct,dt])=>({key:ct,content:dt})),tt=await Promise.all(et.map(async({key:ct,content:dt})=>({key:ct,content:dt,hash:await(0,hashing_1.hashV1)(dt)}))),rt=new Map(tt.map(({hash:ct,key:dt})=>[dt,ct])),at=new Map(tt.map(({hash:ct,content:dt})=>[ct,dt]));return buildEntityInternal(a,_,{hashesByKey:rt,filesByHash:at,metadata:j,timestamp:_e})}DeploymentBuilder.buildEntity=buildEntity;async function buildEntityWithoutNewFiles(a,{contentUrl:_,type:$,pointers:j,hashesByKey:_e,metadata:et,timestamp:tt}){const rt=_e??et?getHashesByKey(et):void 0;if(rt&&isObsoleteProfile($,rt)){const at=await downloadAllFiles(a,_,rt),ct=await updateMetadata(at,et);return buildEntity({type:$,pointers:j,files:at,metadata:ct,timestamp:tt})}return buildEntityInternal($,j,{hashesByKey:_e,metadata:et,timestamp:tt})}DeploymentBuilder.buildEntityWithoutNewFiles=buildEntityWithoutNewFiles;async function buildEntityInternal(a,_,$){if(_.length===0)throw new Error("All entities must have at least one pointer.");const j=$!=null&&$.hashesByKey?$==null?void 0:$.hashesByKey:new Map,_e=Array.from(j.entries()).map(([ct,dt])=>({file:ct,hash:dt})),et=$!=null&&$.timestamp?$==null?void 0:$.timestamp:Date.now(),{entity:tt,entityFile:rt}=await buildEntityAndFile({type:a,pointers:_,timestamp:et,content:_e,metadata:$==null?void 0:$.metadata}),at=$!=null&&$.filesByHash?$.filesByHash:new Map;return at.set(tt.id,rt),{files:at,entityId:tt.id}}function isObsoleteProfile(a,_){return a===schemas_1.EntityType.PROFILE&&Array.from(_).some(([,$])=>$.toLowerCase().startsWith("qm"))}async function fetchArrayBuffer(a,_){const j=await(await a.fetch(_)).arrayBuffer();return new Uint8Array(j)}async function downloadAllFiles(a,_,$){const j=$.get("body.png"),_e=$.get("face256.png"),et=new URL(`${_}/contents/${j}`).toString(),tt=new URL(`${_}/contents/${_e}`).toString(),[rt,at]=await Promise.all([fetchArrayBuffer(a,et),fetchArrayBuffer(a,tt)]);return new Map([["body.png",rt],["face256.png",at]])}async function updateMetadata(a,_){return _&&(_.avatars=await Promise.all(_.avatars.map(async $=>{const j={face256:"",body:""},_e=a.get("face256.png");_e&&(j.face256=await(0,hashing_1.hashV1)(_e));const et=a.get("body.png");return et&&(j.body=await(0,hashing_1.hashV1)(et)),$.avatar.snapshots=j,$})),_)}function getHashesByKey(a){const _=a.avatars[0];return new Map([["body.png",_.avatar.snapshots.body],["face256.png",_.avatar.snapshots.face256]])}Object.defineProperty(utils$1,"__esModule",{value:!0});utils$1.DeploymentBuilder=void 0;const DeploymentBuilder_1=DeploymentBuilder;utils$1.DeploymentBuilder={buildEntity:DeploymentBuilder_1.buildEntity,buildEntityAndFile:DeploymentBuilder_1.buildEntityAndFile};(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(CatalystClient,a),$(ContentClient,a),$(LambdasClient,a),$(utils$1,a)})(dist$2);async function fetchProfile(a){const _=config$1.get("PEER_URL"),$=dist$2.createLambdasClient({url:_+"/lambdas",fetcher:dist$3.createFetchComponent()});try{return await $.getAvatarDetails(a)}catch{return null}}const getCurrentConnectionData=async()=>{try{const a=await connection$1.tryPreviousConnection();if(a.account&&a.provider){const _=dist$5.localStorageGetIdentity(a.account);if(_)return{...a,identity:_}}return null}catch{return null}};function isErrorWithMessage(a){return a!=null&&typeof a=="object"&&"message"in a}function isErrorWithName(a){return a!=null&&typeof a=="object"&&"name"in a}function isRpcError(a){return a!=null&&typeof a=="object"&&"error"in a&&a.error!==void 0&&a.error!==null&&typeof a.error=="object"&&"message"in a.error&&"code"in a.error}var WearablePreview$2={},toStr$6=Object.prototype.toString,isArguments$4=function a(_){var $=toStr$6.call(_),j=$==="[object Arguments]";return j||(j=$!=="[object Array]"&&_!==null&&typeof _=="object"&&typeof _.length=="number"&&_.length>=0&&toStr$6.call(_.callee)==="[object Function]"),j},implementation$9,hasRequiredImplementation;function requireImplementation(){if(hasRequiredImplementation)return implementation$9;hasRequiredImplementation=1;var a;if(!Object.keys){var _=Object.prototype.hasOwnProperty,$=Object.prototype.toString,j=isArguments$4,_e=Object.prototype.propertyIsEnumerable,et=!_e.call({toString:null},"toString"),tt=_e.call(function(){},"prototype"),rt=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],at=function(bt){var Et=bt.constructor;return Et&&Et.prototype===bt},ct={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},dt=function(){if(typeof window>"u")return!1;for(var bt in window)try{if(!ct["$"+bt]&&_.call(window,bt)&&window[bt]!==null&&typeof window[bt]=="object")try{at(window[bt])}catch{return!0}}catch{return!0}return!1}(),yt=function(bt){if(typeof window>"u"||!dt)return at(bt);try{return at(bt)}catch{return!1}};a=function(Et){var $t=Et!==null&&typeof Et=="object",_t=$.call(Et)==="[object Function]",xt=j(Et),St=$t&&$.call(Et)==="[object String]",Mt=[];if(!$t&&!_t&&!xt)throw new TypeError("Object.keys called on a non-object");var Tt=tt&&_t;if(St&&Et.length>0&&!_.call(Et,0))for(var Rt=0;Rt<Et.length;++Rt)Mt.push(String(Rt));if(xt&&Et.length>0)for(var Ct=0;Ct<Et.length;++Ct)Mt.push(String(Ct));else for(var It in Et)!(Tt&&It==="prototype")&&_.call(Et,It)&&Mt.push(String(It));if(et)for(var kt=yt(Et),Dt=0;Dt<rt.length;++Dt)!(kt&&rt[Dt]==="constructor")&&_.call(Et,rt[Dt])&&Mt.push(rt[Dt]);return Mt}}return implementation$9=a,implementation$9}var slice=Array.prototype.slice,isArgs=isArguments$4,origKeys=Object.keys,keysShim=origKeys?function a(_){return origKeys(_)}:requireImplementation(),originalKeys=Object.keys;keysShim.shim=function a(){if(Object.keys){var _=function(){var $=Object.keys(arguments);return $&&$.length===arguments.length}(1,2);_||(Object.keys=function(j){return isArgs(j)?originalKeys(slice.call(j)):originalKeys(j)})}else Object.keys=keysShim;return Object.keys||keysShim};var objectKeys$2=keysShim,keys$2=objectKeys$2,hasSymbols$2=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",toStr$5=Object.prototype.toString,concat=Array.prototype.concat,defineDataProperty=defineDataProperty$1,isFunction$1=function(a){return typeof a=="function"&&toStr$5.call(a)==="[object Function]"},supportsDescriptors$2=hasPropertyDescriptors_1(),defineProperty$3=function(a,_,$,j){if(_ in a){if(j===!0){if(a[_]===$)return}else if(!isFunction$1(j)||!j())return}supportsDescriptors$2?defineDataProperty(a,_,$,!0):defineDataProperty(a,_,$)},defineProperties$1=function(a,_){var $=arguments.length>2?arguments[2]:{},j=keys$2(_);hasSymbols$2&&(j=concat.call(j,Object.getOwnPropertySymbols(_)));for(var _e=0;_e<j.length;_e+=1)defineProperty$3(a,j[_e],_[j[_e]],$[j[_e]])};defineProperties$1.supportsDescriptors=!!supportsDescriptors$2;var defineProperties_1=defineProperties$1,objectKeys$1=objectKeys$2,hasSymbols$1=shams$1(),callBound$9=callBound$c,toObject=Object,$push=callBound$9("Array.prototype.push"),$propIsEnumerable=callBound$9("Object.prototype.propertyIsEnumerable"),originalGetSymbols=hasSymbols$1?Object.getOwnPropertySymbols:null,implementation$8=function a(_,$){if(_==null)throw new TypeError("target must be an object");var j=toObject(_);if(arguments.length===1)return j;for(var _e=1;_e<arguments.length;++_e){var et=toObject(arguments[_e]),tt=objectKeys$1(et),rt=hasSymbols$1&&(Object.getOwnPropertySymbols||originalGetSymbols);if(rt)for(var at=rt(et),ct=0;ct<at.length;++ct){var dt=at[ct];$propIsEnumerable(et,dt)&&$push(tt,dt)}for(var yt=0;yt<tt.length;++yt){var bt=tt[yt];if($propIsEnumerable(et,bt)){var Et=et[bt];j[bt]=Et}}}return j},implementation$7=implementation$8,lacksProperEnumerationOrder=function(){if(!Object.assign)return!1;for(var a="abcdefghijklmnopqrst",_=a.split(""),$={},j=0;j<_.length;++j)$[_[j]]=_[j];var _e=Object.assign({},$),et="";for(var tt in _e)et+=tt;return a!==et},assignHasPendingExceptions=function(){if(!Object.assign||!Object.preventExtensions)return!1;var a=Object.preventExtensions({1:2});try{Object.assign(a,"xy")}catch{return a[1]==="y"}return!1},polyfill$4=function a(){return!Object.assign||lacksProperEnumerationOrder()||assignHasPendingExceptions()?implementation$7:Object.assign},define$4=defineProperties_1,getPolyfill$5=polyfill$4,shim$5=function a(){var _=getPolyfill$5();return define$4(Object,{assign:_},{assign:function(){return Object.assign!==_}}),_},defineProperties=defineProperties_1,callBind$3=callBindExports,implementation$6=implementation$8,getPolyfill$4=polyfill$4,shim$4=shim$5,polyfill$3=callBind$3.apply(getPolyfill$4()),bound=function a(_,$){return polyfill$3(Object,arguments)};defineProperties(bound,{getPolyfill:getPolyfill$4,implementation:implementation$6,shim:shim$4});var object_assign=bound,functionsHaveNames=function a(){return typeof(function(){}).name=="string"},gOPD$2=Object.getOwnPropertyDescriptor;if(gOPD$2)try{gOPD$2([],"length")}catch{gOPD$2=null}functionsHaveNames.functionsHaveConfigurableNames=function a(){if(!functionsHaveNames()||!gOPD$2)return!1;var _=gOPD$2(function(){},"name");return!!_&&!!_.configurable};var $bind=Function.prototype.bind;functionsHaveNames.boundFunctionsHaveNames=function a(){return functionsHaveNames()&&typeof $bind=="function"&&(function(){}).bind().name!==""};var functionsHaveNames_1=functionsHaveNames,define$3=defineDataProperty$1,hasDescriptors=hasPropertyDescriptors_1(),functionsHaveConfigurableNames=functionsHaveNames_1.functionsHaveConfigurableNames(),$TypeError$3=TypeError,setFunctionName$1=function a(_,$){if(typeof _!="function")throw new $TypeError$3("`fn` is not a function");var j=arguments.length>2&&!!arguments[2];return(!j||functionsHaveConfigurableNames)&&(hasDescriptors?define$3(_,"name",$,!0,!0):define$3(_,"name",$)),_},setFunctionName=setFunctionName$1,$Object=Object,$TypeError$2=TypeError,implementation$5=setFunctionName(function a(){if(this!=null&&this!==$Object(this))throw new $TypeError$2("RegExp.prototype.flags getter called on non-object");var _="";return this.hasIndices&&(_+="d"),this.global&&(_+="g"),this.ignoreCase&&(_+="i"),this.multiline&&(_+="m"),this.dotAll&&(_+="s"),this.unicode&&(_+="u"),this.unicodeSets&&(_+="v"),this.sticky&&(_+="y"),_},"get flags",!0),implementation$4=implementation$5,supportsDescriptors$1=defineProperties_1.supportsDescriptors,$gOPD=Object.getOwnPropertyDescriptor,polyfill$2=function a(){if(supportsDescriptors$1&&/a/mig.flags==="gim"){var _=$gOPD(RegExp.prototype,"flags");if(_&&typeof _.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var $="",j={};if(Object.defineProperty(j,"hasIndices",{get:function(){$+="d"}}),Object.defineProperty(j,"sticky",{get:function(){$+="y"}}),$==="dy")return _.get}}return implementation$4},supportsDescriptors=defineProperties_1.supportsDescriptors,getPolyfill$3=polyfill$2,gOPD$1=Object.getOwnPropertyDescriptor,defineProperty$2=Object.defineProperty,TypeErr=TypeError,getProto=Object.getPrototypeOf,regex=/a/,shim$3=function a(){if(!supportsDescriptors||!getProto)throw new TypeErr("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var _=getPolyfill$3(),$=getProto(regex),j=gOPD$1($,"flags");return(!j||j.get!==_)&&defineProperty$2($,"flags",{configurable:!0,enumerable:!1,get:_}),_},define$2=defineProperties_1,callBind$2=callBindExports,implementation$3=implementation$5,getPolyfill$2=polyfill$2,shim$2=shim$3,flagsBound=callBind$2(getPolyfill$2());define$2(flagsBound,{getPolyfill:getPolyfill$2,implementation:implementation$3,shim:shim$2});var regexp_prototype_flags=flagsBound,esGetIterator={exports:{}};const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$0$1=getAugmentedNamespace(__viteBrowserExternal$1);var hasMap=typeof Map=="function"&&Map.prototype,mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,mapSize=hasMap&&mapSizeDescriptor&&typeof mapSizeDescriptor.get=="function"?mapSizeDescriptor.get:null,mapForEach=hasMap&&Map.prototype.forEach,hasSet=typeof Set=="function"&&Set.prototype,setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,setSize=hasSet&&setSizeDescriptor&&typeof setSizeDescriptor.get=="function"?setSizeDescriptor.get:null,setForEach=hasSet&&Set.prototype.forEach,hasWeakMap=typeof WeakMap=="function"&&WeakMap.prototype,weakMapHas=hasWeakMap?WeakMap.prototype.has:null,hasWeakSet=typeof WeakSet=="function"&&WeakSet.prototype,weakSetHas=hasWeakSet?WeakSet.prototype.has:null,hasWeakRef=typeof WeakRef=="function"&&WeakRef.prototype,weakRefDeref=hasWeakRef?WeakRef.prototype.deref:null,booleanValueOf=Boolean.prototype.valueOf,objectToString$1=Object.prototype.toString,functionToString=Function.prototype.toString,$match=String.prototype.match,$slice=String.prototype.slice,$replace=String.prototype.replace,$toUpperCase=String.prototype.toUpperCase,$toLowerCase=String.prototype.toLowerCase,$test=RegExp.prototype.test,$concat=Array.prototype.concat,$join=Array.prototype.join,$arrSlice=Array.prototype.slice,$floor=Math.floor,bigIntValueOf$1=typeof BigInt=="function"?BigInt.prototype.valueOf:null,gOPS=Object.getOwnPropertySymbols,symToString=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,hasShammedSymbols=typeof Symbol=="function"&&typeof Symbol.iterator=="object",toStringTag=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hasShammedSymbols||"symbol")?Symbol.toStringTag:null,isEnumerable=Object.prototype.propertyIsEnumerable,gPO$1=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(a){return a.__proto__}:null);function addNumericSeparator(a,_){if(a===1/0||a===-1/0||a!==a||a&&a>-1e3&&a<1e3||$test.call(/e/,_))return _;var $=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof a=="number"){var j=a<0?-$floor(-a):$floor(a);if(j!==a){var _e=String(j),et=$slice.call(_,_e.length+1);return $replace.call(_e,$,"$&_")+"."+$replace.call($replace.call(et,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace.call(_,$,"$&_")}var utilInspect=require$$0$1,inspectCustom=utilInspect.custom,inspectSymbol=isSymbol$3(inspectCustom)?inspectCustom:null,objectInspect=function a(_,$,j,_e){var et=$||{};if(has$1(et,"quoteStyle")&&et.quoteStyle!=="single"&&et.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has$1(et,"maxStringLength")&&(typeof et.maxStringLength=="number"?et.maxStringLength<0&&et.maxStringLength!==1/0:et.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var tt=has$1(et,"customInspect")?et.customInspect:!0;if(typeof tt!="boolean"&&tt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has$1(et,"indent")&&et.indent!==null&&et.indent!==" "&&!(parseInt(et.indent,10)===et.indent&&et.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has$1(et,"numericSeparator")&&typeof et.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var rt=et.numericSeparator;if(typeof _>"u")return"undefined";if(_===null)return"null";if(typeof _=="boolean")return _?"true":"false";if(typeof _=="string")return inspectString(_,et);if(typeof _=="number"){if(_===0)return 1/0/_>0?"0":"-0";var at=String(_);return rt?addNumericSeparator(_,at):at}if(typeof _=="bigint"){var ct=String(_)+"n";return rt?addNumericSeparator(_,ct):ct}var dt=typeof et.depth>"u"?5:et.depth;if(typeof j>"u"&&(j=0),j>=dt&&dt>0&&typeof _=="object")return isArray$4(_)?"[Array]":"[Object]";var yt=getIndent(et,j);if(typeof _e>"u")_e=[];else if(indexOf(_e,_)>=0)return"[Circular]";function bt(st,lt,ht){if(lt&&(_e=$arrSlice.call(_e),_e.push(lt)),ht){var mt={depth:et.depth};return has$1(et,"quoteStyle")&&(mt.quoteStyle=et.quoteStyle),a(st,mt,j+1,_e)}return a(st,et,j+1,_e)}if(typeof _=="function"&&!isRegExp(_)){var Et=nameOf(_),$t=arrObjKeys(_,bt);return"[Function"+(Et?": "+Et:" (anonymous)")+"]"+($t.length>0?" { "+$join.call($t,", ")+" }":"")}if(isSymbol$3(_)){var _t=hasShammedSymbols?$replace.call(String(_),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(_);return typeof _=="object"&&!hasShammedSymbols?markBoxed(_t):_t}if(isElement(_)){for(var xt="<"+$toLowerCase.call(String(_.nodeName)),St=_.attributes||[],Mt=0;Mt<St.length;Mt++)xt+=" "+St[Mt].name+"="+wrapQuotes(quote(St[Mt].value),"double",et);return xt+=">",_.childNodes&&_.childNodes.length&&(xt+="..."),xt+="</"+$toLowerCase.call(String(_.nodeName))+">",xt}if(isArray$4(_)){if(_.length===0)return"[]";var Tt=arrObjKeys(_,bt);return yt&&!singleLineValues(Tt)?"["+indentedJoin(Tt,yt)+"]":"[ "+$join.call(Tt,", ")+" ]"}if(isError(_)){var Rt=arrObjKeys(_,bt);return!("cause"in Error.prototype)&&"cause"in _&&!isEnumerable.call(_,"cause")?"{ ["+String(_)+"] "+$join.call($concat.call("[cause]: "+bt(_.cause),Rt),", ")+" }":Rt.length===0?"["+String(_)+"]":"{ ["+String(_)+"] "+$join.call(Rt,", ")+" }"}if(typeof _=="object"&&tt){if(inspectSymbol&&typeof _[inspectSymbol]=="function"&&utilInspect)return utilInspect(_,{depth:dt-j});if(tt!=="symbol"&&typeof _.inspect=="function")return _.inspect()}if(isMap$3(_)){var Ct=[];return mapForEach&&mapForEach.call(_,function(st,lt){Ct.push(bt(lt,_,!0)+" => "+bt(st,_))}),collectionOf("Map",mapSize.call(_),Ct,yt)}if(isSet$3(_)){var It=[];return setForEach&&setForEach.call(_,function(st){It.push(bt(st,_))}),collectionOf("Set",setSize.call(_),It,yt)}if(isWeakMap$1(_))return weakCollectionOf("WeakMap");if(isWeakSet$1(_))return weakCollectionOf("WeakSet");if(isWeakRef(_))return weakCollectionOf("WeakRef");if(isNumber$2(_))return markBoxed(bt(Number(_)));if(isBigInt$1(_))return markBoxed(bt(bigIntValueOf$1.call(_)));if(isBoolean$2(_))return markBoxed(booleanValueOf.call(_));if(isString$4(_))return markBoxed(bt(String(_)));if(typeof window<"u"&&_===window)return"{ [object Window] }";if(_===commonjsGlobal)return"{ [object globalThis] }";if(!isDate$2(_)&&!isRegExp(_)){var kt=arrObjKeys(_,bt),Dt=gPO$1?gPO$1(_)===Object.prototype:_ instanceof Object||_.constructor===Object,Bt=_ instanceof Object?"":"null prototype",zt=!Dt&&toStringTag&&Object(_)===_&&toStringTag in _?$slice.call(toStr$4(_),8,-1):Bt?"Object":"",vt=Dt||typeof _.constructor!="function"?"":_.constructor.name?_.constructor.name+" ":"",nt=vt+(zt||Bt?"["+$join.call($concat.call([],zt||[],Bt||[]),": ")+"] ":"");return kt.length===0?nt+"{}":yt?nt+"{"+indentedJoin(kt,yt)+"}":nt+"{ "+$join.call(kt,", ")+" }"}return String(_)};function wrapQuotes(a,_,$){var j=($.quoteStyle||_)==="double"?'"':"'";return j+a+j}function quote(a){return $replace.call(String(a),/"/g,"&quot;")}function isArray$4(a){return toStr$4(a)==="[object Array]"&&(!toStringTag||!(typeof a=="object"&&toStringTag in a))}function isDate$2(a){return toStr$4(a)==="[object Date]"&&(!toStringTag||!(typeof a=="object"&&toStringTag in a))}function isRegExp(a){return toStr$4(a)==="[object RegExp]"&&(!toStringTag||!(typeof a=="object"&&toStringTag in a))}function isError(a){return toStr$4(a)==="[object Error]"&&(!toStringTag||!(typeof a=="object"&&toStringTag in a))}function isString$4(a){return toStr$4(a)==="[object String]"&&(!toStringTag||!(typeof a=="object"&&toStringTag in a))}function isNumber$2(a){return toStr$4(a)==="[object Number]"&&(!toStringTag||!(typeof a=="object"&&toStringTag in a))}function isBoolean$2(a){return toStr$4(a)==="[object Boolean]"&&(!toStringTag||!(typeof a=="object"&&toStringTag in a))}function isSymbol$3(a){if(hasShammedSymbols)return a&&typeof a=="object"&&a instanceof Symbol;if(typeof a=="symbol")return!0;if(!a||typeof a!="object"||!symToString)return!1;try{return symToString.call(a),!0}catch{}return!1}function isBigInt$1(a){if(!a||typeof a!="object"||!bigIntValueOf$1)return!1;try{return bigIntValueOf$1.call(a),!0}catch{}return!1}var hasOwn$1=Object.prototype.hasOwnProperty||function(a){return a in this};function has$1(a,_){return hasOwn$1.call(a,_)}function toStr$4(a){return objectToString$1.call(a)}function nameOf(a){if(a.name)return a.name;var _=$match.call(functionToString.call(a),/^function\s*([\w$]+)/);return _?_[1]:null}function indexOf(a,_){if(a.indexOf)return a.indexOf(_);for(var $=0,j=a.length;$<j;$++)if(a[$]===_)return $;return-1}function isMap$3(a){if(!mapSize||!a||typeof a!="object")return!1;try{mapSize.call(a);try{setSize.call(a)}catch{return!0}return a instanceof Map}catch{}return!1}function isWeakMap$1(a){if(!weakMapHas||!a||typeof a!="object")return!1;try{weakMapHas.call(a,weakMapHas);try{weakSetHas.call(a,weakSetHas)}catch{return!0}return a instanceof WeakMap}catch{}return!1}function isWeakRef(a){if(!weakRefDeref||!a||typeof a!="object")return!1;try{return weakRefDeref.call(a),!0}catch{}return!1}function isSet$3(a){if(!setSize||!a||typeof a!="object")return!1;try{setSize.call(a);try{mapSize.call(a)}catch{return!0}return a instanceof Set}catch{}return!1}function isWeakSet$1(a){if(!weakSetHas||!a||typeof a!="object")return!1;try{weakSetHas.call(a,weakSetHas);try{weakMapHas.call(a,weakMapHas)}catch{return!0}return a instanceof WeakSet}catch{}return!1}function isElement(a){return!a||typeof a!="object"?!1:typeof HTMLElement<"u"&&a instanceof HTMLElement?!0:typeof a.nodeName=="string"&&typeof a.getAttribute=="function"}function inspectString(a,_){if(a.length>_.maxStringLength){var $=a.length-_.maxStringLength,j="... "+$+" more character"+($>1?"s":"");return inspectString($slice.call(a,0,_.maxStringLength),_)+j}var _e=$replace.call($replace.call(a,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,lowbyte);return wrapQuotes(_e,"single",_)}function lowbyte(a){var _=a.charCodeAt(0),$={8:"b",9:"t",10:"n",12:"f",13:"r"}[_];return $?"\\"+$:"\\x"+(_<16?"0":"")+$toUpperCase.call(_.toString(16))}function markBoxed(a){return"Object("+a+")"}function weakCollectionOf(a){return a+" { ? }"}function collectionOf(a,_,$,j){var _e=j?indentedJoin($,j):$join.call($,", ");return a+" ("+_+") {"+_e+"}"}function singleLineValues(a){for(var _=0;_<a.length;_++)if(indexOf(a[_],`
142
142
  `)>=0)return!1;return!0}function getIndent(a,_){var $;if(a.indent===" ")$=" ";else if(typeof a.indent=="number"&&a.indent>0)$=$join.call(Array(a.indent+1)," ");else return null;return{base:$,prev:$join.call(Array(_+1),$)}}function indentedJoin(a,_){if(a.length===0)return"";var $=`
143
143
  `+_.prev+_.base;return $+$join.call(a,","+$)+`
144
- `+_.prev}function arrObjKeys(a,_){var $=isArray$4(a),j=[];if($){j.length=a.length;for(var _e=0;_e<a.length;_e++)j[_e]=has$1(a,_e)?_(a[_e],a):""}var et=typeof gOPS=="function"?gOPS(a):[],tt;if(hasShammedSymbols){tt={};for(var rt=0;rt<et.length;rt++)tt["$"+et[rt]]=et[rt]}for(var at in a)has$1(a,at)&&($&&String(Number(at))===at&&at<a.length||hasShammedSymbols&&tt["$"+at]instanceof Symbol||($test.call(/[^\w$]/,at)?j.push(_(at,a)+": "+_(a[at],a)):j.push(at+": "+_(a[at],a))));if(typeof gOPS=="function")for(var ct=0;ct<et.length;ct++)isEnumerable.call(a,et[ct])&&j.push("["+_(et[ct])+"]: "+_(a[et[ct]],a));return j}var GetIntrinsic$5=getIntrinsic,callBound$8=callBound$c,inspect=objectInspect,$TypeError$1=GetIntrinsic$5("%TypeError%"),$WeakMap$1=GetIntrinsic$5("%WeakMap%",!0),$Map$3=GetIntrinsic$5("%Map%",!0),$weakMapGet=callBound$8("WeakMap.prototype.get",!0),$weakMapSet=callBound$8("WeakMap.prototype.set",!0),$weakMapHas=callBound$8("WeakMap.prototype.has",!0),$mapGet$1=callBound$8("Map.prototype.get",!0),$mapSet=callBound$8("Map.prototype.set",!0),$mapHas$5=callBound$8("Map.prototype.has",!0),listGetNode=function(a,_){for(var $=a,j;(j=$.next)!==null;$=j)if(j.key===_)return $.next=j.next,j.next=a.next,a.next=j,j},listGet=function(a,_){var $=listGetNode(a,_);return $&&$.value},listSet=function(a,_,$){var j=listGetNode(a,_);j?j.value=$:a.next={key:_,next:a.next,value:$}},listHas=function(a,_){return!!listGetNode(a,_)},sideChannel=function a(){var _,$,j,_e={assert:function(et){if(!_e.has(et))throw new $TypeError$1("Side channel does not contain "+inspect(et))},get:function(et){if($WeakMap$1&&et&&(typeof et=="object"||typeof et=="function")){if(_)return $weakMapGet(_,et)}else if($Map$3){if($)return $mapGet$1($,et)}else if(j)return listGet(j,et)},has:function(et){if($WeakMap$1&&et&&(typeof et=="object"||typeof et=="function")){if(_)return $weakMapHas(_,et)}else if($Map$3){if($)return $mapHas$5($,et)}else if(j)return listHas(j,et);return!1},set:function(et,tt){$WeakMap$1&&et&&(typeof et=="object"||typeof et=="function")?(_||(_=new $WeakMap$1),$weakMapSet(_,et,tt)):$Map$3?($||($=new $Map$3),$mapSet($,et,tt)):(j||(j={key:{},next:null}),listSet(j,et,tt))}};return _e},GetIntrinsic$4=getIntrinsic,hasOwn=hasown,channel=sideChannel(),$TypeError=GetIntrinsic$4("%TypeError%"),SLOT$1={assert:function(a,_){if(!a||typeof a!="object"&&typeof a!="function")throw new $TypeError("`O` is not an object");if(typeof _!="string")throw new $TypeError("`slot` must be a string");if(channel.assert(a),!SLOT$1.has(a,_))throw new $TypeError("`"+_+"` is not present on `O`")},get:function(a,_){if(!a||typeof a!="object"&&typeof a!="function")throw new $TypeError("`O` is not an object");if(typeof _!="string")throw new $TypeError("`slot` must be a string");var $=channel.get(a);return $&&$["$"+_]},has:function(a,_){if(!a||typeof a!="object"&&typeof a!="function")throw new $TypeError("`O` is not an object");if(typeof _!="string")throw new $TypeError("`slot` must be a string");var $=channel.get(a);return!!$&&hasOwn($,"$"+_)},set:function(a,_,$){if(!a||typeof a!="object"&&typeof a!="function")throw new $TypeError("`O` is not an object");if(typeof _!="string")throw new $TypeError("`slot` must be a string");var j=channel.get(a);j||(j={},channel.set(a,j)),j["$"+_]=$}};Object.freeze&&Object.freeze(SLOT$1);var internalSlot=SLOT$1,SLOT=internalSlot,$SyntaxError=SyntaxError,$StopIteration=typeof StopIteration=="object"?StopIteration:null,stopIterationIterator=function a(_){if(!$StopIteration)throw new $SyntaxError("this environment lacks StopIteration");SLOT.set(_,"[[Done]]",!1);var $={next:function(){var _e=SLOT.get(this,"[[Iterator]]"),et=SLOT.get(_e,"[[Done]]");try{return{done:et,value:et?void 0:_e.next()}}catch(tt){if(SLOT.set(_e,"[[Done]]",!0),tt!==$StopIteration)throw tt;return{done:!0,value:void 0}}}};return SLOT.set($,"[[Iterator]]",_),$},toString$1={}.toString,isarray=Array.isArray||function(a){return toString$1.call(a)=="[object Array]"},strValue=String.prototype.valueOf,tryStringObject=function a(_){try{return strValue.call(_),!0}catch{return!1}},toStr$3=Object.prototype.toString,strClass="[object String]",hasToStringTag$4=shams(),isString$3=function a(_){return typeof _=="string"?!0:typeof _!="object"?!1:hasToStringTag$4?tryStringObject(_):toStr$3.call(_)===strClass},$Map$2=typeof Map=="function"&&Map.prototype?Map:null,$Set$3=typeof Set=="function"&&Set.prototype?Set:null,exported$2;$Map$2||(exported$2=function(_){return!1});var $mapHas$4=$Map$2?Map.prototype.has:null,$setHas$4=$Set$3?Set.prototype.has:null;!exported$2&&!$mapHas$4&&(exported$2=function(_){return!1});var isMap$2=exported$2||function a(_){if(!_||typeof _!="object")return!1;try{if($mapHas$4.call(_),$setHas$4)try{$setHas$4.call(_)}catch{return!0}return _ instanceof $Map$2}catch{}return!1},$Map$1=typeof Map=="function"&&Map.prototype?Map:null,$Set$2=typeof Set=="function"&&Set.prototype?Set:null,exported$1;$Set$2||(exported$1=function(_){return!1});var $mapHas$3=$Map$1?Map.prototype.has:null,$setHas$3=$Set$2?Set.prototype.has:null;!exported$1&&!$setHas$3&&(exported$1=function(_){return!1});var isSet$2=exported$1||function a(_){if(!_||typeof _!="object")return!1;try{if($setHas$3.call(_),$mapHas$3)try{$mapHas$3.call(_)}catch{return!0}return _ instanceof $Set$2}catch{}return!1},isArguments$3=isArguments$5,getStopIterationIterator=stopIterationIterator;if(hasSymbols$4()||shams$1()){var $iterator=Symbol.iterator;esGetIterator.exports=function(_){if(_!=null&&typeof _[$iterator]<"u")return _[$iterator]();if(isArguments$3(_))return Array.prototype[$iterator].call(_)}}else{var isArray$3=isarray,isString$2=isString$3,GetIntrinsic$3=getIntrinsic,$Map=GetIntrinsic$3("%Map%",!0),$Set$1=GetIntrinsic$3("%Set%",!0),callBound$7=callBound$c,$arrayPush=callBound$7("Array.prototype.push"),$charCodeAt=callBound$7("String.prototype.charCodeAt"),$stringSlice=callBound$7("String.prototype.slice"),advanceStringIndex=function(_,$){var j=_.length;if($+1>=j)return $+1;var _e=$charCodeAt(_,$);if(_e<55296||_e>56319)return $+1;var et=$charCodeAt(_,$+1);return et<56320||et>57343?$+1:$+2},getArrayIterator=function(_){var $=0;return{next:function(){var _e=$>=_.length,et;return _e||(et=_[$],$+=1),{done:_e,value:et}}}},getNonCollectionIterator=function(_,$){if(isArray$3(_)||isArguments$3(_))return getArrayIterator(_);if(isString$2(_)){var j=0;return{next:function(){var et=advanceStringIndex(_,j),tt=$stringSlice(_,j,et);return j=et,{done:et>_.length,value:tt}}}}if($&&typeof _["_es6-shim iterator_"]<"u")return _["_es6-shim iterator_"]()};if(!$Map&&!$Set$1)esGetIterator.exports=function(_){if(_!=null)return getNonCollectionIterator(_,!0)};else{var isMap$1=isMap$2,isSet$1=isSet$2,$mapForEach=callBound$7("Map.prototype.forEach",!0),$setForEach=callBound$7("Set.prototype.forEach",!0);if(typeof process$1>"u"||!process$1.versions||!process$1.versions.node)var $mapIterator=callBound$7("Map.prototype.iterator",!0),$setIterator=callBound$7("Set.prototype.iterator",!0);var $mapAtAtIterator=callBound$7("Map.prototype.@@iterator",!0)||callBound$7("Map.prototype._es6-shim iterator_",!0),$setAtAtIterator=callBound$7("Set.prototype.@@iterator",!0)||callBound$7("Set.prototype._es6-shim iterator_",!0),getCollectionIterator=function(_){if(isMap$1(_)){if($mapIterator)return getStopIterationIterator($mapIterator(_));if($mapAtAtIterator)return $mapAtAtIterator(_);if($mapForEach){var $=[];return $mapForEach(_,function(_e,et){$arrayPush($,[et,_e])}),getArrayIterator($)}}if(isSet$1(_)){if($setIterator)return getStopIterationIterator($setIterator(_));if($setAtAtIterator)return $setAtAtIterator(_);if($setForEach){var j=[];return $setForEach(_,function(_e){$arrayPush(j,_e)}),getArrayIterator(j)}}};esGetIterator.exports=function(_){return getCollectionIterator(_)||getNonCollectionIterator(_)}}}var esGetIteratorExports=esGetIterator.exports,numberIsNaN=function(a){return a!==a},implementation$2=function a(_,$){return _===0&&$===0?1/_===1/$:!!(_===$||numberIsNaN(_)&&numberIsNaN($))},implementation$1=implementation$2,polyfill$1=function a(){return typeof Object.is=="function"?Object.is:implementation$1},getPolyfill$1=polyfill$1,define$1=defineProperties_1,shim$1=function a(){var _=getPolyfill$1();return define$1(Object,{is:_},{is:function(){return Object.is!==_}}),_},define=defineProperties_1,callBind$1=callBindExports,implementation=implementation$2,getPolyfill=polyfill$1,shim=shim$1,polyfill=callBind$1(getPolyfill(),Object);define(polyfill,{getPolyfill,implementation,shim});var objectIs=polyfill,callBind=callBindExports,callBound$6=callBound$c,GetIntrinsic$2=getIntrinsic,isTypedArray$2=isTypedArray$3,$ArrayBuffer=GetIntrinsic$2("ArrayBuffer",!0),$Float32Array=GetIntrinsic$2("Float32Array",!0),$byteLength$2=callBound$6("ArrayBuffer.prototype.byteLength",!0),abSlice=$ArrayBuffer&&!$byteLength$2&&new $ArrayBuffer().slice,$abSlice=abSlice&&callBind(abSlice),isArrayBuffer$2=$byteLength$2||$abSlice?function a(_){if(!_||typeof _!="object")return!1;try{return $byteLength$2?$byteLength$2(_):$abSlice(_,0),!0}catch{return!1}}:$Float32Array?function a(_){try{return new $Float32Array(_).buffer===_&&!isTypedArray$2(_)}catch($){return typeof _=="object"&&$.name==="RangeError"}}:function a(_){return!1},getDay=Date.prototype.getDay,tryDateObject=function a(_){try{return getDay.call(_),!0}catch{return!1}},toStr$2=Object.prototype.toString,dateClass="[object Date]",hasToStringTag$3=shams(),isDateObject=function a(_){return typeof _!="object"||_===null?!1:hasToStringTag$3?tryDateObject(_):toStr$2.call(_)===dateClass},callBound$5=callBound$c,hasToStringTag$2=shams(),has,$exec,isRegexMarker,badStringifier;if(hasToStringTag$2){has=callBound$5("Object.prototype.hasOwnProperty"),$exec=callBound$5("RegExp.prototype.exec"),isRegexMarker={};var throwRegexMarker=function(){throw isRegexMarker};badStringifier={toString:throwRegexMarker,valueOf:throwRegexMarker},typeof Symbol.toPrimitive=="symbol"&&(badStringifier[Symbol.toPrimitive]=throwRegexMarker)}var $toString$1=callBound$5("Object.prototype.toString"),gOPD=Object.getOwnPropertyDescriptor,regexClass="[object RegExp]",isRegex$1=hasToStringTag$2?function a(_){if(!_||typeof _!="object")return!1;var $=gOPD(_,"lastIndex"),j=$&&has($,"value");if(!j)return!1;try{$exec(_,badStringifier)}catch(_e){return _e===isRegexMarker}}:function a(_){return!_||typeof _!="object"&&typeof _!="function"?!1:$toString$1(_)===regexClass},callBound$4=callBound$c,$byteLength$1=callBound$4("SharedArrayBuffer.prototype.byteLength",!0),isSharedArrayBuffer$1=$byteLength$1?function a(_){if(!_||typeof _!="object")return!1;try{return $byteLength$1(_),!0}catch{return!1}}:function a(_){return!1},numToStr=Number.prototype.toString,tryNumberObject=function a(_){try{return numToStr.call(_),!0}catch{return!1}},toStr$1=Object.prototype.toString,numClass="[object Number]",hasToStringTag$1=shams(),isNumberObject=function a(_){return typeof _=="number"?!0:typeof _!="object"?!1:hasToStringTag$1?tryNumberObject(_):toStr$1.call(_)===numClass},callBound$3=callBound$c,$boolToStr=callBound$3("Boolean.prototype.toString"),$toString=callBound$3("Object.prototype.toString"),tryBooleanObject=function a(_){try{return $boolToStr(_),!0}catch{return!1}},boolClass="[object Boolean]",hasToStringTag=shams(),isBooleanObject=function a(_){return typeof _=="boolean"?!0:_===null||typeof _!="object"?!1:hasToStringTag&&Symbol.toStringTag in _?tryBooleanObject(_):$toString(_)===boolClass},isSymbol$2={exports:{}},toStr=Object.prototype.toString,hasSymbols=hasSymbols$4();if(hasSymbols){var symToStr=Symbol.prototype.toString,symStringRegex=/^Symbol\(.*\)$/,isSymbolObject=function(_){return typeof _.valueOf()!="symbol"?!1:symStringRegex.test(symToStr.call(_))};isSymbol$2.exports=function(_){if(typeof _=="symbol")return!0;if(toStr.call(_)!=="[object Symbol]")return!1;try{return isSymbolObject(_)}catch{return!1}}}else isSymbol$2.exports=function(_){return!1};var isSymbolExports=isSymbol$2.exports,isBigint={exports:{}},$BigInt=typeof BigInt<"u"&&BigInt,hasBigints=function a(){return typeof $BigInt=="function"&&typeof BigInt=="function"&&typeof $BigInt(42)=="bigint"&&typeof BigInt(42)=="bigint"},hasBigInts=hasBigints();if(hasBigInts){var bigIntValueOf=BigInt.prototype.valueOf,tryBigInt=function(_){try{return bigIntValueOf.call(_),!0}catch{}return!1};isBigint.exports=function(_){return _===null||typeof _>"u"||typeof _=="boolean"||typeof _=="string"||typeof _=="number"||typeof _=="symbol"||typeof _=="function"?!1:typeof _=="bigint"?!0:tryBigInt(_)}}else isBigint.exports=function(_){return!1};var isBigintExports=isBigint.exports,isString$1=isString$3,isNumber$1=isNumberObject,isBoolean$1=isBooleanObject,isSymbol$1=isSymbolExports,isBigInt=isBigintExports,whichBoxedPrimitive$1=function a(_){if(_==null||typeof _!="object"&&typeof _!="function")return null;if(isString$1(_))return"String";if(isNumber$1(_))return"Number";if(isBoolean$1(_))return"Boolean";if(isSymbol$1(_))return"Symbol";if(isBigInt(_))return"BigInt"},$WeakMap=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,$WeakSet$1=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,exported;$WeakMap||(exported=function(_){return!1});var $mapHas$2=$WeakMap?$WeakMap.prototype.has:null,$setHas$2=$WeakSet$1?$WeakSet$1.prototype.has:null;!exported&&!$mapHas$2&&(exported=function(_){return!1});var isWeakmap=exported||function a(_){if(!_||typeof _!="object")return!1;try{if($mapHas$2.call(_,$mapHas$2),$setHas$2)try{$setHas$2.call(_,$setHas$2)}catch{return!0}return _ instanceof $WeakMap}catch{}return!1},isWeakset={exports:{}},GetIntrinsic$1=getIntrinsic,callBound$2=callBound$c,$WeakSet=GetIntrinsic$1("%WeakSet%",!0),$setHas$1=callBound$2("WeakSet.prototype.has",!0);if($setHas$1){var $mapHas$1=callBound$2("WeakMap.prototype.has",!0);isWeakset.exports=function(_){if(!_||typeof _!="object")return!1;try{if($setHas$1(_,$setHas$1),$mapHas$1)try{$mapHas$1(_,$mapHas$1)}catch{return!0}return _ instanceof $WeakSet}catch{}return!1}}else isWeakset.exports=function(_){return!1};var isWeaksetExports=isWeakset.exports,isMap=isMap$2,isSet=isSet$2,isWeakMap=isWeakmap,isWeakSet=isWeaksetExports,whichCollection$1=function a(_){if(_&&typeof _=="object"){if(isMap(_))return"Map";if(isSet(_))return"Set";if(isWeakMap(_))return"WeakMap";if(isWeakSet(_))return"WeakSet"}return!1},callBound$1=callBound$c,$byteLength=callBound$1("ArrayBuffer.prototype.byteLength",!0),isArrayBuffer$1=isArrayBuffer$2,arrayBufferByteLength=function a(_){return isArrayBuffer$1(_)?$byteLength?$byteLength(_):_.byteLength:NaN},assign$1=object_assign,callBound=callBound$c,flags=regexp_prototype_flags,GetIntrinsic=getIntrinsic,getIterator=esGetIteratorExports,getSideChannel=sideChannel,is=objectIs,isArguments$2=isArguments$5,isArray$2=isarray,isArrayBuffer=isArrayBuffer$2,isDate$1=isDateObject,isRegex=isRegex$1,isSharedArrayBuffer=isSharedArrayBuffer$1,objectKeys=objectKeys$2,whichBoxedPrimitive=whichBoxedPrimitive$1,whichCollection=whichCollection$1,whichTypedArray=whichTypedArray$2,byteLength=arrayBufferByteLength,sabByteLength=callBound("SharedArrayBuffer.prototype.byteLength",!0),$getTime=callBound("Date.prototype.getTime"),gPO=Object.getPrototypeOf,$objToString=callBound("Object.prototype.toString"),$Set=GetIntrinsic("%Set%",!0),$mapHas=callBound("Map.prototype.has",!0),$mapGet=callBound("Map.prototype.get",!0),$mapSize=callBound("Map.prototype.size",!0),$setAdd=callBound("Set.prototype.add",!0),$setDelete=callBound("Set.prototype.delete",!0),$setHas=callBound("Set.prototype.has",!0),$setSize=callBound("Set.prototype.size",!0);function setHasEqualElement(a,_,$,j){for(var _e=getIterator(a),et;(et=_e.next())&&!et.done;)if(internalDeepEqual(_,et.value,$,j))return $setDelete(a,et.value),!0;return!1}function findLooseMatchingPrimitives(a){if(typeof a>"u")return null;if(typeof a!="object")return typeof a=="symbol"?!1:typeof a=="string"||typeof a=="number"?+a==+a:!0}function mapMightHaveLoosePrim(a,_,$,j,_e,et){var tt=findLooseMatchingPrimitives($);if(tt!=null)return tt;var rt=$mapGet(_,tt),at=assign$1({},_e,{strict:!1});return typeof rt>"u"&&!$mapHas(_,tt)||!internalDeepEqual(j,rt,at,et)?!1:!$mapHas(a,tt)&&internalDeepEqual(j,rt,at,et)}function setMightHaveLoosePrim(a,_,$){var j=findLooseMatchingPrimitives($);return j??($setHas(_,j)&&!$setHas(a,j))}function mapHasEqualEntry(a,_,$,j,_e,et){for(var tt=getIterator(a),rt,at;(rt=tt.next())&&!rt.done;)if(at=rt.value,internalDeepEqual($,at,_e,et)&&internalDeepEqual(j,$mapGet(_,at),_e,et))return $setDelete(a,at),!0;return!1}function internalDeepEqual(a,_,$,j){var _e=$||{};if(_e.strict?is(a,_):a===_)return!0;var et=whichBoxedPrimitive(a),tt=whichBoxedPrimitive(_);if(et!==tt)return!1;if(!a||!_||typeof a!="object"&&typeof _!="object")return _e.strict?is(a,_):a==_;var rt=j.has(a),at=j.has(_),ct;if(rt&&at){if(j.get(a)===j.get(_))return!0}else ct={};return rt||j.set(a,ct),at||j.set(_,ct),objEquiv(a,_,_e,j)}function isBuffer$2(a){return!a||typeof a!="object"||typeof a.length!="number"||typeof a.copy!="function"||typeof a.slice!="function"||a.length>0&&typeof a[0]!="number"?!1:!!(a.constructor&&a.constructor.isBuffer&&a.constructor.isBuffer(a))}function setEquiv(a,_,$,j){if($setSize(a)!==$setSize(_))return!1;for(var _e=getIterator(a),et=getIterator(_),tt,rt,at;(tt=_e.next())&&!tt.done;)if(tt.value&&typeof tt.value=="object")at||(at=new $Set),$setAdd(at,tt.value);else if(!$setHas(_,tt.value)){if($.strict||!setMightHaveLoosePrim(a,_,tt.value))return!1;at||(at=new $Set),$setAdd(at,tt.value)}if(at){for(;(rt=et.next())&&!rt.done;)if(rt.value&&typeof rt.value=="object"){if(!setHasEqualElement(at,rt.value,$.strict,j))return!1}else if(!$.strict&&!$setHas(a,rt.value)&&!setHasEqualElement(at,rt.value,$.strict,j))return!1;return $setSize(at)===0}return!0}function mapEquiv(a,_,$,j){if($mapSize(a)!==$mapSize(_))return!1;for(var _e=getIterator(a),et=getIterator(_),tt,rt,at,ct,dt,yt;(tt=_e.next())&&!tt.done;)if(ct=tt.value[0],dt=tt.value[1],ct&&typeof ct=="object")at||(at=new $Set),$setAdd(at,ct);else if(yt=$mapGet(_,ct),typeof yt>"u"&&!$mapHas(_,ct)||!internalDeepEqual(dt,yt,$,j)){if($.strict||!mapMightHaveLoosePrim(a,_,ct,dt,$,j))return!1;at||(at=new $Set),$setAdd(at,ct)}if(at){for(;(rt=et.next())&&!rt.done;)if(ct=rt.value[0],yt=rt.value[1],ct&&typeof ct=="object"){if(!mapHasEqualEntry(at,a,ct,yt,$,j))return!1}else if(!$.strict&&(!a.has(ct)||!internalDeepEqual($mapGet(a,ct),yt,$,j))&&!mapHasEqualEntry(at,a,ct,yt,assign$1({},$,{strict:!1}),j))return!1;return $setSize(at)===0}return!0}function objEquiv(a,_,$,j){var _e,et;if(typeof a!=typeof _||a==null||_==null||$objToString(a)!==$objToString(_)||isArguments$2(a)!==isArguments$2(_))return!1;var tt=isArray$2(a),rt=isArray$2(_);if(tt!==rt)return!1;var at=a instanceof Error,ct=_ instanceof Error;if(at!==ct||(at||ct)&&(a.name!==_.name||a.message!==_.message))return!1;var dt=isRegex(a),yt=isRegex(_);if(dt!==yt||(dt||yt)&&(a.source!==_.source||flags(a)!==flags(_)))return!1;var bt=isDate$1(a),Et=isDate$1(_);if(bt!==Et||(bt||Et)&&$getTime(a)!==$getTime(_)||$.strict&&gPO&&gPO(a)!==gPO(_))return!1;var $t=whichTypedArray(a),_t=whichTypedArray(_);if($t!==_t)return!1;if($t||_t){if(a.length!==_.length)return!1;for(_e=0;_e<a.length;_e++)if(a[_e]!==_[_e])return!1;return!0}var xt=isBuffer$2(a),St=isBuffer$2(_);if(xt!==St)return!1;if(xt||St){if(a.length!==_.length)return!1;for(_e=0;_e<a.length;_e++)if(a[_e]!==_[_e])return!1;return!0}var Mt=isArrayBuffer(a),Tt=isArrayBuffer(_);if(Mt!==Tt)return!1;if(Mt||Tt)return byteLength(a)!==byteLength(_)?!1:typeof Uint8Array=="function"&&internalDeepEqual(new Uint8Array(a),new Uint8Array(_),$,j);var Rt=isSharedArrayBuffer(a),Ct=isSharedArrayBuffer(_);if(Rt!==Ct)return!1;if(Rt||Ct)return sabByteLength(a)!==sabByteLength(_)?!1:typeof Uint8Array=="function"&&internalDeepEqual(new Uint8Array(a),new Uint8Array(_),$,j);if(typeof a!=typeof _)return!1;var It=objectKeys(a),kt=objectKeys(_);if(It.length!==kt.length)return!1;for(It.sort(),kt.sort(),_e=It.length-1;_e>=0;_e--)if(It[_e]!=kt[_e])return!1;for(_e=It.length-1;_e>=0;_e--)if(et=It[_e],!internalDeepEqual(a[et],_[et],$,j))return!1;var Dt=whichCollection(a),Bt=whichCollection(_);return Dt!==Bt?!1:Dt==="Set"||Bt==="Set"?setEquiv(a,_,$,j):Dt==="Map"?mapEquiv(a,_,$,j):!0}var deepEqual=function a(_,$,j){return internalDeepEqual(_,$,j,getSideChannel())},preview={},previewCamera={},validation={},__importDefault$4=commonjsGlobal&&commonjsGlobal.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(validation,"__esModule",{value:!0});validation.validateType=validation.generateLazyValidator=validation.Ajv=void 0;const ajv_1=__importDefault$4(ajvExports);validation.Ajv=ajv_1.default;const ajv_keywords_1=__importDefault$4(distExports$2),ajv_errors_1=__importDefault$4(distExports$1);function generateLazyValidator(a,_){let $=null;const j=(_e,et)=>{if(!$){const tt=new ajv_1.default({$data:!0,allErrors:!0});(0,ajv_keywords_1.default)(tt),(0,ajv_errors_1.default)(tt,{singleError:!0}),_==null||_.forEach(rt=>tt.addKeyword(rt)),$=tt.compile(a),Object.defineProperty(j,"errors",{get(){return $==null?void 0:$.errors}})}return $(_e,et)};return j}validation.generateLazyValidator=generateLazyValidator;function validateType(a,_){return a.validate(_)}validation.validateType=validateType;(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PreviewCamera=void 0;const _=validation;(function($){$.STATIC="static",$.INTERACTIVE="interactive"})(a.PreviewCamera||(a.PreviewCamera={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.PreviewCamera||(a.PreviewCamera={}))})(previewCamera);var previewConfig={};Object.defineProperty(previewConfig,"__esModule",{value:!0});var previewController={};Object.defineProperty(previewController,"__esModule",{value:!0});var previewEmoteEventType={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PreviewEmoteEventType=void 0;const _=validation;(function($){$.ANIMATION_PLAY="animation_play",$.ANIMATION_PAUSE="animation_pause",$.ANIMATION_LOOP="animation_loop",$.ANIMATION_END="animation_end",$.ANIMATION_PLAYING="animation_playing"})(a.PreviewEmoteEventType||(a.PreviewEmoteEventType={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.PreviewEmoteEventType||(a.PreviewEmoteEventType={}))})(previewEmoteEventType);var previewEmote={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PreviewEmote=void 0;const _=validation;(function($){$.IDLE="idle",$.WALK="walk",$.RUN="run",$.JUMP="jump",$.CLAP="clap",$.DAB="dab",$.DANCE="dance",$.FASHION="fashion",$.FASHION_2="fashion-2",$.FASHION_3="fashion-3",$.FASHION_4="fashion-4",$.LOVE="love",$.MONEY="money",$.FIST_PUMP="fist-pump",$.HEAD_EXPLODE="head-explode",$.WAVE="wave"})(a.PreviewEmote||(a.PreviewEmote={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.PreviewEmote||(a.PreviewEmote={}))})(previewEmote);var previewMessage={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.sendMessage=a.PreviewMessageType=void 0;const _=validation;(function(j){j.READY="ready",j.LOAD="load",j.ERROR="error",j.UPDATE="update",j.CONTROLLER_REQUEST="controller_request",j.CONTROLLER_RESPONSE="controller_response",j.EMOTE_EVENT="emote_event"})(a.PreviewMessageType||(a.PreviewMessageType={})),function(j){j.schema={type:"string",enum:Object.values(j)},j.validate=(0,_.generateLazyValidator)(j.schema)}(a.PreviewMessageType||(a.PreviewMessageType={}));const $=(j,_e,et,tt="*")=>{const rt={type:_e,payload:et};j.postMessage(rt,tt)};a.sendMessage=$})(previewMessage);var previewOptions={};Object.defineProperty(previewOptions,"__esModule",{value:!0});var previewProjection={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PreviewProjection=void 0;const _=validation;(function($){$.ORTHOGRAPHIC="orthographic",$.PERSPECTIVE="perspective"})(a.PreviewProjection||(a.PreviewProjection={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.PreviewProjection||(a.PreviewProjection={}))})(previewProjection);var previewType={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PreviewType=void 0;const _=validation;(function($){$.TEXTURE="texture",$.WEARABLE="wearable",$.AVATAR="avatar"})(a.PreviewType||(a.PreviewType={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.PreviewType||(a.PreviewType={}))})(previewType);var wearableRepresentationDefinition={};Object.defineProperty(wearableRepresentationDefinition,"__esModule",{value:!0});var wearableRepresentationWithBlobs={};Object.defineProperty(wearableRepresentationWithBlobs,"__esModule",{value:!0});var wearableDefinition={};Object.defineProperty(wearableDefinition,"__esModule",{value:!0});var wearableWithBlobs={};Object.defineProperty(wearableWithBlobs,"__esModule",{value:!0});var emoteRepresentationDefinition={};Object.defineProperty(emoteRepresentationDefinition,"__esModule",{value:!0});var emoteRepresentationWithBlobs={};Object.defineProperty(emoteRepresentationWithBlobs,"__esModule",{value:!0});var emoteDefinition={};Object.defineProperty(emoteDefinition,"__esModule",{value:!0});var emoteWithBlobs={};Object.defineProperty(emoteWithBlobs,"__esModule",{value:!0});(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(previewCamera,a),$(previewConfig,a),$(previewController,a),$(previewEmoteEventType,a),$(previewEmote,a),$(previewMessage,a),$(previewOptions,a),$(previewProjection,a),$(previewType,a),$(wearableRepresentationDefinition,a),$(wearableRepresentationWithBlobs,a),$(wearableDefinition,a),$(wearableWithBlobs,a),$(emoteRepresentationDefinition,a),$(emoteRepresentationWithBlobs,a),$(emoteDefinition,a),$(emoteWithBlobs,a)})(preview);var debounce$1={},__spreadArray=commonjsGlobal&&commonjsGlobal.__spreadArray||function(a,_,$){if($||arguments.length===2)for(var j=0,_e=_.length,et;j<_e;j++)(et||!(j in _))&&(et||(et=Array.prototype.slice.call(_,0,j)),et[j]=_[j]);return a.concat(et||Array.prototype.slice.call(_))};Object.defineProperty(debounce$1,"__esModule",{value:!0});debounce$1.createDebounce=void 0;function createDebounce(){var a=null;return function(_,$){for(var j=[],_e=2;_e<arguments.length;_e++)j[_e-2]=arguments[_e];a&&clearTimeout(a),a=setTimeout.apply(void 0,__spreadArray([_,$],j,!1))}}debounce$1.createDebounce=createDebounce;var WearablePreview_controller={},fpFuture={};Object.defineProperty(fpFuture,"__esModule",{value:!0});function future(){let a,_;const $=new Promise((j,_e)=>{a=et=>{j(et),$.isPending=!1},_=et=>{_e(et),$.isPending=!1}}).catch(j=>Promise.reject(j));return $.resolve=a,$.reject=_,"finally"in $||($.finally=j=>{$.then(j),$.catch(j)}),$.isPending=!0,$}fpFuture.future=future;fpFuture.default=future;var __importDefault$3=commonjsGlobal&&commonjsGlobal.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(WearablePreview_controller,"__esModule",{value:!0});WearablePreview_controller.createController=void 0;var events_1=eventsExports,fp_future_1=__importDefault$3(fpFuture),preview_1$1=preview,promises=new Map,emoteEvents=new Map;window.onmessage=function a(_){if(_.data&&_.data.type)switch(_.data.type){case preview_1$1.PreviewMessageType.CONTROLLER_RESPONSE:{var $=_.data.payload,j=$.id,_e=promises.get(j);_e&&($.ok?_e.resolve($.result):$.ok===!1&&_e.reject(new Error($.error)));break}case preview_1$1.PreviewMessageType.EMOTE_EVENT:{var $=_.data.payload,et=$.type,tt=$.payload,rt=emoteEvents.get(_.source);rt&&et&&rt.emit(et,tt);break}}};var nonce=0;function createSendRequest(a){return function($,j,_e){var et=document.getElementById(a),tt=a+"-"+nonce,rt=(0,fp_future_1.default)();promises.set(tt,rt);var at=preview_1$1.PreviewMessageType.CONTROLLER_REQUEST,ct={id:tt,namespace:$,method:j,params:_e};return(0,preview_1$1.sendMessage)(et.contentWindow,at,ct),nonce++,rt}}function createController(a){var _,$=document.getElementById(a);if(!$)throw new Error('Could not find an iframe with id="'.concat(a,'"'));var j=(_=emoteEvents.get($.contentWindow))!==null&&_!==void 0?_:new events_1.EventEmitter;emoteEvents.set($.contentWindow,j);var _e=createSendRequest(a);return{scene:{getScreenshot:function(et,tt){return _e("scene","getScreenshot",[et,tt])},getMetrics:function(){return _e("scene","getMetrics",[])},changeZoom:function(et){return _e("scene","changeZoom",[et])},panCamera:function(et){return _e("scene","panCamera",[et])},changeCameraPosition:function(et){return _e("scene","changeCameraPosition",[et])}},emote:{getLength:function(){return _e("emote","getLength",[])},isPlaying:function(){return _e("emote","isPlaying",[])},goTo:function(et){return _e("emote","goTo",[et])},play:function(){return _e("emote","play",[])},pause:function(){return _e("emote","pause",[])},stop:function(){return _e("emote","stop",[])},enableSound:function(){return _e("emote","enableSound",[])},disableSound:function(){return _e("emote","disableSound",[])},hasSound:function(){return _e("emote","hasSound",[])},events:j}}}WearablePreview_controller.createController=createController;const WearablePreview$1="";var config={};const WEARABLE_PREVIEW_URL$2="https://wearable-preview.decentraland.zone",ACCOUNT_URL$2="https://decentraland.zone/account",PROFILE_URL$2="https://decentraland.zone/profile",MARKETPLACE_URL$2="https://decentraland.zone/marketplace",MARKETPLACE_NAMES_URL$2="https://decentraland.zone/marketplace/names/claim",MARKETPLACE_WEARABLES_URL$2="https://decentraland.zone/marketplace/browse?section=wearables&vendor=decentraland&page=1&sortBy=newest&status=on_sale",MARKETPLACE_LANDS_URL$2="https://decentraland.zone/marketplace/lands",MARKETPLACE_EMOTES_URL$2="https://decentraland.zone/marketplace/browse?assetType=item&section=emotes&vendor=decentraland&page=1&sortBy=newest&status=on_sale",MARKETPLACE_MY_ASSETS_URL$2="https://decentraland.zone/marketplace/account?assetType=nft&section=wearables&vendor=decentraland&page=1&sortBy=newest&onlyOnSale=false",MARKETPLACE_SETTINGS_URL$2="https://decentraland.zone/marketplace/settings",BUILDER_URL$2="https://decentraland.zone/builder",BUILDER_WEARABLE_EMOTES_URL$2="https://decentraland.zone/builder/collections",BUILDER_SCENES_URL$2="https://decentraland.zone/builder/scenes",BUILDER_NAMES_URL$2="https://decentraland.zone/builder/names",BUILDER_WORLDS_URL$2="https://decentraland.zone/builder/worlds?tab=dcl",BUILDER_LAND_URL$2="https://decentraland.zone/builder/land",DAO_URL$2="https://decentraland.zone/dao",DAO_GRANTS_URL$2="https://decentraland.zone/dao/grants/",GOVERNANCE_URL$2="https://decentraland.zone/governance",GOVERNANCE_TRANSPARENCY_URL$2="https://decentraland.zone/governance/transparency/",GOVERNANCE_PROPOSALS_URL$2="https://decentraland.zone/governance/proposals/",GOVERNANCE_PROJECTS_URL$2="https://decentraland.zone/governance/projects/",EVENTS_URL$2="https://decentraland.zone/events",EVENTS_MY_EVENTS$2="https://decentraland.zone/events/me/",PLACES_URL$2="https://decentraland.zone/places",PLACES_MY_FAVORITE_URL$2="https://decentraland.zone/places/favorites/",EXPLORER_URL$2="https://play.decentraland.zone",STUDIOS_URL$2="https://studios.decentraland.org/",DOCS_ABOUT_URL$2="https://docs.decentraland.org/player/",DOCS_CREATORS_URL$2="https://docs.decentraland.org/creator/",DOCS_CONTRIBUTOR_URL$2="https://docs.decentraland.org/contributor/",DOCS_DAO_URL$2="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",BLOG_URL$2="https://decentraland.zone/blog/",require$$1={WEARABLE_PREVIEW_URL:WEARABLE_PREVIEW_URL$2,ACCOUNT_URL:ACCOUNT_URL$2,PROFILE_URL:PROFILE_URL$2,MARKETPLACE_URL:MARKETPLACE_URL$2,MARKETPLACE_NAMES_URL:MARKETPLACE_NAMES_URL$2,MARKETPLACE_WEARABLES_URL:MARKETPLACE_WEARABLES_URL$2,MARKETPLACE_LANDS_URL:MARKETPLACE_LANDS_URL$2,MARKETPLACE_EMOTES_URL:MARKETPLACE_EMOTES_URL$2,MARKETPLACE_MY_ASSETS_URL:MARKETPLACE_MY_ASSETS_URL$2,MARKETPLACE_SETTINGS_URL:MARKETPLACE_SETTINGS_URL$2,BUILDER_URL:BUILDER_URL$2,BUILDER_WEARABLE_EMOTES_URL:BUILDER_WEARABLE_EMOTES_URL$2,BUILDER_SCENES_URL:BUILDER_SCENES_URL$2,BUILDER_NAMES_URL:BUILDER_NAMES_URL$2,BUILDER_WORLDS_URL:BUILDER_WORLDS_URL$2,BUILDER_LAND_URL:BUILDER_LAND_URL$2,DAO_URL:DAO_URL$2,DAO_GRANTS_URL:DAO_GRANTS_URL$2,GOVERNANCE_URL:GOVERNANCE_URL$2,GOVERNANCE_TRANSPARENCY_URL:GOVERNANCE_TRANSPARENCY_URL$2,GOVERNANCE_PROPOSALS_URL:GOVERNANCE_PROPOSALS_URL$2,GOVERNANCE_PROJECTS_URL:GOVERNANCE_PROJECTS_URL$2,EVENTS_URL:EVENTS_URL$2,EVENTS_MY_EVENTS:EVENTS_MY_EVENTS$2,PLACES_URL:PLACES_URL$2,PLACES_MY_FAVORITE_URL:PLACES_MY_FAVORITE_URL$2,EXPLORER_URL:EXPLORER_URL$2,STUDIOS_URL:STUDIOS_URL$2,DOCS_ABOUT_URL:DOCS_ABOUT_URL$2,DOCS_CREATORS_URL:DOCS_CREATORS_URL$2,DOCS_CONTRIBUTOR_URL:DOCS_CONTRIBUTOR_URL$2,DOCS_DAO_URL:DOCS_DAO_URL$2,BLOG_URL:BLOG_URL$2},WEARABLE_PREVIEW_URL$1="https://wearable-preview.decentraland.today",ACCOUNT_URL$1="https://decentraland.today/account",PROFILE_URL$1="https://decentraland.today/profile",MARKETPLACE_URL$1="https://decentraland.today/marketplace",MARKETPLACE_NAMES_URL$1="https://decentraland.today/marketplace/names/claim",MARKETPLACE_WEARABLES_URL$1="https://decentraland.today/marketplace/browse?section=wearables&vendor=decentraland&page=1&sortBy=newest&status=on_sale",MARKETPLACE_LANDS_URL$1="https://decentraland.today/marketplace/lands",MARKETPLACE_EMOTES_URL$1="https://decentraland.today/marketplace/browse?assetType=item&section=emotes&vendor=decentraland&page=1&sortBy=newest&status=on_sale",MARKETPLACE_MY_ASSETS_URL$1="https://decentraland.today/marketplace/account?assetType=nft&section=wearables&vendor=decentraland&page=1&sortBy=newest&onlyOnSale=false",MARKETPLACE_SETTINGS_URL$1="https://decentraland.zone/marketplace/settings",BUILDER_URL$1="https://decentraland.today/builder",BUILDER_WEARABLE_EMOTES_URL$1="https://decentraland.today/builder/collections",BUILDER_SCENES_URL$1="https://decentraland.today/builder/scenes",BUILDER_NAMES_URL$1="https://decentraland.today/builder/names",BUILDER_WORLDS_URL$1="https://decentraland.today/builder/worlds?tab=dcl",BUILDER_LAND_URL$1="https://decentraland.today/builder/land",DAO_URL$1="https://decentraland.today/dao",DAO_GRANTS_URL$1="https://decentraland.today/dao/grants/",GOVERNANCE_URL$1="https://decentraland.zone/governance",GOVERNANCE_TRANSPARENCY_URL$1="https://decentraland.zone/governance/transparency/",GOVERNANCE_PROPOSALS_URL$1="https://decentraland.zone/governance/proposals/",GOVERNANCE_PROJECTS_URL$1="https://decentraland.zone/governance/projects/",EVENTS_URL$1="https://decentraland.zone/events",EVENTS_MY_EVENTS$1="https://decentraland.zone/events/me/",PLACES_URL$1="https://decentraland.zone/places",PLACES_MY_FAVORITE_URL$1="https://decentraland.zone/places/favorites/",EXPLORER_URL$1="https://play.decentraland.today",STUDIOS_URL$1="https://studios.decentraland.org/",DOCS_ABOUT_URL$1="https://docs.decentraland.org/player/",DOCS_CREATORS_URL$1="https://docs.decentraland.org/creator/",DOCS_CONTRIBUTOR_URL$1="https://docs.decentraland.org/contributor/",DOCS_DAO_URL$1="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",BLOG_URL$1="https://decentraland.today/blog/",require$$2$1={WEARABLE_PREVIEW_URL:WEARABLE_PREVIEW_URL$1,ACCOUNT_URL:ACCOUNT_URL$1,PROFILE_URL:PROFILE_URL$1,MARKETPLACE_URL:MARKETPLACE_URL$1,MARKETPLACE_NAMES_URL:MARKETPLACE_NAMES_URL$1,MARKETPLACE_WEARABLES_URL:MARKETPLACE_WEARABLES_URL$1,MARKETPLACE_LANDS_URL:MARKETPLACE_LANDS_URL$1,MARKETPLACE_EMOTES_URL:MARKETPLACE_EMOTES_URL$1,MARKETPLACE_MY_ASSETS_URL:MARKETPLACE_MY_ASSETS_URL$1,MARKETPLACE_SETTINGS_URL:MARKETPLACE_SETTINGS_URL$1,BUILDER_URL:BUILDER_URL$1,BUILDER_WEARABLE_EMOTES_URL:BUILDER_WEARABLE_EMOTES_URL$1,BUILDER_SCENES_URL:BUILDER_SCENES_URL$1,BUILDER_NAMES_URL:BUILDER_NAMES_URL$1,BUILDER_WORLDS_URL:BUILDER_WORLDS_URL$1,BUILDER_LAND_URL:BUILDER_LAND_URL$1,DAO_URL:DAO_URL$1,DAO_GRANTS_URL:DAO_GRANTS_URL$1,GOVERNANCE_URL:GOVERNANCE_URL$1,GOVERNANCE_TRANSPARENCY_URL:GOVERNANCE_TRANSPARENCY_URL$1,GOVERNANCE_PROPOSALS_URL:GOVERNANCE_PROPOSALS_URL$1,GOVERNANCE_PROJECTS_URL:GOVERNANCE_PROJECTS_URL$1,EVENTS_URL:EVENTS_URL$1,EVENTS_MY_EVENTS:EVENTS_MY_EVENTS$1,PLACES_URL:PLACES_URL$1,PLACES_MY_FAVORITE_URL:PLACES_MY_FAVORITE_URL$1,EXPLORER_URL:EXPLORER_URL$1,STUDIOS_URL:STUDIOS_URL$1,DOCS_ABOUT_URL:DOCS_ABOUT_URL$1,DOCS_CREATORS_URL:DOCS_CREATORS_URL$1,DOCS_CONTRIBUTOR_URL:DOCS_CONTRIBUTOR_URL$1,DOCS_DAO_URL:DOCS_DAO_URL$1,BLOG_URL:BLOG_URL$1},WEARABLE_PREVIEW_URL="https://wearable-preview.decentraland.org",ACCOUNT_URL="https://decentraland.org/account",PROFILE_URL="https://decentraland.org/profile",MARKETPLACE_URL="https://decentraland.org/marketplace",MARKETPLACE_NAMES_URL="https://decentraland.org/marketplace/names/claim",MARKETPLACE_WEARABLES_URL="https://decentraland.org/marketplace/browse?section=wearables&vendor=decentraland&page=1&sortBy=newest&status=on_sale",MARKETPLACE_LANDS_URL="https://decentraland.org/marketplace/lands",MARKETPLACE_EMOTES_URL="https://decentraland.org/marketplace/browse?assetType=item&section=emotes&vendor=decentraland&page=1&sortBy=newest&status=on_sale",MARKETPLACE_MY_ASSETS_URL="https://decentraland.org/marketplace/account?assetType=nft&section=wearables&vendor=decentraland&page=1&sortBy=newest&onlyOnSale=false",MARKETPLACE_SETTINGS_URL="https://decentraland.org/marketplace/settings",BUILDER_URL="https://decentraland.org/builder",BUILDER_WEARABLE_EMOTES_URL="https://decentraland.org/builder/collections",BUILDER_SCENES_URL="https://decentraland.org/builder/scenes",BUILDER_NAMES_URL="https://decentraland.org/builder/names",BUILDER_WORLDS_URL="https://decentraland.org/builder/worlds?tab=dcl",BUILDER_LAND_URL="https://decentraland.org/builder/land",DAO_URL="https://decentraland.org/dao",DAO_GRANTS_URL="https://decentraland.org/dao/grants/",GOVERNANCE_URL="https://decentraland.org/governance",GOVERNANCE_TRANSPARENCY_URL="https://decentraland.org/governance/transparency/",GOVERNANCE_PROPOSALS_URL="https://decentraland.org/governance/proposals/",GOVERNANCE_PROJECTS_URL="https://decentraland.org/governance/projects/",EVENTS_URL="https://decentraland.org/events",EVENTS_MY_EVENTS="https://decentraland.org/events/me/",PLACES_URL="https://decentraland.org/places",PLACES_MY_FAVORITE_URL="https://decentraland.org/places/favorites/",EXPLORER_URL="https://play.decentraland.org",STUDIOS_URL="https://studios.decentraland.org/",DOCS_ABOUT_URL="https://docs.decentraland.org/player/",DOCS_CREATORS_URL="https://docs.decentraland.org/creator/",DOCS_CONTRIBUTOR_URL="https://docs.decentraland.org/contributor/",DOCS_DAO_URL="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",BLOG_URL="https://decentraland.org/blog/",require$$3={WEARABLE_PREVIEW_URL,ACCOUNT_URL,PROFILE_URL,MARKETPLACE_URL,MARKETPLACE_NAMES_URL,MARKETPLACE_WEARABLES_URL,MARKETPLACE_LANDS_URL,MARKETPLACE_EMOTES_URL,MARKETPLACE_MY_ASSETS_URL,MARKETPLACE_SETTINGS_URL,BUILDER_URL,BUILDER_WEARABLE_EMOTES_URL,BUILDER_SCENES_URL,BUILDER_NAMES_URL,BUILDER_WORLDS_URL,BUILDER_LAND_URL,DAO_URL,DAO_GRANTS_URL,GOVERNANCE_URL,GOVERNANCE_TRANSPARENCY_URL,GOVERNANCE_PROPOSALS_URL,GOVERNANCE_PROJECTS_URL,EVENTS_URL,EVENTS_MY_EVENTS,PLACES_URL,PLACES_MY_FAVORITE_URL,EXPLORER_URL,STUDIOS_URL,DOCS_ABOUT_URL,DOCS_CREATORS_URL,DOCS_CONTRIBUTOR_URL,DOCS_DAO_URL,BLOG_URL};var __importDefault$2=commonjsGlobal&&commonjsGlobal.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},_a;Object.defineProperty(config,"__esModule",{value:!0});config.config=void 0;var ui_env_1=dist$4,dev_json_1=__importDefault$2(require$$1),stg_json_1=__importDefault$2(require$$2$1),prod_json_1=__importDefault$2(require$$3);config.config=(0,ui_env_1.createConfig)((_a={},_a[ui_env_1.Env.DEVELOPMENT]=dev_json_1.default,_a[ui_env_1.Env.STAGING]=stg_json_1.default,_a[ui_env_1.Env.PRODUCTION]=prod_json_1.default,_a));var __extends$3=commonjsGlobal&&commonjsGlobal.__extends||function(){var a=function(_,$){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(j,_e){j.__proto__=_e}||function(j,_e){for(var et in _e)Object.prototype.hasOwnProperty.call(_e,et)&&(j[et]=_e[et])},a(_,$)};return function(_,$){if(typeof $!="function"&&$!==null)throw new TypeError("Class extends value "+String($)+" is not a constructor or null");a(_,$);function j(){this.constructor=_}_.prototype=$===null?Object.create($):(j.prototype=$.prototype,new j)}}(),__createBinding$3=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(a,_,$,j){j===void 0&&(j=$);var _e=Object.getOwnPropertyDescriptor(_,$);(!_e||("get"in _e?!_.__esModule:_e.writable||_e.configurable))&&(_e={enumerable:!0,get:function(){return _[$]}}),Object.defineProperty(a,j,_e)}:function(a,_,$,j){j===void 0&&(j=$),a[j]=_[$]}),__setModuleDefault$3=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(a,_){Object.defineProperty(a,"default",{enumerable:!0,value:_})}:function(a,_){a.default=_}),__importStar$3=commonjsGlobal&&commonjsGlobal.__importStar||function(a){if(a&&a.__esModule)return a;var _={};if(a!=null)for(var $ in a)$!=="default"&&Object.prototype.hasOwnProperty.call(a,$)&&__createBinding$3(_,a,$);return __setModuleDefault$3(_,a),_},__rest$1=commonjsGlobal&&commonjsGlobal.__rest||function(a,_){var $={};for(var j in a)Object.prototype.hasOwnProperty.call(a,j)&&_.indexOf(j)<0&&($[j]=a[j]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,j=Object.getOwnPropertySymbols(a);_e<j.length;_e++)_.indexOf(j[_e])<0&&Object.prototype.propertyIsEnumerable.call(a,j[_e])&&($[j[_e]]=a[j[_e]]);return $},__importDefault$1=commonjsGlobal&&commonjsGlobal.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(WearablePreview$2,"__esModule",{value:!0});var WearablePreview_2=WearablePreview$2.WearablePreview=void 0,React$3=__importStar$3(reactExports),deep_equal_1=__importDefault$1(deepEqual),preview_1=preview,debounce_1=debounce$1,WearablePreview_controller_1=WearablePreview_controller,config_1=config,debounce=(0,debounce_1.createDebounce)(),WearablePreview=function(a){__extends$3(_,a);function _(){var $=a!==null&&a.apply(this,arguments)||this;return $.state={isReady:!1,pendingOptions:null,lastOptions:null},$.iframe=null,$.getUrl=function(){var j=$.props,_e=j.contractAddress,et=j.tokenId,tt=j.itemId,rt=j.profile,at=j.urns,ct=j.urls,dt=j.base64s,yt=j.skin,bt=j.hair,Et=j.eyes,$t=j.bodyShape,_t=j.emote,xt=j.camera,St=j.projection,Mt=j.zoom,Tt=j.background,Rt=j.offsetX,Ct=j.offsetY,It=j.offsetZ,kt=j.cameraX,Dt=j.cameraY,Bt=j.cameraZ,zt=j.wheelZoom,vt=j.wheelPrecision,nt=j.wheelStart,st=j.disableBackground,lt=j.disableAutoRotate,ht=j.disableAutoCenter,mt=j.disableFace,wt=j.disableDefaultWearables,At=j.disableDefaultEmotes,gt=j.disableFadeEffect,ot=j.showSceneBoundaries,pt=j.showThumbnailBoundaries,Pt=j.panning,Ot=j.lockAlpha,Nt=j.lockBeta,jt=j.lockRadius,Ut=j.dev,Vt=j.baseUrl,rr=j.peerUrl,tr=j.nftServerUrl,Zt=j.type,Yt=_e?"contract=".concat(_e):"",Wt=et?"token=".concat(et):"",fr=tt?"item=".concat(tt):"",jr=rt?"profile=".concat(rt):"",Sr=at&&at.length>0?at.map(function(er){return"urn=".concat(er)}).join("&"):"",Er=ct&&ct.length>0?ct.map(function(er){return"url=".concat(er)}).join("&"):"",sn=dt&&dt.length>0?dt.map(function(er){return"base64=".concat(er)}).join("&"):"",Ir=yt?"skin=".concat(yt):"",gr=bt?"hair=".concat(bt):"",ln=Et?"eyes=".concat(Et):"",Mr=$t?"bodyShape=".concat($t):"",Vr=_t?"emote=".concat(_t):"",pn=xt?"camera=".concat(xt):"",Gr=St?"projection=".concat(St):"",Zr=isNaN(Mt)?"":"zoom=".concat(Mt),Mn=Tt?"background=".concat(Tt):"",Wr=isNaN(Rt)?"":"offsetX=".concat(Rt),Qr=isNaN(Ct)?"":"offsetY=".concat(Ct),On=isNaN(It)?"":"offsetZ=".concat(It),Kt=isNaN(kt)?"":"cameraX=".concat(kt),Lt=isNaN(Dt)?"":"cameraY=".concat(Dt),Ht=isNaN(Bt)?"":"cameraZ=".concat(Bt),Xt=isNaN(zt)?"":"wheelZoom=".concat(zt),cr=isNaN(vt)?"":"wheelPrecision=".concat(vt),qr=isNaN(nt)?"":"wheelStart=".concat(nt),br=st?"disableBackground":"",Ur=lt?"disableAutoRotate":"",$n=ht?"disableAutoCenter":"",Hr=mt?"disableFace":"",Xr=wt?"disableDefaultWearables":"",mn=At?"disableDefaultEmotes":"",Fr=gt?"disableFadeEffect":"",an=ot?"showSceneBoundaries":"",Nn=pt?"showThumbnailBoundaries":"",ar=rr?"peerUrl=".concat(rr):"",Jt=tr?"nftServerUrl=".concat(tr):"",_r=Zt?"type=".concat(Zt):"",ur=Pt===!1?"panning=false":"",$r=Ot?"lockAlpha=true":"",en=Nt?"lockBeta=true":"",Rr=jt?"lockRadius=true":"",Br=Ut?"env=dev":"",fn=Vt+"?"+[Yt,Wt,fr,jr,Sr,Er,sn,Ir,gr,ln,Mr,Vr,pn,Gr,Zr,Mn,Wr,Qr,On,Kt,Lt,Ht,Xt,cr,qr,br,Ur,$n,Hr,Xr,mn,Fr,an,Nn,ar,Jt,_r,ur,$r,en,Rr,Br].filter(function(er){return!!er}).join("&");return fn},$.getOptions=function(){var j=$.props;j.dev;var _e=__rest$1(j,["dev"]),et={};for(var tt in _e)typeof _e[tt]!="function"&&(et[tt]=_e[tt]);return et},$.handleMessage=function(j){var _e=$.props,et=_e.baseUrl,tt=_e.onLoad,rt=_e.onError,at=j.origin;if(at===et&&j.data&&j.data.type){var ct=j.data.type;switch(ct){case preview_1.PreviewMessageType.LOAD:{tt();break}case preview_1.PreviewMessageType.ERROR:{var dt=j.data.payload;rt(new Error(dt.message));break}case preview_1.PreviewMessageType.READY:{var yt=$.state,bt=yt.isReady,Et=yt.pendingOptions;if(bt)return;Et!==null?($.sendUpdate(Et),$.setState({isReady:!0,pendingOptions:null})):$.setState({isReady:!0});break}}}},$.handleUpdate=function(){if($.iframe){if(window){var j=$.getOptions();$.state.isReady?$.sendUpdate(j):$.setState({pendingPreviewOptions:j})}}else console.warn("Could not send update, iframe is not referenced")},$.sendUpdate=function(j){var _e=$.state.lastOptions;if(!_e||!(0,deep_equal_1.default)(j,_e)){(0,preview_1.sendMessage)($.iframe.contentWindow,preview_1.PreviewMessageType.UPDATE,{options:j});var et=$.props.onUpdate;et(j),$.setState({lastOptions:j})}},$.refIframe=function(j){$.iframe=j},$}return _.createController=function($){return(0,WearablePreview_controller_1.createController)($)},_.prototype.componentDidMount=function(){window.addEventListener("message",this.handleMessage,!1),this.setState({url:this.getUrl()}),this.props.blob&&this.handleUpdate()},_.prototype.componentWillUnmount=function(){window.removeEventListener("message",this.handleMessage,!1)},_.prototype.componentDidUpdate=function(){debounce(this.handleUpdate,500)},_.prototype.render=function(){return this.props.tokenId&&this.props.itemId&&console.warn("You should NOT use `tokenId` and `itemId` props simultaneously"),React$3.createElement("iframe",{id:this.props.id,className:"WearablePreview",src:this.state.url,width:"100%",height:"100%",frameBorder:"0",ref:this.refIframe,allow:"autoplay"})},_.defaultProps={dev:!1,baseUrl:config_1.config.get("WEARABLE_PREVIEW_URL"),onLoad:function(){},onError:function(){},onUpdate:function(){}},_}(React$3.PureComponent);WearablePreview_2=WearablePreview$2.WearablePreview=WearablePreview;const CustomWearablePreview$1="",CustomWearablePreview=a=>{const[_,$]=reactExports.useState(!0);reactExports.useEffect(()=>$(!0),[a.profile]);const j=reactExports.useMemo(()=>{const et=tt=>{const rt="platform.glb",at="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239233428.commit-2de01c8";return{bodyShapes:[`urn:decentraland:off-chain:base-avatars:${tt}`],mainFile:rt,contents:[{key:rt,url:`${at}/misc/platform/${rt}`}]}};return btoa(JSON.stringify({data:{representations:[et("BaseMale"),et("BaseFemale")]}}))},[]),_e=reactExports.useCallback(()=>$(!1),[]);return jsxRuntimeExports.jsxs("div",{className:"CustomWearablePreview",children:[jsxRuntimeExports.jsx(WearablePreview_2,{lockBeta:!0,panning:!1,disableBackground:!0,profile:a.profile,dev:!1,emote:dist$8.PreviewEmote.WAVE,disableAutoRotate:!0,cameraY:.2,base64s:[j],onLoad:_e}),_?jsxRuntimeExports.jsx(Loader_3,{active:!0,size:"huge"}):null]})},background$2="_background_441c2_1",emptyProfile="_emptyProfile_441c2_11",main$5="_main_441c2_27",left$2="_left_441c2_38",right$2="_right_441c2_49",changeAccount="_changeAccount_441c2_57",errorLogo="_errorLogo_441c2_70",logo$1="_logo_441c2_79",title$3="_title_441c2_85",description="_description_441c2_92",code="_code_441c2_99",buttons="_buttons_441c2_106",closeWindow="_closeWindow_441c2_116",errorMessage="_errorMessage_441c2_122",noButton="_noButton_441c2_131",yesButton="_yesButton_441c2_133",communityBubble="_communityBubble_441c2_150",styles$8={background:background$2,emptyProfile,main:main$5,left:left$2,right:right$2,changeAccount,errorLogo,logo:logo$1,title:title$3,description,code,buttons,closeWindow,errorMessage,noButton,yesButton,communityBubble},RequestPage=()=>{usePageTracking();const a=useParams(),_=useNavigateWithSearchParams(),$=reactExports.useRef(),[j,_e]=reactExports.useState(2),[et,tt]=reactExports.useState(!1),[rt,at]=reactExports.useState(),ct=reactExports.useRef(),[dt,yt]=reactExports.useState(),bt=reactExports.useRef(),Et=reactExports.useRef(),$t=a.requestId??"",[_t,xt]=useTargetConfig(),St=reactExports.useCallback(()=>{_(locations.login(`/auth/requests/${$t}?targetConfigId=${xt}`))},[$t]),Mt=reactExports.useCallback(()=>{_(locations.setup(`/auth/requests/${$t}?targetConfigId=${xt}`))},[$t]);reactExports.useEffect(()=>((async()=>{try{const Bt=await getCurrentConnectionData();if(!Bt)throw new Error("No account connected");const zt=await connection$1.getProvider();$.current=new BrowserProvider(zt);const vt=await fetchProfile(Bt.account);if(!_t.skipSetup&&!vt){console.log("There's no profile but the user is logged in, going to setup page"),Mt();return}}catch{console.log("The user isn't logged in, redirecting to the log in page"),St();return}try{const zt=await(await $.current.getSigner()).getAddress();getAnalytics().identify({ethAddress:zt});const vt=await authServerFetch("recover",{requestId:$t});ct.current=vt;const nt=await fetchProfile(zt);if(at(nt),Et.current=zt,vt.sender&&vt.sender!==zt.toLowerCase()){_e(1);return}bt.current=setTimeout(()=>{_e(0)},new Date(vt.expiration).getTime()-Date.now()),vt.method==="dcl_personal_sign"?_e(4):_e(8)}catch(Bt){yt(isErrorWithMessage(Bt)?Bt.message:"Unknown error"),_e(3)}})(),()=>{clearTimeout(bt.current)}),[St,Mt]),reactExports.useEffect(()=>{j!==4&&j!==8&&clearTimeout(bt.current)},[j]);const Tt=reactExports.useCallback(async()=>{var Bt;tt(!0),getAnalytics().track(TrackingEvents.CLICK,{action:ClickEvents.DENY_SIGN_IN});try{const zt=await((Bt=$.current)==null?void 0:Bt.getSigner());zt&&await authServerFetch("outcome",{requestId:$t,sender:await zt.getAddress(),error:{code:-32003,message:"Transaction rejected"}})}finally{tt(!1),_e(5)}},[]),Rt=reactExports.useCallback(async()=>{getAnalytics().track(TrackingEvents.CLICK,{action:ClickEvents.APPROVE_SING_IN}),tt(!0);const Bt=$.current;try{if(!Bt)throw new Error("Provider not created");const zt=await Bt.getSigner(),vt=await zt.signMessage(ct.current.params[0]),nt=await authServerFetch("outcome",{requestId:$t,sender:await zt.getAddress(),result:vt});if(nt.error)throw new Error(nt.error);_e(7),_t.deepLink&&(window.location.href=_t.deepLink)}catch(zt){yt(isErrorWithMessage(zt)?zt.message:"Unknown error"),_e(6)}finally{tt(!1)}},[tt]),Ct=reactExports.useCallback(()=>{getAnalytics().track(TrackingEvents.CLICK,{action:ClickEvents.DENY_WALLET_INTERACTION}),_e(9)},[]),It=reactExports.useCallback(async()=>{var zt;tt(!0);const Bt=$.current;try{if(!Bt)throw new Error("Provider not created");const vt=await Bt.getSigner(),nt=await Bt.send(ct.current.method,ct.current.params);getAnalytics().track(TrackingEvents.CLICK,{action:ClickEvents.APPROVE_WALLET_INTERACTION,method:ct.current.method});const st=await authServerFetch("outcome",{requestId:$t,sender:await vt.getAddress(),result:nt});if(st.error)throw new Error(st.error);_e(11)}catch(vt){console.error("Wallet error",JSON.stringify(vt));const nt=await((zt=$.current)==null?void 0:zt.getSigner());nt&&(isRpcError(vt)?await authServerFetch("outcome",{requestId:$t,sender:await nt.getAddress(),error:vt.error}):await authServerFetch("outcome",{requestId:$t,sender:await nt.getAddress(),error:{code:999,message:isErrorWithMessage(vt)?vt.message:"Unknown error"}})),yt(isErrorWithMessage(vt)?vt.message:"Unknown error"),_e(10)}},[]),kt=reactExports.useCallback(async Bt=>{Bt.preventDefault(),await connection$1.disconnect(),St()},[St]),Dt=reactExports.useCallback(Bt=>_t.showWearablePreview?jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:`${styles$8.background} ${(!Et||rt===null)&&j!==2?styles$8.emptyProfile:""}`}),jsxRuntimeExports.jsxs("div",{className:styles$8.main,children:[jsxRuntimeExports.jsxs("div",{className:styles$8.left,children:[Bt.children,Bt.canChangeAccount?jsxRuntimeExports.jsxs("div",{className:styles$8.changeAccount,children:["Use another profile?"," ",jsxRuntimeExports.jsx("a",{href:"/auth/login",onClick:kt,children:"Return to log in"})]}):null]}),jsxRuntimeExports.jsx("div",{className:styles$8.right,children:Et.current&&rt!==null?jsxRuntimeExports.jsx(CustomWearablePreview,{profile:Et.current}):null}),jsxRuntimeExports.jsx(CommunityBubble$3.CommunityBubble,{className:styles$8.communityBubble})]})]}):jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:`${styles$8.background} ${(!Et||rt===null)&&j!==2?styles$8.emptyProfile:""}`}),jsxRuntimeExports.jsxs("div",{className:styles$8.main,children:[jsxRuntimeExports.jsxs("div",{className:styles$8.left,children:[Bt.children,Bt.canChangeAccount?jsxRuntimeExports.jsxs("div",{className:styles$8.changeAccount,children:["Use another profile?"," ",jsxRuntimeExports.jsx("a",{href:"/auth/login",onClick:kt,children:"Return to log in"})]}):null]}),jsxRuntimeExports.jsx(CommunityBubble$3.CommunityBubble,{className:styles$8.communityBubble})]})]}),[j]);return j===0?jsxRuntimeExports.jsxs(Dt,{children:[jsxRuntimeExports.jsx("div",{className:styles$8.errorLogo}),jsxRuntimeExports.jsx("div",{className:styles$8.title,children:"Looks like you took too long and the request has expired. If the expiration time is still running in the Explorer app, check your computer's time to see if it's set correctly"}),jsxRuntimeExports.jsxs("div",{className:styles$8.description,children:["Please return to Decentraland's ",_t.explorerText," to try again."]}),jsxRuntimeExports.jsx(CloseWindow,{})]}):j===1?jsxRuntimeExports.jsxs(Dt,{canChangeAccount:!0,children:[jsxRuntimeExports.jsx("div",{className:styles$8.errorLogo}),jsxRuntimeExports.jsx("div",{className:styles$8.title,children:"Looks like you are connected with a different account."}),jsxRuntimeExports.jsxs("div",{className:styles$8.description,children:["Please change your wallet account to the one connected to the ",_t.explorerText,"."]})]}):j===2?jsxRuntimeExports.jsx(Dt,{children:jsxRuntimeExports.jsx("div",{className:styles$8.left,children:jsxRuntimeExports.jsx(Loader_3,{active:!0,size:"huge"})})}):j===3?jsxRuntimeExports.jsxs(Dt,{children:[jsxRuntimeExports.jsx("div",{className:styles$8.errorLogo}),jsxRuntimeExports.jsx("div",{className:styles$8.title,children:"There was an error recovering the request..."}),jsxRuntimeExports.jsx("div",{className:styles$8.description,children:"The request is not available anymore. Feel free to create a new one and try again. If the expiration time is still running in the Explorer app, check your computer's time to see if it's set correctly"}),jsxRuntimeExports.jsx(CloseWindow,{}),jsxRuntimeExports.jsx("div",{className:styles$8.errorMessage,children:dt})]}):j===4&&ct.current?jsxRuntimeExports.jsxs(Dt,{canChangeAccount:!0,isLoading:et,children:[jsxRuntimeExports.jsx("div",{className:styles$8.logo}),jsxRuntimeExports.jsx("div",{className:styles$8.title,children:"Verify Sign In"}),jsxRuntimeExports.jsxs("div",{className:styles$8.description,children:["Do you see the same verification number on your ",_t.explorerText,"?"]}),jsxRuntimeExports.jsx("div",{className:styles$8.code,children:ct.current.code}),jsxRuntimeExports.jsxs("div",{className:styles$8.buttons,children:[jsxRuntimeExports.jsxs(Button$5.Button,{inverted:!0,disabled:et,onClick:Tt,className:styles$8.noButton,children:[jsxRuntimeExports.jsx(default_1,{name:"times circle"}),"No, it doesn't"]}),jsxRuntimeExports.jsxs(Button$5.Button,{inverted:!0,loading:et,disabled:et,onClick:Rt,className:styles$8.yesButton,children:[jsxRuntimeExports.jsx(default_1,{name:"check circle"}),"Yes, they are the same"]})]})]}):j===5?jsxRuntimeExports.jsxs(Dt,{canChangeAccount:!0,children:[jsxRuntimeExports.jsx("div",{className:styles$8.errorLogo}),jsxRuntimeExports.jsx("div",{className:styles$8.title,children:"Did the number not match, or was this action not taken by you?"}),jsxRuntimeExports.jsx("div",{className:styles$8.description,children:"If you're trying to sign in, retry the action. If this action was not initiated by you, dismiss this message."}),jsxRuntimeExports.jsx(CloseWindow,{})]}):j===7?jsxRuntimeExports.jsxs(Dt,{children:[jsxRuntimeExports.jsx("div",{className:styles$8.logo}),jsxRuntimeExports.jsx("div",{className:styles$8.title,children:"Your account is ready!"}),jsxRuntimeExports.jsxs("div",{className:styles$8.description,children:["Return to the ",_t.explorerText," and enjoy Decentraland."]}),jsxRuntimeExports.jsx(CloseWindow,{})]}):j===8&&ct.current?jsxRuntimeExports.jsxs(Dt,{canChangeAccount:!0,isLoading:et,children:[jsxRuntimeExports.jsx("div",{className:styles$8.logo}),jsxRuntimeExports.jsxs("div",{className:styles$8.title,children:["The ",_t.explorerText," wants to interact with your wallet."]}),jsxRuntimeExports.jsx("div",{className:styles$8.description,children:"Review the following data carefully on your wallet before approving it."}),jsxRuntimeExports.jsxs("div",{className:styles$8.buttons,children:[jsxRuntimeExports.jsx(Button$5.Button,{inverted:!0,disabled:et,onClick:Ct,children:"Deny"}),jsxRuntimeExports.jsx(Button$5.Button,{primary:!0,disabled:et,loading:et,onClick:It,children:"Allow"})]})]}):j===9?jsxRuntimeExports.jsxs(Dt,{children:[jsxRuntimeExports.jsx("div",{className:styles$8.errorLogo}),jsxRuntimeExports.jsx("div",{className:styles$8.title,children:"Was this action not initiated by you?"}),jsxRuntimeExports.jsx("div",{className:styles$8.description,children:"If this action was not initiated by you, dismiss this message."}),jsxRuntimeExports.jsx(CloseWindow,{})]}):j===11?jsxRuntimeExports.jsxs(Dt,{children:[jsxRuntimeExports.jsx("div",{className:styles$8.logo}),jsxRuntimeExports.jsx("div",{className:styles$8.title,children:"Wallet interaction complete"}),jsxRuntimeExports.jsx("div",{className:styles$8.description,children:"The action has been executed successfully."}),jsxRuntimeExports.jsx(CloseWindow,{})]}):j===6||j===10?jsxRuntimeExports.jsxs(Dt,{children:[jsxRuntimeExports.jsx("div",{className:styles$8.errorLogo}),jsxRuntimeExports.jsx("div",{className:styles$8.title,children:"There was an error while trying to submit the request."}),jsxRuntimeExports.jsxs("div",{className:styles$8.description,children:["Return to the ",_t.explorerText," to try again, or contact support if the error persists."]}),jsxRuntimeExports.jsx(CloseWindow,{}),jsxRuntimeExports.jsx("div",{className:styles$8.errorMessage,children:dt})]}):null},CloseWindow=()=>jsxRuntimeExports.jsx("div",{className:styles$8.closeWindow,children:"You can close this window."}),authServerFetch=async(a,_)=>{const $=config$1.get("AUTH_SERVER_URL"),j=lookup($);await new Promise(et=>{j.on("connect",et)});const _e=await j.emitWithAck(a,_);if(j.close(),_e.error)throw new Error(_e.error);return _e};var Checkbox$4={},Checkbox$3={},Checkbox$2={},set_1,hasRequiredSet;function requireSet(){if(hasRequiredSet)return set_1;hasRequiredSet=1;var a=require_baseSet();function _($,j,_e){return $==null?$:a($,j,_e)}return set_1=_,set_1}var hasRequiredCheckbox;function requireCheckbox(){if(hasRequiredCheckbox)return Checkbox$2;hasRequiredCheckbox=1;var a=interopRequireWildcardExports,_=interopRequireDefaultExports;Checkbox$2.__esModule=!0,Checkbox$2.default=void 0;var $=_(require_extends()),j=_(requireInheritsLoose()),_e=_(requireSet()),et=_(requireInvoke());_(requireGet());var tt=_(requireIsNil()),rt=require$$10,at=_(require$$0$4);_(requirePropTypes());var ct=a(reactExports),dt=requireLib(),yt=function(bt){(0,j.default)(Et,bt);function Et(){for(var _t,xt=arguments.length,St=new Array(xt),Mt=0;Mt<xt;Mt++)St[Mt]=arguments[Mt];return _t=bt.call.apply(bt,[this].concat(St))||this,_t.inputRef=(0,ct.createRef)(),_t.labelRef=(0,ct.createRef)(),_t.canToggle=function(){var Tt=_t.props,Rt=Tt.disabled,Ct=Tt.radio,It=Tt.readOnly,kt=_t.state.checked;return!Rt&&!It&&!(Ct&&kt)},_t.computeTabIndex=function(){var Tt=_t.props,Rt=Tt.disabled,Ct=Tt.tabIndex;return(0,tt.default)(Ct)?Rt?-1:0:Ct},_t.handleClick=function(Tt){var Rt=_t.props.id,Ct=_t.state,It=Ct.checked,kt=Ct.indeterminate,Dt=(0,et.default)(_t.inputRef.current,"contains",Tt.target),Bt=(0,et.default)(_t.labelRef.current,"contains",Tt.target),zt=!Bt&&!Dt,vt=!(0,tt.default)(Rt),nt=Bt&&vt;nt||(0,et.default)(_t.props,"onClick",Tt,(0,$.default)({},_t.props,{checked:!It,indeterminate:!!kt})),_t.isClickFromMouse&&(_t.isClickFromMouse=!1,Bt&&!vt&&_t.handleChange(Tt),zt&&_t.handleChange(Tt),Bt&&vt&&Tt.stopPropagation())},_t.handleChange=function(Tt){var Rt=_t.state.checked;_t.canToggle()&&((0,et.default)(_t.props,"onChange",Tt,(0,$.default)({},_t.props,{checked:!Rt,indeterminate:!1})),_t.setState({checked:!Rt,indeterminate:!1}))},_t.handleMouseDown=function(Tt){var Rt=_t.state,Ct=Rt.checked,It=Rt.indeterminate;(0,et.default)(_t.props,"onMouseDown",Tt,(0,$.default)({},_t.props,{checked:!!Ct,indeterminate:!!It})),Tt.defaultPrevented||(0,et.default)(_t.inputRef.current,"focus"),Tt.preventDefault()},_t.handleMouseUp=function(Tt){var Rt=_t.state,Ct=Rt.checked,It=Rt.indeterminate;_t.isClickFromMouse=!0,(0,et.default)(_t.props,"onMouseUp",Tt,(0,$.default)({},_t.props,{checked:!!Ct,indeterminate:!!It}))},_t.setIndeterminate=function(){var Tt=_t.state.indeterminate;(0,_e.default)(_t.inputRef,"current.indeterminate",!!Tt)},_t}var $t=Et.prototype;return $t.componentDidMount=function(){this.setIndeterminate()},$t.componentDidUpdate=function(){this.setIndeterminate()},$t.render=function(){var xt=this.props,St=xt.className,Mt=xt.disabled,Tt=xt.label,Rt=xt.id,Ct=xt.name,It=xt.radio,kt=xt.readOnly,Dt=xt.slider,Bt=xt.toggle,zt=xt.type,vt=xt.value,nt=this.state,st=nt.checked,lt=nt.indeterminate,ht=(0,at.default)("ui",(0,dt.useKeyOnly)(st,"checked"),(0,dt.useKeyOnly)(Mt,"disabled"),(0,dt.useKeyOnly)(lt,"indeterminate"),(0,dt.useKeyOnly)((0,tt.default)(Tt),"fitted"),(0,dt.useKeyOnly)(It,"radio"),(0,dt.useKeyOnly)(kt,"read-only"),(0,dt.useKeyOnly)(Dt,"slider"),(0,dt.useKeyOnly)(Bt,"toggle"),"checkbox",St),mt=(0,dt.getUnhandledProps)(Et,this.props),wt=(0,dt.getElementType)(Et,this.props),At=(0,dt.partitionHTMLProps)(mt,{htmlProps:dt.htmlInputAttrs}),gt=At[0],ot=At[1],pt=(0,dt.createHTMLLabel)(Tt,{defaultProps:{htmlFor:Rt},autoGenerateKey:!1})||ct.default.createElement("label",{htmlFor:Rt});return ct.default.createElement(wt,(0,$.default)({},ot,{className:ht,onClick:this.handleClick,onChange:this.handleChange,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp}),ct.default.createElement(rt.Ref,{innerRef:this.inputRef},ct.default.createElement("input",(0,$.default)({},gt,{checked:st,className:"hidden",disabled:Mt,id:Rt,name:Ct,readOnly:!0,tabIndex:this.computeTabIndex(),type:zt,value:vt}))),ct.default.createElement(rt.Ref,{innerRef:this.labelRef},pt))},Et}(dt.ModernAutoControlledComponent);return Checkbox$2.default=yt,yt.handledProps=["as","checked","className","defaultChecked","defaultIndeterminate","disabled","fitted","id","indeterminate","label","name","onChange","onClick","onMouseDown","onMouseUp","radio","readOnly","slider","tabIndex","toggle","type","value"],yt.propTypes={},yt.defaultProps={type:"checkbox"},yt.autoControlledProps=["checked","indeterminate"],Checkbox$2}var _interopRequireDefault$3=interopRequireDefaultExports;Checkbox$3.__esModule=!0;var _Checkbox=_interopRequireDefault$3(requireCheckbox());Checkbox$3.default=_Checkbox.default;const Checkbox$1="";(function(a){var _=commonjsGlobal&&commonjsGlobal.__importDefault||function(j){return j&&j.__esModule?j:{default:j}};Object.defineProperty(a,"__esModule",{value:!0}),a.Checkbox=void 0;var $=Checkbox$3;Object.defineProperty(a,"Checkbox",{enumerable:!0,get:function(){return _($).default}})})(Checkbox$4);var Field$2={};const todayButton="Today",nextMonth="Next month",previousMonth="Previous month",nextYear="Next year",previousYear="Previous year",weekdays=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],months=["January","February","March","April","May","June","July","August","September","October","November","December"],require$$0={todayButton,nextMonth,previousMonth,nextYear,previousYear,weekdays,months};function requiredArgs(a,_){if(_.length<a)throw new TypeError(a+" argument"+(a>1?"s":"")+" required, but only "+_.length+" present")}function _typeof$y(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$y=function($){return typeof $}:_typeof$y=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$y(a)}function isDate(a){return requiredArgs(1,arguments),a instanceof Date||_typeof$y(a)==="object"&&Object.prototype.toString.call(a)==="[object Date]"}function _typeof$x(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$x=function($){return typeof $}:_typeof$x=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$x(a)}function toDate$1(a){requiredArgs(1,arguments);var _=Object.prototype.toString.call(a);return a instanceof Date||_typeof$x(a)==="object"&&_==="[object Date]"?new Date(a.getTime()):typeof a=="number"||_==="[object Number]"?new Date(a):((typeof a=="string"||_==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function isValid(a){if(requiredArgs(1,arguments),!isDate(a)&&typeof a!="number")return!1;var _=toDate$1(a);return!isNaN(Number(_))}function e(a,_,$){return a.length+1===_.length&&_.endsWith($)}function r(a,_){if(!_)return _;var $=String(_).replace(/[^\da-zA-Z\n|]/g,""),j=a.split(/[^\da-zA-Z\n|]/g).filter(Boolean).map(function(ct){return ct.length}),_e=a.split(/[\da-zA-Z\n|]/g).filter(Boolean),et=_e[0],tt=_e[_e.length-1];if(a.startsWith(et)){var rt=_e.reduce(function(ct,dt,yt){var bt=j[yt],Et=ct.value.slice(0,bt),$t=ct.value.slice(bt);return{result:Et?ct.result.concat(dt,Et):ct.result,value:$t}},{result:"",value:$}).result.slice(0,a.length);return e(rt,a,tt)?rt.concat(tt):rt}var at=j.reduce(function(ct,dt,yt){var bt=_e[yt]||"",Et="$1"+bt+"$2",$t=dt+ct.prevSlice+ct.prevSeparator.length,_t=new RegExp("(.{"+$t+"})(.)");return{prevSeparator:bt,prevSlice:$t,value:ct.value.replace(_t,Et)}},{prevSeparator:"",prevSlice:0,value:$}).value.slice(0,a.length);return e(at,a,tt)?at.concat(tt):at}function formatStringByPattern(a,_){return _===void 0?function($){return r(a,$)}:r(a,_)}var convertTokens$1={};Object.defineProperty(convertTokens$1,"__esModule",{value:!0});var tokensMap={M:"L",Mo:"Mo",MM:"LL",MMM:"LLL",MMMM:"LLLL",Q:"q",Qo:"qo",D:"d",Do:"do",DD:"dd",DDD:"D",DDDo:"Do",DDDD:"DDD",d:"i",do:"io",dd:"iiiiii",ddd:"iii",dddd:"iiii",A:"a",a:"a",aa:"aaaa",E:"i",W:"I",Wo:"Io",WW:"II",YY:"yy",YYYY:"yyyy",GG:"RR",GGGG:"RRRR",H:"H",HH:"HH",h:"h",hh:"hh",m:"m",mm:"mm",s:"s",ss:"ss",S:"S",SS:"SS",SSS:"SSS",Z:"xxx",ZZ:"xx",X:"t",x:"T"},v1tokens=Object.keys(tokensMap).sort().reverse(),tokensRegExp=new RegExp("(\\[[^\\[]*\\])|(\\\\)?("+v1tokens.join("|")+"|.)","g");function convertTokens(a){var _=a.match(tokensRegExp);return _?_.reduce(function($,j,_e){var et=tokensMap[j];if(!et){var tt=j.match(/^\[(.+)\]$/);tt?$.textBuffer.push(tt[1]):$.textBuffer.push(j)}var rt=_e===_.length-1;return $.textBuffer.length&&(et||rt)&&($.formatBuffer.push("'"+$.textBuffer.join("")+"'"),$.textBuffer=[]),et&&$.formatBuffer.push(et),$},{formatBuffer:[],textBuffer:[]}).formatBuffer.join(""):a}var convertTokens_2=convertTokens$1.convertTokens=convertTokens;function toInteger$2(a){if(a===null||a===!0||a===!1)return NaN;var _=Number(a);return isNaN(_)?_:_<0?Math.ceil(_):Math.floor(_)}function addMilliseconds(a,_){requiredArgs(2,arguments);var $=toDate$1(a).getTime(),j=toInteger$2(_);return new Date($+j)}function subMilliseconds(a,_){requiredArgs(2,arguments);var $=toInteger$2(_);return addMilliseconds(a,-$)}var MILLISECONDS_IN_DAY=864e5;function getUTCDayOfYear(a){requiredArgs(1,arguments);var _=toDate$1(a),$=_.getTime();_.setUTCMonth(0,1),_.setUTCHours(0,0,0,0);var j=_.getTime(),_e=$-j;return Math.floor(_e/MILLISECONDS_IN_DAY)+1}function startOfUTCISOWeek(a){requiredArgs(1,arguments);var _=1,$=toDate$1(a),j=$.getUTCDay(),_e=(j<_?7:0)+j-_;return $.setUTCDate($.getUTCDate()-_e),$.setUTCHours(0,0,0,0),$}function getUTCISOWeekYear(a){requiredArgs(1,arguments);var _=toDate$1(a),$=_.getUTCFullYear(),j=new Date(0);j.setUTCFullYear($+1,0,4),j.setUTCHours(0,0,0,0);var _e=startOfUTCISOWeek(j),et=new Date(0);et.setUTCFullYear($,0,4),et.setUTCHours(0,0,0,0);var tt=startOfUTCISOWeek(et);return _.getTime()>=_e.getTime()?$+1:_.getTime()>=tt.getTime()?$:$-1}function startOfUTCISOWeekYear(a){requiredArgs(1,arguments);var _=getUTCISOWeekYear(a),$=new Date(0);$.setUTCFullYear(_,0,4),$.setUTCHours(0,0,0,0);var j=startOfUTCISOWeek($);return j}var MILLISECONDS_IN_WEEK$1=6048e5;function getUTCISOWeek(a){requiredArgs(1,arguments);var _=toDate$1(a),$=startOfUTCISOWeek(_).getTime()-startOfUTCISOWeekYear(_).getTime();return Math.round($/MILLISECONDS_IN_WEEK$1)+1}var defaultOptions={};function getDefaultOptions(){return defaultOptions}function startOfUTCWeek(a,_){var $,j,_e,et,tt,rt,at,ct;requiredArgs(1,arguments);var dt=getDefaultOptions(),yt=toInteger$2(($=(j=(_e=(et=_==null?void 0:_.weekStartsOn)!==null&&et!==void 0?et:_==null||(tt=_.locale)===null||tt===void 0||(rt=tt.options)===null||rt===void 0?void 0:rt.weekStartsOn)!==null&&_e!==void 0?_e:dt.weekStartsOn)!==null&&j!==void 0?j:(at=dt.locale)===null||at===void 0||(ct=at.options)===null||ct===void 0?void 0:ct.weekStartsOn)!==null&&$!==void 0?$:0);if(!(yt>=0&&yt<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var bt=toDate$1(a),Et=bt.getUTCDay(),$t=(Et<yt?7:0)+Et-yt;return bt.setUTCDate(bt.getUTCDate()-$t),bt.setUTCHours(0,0,0,0),bt}function getUTCWeekYear(a,_){var $,j,_e,et,tt,rt,at,ct;requiredArgs(1,arguments);var dt=toDate$1(a),yt=dt.getUTCFullYear(),bt=getDefaultOptions(),Et=toInteger$2(($=(j=(_e=(et=_==null?void 0:_.firstWeekContainsDate)!==null&&et!==void 0?et:_==null||(tt=_.locale)===null||tt===void 0||(rt=tt.options)===null||rt===void 0?void 0:rt.firstWeekContainsDate)!==null&&_e!==void 0?_e:bt.firstWeekContainsDate)!==null&&j!==void 0?j:(at=bt.locale)===null||at===void 0||(ct=at.options)===null||ct===void 0?void 0:ct.firstWeekContainsDate)!==null&&$!==void 0?$:1);if(!(Et>=1&&Et<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var $t=new Date(0);$t.setUTCFullYear(yt+1,0,Et),$t.setUTCHours(0,0,0,0);var _t=startOfUTCWeek($t,_),xt=new Date(0);xt.setUTCFullYear(yt,0,Et),xt.setUTCHours(0,0,0,0);var St=startOfUTCWeek(xt,_);return dt.getTime()>=_t.getTime()?yt+1:dt.getTime()>=St.getTime()?yt:yt-1}function startOfUTCWeekYear(a,_){var $,j,_e,et,tt,rt,at,ct;requiredArgs(1,arguments);var dt=getDefaultOptions(),yt=toInteger$2(($=(j=(_e=(et=_==null?void 0:_.firstWeekContainsDate)!==null&&et!==void 0?et:_==null||(tt=_.locale)===null||tt===void 0||(rt=tt.options)===null||rt===void 0?void 0:rt.firstWeekContainsDate)!==null&&_e!==void 0?_e:dt.firstWeekContainsDate)!==null&&j!==void 0?j:(at=dt.locale)===null||at===void 0||(ct=at.options)===null||ct===void 0?void 0:ct.firstWeekContainsDate)!==null&&$!==void 0?$:1),bt=getUTCWeekYear(a,_),Et=new Date(0);Et.setUTCFullYear(bt,0,yt),Et.setUTCHours(0,0,0,0);var $t=startOfUTCWeek(Et,_);return $t}var MILLISECONDS_IN_WEEK=6048e5;function getUTCWeek(a,_){requiredArgs(1,arguments);var $=toDate$1(a),j=startOfUTCWeek($,_).getTime()-startOfUTCWeekYear($,_).getTime();return Math.round(j/MILLISECONDS_IN_WEEK)+1}function addLeadingZeros(a,_){for(var $=a<0?"-":"",j=Math.abs(a).toString();j.length<_;)j="0"+j;return $+j}var formatters$2={y:function a(_,$){var j=_.getUTCFullYear(),_e=j>0?j:1-j;return addLeadingZeros($==="yy"?_e%100:_e,$.length)},M:function a(_,$){var j=_.getUTCMonth();return $==="M"?String(j+1):addLeadingZeros(j+1,2)},d:function a(_,$){return addLeadingZeros(_.getUTCDate(),$.length)},a:function a(_,$){var j=_.getUTCHours()/12>=1?"pm":"am";switch($){case"a":case"aa":return j.toUpperCase();case"aaa":return j;case"aaaaa":return j[0];case"aaaa":default:return j==="am"?"a.m.":"p.m."}},h:function a(_,$){return addLeadingZeros(_.getUTCHours()%12||12,$.length)},H:function a(_,$){return addLeadingZeros(_.getUTCHours(),$.length)},m:function a(_,$){return addLeadingZeros(_.getUTCMinutes(),$.length)},s:function a(_,$){return addLeadingZeros(_.getUTCSeconds(),$.length)},S:function a(_,$){var j=$.length,_e=_.getUTCMilliseconds(),et=Math.floor(_e*Math.pow(10,j-3));return addLeadingZeros(et,$.length)}};const lightFormatters=formatters$2;var dayPeriodEnum={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},formatters={G:function a(_,$,j){var _e=_.getUTCFullYear()>0?1:0;switch($){case"G":case"GG":case"GGG":return j.era(_e,{width:"abbreviated"});case"GGGGG":return j.era(_e,{width:"narrow"});case"GGGG":default:return j.era(_e,{width:"wide"})}},y:function a(_,$,j){if($==="yo"){var _e=_.getUTCFullYear(),et=_e>0?_e:1-_e;return j.ordinalNumber(et,{unit:"year"})}return lightFormatters.y(_,$)},Y:function a(_,$,j,_e){var et=getUTCWeekYear(_,_e),tt=et>0?et:1-et;if($==="YY"){var rt=tt%100;return addLeadingZeros(rt,2)}return $==="Yo"?j.ordinalNumber(tt,{unit:"year"}):addLeadingZeros(tt,$.length)},R:function a(_,$){var j=getUTCISOWeekYear(_);return addLeadingZeros(j,$.length)},u:function a(_,$){var j=_.getUTCFullYear();return addLeadingZeros(j,$.length)},Q:function a(_,$,j){var _e=Math.ceil((_.getUTCMonth()+1)/3);switch($){case"Q":return String(_e);case"QQ":return addLeadingZeros(_e,2);case"Qo":return j.ordinalNumber(_e,{unit:"quarter"});case"QQQ":return j.quarter(_e,{width:"abbreviated",context:"formatting"});case"QQQQQ":return j.quarter(_e,{width:"narrow",context:"formatting"});case"QQQQ":default:return j.quarter(_e,{width:"wide",context:"formatting"})}},q:function a(_,$,j){var _e=Math.ceil((_.getUTCMonth()+1)/3);switch($){case"q":return String(_e);case"qq":return addLeadingZeros(_e,2);case"qo":return j.ordinalNumber(_e,{unit:"quarter"});case"qqq":return j.quarter(_e,{width:"abbreviated",context:"standalone"});case"qqqqq":return j.quarter(_e,{width:"narrow",context:"standalone"});case"qqqq":default:return j.quarter(_e,{width:"wide",context:"standalone"})}},M:function a(_,$,j){var _e=_.getUTCMonth();switch($){case"M":case"MM":return lightFormatters.M(_,$);case"Mo":return j.ordinalNumber(_e+1,{unit:"month"});case"MMM":return j.month(_e,{width:"abbreviated",context:"formatting"});case"MMMMM":return j.month(_e,{width:"narrow",context:"formatting"});case"MMMM":default:return j.month(_e,{width:"wide",context:"formatting"})}},L:function a(_,$,j){var _e=_.getUTCMonth();switch($){case"L":return String(_e+1);case"LL":return addLeadingZeros(_e+1,2);case"Lo":return j.ordinalNumber(_e+1,{unit:"month"});case"LLL":return j.month(_e,{width:"abbreviated",context:"standalone"});case"LLLLL":return j.month(_e,{width:"narrow",context:"standalone"});case"LLLL":default:return j.month(_e,{width:"wide",context:"standalone"})}},w:function a(_,$,j,_e){var et=getUTCWeek(_,_e);return $==="wo"?j.ordinalNumber(et,{unit:"week"}):addLeadingZeros(et,$.length)},I:function a(_,$,j){var _e=getUTCISOWeek(_);return $==="Io"?j.ordinalNumber(_e,{unit:"week"}):addLeadingZeros(_e,$.length)},d:function a(_,$,j){return $==="do"?j.ordinalNumber(_.getUTCDate(),{unit:"date"}):lightFormatters.d(_,$)},D:function a(_,$,j){var _e=getUTCDayOfYear(_);return $==="Do"?j.ordinalNumber(_e,{unit:"dayOfYear"}):addLeadingZeros(_e,$.length)},E:function a(_,$,j){var _e=_.getUTCDay();switch($){case"E":case"EE":case"EEE":return j.day(_e,{width:"abbreviated",context:"formatting"});case"EEEEE":return j.day(_e,{width:"narrow",context:"formatting"});case"EEEEEE":return j.day(_e,{width:"short",context:"formatting"});case"EEEE":default:return j.day(_e,{width:"wide",context:"formatting"})}},e:function a(_,$,j,_e){var et=_.getUTCDay(),tt=(et-_e.weekStartsOn+8)%7||7;switch($){case"e":return String(tt);case"ee":return addLeadingZeros(tt,2);case"eo":return j.ordinalNumber(tt,{unit:"day"});case"eee":return j.day(et,{width:"abbreviated",context:"formatting"});case"eeeee":return j.day(et,{width:"narrow",context:"formatting"});case"eeeeee":return j.day(et,{width:"short",context:"formatting"});case"eeee":default:return j.day(et,{width:"wide",context:"formatting"})}},c:function a(_,$,j,_e){var et=_.getUTCDay(),tt=(et-_e.weekStartsOn+8)%7||7;switch($){case"c":return String(tt);case"cc":return addLeadingZeros(tt,$.length);case"co":return j.ordinalNumber(tt,{unit:"day"});case"ccc":return j.day(et,{width:"abbreviated",context:"standalone"});case"ccccc":return j.day(et,{width:"narrow",context:"standalone"});case"cccccc":return j.day(et,{width:"short",context:"standalone"});case"cccc":default:return j.day(et,{width:"wide",context:"standalone"})}},i:function a(_,$,j){var _e=_.getUTCDay(),et=_e===0?7:_e;switch($){case"i":return String(et);case"ii":return addLeadingZeros(et,$.length);case"io":return j.ordinalNumber(et,{unit:"day"});case"iii":return j.day(_e,{width:"abbreviated",context:"formatting"});case"iiiii":return j.day(_e,{width:"narrow",context:"formatting"});case"iiiiii":return j.day(_e,{width:"short",context:"formatting"});case"iiii":default:return j.day(_e,{width:"wide",context:"formatting"})}},a:function a(_,$,j){var _e=_.getUTCHours(),et=_e/12>=1?"pm":"am";switch($){case"a":case"aa":return j.dayPeriod(et,{width:"abbreviated",context:"formatting"});case"aaa":return j.dayPeriod(et,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return j.dayPeriod(et,{width:"narrow",context:"formatting"});case"aaaa":default:return j.dayPeriod(et,{width:"wide",context:"formatting"})}},b:function a(_,$,j){var _e=_.getUTCHours(),et;switch(_e===12?et=dayPeriodEnum.noon:_e===0?et=dayPeriodEnum.midnight:et=_e/12>=1?"pm":"am",$){case"b":case"bb":return j.dayPeriod(et,{width:"abbreviated",context:"formatting"});case"bbb":return j.dayPeriod(et,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return j.dayPeriod(et,{width:"narrow",context:"formatting"});case"bbbb":default:return j.dayPeriod(et,{width:"wide",context:"formatting"})}},B:function a(_,$,j){var _e=_.getUTCHours(),et;switch(_e>=17?et=dayPeriodEnum.evening:_e>=12?et=dayPeriodEnum.afternoon:_e>=4?et=dayPeriodEnum.morning:et=dayPeriodEnum.night,$){case"B":case"BB":case"BBB":return j.dayPeriod(et,{width:"abbreviated",context:"formatting"});case"BBBBB":return j.dayPeriod(et,{width:"narrow",context:"formatting"});case"BBBB":default:return j.dayPeriod(et,{width:"wide",context:"formatting"})}},h:function a(_,$,j){if($==="ho"){var _e=_.getUTCHours()%12;return _e===0&&(_e=12),j.ordinalNumber(_e,{unit:"hour"})}return lightFormatters.h(_,$)},H:function a(_,$,j){return $==="Ho"?j.ordinalNumber(_.getUTCHours(),{unit:"hour"}):lightFormatters.H(_,$)},K:function a(_,$,j){var _e=_.getUTCHours()%12;return $==="Ko"?j.ordinalNumber(_e,{unit:"hour"}):addLeadingZeros(_e,$.length)},k:function a(_,$,j){var _e=_.getUTCHours();return _e===0&&(_e=24),$==="ko"?j.ordinalNumber(_e,{unit:"hour"}):addLeadingZeros(_e,$.length)},m:function a(_,$,j){return $==="mo"?j.ordinalNumber(_.getUTCMinutes(),{unit:"minute"}):lightFormatters.m(_,$)},s:function a(_,$,j){return $==="so"?j.ordinalNumber(_.getUTCSeconds(),{unit:"second"}):lightFormatters.s(_,$)},S:function a(_,$){return lightFormatters.S(_,$)},X:function a(_,$,j,_e){var et=_e._originalDate||_,tt=et.getTimezoneOffset();if(tt===0)return"Z";switch($){case"X":return formatTimezoneWithOptionalMinutes(tt);case"XXXX":case"XX":return formatTimezone(tt);case"XXXXX":case"XXX":default:return formatTimezone(tt,":")}},x:function a(_,$,j,_e){var et=_e._originalDate||_,tt=et.getTimezoneOffset();switch($){case"x":return formatTimezoneWithOptionalMinutes(tt);case"xxxx":case"xx":return formatTimezone(tt);case"xxxxx":case"xxx":default:return formatTimezone(tt,":")}},O:function a(_,$,j,_e){var et=_e._originalDate||_,tt=et.getTimezoneOffset();switch($){case"O":case"OO":case"OOO":return"GMT"+formatTimezoneShort(tt,":");case"OOOO":default:return"GMT"+formatTimezone(tt,":")}},z:function a(_,$,j,_e){var et=_e._originalDate||_,tt=et.getTimezoneOffset();switch($){case"z":case"zz":case"zzz":return"GMT"+formatTimezoneShort(tt,":");case"zzzz":default:return"GMT"+formatTimezone(tt,":")}},t:function a(_,$,j,_e){var et=_e._originalDate||_,tt=Math.floor(et.getTime()/1e3);return addLeadingZeros(tt,$.length)},T:function a(_,$,j,_e){var et=_e._originalDate||_,tt=et.getTime();return addLeadingZeros(tt,$.length)}};function formatTimezoneShort(a,_){var $=a>0?"-":"+",j=Math.abs(a),_e=Math.floor(j/60),et=j%60;if(et===0)return $+String(_e);var tt=_||"";return $+String(_e)+tt+addLeadingZeros(et,2)}function formatTimezoneWithOptionalMinutes(a,_){if(a%60===0){var $=a>0?"-":"+";return $+addLeadingZeros(Math.abs(a)/60,2)}return formatTimezone(a,_)}function formatTimezone(a,_){var $=_||"",j=a>0?"-":"+",_e=Math.abs(a),et=addLeadingZeros(Math.floor(_e/60),2),tt=addLeadingZeros(_e%60,2);return j+et+$+tt}const formatters$1=formatters;var dateLongFormatter=function a(_,$){switch(_){case"P":return $.date({width:"short"});case"PP":return $.date({width:"medium"});case"PPP":return $.date({width:"long"});case"PPPP":default:return $.date({width:"full"})}},timeLongFormatter=function a(_,$){switch(_){case"p":return $.time({width:"short"});case"pp":return $.time({width:"medium"});case"ppp":return $.time({width:"long"});case"pppp":default:return $.time({width:"full"})}},dateTimeLongFormatter=function a(_,$){var j=_.match(/(P+)(p+)?/)||[],_e=j[1],et=j[2];if(!et)return dateLongFormatter(_,$);var tt;switch(_e){case"P":tt=$.dateTime({width:"short"});break;case"PP":tt=$.dateTime({width:"medium"});break;case"PPP":tt=$.dateTime({width:"long"});break;case"PPPP":default:tt=$.dateTime({width:"full"});break}return tt.replace("{{date}}",dateLongFormatter(_e,$)).replace("{{time}}",timeLongFormatter(et,$))},longFormatters={p:timeLongFormatter,P:dateTimeLongFormatter};const longFormatters$1=longFormatters;function getTimezoneOffsetInMilliseconds(a){var _=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()));return _.setUTCFullYear(a.getFullYear()),a.getTime()-_.getTime()}var protectedDayOfYearTokens=["D","DD"],protectedWeekYearTokens=["YY","YYYY"];function isProtectedDayOfYearToken(a){return protectedDayOfYearTokens.indexOf(a)!==-1}function isProtectedWeekYearToken(a){return protectedWeekYearTokens.indexOf(a)!==-1}function throwProtectedError(a,_,$){if(a==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(_,"`) for formatting years to the input `").concat($,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(_,"`) for formatting years to the input `").concat($,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(_,"`) for formatting days of the month to the input `").concat($,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(_,"`) for formatting days of the month to the input `").concat($,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var formatDistanceLocale={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},formatDistance=function a(_,$,j){var _e,et=formatDistanceLocale[_];return typeof et=="string"?_e=et:$===1?_e=et.one:_e=et.other.replace("{{count}}",$.toString()),j!=null&&j.addSuffix?j.comparison&&j.comparison>0?"in "+_e:_e+" ago":_e};const formatDistance$1=formatDistance;function buildFormatLongFn(a){return function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},$=_.width?String(_.width):a.defaultWidth,j=a.formats[$]||a.formats[a.defaultWidth];return j}}var dateFormats={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},timeFormats={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong={date:buildFormatLongFn({formats:dateFormats,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats,defaultWidth:"full"})};const formatLong$1=formatLong;var formatRelativeLocale={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},formatRelative=function a(_,$,j,_e){return formatRelativeLocale[_]};const formatRelative$1=formatRelative;function buildLocalizeFn(a){return function(_,$){var j=$!=null&&$.context?String($.context):"standalone",_e;if(j==="formatting"&&a.formattingValues){var et=a.defaultFormattingWidth||a.defaultWidth,tt=$!=null&&$.width?String($.width):et;_e=a.formattingValues[tt]||a.formattingValues[et]}else{var rt=a.defaultWidth,at=$!=null&&$.width?String($.width):a.defaultWidth;_e=a.values[at]||a.values[rt]}var ct=a.argumentCallback?a.argumentCallback(_):_;return _e[ct]}}var eraValues={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},quarterValues={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},monthValues={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},dayValues={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},formattingDayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ordinalNumber=function a(_,$){var j=Number(_),_e=j%100;if(_e>20||_e<10)switch(_e%10){case 1:return j+"st";case 2:return j+"nd";case 3:return j+"rd"}return j+"th"},localize={ordinalNumber,era:buildLocalizeFn({values:eraValues,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues,defaultWidth:"wide",argumentCallback:function a(_){return _-1}}),month:buildLocalizeFn({values:monthValues,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues,defaultWidth:"wide",formattingValues:formattingDayPeriodValues,defaultFormattingWidth:"wide"})};const localize$1=localize;function buildMatchFn(a){return function(_){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=$.width,_e=j&&a.matchPatterns[j]||a.matchPatterns[a.defaultMatchWidth],et=_.match(_e);if(!et)return null;var tt=et[0],rt=j&&a.parsePatterns[j]||a.parsePatterns[a.defaultParseWidth],at=Array.isArray(rt)?findIndex$1(rt,function(yt){return yt.test(tt)}):findKey(rt,function(yt){return yt.test(tt)}),ct;ct=a.valueCallback?a.valueCallback(at):at,ct=$.valueCallback?$.valueCallback(ct):ct;var dt=_.slice(tt.length);return{value:ct,rest:dt}}}function findKey(a,_){for(var $ in a)if(a.hasOwnProperty($)&&_(a[$]))return $}function findIndex$1(a,_){for(var $=0;$<a.length;$++)if(_(a[$]))return $}function buildMatchPatternFn(a){return function(_){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=_.match(a.matchPattern);if(!j)return null;var _e=j[0],et=_.match(a.parsePattern);if(!et)return null;var tt=a.valueCallback?a.valueCallback(et[0]):et[0];tt=$.valueCallback?$.valueCallback(tt):tt;var rt=_.slice(_e.length);return{value:tt,rest:rt}}}var matchOrdinalNumberPattern=/^(\d+)(th|st|nd|rd)?/i,parseOrdinalNumberPattern=/\d+/i,matchEraPatterns={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},parseEraPatterns={any:[/^b/i,/^(a|c)/i]},matchQuarterPatterns={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},parseQuarterPatterns={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},parseMonthPatterns={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},parseDayPatterns={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},matchDayPeriodPatterns={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},parseDayPeriodPatterns={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},match={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern,parsePattern:parseOrdinalNumberPattern,valueCallback:function a(_){return parseInt(_,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns,defaultParseWidth:"any",valueCallback:function a(_){return _+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns,defaultParseWidth:"any"})};const match$1=match;var locale={code:"en-US",formatDistance:formatDistance$1,formatLong:formatLong$1,formatRelative:formatRelative$1,localize:localize$1,match:match$1,options:{weekStartsOn:0,firstWeekContainsDate:1}};const defaultLocale=locale;var formattingTokensRegExp$1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp$1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp$1=/^'([^]*?)'?$/,doubleQuoteRegExp$1=/''/g,unescapedLatinCharacterRegExp$1=/[a-zA-Z]/;function format(a,_,$){var j,_e,et,tt,rt,at,ct,dt,yt,bt,Et,$t,_t,xt,St,Mt,Tt,Rt;requiredArgs(2,arguments);var Ct=String(_),It=getDefaultOptions(),kt=(j=(_e=$==null?void 0:$.locale)!==null&&_e!==void 0?_e:It.locale)!==null&&j!==void 0?j:defaultLocale,Dt=toInteger$2((et=(tt=(rt=(at=$==null?void 0:$.firstWeekContainsDate)!==null&&at!==void 0?at:$==null||(ct=$.locale)===null||ct===void 0||(dt=ct.options)===null||dt===void 0?void 0:dt.firstWeekContainsDate)!==null&&rt!==void 0?rt:It.firstWeekContainsDate)!==null&&tt!==void 0?tt:(yt=It.locale)===null||yt===void 0||(bt=yt.options)===null||bt===void 0?void 0:bt.firstWeekContainsDate)!==null&&et!==void 0?et:1);if(!(Dt>=1&&Dt<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Bt=toInteger$2((Et=($t=(_t=(xt=$==null?void 0:$.weekStartsOn)!==null&&xt!==void 0?xt:$==null||(St=$.locale)===null||St===void 0||(Mt=St.options)===null||Mt===void 0?void 0:Mt.weekStartsOn)!==null&&_t!==void 0?_t:It.weekStartsOn)!==null&&$t!==void 0?$t:(Tt=It.locale)===null||Tt===void 0||(Rt=Tt.options)===null||Rt===void 0?void 0:Rt.weekStartsOn)!==null&&Et!==void 0?Et:0);if(!(Bt>=0&&Bt<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!kt.localize)throw new RangeError("locale must contain localize property");if(!kt.formatLong)throw new RangeError("locale must contain formatLong property");var zt=toDate$1(a);if(!isValid(zt))throw new RangeError("Invalid time value");var vt=getTimezoneOffsetInMilliseconds(zt),nt=subMilliseconds(zt,vt),st={firstWeekContainsDate:Dt,weekStartsOn:Bt,locale:kt,_originalDate:zt},lt=Ct.match(longFormattingTokensRegExp$1).map(function(ht){var mt=ht[0];if(mt==="p"||mt==="P"){var wt=longFormatters$1[mt];return wt(ht,kt.formatLong)}return ht}).join("").match(formattingTokensRegExp$1).map(function(ht){if(ht==="''")return"'";var mt=ht[0];if(mt==="'")return cleanEscapedString$1(ht);var wt=formatters$1[mt];if(wt)return!($!=null&&$.useAdditionalWeekYearTokens)&&isProtectedWeekYearToken(ht)&&throwProtectedError(ht,_,String(a)),!($!=null&&$.useAdditionalDayOfYearTokens)&&isProtectedDayOfYearToken(ht)&&throwProtectedError(ht,_,String(a)),wt(nt,ht,kt.localize,st);if(mt.match(unescapedLatinCharacterRegExp$1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+mt+"`");return ht}).join("");return lt}function cleanEscapedString$1(a){var _=a.match(escapedStringRegExp$1);return _?_[1].replace(doubleQuoteRegExp$1,"'"):a}function isBefore$1(a,_){requiredArgs(2,arguments);var $=toDate$1(a),j=toDate$1(_);return $.getTime()<j.getTime()}function assign(a,_){if(a==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var $ in _)Object.prototype.hasOwnProperty.call(_,$)&&(a[$]=_[$]);return a}function _typeof$w(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$w=function($){return typeof $}:_typeof$w=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$w(a)}function _inherits$v(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$w(a,_)}function _setPrototypeOf$w(a,_){return _setPrototypeOf$w=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$w(a,_)}function _createSuper$v(a){var _=_isNativeReflectConstruct$v();return function(){var j=_getPrototypeOf$v(a),_e;if(_){var et=_getPrototypeOf$v(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$v(this,_e)}}function _possibleConstructorReturn$v(a,_){return _&&(_typeof$w(_)==="object"||typeof _=="function")?_:_assertThisInitialized$w(a)}function _assertThisInitialized$w(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$v(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$v(a){return _getPrototypeOf$v=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$v(a)}function _classCallCheck$w(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$x(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$x(a,_,$){return _&&_defineProperties$x(a.prototype,_),$&&_defineProperties$x(a,$),a}function _defineProperty$v(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var TIMEZONE_UNIT_PRIORITY=10,Setter=function(){function a(){_classCallCheck$w(this,a),_defineProperty$v(this,"subPriority",0)}return _createClass$x(a,[{key:"validate",value:function($,j){return!0}}]),a}(),ValueSetter=function(a){_inherits$v($,a);var _=_createSuper$v($);function $(j,_e,et,tt,rt){var at;return _classCallCheck$w(this,$),at=_.call(this),at.value=j,at.validateValue=_e,at.setValue=et,at.priority=tt,rt&&(at.subPriority=rt),at}return _createClass$x($,[{key:"validate",value:function(_e,et){return this.validateValue(_e,this.value,et)}},{key:"set",value:function(_e,et,tt){return this.setValue(_e,et,this.value,tt)}}]),$}(Setter),DateToSystemTimezoneSetter=function(a){_inherits$v($,a);var _=_createSuper$v($);function $(){var j;_classCallCheck$w(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$v(_assertThisInitialized$w(j),"priority",TIMEZONE_UNIT_PRIORITY),_defineProperty$v(_assertThisInitialized$w(j),"subPriority",-1),j}return _createClass$x($,[{key:"set",value:function(_e,et){if(et.timestampIsSet)return _e;var tt=new Date(0);return tt.setFullYear(_e.getUTCFullYear(),_e.getUTCMonth(),_e.getUTCDate()),tt.setHours(_e.getUTCHours(),_e.getUTCMinutes(),_e.getUTCSeconds(),_e.getUTCMilliseconds()),tt}}]),$}(Setter);function _classCallCheck$v(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$w(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$w(a,_,$){return _&&_defineProperties$w(a.prototype,_),$&&_defineProperties$w(a,$),a}var Parser=function(){function a(){_classCallCheck$v(this,a)}return _createClass$w(a,[{key:"run",value:function($,j,_e,et){var tt=this.parse($,j,_e,et);return tt?{setter:new ValueSetter(tt.value,this.validate,this.set,this.priority,this.subPriority),rest:tt.rest}:null}},{key:"validate",value:function($,j,_e){return!0}}]),a}();function _typeof$v(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$v=function($){return typeof $}:_typeof$v=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$v(a)}function _classCallCheck$u(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$v(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$v(a,_,$){return _&&_defineProperties$v(a.prototype,_),$&&_defineProperties$v(a,$),a}function _inherits$u(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$v(a,_)}function _setPrototypeOf$v(a,_){return _setPrototypeOf$v=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$v(a,_)}function _createSuper$u(a){var _=_isNativeReflectConstruct$u();return function(){var j=_getPrototypeOf$u(a),_e;if(_){var et=_getPrototypeOf$u(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$u(this,_e)}}function _possibleConstructorReturn$u(a,_){return _&&(_typeof$v(_)==="object"||typeof _=="function")?_:_assertThisInitialized$v(a)}function _assertThisInitialized$v(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$u(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$u(a){return _getPrototypeOf$u=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$u(a)}function _defineProperty$u(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var EraParser=function(a){_inherits$u($,a);var _=_createSuper$u($);function $(){var j;_classCallCheck$u(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$u(_assertThisInitialized$v(j),"priority",140),_defineProperty$u(_assertThisInitialized$v(j),"incompatibleTokens",["R","u","t","T"]),j}return _createClass$v($,[{key:"parse",value:function(_e,et,tt){switch(et){case"G":case"GG":case"GGG":return tt.era(_e,{width:"abbreviated"})||tt.era(_e,{width:"narrow"});case"GGGGG":return tt.era(_e,{width:"narrow"});case"GGGG":default:return tt.era(_e,{width:"wide"})||tt.era(_e,{width:"abbreviated"})||tt.era(_e,{width:"narrow"})}}},{key:"set",value:function(_e,et,tt){return et.era=tt,_e.setUTCFullYear(tt,0,1),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser),millisecondsInMinute=6e4,millisecondsInHour=36e5,millisecondsInSecond=1e3,numericPatterns={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},timezonePatterns={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function mapValue(a,_){return a&&{value:_(a.value),rest:a.rest}}function parseNumericPattern(a,_){var $=_.match(a);return $?{value:parseInt($[0],10),rest:_.slice($[0].length)}:null}function parseTimezonePattern(a,_){var $=_.match(a);if(!$)return null;if($[0]==="Z")return{value:0,rest:_.slice(1)};var j=$[1]==="+"?1:-1,_e=$[2]?parseInt($[2],10):0,et=$[3]?parseInt($[3],10):0,tt=$[5]?parseInt($[5],10):0;return{value:j*(_e*millisecondsInHour+et*millisecondsInMinute+tt*millisecondsInSecond),rest:_.slice($[0].length)}}function parseAnyDigitsSigned(a){return parseNumericPattern(numericPatterns.anyDigitsSigned,a)}function parseNDigits(a,_){switch(a){case 1:return parseNumericPattern(numericPatterns.singleDigit,_);case 2:return parseNumericPattern(numericPatterns.twoDigits,_);case 3:return parseNumericPattern(numericPatterns.threeDigits,_);case 4:return parseNumericPattern(numericPatterns.fourDigits,_);default:return parseNumericPattern(new RegExp("^\\d{1,"+a+"}"),_)}}function parseNDigitsSigned(a,_){switch(a){case 1:return parseNumericPattern(numericPatterns.singleDigitSigned,_);case 2:return parseNumericPattern(numericPatterns.twoDigitsSigned,_);case 3:return parseNumericPattern(numericPatterns.threeDigitsSigned,_);case 4:return parseNumericPattern(numericPatterns.fourDigitsSigned,_);default:return parseNumericPattern(new RegExp("^-?\\d{1,"+a+"}"),_)}}function dayPeriodEnumToHours(a){switch(a){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function normalizeTwoDigitYear(a,_){var $=_>0,j=$?_:1-_,_e;if(j<=50)_e=a||100;else{var et=j+50,tt=Math.floor(et/100)*100,rt=a>=et%100;_e=a+tt-(rt?100:0)}return $?_e:1-_e}function isLeapYearIndex(a){return a%400===0||a%4===0&&a%100!==0}function _typeof$u(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$u=function($){return typeof $}:_typeof$u=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$u(a)}function _classCallCheck$t(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$u(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$u(a,_,$){return _&&_defineProperties$u(a.prototype,_),$&&_defineProperties$u(a,$),a}function _inherits$t(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$u(a,_)}function _setPrototypeOf$u(a,_){return _setPrototypeOf$u=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$u(a,_)}function _createSuper$t(a){var _=_isNativeReflectConstruct$t();return function(){var j=_getPrototypeOf$t(a),_e;if(_){var et=_getPrototypeOf$t(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$t(this,_e)}}function _possibleConstructorReturn$t(a,_){return _&&(_typeof$u(_)==="object"||typeof _=="function")?_:_assertThisInitialized$u(a)}function _assertThisInitialized$u(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$t(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$t(a){return _getPrototypeOf$t=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$t(a)}function _defineProperty$t(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var YearParser=function(a){_inherits$t($,a);var _=_createSuper$t($);function $(){var j;_classCallCheck$t(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$t(_assertThisInitialized$u(j),"priority",130),_defineProperty$t(_assertThisInitialized$u(j),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),j}return _createClass$u($,[{key:"parse",value:function(_e,et,tt){var rt=function(ct){return{year:ct,isTwoDigitYear:et==="yy"}};switch(et){case"y":return mapValue(parseNDigits(4,_e),rt);case"yo":return mapValue(tt.ordinalNumber(_e,{unit:"year"}),rt);default:return mapValue(parseNDigits(et.length,_e),rt)}}},{key:"validate",value:function(_e,et){return et.isTwoDigitYear||et.year>0}},{key:"set",value:function(_e,et,tt){var rt=_e.getUTCFullYear();if(tt.isTwoDigitYear){var at=normalizeTwoDigitYear(tt.year,rt);return _e.setUTCFullYear(at,0,1),_e.setUTCHours(0,0,0,0),_e}var ct=!("era"in et)||et.era===1?tt.year:1-tt.year;return _e.setUTCFullYear(ct,0,1),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function _typeof$t(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$t=function($){return typeof $}:_typeof$t=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$t(a)}function _classCallCheck$s(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$t(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$t(a,_,$){return _&&_defineProperties$t(a.prototype,_),$&&_defineProperties$t(a,$),a}function _inherits$s(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$t(a,_)}function _setPrototypeOf$t(a,_){return _setPrototypeOf$t=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$t(a,_)}function _createSuper$s(a){var _=_isNativeReflectConstruct$s();return function(){var j=_getPrototypeOf$s(a),_e;if(_){var et=_getPrototypeOf$s(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$s(this,_e)}}function _possibleConstructorReturn$s(a,_){return _&&(_typeof$t(_)==="object"||typeof _=="function")?_:_assertThisInitialized$t(a)}function _assertThisInitialized$t(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$s(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$s(a){return _getPrototypeOf$s=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$s(a)}function _defineProperty$s(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var LocalWeekYearParser=function(a){_inherits$s($,a);var _=_createSuper$s($);function $(){var j;_classCallCheck$s(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$s(_assertThisInitialized$t(j),"priority",130),_defineProperty$s(_assertThisInitialized$t(j),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),j}return _createClass$t($,[{key:"parse",value:function(_e,et,tt){var rt=function(ct){return{year:ct,isTwoDigitYear:et==="YY"}};switch(et){case"Y":return mapValue(parseNDigits(4,_e),rt);case"Yo":return mapValue(tt.ordinalNumber(_e,{unit:"year"}),rt);default:return mapValue(parseNDigits(et.length,_e),rt)}}},{key:"validate",value:function(_e,et){return et.isTwoDigitYear||et.year>0}},{key:"set",value:function(_e,et,tt,rt){var at=getUTCWeekYear(_e,rt);if(tt.isTwoDigitYear){var ct=normalizeTwoDigitYear(tt.year,at);return _e.setUTCFullYear(ct,0,rt.firstWeekContainsDate),_e.setUTCHours(0,0,0,0),startOfUTCWeek(_e,rt)}var dt=!("era"in et)||et.era===1?tt.year:1-tt.year;return _e.setUTCFullYear(dt,0,rt.firstWeekContainsDate),_e.setUTCHours(0,0,0,0),startOfUTCWeek(_e,rt)}}]),$}(Parser);function _typeof$s(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$s=function($){return typeof $}:_typeof$s=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$s(a)}function _classCallCheck$r(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$s(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$s(a,_,$){return _&&_defineProperties$s(a.prototype,_),$&&_defineProperties$s(a,$),a}function _inherits$r(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$s(a,_)}function _setPrototypeOf$s(a,_){return _setPrototypeOf$s=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$s(a,_)}function _createSuper$r(a){var _=_isNativeReflectConstruct$r();return function(){var j=_getPrototypeOf$r(a),_e;if(_){var et=_getPrototypeOf$r(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$r(this,_e)}}function _possibleConstructorReturn$r(a,_){return _&&(_typeof$s(_)==="object"||typeof _=="function")?_:_assertThisInitialized$s(a)}function _assertThisInitialized$s(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$r(a){return _getPrototypeOf$r=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$r(a)}function _defineProperty$r(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var ISOWeekYearParser=function(a){_inherits$r($,a);var _=_createSuper$r($);function $(){var j;_classCallCheck$r(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$r(_assertThisInitialized$s(j),"priority",130),_defineProperty$r(_assertThisInitialized$s(j),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),j}return _createClass$s($,[{key:"parse",value:function(_e,et){return parseNDigitsSigned(et==="R"?4:et.length,_e)}},{key:"set",value:function(_e,et,tt){var rt=new Date(0);return rt.setUTCFullYear(tt,0,4),rt.setUTCHours(0,0,0,0),startOfUTCISOWeek(rt)}}]),$}(Parser);function _typeof$r(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$r=function($){return typeof $}:_typeof$r=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$r(a)}function _classCallCheck$q(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$r(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$r(a,_,$){return _&&_defineProperties$r(a.prototype,_),$&&_defineProperties$r(a,$),a}function _inherits$q(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$r(a,_)}function _setPrototypeOf$r(a,_){return _setPrototypeOf$r=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$r(a,_)}function _createSuper$q(a){var _=_isNativeReflectConstruct$q();return function(){var j=_getPrototypeOf$q(a),_e;if(_){var et=_getPrototypeOf$q(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$q(this,_e)}}function _possibleConstructorReturn$q(a,_){return _&&(_typeof$r(_)==="object"||typeof _=="function")?_:_assertThisInitialized$r(a)}function _assertThisInitialized$r(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$q(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$q(a){return _getPrototypeOf$q=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$q(a)}function _defineProperty$q(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var ExtendedYearParser=function(a){_inherits$q($,a);var _=_createSuper$q($);function $(){var j;_classCallCheck$q(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$q(_assertThisInitialized$r(j),"priority",130),_defineProperty$q(_assertThisInitialized$r(j),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),j}return _createClass$r($,[{key:"parse",value:function(_e,et){return parseNDigitsSigned(et==="u"?4:et.length,_e)}},{key:"set",value:function(_e,et,tt){return _e.setUTCFullYear(tt,0,1),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function _typeof$q(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$q=function($){return typeof $}:_typeof$q=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$q(a)}function _classCallCheck$p(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$q(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$q(a,_,$){return _&&_defineProperties$q(a.prototype,_),$&&_defineProperties$q(a,$),a}function _inherits$p(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$q(a,_)}function _setPrototypeOf$q(a,_){return _setPrototypeOf$q=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$q(a,_)}function _createSuper$p(a){var _=_isNativeReflectConstruct$p();return function(){var j=_getPrototypeOf$p(a),_e;if(_){var et=_getPrototypeOf$p(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$p(this,_e)}}function _possibleConstructorReturn$p(a,_){return _&&(_typeof$q(_)==="object"||typeof _=="function")?_:_assertThisInitialized$q(a)}function _assertThisInitialized$q(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$p(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$p(a){return _getPrototypeOf$p=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$p(a)}function _defineProperty$p(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var QuarterParser=function(a){_inherits$p($,a);var _=_createSuper$p($);function $(){var j;_classCallCheck$p(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$p(_assertThisInitialized$q(j),"priority",120),_defineProperty$p(_assertThisInitialized$q(j),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),j}return _createClass$q($,[{key:"parse",value:function(_e,et,tt){switch(et){case"Q":case"QQ":return parseNDigits(et.length,_e);case"Qo":return tt.ordinalNumber(_e,{unit:"quarter"});case"QQQ":return tt.quarter(_e,{width:"abbreviated",context:"formatting"})||tt.quarter(_e,{width:"narrow",context:"formatting"});case"QQQQQ":return tt.quarter(_e,{width:"narrow",context:"formatting"});case"QQQQ":default:return tt.quarter(_e,{width:"wide",context:"formatting"})||tt.quarter(_e,{width:"abbreviated",context:"formatting"})||tt.quarter(_e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(_e,et){return et>=1&&et<=4}},{key:"set",value:function(_e,et,tt){return _e.setUTCMonth((tt-1)*3,1),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function _typeof$p(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$p=function($){return typeof $}:_typeof$p=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$p(a)}function _classCallCheck$o(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$p(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$p(a,_,$){return _&&_defineProperties$p(a.prototype,_),$&&_defineProperties$p(a,$),a}function _inherits$o(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$p(a,_)}function _setPrototypeOf$p(a,_){return _setPrototypeOf$p=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$p(a,_)}function _createSuper$o(a){var _=_isNativeReflectConstruct$o();return function(){var j=_getPrototypeOf$o(a),_e;if(_){var et=_getPrototypeOf$o(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$o(this,_e)}}function _possibleConstructorReturn$o(a,_){return _&&(_typeof$p(_)==="object"||typeof _=="function")?_:_assertThisInitialized$p(a)}function _assertThisInitialized$p(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$o(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$o(a){return _getPrototypeOf$o=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$o(a)}function _defineProperty$o(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var StandAloneQuarterParser=function(a){_inherits$o($,a);var _=_createSuper$o($);function $(){var j;_classCallCheck$o(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$o(_assertThisInitialized$p(j),"priority",120),_defineProperty$o(_assertThisInitialized$p(j),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),j}return _createClass$p($,[{key:"parse",value:function(_e,et,tt){switch(et){case"q":case"qq":return parseNDigits(et.length,_e);case"qo":return tt.ordinalNumber(_e,{unit:"quarter"});case"qqq":return tt.quarter(_e,{width:"abbreviated",context:"standalone"})||tt.quarter(_e,{width:"narrow",context:"standalone"});case"qqqqq":return tt.quarter(_e,{width:"narrow",context:"standalone"});case"qqqq":default:return tt.quarter(_e,{width:"wide",context:"standalone"})||tt.quarter(_e,{width:"abbreviated",context:"standalone"})||tt.quarter(_e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(_e,et){return et>=1&&et<=4}},{key:"set",value:function(_e,et,tt){return _e.setUTCMonth((tt-1)*3,1),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function _typeof$o(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$o=function($){return typeof $}:_typeof$o=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$o(a)}function _classCallCheck$n(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$o(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$o(a,_,$){return _&&_defineProperties$o(a.prototype,_),$&&_defineProperties$o(a,$),a}function _inherits$n(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$o(a,_)}function _setPrototypeOf$o(a,_){return _setPrototypeOf$o=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$o(a,_)}function _createSuper$n(a){var _=_isNativeReflectConstruct$n();return function(){var j=_getPrototypeOf$n(a),_e;if(_){var et=_getPrototypeOf$n(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$n(this,_e)}}function _possibleConstructorReturn$n(a,_){return _&&(_typeof$o(_)==="object"||typeof _=="function")?_:_assertThisInitialized$o(a)}function _assertThisInitialized$o(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$n(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$n(a){return _getPrototypeOf$n=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$n(a)}function _defineProperty$n(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var MonthParser=function(a){_inherits$n($,a);var _=_createSuper$n($);function $(){var j;_classCallCheck$n(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$n(_assertThisInitialized$o(j),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),_defineProperty$n(_assertThisInitialized$o(j),"priority",110),j}return _createClass$o($,[{key:"parse",value:function(_e,et,tt){var rt=function(ct){return ct-1};switch(et){case"M":return mapValue(parseNumericPattern(numericPatterns.month,_e),rt);case"MM":return mapValue(parseNDigits(2,_e),rt);case"Mo":return mapValue(tt.ordinalNumber(_e,{unit:"month"}),rt);case"MMM":return tt.month(_e,{width:"abbreviated",context:"formatting"})||tt.month(_e,{width:"narrow",context:"formatting"});case"MMMMM":return tt.month(_e,{width:"narrow",context:"formatting"});case"MMMM":default:return tt.month(_e,{width:"wide",context:"formatting"})||tt.month(_e,{width:"abbreviated",context:"formatting"})||tt.month(_e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(_e,et){return et>=0&&et<=11}},{key:"set",value:function(_e,et,tt){return _e.setUTCMonth(tt,1),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function _typeof$n(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$n=function($){return typeof $}:_typeof$n=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$n(a)}function _classCallCheck$m(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$n(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$n(a,_,$){return _&&_defineProperties$n(a.prototype,_),$&&_defineProperties$n(a,$),a}function _inherits$m(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$n(a,_)}function _setPrototypeOf$n(a,_){return _setPrototypeOf$n=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$n(a,_)}function _createSuper$m(a){var _=_isNativeReflectConstruct$m();return function(){var j=_getPrototypeOf$m(a),_e;if(_){var et=_getPrototypeOf$m(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$m(this,_e)}}function _possibleConstructorReturn$m(a,_){return _&&(_typeof$n(_)==="object"||typeof _=="function")?_:_assertThisInitialized$n(a)}function _assertThisInitialized$n(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$m(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$m(a){return _getPrototypeOf$m=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$m(a)}function _defineProperty$m(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var StandAloneMonthParser=function(a){_inherits$m($,a);var _=_createSuper$m($);function $(){var j;_classCallCheck$m(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$m(_assertThisInitialized$n(j),"priority",110),_defineProperty$m(_assertThisInitialized$n(j),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),j}return _createClass$n($,[{key:"parse",value:function(_e,et,tt){var rt=function(ct){return ct-1};switch(et){case"L":return mapValue(parseNumericPattern(numericPatterns.month,_e),rt);case"LL":return mapValue(parseNDigits(2,_e),rt);case"Lo":return mapValue(tt.ordinalNumber(_e,{unit:"month"}),rt);case"LLL":return tt.month(_e,{width:"abbreviated",context:"standalone"})||tt.month(_e,{width:"narrow",context:"standalone"});case"LLLLL":return tt.month(_e,{width:"narrow",context:"standalone"});case"LLLL":default:return tt.month(_e,{width:"wide",context:"standalone"})||tt.month(_e,{width:"abbreviated",context:"standalone"})||tt.month(_e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(_e,et){return et>=0&&et<=11}},{key:"set",value:function(_e,et,tt){return _e.setUTCMonth(tt,1),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function setUTCWeek(a,_,$){requiredArgs(2,arguments);var j=toDate$1(a),_e=toInteger$2(_),et=getUTCWeek(j,$)-_e;return j.setUTCDate(j.getUTCDate()-et*7),j}function _typeof$m(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$m=function($){return typeof $}:_typeof$m=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$m(a)}function _classCallCheck$l(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$m(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$m(a,_,$){return _&&_defineProperties$m(a.prototype,_),$&&_defineProperties$m(a,$),a}function _inherits$l(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$m(a,_)}function _setPrototypeOf$m(a,_){return _setPrototypeOf$m=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$m(a,_)}function _createSuper$l(a){var _=_isNativeReflectConstruct$l();return function(){var j=_getPrototypeOf$l(a),_e;if(_){var et=_getPrototypeOf$l(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$l(this,_e)}}function _possibleConstructorReturn$l(a,_){return _&&(_typeof$m(_)==="object"||typeof _=="function")?_:_assertThisInitialized$m(a)}function _assertThisInitialized$m(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$l(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$l(a){return _getPrototypeOf$l=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$l(a)}function _defineProperty$l(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var LocalWeekParser=function(a){_inherits$l($,a);var _=_createSuper$l($);function $(){var j;_classCallCheck$l(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$l(_assertThisInitialized$m(j),"priority",100),_defineProperty$l(_assertThisInitialized$m(j),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),j}return _createClass$m($,[{key:"parse",value:function(_e,et,tt){switch(et){case"w":return parseNumericPattern(numericPatterns.week,_e);case"wo":return tt.ordinalNumber(_e,{unit:"week"});default:return parseNDigits(et.length,_e)}}},{key:"validate",value:function(_e,et){return et>=1&&et<=53}},{key:"set",value:function(_e,et,tt,rt){return startOfUTCWeek(setUTCWeek(_e,tt,rt),rt)}}]),$}(Parser);function setUTCISOWeek(a,_){requiredArgs(2,arguments);var $=toDate$1(a),j=toInteger$2(_),_e=getUTCISOWeek($)-j;return $.setUTCDate($.getUTCDate()-_e*7),$}function _typeof$l(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$l=function($){return typeof $}:_typeof$l=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$l(a)}function _classCallCheck$k(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$l(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$l(a,_,$){return _&&_defineProperties$l(a.prototype,_),$&&_defineProperties$l(a,$),a}function _inherits$k(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$l(a,_)}function _setPrototypeOf$l(a,_){return _setPrototypeOf$l=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$l(a,_)}function _createSuper$k(a){var _=_isNativeReflectConstruct$k();return function(){var j=_getPrototypeOf$k(a),_e;if(_){var et=_getPrototypeOf$k(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$k(this,_e)}}function _possibleConstructorReturn$k(a,_){return _&&(_typeof$l(_)==="object"||typeof _=="function")?_:_assertThisInitialized$l(a)}function _assertThisInitialized$l(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$k(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$k(a){return _getPrototypeOf$k=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$k(a)}function _defineProperty$k(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var ISOWeekParser=function(a){_inherits$k($,a);var _=_createSuper$k($);function $(){var j;_classCallCheck$k(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$k(_assertThisInitialized$l(j),"priority",100),_defineProperty$k(_assertThisInitialized$l(j),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),j}return _createClass$l($,[{key:"parse",value:function(_e,et,tt){switch(et){case"I":return parseNumericPattern(numericPatterns.week,_e);case"Io":return tt.ordinalNumber(_e,{unit:"week"});default:return parseNDigits(et.length,_e)}}},{key:"validate",value:function(_e,et){return et>=1&&et<=53}},{key:"set",value:function(_e,et,tt){return startOfUTCISOWeek(setUTCISOWeek(_e,tt))}}]),$}(Parser);function _typeof$k(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$k=function($){return typeof $}:_typeof$k=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$k(a)}function _classCallCheck$j(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$k(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$k(a,_,$){return _&&_defineProperties$k(a.prototype,_),$&&_defineProperties$k(a,$),a}function _inherits$j(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$k(a,_)}function _setPrototypeOf$k(a,_){return _setPrototypeOf$k=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$k(a,_)}function _createSuper$j(a){var _=_isNativeReflectConstruct$j();return function(){var j=_getPrototypeOf$j(a),_e;if(_){var et=_getPrototypeOf$j(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$j(this,_e)}}function _possibleConstructorReturn$j(a,_){return _&&(_typeof$k(_)==="object"||typeof _=="function")?_:_assertThisInitialized$k(a)}function _assertThisInitialized$k(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$j(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$j(a){return _getPrototypeOf$j=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$j(a)}function _defineProperty$j(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var DAYS_IN_MONTH=[31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP_YEAR=[31,29,31,30,31,30,31,31,30,31,30,31],DateParser=function(a){_inherits$j($,a);var _=_createSuper$j($);function $(){var j;_classCallCheck$j(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$j(_assertThisInitialized$k(j),"priority",90),_defineProperty$j(_assertThisInitialized$k(j),"subPriority",1),_defineProperty$j(_assertThisInitialized$k(j),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),j}return _createClass$k($,[{key:"parse",value:function(_e,et,tt){switch(et){case"d":return parseNumericPattern(numericPatterns.date,_e);case"do":return tt.ordinalNumber(_e,{unit:"date"});default:return parseNDigits(et.length,_e)}}},{key:"validate",value:function(_e,et){var tt=_e.getUTCFullYear(),rt=isLeapYearIndex(tt),at=_e.getUTCMonth();return rt?et>=1&&et<=DAYS_IN_MONTH_LEAP_YEAR[at]:et>=1&&et<=DAYS_IN_MONTH[at]}},{key:"set",value:function(_e,et,tt){return _e.setUTCDate(tt),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function _typeof$j(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$j=function($){return typeof $}:_typeof$j=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$j(a)}function _classCallCheck$i(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$j(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$j(a,_,$){return _&&_defineProperties$j(a.prototype,_),$&&_defineProperties$j(a,$),a}function _inherits$i(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$j(a,_)}function _setPrototypeOf$j(a,_){return _setPrototypeOf$j=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$j(a,_)}function _createSuper$i(a){var _=_isNativeReflectConstruct$i();return function(){var j=_getPrototypeOf$i(a),_e;if(_){var et=_getPrototypeOf$i(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$i(this,_e)}}function _possibleConstructorReturn$i(a,_){return _&&(_typeof$j(_)==="object"||typeof _=="function")?_:_assertThisInitialized$j(a)}function _assertThisInitialized$j(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$i(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$i(a){return _getPrototypeOf$i=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$i(a)}function _defineProperty$i(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var DayOfYearParser=function(a){_inherits$i($,a);var _=_createSuper$i($);function $(){var j;_classCallCheck$i(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$i(_assertThisInitialized$j(j),"priority",90),_defineProperty$i(_assertThisInitialized$j(j),"subpriority",1),_defineProperty$i(_assertThisInitialized$j(j),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),j}return _createClass$j($,[{key:"parse",value:function(_e,et,tt){switch(et){case"D":case"DD":return parseNumericPattern(numericPatterns.dayOfYear,_e);case"Do":return tt.ordinalNumber(_e,{unit:"date"});default:return parseNDigits(et.length,_e)}}},{key:"validate",value:function(_e,et){var tt=_e.getUTCFullYear(),rt=isLeapYearIndex(tt);return rt?et>=1&&et<=366:et>=1&&et<=365}},{key:"set",value:function(_e,et,tt){return _e.setUTCMonth(0,tt),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function setUTCDay(a,_,$){var j,_e,et,tt,rt,at,ct,dt;requiredArgs(2,arguments);var yt=getDefaultOptions(),bt=toInteger$2((j=(_e=(et=(tt=$==null?void 0:$.weekStartsOn)!==null&&tt!==void 0?tt:$==null||(rt=$.locale)===null||rt===void 0||(at=rt.options)===null||at===void 0?void 0:at.weekStartsOn)!==null&&et!==void 0?et:yt.weekStartsOn)!==null&&_e!==void 0?_e:(ct=yt.locale)===null||ct===void 0||(dt=ct.options)===null||dt===void 0?void 0:dt.weekStartsOn)!==null&&j!==void 0?j:0);if(!(bt>=0&&bt<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var Et=toDate$1(a),$t=toInteger$2(_),_t=Et.getUTCDay(),xt=$t%7,St=(xt+7)%7,Mt=(St<bt?7:0)+$t-_t;return Et.setUTCDate(Et.getUTCDate()+Mt),Et}function _typeof$i(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$i=function($){return typeof $}:_typeof$i=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$i(a)}function _classCallCheck$h(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$i(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$i(a,_,$){return _&&_defineProperties$i(a.prototype,_),$&&_defineProperties$i(a,$),a}function _inherits$h(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$i(a,_)}function _setPrototypeOf$i(a,_){return _setPrototypeOf$i=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$i(a,_)}function _createSuper$h(a){var _=_isNativeReflectConstruct$h();return function(){var j=_getPrototypeOf$h(a),_e;if(_){var et=_getPrototypeOf$h(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$h(this,_e)}}function _possibleConstructorReturn$h(a,_){return _&&(_typeof$i(_)==="object"||typeof _=="function")?_:_assertThisInitialized$i(a)}function _assertThisInitialized$i(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$h(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$h(a){return _getPrototypeOf$h=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$h(a)}function _defineProperty$h(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var DayParser=function(a){_inherits$h($,a);var _=_createSuper$h($);function $(){var j;_classCallCheck$h(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$h(_assertThisInitialized$i(j),"priority",90),_defineProperty$h(_assertThisInitialized$i(j),"incompatibleTokens",["D","i","e","c","t","T"]),j}return _createClass$i($,[{key:"parse",value:function(_e,et,tt){switch(et){case"E":case"EE":case"EEE":return tt.day(_e,{width:"abbreviated",context:"formatting"})||tt.day(_e,{width:"short",context:"formatting"})||tt.day(_e,{width:"narrow",context:"formatting"});case"EEEEE":return tt.day(_e,{width:"narrow",context:"formatting"});case"EEEEEE":return tt.day(_e,{width:"short",context:"formatting"})||tt.day(_e,{width:"narrow",context:"formatting"});case"EEEE":default:return tt.day(_e,{width:"wide",context:"formatting"})||tt.day(_e,{width:"abbreviated",context:"formatting"})||tt.day(_e,{width:"short",context:"formatting"})||tt.day(_e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(_e,et){return et>=0&&et<=6}},{key:"set",value:function(_e,et,tt,rt){return _e=setUTCDay(_e,tt,rt),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function _typeof$h(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$h=function($){return typeof $}:_typeof$h=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$h(a)}function _classCallCheck$g(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$h(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$h(a,_,$){return _&&_defineProperties$h(a.prototype,_),$&&_defineProperties$h(a,$),a}function _inherits$g(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$h(a,_)}function _setPrototypeOf$h(a,_){return _setPrototypeOf$h=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$h(a,_)}function _createSuper$g(a){var _=_isNativeReflectConstruct$g();return function(){var j=_getPrototypeOf$g(a),_e;if(_){var et=_getPrototypeOf$g(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$g(this,_e)}}function _possibleConstructorReturn$g(a,_){return _&&(_typeof$h(_)==="object"||typeof _=="function")?_:_assertThisInitialized$h(a)}function _assertThisInitialized$h(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$g(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$g(a){return _getPrototypeOf$g=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$g(a)}function _defineProperty$g(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var LocalDayParser=function(a){_inherits$g($,a);var _=_createSuper$g($);function $(){var j;_classCallCheck$g(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$g(_assertThisInitialized$h(j),"priority",90),_defineProperty$g(_assertThisInitialized$h(j),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),j}return _createClass$h($,[{key:"parse",value:function(_e,et,tt,rt){var at=function(dt){var yt=Math.floor((dt-1)/7)*7;return(dt+rt.weekStartsOn+6)%7+yt};switch(et){case"e":case"ee":return mapValue(parseNDigits(et.length,_e),at);case"eo":return mapValue(tt.ordinalNumber(_e,{unit:"day"}),at);case"eee":return tt.day(_e,{width:"abbreviated",context:"formatting"})||tt.day(_e,{width:"short",context:"formatting"})||tt.day(_e,{width:"narrow",context:"formatting"});case"eeeee":return tt.day(_e,{width:"narrow",context:"formatting"});case"eeeeee":return tt.day(_e,{width:"short",context:"formatting"})||tt.day(_e,{width:"narrow",context:"formatting"});case"eeee":default:return tt.day(_e,{width:"wide",context:"formatting"})||tt.day(_e,{width:"abbreviated",context:"formatting"})||tt.day(_e,{width:"short",context:"formatting"})||tt.day(_e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(_e,et){return et>=0&&et<=6}},{key:"set",value:function(_e,et,tt,rt){return _e=setUTCDay(_e,tt,rt),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function _typeof$g(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$g=function($){return typeof $}:_typeof$g=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$g(a)}function _classCallCheck$f(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$g(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$g(a,_,$){return _&&_defineProperties$g(a.prototype,_),$&&_defineProperties$g(a,$),a}function _inherits$f(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$g(a,_)}function _setPrototypeOf$g(a,_){return _setPrototypeOf$g=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$g(a,_)}function _createSuper$f(a){var _=_isNativeReflectConstruct$f();return function(){var j=_getPrototypeOf$f(a),_e;if(_){var et=_getPrototypeOf$f(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$f(this,_e)}}function _possibleConstructorReturn$f(a,_){return _&&(_typeof$g(_)==="object"||typeof _=="function")?_:_assertThisInitialized$g(a)}function _assertThisInitialized$g(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$f(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$f(a){return _getPrototypeOf$f=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$f(a)}function _defineProperty$f(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var StandAloneLocalDayParser=function(a){_inherits$f($,a);var _=_createSuper$f($);function $(){var j;_classCallCheck$f(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$f(_assertThisInitialized$g(j),"priority",90),_defineProperty$f(_assertThisInitialized$g(j),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),j}return _createClass$g($,[{key:"parse",value:function(_e,et,tt,rt){var at=function(dt){var yt=Math.floor((dt-1)/7)*7;return(dt+rt.weekStartsOn+6)%7+yt};switch(et){case"c":case"cc":return mapValue(parseNDigits(et.length,_e),at);case"co":return mapValue(tt.ordinalNumber(_e,{unit:"day"}),at);case"ccc":return tt.day(_e,{width:"abbreviated",context:"standalone"})||tt.day(_e,{width:"short",context:"standalone"})||tt.day(_e,{width:"narrow",context:"standalone"});case"ccccc":return tt.day(_e,{width:"narrow",context:"standalone"});case"cccccc":return tt.day(_e,{width:"short",context:"standalone"})||tt.day(_e,{width:"narrow",context:"standalone"});case"cccc":default:return tt.day(_e,{width:"wide",context:"standalone"})||tt.day(_e,{width:"abbreviated",context:"standalone"})||tt.day(_e,{width:"short",context:"standalone"})||tt.day(_e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(_e,et){return et>=0&&et<=6}},{key:"set",value:function(_e,et,tt,rt){return _e=setUTCDay(_e,tt,rt),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function setUTCISODay(a,_){requiredArgs(2,arguments);var $=toInteger$2(_);$%7===0&&($=$-7);var j=1,_e=toDate$1(a),et=_e.getUTCDay(),tt=$%7,rt=(tt+7)%7,at=(rt<j?7:0)+$-et;return _e.setUTCDate(_e.getUTCDate()+at),_e}function _typeof$f(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$f=function($){return typeof $}:_typeof$f=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$f(a)}function _classCallCheck$e(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$f(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$f(a,_,$){return _&&_defineProperties$f(a.prototype,_),$&&_defineProperties$f(a,$),a}function _inherits$e(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$f(a,_)}function _setPrototypeOf$f(a,_){return _setPrototypeOf$f=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$f(a,_)}function _createSuper$e(a){var _=_isNativeReflectConstruct$e();return function(){var j=_getPrototypeOf$e(a),_e;if(_){var et=_getPrototypeOf$e(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$e(this,_e)}}function _possibleConstructorReturn$e(a,_){return _&&(_typeof$f(_)==="object"||typeof _=="function")?_:_assertThisInitialized$f(a)}function _assertThisInitialized$f(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$e(a){return _getPrototypeOf$e=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$e(a)}function _defineProperty$e(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var ISODayParser=function(a){_inherits$e($,a);var _=_createSuper$e($);function $(){var j;_classCallCheck$e(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$e(_assertThisInitialized$f(j),"priority",90),_defineProperty$e(_assertThisInitialized$f(j),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),j}return _createClass$f($,[{key:"parse",value:function(_e,et,tt){var rt=function(ct){return ct===0?7:ct};switch(et){case"i":case"ii":return parseNDigits(et.length,_e);case"io":return tt.ordinalNumber(_e,{unit:"day"});case"iii":return mapValue(tt.day(_e,{width:"abbreviated",context:"formatting"})||tt.day(_e,{width:"short",context:"formatting"})||tt.day(_e,{width:"narrow",context:"formatting"}),rt);case"iiiii":return mapValue(tt.day(_e,{width:"narrow",context:"formatting"}),rt);case"iiiiii":return mapValue(tt.day(_e,{width:"short",context:"formatting"})||tt.day(_e,{width:"narrow",context:"formatting"}),rt);case"iiii":default:return mapValue(tt.day(_e,{width:"wide",context:"formatting"})||tt.day(_e,{width:"abbreviated",context:"formatting"})||tt.day(_e,{width:"short",context:"formatting"})||tt.day(_e,{width:"narrow",context:"formatting"}),rt)}}},{key:"validate",value:function(_e,et){return et>=1&&et<=7}},{key:"set",value:function(_e,et,tt){return _e=setUTCISODay(_e,tt),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function _typeof$e(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$e=function($){return typeof $}:_typeof$e=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$e(a)}function _classCallCheck$d(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$e(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$e(a,_,$){return _&&_defineProperties$e(a.prototype,_),$&&_defineProperties$e(a,$),a}function _inherits$d(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$e(a,_)}function _setPrototypeOf$e(a,_){return _setPrototypeOf$e=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$e(a,_)}function _createSuper$d(a){var _=_isNativeReflectConstruct$d();return function(){var j=_getPrototypeOf$d(a),_e;if(_){var et=_getPrototypeOf$d(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$d(this,_e)}}function _possibleConstructorReturn$d(a,_){return _&&(_typeof$e(_)==="object"||typeof _=="function")?_:_assertThisInitialized$e(a)}function _assertThisInitialized$e(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$d(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$d(a){return _getPrototypeOf$d=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$d(a)}function _defineProperty$d(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var AMPMParser=function(a){_inherits$d($,a);var _=_createSuper$d($);function $(){var j;_classCallCheck$d(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$d(_assertThisInitialized$e(j),"priority",80),_defineProperty$d(_assertThisInitialized$e(j),"incompatibleTokens",["b","B","H","k","t","T"]),j}return _createClass$e($,[{key:"parse",value:function(_e,et,tt){switch(et){case"a":case"aa":case"aaa":return tt.dayPeriod(_e,{width:"abbreviated",context:"formatting"})||tt.dayPeriod(_e,{width:"narrow",context:"formatting"});case"aaaaa":return tt.dayPeriod(_e,{width:"narrow",context:"formatting"});case"aaaa":default:return tt.dayPeriod(_e,{width:"wide",context:"formatting"})||tt.dayPeriod(_e,{width:"abbreviated",context:"formatting"})||tt.dayPeriod(_e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(_e,et,tt){return _e.setUTCHours(dayPeriodEnumToHours(tt),0,0,0),_e}}]),$}(Parser);function _typeof$d(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$d=function($){return typeof $}:_typeof$d=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$d(a)}function _classCallCheck$c(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$d(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$d(a,_,$){return _&&_defineProperties$d(a.prototype,_),$&&_defineProperties$d(a,$),a}function _inherits$c(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$d(a,_)}function _setPrototypeOf$d(a,_){return _setPrototypeOf$d=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$d(a,_)}function _createSuper$c(a){var _=_isNativeReflectConstruct$c();return function(){var j=_getPrototypeOf$c(a),_e;if(_){var et=_getPrototypeOf$c(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$c(this,_e)}}function _possibleConstructorReturn$c(a,_){return _&&(_typeof$d(_)==="object"||typeof _=="function")?_:_assertThisInitialized$d(a)}function _assertThisInitialized$d(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$c(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$c(a){return _getPrototypeOf$c=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$c(a)}function _defineProperty$c(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var AMPMMidnightParser=function(a){_inherits$c($,a);var _=_createSuper$c($);function $(){var j;_classCallCheck$c(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$c(_assertThisInitialized$d(j),"priority",80),_defineProperty$c(_assertThisInitialized$d(j),"incompatibleTokens",["a","B","H","k","t","T"]),j}return _createClass$d($,[{key:"parse",value:function(_e,et,tt){switch(et){case"b":case"bb":case"bbb":return tt.dayPeriod(_e,{width:"abbreviated",context:"formatting"})||tt.dayPeriod(_e,{width:"narrow",context:"formatting"});case"bbbbb":return tt.dayPeriod(_e,{width:"narrow",context:"formatting"});case"bbbb":default:return tt.dayPeriod(_e,{width:"wide",context:"formatting"})||tt.dayPeriod(_e,{width:"abbreviated",context:"formatting"})||tt.dayPeriod(_e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(_e,et,tt){return _e.setUTCHours(dayPeriodEnumToHours(tt),0,0,0),_e}}]),$}(Parser);function _typeof$c(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$c=function($){return typeof $}:_typeof$c=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$c(a)}function _classCallCheck$b(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$c(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$c(a,_,$){return _&&_defineProperties$c(a.prototype,_),$&&_defineProperties$c(a,$),a}function _inherits$b(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$c(a,_)}function _setPrototypeOf$c(a,_){return _setPrototypeOf$c=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$c(a,_)}function _createSuper$b(a){var _=_isNativeReflectConstruct$b();return function(){var j=_getPrototypeOf$b(a),_e;if(_){var et=_getPrototypeOf$b(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$b(this,_e)}}function _possibleConstructorReturn$b(a,_){return _&&(_typeof$c(_)==="object"||typeof _=="function")?_:_assertThisInitialized$c(a)}function _assertThisInitialized$c(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$b(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$b(a){return _getPrototypeOf$b=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$b(a)}function _defineProperty$b(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var DayPeriodParser=function(a){_inherits$b($,a);var _=_createSuper$b($);function $(){var j;_classCallCheck$b(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$b(_assertThisInitialized$c(j),"priority",80),_defineProperty$b(_assertThisInitialized$c(j),"incompatibleTokens",["a","b","t","T"]),j}return _createClass$c($,[{key:"parse",value:function(_e,et,tt){switch(et){case"B":case"BB":case"BBB":return tt.dayPeriod(_e,{width:"abbreviated",context:"formatting"})||tt.dayPeriod(_e,{width:"narrow",context:"formatting"});case"BBBBB":return tt.dayPeriod(_e,{width:"narrow",context:"formatting"});case"BBBB":default:return tt.dayPeriod(_e,{width:"wide",context:"formatting"})||tt.dayPeriod(_e,{width:"abbreviated",context:"formatting"})||tt.dayPeriod(_e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(_e,et,tt){return _e.setUTCHours(dayPeriodEnumToHours(tt),0,0,0),_e}}]),$}(Parser);function _typeof$b(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$b=function($){return typeof $}:_typeof$b=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$b(a)}function _classCallCheck$a(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$b(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$b(a,_,$){return _&&_defineProperties$b(a.prototype,_),$&&_defineProperties$b(a,$),a}function _inherits$a(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$b(a,_)}function _setPrototypeOf$b(a,_){return _setPrototypeOf$b=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$b(a,_)}function _createSuper$a(a){var _=_isNativeReflectConstruct$a();return function(){var j=_getPrototypeOf$a(a),_e;if(_){var et=_getPrototypeOf$a(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$a(this,_e)}}function _possibleConstructorReturn$a(a,_){return _&&(_typeof$b(_)==="object"||typeof _=="function")?_:_assertThisInitialized$b(a)}function _assertThisInitialized$b(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$a(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$a(a){return _getPrototypeOf$a=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$a(a)}function _defineProperty$a(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var Hour1to12Parser=function(a){_inherits$a($,a);var _=_createSuper$a($);function $(){var j;_classCallCheck$a(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$a(_assertThisInitialized$b(j),"priority",70),_defineProperty$a(_assertThisInitialized$b(j),"incompatibleTokens",["H","K","k","t","T"]),j}return _createClass$b($,[{key:"parse",value:function(_e,et,tt){switch(et){case"h":return parseNumericPattern(numericPatterns.hour12h,_e);case"ho":return tt.ordinalNumber(_e,{unit:"hour"});default:return parseNDigits(et.length,_e)}}},{key:"validate",value:function(_e,et){return et>=1&&et<=12}},{key:"set",value:function(_e,et,tt){var rt=_e.getUTCHours()>=12;return rt&&tt<12?_e.setUTCHours(tt+12,0,0,0):!rt&&tt===12?_e.setUTCHours(0,0,0,0):_e.setUTCHours(tt,0,0,0),_e}}]),$}(Parser);function _typeof$a(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$a=function($){return typeof $}:_typeof$a=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$a(a)}function _classCallCheck$9(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$a(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$a(a,_,$){return _&&_defineProperties$a(a.prototype,_),$&&_defineProperties$a(a,$),a}function _inherits$9(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$a(a,_)}function _setPrototypeOf$a(a,_){return _setPrototypeOf$a=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$a(a,_)}function _createSuper$9(a){var _=_isNativeReflectConstruct$9();return function(){var j=_getPrototypeOf$9(a),_e;if(_){var et=_getPrototypeOf$9(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$9(this,_e)}}function _possibleConstructorReturn$9(a,_){return _&&(_typeof$a(_)==="object"||typeof _=="function")?_:_assertThisInitialized$a(a)}function _assertThisInitialized$a(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$9(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$9(a){return _getPrototypeOf$9=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$9(a)}function _defineProperty$9(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var Hour0to23Parser=function(a){_inherits$9($,a);var _=_createSuper$9($);function $(){var j;_classCallCheck$9(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$9(_assertThisInitialized$a(j),"priority",70),_defineProperty$9(_assertThisInitialized$a(j),"incompatibleTokens",["a","b","h","K","k","t","T"]),j}return _createClass$a($,[{key:"parse",value:function(_e,et,tt){switch(et){case"H":return parseNumericPattern(numericPatterns.hour23h,_e);case"Ho":return tt.ordinalNumber(_e,{unit:"hour"});default:return parseNDigits(et.length,_e)}}},{key:"validate",value:function(_e,et){return et>=0&&et<=23}},{key:"set",value:function(_e,et,tt){return _e.setUTCHours(tt,0,0,0),_e}}]),$}(Parser);function _typeof$9(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$9=function($){return typeof $}:_typeof$9=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$9(a)}function _classCallCheck$8(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$9(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$9(a,_,$){return _&&_defineProperties$9(a.prototype,_),$&&_defineProperties$9(a,$),a}function _inherits$8(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$9(a,_)}function _setPrototypeOf$9(a,_){return _setPrototypeOf$9=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$9(a,_)}function _createSuper$8(a){var _=_isNativeReflectConstruct$8();return function(){var j=_getPrototypeOf$8(a),_e;if(_){var et=_getPrototypeOf$8(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$8(this,_e)}}function _possibleConstructorReturn$8(a,_){return _&&(_typeof$9(_)==="object"||typeof _=="function")?_:_assertThisInitialized$9(a)}function _assertThisInitialized$9(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$8(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$8(a){return _getPrototypeOf$8=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$8(a)}function _defineProperty$8(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var Hour0To11Parser=function(a){_inherits$8($,a);var _=_createSuper$8($);function $(){var j;_classCallCheck$8(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$8(_assertThisInitialized$9(j),"priority",70),_defineProperty$8(_assertThisInitialized$9(j),"incompatibleTokens",["h","H","k","t","T"]),j}return _createClass$9($,[{key:"parse",value:function(_e,et,tt){switch(et){case"K":return parseNumericPattern(numericPatterns.hour11h,_e);case"Ko":return tt.ordinalNumber(_e,{unit:"hour"});default:return parseNDigits(et.length,_e)}}},{key:"validate",value:function(_e,et){return et>=0&&et<=11}},{key:"set",value:function(_e,et,tt){var rt=_e.getUTCHours()>=12;return rt&&tt<12?_e.setUTCHours(tt+12,0,0,0):_e.setUTCHours(tt,0,0,0),_e}}]),$}(Parser);function _typeof$8(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$8=function($){return typeof $}:_typeof$8=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$8(a)}function _classCallCheck$7(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$8(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$8(a,_,$){return _&&_defineProperties$8(a.prototype,_),$&&_defineProperties$8(a,$),a}function _inherits$7(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$8(a,_)}function _setPrototypeOf$8(a,_){return _setPrototypeOf$8=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$8(a,_)}function _createSuper$7(a){var _=_isNativeReflectConstruct$7();return function(){var j=_getPrototypeOf$7(a),_e;if(_){var et=_getPrototypeOf$7(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$7(this,_e)}}function _possibleConstructorReturn$7(a,_){return _&&(_typeof$8(_)==="object"||typeof _=="function")?_:_assertThisInitialized$8(a)}function _assertThisInitialized$8(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$7(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$7(a){return _getPrototypeOf$7=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$7(a)}function _defineProperty$7(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var Hour1To24Parser=function(a){_inherits$7($,a);var _=_createSuper$7($);function $(){var j;_classCallCheck$7(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$7(_assertThisInitialized$8(j),"priority",70),_defineProperty$7(_assertThisInitialized$8(j),"incompatibleTokens",["a","b","h","H","K","t","T"]),j}return _createClass$8($,[{key:"parse",value:function(_e,et,tt){switch(et){case"k":return parseNumericPattern(numericPatterns.hour24h,_e);case"ko":return tt.ordinalNumber(_e,{unit:"hour"});default:return parseNDigits(et.length,_e)}}},{key:"validate",value:function(_e,et){return et>=1&&et<=24}},{key:"set",value:function(_e,et,tt){var rt=tt<=24?tt%24:tt;return _e.setUTCHours(rt,0,0,0),_e}}]),$}(Parser);function _typeof$7(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$7=function($){return typeof $}:_typeof$7=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$7(a)}function _classCallCheck$6(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$7(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$7(a,_,$){return _&&_defineProperties$7(a.prototype,_),$&&_defineProperties$7(a,$),a}function _inherits$6(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$7(a,_)}function _setPrototypeOf$7(a,_){return _setPrototypeOf$7=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$7(a,_)}function _createSuper$6(a){var _=_isNativeReflectConstruct$6();return function(){var j=_getPrototypeOf$6(a),_e;if(_){var et=_getPrototypeOf$6(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$6(this,_e)}}function _possibleConstructorReturn$6(a,_){return _&&(_typeof$7(_)==="object"||typeof _=="function")?_:_assertThisInitialized$7(a)}function _assertThisInitialized$7(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$6(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$6(a){return _getPrototypeOf$6=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$6(a)}function _defineProperty$6(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var MinuteParser=function(a){_inherits$6($,a);var _=_createSuper$6($);function $(){var j;_classCallCheck$6(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$6(_assertThisInitialized$7(j),"priority",60),_defineProperty$6(_assertThisInitialized$7(j),"incompatibleTokens",["t","T"]),j}return _createClass$7($,[{key:"parse",value:function(_e,et,tt){switch(et){case"m":return parseNumericPattern(numericPatterns.minute,_e);case"mo":return tt.ordinalNumber(_e,{unit:"minute"});default:return parseNDigits(et.length,_e)}}},{key:"validate",value:function(_e,et){return et>=0&&et<=59}},{key:"set",value:function(_e,et,tt){return _e.setUTCMinutes(tt,0,0),_e}}]),$}(Parser);function _typeof$6(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$6=function($){return typeof $}:_typeof$6=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$6(a)}function _classCallCheck$5(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$6(a,_,$){return _&&_defineProperties$6(a.prototype,_),$&&_defineProperties$6(a,$),a}function _inherits$5(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$6(a,_)}function _setPrototypeOf$6(a,_){return _setPrototypeOf$6=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$6(a,_)}function _createSuper$5(a){var _=_isNativeReflectConstruct$5();return function(){var j=_getPrototypeOf$5(a),_e;if(_){var et=_getPrototypeOf$5(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$5(this,_e)}}function _possibleConstructorReturn$5(a,_){return _&&(_typeof$6(_)==="object"||typeof _=="function")?_:_assertThisInitialized$6(a)}function _assertThisInitialized$6(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$5(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$5(a){return _getPrototypeOf$5=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$5(a)}function _defineProperty$5(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var SecondParser=function(a){_inherits$5($,a);var _=_createSuper$5($);function $(){var j;_classCallCheck$5(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$5(_assertThisInitialized$6(j),"priority",50),_defineProperty$5(_assertThisInitialized$6(j),"incompatibleTokens",["t","T"]),j}return _createClass$6($,[{key:"parse",value:function(_e,et,tt){switch(et){case"s":return parseNumericPattern(numericPatterns.second,_e);case"so":return tt.ordinalNumber(_e,{unit:"second"});default:return parseNDigits(et.length,_e)}}},{key:"validate",value:function(_e,et){return et>=0&&et<=59}},{key:"set",value:function(_e,et,tt){return _e.setUTCSeconds(tt,0),_e}}]),$}(Parser);function _typeof$5(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$5=function($){return typeof $}:_typeof$5=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$5(a)}function _classCallCheck$4(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$5(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$5(a,_,$){return _&&_defineProperties$5(a.prototype,_),$&&_defineProperties$5(a,$),a}function _inherits$4(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$5(a,_)}function _setPrototypeOf$5(a,_){return _setPrototypeOf$5=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$5(a,_)}function _createSuper$4(a){var _=_isNativeReflectConstruct$4();return function(){var j=_getPrototypeOf$4(a),_e;if(_){var et=_getPrototypeOf$4(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$4(this,_e)}}function _possibleConstructorReturn$4(a,_){return _&&(_typeof$5(_)==="object"||typeof _=="function")?_:_assertThisInitialized$5(a)}function _assertThisInitialized$5(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$4(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$4(a){return _getPrototypeOf$4=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$4(a)}function _defineProperty$4(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var FractionOfSecondParser=function(a){_inherits$4($,a);var _=_createSuper$4($);function $(){var j;_classCallCheck$4(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$4(_assertThisInitialized$5(j),"priority",30),_defineProperty$4(_assertThisInitialized$5(j),"incompatibleTokens",["t","T"]),j}return _createClass$5($,[{key:"parse",value:function(_e,et){var tt=function(at){return Math.floor(at*Math.pow(10,-et.length+3))};return mapValue(parseNDigits(et.length,_e),tt)}},{key:"set",value:function(_e,et,tt){return _e.setUTCMilliseconds(tt),_e}}]),$}(Parser);function _typeof$4(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$4=function($){return typeof $}:_typeof$4=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$4(a)}function _classCallCheck$3(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$4(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$4(a,_,$){return _&&_defineProperties$4(a.prototype,_),$&&_defineProperties$4(a,$),a}function _inherits$3(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$4(a,_)}function _setPrototypeOf$4(a,_){return _setPrototypeOf$4=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$4(a,_)}function _createSuper$3(a){var _=_isNativeReflectConstruct$3();return function(){var j=_getPrototypeOf$3(a),_e;if(_){var et=_getPrototypeOf$3(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$3(this,_e)}}function _possibleConstructorReturn$3(a,_){return _&&(_typeof$4(_)==="object"||typeof _=="function")?_:_assertThisInitialized$4(a)}function _assertThisInitialized$4(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$3(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$3(a){return _getPrototypeOf$3=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$3(a)}function _defineProperty$3(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var ISOTimezoneWithZParser=function(a){_inherits$3($,a);var _=_createSuper$3($);function $(){var j;_classCallCheck$3(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$3(_assertThisInitialized$4(j),"priority",10),_defineProperty$3(_assertThisInitialized$4(j),"incompatibleTokens",["t","T","x"]),j}return _createClass$4($,[{key:"parse",value:function(_e,et){switch(et){case"X":return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,_e);case"XX":return parseTimezonePattern(timezonePatterns.basic,_e);case"XXXX":return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,_e);case"XXXXX":return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,_e);case"XXX":default:return parseTimezonePattern(timezonePatterns.extended,_e)}}},{key:"set",value:function(_e,et,tt){return et.timestampIsSet?_e:new Date(_e.getTime()-tt)}}]),$}(Parser);function _typeof$3(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$3=function($){return typeof $}:_typeof$3=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$3(a)}function _classCallCheck$2(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$3(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$3(a,_,$){return _&&_defineProperties$3(a.prototype,_),$&&_defineProperties$3(a,$),a}function _inherits$2(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$3(a,_)}function _setPrototypeOf$3(a,_){return _setPrototypeOf$3=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$3(a,_)}function _createSuper$2(a){var _=_isNativeReflectConstruct$2();return function(){var j=_getPrototypeOf$2(a),_e;if(_){var et=_getPrototypeOf$2(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$2(this,_e)}}function _possibleConstructorReturn$2(a,_){return _&&(_typeof$3(_)==="object"||typeof _=="function")?_:_assertThisInitialized$3(a)}function _assertThisInitialized$3(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$2(a){return _getPrototypeOf$2=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$2(a)}function _defineProperty$2(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var ISOTimezoneParser=function(a){_inherits$2($,a);var _=_createSuper$2($);function $(){var j;_classCallCheck$2(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$2(_assertThisInitialized$3(j),"priority",10),_defineProperty$2(_assertThisInitialized$3(j),"incompatibleTokens",["t","T","X"]),j}return _createClass$3($,[{key:"parse",value:function(_e,et){switch(et){case"x":return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,_e);case"xx":return parseTimezonePattern(timezonePatterns.basic,_e);case"xxxx":return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,_e);case"xxxxx":return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,_e);case"xxx":default:return parseTimezonePattern(timezonePatterns.extended,_e)}}},{key:"set",value:function(_e,et,tt){return et.timestampIsSet?_e:new Date(_e.getTime()-tt)}}]),$}(Parser);function _typeof$2(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$2=function($){return typeof $}:_typeof$2=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$2(a)}function _classCallCheck$1(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$2(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$2(a,_,$){return _&&_defineProperties$2(a.prototype,_),$&&_defineProperties$2(a,$),a}function _inherits$1(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$2(a,_)}function _setPrototypeOf$2(a,_){return _setPrototypeOf$2=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$2(a,_)}function _createSuper$1(a){var _=_isNativeReflectConstruct$1();return function(){var j=_getPrototypeOf$1(a),_e;if(_){var et=_getPrototypeOf$1(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$1(this,_e)}}function _possibleConstructorReturn$1(a,_){return _&&(_typeof$2(_)==="object"||typeof _=="function")?_:_assertThisInitialized$2(a)}function _assertThisInitialized$2(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$1(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$1(a){return _getPrototypeOf$1=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$1(a)}function _defineProperty$1(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var TimestampSecondsParser=function(a){_inherits$1($,a);var _=_createSuper$1($);function $(){var j;_classCallCheck$1(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$1(_assertThisInitialized$2(j),"priority",40),_defineProperty$1(_assertThisInitialized$2(j),"incompatibleTokens","*"),j}return _createClass$2($,[{key:"parse",value:function(_e){return parseAnyDigitsSigned(_e)}},{key:"set",value:function(_e,et,tt){return[new Date(tt*1e3),{timestampIsSet:!0}]}}]),$}(Parser);function _typeof$1(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$1=function($){return typeof $}:_typeof$1=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$1(a)}function _classCallCheck(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$1(a,_,$){return _&&_defineProperties$1(a.prototype,_),$&&_defineProperties$1(a,$),a}function _inherits(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$1(a,_)}function _setPrototypeOf$1(a,_){return _setPrototypeOf$1=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$1(a,_)}function _createSuper(a){var _=_isNativeReflectConstruct();return function(){var j=_getPrototypeOf(a),_e;if(_){var et=_getPrototypeOf(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn(this,_e)}}function _possibleConstructorReturn(a,_){return _&&(_typeof$1(_)==="object"||typeof _=="function")?_:_assertThisInitialized$1(a)}function _assertThisInitialized$1(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf(a){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf(a)}function _defineProperty(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var TimestampMillisecondsParser=function(a){_inherits($,a);var _=_createSuper($);function $(){var j;_classCallCheck(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty(_assertThisInitialized$1(j),"priority",20),_defineProperty(_assertThisInitialized$1(j),"incompatibleTokens","*"),j}return _createClass$1($,[{key:"parse",value:function(_e){return parseAnyDigitsSigned(_e)}},{key:"set",value:function(_e,et,tt){return[new Date(tt),{timestampIsSet:!0}]}}]),$}(Parser),parsers={G:new EraParser,y:new YearParser,Y:new LocalWeekYearParser,R:new ISOWeekYearParser,u:new ExtendedYearParser,Q:new QuarterParser,q:new StandAloneQuarterParser,M:new MonthParser,L:new StandAloneMonthParser,w:new LocalWeekParser,I:new ISOWeekParser,d:new DateParser,D:new DayOfYearParser,E:new DayParser,e:new LocalDayParser,c:new StandAloneLocalDayParser,i:new ISODayParser,a:new AMPMParser,b:new AMPMMidnightParser,B:new DayPeriodParser,h:new Hour1to12Parser,H:new Hour0to23Parser,K:new Hour0To11Parser,k:new Hour1To24Parser,m:new MinuteParser,s:new SecondParser,S:new FractionOfSecondParser,X:new ISOTimezoneWithZParser,x:new ISOTimezoneParser,t:new TimestampSecondsParser,T:new TimestampMillisecondsParser};function _typeof(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function($){return typeof $}:_typeof=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof(a)}function _createForOfIteratorHelper(a,_){var $;if(typeof Symbol>"u"||a[Symbol.iterator]==null){if(Array.isArray(a)||($=_unsupportedIterableToArray(a))||_&&a&&typeof a.length=="number"){$&&(a=$);var j=0,_e=function(){};return{s:_e,n:function(){return j>=a.length?{done:!0}:{done:!1,value:a[j++]}},e:function(ct){throw ct},f:_e}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
144
+ `+_.prev}function arrObjKeys(a,_){var $=isArray$4(a),j=[];if($){j.length=a.length;for(var _e=0;_e<a.length;_e++)j[_e]=has$1(a,_e)?_(a[_e],a):""}var et=typeof gOPS=="function"?gOPS(a):[],tt;if(hasShammedSymbols){tt={};for(var rt=0;rt<et.length;rt++)tt["$"+et[rt]]=et[rt]}for(var at in a)has$1(a,at)&&($&&String(Number(at))===at&&at<a.length||hasShammedSymbols&&tt["$"+at]instanceof Symbol||($test.call(/[^\w$]/,at)?j.push(_(at,a)+": "+_(a[at],a)):j.push(at+": "+_(a[at],a))));if(typeof gOPS=="function")for(var ct=0;ct<et.length;ct++)isEnumerable.call(a,et[ct])&&j.push("["+_(et[ct])+"]: "+_(a[et[ct]],a));return j}var GetIntrinsic$5=getIntrinsic,callBound$8=callBound$c,inspect=objectInspect,$TypeError$1=GetIntrinsic$5("%TypeError%"),$WeakMap$1=GetIntrinsic$5("%WeakMap%",!0),$Map$3=GetIntrinsic$5("%Map%",!0),$weakMapGet=callBound$8("WeakMap.prototype.get",!0),$weakMapSet=callBound$8("WeakMap.prototype.set",!0),$weakMapHas=callBound$8("WeakMap.prototype.has",!0),$mapGet$1=callBound$8("Map.prototype.get",!0),$mapSet=callBound$8("Map.prototype.set",!0),$mapHas$5=callBound$8("Map.prototype.has",!0),listGetNode=function(a,_){for(var $=a,j;(j=$.next)!==null;$=j)if(j.key===_)return $.next=j.next,j.next=a.next,a.next=j,j},listGet=function(a,_){var $=listGetNode(a,_);return $&&$.value},listSet=function(a,_,$){var j=listGetNode(a,_);j?j.value=$:a.next={key:_,next:a.next,value:$}},listHas=function(a,_){return!!listGetNode(a,_)},sideChannel=function a(){var _,$,j,_e={assert:function(et){if(!_e.has(et))throw new $TypeError$1("Side channel does not contain "+inspect(et))},get:function(et){if($WeakMap$1&&et&&(typeof et=="object"||typeof et=="function")){if(_)return $weakMapGet(_,et)}else if($Map$3){if($)return $mapGet$1($,et)}else if(j)return listGet(j,et)},has:function(et){if($WeakMap$1&&et&&(typeof et=="object"||typeof et=="function")){if(_)return $weakMapHas(_,et)}else if($Map$3){if($)return $mapHas$5($,et)}else if(j)return listHas(j,et);return!1},set:function(et,tt){$WeakMap$1&&et&&(typeof et=="object"||typeof et=="function")?(_||(_=new $WeakMap$1),$weakMapSet(_,et,tt)):$Map$3?($||($=new $Map$3),$mapSet($,et,tt)):(j||(j={key:{},next:null}),listSet(j,et,tt))}};return _e},GetIntrinsic$4=getIntrinsic,hasOwn=hasown,channel=sideChannel(),$TypeError=GetIntrinsic$4("%TypeError%"),SLOT$1={assert:function(a,_){if(!a||typeof a!="object"&&typeof a!="function")throw new $TypeError("`O` is not an object");if(typeof _!="string")throw new $TypeError("`slot` must be a string");if(channel.assert(a),!SLOT$1.has(a,_))throw new $TypeError("`"+_+"` is not present on `O`")},get:function(a,_){if(!a||typeof a!="object"&&typeof a!="function")throw new $TypeError("`O` is not an object");if(typeof _!="string")throw new $TypeError("`slot` must be a string");var $=channel.get(a);return $&&$["$"+_]},has:function(a,_){if(!a||typeof a!="object"&&typeof a!="function")throw new $TypeError("`O` is not an object");if(typeof _!="string")throw new $TypeError("`slot` must be a string");var $=channel.get(a);return!!$&&hasOwn($,"$"+_)},set:function(a,_,$){if(!a||typeof a!="object"&&typeof a!="function")throw new $TypeError("`O` is not an object");if(typeof _!="string")throw new $TypeError("`slot` must be a string");var j=channel.get(a);j||(j={},channel.set(a,j)),j["$"+_]=$}};Object.freeze&&Object.freeze(SLOT$1);var internalSlot=SLOT$1,SLOT=internalSlot,$SyntaxError=SyntaxError,$StopIteration=typeof StopIteration=="object"?StopIteration:null,stopIterationIterator=function a(_){if(!$StopIteration)throw new $SyntaxError("this environment lacks StopIteration");SLOT.set(_,"[[Done]]",!1);var $={next:function(){var _e=SLOT.get(this,"[[Iterator]]"),et=SLOT.get(_e,"[[Done]]");try{return{done:et,value:et?void 0:_e.next()}}catch(tt){if(SLOT.set(_e,"[[Done]]",!0),tt!==$StopIteration)throw tt;return{done:!0,value:void 0}}}};return SLOT.set($,"[[Iterator]]",_),$},toString$1={}.toString,isarray=Array.isArray||function(a){return toString$1.call(a)=="[object Array]"},strValue=String.prototype.valueOf,tryStringObject=function a(_){try{return strValue.call(_),!0}catch{return!1}},toStr$3=Object.prototype.toString,strClass="[object String]",hasToStringTag$4=shams(),isString$3=function a(_){return typeof _=="string"?!0:typeof _!="object"?!1:hasToStringTag$4?tryStringObject(_):toStr$3.call(_)===strClass},$Map$2=typeof Map=="function"&&Map.prototype?Map:null,$Set$3=typeof Set=="function"&&Set.prototype?Set:null,exported$2;$Map$2||(exported$2=function(_){return!1});var $mapHas$4=$Map$2?Map.prototype.has:null,$setHas$4=$Set$3?Set.prototype.has:null;!exported$2&&!$mapHas$4&&(exported$2=function(_){return!1});var isMap$2=exported$2||function a(_){if(!_||typeof _!="object")return!1;try{if($mapHas$4.call(_),$setHas$4)try{$setHas$4.call(_)}catch{return!0}return _ instanceof $Map$2}catch{}return!1},$Map$1=typeof Map=="function"&&Map.prototype?Map:null,$Set$2=typeof Set=="function"&&Set.prototype?Set:null,exported$1;$Set$2||(exported$1=function(_){return!1});var $mapHas$3=$Map$1?Map.prototype.has:null,$setHas$3=$Set$2?Set.prototype.has:null;!exported$1&&!$setHas$3&&(exported$1=function(_){return!1});var isSet$2=exported$1||function a(_){if(!_||typeof _!="object")return!1;try{if($setHas$3.call(_),$mapHas$3)try{$mapHas$3.call(_)}catch{return!0}return _ instanceof $Set$2}catch{}return!1},isArguments$3=isArguments$5,getStopIterationIterator=stopIterationIterator;if(hasSymbols$4()||shams$1()){var $iterator=Symbol.iterator;esGetIterator.exports=function(_){if(_!=null&&typeof _[$iterator]<"u")return _[$iterator]();if(isArguments$3(_))return Array.prototype[$iterator].call(_)}}else{var isArray$3=isarray,isString$2=isString$3,GetIntrinsic$3=getIntrinsic,$Map=GetIntrinsic$3("%Map%",!0),$Set$1=GetIntrinsic$3("%Set%",!0),callBound$7=callBound$c,$arrayPush=callBound$7("Array.prototype.push"),$charCodeAt=callBound$7("String.prototype.charCodeAt"),$stringSlice=callBound$7("String.prototype.slice"),advanceStringIndex=function(_,$){var j=_.length;if($+1>=j)return $+1;var _e=$charCodeAt(_,$);if(_e<55296||_e>56319)return $+1;var et=$charCodeAt(_,$+1);return et<56320||et>57343?$+1:$+2},getArrayIterator=function(_){var $=0;return{next:function(){var _e=$>=_.length,et;return _e||(et=_[$],$+=1),{done:_e,value:et}}}},getNonCollectionIterator=function(_,$){if(isArray$3(_)||isArguments$3(_))return getArrayIterator(_);if(isString$2(_)){var j=0;return{next:function(){var et=advanceStringIndex(_,j),tt=$stringSlice(_,j,et);return j=et,{done:et>_.length,value:tt}}}}if($&&typeof _["_es6-shim iterator_"]<"u")return _["_es6-shim iterator_"]()};if(!$Map&&!$Set$1)esGetIterator.exports=function(_){if(_!=null)return getNonCollectionIterator(_,!0)};else{var isMap$1=isMap$2,isSet$1=isSet$2,$mapForEach=callBound$7("Map.prototype.forEach",!0),$setForEach=callBound$7("Set.prototype.forEach",!0);if(typeof process$1>"u"||!process$1.versions||!process$1.versions.node)var $mapIterator=callBound$7("Map.prototype.iterator",!0),$setIterator=callBound$7("Set.prototype.iterator",!0);var $mapAtAtIterator=callBound$7("Map.prototype.@@iterator",!0)||callBound$7("Map.prototype._es6-shim iterator_",!0),$setAtAtIterator=callBound$7("Set.prototype.@@iterator",!0)||callBound$7("Set.prototype._es6-shim iterator_",!0),getCollectionIterator=function(_){if(isMap$1(_)){if($mapIterator)return getStopIterationIterator($mapIterator(_));if($mapAtAtIterator)return $mapAtAtIterator(_);if($mapForEach){var $=[];return $mapForEach(_,function(_e,et){$arrayPush($,[et,_e])}),getArrayIterator($)}}if(isSet$1(_)){if($setIterator)return getStopIterationIterator($setIterator(_));if($setAtAtIterator)return $setAtAtIterator(_);if($setForEach){var j=[];return $setForEach(_,function(_e){$arrayPush(j,_e)}),getArrayIterator(j)}}};esGetIterator.exports=function(_){return getCollectionIterator(_)||getNonCollectionIterator(_)}}}var esGetIteratorExports=esGetIterator.exports,numberIsNaN=function(a){return a!==a},implementation$2=function a(_,$){return _===0&&$===0?1/_===1/$:!!(_===$||numberIsNaN(_)&&numberIsNaN($))},implementation$1=implementation$2,polyfill$1=function a(){return typeof Object.is=="function"?Object.is:implementation$1},getPolyfill$1=polyfill$1,define$1=defineProperties_1,shim$1=function a(){var _=getPolyfill$1();return define$1(Object,{is:_},{is:function(){return Object.is!==_}}),_},define=defineProperties_1,callBind$1=callBindExports,implementation=implementation$2,getPolyfill=polyfill$1,shim=shim$1,polyfill=callBind$1(getPolyfill(),Object);define(polyfill,{getPolyfill,implementation,shim});var objectIs=polyfill,callBind=callBindExports,callBound$6=callBound$c,GetIntrinsic$2=getIntrinsic,isTypedArray$2=isTypedArray$3,$ArrayBuffer=GetIntrinsic$2("ArrayBuffer",!0),$Float32Array=GetIntrinsic$2("Float32Array",!0),$byteLength$2=callBound$6("ArrayBuffer.prototype.byteLength",!0),abSlice=$ArrayBuffer&&!$byteLength$2&&new $ArrayBuffer().slice,$abSlice=abSlice&&callBind(abSlice),isArrayBuffer$2=$byteLength$2||$abSlice?function a(_){if(!_||typeof _!="object")return!1;try{return $byteLength$2?$byteLength$2(_):$abSlice(_,0),!0}catch{return!1}}:$Float32Array?function a(_){try{return new $Float32Array(_).buffer===_&&!isTypedArray$2(_)}catch($){return typeof _=="object"&&$.name==="RangeError"}}:function a(_){return!1},getDay=Date.prototype.getDay,tryDateObject=function a(_){try{return getDay.call(_),!0}catch{return!1}},toStr$2=Object.prototype.toString,dateClass="[object Date]",hasToStringTag$3=shams(),isDateObject=function a(_){return typeof _!="object"||_===null?!1:hasToStringTag$3?tryDateObject(_):toStr$2.call(_)===dateClass},callBound$5=callBound$c,hasToStringTag$2=shams(),has,$exec,isRegexMarker,badStringifier;if(hasToStringTag$2){has=callBound$5("Object.prototype.hasOwnProperty"),$exec=callBound$5("RegExp.prototype.exec"),isRegexMarker={};var throwRegexMarker=function(){throw isRegexMarker};badStringifier={toString:throwRegexMarker,valueOf:throwRegexMarker},typeof Symbol.toPrimitive=="symbol"&&(badStringifier[Symbol.toPrimitive]=throwRegexMarker)}var $toString$1=callBound$5("Object.prototype.toString"),gOPD=Object.getOwnPropertyDescriptor,regexClass="[object RegExp]",isRegex$1=hasToStringTag$2?function a(_){if(!_||typeof _!="object")return!1;var $=gOPD(_,"lastIndex"),j=$&&has($,"value");if(!j)return!1;try{$exec(_,badStringifier)}catch(_e){return _e===isRegexMarker}}:function a(_){return!_||typeof _!="object"&&typeof _!="function"?!1:$toString$1(_)===regexClass},callBound$4=callBound$c,$byteLength$1=callBound$4("SharedArrayBuffer.prototype.byteLength",!0),isSharedArrayBuffer$1=$byteLength$1?function a(_){if(!_||typeof _!="object")return!1;try{return $byteLength$1(_),!0}catch{return!1}}:function a(_){return!1},numToStr=Number.prototype.toString,tryNumberObject=function a(_){try{return numToStr.call(_),!0}catch{return!1}},toStr$1=Object.prototype.toString,numClass="[object Number]",hasToStringTag$1=shams(),isNumberObject=function a(_){return typeof _=="number"?!0:typeof _!="object"?!1:hasToStringTag$1?tryNumberObject(_):toStr$1.call(_)===numClass},callBound$3=callBound$c,$boolToStr=callBound$3("Boolean.prototype.toString"),$toString=callBound$3("Object.prototype.toString"),tryBooleanObject=function a(_){try{return $boolToStr(_),!0}catch{return!1}},boolClass="[object Boolean]",hasToStringTag=shams(),isBooleanObject=function a(_){return typeof _=="boolean"?!0:_===null||typeof _!="object"?!1:hasToStringTag&&Symbol.toStringTag in _?tryBooleanObject(_):$toString(_)===boolClass},isSymbol$2={exports:{}},toStr=Object.prototype.toString,hasSymbols=hasSymbols$4();if(hasSymbols){var symToStr=Symbol.prototype.toString,symStringRegex=/^Symbol\(.*\)$/,isSymbolObject=function(_){return typeof _.valueOf()!="symbol"?!1:symStringRegex.test(symToStr.call(_))};isSymbol$2.exports=function(_){if(typeof _=="symbol")return!0;if(toStr.call(_)!=="[object Symbol]")return!1;try{return isSymbolObject(_)}catch{return!1}}}else isSymbol$2.exports=function(_){return!1};var isSymbolExports=isSymbol$2.exports,isBigint={exports:{}},$BigInt=typeof BigInt<"u"&&BigInt,hasBigints=function a(){return typeof $BigInt=="function"&&typeof BigInt=="function"&&typeof $BigInt(42)=="bigint"&&typeof BigInt(42)=="bigint"},hasBigInts=hasBigints();if(hasBigInts){var bigIntValueOf=BigInt.prototype.valueOf,tryBigInt=function(_){try{return bigIntValueOf.call(_),!0}catch{}return!1};isBigint.exports=function(_){return _===null||typeof _>"u"||typeof _=="boolean"||typeof _=="string"||typeof _=="number"||typeof _=="symbol"||typeof _=="function"?!1:typeof _=="bigint"?!0:tryBigInt(_)}}else isBigint.exports=function(_){return!1};var isBigintExports=isBigint.exports,isString$1=isString$3,isNumber$1=isNumberObject,isBoolean$1=isBooleanObject,isSymbol$1=isSymbolExports,isBigInt=isBigintExports,whichBoxedPrimitive$1=function a(_){if(_==null||typeof _!="object"&&typeof _!="function")return null;if(isString$1(_))return"String";if(isNumber$1(_))return"Number";if(isBoolean$1(_))return"Boolean";if(isSymbol$1(_))return"Symbol";if(isBigInt(_))return"BigInt"},$WeakMap=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,$WeakSet$1=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,exported;$WeakMap||(exported=function(_){return!1});var $mapHas$2=$WeakMap?$WeakMap.prototype.has:null,$setHas$2=$WeakSet$1?$WeakSet$1.prototype.has:null;!exported&&!$mapHas$2&&(exported=function(_){return!1});var isWeakmap=exported||function a(_){if(!_||typeof _!="object")return!1;try{if($mapHas$2.call(_,$mapHas$2),$setHas$2)try{$setHas$2.call(_,$setHas$2)}catch{return!0}return _ instanceof $WeakMap}catch{}return!1},isWeakset={exports:{}},GetIntrinsic$1=getIntrinsic,callBound$2=callBound$c,$WeakSet=GetIntrinsic$1("%WeakSet%",!0),$setHas$1=callBound$2("WeakSet.prototype.has",!0);if($setHas$1){var $mapHas$1=callBound$2("WeakMap.prototype.has",!0);isWeakset.exports=function(_){if(!_||typeof _!="object")return!1;try{if($setHas$1(_,$setHas$1),$mapHas$1)try{$mapHas$1(_,$mapHas$1)}catch{return!0}return _ instanceof $WeakSet}catch{}return!1}}else isWeakset.exports=function(_){return!1};var isWeaksetExports=isWeakset.exports,isMap=isMap$2,isSet=isSet$2,isWeakMap=isWeakmap,isWeakSet=isWeaksetExports,whichCollection$1=function a(_){if(_&&typeof _=="object"){if(isMap(_))return"Map";if(isSet(_))return"Set";if(isWeakMap(_))return"WeakMap";if(isWeakSet(_))return"WeakSet"}return!1},callBound$1=callBound$c,$byteLength=callBound$1("ArrayBuffer.prototype.byteLength",!0),isArrayBuffer$1=isArrayBuffer$2,arrayBufferByteLength=function a(_){return isArrayBuffer$1(_)?$byteLength?$byteLength(_):_.byteLength:NaN},assign$1=object_assign,callBound=callBound$c,flags=regexp_prototype_flags,GetIntrinsic=getIntrinsic,getIterator=esGetIteratorExports,getSideChannel=sideChannel,is=objectIs,isArguments$2=isArguments$5,isArray$2=isarray,isArrayBuffer=isArrayBuffer$2,isDate$1=isDateObject,isRegex=isRegex$1,isSharedArrayBuffer=isSharedArrayBuffer$1,objectKeys=objectKeys$2,whichBoxedPrimitive=whichBoxedPrimitive$1,whichCollection=whichCollection$1,whichTypedArray=whichTypedArray$2,byteLength=arrayBufferByteLength,sabByteLength=callBound("SharedArrayBuffer.prototype.byteLength",!0),$getTime=callBound("Date.prototype.getTime"),gPO=Object.getPrototypeOf,$objToString=callBound("Object.prototype.toString"),$Set=GetIntrinsic("%Set%",!0),$mapHas=callBound("Map.prototype.has",!0),$mapGet=callBound("Map.prototype.get",!0),$mapSize=callBound("Map.prototype.size",!0),$setAdd=callBound("Set.prototype.add",!0),$setDelete=callBound("Set.prototype.delete",!0),$setHas=callBound("Set.prototype.has",!0),$setSize=callBound("Set.prototype.size",!0);function setHasEqualElement(a,_,$,j){for(var _e=getIterator(a),et;(et=_e.next())&&!et.done;)if(internalDeepEqual(_,et.value,$,j))return $setDelete(a,et.value),!0;return!1}function findLooseMatchingPrimitives(a){if(typeof a>"u")return null;if(typeof a!="object")return typeof a=="symbol"?!1:typeof a=="string"||typeof a=="number"?+a==+a:!0}function mapMightHaveLoosePrim(a,_,$,j,_e,et){var tt=findLooseMatchingPrimitives($);if(tt!=null)return tt;var rt=$mapGet(_,tt),at=assign$1({},_e,{strict:!1});return typeof rt>"u"&&!$mapHas(_,tt)||!internalDeepEqual(j,rt,at,et)?!1:!$mapHas(a,tt)&&internalDeepEqual(j,rt,at,et)}function setMightHaveLoosePrim(a,_,$){var j=findLooseMatchingPrimitives($);return j??($setHas(_,j)&&!$setHas(a,j))}function mapHasEqualEntry(a,_,$,j,_e,et){for(var tt=getIterator(a),rt,at;(rt=tt.next())&&!rt.done;)if(at=rt.value,internalDeepEqual($,at,_e,et)&&internalDeepEqual(j,$mapGet(_,at),_e,et))return $setDelete(a,at),!0;return!1}function internalDeepEqual(a,_,$,j){var _e=$||{};if(_e.strict?is(a,_):a===_)return!0;var et=whichBoxedPrimitive(a),tt=whichBoxedPrimitive(_);if(et!==tt)return!1;if(!a||!_||typeof a!="object"&&typeof _!="object")return _e.strict?is(a,_):a==_;var rt=j.has(a),at=j.has(_),ct;if(rt&&at){if(j.get(a)===j.get(_))return!0}else ct={};return rt||j.set(a,ct),at||j.set(_,ct),objEquiv(a,_,_e,j)}function isBuffer$2(a){return!a||typeof a!="object"||typeof a.length!="number"||typeof a.copy!="function"||typeof a.slice!="function"||a.length>0&&typeof a[0]!="number"?!1:!!(a.constructor&&a.constructor.isBuffer&&a.constructor.isBuffer(a))}function setEquiv(a,_,$,j){if($setSize(a)!==$setSize(_))return!1;for(var _e=getIterator(a),et=getIterator(_),tt,rt,at;(tt=_e.next())&&!tt.done;)if(tt.value&&typeof tt.value=="object")at||(at=new $Set),$setAdd(at,tt.value);else if(!$setHas(_,tt.value)){if($.strict||!setMightHaveLoosePrim(a,_,tt.value))return!1;at||(at=new $Set),$setAdd(at,tt.value)}if(at){for(;(rt=et.next())&&!rt.done;)if(rt.value&&typeof rt.value=="object"){if(!setHasEqualElement(at,rt.value,$.strict,j))return!1}else if(!$.strict&&!$setHas(a,rt.value)&&!setHasEqualElement(at,rt.value,$.strict,j))return!1;return $setSize(at)===0}return!0}function mapEquiv(a,_,$,j){if($mapSize(a)!==$mapSize(_))return!1;for(var _e=getIterator(a),et=getIterator(_),tt,rt,at,ct,dt,yt;(tt=_e.next())&&!tt.done;)if(ct=tt.value[0],dt=tt.value[1],ct&&typeof ct=="object")at||(at=new $Set),$setAdd(at,ct);else if(yt=$mapGet(_,ct),typeof yt>"u"&&!$mapHas(_,ct)||!internalDeepEqual(dt,yt,$,j)){if($.strict||!mapMightHaveLoosePrim(a,_,ct,dt,$,j))return!1;at||(at=new $Set),$setAdd(at,ct)}if(at){for(;(rt=et.next())&&!rt.done;)if(ct=rt.value[0],yt=rt.value[1],ct&&typeof ct=="object"){if(!mapHasEqualEntry(at,a,ct,yt,$,j))return!1}else if(!$.strict&&(!a.has(ct)||!internalDeepEqual($mapGet(a,ct),yt,$,j))&&!mapHasEqualEntry(at,a,ct,yt,assign$1({},$,{strict:!1}),j))return!1;return $setSize(at)===0}return!0}function objEquiv(a,_,$,j){var _e,et;if(typeof a!=typeof _||a==null||_==null||$objToString(a)!==$objToString(_)||isArguments$2(a)!==isArguments$2(_))return!1;var tt=isArray$2(a),rt=isArray$2(_);if(tt!==rt)return!1;var at=a instanceof Error,ct=_ instanceof Error;if(at!==ct||(at||ct)&&(a.name!==_.name||a.message!==_.message))return!1;var dt=isRegex(a),yt=isRegex(_);if(dt!==yt||(dt||yt)&&(a.source!==_.source||flags(a)!==flags(_)))return!1;var bt=isDate$1(a),Et=isDate$1(_);if(bt!==Et||(bt||Et)&&$getTime(a)!==$getTime(_)||$.strict&&gPO&&gPO(a)!==gPO(_))return!1;var $t=whichTypedArray(a),_t=whichTypedArray(_);if($t!==_t)return!1;if($t||_t){if(a.length!==_.length)return!1;for(_e=0;_e<a.length;_e++)if(a[_e]!==_[_e])return!1;return!0}var xt=isBuffer$2(a),St=isBuffer$2(_);if(xt!==St)return!1;if(xt||St){if(a.length!==_.length)return!1;for(_e=0;_e<a.length;_e++)if(a[_e]!==_[_e])return!1;return!0}var Mt=isArrayBuffer(a),Tt=isArrayBuffer(_);if(Mt!==Tt)return!1;if(Mt||Tt)return byteLength(a)!==byteLength(_)?!1:typeof Uint8Array=="function"&&internalDeepEqual(new Uint8Array(a),new Uint8Array(_),$,j);var Rt=isSharedArrayBuffer(a),Ct=isSharedArrayBuffer(_);if(Rt!==Ct)return!1;if(Rt||Ct)return sabByteLength(a)!==sabByteLength(_)?!1:typeof Uint8Array=="function"&&internalDeepEqual(new Uint8Array(a),new Uint8Array(_),$,j);if(typeof a!=typeof _)return!1;var It=objectKeys(a),kt=objectKeys(_);if(It.length!==kt.length)return!1;for(It.sort(),kt.sort(),_e=It.length-1;_e>=0;_e--)if(It[_e]!=kt[_e])return!1;for(_e=It.length-1;_e>=0;_e--)if(et=It[_e],!internalDeepEqual(a[et],_[et],$,j))return!1;var Dt=whichCollection(a),Bt=whichCollection(_);return Dt!==Bt?!1:Dt==="Set"||Bt==="Set"?setEquiv(a,_,$,j):Dt==="Map"?mapEquiv(a,_,$,j):!0}var deepEqual=function a(_,$,j){return internalDeepEqual(_,$,j,getSideChannel())},preview={},previewCamera={},validation={},__importDefault$4=commonjsGlobal&&commonjsGlobal.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(validation,"__esModule",{value:!0});validation.validateType=validation.generateLazyValidator=validation.Ajv=void 0;const ajv_1=__importDefault$4(ajvExports);validation.Ajv=ajv_1.default;const ajv_keywords_1=__importDefault$4(distExports$2),ajv_errors_1=__importDefault$4(distExports$1);function generateLazyValidator(a,_){let $=null;const j=(_e,et)=>{if(!$){const tt=new ajv_1.default({$data:!0,allErrors:!0});(0,ajv_keywords_1.default)(tt),(0,ajv_errors_1.default)(tt,{singleError:!0}),_==null||_.forEach(rt=>tt.addKeyword(rt)),$=tt.compile(a),Object.defineProperty(j,"errors",{get(){return $==null?void 0:$.errors}})}return $(_e,et)};return j}validation.generateLazyValidator=generateLazyValidator;function validateType(a,_){return a.validate(_)}validation.validateType=validateType;(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PreviewCamera=void 0;const _=validation;(function($){$.STATIC="static",$.INTERACTIVE="interactive"})(a.PreviewCamera||(a.PreviewCamera={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.PreviewCamera||(a.PreviewCamera={}))})(previewCamera);var previewConfig={};Object.defineProperty(previewConfig,"__esModule",{value:!0});var previewController={};Object.defineProperty(previewController,"__esModule",{value:!0});var previewEmoteEventType={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PreviewEmoteEventType=void 0;const _=validation;(function($){$.ANIMATION_PLAY="animation_play",$.ANIMATION_PAUSE="animation_pause",$.ANIMATION_LOOP="animation_loop",$.ANIMATION_END="animation_end",$.ANIMATION_PLAYING="animation_playing"})(a.PreviewEmoteEventType||(a.PreviewEmoteEventType={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.PreviewEmoteEventType||(a.PreviewEmoteEventType={}))})(previewEmoteEventType);var previewEmote={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PreviewEmote=void 0;const _=validation;(function($){$.IDLE="idle",$.WALK="walk",$.RUN="run",$.JUMP="jump",$.CLAP="clap",$.DAB="dab",$.DANCE="dance",$.FASHION="fashion",$.FASHION_2="fashion-2",$.FASHION_3="fashion-3",$.FASHION_4="fashion-4",$.LOVE="love",$.MONEY="money",$.FIST_PUMP="fist-pump",$.HEAD_EXPLODE="head-explode",$.WAVE="wave"})(a.PreviewEmote||(a.PreviewEmote={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.PreviewEmote||(a.PreviewEmote={}))})(previewEmote);var previewMessage={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.sendMessage=a.PreviewMessageType=void 0;const _=validation;(function(j){j.READY="ready",j.LOAD="load",j.ERROR="error",j.UPDATE="update",j.CONTROLLER_REQUEST="controller_request",j.CONTROLLER_RESPONSE="controller_response",j.EMOTE_EVENT="emote_event"})(a.PreviewMessageType||(a.PreviewMessageType={})),function(j){j.schema={type:"string",enum:Object.values(j)},j.validate=(0,_.generateLazyValidator)(j.schema)}(a.PreviewMessageType||(a.PreviewMessageType={}));const $=(j,_e,et,tt="*")=>{const rt={type:_e,payload:et};j.postMessage(rt,tt)};a.sendMessage=$})(previewMessage);var previewOptions={};Object.defineProperty(previewOptions,"__esModule",{value:!0});var previewProjection={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PreviewProjection=void 0;const _=validation;(function($){$.ORTHOGRAPHIC="orthographic",$.PERSPECTIVE="perspective"})(a.PreviewProjection||(a.PreviewProjection={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.PreviewProjection||(a.PreviewProjection={}))})(previewProjection);var previewType={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.PreviewType=void 0;const _=validation;(function($){$.TEXTURE="texture",$.WEARABLE="wearable",$.AVATAR="avatar"})(a.PreviewType||(a.PreviewType={})),function($){$.schema={type:"string",enum:Object.values($)},$.validate=(0,_.generateLazyValidator)($.schema)}(a.PreviewType||(a.PreviewType={}))})(previewType);var wearableRepresentationDefinition={};Object.defineProperty(wearableRepresentationDefinition,"__esModule",{value:!0});var wearableRepresentationWithBlobs={};Object.defineProperty(wearableRepresentationWithBlobs,"__esModule",{value:!0});var wearableDefinition={};Object.defineProperty(wearableDefinition,"__esModule",{value:!0});var wearableWithBlobs={};Object.defineProperty(wearableWithBlobs,"__esModule",{value:!0});var emoteRepresentationDefinition={};Object.defineProperty(emoteRepresentationDefinition,"__esModule",{value:!0});var emoteRepresentationWithBlobs={};Object.defineProperty(emoteRepresentationWithBlobs,"__esModule",{value:!0});var emoteDefinition={};Object.defineProperty(emoteDefinition,"__esModule",{value:!0});var emoteWithBlobs={};Object.defineProperty(emoteWithBlobs,"__esModule",{value:!0});(function(a){var _=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(j,_e,et,tt){tt===void 0&&(tt=et);var rt=Object.getOwnPropertyDescriptor(_e,et);(!rt||("get"in rt?!_e.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return _e[et]}}),Object.defineProperty(j,tt,rt)}:function(j,_e,et,tt){tt===void 0&&(tt=et),j[tt]=_e[et]}),$=commonjsGlobal&&commonjsGlobal.__exportStar||function(j,_e){for(var et in j)et!=="default"&&!Object.prototype.hasOwnProperty.call(_e,et)&&_(_e,j,et)};Object.defineProperty(a,"__esModule",{value:!0}),$(previewCamera,a),$(previewConfig,a),$(previewController,a),$(previewEmoteEventType,a),$(previewEmote,a),$(previewMessage,a),$(previewOptions,a),$(previewProjection,a),$(previewType,a),$(wearableRepresentationDefinition,a),$(wearableRepresentationWithBlobs,a),$(wearableDefinition,a),$(wearableWithBlobs,a),$(emoteRepresentationDefinition,a),$(emoteRepresentationWithBlobs,a),$(emoteDefinition,a),$(emoteWithBlobs,a)})(preview);var debounce$1={},__spreadArray=commonjsGlobal&&commonjsGlobal.__spreadArray||function(a,_,$){if($||arguments.length===2)for(var j=0,_e=_.length,et;j<_e;j++)(et||!(j in _))&&(et||(et=Array.prototype.slice.call(_,0,j)),et[j]=_[j]);return a.concat(et||Array.prototype.slice.call(_))};Object.defineProperty(debounce$1,"__esModule",{value:!0});debounce$1.createDebounce=void 0;function createDebounce(){var a=null;return function(_,$){for(var j=[],_e=2;_e<arguments.length;_e++)j[_e-2]=arguments[_e];a&&clearTimeout(a),a=setTimeout.apply(void 0,__spreadArray([_,$],j,!1))}}debounce$1.createDebounce=createDebounce;var WearablePreview_controller={},fpFuture={};Object.defineProperty(fpFuture,"__esModule",{value:!0});function future(){let a,_;const $=new Promise((j,_e)=>{a=et=>{j(et),$.isPending=!1},_=et=>{_e(et),$.isPending=!1}}).catch(j=>Promise.reject(j));return $.resolve=a,$.reject=_,"finally"in $||($.finally=j=>{$.then(j),$.catch(j)}),$.isPending=!0,$}fpFuture.future=future;fpFuture.default=future;var __importDefault$3=commonjsGlobal&&commonjsGlobal.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(WearablePreview_controller,"__esModule",{value:!0});WearablePreview_controller.createController=void 0;var events_1=eventsExports,fp_future_1=__importDefault$3(fpFuture),preview_1$1=preview,promises=new Map,emoteEvents=new Map;window.onmessage=function a(_){if(_.data&&_.data.type)switch(_.data.type){case preview_1$1.PreviewMessageType.CONTROLLER_RESPONSE:{var $=_.data.payload,j=$.id,_e=promises.get(j);_e&&($.ok?_e.resolve($.result):$.ok===!1&&_e.reject(new Error($.error)));break}case preview_1$1.PreviewMessageType.EMOTE_EVENT:{var $=_.data.payload,et=$.type,tt=$.payload,rt=emoteEvents.get(_.source);rt&&et&&rt.emit(et,tt);break}}};var nonce=0;function createSendRequest(a){return function($,j,_e){var et=document.getElementById(a),tt=a+"-"+nonce,rt=(0,fp_future_1.default)();promises.set(tt,rt);var at=preview_1$1.PreviewMessageType.CONTROLLER_REQUEST,ct={id:tt,namespace:$,method:j,params:_e};return(0,preview_1$1.sendMessage)(et.contentWindow,at,ct),nonce++,rt}}function createController(a){var _,$=document.getElementById(a);if(!$)throw new Error('Could not find an iframe with id="'.concat(a,'"'));var j=(_=emoteEvents.get($.contentWindow))!==null&&_!==void 0?_:new events_1.EventEmitter;emoteEvents.set($.contentWindow,j);var _e=createSendRequest(a);return{scene:{getScreenshot:function(et,tt){return _e("scene","getScreenshot",[et,tt])},getMetrics:function(){return _e("scene","getMetrics",[])},changeZoom:function(et){return _e("scene","changeZoom",[et])},panCamera:function(et){return _e("scene","panCamera",[et])},changeCameraPosition:function(et){return _e("scene","changeCameraPosition",[et])}},emote:{getLength:function(){return _e("emote","getLength",[])},isPlaying:function(){return _e("emote","isPlaying",[])},goTo:function(et){return _e("emote","goTo",[et])},play:function(){return _e("emote","play",[])},pause:function(){return _e("emote","pause",[])},stop:function(){return _e("emote","stop",[])},enableSound:function(){return _e("emote","enableSound",[])},disableSound:function(){return _e("emote","disableSound",[])},hasSound:function(){return _e("emote","hasSound",[])},events:j}}}WearablePreview_controller.createController=createController;const WearablePreview$1="";var config={};const WEARABLE_PREVIEW_URL$2="https://wearable-preview.decentraland.zone",ACCOUNT_URL$2="https://decentraland.zone/account",PROFILE_URL$2="https://decentraland.zone/profile",MARKETPLACE_URL$2="https://decentraland.zone/marketplace",MARKETPLACE_NAMES_URL$2="https://decentraland.zone/marketplace/names/claim",MARKETPLACE_WEARABLES_URL$2="https://decentraland.zone/marketplace/browse?section=wearables&vendor=decentraland&page=1&sortBy=newest&status=on_sale",MARKETPLACE_LANDS_URL$2="https://decentraland.zone/marketplace/lands",MARKETPLACE_EMOTES_URL$2="https://decentraland.zone/marketplace/browse?assetType=item&section=emotes&vendor=decentraland&page=1&sortBy=newest&status=on_sale",MARKETPLACE_MY_ASSETS_URL$2="https://decentraland.zone/marketplace/account?assetType=nft&section=wearables&vendor=decentraland&page=1&sortBy=newest&onlyOnSale=false",MARKETPLACE_SETTINGS_URL$2="https://decentraland.zone/marketplace/settings",BUILDER_URL$2="https://decentraland.zone/builder",BUILDER_WEARABLE_EMOTES_URL$2="https://decentraland.zone/builder/collections",BUILDER_SCENES_URL$2="https://decentraland.zone/builder/scenes",BUILDER_NAMES_URL$2="https://decentraland.zone/builder/names",BUILDER_WORLDS_URL$2="https://decentraland.zone/builder/worlds?tab=dcl",BUILDER_LAND_URL$2="https://decentraland.zone/builder/land",DAO_URL$2="https://decentraland.zone/dao",DAO_GRANTS_URL$2="https://decentraland.zone/dao/grants/",GOVERNANCE_URL$2="https://decentraland.zone/governance",GOVERNANCE_TRANSPARENCY_URL$2="https://decentraland.zone/governance/transparency/",GOVERNANCE_PROPOSALS_URL$2="https://decentraland.zone/governance/proposals/",GOVERNANCE_PROJECTS_URL$2="https://decentraland.zone/governance/projects/",EVENTS_URL$2="https://decentraland.zone/events",EVENTS_MY_EVENTS$2="https://decentraland.zone/events/me/",PLACES_URL$2="https://decentraland.zone/places",PLACES_MY_FAVORITE_URL$2="https://decentraland.zone/places/favorites/",EXPLORER_URL$2="https://play.decentraland.zone",STUDIOS_URL$2="https://studios.decentraland.org/",DOCS_ABOUT_URL$2="https://docs.decentraland.org/player/",DOCS_CREATORS_URL$2="https://docs.decentraland.org/creator/",DOCS_CONTRIBUTOR_URL$2="https://docs.decentraland.org/contributor/",DOCS_DAO_URL$2="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",BLOG_URL$2="https://decentraland.zone/blog/",require$$1={WEARABLE_PREVIEW_URL:WEARABLE_PREVIEW_URL$2,ACCOUNT_URL:ACCOUNT_URL$2,PROFILE_URL:PROFILE_URL$2,MARKETPLACE_URL:MARKETPLACE_URL$2,MARKETPLACE_NAMES_URL:MARKETPLACE_NAMES_URL$2,MARKETPLACE_WEARABLES_URL:MARKETPLACE_WEARABLES_URL$2,MARKETPLACE_LANDS_URL:MARKETPLACE_LANDS_URL$2,MARKETPLACE_EMOTES_URL:MARKETPLACE_EMOTES_URL$2,MARKETPLACE_MY_ASSETS_URL:MARKETPLACE_MY_ASSETS_URL$2,MARKETPLACE_SETTINGS_URL:MARKETPLACE_SETTINGS_URL$2,BUILDER_URL:BUILDER_URL$2,BUILDER_WEARABLE_EMOTES_URL:BUILDER_WEARABLE_EMOTES_URL$2,BUILDER_SCENES_URL:BUILDER_SCENES_URL$2,BUILDER_NAMES_URL:BUILDER_NAMES_URL$2,BUILDER_WORLDS_URL:BUILDER_WORLDS_URL$2,BUILDER_LAND_URL:BUILDER_LAND_URL$2,DAO_URL:DAO_URL$2,DAO_GRANTS_URL:DAO_GRANTS_URL$2,GOVERNANCE_URL:GOVERNANCE_URL$2,GOVERNANCE_TRANSPARENCY_URL:GOVERNANCE_TRANSPARENCY_URL$2,GOVERNANCE_PROPOSALS_URL:GOVERNANCE_PROPOSALS_URL$2,GOVERNANCE_PROJECTS_URL:GOVERNANCE_PROJECTS_URL$2,EVENTS_URL:EVENTS_URL$2,EVENTS_MY_EVENTS:EVENTS_MY_EVENTS$2,PLACES_URL:PLACES_URL$2,PLACES_MY_FAVORITE_URL:PLACES_MY_FAVORITE_URL$2,EXPLORER_URL:EXPLORER_URL$2,STUDIOS_URL:STUDIOS_URL$2,DOCS_ABOUT_URL:DOCS_ABOUT_URL$2,DOCS_CREATORS_URL:DOCS_CREATORS_URL$2,DOCS_CONTRIBUTOR_URL:DOCS_CONTRIBUTOR_URL$2,DOCS_DAO_URL:DOCS_DAO_URL$2,BLOG_URL:BLOG_URL$2},WEARABLE_PREVIEW_URL$1="https://wearable-preview.decentraland.today",ACCOUNT_URL$1="https://decentraland.today/account",PROFILE_URL$1="https://decentraland.today/profile",MARKETPLACE_URL$1="https://decentraland.today/marketplace",MARKETPLACE_NAMES_URL$1="https://decentraland.today/marketplace/names/claim",MARKETPLACE_WEARABLES_URL$1="https://decentraland.today/marketplace/browse?section=wearables&vendor=decentraland&page=1&sortBy=newest&status=on_sale",MARKETPLACE_LANDS_URL$1="https://decentraland.today/marketplace/lands",MARKETPLACE_EMOTES_URL$1="https://decentraland.today/marketplace/browse?assetType=item&section=emotes&vendor=decentraland&page=1&sortBy=newest&status=on_sale",MARKETPLACE_MY_ASSETS_URL$1="https://decentraland.today/marketplace/account?assetType=nft&section=wearables&vendor=decentraland&page=1&sortBy=newest&onlyOnSale=false",MARKETPLACE_SETTINGS_URL$1="https://decentraland.zone/marketplace/settings",BUILDER_URL$1="https://decentraland.today/builder",BUILDER_WEARABLE_EMOTES_URL$1="https://decentraland.today/builder/collections",BUILDER_SCENES_URL$1="https://decentraland.today/builder/scenes",BUILDER_NAMES_URL$1="https://decentraland.today/builder/names",BUILDER_WORLDS_URL$1="https://decentraland.today/builder/worlds?tab=dcl",BUILDER_LAND_URL$1="https://decentraland.today/builder/land",DAO_URL$1="https://decentraland.today/dao",DAO_GRANTS_URL$1="https://decentraland.today/dao/grants/",GOVERNANCE_URL$1="https://decentraland.zone/governance",GOVERNANCE_TRANSPARENCY_URL$1="https://decentraland.zone/governance/transparency/",GOVERNANCE_PROPOSALS_URL$1="https://decentraland.zone/governance/proposals/",GOVERNANCE_PROJECTS_URL$1="https://decentraland.zone/governance/projects/",EVENTS_URL$1="https://decentraland.zone/events",EVENTS_MY_EVENTS$1="https://decentraland.zone/events/me/",PLACES_URL$1="https://decentraland.zone/places",PLACES_MY_FAVORITE_URL$1="https://decentraland.zone/places/favorites/",EXPLORER_URL$1="https://play.decentraland.today",STUDIOS_URL$1="https://studios.decentraland.org/",DOCS_ABOUT_URL$1="https://docs.decentraland.org/player/",DOCS_CREATORS_URL$1="https://docs.decentraland.org/creator/",DOCS_CONTRIBUTOR_URL$1="https://docs.decentraland.org/contributor/",DOCS_DAO_URL$1="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",BLOG_URL$1="https://decentraland.today/blog/",require$$2$1={WEARABLE_PREVIEW_URL:WEARABLE_PREVIEW_URL$1,ACCOUNT_URL:ACCOUNT_URL$1,PROFILE_URL:PROFILE_URL$1,MARKETPLACE_URL:MARKETPLACE_URL$1,MARKETPLACE_NAMES_URL:MARKETPLACE_NAMES_URL$1,MARKETPLACE_WEARABLES_URL:MARKETPLACE_WEARABLES_URL$1,MARKETPLACE_LANDS_URL:MARKETPLACE_LANDS_URL$1,MARKETPLACE_EMOTES_URL:MARKETPLACE_EMOTES_URL$1,MARKETPLACE_MY_ASSETS_URL:MARKETPLACE_MY_ASSETS_URL$1,MARKETPLACE_SETTINGS_URL:MARKETPLACE_SETTINGS_URL$1,BUILDER_URL:BUILDER_URL$1,BUILDER_WEARABLE_EMOTES_URL:BUILDER_WEARABLE_EMOTES_URL$1,BUILDER_SCENES_URL:BUILDER_SCENES_URL$1,BUILDER_NAMES_URL:BUILDER_NAMES_URL$1,BUILDER_WORLDS_URL:BUILDER_WORLDS_URL$1,BUILDER_LAND_URL:BUILDER_LAND_URL$1,DAO_URL:DAO_URL$1,DAO_GRANTS_URL:DAO_GRANTS_URL$1,GOVERNANCE_URL:GOVERNANCE_URL$1,GOVERNANCE_TRANSPARENCY_URL:GOVERNANCE_TRANSPARENCY_URL$1,GOVERNANCE_PROPOSALS_URL:GOVERNANCE_PROPOSALS_URL$1,GOVERNANCE_PROJECTS_URL:GOVERNANCE_PROJECTS_URL$1,EVENTS_URL:EVENTS_URL$1,EVENTS_MY_EVENTS:EVENTS_MY_EVENTS$1,PLACES_URL:PLACES_URL$1,PLACES_MY_FAVORITE_URL:PLACES_MY_FAVORITE_URL$1,EXPLORER_URL:EXPLORER_URL$1,STUDIOS_URL:STUDIOS_URL$1,DOCS_ABOUT_URL:DOCS_ABOUT_URL$1,DOCS_CREATORS_URL:DOCS_CREATORS_URL$1,DOCS_CONTRIBUTOR_URL:DOCS_CONTRIBUTOR_URL$1,DOCS_DAO_URL:DOCS_DAO_URL$1,BLOG_URL:BLOG_URL$1},WEARABLE_PREVIEW_URL="https://wearable-preview.decentraland.org",ACCOUNT_URL="https://decentraland.org/account",PROFILE_URL="https://decentraland.org/profile",MARKETPLACE_URL="https://decentraland.org/marketplace",MARKETPLACE_NAMES_URL="https://decentraland.org/marketplace/names/claim",MARKETPLACE_WEARABLES_URL="https://decentraland.org/marketplace/browse?section=wearables&vendor=decentraland&page=1&sortBy=newest&status=on_sale",MARKETPLACE_LANDS_URL="https://decentraland.org/marketplace/lands",MARKETPLACE_EMOTES_URL="https://decentraland.org/marketplace/browse?assetType=item&section=emotes&vendor=decentraland&page=1&sortBy=newest&status=on_sale",MARKETPLACE_MY_ASSETS_URL="https://decentraland.org/marketplace/account?assetType=nft&section=wearables&vendor=decentraland&page=1&sortBy=newest&onlyOnSale=false",MARKETPLACE_SETTINGS_URL="https://decentraland.org/marketplace/settings",BUILDER_URL="https://decentraland.org/builder",BUILDER_WEARABLE_EMOTES_URL="https://decentraland.org/builder/collections",BUILDER_SCENES_URL="https://decentraland.org/builder/scenes",BUILDER_NAMES_URL="https://decentraland.org/builder/names",BUILDER_WORLDS_URL="https://decentraland.org/builder/worlds?tab=dcl",BUILDER_LAND_URL="https://decentraland.org/builder/land",DAO_URL="https://decentraland.org/dao",DAO_GRANTS_URL="https://decentraland.org/dao/grants/",GOVERNANCE_URL="https://decentraland.org/governance",GOVERNANCE_TRANSPARENCY_URL="https://decentraland.org/governance/transparency/",GOVERNANCE_PROPOSALS_URL="https://decentraland.org/governance/proposals/",GOVERNANCE_PROJECTS_URL="https://decentraland.org/governance/projects/",EVENTS_URL="https://decentraland.org/events",EVENTS_MY_EVENTS="https://decentraland.org/events/me/",PLACES_URL="https://decentraland.org/places",PLACES_MY_FAVORITE_URL="https://decentraland.org/places/favorites/",EXPLORER_URL="https://play.decentraland.org",STUDIOS_URL="https://studios.decentraland.org/",DOCS_ABOUT_URL="https://docs.decentraland.org/player/",DOCS_CREATORS_URL="https://docs.decentraland.org/creator/",DOCS_CONTRIBUTOR_URL="https://docs.decentraland.org/contributor/",DOCS_DAO_URL="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",BLOG_URL="https://decentraland.org/blog/",require$$3={WEARABLE_PREVIEW_URL,ACCOUNT_URL,PROFILE_URL,MARKETPLACE_URL,MARKETPLACE_NAMES_URL,MARKETPLACE_WEARABLES_URL,MARKETPLACE_LANDS_URL,MARKETPLACE_EMOTES_URL,MARKETPLACE_MY_ASSETS_URL,MARKETPLACE_SETTINGS_URL,BUILDER_URL,BUILDER_WEARABLE_EMOTES_URL,BUILDER_SCENES_URL,BUILDER_NAMES_URL,BUILDER_WORLDS_URL,BUILDER_LAND_URL,DAO_URL,DAO_GRANTS_URL,GOVERNANCE_URL,GOVERNANCE_TRANSPARENCY_URL,GOVERNANCE_PROPOSALS_URL,GOVERNANCE_PROJECTS_URL,EVENTS_URL,EVENTS_MY_EVENTS,PLACES_URL,PLACES_MY_FAVORITE_URL,EXPLORER_URL,STUDIOS_URL,DOCS_ABOUT_URL,DOCS_CREATORS_URL,DOCS_CONTRIBUTOR_URL,DOCS_DAO_URL,BLOG_URL};var __importDefault$2=commonjsGlobal&&commonjsGlobal.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},_a;Object.defineProperty(config,"__esModule",{value:!0});config.config=void 0;var ui_env_1=dist$4,dev_json_1=__importDefault$2(require$$1),stg_json_1=__importDefault$2(require$$2$1),prod_json_1=__importDefault$2(require$$3);config.config=(0,ui_env_1.createConfig)((_a={},_a[ui_env_1.Env.DEVELOPMENT]=dev_json_1.default,_a[ui_env_1.Env.STAGING]=stg_json_1.default,_a[ui_env_1.Env.PRODUCTION]=prod_json_1.default,_a));var __extends$3=commonjsGlobal&&commonjsGlobal.__extends||function(){var a=function(_,$){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(j,_e){j.__proto__=_e}||function(j,_e){for(var et in _e)Object.prototype.hasOwnProperty.call(_e,et)&&(j[et]=_e[et])},a(_,$)};return function(_,$){if(typeof $!="function"&&$!==null)throw new TypeError("Class extends value "+String($)+" is not a constructor or null");a(_,$);function j(){this.constructor=_}_.prototype=$===null?Object.create($):(j.prototype=$.prototype,new j)}}(),__createBinding$3=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(a,_,$,j){j===void 0&&(j=$);var _e=Object.getOwnPropertyDescriptor(_,$);(!_e||("get"in _e?!_.__esModule:_e.writable||_e.configurable))&&(_e={enumerable:!0,get:function(){return _[$]}}),Object.defineProperty(a,j,_e)}:function(a,_,$,j){j===void 0&&(j=$),a[j]=_[$]}),__setModuleDefault$3=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(a,_){Object.defineProperty(a,"default",{enumerable:!0,value:_})}:function(a,_){a.default=_}),__importStar$3=commonjsGlobal&&commonjsGlobal.__importStar||function(a){if(a&&a.__esModule)return a;var _={};if(a!=null)for(var $ in a)$!=="default"&&Object.prototype.hasOwnProperty.call(a,$)&&__createBinding$3(_,a,$);return __setModuleDefault$3(_,a),_},__rest$1=commonjsGlobal&&commonjsGlobal.__rest||function(a,_){var $={};for(var j in a)Object.prototype.hasOwnProperty.call(a,j)&&_.indexOf(j)<0&&($[j]=a[j]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,j=Object.getOwnPropertySymbols(a);_e<j.length;_e++)_.indexOf(j[_e])<0&&Object.prototype.propertyIsEnumerable.call(a,j[_e])&&($[j[_e]]=a[j[_e]]);return $},__importDefault$1=commonjsGlobal&&commonjsGlobal.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(WearablePreview$2,"__esModule",{value:!0});var WearablePreview_2=WearablePreview$2.WearablePreview=void 0,React$3=__importStar$3(reactExports),deep_equal_1=__importDefault$1(deepEqual),preview_1=preview,debounce_1=debounce$1,WearablePreview_controller_1=WearablePreview_controller,config_1=config,debounce=(0,debounce_1.createDebounce)(),WearablePreview=function(a){__extends$3(_,a);function _(){var $=a!==null&&a.apply(this,arguments)||this;return $.state={isReady:!1,pendingOptions:null,lastOptions:null},$.iframe=null,$.getUrl=function(){var j=$.props,_e=j.contractAddress,et=j.tokenId,tt=j.itemId,rt=j.profile,at=j.urns,ct=j.urls,dt=j.base64s,yt=j.skin,bt=j.hair,Et=j.eyes,$t=j.bodyShape,_t=j.emote,xt=j.camera,St=j.projection,Mt=j.zoom,Tt=j.background,Rt=j.offsetX,Ct=j.offsetY,It=j.offsetZ,kt=j.cameraX,Dt=j.cameraY,Bt=j.cameraZ,zt=j.wheelZoom,vt=j.wheelPrecision,nt=j.wheelStart,st=j.disableBackground,lt=j.disableAutoRotate,ht=j.disableAutoCenter,mt=j.disableFace,wt=j.disableDefaultWearables,At=j.disableDefaultEmotes,gt=j.disableFadeEffect,ot=j.showSceneBoundaries,pt=j.showThumbnailBoundaries,Pt=j.panning,Ot=j.lockAlpha,Nt=j.lockBeta,jt=j.lockRadius,Ut=j.dev,Vt=j.baseUrl,rr=j.peerUrl,tr=j.nftServerUrl,Zt=j.type,Yt=_e?"contract=".concat(_e):"",Wt=et?"token=".concat(et):"",fr=tt?"item=".concat(tt):"",jr=rt?"profile=".concat(rt):"",Sr=at&&at.length>0?at.map(function(er){return"urn=".concat(er)}).join("&"):"",Er=ct&&ct.length>0?ct.map(function(er){return"url=".concat(er)}).join("&"):"",sn=dt&&dt.length>0?dt.map(function(er){return"base64=".concat(er)}).join("&"):"",Ir=yt?"skin=".concat(yt):"",gr=bt?"hair=".concat(bt):"",ln=Et?"eyes=".concat(Et):"",Mr=$t?"bodyShape=".concat($t):"",Vr=_t?"emote=".concat(_t):"",pn=xt?"camera=".concat(xt):"",Gr=St?"projection=".concat(St):"",Zr=isNaN(Mt)?"":"zoom=".concat(Mt),Mn=Tt?"background=".concat(Tt):"",Wr=isNaN(Rt)?"":"offsetX=".concat(Rt),Qr=isNaN(Ct)?"":"offsetY=".concat(Ct),On=isNaN(It)?"":"offsetZ=".concat(It),Kt=isNaN(kt)?"":"cameraX=".concat(kt),Lt=isNaN(Dt)?"":"cameraY=".concat(Dt),Ht=isNaN(Bt)?"":"cameraZ=".concat(Bt),Xt=isNaN(zt)?"":"wheelZoom=".concat(zt),cr=isNaN(vt)?"":"wheelPrecision=".concat(vt),qr=isNaN(nt)?"":"wheelStart=".concat(nt),br=st?"disableBackground":"",Ur=lt?"disableAutoRotate":"",$n=ht?"disableAutoCenter":"",Hr=mt?"disableFace":"",Xr=wt?"disableDefaultWearables":"",mn=At?"disableDefaultEmotes":"",Fr=gt?"disableFadeEffect":"",an=ot?"showSceneBoundaries":"",Nn=pt?"showThumbnailBoundaries":"",ar=rr?"peerUrl=".concat(rr):"",Jt=tr?"nftServerUrl=".concat(tr):"",_r=Zt?"type=".concat(Zt):"",ur=Pt===!1?"panning=false":"",$r=Ot?"lockAlpha=true":"",en=Nt?"lockBeta=true":"",Rr=jt?"lockRadius=true":"",Br=Ut?"env=dev":"",fn=Vt+"?"+[Yt,Wt,fr,jr,Sr,Er,sn,Ir,gr,ln,Mr,Vr,pn,Gr,Zr,Mn,Wr,Qr,On,Kt,Lt,Ht,Xt,cr,qr,br,Ur,$n,Hr,Xr,mn,Fr,an,Nn,ar,Jt,_r,ur,$r,en,Rr,Br].filter(function(er){return!!er}).join("&");return fn},$.getOptions=function(){var j=$.props;j.dev;var _e=__rest$1(j,["dev"]),et={};for(var tt in _e)typeof _e[tt]!="function"&&(et[tt]=_e[tt]);return et},$.handleMessage=function(j){var _e=$.props,et=_e.baseUrl,tt=_e.onLoad,rt=_e.onError,at=j.origin;if(at===et&&j.data&&j.data.type){var ct=j.data.type;switch(ct){case preview_1.PreviewMessageType.LOAD:{tt();break}case preview_1.PreviewMessageType.ERROR:{var dt=j.data.payload;rt(new Error(dt.message));break}case preview_1.PreviewMessageType.READY:{var yt=$.state,bt=yt.isReady,Et=yt.pendingOptions;if(bt)return;Et!==null?($.sendUpdate(Et),$.setState({isReady:!0,pendingOptions:null})):$.setState({isReady:!0});break}}}},$.handleUpdate=function(){if($.iframe){if(window){var j=$.getOptions();$.state.isReady?$.sendUpdate(j):$.setState({pendingPreviewOptions:j})}}else console.warn("Could not send update, iframe is not referenced")},$.sendUpdate=function(j){var _e=$.state.lastOptions;if(!_e||!(0,deep_equal_1.default)(j,_e)){(0,preview_1.sendMessage)($.iframe.contentWindow,preview_1.PreviewMessageType.UPDATE,{options:j});var et=$.props.onUpdate;et(j),$.setState({lastOptions:j})}},$.refIframe=function(j){$.iframe=j},$}return _.createController=function($){return(0,WearablePreview_controller_1.createController)($)},_.prototype.componentDidMount=function(){window.addEventListener("message",this.handleMessage,!1),this.setState({url:this.getUrl()}),this.props.blob&&this.handleUpdate()},_.prototype.componentWillUnmount=function(){window.removeEventListener("message",this.handleMessage,!1)},_.prototype.componentDidUpdate=function(){debounce(this.handleUpdate,500)},_.prototype.render=function(){return this.props.tokenId&&this.props.itemId&&console.warn("You should NOT use `tokenId` and `itemId` props simultaneously"),React$3.createElement("iframe",{id:this.props.id,className:"WearablePreview",src:this.state.url,width:"100%",height:"100%",frameBorder:"0",ref:this.refIframe,allow:"autoplay"})},_.defaultProps={dev:!1,baseUrl:config_1.config.get("WEARABLE_PREVIEW_URL"),onLoad:function(){},onError:function(){},onUpdate:function(){}},_}(React$3.PureComponent);WearablePreview_2=WearablePreview$2.WearablePreview=WearablePreview;const CustomWearablePreview$1="",CustomWearablePreview=a=>{const[_,$]=reactExports.useState(!0);reactExports.useEffect(()=>$(!0),[a.profile]);const j=reactExports.useMemo(()=>{const et=tt=>{const rt="platform.glb",at="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239440432.commit-2fa6a22";return{bodyShapes:[`urn:decentraland:off-chain:base-avatars:${tt}`],mainFile:rt,contents:[{key:rt,url:`${at}/misc/platform/${rt}`}]}};return btoa(JSON.stringify({data:{representations:[et("BaseMale"),et("BaseFemale")]}}))},[]),_e=reactExports.useCallback(()=>$(!1),[]);return jsxRuntimeExports.jsxs("div",{className:"CustomWearablePreview",children:[jsxRuntimeExports.jsx(WearablePreview_2,{lockBeta:!0,panning:!1,disableBackground:!0,profile:a.profile,dev:!1,emote:dist$8.PreviewEmote.WAVE,disableAutoRotate:!0,cameraY:.2,base64s:[j],onLoad:_e}),_?jsxRuntimeExports.jsx(Loader_3,{active:!0,size:"huge"}):null]})},background$2="_background_441c2_1",emptyProfile="_emptyProfile_441c2_11",main$5="_main_441c2_27",left$2="_left_441c2_38",right$2="_right_441c2_49",changeAccount="_changeAccount_441c2_57",errorLogo="_errorLogo_441c2_70",logo$1="_logo_441c2_79",title$3="_title_441c2_85",description="_description_441c2_92",code="_code_441c2_99",buttons="_buttons_441c2_106",closeWindow="_closeWindow_441c2_116",errorMessage="_errorMessage_441c2_122",noButton="_noButton_441c2_131",yesButton="_yesButton_441c2_133",communityBubble="_communityBubble_441c2_150",styles$8={background:background$2,emptyProfile,main:main$5,left:left$2,right:right$2,changeAccount,errorLogo,logo:logo$1,title:title$3,description,code,buttons,closeWindow,errorMessage,noButton,yesButton,communityBubble},RequestPage=()=>{usePageTracking();const a=useParams(),_=useNavigateWithSearchParams(),$=reactExports.useRef(),[j,_e]=reactExports.useState(2),[et,tt]=reactExports.useState(!1),[rt,at]=reactExports.useState(),ct=reactExports.useRef(),[dt,yt]=reactExports.useState(),bt=reactExports.useRef(),Et=reactExports.useRef(),$t=a.requestId??"",[_t,xt]=useTargetConfig(),St=reactExports.useCallback(()=>{_(locations.login(`/auth/requests/${$t}?targetConfigId=${xt}`))},[$t]),Mt=reactExports.useCallback(()=>{_(locations.setup(`/auth/requests/${$t}?targetConfigId=${xt}`))},[$t]);reactExports.useEffect(()=>((async()=>{try{const Bt=await getCurrentConnectionData();if(!Bt)throw new Error("No account connected");const zt=await connection$1.getProvider();$.current=new BrowserProvider(zt);const vt=await fetchProfile(Bt.account);if(!_t.skipSetup&&!vt){console.log("There's no profile but the user is logged in, going to setup page"),Mt();return}}catch{console.log("The user isn't logged in, redirecting to the log in page"),St();return}try{const zt=await(await $.current.getSigner()).getAddress();getAnalytics().identify({ethAddress:zt});const vt=await authServerFetch("recover",{requestId:$t});ct.current=vt;const nt=await fetchProfile(zt);if(at(nt),Et.current=zt,vt.sender&&vt.sender!==zt.toLowerCase()){_e(1);return}bt.current=setTimeout(()=>{_e(0)},new Date(vt.expiration).getTime()-Date.now()),vt.method==="dcl_personal_sign"?_e(4):_e(8)}catch(Bt){yt(isErrorWithMessage(Bt)?Bt.message:"Unknown error"),_e(3)}})(),()=>{clearTimeout(bt.current)}),[St,Mt]),reactExports.useEffect(()=>{j!==4&&j!==8&&clearTimeout(bt.current)},[j]);const Tt=reactExports.useCallback(async()=>{var Bt;tt(!0),getAnalytics().track(TrackingEvents.CLICK,{action:ClickEvents.DENY_SIGN_IN});try{const zt=await((Bt=$.current)==null?void 0:Bt.getSigner());zt&&await authServerFetch("outcome",{requestId:$t,sender:await zt.getAddress(),error:{code:-32003,message:"Transaction rejected"}})}finally{tt(!1),_e(5)}},[]),Rt=reactExports.useCallback(async()=>{getAnalytics().track(TrackingEvents.CLICK,{action:ClickEvents.APPROVE_SING_IN}),tt(!0);const Bt=$.current;try{if(!Bt)throw new Error("Provider not created");const zt=await Bt.getSigner(),vt=await zt.signMessage(ct.current.params[0]),nt=await authServerFetch("outcome",{requestId:$t,sender:await zt.getAddress(),result:vt});if(nt.error)throw new Error(nt.error);_e(7),_t.deepLink&&(window.location.href=_t.deepLink)}catch(zt){yt(isErrorWithMessage(zt)?zt.message:"Unknown error"),_e(6)}finally{tt(!1)}},[tt]),Ct=reactExports.useCallback(()=>{getAnalytics().track(TrackingEvents.CLICK,{action:ClickEvents.DENY_WALLET_INTERACTION}),_e(9)},[]),It=reactExports.useCallback(async()=>{var zt;tt(!0);const Bt=$.current;try{if(!Bt)throw new Error("Provider not created");const vt=await Bt.getSigner(),nt=await Bt.send(ct.current.method,ct.current.params);getAnalytics().track(TrackingEvents.CLICK,{action:ClickEvents.APPROVE_WALLET_INTERACTION,method:ct.current.method});const st=await authServerFetch("outcome",{requestId:$t,sender:await vt.getAddress(),result:nt});if(st.error)throw new Error(st.error);_e(11)}catch(vt){console.error("Wallet error",JSON.stringify(vt));const nt=await((zt=$.current)==null?void 0:zt.getSigner());nt&&(isRpcError(vt)?await authServerFetch("outcome",{requestId:$t,sender:await nt.getAddress(),error:vt.error}):await authServerFetch("outcome",{requestId:$t,sender:await nt.getAddress(),error:{code:999,message:isErrorWithMessage(vt)?vt.message:"Unknown error"}})),yt(isErrorWithMessage(vt)?vt.message:"Unknown error"),_e(10)}},[]),kt=reactExports.useCallback(async Bt=>{Bt.preventDefault(),await connection$1.disconnect(),St()},[St]),Dt=reactExports.useCallback(Bt=>_t.showWearablePreview?jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:`${styles$8.background} ${(!Et||rt===null)&&j!==2?styles$8.emptyProfile:""}`}),jsxRuntimeExports.jsxs("div",{className:styles$8.main,children:[jsxRuntimeExports.jsxs("div",{className:styles$8.left,children:[Bt.children,Bt.canChangeAccount?jsxRuntimeExports.jsxs("div",{className:styles$8.changeAccount,children:["Use another profile?"," ",jsxRuntimeExports.jsx("a",{href:"/auth/login",onClick:kt,children:"Return to log in"})]}):null]}),jsxRuntimeExports.jsx("div",{className:styles$8.right,children:Et.current&&rt!==null?jsxRuntimeExports.jsx(CustomWearablePreview,{profile:Et.current}):null}),jsxRuntimeExports.jsx(CommunityBubble$3.CommunityBubble,{className:styles$8.communityBubble})]})]}):jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:`${styles$8.background} ${(!Et||rt===null)&&j!==2?styles$8.emptyProfile:""}`}),jsxRuntimeExports.jsxs("div",{className:styles$8.main,children:[jsxRuntimeExports.jsxs("div",{className:styles$8.left,children:[Bt.children,Bt.canChangeAccount?jsxRuntimeExports.jsxs("div",{className:styles$8.changeAccount,children:["Use another profile?"," ",jsxRuntimeExports.jsx("a",{href:"/auth/login",onClick:kt,children:"Return to log in"})]}):null]}),jsxRuntimeExports.jsx(CommunityBubble$3.CommunityBubble,{className:styles$8.communityBubble})]})]}),[j]);return j===0?jsxRuntimeExports.jsxs(Dt,{children:[jsxRuntimeExports.jsx("div",{className:styles$8.errorLogo}),jsxRuntimeExports.jsx("div",{className:styles$8.title,children:"Looks like you took too long and the request has expired. If the expiration time is still running in the Explorer app, check your computer's time to see if it's set correctly"}),jsxRuntimeExports.jsxs("div",{className:styles$8.description,children:["Please return to Decentraland's ",_t.explorerText," to try again."]}),jsxRuntimeExports.jsx(CloseWindow,{})]}):j===1?jsxRuntimeExports.jsxs(Dt,{canChangeAccount:!0,children:[jsxRuntimeExports.jsx("div",{className:styles$8.errorLogo}),jsxRuntimeExports.jsx("div",{className:styles$8.title,children:"Looks like you are connected with a different account."}),jsxRuntimeExports.jsxs("div",{className:styles$8.description,children:["Please change your wallet account to the one connected to the ",_t.explorerText,"."]})]}):j===2?jsxRuntimeExports.jsx(Dt,{children:jsxRuntimeExports.jsx("div",{className:styles$8.left,children:jsxRuntimeExports.jsx(Loader_3,{active:!0,size:"huge"})})}):j===3?jsxRuntimeExports.jsxs(Dt,{children:[jsxRuntimeExports.jsx("div",{className:styles$8.errorLogo}),jsxRuntimeExports.jsx("div",{className:styles$8.title,children:"There was an error recovering the request..."}),jsxRuntimeExports.jsx("div",{className:styles$8.description,children:"The request is not available anymore. Feel free to create a new one and try again. If the expiration time is still running in the Explorer app, check your computer's time to see if it's set correctly"}),jsxRuntimeExports.jsx(CloseWindow,{}),jsxRuntimeExports.jsx("div",{className:styles$8.errorMessage,children:dt})]}):j===4&&ct.current?jsxRuntimeExports.jsxs(Dt,{canChangeAccount:!0,isLoading:et,children:[jsxRuntimeExports.jsx("div",{className:styles$8.logo}),jsxRuntimeExports.jsx("div",{className:styles$8.title,children:"Verify Sign In"}),jsxRuntimeExports.jsxs("div",{className:styles$8.description,children:["Do you see the same verification number on your ",_t.explorerText,"?"]}),jsxRuntimeExports.jsx("div",{className:styles$8.code,children:ct.current.code}),jsxRuntimeExports.jsxs("div",{className:styles$8.buttons,children:[jsxRuntimeExports.jsxs(Button$5.Button,{inverted:!0,disabled:et,onClick:Tt,className:styles$8.noButton,children:[jsxRuntimeExports.jsx(default_1,{name:"times circle"}),"No, it doesn't"]}),jsxRuntimeExports.jsxs(Button$5.Button,{inverted:!0,loading:et,disabled:et,onClick:Rt,className:styles$8.yesButton,children:[jsxRuntimeExports.jsx(default_1,{name:"check circle"}),"Yes, they are the same"]})]})]}):j===5?jsxRuntimeExports.jsxs(Dt,{canChangeAccount:!0,children:[jsxRuntimeExports.jsx("div",{className:styles$8.errorLogo}),jsxRuntimeExports.jsx("div",{className:styles$8.title,children:"Did the number not match, or was this action not taken by you?"}),jsxRuntimeExports.jsx("div",{className:styles$8.description,children:"If you're trying to sign in, retry the action. If this action was not initiated by you, dismiss this message."}),jsxRuntimeExports.jsx(CloseWindow,{})]}):j===7?jsxRuntimeExports.jsxs(Dt,{children:[jsxRuntimeExports.jsx("div",{className:styles$8.logo}),jsxRuntimeExports.jsx("div",{className:styles$8.title,children:"Your account is ready!"}),jsxRuntimeExports.jsxs("div",{className:styles$8.description,children:["Return to the ",_t.explorerText," and enjoy Decentraland."]}),jsxRuntimeExports.jsx(CloseWindow,{})]}):j===8&&ct.current?jsxRuntimeExports.jsxs(Dt,{canChangeAccount:!0,isLoading:et,children:[jsxRuntimeExports.jsx("div",{className:styles$8.logo}),jsxRuntimeExports.jsxs("div",{className:styles$8.title,children:["The ",_t.explorerText," wants to interact with your wallet."]}),jsxRuntimeExports.jsx("div",{className:styles$8.description,children:"Review the following data carefully on your wallet before approving it."}),jsxRuntimeExports.jsxs("div",{className:styles$8.buttons,children:[jsxRuntimeExports.jsx(Button$5.Button,{inverted:!0,disabled:et,onClick:Ct,children:"Deny"}),jsxRuntimeExports.jsx(Button$5.Button,{primary:!0,disabled:et,loading:et,onClick:It,children:"Allow"})]})]}):j===9?jsxRuntimeExports.jsxs(Dt,{children:[jsxRuntimeExports.jsx("div",{className:styles$8.errorLogo}),jsxRuntimeExports.jsx("div",{className:styles$8.title,children:"Was this action not initiated by you?"}),jsxRuntimeExports.jsx("div",{className:styles$8.description,children:"If this action was not initiated by you, dismiss this message."}),jsxRuntimeExports.jsx(CloseWindow,{})]}):j===11?jsxRuntimeExports.jsxs(Dt,{children:[jsxRuntimeExports.jsx("div",{className:styles$8.logo}),jsxRuntimeExports.jsx("div",{className:styles$8.title,children:"Wallet interaction complete"}),jsxRuntimeExports.jsx("div",{className:styles$8.description,children:"The action has been executed successfully."}),jsxRuntimeExports.jsx(CloseWindow,{})]}):j===6||j===10?jsxRuntimeExports.jsxs(Dt,{children:[jsxRuntimeExports.jsx("div",{className:styles$8.errorLogo}),jsxRuntimeExports.jsx("div",{className:styles$8.title,children:"There was an error while trying to submit the request."}),jsxRuntimeExports.jsxs("div",{className:styles$8.description,children:["Return to the ",_t.explorerText," to try again, or contact support if the error persists."]}),jsxRuntimeExports.jsx(CloseWindow,{}),jsxRuntimeExports.jsx("div",{className:styles$8.errorMessage,children:dt})]}):null},CloseWindow=()=>jsxRuntimeExports.jsx("div",{className:styles$8.closeWindow,children:"You can close this window."}),authServerFetch=async(a,_)=>{const $=config$1.get("AUTH_SERVER_URL"),j=lookup($);await new Promise(et=>{j.on("connect",et)});const _e=await j.emitWithAck(a,_);if(j.close(),_e.error)throw new Error(_e.error);return _e};var Checkbox$4={},Checkbox$3={},Checkbox$2={},set_1,hasRequiredSet;function requireSet(){if(hasRequiredSet)return set_1;hasRequiredSet=1;var a=require_baseSet();function _($,j,_e){return $==null?$:a($,j,_e)}return set_1=_,set_1}var hasRequiredCheckbox;function requireCheckbox(){if(hasRequiredCheckbox)return Checkbox$2;hasRequiredCheckbox=1;var a=interopRequireWildcardExports,_=interopRequireDefaultExports;Checkbox$2.__esModule=!0,Checkbox$2.default=void 0;var $=_(require_extends()),j=_(requireInheritsLoose()),_e=_(requireSet()),et=_(requireInvoke());_(requireGet());var tt=_(requireIsNil()),rt=require$$10,at=_(require$$0$4);_(requirePropTypes());var ct=a(reactExports),dt=requireLib(),yt=function(bt){(0,j.default)(Et,bt);function Et(){for(var _t,xt=arguments.length,St=new Array(xt),Mt=0;Mt<xt;Mt++)St[Mt]=arguments[Mt];return _t=bt.call.apply(bt,[this].concat(St))||this,_t.inputRef=(0,ct.createRef)(),_t.labelRef=(0,ct.createRef)(),_t.canToggle=function(){var Tt=_t.props,Rt=Tt.disabled,Ct=Tt.radio,It=Tt.readOnly,kt=_t.state.checked;return!Rt&&!It&&!(Ct&&kt)},_t.computeTabIndex=function(){var Tt=_t.props,Rt=Tt.disabled,Ct=Tt.tabIndex;return(0,tt.default)(Ct)?Rt?-1:0:Ct},_t.handleClick=function(Tt){var Rt=_t.props.id,Ct=_t.state,It=Ct.checked,kt=Ct.indeterminate,Dt=(0,et.default)(_t.inputRef.current,"contains",Tt.target),Bt=(0,et.default)(_t.labelRef.current,"contains",Tt.target),zt=!Bt&&!Dt,vt=!(0,tt.default)(Rt),nt=Bt&&vt;nt||(0,et.default)(_t.props,"onClick",Tt,(0,$.default)({},_t.props,{checked:!It,indeterminate:!!kt})),_t.isClickFromMouse&&(_t.isClickFromMouse=!1,Bt&&!vt&&_t.handleChange(Tt),zt&&_t.handleChange(Tt),Bt&&vt&&Tt.stopPropagation())},_t.handleChange=function(Tt){var Rt=_t.state.checked;_t.canToggle()&&((0,et.default)(_t.props,"onChange",Tt,(0,$.default)({},_t.props,{checked:!Rt,indeterminate:!1})),_t.setState({checked:!Rt,indeterminate:!1}))},_t.handleMouseDown=function(Tt){var Rt=_t.state,Ct=Rt.checked,It=Rt.indeterminate;(0,et.default)(_t.props,"onMouseDown",Tt,(0,$.default)({},_t.props,{checked:!!Ct,indeterminate:!!It})),Tt.defaultPrevented||(0,et.default)(_t.inputRef.current,"focus"),Tt.preventDefault()},_t.handleMouseUp=function(Tt){var Rt=_t.state,Ct=Rt.checked,It=Rt.indeterminate;_t.isClickFromMouse=!0,(0,et.default)(_t.props,"onMouseUp",Tt,(0,$.default)({},_t.props,{checked:!!Ct,indeterminate:!!It}))},_t.setIndeterminate=function(){var Tt=_t.state.indeterminate;(0,_e.default)(_t.inputRef,"current.indeterminate",!!Tt)},_t}var $t=Et.prototype;return $t.componentDidMount=function(){this.setIndeterminate()},$t.componentDidUpdate=function(){this.setIndeterminate()},$t.render=function(){var xt=this.props,St=xt.className,Mt=xt.disabled,Tt=xt.label,Rt=xt.id,Ct=xt.name,It=xt.radio,kt=xt.readOnly,Dt=xt.slider,Bt=xt.toggle,zt=xt.type,vt=xt.value,nt=this.state,st=nt.checked,lt=nt.indeterminate,ht=(0,at.default)("ui",(0,dt.useKeyOnly)(st,"checked"),(0,dt.useKeyOnly)(Mt,"disabled"),(0,dt.useKeyOnly)(lt,"indeterminate"),(0,dt.useKeyOnly)((0,tt.default)(Tt),"fitted"),(0,dt.useKeyOnly)(It,"radio"),(0,dt.useKeyOnly)(kt,"read-only"),(0,dt.useKeyOnly)(Dt,"slider"),(0,dt.useKeyOnly)(Bt,"toggle"),"checkbox",St),mt=(0,dt.getUnhandledProps)(Et,this.props),wt=(0,dt.getElementType)(Et,this.props),At=(0,dt.partitionHTMLProps)(mt,{htmlProps:dt.htmlInputAttrs}),gt=At[0],ot=At[1],pt=(0,dt.createHTMLLabel)(Tt,{defaultProps:{htmlFor:Rt},autoGenerateKey:!1})||ct.default.createElement("label",{htmlFor:Rt});return ct.default.createElement(wt,(0,$.default)({},ot,{className:ht,onClick:this.handleClick,onChange:this.handleChange,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp}),ct.default.createElement(rt.Ref,{innerRef:this.inputRef},ct.default.createElement("input",(0,$.default)({},gt,{checked:st,className:"hidden",disabled:Mt,id:Rt,name:Ct,readOnly:!0,tabIndex:this.computeTabIndex(),type:zt,value:vt}))),ct.default.createElement(rt.Ref,{innerRef:this.labelRef},pt))},Et}(dt.ModernAutoControlledComponent);return Checkbox$2.default=yt,yt.handledProps=["as","checked","className","defaultChecked","defaultIndeterminate","disabled","fitted","id","indeterminate","label","name","onChange","onClick","onMouseDown","onMouseUp","radio","readOnly","slider","tabIndex","toggle","type","value"],yt.propTypes={},yt.defaultProps={type:"checkbox"},yt.autoControlledProps=["checked","indeterminate"],Checkbox$2}var _interopRequireDefault$3=interopRequireDefaultExports;Checkbox$3.__esModule=!0;var _Checkbox=_interopRequireDefault$3(requireCheckbox());Checkbox$3.default=_Checkbox.default;const Checkbox$1="";(function(a){var _=commonjsGlobal&&commonjsGlobal.__importDefault||function(j){return j&&j.__esModule?j:{default:j}};Object.defineProperty(a,"__esModule",{value:!0}),a.Checkbox=void 0;var $=Checkbox$3;Object.defineProperty(a,"Checkbox",{enumerable:!0,get:function(){return _($).default}})})(Checkbox$4);var Field$2={};const todayButton="Today",nextMonth="Next month",previousMonth="Previous month",nextYear="Next year",previousYear="Previous year",weekdays=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],months=["January","February","March","April","May","June","July","August","September","October","November","December"],require$$0={todayButton,nextMonth,previousMonth,nextYear,previousYear,weekdays,months};function requiredArgs(a,_){if(_.length<a)throw new TypeError(a+" argument"+(a>1?"s":"")+" required, but only "+_.length+" present")}function _typeof$y(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$y=function($){return typeof $}:_typeof$y=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$y(a)}function isDate(a){return requiredArgs(1,arguments),a instanceof Date||_typeof$y(a)==="object"&&Object.prototype.toString.call(a)==="[object Date]"}function _typeof$x(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$x=function($){return typeof $}:_typeof$x=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$x(a)}function toDate$1(a){requiredArgs(1,arguments);var _=Object.prototype.toString.call(a);return a instanceof Date||_typeof$x(a)==="object"&&_==="[object Date]"?new Date(a.getTime()):typeof a=="number"||_==="[object Number]"?new Date(a):((typeof a=="string"||_==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function isValid(a){if(requiredArgs(1,arguments),!isDate(a)&&typeof a!="number")return!1;var _=toDate$1(a);return!isNaN(Number(_))}function e(a,_,$){return a.length+1===_.length&&_.endsWith($)}function r(a,_){if(!_)return _;var $=String(_).replace(/[^\da-zA-Z\n|]/g,""),j=a.split(/[^\da-zA-Z\n|]/g).filter(Boolean).map(function(ct){return ct.length}),_e=a.split(/[\da-zA-Z\n|]/g).filter(Boolean),et=_e[0],tt=_e[_e.length-1];if(a.startsWith(et)){var rt=_e.reduce(function(ct,dt,yt){var bt=j[yt],Et=ct.value.slice(0,bt),$t=ct.value.slice(bt);return{result:Et?ct.result.concat(dt,Et):ct.result,value:$t}},{result:"",value:$}).result.slice(0,a.length);return e(rt,a,tt)?rt.concat(tt):rt}var at=j.reduce(function(ct,dt,yt){var bt=_e[yt]||"",Et="$1"+bt+"$2",$t=dt+ct.prevSlice+ct.prevSeparator.length,_t=new RegExp("(.{"+$t+"})(.)");return{prevSeparator:bt,prevSlice:$t,value:ct.value.replace(_t,Et)}},{prevSeparator:"",prevSlice:0,value:$}).value.slice(0,a.length);return e(at,a,tt)?at.concat(tt):at}function formatStringByPattern(a,_){return _===void 0?function($){return r(a,$)}:r(a,_)}var convertTokens$1={};Object.defineProperty(convertTokens$1,"__esModule",{value:!0});var tokensMap={M:"L",Mo:"Mo",MM:"LL",MMM:"LLL",MMMM:"LLLL",Q:"q",Qo:"qo",D:"d",Do:"do",DD:"dd",DDD:"D",DDDo:"Do",DDDD:"DDD",d:"i",do:"io",dd:"iiiiii",ddd:"iii",dddd:"iiii",A:"a",a:"a",aa:"aaaa",E:"i",W:"I",Wo:"Io",WW:"II",YY:"yy",YYYY:"yyyy",GG:"RR",GGGG:"RRRR",H:"H",HH:"HH",h:"h",hh:"hh",m:"m",mm:"mm",s:"s",ss:"ss",S:"S",SS:"SS",SSS:"SSS",Z:"xxx",ZZ:"xx",X:"t",x:"T"},v1tokens=Object.keys(tokensMap).sort().reverse(),tokensRegExp=new RegExp("(\\[[^\\[]*\\])|(\\\\)?("+v1tokens.join("|")+"|.)","g");function convertTokens(a){var _=a.match(tokensRegExp);return _?_.reduce(function($,j,_e){var et=tokensMap[j];if(!et){var tt=j.match(/^\[(.+)\]$/);tt?$.textBuffer.push(tt[1]):$.textBuffer.push(j)}var rt=_e===_.length-1;return $.textBuffer.length&&(et||rt)&&($.formatBuffer.push("'"+$.textBuffer.join("")+"'"),$.textBuffer=[]),et&&$.formatBuffer.push(et),$},{formatBuffer:[],textBuffer:[]}).formatBuffer.join(""):a}var convertTokens_2=convertTokens$1.convertTokens=convertTokens;function toInteger$2(a){if(a===null||a===!0||a===!1)return NaN;var _=Number(a);return isNaN(_)?_:_<0?Math.ceil(_):Math.floor(_)}function addMilliseconds(a,_){requiredArgs(2,arguments);var $=toDate$1(a).getTime(),j=toInteger$2(_);return new Date($+j)}function subMilliseconds(a,_){requiredArgs(2,arguments);var $=toInteger$2(_);return addMilliseconds(a,-$)}var MILLISECONDS_IN_DAY=864e5;function getUTCDayOfYear(a){requiredArgs(1,arguments);var _=toDate$1(a),$=_.getTime();_.setUTCMonth(0,1),_.setUTCHours(0,0,0,0);var j=_.getTime(),_e=$-j;return Math.floor(_e/MILLISECONDS_IN_DAY)+1}function startOfUTCISOWeek(a){requiredArgs(1,arguments);var _=1,$=toDate$1(a),j=$.getUTCDay(),_e=(j<_?7:0)+j-_;return $.setUTCDate($.getUTCDate()-_e),$.setUTCHours(0,0,0,0),$}function getUTCISOWeekYear(a){requiredArgs(1,arguments);var _=toDate$1(a),$=_.getUTCFullYear(),j=new Date(0);j.setUTCFullYear($+1,0,4),j.setUTCHours(0,0,0,0);var _e=startOfUTCISOWeek(j),et=new Date(0);et.setUTCFullYear($,0,4),et.setUTCHours(0,0,0,0);var tt=startOfUTCISOWeek(et);return _.getTime()>=_e.getTime()?$+1:_.getTime()>=tt.getTime()?$:$-1}function startOfUTCISOWeekYear(a){requiredArgs(1,arguments);var _=getUTCISOWeekYear(a),$=new Date(0);$.setUTCFullYear(_,0,4),$.setUTCHours(0,0,0,0);var j=startOfUTCISOWeek($);return j}var MILLISECONDS_IN_WEEK$1=6048e5;function getUTCISOWeek(a){requiredArgs(1,arguments);var _=toDate$1(a),$=startOfUTCISOWeek(_).getTime()-startOfUTCISOWeekYear(_).getTime();return Math.round($/MILLISECONDS_IN_WEEK$1)+1}var defaultOptions={};function getDefaultOptions(){return defaultOptions}function startOfUTCWeek(a,_){var $,j,_e,et,tt,rt,at,ct;requiredArgs(1,arguments);var dt=getDefaultOptions(),yt=toInteger$2(($=(j=(_e=(et=_==null?void 0:_.weekStartsOn)!==null&&et!==void 0?et:_==null||(tt=_.locale)===null||tt===void 0||(rt=tt.options)===null||rt===void 0?void 0:rt.weekStartsOn)!==null&&_e!==void 0?_e:dt.weekStartsOn)!==null&&j!==void 0?j:(at=dt.locale)===null||at===void 0||(ct=at.options)===null||ct===void 0?void 0:ct.weekStartsOn)!==null&&$!==void 0?$:0);if(!(yt>=0&&yt<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var bt=toDate$1(a),Et=bt.getUTCDay(),$t=(Et<yt?7:0)+Et-yt;return bt.setUTCDate(bt.getUTCDate()-$t),bt.setUTCHours(0,0,0,0),bt}function getUTCWeekYear(a,_){var $,j,_e,et,tt,rt,at,ct;requiredArgs(1,arguments);var dt=toDate$1(a),yt=dt.getUTCFullYear(),bt=getDefaultOptions(),Et=toInteger$2(($=(j=(_e=(et=_==null?void 0:_.firstWeekContainsDate)!==null&&et!==void 0?et:_==null||(tt=_.locale)===null||tt===void 0||(rt=tt.options)===null||rt===void 0?void 0:rt.firstWeekContainsDate)!==null&&_e!==void 0?_e:bt.firstWeekContainsDate)!==null&&j!==void 0?j:(at=bt.locale)===null||at===void 0||(ct=at.options)===null||ct===void 0?void 0:ct.firstWeekContainsDate)!==null&&$!==void 0?$:1);if(!(Et>=1&&Et<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var $t=new Date(0);$t.setUTCFullYear(yt+1,0,Et),$t.setUTCHours(0,0,0,0);var _t=startOfUTCWeek($t,_),xt=new Date(0);xt.setUTCFullYear(yt,0,Et),xt.setUTCHours(0,0,0,0);var St=startOfUTCWeek(xt,_);return dt.getTime()>=_t.getTime()?yt+1:dt.getTime()>=St.getTime()?yt:yt-1}function startOfUTCWeekYear(a,_){var $,j,_e,et,tt,rt,at,ct;requiredArgs(1,arguments);var dt=getDefaultOptions(),yt=toInteger$2(($=(j=(_e=(et=_==null?void 0:_.firstWeekContainsDate)!==null&&et!==void 0?et:_==null||(tt=_.locale)===null||tt===void 0||(rt=tt.options)===null||rt===void 0?void 0:rt.firstWeekContainsDate)!==null&&_e!==void 0?_e:dt.firstWeekContainsDate)!==null&&j!==void 0?j:(at=dt.locale)===null||at===void 0||(ct=at.options)===null||ct===void 0?void 0:ct.firstWeekContainsDate)!==null&&$!==void 0?$:1),bt=getUTCWeekYear(a,_),Et=new Date(0);Et.setUTCFullYear(bt,0,yt),Et.setUTCHours(0,0,0,0);var $t=startOfUTCWeek(Et,_);return $t}var MILLISECONDS_IN_WEEK=6048e5;function getUTCWeek(a,_){requiredArgs(1,arguments);var $=toDate$1(a),j=startOfUTCWeek($,_).getTime()-startOfUTCWeekYear($,_).getTime();return Math.round(j/MILLISECONDS_IN_WEEK)+1}function addLeadingZeros(a,_){for(var $=a<0?"-":"",j=Math.abs(a).toString();j.length<_;)j="0"+j;return $+j}var formatters$2={y:function a(_,$){var j=_.getUTCFullYear(),_e=j>0?j:1-j;return addLeadingZeros($==="yy"?_e%100:_e,$.length)},M:function a(_,$){var j=_.getUTCMonth();return $==="M"?String(j+1):addLeadingZeros(j+1,2)},d:function a(_,$){return addLeadingZeros(_.getUTCDate(),$.length)},a:function a(_,$){var j=_.getUTCHours()/12>=1?"pm":"am";switch($){case"a":case"aa":return j.toUpperCase();case"aaa":return j;case"aaaaa":return j[0];case"aaaa":default:return j==="am"?"a.m.":"p.m."}},h:function a(_,$){return addLeadingZeros(_.getUTCHours()%12||12,$.length)},H:function a(_,$){return addLeadingZeros(_.getUTCHours(),$.length)},m:function a(_,$){return addLeadingZeros(_.getUTCMinutes(),$.length)},s:function a(_,$){return addLeadingZeros(_.getUTCSeconds(),$.length)},S:function a(_,$){var j=$.length,_e=_.getUTCMilliseconds(),et=Math.floor(_e*Math.pow(10,j-3));return addLeadingZeros(et,$.length)}};const lightFormatters=formatters$2;var dayPeriodEnum={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},formatters={G:function a(_,$,j){var _e=_.getUTCFullYear()>0?1:0;switch($){case"G":case"GG":case"GGG":return j.era(_e,{width:"abbreviated"});case"GGGGG":return j.era(_e,{width:"narrow"});case"GGGG":default:return j.era(_e,{width:"wide"})}},y:function a(_,$,j){if($==="yo"){var _e=_.getUTCFullYear(),et=_e>0?_e:1-_e;return j.ordinalNumber(et,{unit:"year"})}return lightFormatters.y(_,$)},Y:function a(_,$,j,_e){var et=getUTCWeekYear(_,_e),tt=et>0?et:1-et;if($==="YY"){var rt=tt%100;return addLeadingZeros(rt,2)}return $==="Yo"?j.ordinalNumber(tt,{unit:"year"}):addLeadingZeros(tt,$.length)},R:function a(_,$){var j=getUTCISOWeekYear(_);return addLeadingZeros(j,$.length)},u:function a(_,$){var j=_.getUTCFullYear();return addLeadingZeros(j,$.length)},Q:function a(_,$,j){var _e=Math.ceil((_.getUTCMonth()+1)/3);switch($){case"Q":return String(_e);case"QQ":return addLeadingZeros(_e,2);case"Qo":return j.ordinalNumber(_e,{unit:"quarter"});case"QQQ":return j.quarter(_e,{width:"abbreviated",context:"formatting"});case"QQQQQ":return j.quarter(_e,{width:"narrow",context:"formatting"});case"QQQQ":default:return j.quarter(_e,{width:"wide",context:"formatting"})}},q:function a(_,$,j){var _e=Math.ceil((_.getUTCMonth()+1)/3);switch($){case"q":return String(_e);case"qq":return addLeadingZeros(_e,2);case"qo":return j.ordinalNumber(_e,{unit:"quarter"});case"qqq":return j.quarter(_e,{width:"abbreviated",context:"standalone"});case"qqqqq":return j.quarter(_e,{width:"narrow",context:"standalone"});case"qqqq":default:return j.quarter(_e,{width:"wide",context:"standalone"})}},M:function a(_,$,j){var _e=_.getUTCMonth();switch($){case"M":case"MM":return lightFormatters.M(_,$);case"Mo":return j.ordinalNumber(_e+1,{unit:"month"});case"MMM":return j.month(_e,{width:"abbreviated",context:"formatting"});case"MMMMM":return j.month(_e,{width:"narrow",context:"formatting"});case"MMMM":default:return j.month(_e,{width:"wide",context:"formatting"})}},L:function a(_,$,j){var _e=_.getUTCMonth();switch($){case"L":return String(_e+1);case"LL":return addLeadingZeros(_e+1,2);case"Lo":return j.ordinalNumber(_e+1,{unit:"month"});case"LLL":return j.month(_e,{width:"abbreviated",context:"standalone"});case"LLLLL":return j.month(_e,{width:"narrow",context:"standalone"});case"LLLL":default:return j.month(_e,{width:"wide",context:"standalone"})}},w:function a(_,$,j,_e){var et=getUTCWeek(_,_e);return $==="wo"?j.ordinalNumber(et,{unit:"week"}):addLeadingZeros(et,$.length)},I:function a(_,$,j){var _e=getUTCISOWeek(_);return $==="Io"?j.ordinalNumber(_e,{unit:"week"}):addLeadingZeros(_e,$.length)},d:function a(_,$,j){return $==="do"?j.ordinalNumber(_.getUTCDate(),{unit:"date"}):lightFormatters.d(_,$)},D:function a(_,$,j){var _e=getUTCDayOfYear(_);return $==="Do"?j.ordinalNumber(_e,{unit:"dayOfYear"}):addLeadingZeros(_e,$.length)},E:function a(_,$,j){var _e=_.getUTCDay();switch($){case"E":case"EE":case"EEE":return j.day(_e,{width:"abbreviated",context:"formatting"});case"EEEEE":return j.day(_e,{width:"narrow",context:"formatting"});case"EEEEEE":return j.day(_e,{width:"short",context:"formatting"});case"EEEE":default:return j.day(_e,{width:"wide",context:"formatting"})}},e:function a(_,$,j,_e){var et=_.getUTCDay(),tt=(et-_e.weekStartsOn+8)%7||7;switch($){case"e":return String(tt);case"ee":return addLeadingZeros(tt,2);case"eo":return j.ordinalNumber(tt,{unit:"day"});case"eee":return j.day(et,{width:"abbreviated",context:"formatting"});case"eeeee":return j.day(et,{width:"narrow",context:"formatting"});case"eeeeee":return j.day(et,{width:"short",context:"formatting"});case"eeee":default:return j.day(et,{width:"wide",context:"formatting"})}},c:function a(_,$,j,_e){var et=_.getUTCDay(),tt=(et-_e.weekStartsOn+8)%7||7;switch($){case"c":return String(tt);case"cc":return addLeadingZeros(tt,$.length);case"co":return j.ordinalNumber(tt,{unit:"day"});case"ccc":return j.day(et,{width:"abbreviated",context:"standalone"});case"ccccc":return j.day(et,{width:"narrow",context:"standalone"});case"cccccc":return j.day(et,{width:"short",context:"standalone"});case"cccc":default:return j.day(et,{width:"wide",context:"standalone"})}},i:function a(_,$,j){var _e=_.getUTCDay(),et=_e===0?7:_e;switch($){case"i":return String(et);case"ii":return addLeadingZeros(et,$.length);case"io":return j.ordinalNumber(et,{unit:"day"});case"iii":return j.day(_e,{width:"abbreviated",context:"formatting"});case"iiiii":return j.day(_e,{width:"narrow",context:"formatting"});case"iiiiii":return j.day(_e,{width:"short",context:"formatting"});case"iiii":default:return j.day(_e,{width:"wide",context:"formatting"})}},a:function a(_,$,j){var _e=_.getUTCHours(),et=_e/12>=1?"pm":"am";switch($){case"a":case"aa":return j.dayPeriod(et,{width:"abbreviated",context:"formatting"});case"aaa":return j.dayPeriod(et,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return j.dayPeriod(et,{width:"narrow",context:"formatting"});case"aaaa":default:return j.dayPeriod(et,{width:"wide",context:"formatting"})}},b:function a(_,$,j){var _e=_.getUTCHours(),et;switch(_e===12?et=dayPeriodEnum.noon:_e===0?et=dayPeriodEnum.midnight:et=_e/12>=1?"pm":"am",$){case"b":case"bb":return j.dayPeriod(et,{width:"abbreviated",context:"formatting"});case"bbb":return j.dayPeriod(et,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return j.dayPeriod(et,{width:"narrow",context:"formatting"});case"bbbb":default:return j.dayPeriod(et,{width:"wide",context:"formatting"})}},B:function a(_,$,j){var _e=_.getUTCHours(),et;switch(_e>=17?et=dayPeriodEnum.evening:_e>=12?et=dayPeriodEnum.afternoon:_e>=4?et=dayPeriodEnum.morning:et=dayPeriodEnum.night,$){case"B":case"BB":case"BBB":return j.dayPeriod(et,{width:"abbreviated",context:"formatting"});case"BBBBB":return j.dayPeriod(et,{width:"narrow",context:"formatting"});case"BBBB":default:return j.dayPeriod(et,{width:"wide",context:"formatting"})}},h:function a(_,$,j){if($==="ho"){var _e=_.getUTCHours()%12;return _e===0&&(_e=12),j.ordinalNumber(_e,{unit:"hour"})}return lightFormatters.h(_,$)},H:function a(_,$,j){return $==="Ho"?j.ordinalNumber(_.getUTCHours(),{unit:"hour"}):lightFormatters.H(_,$)},K:function a(_,$,j){var _e=_.getUTCHours()%12;return $==="Ko"?j.ordinalNumber(_e,{unit:"hour"}):addLeadingZeros(_e,$.length)},k:function a(_,$,j){var _e=_.getUTCHours();return _e===0&&(_e=24),$==="ko"?j.ordinalNumber(_e,{unit:"hour"}):addLeadingZeros(_e,$.length)},m:function a(_,$,j){return $==="mo"?j.ordinalNumber(_.getUTCMinutes(),{unit:"minute"}):lightFormatters.m(_,$)},s:function a(_,$,j){return $==="so"?j.ordinalNumber(_.getUTCSeconds(),{unit:"second"}):lightFormatters.s(_,$)},S:function a(_,$){return lightFormatters.S(_,$)},X:function a(_,$,j,_e){var et=_e._originalDate||_,tt=et.getTimezoneOffset();if(tt===0)return"Z";switch($){case"X":return formatTimezoneWithOptionalMinutes(tt);case"XXXX":case"XX":return formatTimezone(tt);case"XXXXX":case"XXX":default:return formatTimezone(tt,":")}},x:function a(_,$,j,_e){var et=_e._originalDate||_,tt=et.getTimezoneOffset();switch($){case"x":return formatTimezoneWithOptionalMinutes(tt);case"xxxx":case"xx":return formatTimezone(tt);case"xxxxx":case"xxx":default:return formatTimezone(tt,":")}},O:function a(_,$,j,_e){var et=_e._originalDate||_,tt=et.getTimezoneOffset();switch($){case"O":case"OO":case"OOO":return"GMT"+formatTimezoneShort(tt,":");case"OOOO":default:return"GMT"+formatTimezone(tt,":")}},z:function a(_,$,j,_e){var et=_e._originalDate||_,tt=et.getTimezoneOffset();switch($){case"z":case"zz":case"zzz":return"GMT"+formatTimezoneShort(tt,":");case"zzzz":default:return"GMT"+formatTimezone(tt,":")}},t:function a(_,$,j,_e){var et=_e._originalDate||_,tt=Math.floor(et.getTime()/1e3);return addLeadingZeros(tt,$.length)},T:function a(_,$,j,_e){var et=_e._originalDate||_,tt=et.getTime();return addLeadingZeros(tt,$.length)}};function formatTimezoneShort(a,_){var $=a>0?"-":"+",j=Math.abs(a),_e=Math.floor(j/60),et=j%60;if(et===0)return $+String(_e);var tt=_||"";return $+String(_e)+tt+addLeadingZeros(et,2)}function formatTimezoneWithOptionalMinutes(a,_){if(a%60===0){var $=a>0?"-":"+";return $+addLeadingZeros(Math.abs(a)/60,2)}return formatTimezone(a,_)}function formatTimezone(a,_){var $=_||"",j=a>0?"-":"+",_e=Math.abs(a),et=addLeadingZeros(Math.floor(_e/60),2),tt=addLeadingZeros(_e%60,2);return j+et+$+tt}const formatters$1=formatters;var dateLongFormatter=function a(_,$){switch(_){case"P":return $.date({width:"short"});case"PP":return $.date({width:"medium"});case"PPP":return $.date({width:"long"});case"PPPP":default:return $.date({width:"full"})}},timeLongFormatter=function a(_,$){switch(_){case"p":return $.time({width:"short"});case"pp":return $.time({width:"medium"});case"ppp":return $.time({width:"long"});case"pppp":default:return $.time({width:"full"})}},dateTimeLongFormatter=function a(_,$){var j=_.match(/(P+)(p+)?/)||[],_e=j[1],et=j[2];if(!et)return dateLongFormatter(_,$);var tt;switch(_e){case"P":tt=$.dateTime({width:"short"});break;case"PP":tt=$.dateTime({width:"medium"});break;case"PPP":tt=$.dateTime({width:"long"});break;case"PPPP":default:tt=$.dateTime({width:"full"});break}return tt.replace("{{date}}",dateLongFormatter(_e,$)).replace("{{time}}",timeLongFormatter(et,$))},longFormatters={p:timeLongFormatter,P:dateTimeLongFormatter};const longFormatters$1=longFormatters;function getTimezoneOffsetInMilliseconds(a){var _=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()));return _.setUTCFullYear(a.getFullYear()),a.getTime()-_.getTime()}var protectedDayOfYearTokens=["D","DD"],protectedWeekYearTokens=["YY","YYYY"];function isProtectedDayOfYearToken(a){return protectedDayOfYearTokens.indexOf(a)!==-1}function isProtectedWeekYearToken(a){return protectedWeekYearTokens.indexOf(a)!==-1}function throwProtectedError(a,_,$){if(a==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(_,"`) for formatting years to the input `").concat($,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(_,"`) for formatting years to the input `").concat($,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(_,"`) for formatting days of the month to the input `").concat($,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(_,"`) for formatting days of the month to the input `").concat($,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var formatDistanceLocale={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},formatDistance=function a(_,$,j){var _e,et=formatDistanceLocale[_];return typeof et=="string"?_e=et:$===1?_e=et.one:_e=et.other.replace("{{count}}",$.toString()),j!=null&&j.addSuffix?j.comparison&&j.comparison>0?"in "+_e:_e+" ago":_e};const formatDistance$1=formatDistance;function buildFormatLongFn(a){return function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},$=_.width?String(_.width):a.defaultWidth,j=a.formats[$]||a.formats[a.defaultWidth];return j}}var dateFormats={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},timeFormats={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong={date:buildFormatLongFn({formats:dateFormats,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats,defaultWidth:"full"})};const formatLong$1=formatLong;var formatRelativeLocale={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},formatRelative=function a(_,$,j,_e){return formatRelativeLocale[_]};const formatRelative$1=formatRelative;function buildLocalizeFn(a){return function(_,$){var j=$!=null&&$.context?String($.context):"standalone",_e;if(j==="formatting"&&a.formattingValues){var et=a.defaultFormattingWidth||a.defaultWidth,tt=$!=null&&$.width?String($.width):et;_e=a.formattingValues[tt]||a.formattingValues[et]}else{var rt=a.defaultWidth,at=$!=null&&$.width?String($.width):a.defaultWidth;_e=a.values[at]||a.values[rt]}var ct=a.argumentCallback?a.argumentCallback(_):_;return _e[ct]}}var eraValues={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},quarterValues={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},monthValues={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},dayValues={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},formattingDayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ordinalNumber=function a(_,$){var j=Number(_),_e=j%100;if(_e>20||_e<10)switch(_e%10){case 1:return j+"st";case 2:return j+"nd";case 3:return j+"rd"}return j+"th"},localize={ordinalNumber,era:buildLocalizeFn({values:eraValues,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues,defaultWidth:"wide",argumentCallback:function a(_){return _-1}}),month:buildLocalizeFn({values:monthValues,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues,defaultWidth:"wide",formattingValues:formattingDayPeriodValues,defaultFormattingWidth:"wide"})};const localize$1=localize;function buildMatchFn(a){return function(_){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=$.width,_e=j&&a.matchPatterns[j]||a.matchPatterns[a.defaultMatchWidth],et=_.match(_e);if(!et)return null;var tt=et[0],rt=j&&a.parsePatterns[j]||a.parsePatterns[a.defaultParseWidth],at=Array.isArray(rt)?findIndex$1(rt,function(yt){return yt.test(tt)}):findKey(rt,function(yt){return yt.test(tt)}),ct;ct=a.valueCallback?a.valueCallback(at):at,ct=$.valueCallback?$.valueCallback(ct):ct;var dt=_.slice(tt.length);return{value:ct,rest:dt}}}function findKey(a,_){for(var $ in a)if(a.hasOwnProperty($)&&_(a[$]))return $}function findIndex$1(a,_){for(var $=0;$<a.length;$++)if(_(a[$]))return $}function buildMatchPatternFn(a){return function(_){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=_.match(a.matchPattern);if(!j)return null;var _e=j[0],et=_.match(a.parsePattern);if(!et)return null;var tt=a.valueCallback?a.valueCallback(et[0]):et[0];tt=$.valueCallback?$.valueCallback(tt):tt;var rt=_.slice(_e.length);return{value:tt,rest:rt}}}var matchOrdinalNumberPattern=/^(\d+)(th|st|nd|rd)?/i,parseOrdinalNumberPattern=/\d+/i,matchEraPatterns={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},parseEraPatterns={any:[/^b/i,/^(a|c)/i]},matchQuarterPatterns={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},parseQuarterPatterns={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},parseMonthPatterns={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},parseDayPatterns={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},matchDayPeriodPatterns={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},parseDayPeriodPatterns={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},match={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern,parsePattern:parseOrdinalNumberPattern,valueCallback:function a(_){return parseInt(_,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns,defaultParseWidth:"any",valueCallback:function a(_){return _+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns,defaultParseWidth:"any"})};const match$1=match;var locale={code:"en-US",formatDistance:formatDistance$1,formatLong:formatLong$1,formatRelative:formatRelative$1,localize:localize$1,match:match$1,options:{weekStartsOn:0,firstWeekContainsDate:1}};const defaultLocale=locale;var formattingTokensRegExp$1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp$1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp$1=/^'([^]*?)'?$/,doubleQuoteRegExp$1=/''/g,unescapedLatinCharacterRegExp$1=/[a-zA-Z]/;function format(a,_,$){var j,_e,et,tt,rt,at,ct,dt,yt,bt,Et,$t,_t,xt,St,Mt,Tt,Rt;requiredArgs(2,arguments);var Ct=String(_),It=getDefaultOptions(),kt=(j=(_e=$==null?void 0:$.locale)!==null&&_e!==void 0?_e:It.locale)!==null&&j!==void 0?j:defaultLocale,Dt=toInteger$2((et=(tt=(rt=(at=$==null?void 0:$.firstWeekContainsDate)!==null&&at!==void 0?at:$==null||(ct=$.locale)===null||ct===void 0||(dt=ct.options)===null||dt===void 0?void 0:dt.firstWeekContainsDate)!==null&&rt!==void 0?rt:It.firstWeekContainsDate)!==null&&tt!==void 0?tt:(yt=It.locale)===null||yt===void 0||(bt=yt.options)===null||bt===void 0?void 0:bt.firstWeekContainsDate)!==null&&et!==void 0?et:1);if(!(Dt>=1&&Dt<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Bt=toInteger$2((Et=($t=(_t=(xt=$==null?void 0:$.weekStartsOn)!==null&&xt!==void 0?xt:$==null||(St=$.locale)===null||St===void 0||(Mt=St.options)===null||Mt===void 0?void 0:Mt.weekStartsOn)!==null&&_t!==void 0?_t:It.weekStartsOn)!==null&&$t!==void 0?$t:(Tt=It.locale)===null||Tt===void 0||(Rt=Tt.options)===null||Rt===void 0?void 0:Rt.weekStartsOn)!==null&&Et!==void 0?Et:0);if(!(Bt>=0&&Bt<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!kt.localize)throw new RangeError("locale must contain localize property");if(!kt.formatLong)throw new RangeError("locale must contain formatLong property");var zt=toDate$1(a);if(!isValid(zt))throw new RangeError("Invalid time value");var vt=getTimezoneOffsetInMilliseconds(zt),nt=subMilliseconds(zt,vt),st={firstWeekContainsDate:Dt,weekStartsOn:Bt,locale:kt,_originalDate:zt},lt=Ct.match(longFormattingTokensRegExp$1).map(function(ht){var mt=ht[0];if(mt==="p"||mt==="P"){var wt=longFormatters$1[mt];return wt(ht,kt.formatLong)}return ht}).join("").match(formattingTokensRegExp$1).map(function(ht){if(ht==="''")return"'";var mt=ht[0];if(mt==="'")return cleanEscapedString$1(ht);var wt=formatters$1[mt];if(wt)return!($!=null&&$.useAdditionalWeekYearTokens)&&isProtectedWeekYearToken(ht)&&throwProtectedError(ht,_,String(a)),!($!=null&&$.useAdditionalDayOfYearTokens)&&isProtectedDayOfYearToken(ht)&&throwProtectedError(ht,_,String(a)),wt(nt,ht,kt.localize,st);if(mt.match(unescapedLatinCharacterRegExp$1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+mt+"`");return ht}).join("");return lt}function cleanEscapedString$1(a){var _=a.match(escapedStringRegExp$1);return _?_[1].replace(doubleQuoteRegExp$1,"'"):a}function isBefore$1(a,_){requiredArgs(2,arguments);var $=toDate$1(a),j=toDate$1(_);return $.getTime()<j.getTime()}function assign(a,_){if(a==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var $ in _)Object.prototype.hasOwnProperty.call(_,$)&&(a[$]=_[$]);return a}function _typeof$w(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$w=function($){return typeof $}:_typeof$w=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$w(a)}function _inherits$v(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$w(a,_)}function _setPrototypeOf$w(a,_){return _setPrototypeOf$w=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$w(a,_)}function _createSuper$v(a){var _=_isNativeReflectConstruct$v();return function(){var j=_getPrototypeOf$v(a),_e;if(_){var et=_getPrototypeOf$v(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$v(this,_e)}}function _possibleConstructorReturn$v(a,_){return _&&(_typeof$w(_)==="object"||typeof _=="function")?_:_assertThisInitialized$w(a)}function _assertThisInitialized$w(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$v(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$v(a){return _getPrototypeOf$v=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$v(a)}function _classCallCheck$w(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$x(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$x(a,_,$){return _&&_defineProperties$x(a.prototype,_),$&&_defineProperties$x(a,$),a}function _defineProperty$v(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var TIMEZONE_UNIT_PRIORITY=10,Setter=function(){function a(){_classCallCheck$w(this,a),_defineProperty$v(this,"subPriority",0)}return _createClass$x(a,[{key:"validate",value:function($,j){return!0}}]),a}(),ValueSetter=function(a){_inherits$v($,a);var _=_createSuper$v($);function $(j,_e,et,tt,rt){var at;return _classCallCheck$w(this,$),at=_.call(this),at.value=j,at.validateValue=_e,at.setValue=et,at.priority=tt,rt&&(at.subPriority=rt),at}return _createClass$x($,[{key:"validate",value:function(_e,et){return this.validateValue(_e,this.value,et)}},{key:"set",value:function(_e,et,tt){return this.setValue(_e,et,this.value,tt)}}]),$}(Setter),DateToSystemTimezoneSetter=function(a){_inherits$v($,a);var _=_createSuper$v($);function $(){var j;_classCallCheck$w(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$v(_assertThisInitialized$w(j),"priority",TIMEZONE_UNIT_PRIORITY),_defineProperty$v(_assertThisInitialized$w(j),"subPriority",-1),j}return _createClass$x($,[{key:"set",value:function(_e,et){if(et.timestampIsSet)return _e;var tt=new Date(0);return tt.setFullYear(_e.getUTCFullYear(),_e.getUTCMonth(),_e.getUTCDate()),tt.setHours(_e.getUTCHours(),_e.getUTCMinutes(),_e.getUTCSeconds(),_e.getUTCMilliseconds()),tt}}]),$}(Setter);function _classCallCheck$v(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$w(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$w(a,_,$){return _&&_defineProperties$w(a.prototype,_),$&&_defineProperties$w(a,$),a}var Parser=function(){function a(){_classCallCheck$v(this,a)}return _createClass$w(a,[{key:"run",value:function($,j,_e,et){var tt=this.parse($,j,_e,et);return tt?{setter:new ValueSetter(tt.value,this.validate,this.set,this.priority,this.subPriority),rest:tt.rest}:null}},{key:"validate",value:function($,j,_e){return!0}}]),a}();function _typeof$v(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$v=function($){return typeof $}:_typeof$v=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$v(a)}function _classCallCheck$u(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$v(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$v(a,_,$){return _&&_defineProperties$v(a.prototype,_),$&&_defineProperties$v(a,$),a}function _inherits$u(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$v(a,_)}function _setPrototypeOf$v(a,_){return _setPrototypeOf$v=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$v(a,_)}function _createSuper$u(a){var _=_isNativeReflectConstruct$u();return function(){var j=_getPrototypeOf$u(a),_e;if(_){var et=_getPrototypeOf$u(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$u(this,_e)}}function _possibleConstructorReturn$u(a,_){return _&&(_typeof$v(_)==="object"||typeof _=="function")?_:_assertThisInitialized$v(a)}function _assertThisInitialized$v(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$u(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$u(a){return _getPrototypeOf$u=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$u(a)}function _defineProperty$u(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var EraParser=function(a){_inherits$u($,a);var _=_createSuper$u($);function $(){var j;_classCallCheck$u(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$u(_assertThisInitialized$v(j),"priority",140),_defineProperty$u(_assertThisInitialized$v(j),"incompatibleTokens",["R","u","t","T"]),j}return _createClass$v($,[{key:"parse",value:function(_e,et,tt){switch(et){case"G":case"GG":case"GGG":return tt.era(_e,{width:"abbreviated"})||tt.era(_e,{width:"narrow"});case"GGGGG":return tt.era(_e,{width:"narrow"});case"GGGG":default:return tt.era(_e,{width:"wide"})||tt.era(_e,{width:"abbreviated"})||tt.era(_e,{width:"narrow"})}}},{key:"set",value:function(_e,et,tt){return et.era=tt,_e.setUTCFullYear(tt,0,1),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser),millisecondsInMinute=6e4,millisecondsInHour=36e5,millisecondsInSecond=1e3,numericPatterns={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},timezonePatterns={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function mapValue(a,_){return a&&{value:_(a.value),rest:a.rest}}function parseNumericPattern(a,_){var $=_.match(a);return $?{value:parseInt($[0],10),rest:_.slice($[0].length)}:null}function parseTimezonePattern(a,_){var $=_.match(a);if(!$)return null;if($[0]==="Z")return{value:0,rest:_.slice(1)};var j=$[1]==="+"?1:-1,_e=$[2]?parseInt($[2],10):0,et=$[3]?parseInt($[3],10):0,tt=$[5]?parseInt($[5],10):0;return{value:j*(_e*millisecondsInHour+et*millisecondsInMinute+tt*millisecondsInSecond),rest:_.slice($[0].length)}}function parseAnyDigitsSigned(a){return parseNumericPattern(numericPatterns.anyDigitsSigned,a)}function parseNDigits(a,_){switch(a){case 1:return parseNumericPattern(numericPatterns.singleDigit,_);case 2:return parseNumericPattern(numericPatterns.twoDigits,_);case 3:return parseNumericPattern(numericPatterns.threeDigits,_);case 4:return parseNumericPattern(numericPatterns.fourDigits,_);default:return parseNumericPattern(new RegExp("^\\d{1,"+a+"}"),_)}}function parseNDigitsSigned(a,_){switch(a){case 1:return parseNumericPattern(numericPatterns.singleDigitSigned,_);case 2:return parseNumericPattern(numericPatterns.twoDigitsSigned,_);case 3:return parseNumericPattern(numericPatterns.threeDigitsSigned,_);case 4:return parseNumericPattern(numericPatterns.fourDigitsSigned,_);default:return parseNumericPattern(new RegExp("^-?\\d{1,"+a+"}"),_)}}function dayPeriodEnumToHours(a){switch(a){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function normalizeTwoDigitYear(a,_){var $=_>0,j=$?_:1-_,_e;if(j<=50)_e=a||100;else{var et=j+50,tt=Math.floor(et/100)*100,rt=a>=et%100;_e=a+tt-(rt?100:0)}return $?_e:1-_e}function isLeapYearIndex(a){return a%400===0||a%4===0&&a%100!==0}function _typeof$u(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$u=function($){return typeof $}:_typeof$u=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$u(a)}function _classCallCheck$t(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$u(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$u(a,_,$){return _&&_defineProperties$u(a.prototype,_),$&&_defineProperties$u(a,$),a}function _inherits$t(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$u(a,_)}function _setPrototypeOf$u(a,_){return _setPrototypeOf$u=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$u(a,_)}function _createSuper$t(a){var _=_isNativeReflectConstruct$t();return function(){var j=_getPrototypeOf$t(a),_e;if(_){var et=_getPrototypeOf$t(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$t(this,_e)}}function _possibleConstructorReturn$t(a,_){return _&&(_typeof$u(_)==="object"||typeof _=="function")?_:_assertThisInitialized$u(a)}function _assertThisInitialized$u(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$t(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$t(a){return _getPrototypeOf$t=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$t(a)}function _defineProperty$t(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var YearParser=function(a){_inherits$t($,a);var _=_createSuper$t($);function $(){var j;_classCallCheck$t(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$t(_assertThisInitialized$u(j),"priority",130),_defineProperty$t(_assertThisInitialized$u(j),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),j}return _createClass$u($,[{key:"parse",value:function(_e,et,tt){var rt=function(ct){return{year:ct,isTwoDigitYear:et==="yy"}};switch(et){case"y":return mapValue(parseNDigits(4,_e),rt);case"yo":return mapValue(tt.ordinalNumber(_e,{unit:"year"}),rt);default:return mapValue(parseNDigits(et.length,_e),rt)}}},{key:"validate",value:function(_e,et){return et.isTwoDigitYear||et.year>0}},{key:"set",value:function(_e,et,tt){var rt=_e.getUTCFullYear();if(tt.isTwoDigitYear){var at=normalizeTwoDigitYear(tt.year,rt);return _e.setUTCFullYear(at,0,1),_e.setUTCHours(0,0,0,0),_e}var ct=!("era"in et)||et.era===1?tt.year:1-tt.year;return _e.setUTCFullYear(ct,0,1),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function _typeof$t(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$t=function($){return typeof $}:_typeof$t=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$t(a)}function _classCallCheck$s(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$t(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$t(a,_,$){return _&&_defineProperties$t(a.prototype,_),$&&_defineProperties$t(a,$),a}function _inherits$s(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$t(a,_)}function _setPrototypeOf$t(a,_){return _setPrototypeOf$t=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$t(a,_)}function _createSuper$s(a){var _=_isNativeReflectConstruct$s();return function(){var j=_getPrototypeOf$s(a),_e;if(_){var et=_getPrototypeOf$s(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$s(this,_e)}}function _possibleConstructorReturn$s(a,_){return _&&(_typeof$t(_)==="object"||typeof _=="function")?_:_assertThisInitialized$t(a)}function _assertThisInitialized$t(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$s(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$s(a){return _getPrototypeOf$s=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$s(a)}function _defineProperty$s(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var LocalWeekYearParser=function(a){_inherits$s($,a);var _=_createSuper$s($);function $(){var j;_classCallCheck$s(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$s(_assertThisInitialized$t(j),"priority",130),_defineProperty$s(_assertThisInitialized$t(j),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),j}return _createClass$t($,[{key:"parse",value:function(_e,et,tt){var rt=function(ct){return{year:ct,isTwoDigitYear:et==="YY"}};switch(et){case"Y":return mapValue(parseNDigits(4,_e),rt);case"Yo":return mapValue(tt.ordinalNumber(_e,{unit:"year"}),rt);default:return mapValue(parseNDigits(et.length,_e),rt)}}},{key:"validate",value:function(_e,et){return et.isTwoDigitYear||et.year>0}},{key:"set",value:function(_e,et,tt,rt){var at=getUTCWeekYear(_e,rt);if(tt.isTwoDigitYear){var ct=normalizeTwoDigitYear(tt.year,at);return _e.setUTCFullYear(ct,0,rt.firstWeekContainsDate),_e.setUTCHours(0,0,0,0),startOfUTCWeek(_e,rt)}var dt=!("era"in et)||et.era===1?tt.year:1-tt.year;return _e.setUTCFullYear(dt,0,rt.firstWeekContainsDate),_e.setUTCHours(0,0,0,0),startOfUTCWeek(_e,rt)}}]),$}(Parser);function _typeof$s(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$s=function($){return typeof $}:_typeof$s=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$s(a)}function _classCallCheck$r(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$s(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$s(a,_,$){return _&&_defineProperties$s(a.prototype,_),$&&_defineProperties$s(a,$),a}function _inherits$r(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$s(a,_)}function _setPrototypeOf$s(a,_){return _setPrototypeOf$s=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$s(a,_)}function _createSuper$r(a){var _=_isNativeReflectConstruct$r();return function(){var j=_getPrototypeOf$r(a),_e;if(_){var et=_getPrototypeOf$r(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$r(this,_e)}}function _possibleConstructorReturn$r(a,_){return _&&(_typeof$s(_)==="object"||typeof _=="function")?_:_assertThisInitialized$s(a)}function _assertThisInitialized$s(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$r(a){return _getPrototypeOf$r=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$r(a)}function _defineProperty$r(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var ISOWeekYearParser=function(a){_inherits$r($,a);var _=_createSuper$r($);function $(){var j;_classCallCheck$r(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$r(_assertThisInitialized$s(j),"priority",130),_defineProperty$r(_assertThisInitialized$s(j),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),j}return _createClass$s($,[{key:"parse",value:function(_e,et){return parseNDigitsSigned(et==="R"?4:et.length,_e)}},{key:"set",value:function(_e,et,tt){var rt=new Date(0);return rt.setUTCFullYear(tt,0,4),rt.setUTCHours(0,0,0,0),startOfUTCISOWeek(rt)}}]),$}(Parser);function _typeof$r(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$r=function($){return typeof $}:_typeof$r=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$r(a)}function _classCallCheck$q(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$r(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$r(a,_,$){return _&&_defineProperties$r(a.prototype,_),$&&_defineProperties$r(a,$),a}function _inherits$q(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$r(a,_)}function _setPrototypeOf$r(a,_){return _setPrototypeOf$r=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$r(a,_)}function _createSuper$q(a){var _=_isNativeReflectConstruct$q();return function(){var j=_getPrototypeOf$q(a),_e;if(_){var et=_getPrototypeOf$q(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$q(this,_e)}}function _possibleConstructorReturn$q(a,_){return _&&(_typeof$r(_)==="object"||typeof _=="function")?_:_assertThisInitialized$r(a)}function _assertThisInitialized$r(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$q(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$q(a){return _getPrototypeOf$q=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$q(a)}function _defineProperty$q(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var ExtendedYearParser=function(a){_inherits$q($,a);var _=_createSuper$q($);function $(){var j;_classCallCheck$q(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$q(_assertThisInitialized$r(j),"priority",130),_defineProperty$q(_assertThisInitialized$r(j),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),j}return _createClass$r($,[{key:"parse",value:function(_e,et){return parseNDigitsSigned(et==="u"?4:et.length,_e)}},{key:"set",value:function(_e,et,tt){return _e.setUTCFullYear(tt,0,1),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function _typeof$q(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$q=function($){return typeof $}:_typeof$q=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$q(a)}function _classCallCheck$p(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$q(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$q(a,_,$){return _&&_defineProperties$q(a.prototype,_),$&&_defineProperties$q(a,$),a}function _inherits$p(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$q(a,_)}function _setPrototypeOf$q(a,_){return _setPrototypeOf$q=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$q(a,_)}function _createSuper$p(a){var _=_isNativeReflectConstruct$p();return function(){var j=_getPrototypeOf$p(a),_e;if(_){var et=_getPrototypeOf$p(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$p(this,_e)}}function _possibleConstructorReturn$p(a,_){return _&&(_typeof$q(_)==="object"||typeof _=="function")?_:_assertThisInitialized$q(a)}function _assertThisInitialized$q(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$p(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$p(a){return _getPrototypeOf$p=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$p(a)}function _defineProperty$p(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var QuarterParser=function(a){_inherits$p($,a);var _=_createSuper$p($);function $(){var j;_classCallCheck$p(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$p(_assertThisInitialized$q(j),"priority",120),_defineProperty$p(_assertThisInitialized$q(j),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),j}return _createClass$q($,[{key:"parse",value:function(_e,et,tt){switch(et){case"Q":case"QQ":return parseNDigits(et.length,_e);case"Qo":return tt.ordinalNumber(_e,{unit:"quarter"});case"QQQ":return tt.quarter(_e,{width:"abbreviated",context:"formatting"})||tt.quarter(_e,{width:"narrow",context:"formatting"});case"QQQQQ":return tt.quarter(_e,{width:"narrow",context:"formatting"});case"QQQQ":default:return tt.quarter(_e,{width:"wide",context:"formatting"})||tt.quarter(_e,{width:"abbreviated",context:"formatting"})||tt.quarter(_e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(_e,et){return et>=1&&et<=4}},{key:"set",value:function(_e,et,tt){return _e.setUTCMonth((tt-1)*3,1),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function _typeof$p(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$p=function($){return typeof $}:_typeof$p=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$p(a)}function _classCallCheck$o(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$p(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$p(a,_,$){return _&&_defineProperties$p(a.prototype,_),$&&_defineProperties$p(a,$),a}function _inherits$o(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$p(a,_)}function _setPrototypeOf$p(a,_){return _setPrototypeOf$p=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$p(a,_)}function _createSuper$o(a){var _=_isNativeReflectConstruct$o();return function(){var j=_getPrototypeOf$o(a),_e;if(_){var et=_getPrototypeOf$o(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$o(this,_e)}}function _possibleConstructorReturn$o(a,_){return _&&(_typeof$p(_)==="object"||typeof _=="function")?_:_assertThisInitialized$p(a)}function _assertThisInitialized$p(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$o(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$o(a){return _getPrototypeOf$o=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$o(a)}function _defineProperty$o(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var StandAloneQuarterParser=function(a){_inherits$o($,a);var _=_createSuper$o($);function $(){var j;_classCallCheck$o(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$o(_assertThisInitialized$p(j),"priority",120),_defineProperty$o(_assertThisInitialized$p(j),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),j}return _createClass$p($,[{key:"parse",value:function(_e,et,tt){switch(et){case"q":case"qq":return parseNDigits(et.length,_e);case"qo":return tt.ordinalNumber(_e,{unit:"quarter"});case"qqq":return tt.quarter(_e,{width:"abbreviated",context:"standalone"})||tt.quarter(_e,{width:"narrow",context:"standalone"});case"qqqqq":return tt.quarter(_e,{width:"narrow",context:"standalone"});case"qqqq":default:return tt.quarter(_e,{width:"wide",context:"standalone"})||tt.quarter(_e,{width:"abbreviated",context:"standalone"})||tt.quarter(_e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(_e,et){return et>=1&&et<=4}},{key:"set",value:function(_e,et,tt){return _e.setUTCMonth((tt-1)*3,1),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function _typeof$o(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$o=function($){return typeof $}:_typeof$o=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$o(a)}function _classCallCheck$n(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$o(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$o(a,_,$){return _&&_defineProperties$o(a.prototype,_),$&&_defineProperties$o(a,$),a}function _inherits$n(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$o(a,_)}function _setPrototypeOf$o(a,_){return _setPrototypeOf$o=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$o(a,_)}function _createSuper$n(a){var _=_isNativeReflectConstruct$n();return function(){var j=_getPrototypeOf$n(a),_e;if(_){var et=_getPrototypeOf$n(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$n(this,_e)}}function _possibleConstructorReturn$n(a,_){return _&&(_typeof$o(_)==="object"||typeof _=="function")?_:_assertThisInitialized$o(a)}function _assertThisInitialized$o(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$n(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$n(a){return _getPrototypeOf$n=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$n(a)}function _defineProperty$n(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var MonthParser=function(a){_inherits$n($,a);var _=_createSuper$n($);function $(){var j;_classCallCheck$n(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$n(_assertThisInitialized$o(j),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),_defineProperty$n(_assertThisInitialized$o(j),"priority",110),j}return _createClass$o($,[{key:"parse",value:function(_e,et,tt){var rt=function(ct){return ct-1};switch(et){case"M":return mapValue(parseNumericPattern(numericPatterns.month,_e),rt);case"MM":return mapValue(parseNDigits(2,_e),rt);case"Mo":return mapValue(tt.ordinalNumber(_e,{unit:"month"}),rt);case"MMM":return tt.month(_e,{width:"abbreviated",context:"formatting"})||tt.month(_e,{width:"narrow",context:"formatting"});case"MMMMM":return tt.month(_e,{width:"narrow",context:"formatting"});case"MMMM":default:return tt.month(_e,{width:"wide",context:"formatting"})||tt.month(_e,{width:"abbreviated",context:"formatting"})||tt.month(_e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(_e,et){return et>=0&&et<=11}},{key:"set",value:function(_e,et,tt){return _e.setUTCMonth(tt,1),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function _typeof$n(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$n=function($){return typeof $}:_typeof$n=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$n(a)}function _classCallCheck$m(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$n(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$n(a,_,$){return _&&_defineProperties$n(a.prototype,_),$&&_defineProperties$n(a,$),a}function _inherits$m(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$n(a,_)}function _setPrototypeOf$n(a,_){return _setPrototypeOf$n=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$n(a,_)}function _createSuper$m(a){var _=_isNativeReflectConstruct$m();return function(){var j=_getPrototypeOf$m(a),_e;if(_){var et=_getPrototypeOf$m(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$m(this,_e)}}function _possibleConstructorReturn$m(a,_){return _&&(_typeof$n(_)==="object"||typeof _=="function")?_:_assertThisInitialized$n(a)}function _assertThisInitialized$n(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$m(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$m(a){return _getPrototypeOf$m=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$m(a)}function _defineProperty$m(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var StandAloneMonthParser=function(a){_inherits$m($,a);var _=_createSuper$m($);function $(){var j;_classCallCheck$m(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$m(_assertThisInitialized$n(j),"priority",110),_defineProperty$m(_assertThisInitialized$n(j),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),j}return _createClass$n($,[{key:"parse",value:function(_e,et,tt){var rt=function(ct){return ct-1};switch(et){case"L":return mapValue(parseNumericPattern(numericPatterns.month,_e),rt);case"LL":return mapValue(parseNDigits(2,_e),rt);case"Lo":return mapValue(tt.ordinalNumber(_e,{unit:"month"}),rt);case"LLL":return tt.month(_e,{width:"abbreviated",context:"standalone"})||tt.month(_e,{width:"narrow",context:"standalone"});case"LLLLL":return tt.month(_e,{width:"narrow",context:"standalone"});case"LLLL":default:return tt.month(_e,{width:"wide",context:"standalone"})||tt.month(_e,{width:"abbreviated",context:"standalone"})||tt.month(_e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(_e,et){return et>=0&&et<=11}},{key:"set",value:function(_e,et,tt){return _e.setUTCMonth(tt,1),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function setUTCWeek(a,_,$){requiredArgs(2,arguments);var j=toDate$1(a),_e=toInteger$2(_),et=getUTCWeek(j,$)-_e;return j.setUTCDate(j.getUTCDate()-et*7),j}function _typeof$m(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$m=function($){return typeof $}:_typeof$m=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$m(a)}function _classCallCheck$l(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$m(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$m(a,_,$){return _&&_defineProperties$m(a.prototype,_),$&&_defineProperties$m(a,$),a}function _inherits$l(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$m(a,_)}function _setPrototypeOf$m(a,_){return _setPrototypeOf$m=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$m(a,_)}function _createSuper$l(a){var _=_isNativeReflectConstruct$l();return function(){var j=_getPrototypeOf$l(a),_e;if(_){var et=_getPrototypeOf$l(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$l(this,_e)}}function _possibleConstructorReturn$l(a,_){return _&&(_typeof$m(_)==="object"||typeof _=="function")?_:_assertThisInitialized$m(a)}function _assertThisInitialized$m(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$l(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$l(a){return _getPrototypeOf$l=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$l(a)}function _defineProperty$l(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var LocalWeekParser=function(a){_inherits$l($,a);var _=_createSuper$l($);function $(){var j;_classCallCheck$l(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$l(_assertThisInitialized$m(j),"priority",100),_defineProperty$l(_assertThisInitialized$m(j),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),j}return _createClass$m($,[{key:"parse",value:function(_e,et,tt){switch(et){case"w":return parseNumericPattern(numericPatterns.week,_e);case"wo":return tt.ordinalNumber(_e,{unit:"week"});default:return parseNDigits(et.length,_e)}}},{key:"validate",value:function(_e,et){return et>=1&&et<=53}},{key:"set",value:function(_e,et,tt,rt){return startOfUTCWeek(setUTCWeek(_e,tt,rt),rt)}}]),$}(Parser);function setUTCISOWeek(a,_){requiredArgs(2,arguments);var $=toDate$1(a),j=toInteger$2(_),_e=getUTCISOWeek($)-j;return $.setUTCDate($.getUTCDate()-_e*7),$}function _typeof$l(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$l=function($){return typeof $}:_typeof$l=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$l(a)}function _classCallCheck$k(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$l(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$l(a,_,$){return _&&_defineProperties$l(a.prototype,_),$&&_defineProperties$l(a,$),a}function _inherits$k(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$l(a,_)}function _setPrototypeOf$l(a,_){return _setPrototypeOf$l=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$l(a,_)}function _createSuper$k(a){var _=_isNativeReflectConstruct$k();return function(){var j=_getPrototypeOf$k(a),_e;if(_){var et=_getPrototypeOf$k(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$k(this,_e)}}function _possibleConstructorReturn$k(a,_){return _&&(_typeof$l(_)==="object"||typeof _=="function")?_:_assertThisInitialized$l(a)}function _assertThisInitialized$l(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$k(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$k(a){return _getPrototypeOf$k=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$k(a)}function _defineProperty$k(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var ISOWeekParser=function(a){_inherits$k($,a);var _=_createSuper$k($);function $(){var j;_classCallCheck$k(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$k(_assertThisInitialized$l(j),"priority",100),_defineProperty$k(_assertThisInitialized$l(j),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),j}return _createClass$l($,[{key:"parse",value:function(_e,et,tt){switch(et){case"I":return parseNumericPattern(numericPatterns.week,_e);case"Io":return tt.ordinalNumber(_e,{unit:"week"});default:return parseNDigits(et.length,_e)}}},{key:"validate",value:function(_e,et){return et>=1&&et<=53}},{key:"set",value:function(_e,et,tt){return startOfUTCISOWeek(setUTCISOWeek(_e,tt))}}]),$}(Parser);function _typeof$k(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$k=function($){return typeof $}:_typeof$k=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$k(a)}function _classCallCheck$j(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$k(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$k(a,_,$){return _&&_defineProperties$k(a.prototype,_),$&&_defineProperties$k(a,$),a}function _inherits$j(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$k(a,_)}function _setPrototypeOf$k(a,_){return _setPrototypeOf$k=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$k(a,_)}function _createSuper$j(a){var _=_isNativeReflectConstruct$j();return function(){var j=_getPrototypeOf$j(a),_e;if(_){var et=_getPrototypeOf$j(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$j(this,_e)}}function _possibleConstructorReturn$j(a,_){return _&&(_typeof$k(_)==="object"||typeof _=="function")?_:_assertThisInitialized$k(a)}function _assertThisInitialized$k(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$j(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$j(a){return _getPrototypeOf$j=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$j(a)}function _defineProperty$j(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var DAYS_IN_MONTH=[31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP_YEAR=[31,29,31,30,31,30,31,31,30,31,30,31],DateParser=function(a){_inherits$j($,a);var _=_createSuper$j($);function $(){var j;_classCallCheck$j(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$j(_assertThisInitialized$k(j),"priority",90),_defineProperty$j(_assertThisInitialized$k(j),"subPriority",1),_defineProperty$j(_assertThisInitialized$k(j),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),j}return _createClass$k($,[{key:"parse",value:function(_e,et,tt){switch(et){case"d":return parseNumericPattern(numericPatterns.date,_e);case"do":return tt.ordinalNumber(_e,{unit:"date"});default:return parseNDigits(et.length,_e)}}},{key:"validate",value:function(_e,et){var tt=_e.getUTCFullYear(),rt=isLeapYearIndex(tt),at=_e.getUTCMonth();return rt?et>=1&&et<=DAYS_IN_MONTH_LEAP_YEAR[at]:et>=1&&et<=DAYS_IN_MONTH[at]}},{key:"set",value:function(_e,et,tt){return _e.setUTCDate(tt),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function _typeof$j(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$j=function($){return typeof $}:_typeof$j=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$j(a)}function _classCallCheck$i(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$j(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$j(a,_,$){return _&&_defineProperties$j(a.prototype,_),$&&_defineProperties$j(a,$),a}function _inherits$i(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$j(a,_)}function _setPrototypeOf$j(a,_){return _setPrototypeOf$j=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$j(a,_)}function _createSuper$i(a){var _=_isNativeReflectConstruct$i();return function(){var j=_getPrototypeOf$i(a),_e;if(_){var et=_getPrototypeOf$i(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$i(this,_e)}}function _possibleConstructorReturn$i(a,_){return _&&(_typeof$j(_)==="object"||typeof _=="function")?_:_assertThisInitialized$j(a)}function _assertThisInitialized$j(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$i(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$i(a){return _getPrototypeOf$i=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$i(a)}function _defineProperty$i(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var DayOfYearParser=function(a){_inherits$i($,a);var _=_createSuper$i($);function $(){var j;_classCallCheck$i(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$i(_assertThisInitialized$j(j),"priority",90),_defineProperty$i(_assertThisInitialized$j(j),"subpriority",1),_defineProperty$i(_assertThisInitialized$j(j),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),j}return _createClass$j($,[{key:"parse",value:function(_e,et,tt){switch(et){case"D":case"DD":return parseNumericPattern(numericPatterns.dayOfYear,_e);case"Do":return tt.ordinalNumber(_e,{unit:"date"});default:return parseNDigits(et.length,_e)}}},{key:"validate",value:function(_e,et){var tt=_e.getUTCFullYear(),rt=isLeapYearIndex(tt);return rt?et>=1&&et<=366:et>=1&&et<=365}},{key:"set",value:function(_e,et,tt){return _e.setUTCMonth(0,tt),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function setUTCDay(a,_,$){var j,_e,et,tt,rt,at,ct,dt;requiredArgs(2,arguments);var yt=getDefaultOptions(),bt=toInteger$2((j=(_e=(et=(tt=$==null?void 0:$.weekStartsOn)!==null&&tt!==void 0?tt:$==null||(rt=$.locale)===null||rt===void 0||(at=rt.options)===null||at===void 0?void 0:at.weekStartsOn)!==null&&et!==void 0?et:yt.weekStartsOn)!==null&&_e!==void 0?_e:(ct=yt.locale)===null||ct===void 0||(dt=ct.options)===null||dt===void 0?void 0:dt.weekStartsOn)!==null&&j!==void 0?j:0);if(!(bt>=0&&bt<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var Et=toDate$1(a),$t=toInteger$2(_),_t=Et.getUTCDay(),xt=$t%7,St=(xt+7)%7,Mt=(St<bt?7:0)+$t-_t;return Et.setUTCDate(Et.getUTCDate()+Mt),Et}function _typeof$i(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$i=function($){return typeof $}:_typeof$i=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$i(a)}function _classCallCheck$h(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$i(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$i(a,_,$){return _&&_defineProperties$i(a.prototype,_),$&&_defineProperties$i(a,$),a}function _inherits$h(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$i(a,_)}function _setPrototypeOf$i(a,_){return _setPrototypeOf$i=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$i(a,_)}function _createSuper$h(a){var _=_isNativeReflectConstruct$h();return function(){var j=_getPrototypeOf$h(a),_e;if(_){var et=_getPrototypeOf$h(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$h(this,_e)}}function _possibleConstructorReturn$h(a,_){return _&&(_typeof$i(_)==="object"||typeof _=="function")?_:_assertThisInitialized$i(a)}function _assertThisInitialized$i(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$h(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$h(a){return _getPrototypeOf$h=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$h(a)}function _defineProperty$h(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var DayParser=function(a){_inherits$h($,a);var _=_createSuper$h($);function $(){var j;_classCallCheck$h(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$h(_assertThisInitialized$i(j),"priority",90),_defineProperty$h(_assertThisInitialized$i(j),"incompatibleTokens",["D","i","e","c","t","T"]),j}return _createClass$i($,[{key:"parse",value:function(_e,et,tt){switch(et){case"E":case"EE":case"EEE":return tt.day(_e,{width:"abbreviated",context:"formatting"})||tt.day(_e,{width:"short",context:"formatting"})||tt.day(_e,{width:"narrow",context:"formatting"});case"EEEEE":return tt.day(_e,{width:"narrow",context:"formatting"});case"EEEEEE":return tt.day(_e,{width:"short",context:"formatting"})||tt.day(_e,{width:"narrow",context:"formatting"});case"EEEE":default:return tt.day(_e,{width:"wide",context:"formatting"})||tt.day(_e,{width:"abbreviated",context:"formatting"})||tt.day(_e,{width:"short",context:"formatting"})||tt.day(_e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(_e,et){return et>=0&&et<=6}},{key:"set",value:function(_e,et,tt,rt){return _e=setUTCDay(_e,tt,rt),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function _typeof$h(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$h=function($){return typeof $}:_typeof$h=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$h(a)}function _classCallCheck$g(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$h(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$h(a,_,$){return _&&_defineProperties$h(a.prototype,_),$&&_defineProperties$h(a,$),a}function _inherits$g(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$h(a,_)}function _setPrototypeOf$h(a,_){return _setPrototypeOf$h=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$h(a,_)}function _createSuper$g(a){var _=_isNativeReflectConstruct$g();return function(){var j=_getPrototypeOf$g(a),_e;if(_){var et=_getPrototypeOf$g(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$g(this,_e)}}function _possibleConstructorReturn$g(a,_){return _&&(_typeof$h(_)==="object"||typeof _=="function")?_:_assertThisInitialized$h(a)}function _assertThisInitialized$h(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$g(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$g(a){return _getPrototypeOf$g=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$g(a)}function _defineProperty$g(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var LocalDayParser=function(a){_inherits$g($,a);var _=_createSuper$g($);function $(){var j;_classCallCheck$g(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$g(_assertThisInitialized$h(j),"priority",90),_defineProperty$g(_assertThisInitialized$h(j),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),j}return _createClass$h($,[{key:"parse",value:function(_e,et,tt,rt){var at=function(dt){var yt=Math.floor((dt-1)/7)*7;return(dt+rt.weekStartsOn+6)%7+yt};switch(et){case"e":case"ee":return mapValue(parseNDigits(et.length,_e),at);case"eo":return mapValue(tt.ordinalNumber(_e,{unit:"day"}),at);case"eee":return tt.day(_e,{width:"abbreviated",context:"formatting"})||tt.day(_e,{width:"short",context:"formatting"})||tt.day(_e,{width:"narrow",context:"formatting"});case"eeeee":return tt.day(_e,{width:"narrow",context:"formatting"});case"eeeeee":return tt.day(_e,{width:"short",context:"formatting"})||tt.day(_e,{width:"narrow",context:"formatting"});case"eeee":default:return tt.day(_e,{width:"wide",context:"formatting"})||tt.day(_e,{width:"abbreviated",context:"formatting"})||tt.day(_e,{width:"short",context:"formatting"})||tt.day(_e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(_e,et){return et>=0&&et<=6}},{key:"set",value:function(_e,et,tt,rt){return _e=setUTCDay(_e,tt,rt),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function _typeof$g(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$g=function($){return typeof $}:_typeof$g=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$g(a)}function _classCallCheck$f(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$g(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$g(a,_,$){return _&&_defineProperties$g(a.prototype,_),$&&_defineProperties$g(a,$),a}function _inherits$f(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$g(a,_)}function _setPrototypeOf$g(a,_){return _setPrototypeOf$g=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$g(a,_)}function _createSuper$f(a){var _=_isNativeReflectConstruct$f();return function(){var j=_getPrototypeOf$f(a),_e;if(_){var et=_getPrototypeOf$f(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$f(this,_e)}}function _possibleConstructorReturn$f(a,_){return _&&(_typeof$g(_)==="object"||typeof _=="function")?_:_assertThisInitialized$g(a)}function _assertThisInitialized$g(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$f(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$f(a){return _getPrototypeOf$f=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$f(a)}function _defineProperty$f(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var StandAloneLocalDayParser=function(a){_inherits$f($,a);var _=_createSuper$f($);function $(){var j;_classCallCheck$f(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$f(_assertThisInitialized$g(j),"priority",90),_defineProperty$f(_assertThisInitialized$g(j),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),j}return _createClass$g($,[{key:"parse",value:function(_e,et,tt,rt){var at=function(dt){var yt=Math.floor((dt-1)/7)*7;return(dt+rt.weekStartsOn+6)%7+yt};switch(et){case"c":case"cc":return mapValue(parseNDigits(et.length,_e),at);case"co":return mapValue(tt.ordinalNumber(_e,{unit:"day"}),at);case"ccc":return tt.day(_e,{width:"abbreviated",context:"standalone"})||tt.day(_e,{width:"short",context:"standalone"})||tt.day(_e,{width:"narrow",context:"standalone"});case"ccccc":return tt.day(_e,{width:"narrow",context:"standalone"});case"cccccc":return tt.day(_e,{width:"short",context:"standalone"})||tt.day(_e,{width:"narrow",context:"standalone"});case"cccc":default:return tt.day(_e,{width:"wide",context:"standalone"})||tt.day(_e,{width:"abbreviated",context:"standalone"})||tt.day(_e,{width:"short",context:"standalone"})||tt.day(_e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(_e,et){return et>=0&&et<=6}},{key:"set",value:function(_e,et,tt,rt){return _e=setUTCDay(_e,tt,rt),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function setUTCISODay(a,_){requiredArgs(2,arguments);var $=toInteger$2(_);$%7===0&&($=$-7);var j=1,_e=toDate$1(a),et=_e.getUTCDay(),tt=$%7,rt=(tt+7)%7,at=(rt<j?7:0)+$-et;return _e.setUTCDate(_e.getUTCDate()+at),_e}function _typeof$f(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$f=function($){return typeof $}:_typeof$f=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$f(a)}function _classCallCheck$e(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$f(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$f(a,_,$){return _&&_defineProperties$f(a.prototype,_),$&&_defineProperties$f(a,$),a}function _inherits$e(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$f(a,_)}function _setPrototypeOf$f(a,_){return _setPrototypeOf$f=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$f(a,_)}function _createSuper$e(a){var _=_isNativeReflectConstruct$e();return function(){var j=_getPrototypeOf$e(a),_e;if(_){var et=_getPrototypeOf$e(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$e(this,_e)}}function _possibleConstructorReturn$e(a,_){return _&&(_typeof$f(_)==="object"||typeof _=="function")?_:_assertThisInitialized$f(a)}function _assertThisInitialized$f(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$e(a){return _getPrototypeOf$e=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$e(a)}function _defineProperty$e(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var ISODayParser=function(a){_inherits$e($,a);var _=_createSuper$e($);function $(){var j;_classCallCheck$e(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$e(_assertThisInitialized$f(j),"priority",90),_defineProperty$e(_assertThisInitialized$f(j),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),j}return _createClass$f($,[{key:"parse",value:function(_e,et,tt){var rt=function(ct){return ct===0?7:ct};switch(et){case"i":case"ii":return parseNDigits(et.length,_e);case"io":return tt.ordinalNumber(_e,{unit:"day"});case"iii":return mapValue(tt.day(_e,{width:"abbreviated",context:"formatting"})||tt.day(_e,{width:"short",context:"formatting"})||tt.day(_e,{width:"narrow",context:"formatting"}),rt);case"iiiii":return mapValue(tt.day(_e,{width:"narrow",context:"formatting"}),rt);case"iiiiii":return mapValue(tt.day(_e,{width:"short",context:"formatting"})||tt.day(_e,{width:"narrow",context:"formatting"}),rt);case"iiii":default:return mapValue(tt.day(_e,{width:"wide",context:"formatting"})||tt.day(_e,{width:"abbreviated",context:"formatting"})||tt.day(_e,{width:"short",context:"formatting"})||tt.day(_e,{width:"narrow",context:"formatting"}),rt)}}},{key:"validate",value:function(_e,et){return et>=1&&et<=7}},{key:"set",value:function(_e,et,tt){return _e=setUTCISODay(_e,tt),_e.setUTCHours(0,0,0,0),_e}}]),$}(Parser);function _typeof$e(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$e=function($){return typeof $}:_typeof$e=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$e(a)}function _classCallCheck$d(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$e(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$e(a,_,$){return _&&_defineProperties$e(a.prototype,_),$&&_defineProperties$e(a,$),a}function _inherits$d(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$e(a,_)}function _setPrototypeOf$e(a,_){return _setPrototypeOf$e=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$e(a,_)}function _createSuper$d(a){var _=_isNativeReflectConstruct$d();return function(){var j=_getPrototypeOf$d(a),_e;if(_){var et=_getPrototypeOf$d(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$d(this,_e)}}function _possibleConstructorReturn$d(a,_){return _&&(_typeof$e(_)==="object"||typeof _=="function")?_:_assertThisInitialized$e(a)}function _assertThisInitialized$e(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$d(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$d(a){return _getPrototypeOf$d=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$d(a)}function _defineProperty$d(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var AMPMParser=function(a){_inherits$d($,a);var _=_createSuper$d($);function $(){var j;_classCallCheck$d(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$d(_assertThisInitialized$e(j),"priority",80),_defineProperty$d(_assertThisInitialized$e(j),"incompatibleTokens",["b","B","H","k","t","T"]),j}return _createClass$e($,[{key:"parse",value:function(_e,et,tt){switch(et){case"a":case"aa":case"aaa":return tt.dayPeriod(_e,{width:"abbreviated",context:"formatting"})||tt.dayPeriod(_e,{width:"narrow",context:"formatting"});case"aaaaa":return tt.dayPeriod(_e,{width:"narrow",context:"formatting"});case"aaaa":default:return tt.dayPeriod(_e,{width:"wide",context:"formatting"})||tt.dayPeriod(_e,{width:"abbreviated",context:"formatting"})||tt.dayPeriod(_e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(_e,et,tt){return _e.setUTCHours(dayPeriodEnumToHours(tt),0,0,0),_e}}]),$}(Parser);function _typeof$d(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$d=function($){return typeof $}:_typeof$d=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$d(a)}function _classCallCheck$c(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$d(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$d(a,_,$){return _&&_defineProperties$d(a.prototype,_),$&&_defineProperties$d(a,$),a}function _inherits$c(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$d(a,_)}function _setPrototypeOf$d(a,_){return _setPrototypeOf$d=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$d(a,_)}function _createSuper$c(a){var _=_isNativeReflectConstruct$c();return function(){var j=_getPrototypeOf$c(a),_e;if(_){var et=_getPrototypeOf$c(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$c(this,_e)}}function _possibleConstructorReturn$c(a,_){return _&&(_typeof$d(_)==="object"||typeof _=="function")?_:_assertThisInitialized$d(a)}function _assertThisInitialized$d(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$c(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$c(a){return _getPrototypeOf$c=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$c(a)}function _defineProperty$c(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var AMPMMidnightParser=function(a){_inherits$c($,a);var _=_createSuper$c($);function $(){var j;_classCallCheck$c(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$c(_assertThisInitialized$d(j),"priority",80),_defineProperty$c(_assertThisInitialized$d(j),"incompatibleTokens",["a","B","H","k","t","T"]),j}return _createClass$d($,[{key:"parse",value:function(_e,et,tt){switch(et){case"b":case"bb":case"bbb":return tt.dayPeriod(_e,{width:"abbreviated",context:"formatting"})||tt.dayPeriod(_e,{width:"narrow",context:"formatting"});case"bbbbb":return tt.dayPeriod(_e,{width:"narrow",context:"formatting"});case"bbbb":default:return tt.dayPeriod(_e,{width:"wide",context:"formatting"})||tt.dayPeriod(_e,{width:"abbreviated",context:"formatting"})||tt.dayPeriod(_e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(_e,et,tt){return _e.setUTCHours(dayPeriodEnumToHours(tt),0,0,0),_e}}]),$}(Parser);function _typeof$c(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$c=function($){return typeof $}:_typeof$c=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$c(a)}function _classCallCheck$b(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$c(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$c(a,_,$){return _&&_defineProperties$c(a.prototype,_),$&&_defineProperties$c(a,$),a}function _inherits$b(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$c(a,_)}function _setPrototypeOf$c(a,_){return _setPrototypeOf$c=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$c(a,_)}function _createSuper$b(a){var _=_isNativeReflectConstruct$b();return function(){var j=_getPrototypeOf$b(a),_e;if(_){var et=_getPrototypeOf$b(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$b(this,_e)}}function _possibleConstructorReturn$b(a,_){return _&&(_typeof$c(_)==="object"||typeof _=="function")?_:_assertThisInitialized$c(a)}function _assertThisInitialized$c(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$b(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$b(a){return _getPrototypeOf$b=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$b(a)}function _defineProperty$b(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var DayPeriodParser=function(a){_inherits$b($,a);var _=_createSuper$b($);function $(){var j;_classCallCheck$b(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$b(_assertThisInitialized$c(j),"priority",80),_defineProperty$b(_assertThisInitialized$c(j),"incompatibleTokens",["a","b","t","T"]),j}return _createClass$c($,[{key:"parse",value:function(_e,et,tt){switch(et){case"B":case"BB":case"BBB":return tt.dayPeriod(_e,{width:"abbreviated",context:"formatting"})||tt.dayPeriod(_e,{width:"narrow",context:"formatting"});case"BBBBB":return tt.dayPeriod(_e,{width:"narrow",context:"formatting"});case"BBBB":default:return tt.dayPeriod(_e,{width:"wide",context:"formatting"})||tt.dayPeriod(_e,{width:"abbreviated",context:"formatting"})||tt.dayPeriod(_e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(_e,et,tt){return _e.setUTCHours(dayPeriodEnumToHours(tt),0,0,0),_e}}]),$}(Parser);function _typeof$b(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$b=function($){return typeof $}:_typeof$b=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$b(a)}function _classCallCheck$a(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$b(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$b(a,_,$){return _&&_defineProperties$b(a.prototype,_),$&&_defineProperties$b(a,$),a}function _inherits$a(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$b(a,_)}function _setPrototypeOf$b(a,_){return _setPrototypeOf$b=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$b(a,_)}function _createSuper$a(a){var _=_isNativeReflectConstruct$a();return function(){var j=_getPrototypeOf$a(a),_e;if(_){var et=_getPrototypeOf$a(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$a(this,_e)}}function _possibleConstructorReturn$a(a,_){return _&&(_typeof$b(_)==="object"||typeof _=="function")?_:_assertThisInitialized$b(a)}function _assertThisInitialized$b(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$a(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$a(a){return _getPrototypeOf$a=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$a(a)}function _defineProperty$a(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var Hour1to12Parser=function(a){_inherits$a($,a);var _=_createSuper$a($);function $(){var j;_classCallCheck$a(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$a(_assertThisInitialized$b(j),"priority",70),_defineProperty$a(_assertThisInitialized$b(j),"incompatibleTokens",["H","K","k","t","T"]),j}return _createClass$b($,[{key:"parse",value:function(_e,et,tt){switch(et){case"h":return parseNumericPattern(numericPatterns.hour12h,_e);case"ho":return tt.ordinalNumber(_e,{unit:"hour"});default:return parseNDigits(et.length,_e)}}},{key:"validate",value:function(_e,et){return et>=1&&et<=12}},{key:"set",value:function(_e,et,tt){var rt=_e.getUTCHours()>=12;return rt&&tt<12?_e.setUTCHours(tt+12,0,0,0):!rt&&tt===12?_e.setUTCHours(0,0,0,0):_e.setUTCHours(tt,0,0,0),_e}}]),$}(Parser);function _typeof$a(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$a=function($){return typeof $}:_typeof$a=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$a(a)}function _classCallCheck$9(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$a(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$a(a,_,$){return _&&_defineProperties$a(a.prototype,_),$&&_defineProperties$a(a,$),a}function _inherits$9(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$a(a,_)}function _setPrototypeOf$a(a,_){return _setPrototypeOf$a=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$a(a,_)}function _createSuper$9(a){var _=_isNativeReflectConstruct$9();return function(){var j=_getPrototypeOf$9(a),_e;if(_){var et=_getPrototypeOf$9(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$9(this,_e)}}function _possibleConstructorReturn$9(a,_){return _&&(_typeof$a(_)==="object"||typeof _=="function")?_:_assertThisInitialized$a(a)}function _assertThisInitialized$a(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$9(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$9(a){return _getPrototypeOf$9=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$9(a)}function _defineProperty$9(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var Hour0to23Parser=function(a){_inherits$9($,a);var _=_createSuper$9($);function $(){var j;_classCallCheck$9(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$9(_assertThisInitialized$a(j),"priority",70),_defineProperty$9(_assertThisInitialized$a(j),"incompatibleTokens",["a","b","h","K","k","t","T"]),j}return _createClass$a($,[{key:"parse",value:function(_e,et,tt){switch(et){case"H":return parseNumericPattern(numericPatterns.hour23h,_e);case"Ho":return tt.ordinalNumber(_e,{unit:"hour"});default:return parseNDigits(et.length,_e)}}},{key:"validate",value:function(_e,et){return et>=0&&et<=23}},{key:"set",value:function(_e,et,tt){return _e.setUTCHours(tt,0,0,0),_e}}]),$}(Parser);function _typeof$9(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$9=function($){return typeof $}:_typeof$9=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$9(a)}function _classCallCheck$8(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$9(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$9(a,_,$){return _&&_defineProperties$9(a.prototype,_),$&&_defineProperties$9(a,$),a}function _inherits$8(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$9(a,_)}function _setPrototypeOf$9(a,_){return _setPrototypeOf$9=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$9(a,_)}function _createSuper$8(a){var _=_isNativeReflectConstruct$8();return function(){var j=_getPrototypeOf$8(a),_e;if(_){var et=_getPrototypeOf$8(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$8(this,_e)}}function _possibleConstructorReturn$8(a,_){return _&&(_typeof$9(_)==="object"||typeof _=="function")?_:_assertThisInitialized$9(a)}function _assertThisInitialized$9(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$8(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$8(a){return _getPrototypeOf$8=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$8(a)}function _defineProperty$8(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var Hour0To11Parser=function(a){_inherits$8($,a);var _=_createSuper$8($);function $(){var j;_classCallCheck$8(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$8(_assertThisInitialized$9(j),"priority",70),_defineProperty$8(_assertThisInitialized$9(j),"incompatibleTokens",["h","H","k","t","T"]),j}return _createClass$9($,[{key:"parse",value:function(_e,et,tt){switch(et){case"K":return parseNumericPattern(numericPatterns.hour11h,_e);case"Ko":return tt.ordinalNumber(_e,{unit:"hour"});default:return parseNDigits(et.length,_e)}}},{key:"validate",value:function(_e,et){return et>=0&&et<=11}},{key:"set",value:function(_e,et,tt){var rt=_e.getUTCHours()>=12;return rt&&tt<12?_e.setUTCHours(tt+12,0,0,0):_e.setUTCHours(tt,0,0,0),_e}}]),$}(Parser);function _typeof$8(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$8=function($){return typeof $}:_typeof$8=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$8(a)}function _classCallCheck$7(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$8(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$8(a,_,$){return _&&_defineProperties$8(a.prototype,_),$&&_defineProperties$8(a,$),a}function _inherits$7(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$8(a,_)}function _setPrototypeOf$8(a,_){return _setPrototypeOf$8=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$8(a,_)}function _createSuper$7(a){var _=_isNativeReflectConstruct$7();return function(){var j=_getPrototypeOf$7(a),_e;if(_){var et=_getPrototypeOf$7(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$7(this,_e)}}function _possibleConstructorReturn$7(a,_){return _&&(_typeof$8(_)==="object"||typeof _=="function")?_:_assertThisInitialized$8(a)}function _assertThisInitialized$8(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$7(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$7(a){return _getPrototypeOf$7=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$7(a)}function _defineProperty$7(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var Hour1To24Parser=function(a){_inherits$7($,a);var _=_createSuper$7($);function $(){var j;_classCallCheck$7(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$7(_assertThisInitialized$8(j),"priority",70),_defineProperty$7(_assertThisInitialized$8(j),"incompatibleTokens",["a","b","h","H","K","t","T"]),j}return _createClass$8($,[{key:"parse",value:function(_e,et,tt){switch(et){case"k":return parseNumericPattern(numericPatterns.hour24h,_e);case"ko":return tt.ordinalNumber(_e,{unit:"hour"});default:return parseNDigits(et.length,_e)}}},{key:"validate",value:function(_e,et){return et>=1&&et<=24}},{key:"set",value:function(_e,et,tt){var rt=tt<=24?tt%24:tt;return _e.setUTCHours(rt,0,0,0),_e}}]),$}(Parser);function _typeof$7(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$7=function($){return typeof $}:_typeof$7=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$7(a)}function _classCallCheck$6(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$7(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$7(a,_,$){return _&&_defineProperties$7(a.prototype,_),$&&_defineProperties$7(a,$),a}function _inherits$6(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$7(a,_)}function _setPrototypeOf$7(a,_){return _setPrototypeOf$7=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$7(a,_)}function _createSuper$6(a){var _=_isNativeReflectConstruct$6();return function(){var j=_getPrototypeOf$6(a),_e;if(_){var et=_getPrototypeOf$6(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$6(this,_e)}}function _possibleConstructorReturn$6(a,_){return _&&(_typeof$7(_)==="object"||typeof _=="function")?_:_assertThisInitialized$7(a)}function _assertThisInitialized$7(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$6(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$6(a){return _getPrototypeOf$6=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$6(a)}function _defineProperty$6(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var MinuteParser=function(a){_inherits$6($,a);var _=_createSuper$6($);function $(){var j;_classCallCheck$6(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$6(_assertThisInitialized$7(j),"priority",60),_defineProperty$6(_assertThisInitialized$7(j),"incompatibleTokens",["t","T"]),j}return _createClass$7($,[{key:"parse",value:function(_e,et,tt){switch(et){case"m":return parseNumericPattern(numericPatterns.minute,_e);case"mo":return tt.ordinalNumber(_e,{unit:"minute"});default:return parseNDigits(et.length,_e)}}},{key:"validate",value:function(_e,et){return et>=0&&et<=59}},{key:"set",value:function(_e,et,tt){return _e.setUTCMinutes(tt,0,0),_e}}]),$}(Parser);function _typeof$6(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$6=function($){return typeof $}:_typeof$6=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$6(a)}function _classCallCheck$5(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$6(a,_,$){return _&&_defineProperties$6(a.prototype,_),$&&_defineProperties$6(a,$),a}function _inherits$5(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$6(a,_)}function _setPrototypeOf$6(a,_){return _setPrototypeOf$6=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$6(a,_)}function _createSuper$5(a){var _=_isNativeReflectConstruct$5();return function(){var j=_getPrototypeOf$5(a),_e;if(_){var et=_getPrototypeOf$5(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$5(this,_e)}}function _possibleConstructorReturn$5(a,_){return _&&(_typeof$6(_)==="object"||typeof _=="function")?_:_assertThisInitialized$6(a)}function _assertThisInitialized$6(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$5(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$5(a){return _getPrototypeOf$5=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$5(a)}function _defineProperty$5(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var SecondParser=function(a){_inherits$5($,a);var _=_createSuper$5($);function $(){var j;_classCallCheck$5(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$5(_assertThisInitialized$6(j),"priority",50),_defineProperty$5(_assertThisInitialized$6(j),"incompatibleTokens",["t","T"]),j}return _createClass$6($,[{key:"parse",value:function(_e,et,tt){switch(et){case"s":return parseNumericPattern(numericPatterns.second,_e);case"so":return tt.ordinalNumber(_e,{unit:"second"});default:return parseNDigits(et.length,_e)}}},{key:"validate",value:function(_e,et){return et>=0&&et<=59}},{key:"set",value:function(_e,et,tt){return _e.setUTCSeconds(tt,0),_e}}]),$}(Parser);function _typeof$5(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$5=function($){return typeof $}:_typeof$5=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$5(a)}function _classCallCheck$4(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$5(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$5(a,_,$){return _&&_defineProperties$5(a.prototype,_),$&&_defineProperties$5(a,$),a}function _inherits$4(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$5(a,_)}function _setPrototypeOf$5(a,_){return _setPrototypeOf$5=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$5(a,_)}function _createSuper$4(a){var _=_isNativeReflectConstruct$4();return function(){var j=_getPrototypeOf$4(a),_e;if(_){var et=_getPrototypeOf$4(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$4(this,_e)}}function _possibleConstructorReturn$4(a,_){return _&&(_typeof$5(_)==="object"||typeof _=="function")?_:_assertThisInitialized$5(a)}function _assertThisInitialized$5(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$4(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$4(a){return _getPrototypeOf$4=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$4(a)}function _defineProperty$4(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var FractionOfSecondParser=function(a){_inherits$4($,a);var _=_createSuper$4($);function $(){var j;_classCallCheck$4(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$4(_assertThisInitialized$5(j),"priority",30),_defineProperty$4(_assertThisInitialized$5(j),"incompatibleTokens",["t","T"]),j}return _createClass$5($,[{key:"parse",value:function(_e,et){var tt=function(at){return Math.floor(at*Math.pow(10,-et.length+3))};return mapValue(parseNDigits(et.length,_e),tt)}},{key:"set",value:function(_e,et,tt){return _e.setUTCMilliseconds(tt),_e}}]),$}(Parser);function _typeof$4(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$4=function($){return typeof $}:_typeof$4=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$4(a)}function _classCallCheck$3(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$4(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$4(a,_,$){return _&&_defineProperties$4(a.prototype,_),$&&_defineProperties$4(a,$),a}function _inherits$3(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$4(a,_)}function _setPrototypeOf$4(a,_){return _setPrototypeOf$4=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$4(a,_)}function _createSuper$3(a){var _=_isNativeReflectConstruct$3();return function(){var j=_getPrototypeOf$3(a),_e;if(_){var et=_getPrototypeOf$3(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$3(this,_e)}}function _possibleConstructorReturn$3(a,_){return _&&(_typeof$4(_)==="object"||typeof _=="function")?_:_assertThisInitialized$4(a)}function _assertThisInitialized$4(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$3(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$3(a){return _getPrototypeOf$3=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$3(a)}function _defineProperty$3(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var ISOTimezoneWithZParser=function(a){_inherits$3($,a);var _=_createSuper$3($);function $(){var j;_classCallCheck$3(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$3(_assertThisInitialized$4(j),"priority",10),_defineProperty$3(_assertThisInitialized$4(j),"incompatibleTokens",["t","T","x"]),j}return _createClass$4($,[{key:"parse",value:function(_e,et){switch(et){case"X":return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,_e);case"XX":return parseTimezonePattern(timezonePatterns.basic,_e);case"XXXX":return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,_e);case"XXXXX":return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,_e);case"XXX":default:return parseTimezonePattern(timezonePatterns.extended,_e)}}},{key:"set",value:function(_e,et,tt){return et.timestampIsSet?_e:new Date(_e.getTime()-tt)}}]),$}(Parser);function _typeof$3(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$3=function($){return typeof $}:_typeof$3=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$3(a)}function _classCallCheck$2(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$3(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$3(a,_,$){return _&&_defineProperties$3(a.prototype,_),$&&_defineProperties$3(a,$),a}function _inherits$2(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$3(a,_)}function _setPrototypeOf$3(a,_){return _setPrototypeOf$3=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$3(a,_)}function _createSuper$2(a){var _=_isNativeReflectConstruct$2();return function(){var j=_getPrototypeOf$2(a),_e;if(_){var et=_getPrototypeOf$2(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$2(this,_e)}}function _possibleConstructorReturn$2(a,_){return _&&(_typeof$3(_)==="object"||typeof _=="function")?_:_assertThisInitialized$3(a)}function _assertThisInitialized$3(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$2(a){return _getPrototypeOf$2=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$2(a)}function _defineProperty$2(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var ISOTimezoneParser=function(a){_inherits$2($,a);var _=_createSuper$2($);function $(){var j;_classCallCheck$2(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$2(_assertThisInitialized$3(j),"priority",10),_defineProperty$2(_assertThisInitialized$3(j),"incompatibleTokens",["t","T","X"]),j}return _createClass$3($,[{key:"parse",value:function(_e,et){switch(et){case"x":return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,_e);case"xx":return parseTimezonePattern(timezonePatterns.basic,_e);case"xxxx":return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,_e);case"xxxxx":return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,_e);case"xxx":default:return parseTimezonePattern(timezonePatterns.extended,_e)}}},{key:"set",value:function(_e,et,tt){return et.timestampIsSet?_e:new Date(_e.getTime()-tt)}}]),$}(Parser);function _typeof$2(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$2=function($){return typeof $}:_typeof$2=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$2(a)}function _classCallCheck$1(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$2(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$2(a,_,$){return _&&_defineProperties$2(a.prototype,_),$&&_defineProperties$2(a,$),a}function _inherits$1(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$2(a,_)}function _setPrototypeOf$2(a,_){return _setPrototypeOf$2=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$2(a,_)}function _createSuper$1(a){var _=_isNativeReflectConstruct$1();return function(){var j=_getPrototypeOf$1(a),_e;if(_){var et=_getPrototypeOf$1(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn$1(this,_e)}}function _possibleConstructorReturn$1(a,_){return _&&(_typeof$2(_)==="object"||typeof _=="function")?_:_assertThisInitialized$2(a)}function _assertThisInitialized$2(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct$1(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$1(a){return _getPrototypeOf$1=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf$1(a)}function _defineProperty$1(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var TimestampSecondsParser=function(a){_inherits$1($,a);var _=_createSuper$1($);function $(){var j;_classCallCheck$1(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty$1(_assertThisInitialized$2(j),"priority",40),_defineProperty$1(_assertThisInitialized$2(j),"incompatibleTokens","*"),j}return _createClass$2($,[{key:"parse",value:function(_e){return parseAnyDigitsSigned(_e)}},{key:"set",value:function(_e,et,tt){return[new Date(tt*1e3),{timestampIsSet:!0}]}}]),$}(Parser);function _typeof$1(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$1=function($){return typeof $}:_typeof$1=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof$1(a)}function _classCallCheck(a,_){if(!(a instanceof _))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass$1(a,_,$){return _&&_defineProperties$1(a.prototype,_),$&&_defineProperties$1(a,$),a}function _inherits(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(_&&_.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),_&&_setPrototypeOf$1(a,_)}function _setPrototypeOf$1(a,_){return _setPrototypeOf$1=Object.setPrototypeOf||function(j,_e){return j.__proto__=_e,j},_setPrototypeOf$1(a,_)}function _createSuper(a){var _=_isNativeReflectConstruct();return function(){var j=_getPrototypeOf(a),_e;if(_){var et=_getPrototypeOf(this).constructor;_e=Reflect.construct(j,arguments,et)}else _e=j.apply(this,arguments);return _possibleConstructorReturn(this,_e)}}function _possibleConstructorReturn(a,_){return _&&(_typeof$1(_)==="object"||typeof _=="function")?_:_assertThisInitialized$1(a)}function _assertThisInitialized$1(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _isNativeReflectConstruct(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf(a){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},_getPrototypeOf(a)}function _defineProperty(a,_,$){return _ in a?Object.defineProperty(a,_,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[_]=$,a}var TimestampMillisecondsParser=function(a){_inherits($,a);var _=_createSuper($);function $(){var j;_classCallCheck(this,$);for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=_.call.apply(_,[this].concat(et)),_defineProperty(_assertThisInitialized$1(j),"priority",20),_defineProperty(_assertThisInitialized$1(j),"incompatibleTokens","*"),j}return _createClass$1($,[{key:"parse",value:function(_e){return parseAnyDigitsSigned(_e)}},{key:"set",value:function(_e,et,tt){return[new Date(tt),{timestampIsSet:!0}]}}]),$}(Parser),parsers={G:new EraParser,y:new YearParser,Y:new LocalWeekYearParser,R:new ISOWeekYearParser,u:new ExtendedYearParser,Q:new QuarterParser,q:new StandAloneQuarterParser,M:new MonthParser,L:new StandAloneMonthParser,w:new LocalWeekParser,I:new ISOWeekParser,d:new DateParser,D:new DayOfYearParser,E:new DayParser,e:new LocalDayParser,c:new StandAloneLocalDayParser,i:new ISODayParser,a:new AMPMParser,b:new AMPMMidnightParser,B:new DayPeriodParser,h:new Hour1to12Parser,H:new Hour0to23Parser,K:new Hour0To11Parser,k:new Hour1To24Parser,m:new MinuteParser,s:new SecondParser,S:new FractionOfSecondParser,X:new ISOTimezoneWithZParser,x:new ISOTimezoneParser,t:new TimestampSecondsParser,T:new TimestampMillisecondsParser};function _typeof(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function($){return typeof $}:_typeof=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_typeof(a)}function _createForOfIteratorHelper(a,_){var $;if(typeof Symbol>"u"||a[Symbol.iterator]==null){if(Array.isArray(a)||($=_unsupportedIterableToArray(a))||_&&a&&typeof a.length=="number"){$&&(a=$);var j=0,_e=function(){};return{s:_e,n:function(){return j>=a.length?{done:!0}:{done:!1,value:a[j++]}},e:function(ct){throw ct},f:_e}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
145
145
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var et=!0,tt=!1,rt;return{s:function(){$=a[Symbol.iterator]()},n:function(){var ct=$.next();return et=ct.done,ct},e:function(ct){tt=!0,rt=ct},f:function(){try{!et&&$.return!=null&&$.return()}finally{if(tt)throw rt}}}}function _unsupportedIterableToArray(a,_){if(a){if(typeof a=="string")return _arrayLikeToArray(a,_);var $=Object.prototype.toString.call(a).slice(8,-1);if($==="Object"&&a.constructor&&($=a.constructor.name),$==="Map"||$==="Set")return Array.from(a);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return _arrayLikeToArray(a,_)}}function _arrayLikeToArray(a,_){(_==null||_>a.length)&&(_=a.length);for(var $=0,j=new Array(_);$<_;$++)j[$]=a[$];return j}var formattingTokensRegExp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp=/^'([^]*?)'?$/,doubleQuoteRegExp=/''/g,notWhitespaceRegExp=/\S/,unescapedLatinCharacterRegExp=/[a-zA-Z]/;function parse(a,_,$,j){var _e,et,tt,rt,at,ct,dt,yt,bt,Et,$t,_t,xt,St,Mt,Tt,Rt,Ct;requiredArgs(3,arguments);var It=String(a),kt=String(_),Dt=getDefaultOptions(),Bt=(_e=(et=j==null?void 0:j.locale)!==null&&et!==void 0?et:Dt.locale)!==null&&_e!==void 0?_e:defaultLocale;if(!Bt.match)throw new RangeError("locale must contain match property");var zt=toInteger$2((tt=(rt=(at=(ct=j==null?void 0:j.firstWeekContainsDate)!==null&&ct!==void 0?ct:j==null||(dt=j.locale)===null||dt===void 0||(yt=dt.options)===null||yt===void 0?void 0:yt.firstWeekContainsDate)!==null&&at!==void 0?at:Dt.firstWeekContainsDate)!==null&&rt!==void 0?rt:(bt=Dt.locale)===null||bt===void 0||(Et=bt.options)===null||Et===void 0?void 0:Et.firstWeekContainsDate)!==null&&tt!==void 0?tt:1);if(!(zt>=1&&zt<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var vt=toInteger$2(($t=(_t=(xt=(St=j==null?void 0:j.weekStartsOn)!==null&&St!==void 0?St:j==null||(Mt=j.locale)===null||Mt===void 0||(Tt=Mt.options)===null||Tt===void 0?void 0:Tt.weekStartsOn)!==null&&xt!==void 0?xt:Dt.weekStartsOn)!==null&&_t!==void 0?_t:(Rt=Dt.locale)===null||Rt===void 0||(Ct=Rt.options)===null||Ct===void 0?void 0:Ct.weekStartsOn)!==null&&$t!==void 0?$t:0);if(!(vt>=0&&vt<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(kt==="")return It===""?toDate$1($):new Date(NaN);var nt={firstWeekContainsDate:zt,weekStartsOn:vt,locale:Bt},st=[new DateToSystemTimezoneSetter],lt=kt.match(longFormattingTokensRegExp).map(function(rr){var tr=rr[0];if(tr in longFormatters$1){var Zt=longFormatters$1[tr];return Zt(rr,Bt.formatLong)}return rr}).join("").match(formattingTokensRegExp),ht=[],mt=_createForOfIteratorHelper(lt),wt;try{var At=function(){var tr=wt.value;!(j!=null&&j.useAdditionalWeekYearTokens)&&isProtectedWeekYearToken(tr)&&throwProtectedError(tr,kt,a),!(j!=null&&j.useAdditionalDayOfYearTokens)&&isProtectedDayOfYearToken(tr)&&throwProtectedError(tr,kt,a);var Zt=tr[0],Yt=parsers[Zt];if(Yt){var Wt=Yt.incompatibleTokens;if(Array.isArray(Wt)){var fr=ht.find(function(Sr){return Wt.includes(Sr.token)||Sr.token===Zt});if(fr)throw new RangeError("The format string mustn't contain `".concat(fr.fullToken,"` and `").concat(tr,"` at the same time"))}else if(Yt.incompatibleTokens==="*"&&ht.length>0)throw new RangeError("The format string mustn't contain `".concat(tr,"` and any other token at the same time"));ht.push({token:Zt,fullToken:tr});var jr=Yt.run(It,tr,Bt.match,nt);if(!jr)return{v:new Date(NaN)};st.push(jr.setter),It=jr.rest}else{if(Zt.match(unescapedLatinCharacterRegExp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Zt+"`");if(tr==="''"?tr="'":Zt==="'"&&(tr=cleanEscapedString(tr)),It.indexOf(tr)===0)It=It.slice(tr.length);else return{v:new Date(NaN)}}};for(mt.s();!(wt=mt.n()).done;){var gt=At();if(_typeof(gt)==="object")return gt.v}}catch(rr){mt.e(rr)}finally{mt.f()}if(It.length>0&&notWhitespaceRegExp.test(It))return new Date(NaN);var ot=st.map(function(rr){return rr.priority}).sort(function(rr,tr){return tr-rr}).filter(function(rr,tr,Zt){return Zt.indexOf(rr)===tr}).map(function(rr){return st.filter(function(tr){return tr.priority===rr}).sort(function(tr,Zt){return Zt.subPriority-tr.subPriority})}).map(function(rr){return rr[0]}),pt=toDate$1($);if(isNaN(pt.getTime()))return new Date(NaN);var Pt=subMilliseconds(pt,getTimezoneOffsetInMilliseconds(pt)),Ot={},Nt=_createForOfIteratorHelper(ot),jt;try{for(Nt.s();!(jt=Nt.n()).done;){var Ut=jt.value;if(!Ut.validate(Pt,nt))return new Date(NaN);var Vt=Ut.set(Pt,Ot,nt);Array.isArray(Vt)?(Pt=Vt[0],assign(Ot,Vt[1])):Pt=Vt}}catch(rr){Nt.e(rr)}finally{Nt.f()}return Pt}function cleanEscapedString(a){return a.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp,"'")}function startOfDay$1(a){requiredArgs(1,arguments);var _=toDate$1(a);return _.setHours(0,0,0,0),_}var propTypesExports=requirePropTypes();const PropTypes=getDefaultExportFromCjs$1(propTypesExports);function _extends$2(){return _extends$2=Object.assign||function(a){for(var _=1;_<arguments.length;_++){var $=arguments[_];for(var j in $)Object.prototype.hasOwnProperty.call($,j)&&(a[j]=$[j])}return a},_extends$2.apply(this,arguments)}function _objectWithoutPropertiesLoose$1(a,_){if(a==null)return{};var $={},j=Object.keys(a),_e,et;for(et=0;et<j.length;et++)_e=j[et],!(_.indexOf(_e)>=0)&&($[_e]=a[_e]);return $}function toInteger$1(a){if(a===null||a===!0||a===!1)return NaN;var _=Number(a);return isNaN(_)?_:_<0?Math.ceil(_):Math.floor(_)}function toDate(a){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var _=Object.prototype.toString.call(a);return a instanceof Date||typeof a=="object"&&_==="[object Date]"?new Date(a.getTime()):typeof a=="number"||_==="[object Number]"?new Date(a):((typeof a=="string"||_==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn(new Error().stack)),new Date(NaN))}function addDays(a,_){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var $=toDate(a),j=toInteger$1(_);return $.setDate($.getDate()+j),$}function isBefore(a,_){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var $=toDate(a),j=toDate(_);return $.getTime()<j.getTime()}function startOfDay(a){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var _=toDate(a);return _.setHours(0,0,0,0),_}function isSameDay$1(a,_){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var $=startOfDay(a),j=startOfDay(_);return $.getTime()===j.getTime()}function isToday(a){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return isSameDay$1(a,Date.now())}function differenceInCalendarMonths(a,_){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var $=toDate(a),j=toDate(_),_e=$.getFullYear()-j.getFullYear(),et=$.getMonth()-j.getMonth();return _e*12+et}function composeEventHandlers$1(){for(var a=arguments.length,_=new Array(a),$=0;$<a;$++)_[$]=arguments[$];return function(j){for(var _e=arguments.length,et=new Array(_e>1?_e-1:0),tt=1;tt<_e;tt++)et[tt-1]=arguments[tt];return _.some(function(rt){return rt&&rt.apply(void 0,[j].concat(et)),j.defaultPrevented})}}function requiredProp(a,_){throw new Error('The property "'+_+'" is required in "'+a+'"')}function unwrapChildrenForPreact(a){return a=Array.isArray(a)?a[0]:a,a||noop$1}function noop$1(){}function subtractMonth(a){var _=a.calendars,$=a.offset,j=a.minDate;if($>1&&j){var _e=_[0].firstDayOfMonth,et=differenceInCalendarMonths(_e,j);et<$&&($=et)}return $}function addMonth(a){var _=a.calendars,$=a.offset,j=a.maxDate;if($>1&&j){var _e=_[_.length-1].lastDayOfMonth,et=differenceInCalendarMonths(j,_e);et<$&&($=et)}return $}function isBackDisabled(a){var _=a.calendars,$=a.minDate;if(!$)return!1;var j=_[0].firstDayOfMonth,_e=addDays(j,-1);return!!isBefore(_e,$)}function isForwardDisabled(a){var _=a.calendars,$=a.maxDate;if(!$)return!1;var j=_[_.length-1].lastDayOfMonth,_e=addDays(j,1);return!!isBefore($,_e)}function getCalendars(a){for(var _=a.date,$=a.selected,j=a.monthsToDisplay,_e=a.offset,et=a.minDate,tt=a.maxDate,rt=a.firstDayOfWeek,at=a.showOutsideDays,ct=[],dt=getStartDate(_,et,tt),yt=0;yt<j;yt++){var bt=getMonths({month:dt.getMonth()+yt+_e,year:dt.getFullYear(),selectedDates:$,minDate:et,maxDate:tt,firstDayOfWeek:rt,showOutsideDays:at});ct.push(bt)}return ct}function getStartDate(a,_,$){var j=startOfDay(a);if(_){var _e=startOfDay(_);isBefore(j,_e)&&(j=_e)}if($){var et=startOfDay($);isBefore(et,j)&&(j=et)}return j}function getMonths(a){var _=a.month,$=a.year,j=a.selectedDates,_e=a.minDate,et=a.maxDate,tt=a.firstDayOfWeek,rt=a.showOutsideDays,at=getNumDaysMonthYear(_,$),ct=at.daysInMonth;_=at.month,$=at.year;for(var dt=[],yt=1;yt<=ct;yt++){var bt=new Date($,_,yt),Et={date:bt,selected:isSelected(j,bt),selectable:isSelectable$1(_e,et,bt),today:isToday(bt),prevMonth:!1,nextMonth:!1};dt.push(Et)}var $t=new Date($,_,1),_t=new Date($,_,ct),xt=fillFrontWeek({firstDayOfMonth:$t,minDate:_e,maxDate:et,selectedDates:j,firstDayOfWeek:tt,showOutsideDays:rt}),St=fillBackWeek({lastDayOfMonth:_t,minDate:_e,maxDate:et,selectedDates:j,firstDayOfWeek:tt,showOutsideDays:rt});dt.unshift.apply(dt,xt),dt.push.apply(dt,St);var Mt=getWeeks(dt);return{firstDayOfMonth:$t,lastDayOfMonth:_t,month:_,year:$,weeks:Mt}}function fillFrontWeek(a){var _=a.firstDayOfMonth,$=a.minDate,j=a.maxDate,_e=a.selectedDates,et=a.firstDayOfWeek,tt=a.showOutsideDays,rt=[],at=(_.getDay()+7-et)%7;if(tt)for(var ct=addDays(_,-1),dt=ct.getDate(),yt=ct.getMonth(),bt=ct.getFullYear(),Et=0;Et<at;){var $t=new Date(bt,yt,dt-Et),_t={date:$t,selected:isSelected(_e,$t),selectable:isSelectable$1($,j,$t),today:!1,prevMonth:!0,nextMonth:!1};rt.unshift(_t),Et++}else for(;at>0;)rt.unshift(""),at--;return rt}function fillBackWeek(a){var _=a.lastDayOfMonth,$=a.minDate,j=a.maxDate,_e=a.selectedDates,et=a.firstDayOfWeek,tt=a.showOutsideDays,rt=[],at=(_.getDay()+7-et)%7;if(tt)for(var ct=addDays(_,1),dt=ct.getMonth(),yt=ct.getFullYear(),bt=0;bt<6-at;){var Et=new Date(yt,dt,1+bt),$t={date:Et,selected:isSelected(_e,Et),selectable:isSelectable$1($,j,Et),today:!1,prevMonth:!1,nextMonth:!0};rt.push($t),bt++}else for(;at<6;)rt.push(""),at++;return rt}function getNumDaysMonthYear(a,_){var $=new Date(_,a,1);a=$.getMonth(),_=$.getFullYear();var j=32-new Date(_,a,32).getDate();return{daysInMonth:j,month:a,year:_}}function getWeeks(a){for(var _=Math.ceil(a.length/7),$=[],j=0;j<_;j++){$[j]=[];for(var _e=0;_e<7;_e++)$[j].push(a[j*7+_e])}return $}function isSelected(a,_){return a=Array.isArray(a)?a:[a],a.some(function($){return $ instanceof Date&&startOfDay($).getTime()===startOfDay(_).getTime()})}function isSelectable$1(a,_,$){return!(a&&isBefore($,a)||_&&isBefore(_,$))}function isOffsetControlled(a){return a!==void 0}function getOffset(a,_){return isOffsetControlled(a)?a:_}function getDateProps(a,_){var $=_===void 0?{}:_,j=$.onClick,_e=$.dateObj,et=_e===void 0?requiredProp("getDateProps","dateObj"):_e,tt=_objectWithoutPropertiesLoose$1($,["onClick","dateObj"]);return _extends$2({onClick:composeEventHandlers$1(j,function(rt){a(et,rt)}),disabled:!et.selectable,"aria-label":et.date.toDateString(),"aria-pressed":et.selected,role:"button"},tt)}function getBackProps(a,_){var $=a.minDate,j=a.offsetMonth,_e=a.handleOffsetChanged,et=_===void 0?{}:_,tt=et.onClick,rt=et.offset,at=rt===void 0?1:rt,ct=et.calendars,dt=ct===void 0?requiredProp("getBackProps","calendars"):ct,yt=_objectWithoutPropertiesLoose$1(et,["onClick","offset","calendars"]);return _extends$2({onClick:composeEventHandlers$1(tt,function(){_e(j-subtractMonth({calendars:dt,offset:at,minDate:$}))}),disabled:isBackDisabled({calendars:dt,offset:at,minDate:$}),"aria-label":"Go back "+at+" month"+(at===1?"":"s")},yt)}function getForwardProps(a,_){var $=a.maxDate,j=a.offsetMonth,_e=a.handleOffsetChanged,et=_===void 0?{}:_,tt=et.onClick,rt=et.offset,at=rt===void 0?1:rt,ct=et.calendars,dt=ct===void 0?requiredProp("getForwardProps","calendars"):ct,yt=_objectWithoutPropertiesLoose$1(et,["onClick","offset","calendars"]);return _extends$2({onClick:composeEventHandlers$1(tt,function(){_e(j+addMonth({calendars:dt,offset:at,maxDate:$}))}),disabled:isForwardDisabled({calendars:dt,offset:at,maxDate:$}),"aria-label":"Go forward "+at+" month"+(at===1?"":"s")},yt)}function useDayzed(a){var _=a.date,$=_===void 0?new Date:_,j=a.maxDate,_e=a.minDate,et=a.monthsToDisplay,tt=et===void 0?1:et,rt=a.firstDayOfWeek,at=rt===void 0?0:rt,ct=a.showOutsideDays,dt=ct===void 0?!1:ct,yt=a.offset,bt=a.onDateSelected,Et=a.onOffsetChanged,$t=Et===void 0?function(){}:Et,_t=a.selected,xt=reactExports.useState(0),St=xt[0],Mt=xt[1],Tt=getOffset(yt,St);function Rt(It){isOffsetControlled(yt)||Mt(It),$t(It)}var Ct=getCalendars({date:$,selected:_t,monthsToDisplay:tt,minDate:_e,maxDate:j,offset:Tt,firstDayOfWeek:at,showOutsideDays:dt});return{calendars:Ct,getDateProps:getDateProps.bind(null,bt),getBackProps:getBackProps.bind(null,{minDate:_e,offsetMonth:Tt,handleOffsetChanged:Rt}),getForwardProps:getForwardProps.bind(null,{maxDate:j,offsetMonth:Tt,handleOffsetChanged:Rt})}}function Dayzed(a){var _=useDayzed(a),$=unwrapChildrenForPreact(a.render||a.children);return $(_)}Dayzed.defaultProps={date:new Date,monthsToDisplay:1,onOffsetChanged:function a(){},firstDayOfWeek:0,showOutsideDays:!1};Dayzed.propTypes={render:PropTypes.func,children:PropTypes.func,date:PropTypes.instanceOf(Date),maxDate:PropTypes.instanceOf(Date),minDate:PropTypes.instanceOf(Date),monthsToDisplay:PropTypes.number,firstDayOfWeek:PropTypes.number,showOutsideDays:PropTypes.bool,offset:PropTypes.number,onDateSelected:PropTypes.func.isRequired,onOffsetChanged:PropTypes.func,selected:PropTypes.oneOfType([PropTypes.arrayOf(Date),PropTypes.instanceOf(Date)])};function compareAsc(a,_){requiredArgs(2,arguments);var $=toDate$1(a),j=toDate$1(_),_e=$.getTime()-j.getTime();return _e<0?-1:_e>0?1:_e}function isSameDay(a,_){requiredArgs(2,arguments);var $=startOfDay$1(a),j=startOfDay$1(_);return $.getTime()===j.getTime()}function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(a){for(var _=1;_<arguments.length;_++){var $=arguments[_];for(var j in $)Object.prototype.hasOwnProperty.call($,j)&&(a[j]=$[j])}return a},_extends$1.apply(this,arguments)}var isArray=Array.isArray;const isArray$1=isArray;var freeGlobal=typeof global$1=="object"&&global$1&&global$1.Object===Object&&global$1;const freeGlobal$1=freeGlobal;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root=freeGlobal$1||freeSelf||Function("return this")();const root$1=root;var Symbol$1=root$1.Symbol;const Symbol$2=Symbol$1;var objectProto$e=Object.prototype,hasOwnProperty$b=objectProto$e.hasOwnProperty,nativeObjectToString$1=objectProto$e.toString,symToStringTag$1=Symbol$2?Symbol$2.toStringTag:void 0;function getRawTag(a){var _=hasOwnProperty$b.call(a,symToStringTag$1),$=a[symToStringTag$1];try{a[symToStringTag$1]=void 0;var j=!0}catch{}var _e=nativeObjectToString$1.call(a);return j&&(_?a[symToStringTag$1]=$:delete a[symToStringTag$1]),_e}var objectProto$d=Object.prototype,nativeObjectToString=objectProto$d.toString;function objectToString(a){return nativeObjectToString.call(a)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$2?Symbol$2.toStringTag:void 0;function baseGetTag(a){return a==null?a===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(a)?getRawTag(a):objectToString(a)}function isObjectLike(a){return a!=null&&typeof a=="object"}var symbolTag$1="[object Symbol]";function isSymbol(a){return typeof a=="symbol"||isObjectLike(a)&&baseGetTag(a)==symbolTag$1}var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(a,_){if(isArray$1(a))return!1;var $=typeof a;return $=="number"||$=="symbol"||$=="boolean"||a==null||isSymbol(a)?!0:reIsPlainProp.test(a)||!reIsDeepProp.test(a)||_!=null&&a in Object(_)}function isObject(a){var _=typeof a;return a!=null&&(_=="object"||_=="function")}var asyncTag="[object AsyncFunction]",funcTag$1="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(a){if(!isObject(a))return!1;var _=baseGetTag(a);return _==funcTag$1||_==genTag||_==asyncTag||_==proxyTag}var coreJsData=root$1["__core-js_shared__"];const coreJsData$1=coreJsData;var maskSrcKey=function(){var a=/[^.]+$/.exec(coreJsData$1&&coreJsData$1.keys&&coreJsData$1.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}();function isMasked(a){return!!maskSrcKey&&maskSrcKey in a}var funcProto$2=Function.prototype,funcToString$2=funcProto$2.toString;function toSource(a){if(a!=null){try{return funcToString$2.call(a)}catch{}try{return a+""}catch{}}return""}var reRegExpChar$1=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto$1=Function.prototype,objectProto$c=Object.prototype,funcToString$1=funcProto$1.toString,hasOwnProperty$a=objectProto$c.hasOwnProperty,reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$a).replace(reRegExpChar$1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(a){if(!isObject(a)||isMasked(a))return!1;var _=isFunction(a)?reIsNative:reIsHostCtor;return _.test(toSource(a))}function getValue(a,_){return a==null?void 0:a[_]}function getNative(a,_){var $=getValue(a,_);return baseIsNative($)?$:void 0}var nativeCreate=getNative(Object,"create");const nativeCreate$1=nativeCreate;function hashClear(){this.__data__=nativeCreate$1?nativeCreate$1(null):{},this.size=0}function hashDelete(a){var _=this.has(a)&&delete this.__data__[a];return this.size-=_?1:0,_}var HASH_UNDEFINED$2="__lodash_hash_undefined__",objectProto$b=Object.prototype,hasOwnProperty$9=objectProto$b.hasOwnProperty;function hashGet(a){var _=this.__data__;if(nativeCreate$1){var $=_[a];return $===HASH_UNDEFINED$2?void 0:$}return hasOwnProperty$9.call(_,a)?_[a]:void 0}var objectProto$a=Object.prototype,hasOwnProperty$8=objectProto$a.hasOwnProperty;function hashHas(a){var _=this.__data__;return nativeCreate$1?_[a]!==void 0:hasOwnProperty$8.call(_,a)}var HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet(a,_){var $=this.__data__;return this.size+=this.has(a)?0:1,$[a]=nativeCreate$1&&_===void 0?HASH_UNDEFINED$1:_,this}function Hash(a){var _=-1,$=a==null?0:a.length;for(this.clear();++_<$;){var j=a[_];this.set(j[0],j[1])}}Hash.prototype.clear=hashClear;Hash.prototype.delete=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;function listCacheClear(){this.__data__=[],this.size=0}function eq(a,_){return a===_||a!==a&&_!==_}function assocIndexOf(a,_){for(var $=a.length;$--;)if(eq(a[$][0],_))return $;return-1}var arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(a){var _=this.__data__,$=assocIndexOf(_,a);if($<0)return!1;var j=_.length-1;return $==j?_.pop():splice.call(_,$,1),--this.size,!0}function listCacheGet(a){var _=this.__data__,$=assocIndexOf(_,a);return $<0?void 0:_[$][1]}function listCacheHas(a){return assocIndexOf(this.__data__,a)>-1}function listCacheSet(a,_){var $=this.__data__,j=assocIndexOf($,a);return j<0?(++this.size,$.push([a,_])):$[j][1]=_,this}function ListCache(a){var _=-1,$=a==null?0:a.length;for(this.clear();++_<$;){var j=a[_];this.set(j[0],j[1])}}ListCache.prototype.clear=listCacheClear;ListCache.prototype.delete=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;var Map$1=getNative(root$1,"Map");const Map$2=Map$1;function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map$2||ListCache),string:new Hash}}function isKeyable(a){var _=typeof a;return _=="string"||_=="number"||_=="symbol"||_=="boolean"?a!=="__proto__":a===null}function getMapData(a,_){var $=a.__data__;return isKeyable(_)?$[typeof _=="string"?"string":"hash"]:$.map}function mapCacheDelete(a){var _=getMapData(this,a).delete(a);return this.size-=_?1:0,_}function mapCacheGet(a){return getMapData(this,a).get(a)}function mapCacheHas(a){return getMapData(this,a).has(a)}function mapCacheSet(a,_){var $=getMapData(this,a),j=$.size;return $.set(a,_),this.size+=$.size==j?0:1,this}function MapCache(a){var _=-1,$=a==null?0:a.length;for(this.clear();++_<$;){var j=a[_];this.set(j[0],j[1])}}MapCache.prototype.clear=mapCacheClear;MapCache.prototype.delete=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;var FUNC_ERROR_TEXT="Expected a function";function memoize(a,_){if(typeof a!="function"||_!=null&&typeof _!="function")throw new TypeError(FUNC_ERROR_TEXT);var $=function(){var j=arguments,_e=_?_.apply(this,j):j[0],et=$.cache;if(et.has(_e))return et.get(_e);var tt=a.apply(this,j);return $.cache=et.set(_e,tt)||et,tt};return $.cache=new(memoize.Cache||MapCache),$}memoize.Cache=MapCache;var MAX_MEMOIZE_SIZE=500;function memoizeCapped(a){var _=memoize(a,function(j){return $.size===MAX_MEMOIZE_SIZE&&$.clear(),j}),$=_.cache;return _}var rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=memoizeCapped(function(a){var _=[];return a.charCodeAt(0)===46&&_.push(""),a.replace(rePropName,function($,j,_e,et){_.push(_e?et.replace(reEscapeChar,"$1"):j||$)}),_});const stringToPath$1=stringToPath;function arrayMap(a,_){for(var $=-1,j=a==null?0:a.length,_e=Array(j);++$<j;)_e[$]=_(a[$],$,a);return _e}var INFINITY$3=1/0,symbolProto$1=Symbol$2?Symbol$2.prototype:void 0,symbolToString=symbolProto$1?symbolProto$1.toString:void 0;function baseToString(a){if(typeof a=="string")return a;if(isArray$1(a))return arrayMap(a,baseToString)+"";if(isSymbol(a))return symbolToString?symbolToString.call(a):"";var _=a+"";return _=="0"&&1/a==-INFINITY$3?"-0":_}function toString(a){return a==null?"":baseToString(a)}function castPath(a,_){return isArray$1(a)?a:isKey(a,_)?[a]:stringToPath$1(toString(a))}var argsTag$2="[object Arguments]";function baseIsArguments(a){return isObjectLike(a)&&baseGetTag(a)==argsTag$2}var objectProto$9=Object.prototype,hasOwnProperty$7=objectProto$9.hasOwnProperty,propertyIsEnumerable$1=objectProto$9.propertyIsEnumerable,isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(a){return isObjectLike(a)&&hasOwnProperty$7.call(a,"callee")&&!propertyIsEnumerable$1.call(a,"callee")};const isArguments$1=isArguments;var MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(a,_){var $=typeof a;return _=_??MAX_SAFE_INTEGER$1,!!_&&($=="number"||$!="symbol"&&reIsUint.test(a))&&a>-1&&a%1==0&&a<_}var MAX_SAFE_INTEGER=9007199254740991;function isLength(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=MAX_SAFE_INTEGER}var INFINITY$2=1/0;function toKey(a){if(typeof a=="string"||isSymbol(a))return a;var _=a+"";return _=="0"&&1/a==-INFINITY$2?"-0":_}function hasPath(a,_,$){_=castPath(_,a);for(var j=-1,_e=_.length,et=!1;++j<_e;){var tt=toKey(_[j]);if(!(et=a!=null&&$(a,tt)))break;a=a[tt]}return et||++j!=_e?et:(_e=a==null?0:a.length,!!_e&&isLength(_e)&&isIndex(tt,_e)&&(isArray$1(a)||isArguments$1(a)))}function apply(a,_,$){switch($.length){case 0:return a.call(_);case 1:return a.call(_,$[0]);case 2:return a.call(_,$[0],$[1]);case 3:return a.call(_,$[0],$[1],$[2])}return a.apply(_,$)}function last(a){var _=a==null?0:a.length;return _?a[_-1]:void 0}function baseGet(a,_){_=castPath(_,a);for(var $=0,j=_.length;a!=null&&$<j;)a=a[toKey(_[$++])];return $&&$==j?a:void 0}function baseSlice(a,_,$){var j=-1,_e=a.length;_<0&&(_=-_>_e?0:_e+_),$=$>_e?_e:$,$<0&&($+=_e),_e=_>$?0:$-_>>>0,_>>>=0;for(var et=Array(_e);++j<_e;)et[j]=a[j+_];return et}function parent(a,_){return _.length<2?a:baseGet(a,baseSlice(_,0,-1))}function baseInvoke(a,_,$){_=castPath(_,a),a=parent(a,_);var j=a==null?a:a[toKey(last(_))];return j==null?void 0:apply(j,a,$)}function identity(a){return a}var nativeMax$3=Math.max;function overRest(a,_,$){return _=nativeMax$3(_===void 0?a.length-1:_,0),function(){for(var j=arguments,_e=-1,et=nativeMax$3(j.length-_,0),tt=Array(et);++_e<et;)tt[_e]=j[_+_e];_e=-1;for(var rt=Array(_+1);++_e<_;)rt[_e]=j[_e];return rt[_]=$(tt),apply(a,this,rt)}}function constant(a){return function(){return a}}var defineProperty=function(){try{var a=getNative(Object,"defineProperty");return a({},"",{}),a}catch{}}();const defineProperty$1=defineProperty;var baseSetToString=defineProperty$1?function(a,_){return defineProperty$1(a,"toString",{configurable:!0,enumerable:!1,value:constant(_),writable:!0})}:identity;const baseSetToString$1=baseSetToString;var HOT_COUNT=800,HOT_SPAN=16,nativeNow=Date.now;function shortOut(a){var _=0,$=0;return function(){var j=nativeNow(),_e=HOT_SPAN-(j-$);if($=j,_e>0){if(++_>=HOT_COUNT)return arguments[0]}else _=0;return a.apply(void 0,arguments)}}var setToString=shortOut(baseSetToString$1);const setToString$1=setToString;function baseRest(a,_){return setToString$1(overRest(a,_,identity),a+"")}var invoke=baseRest(baseInvoke);const _invoke=invoke;function _assertThisInitialized(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function isUndefined(a){return a===void 0}var reWhitespace=/\s/;function trimmedEndIndex(a){for(var _=a.length;_--&&reWhitespace.test(a.charAt(_)););return _}var reTrimStart=/^\s+/;function baseTrim(a){return a&&a.slice(0,trimmedEndIndex(a)+1).replace(reTrimStart,"")}var NAN=0/0,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber(a){if(typeof a=="number")return a;if(isSymbol(a))return NAN;if(isObject(a)){var _=typeof a.valueOf=="function"?a.valueOf():a;a=isObject(_)?_+"":_}if(typeof a!="string")return a===0?a:+a;a=baseTrim(a);var $=reIsBinary.test(a);return $||reIsOctal.test(a)?freeParseInt(a.slice(2),$?2:8):reIsBadHex.test(a)?NAN:+a}var INFINITY$1=1/0,MAX_INTEGER=17976931348623157e292;function toFinite(a){if(!a)return a===0?a:0;if(a=toNumber(a),a===INFINITY$1||a===-INFINITY$1){var _=a<0?-1:1;return _*MAX_INTEGER}return a===a?a:0}function toInteger(a){var _=toFinite(a),$=_%1;return _===_?$?_-$:_:0}function arrayFilter(a,_){for(var $=-1,j=a==null?0:a.length,_e=0,et=[];++$<j;){var tt=a[$];_(tt,$,a)&&(et[_e++]=tt)}return et}function createBaseFor(a){return function(_,$,j){for(var _e=-1,et=Object(_),tt=j(_),rt=tt.length;rt--;){var at=tt[a?rt:++_e];if($(et[at],at,et)===!1)break}return _}}var baseFor=createBaseFor();const baseFor$1=baseFor;function baseTimes(a,_){for(var $=-1,j=Array(a);++$<a;)j[$]=_($);return j}function stubFalse(){return!1}var freeExports$1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$1=freeExports$1&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$1=freeModule$1&&freeModule$1.exports===freeExports$1,Buffer=moduleExports$1?root$1.Buffer:void 0,nativeIsBuffer=Buffer?Buffer.isBuffer:void 0,isBuffer=nativeIsBuffer||stubFalse;const isBuffer$1=isBuffer;var argsTag$1="[object Arguments]",arrayTag$1="[object Array]",boolTag$2="[object Boolean]",dateTag$1="[object Date]",errorTag$1="[object Error]",funcTag="[object Function]",mapTag$4="[object Map]",numberTag$2="[object Number]",objectTag$3="[object Object]",regexpTag$1="[object RegExp]",setTag$4="[object Set]",stringTag$2="[object String]",weakMapTag$1="[object WeakMap]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$2="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0;typedArrayTags[argsTag$1]=typedArrayTags[arrayTag$1]=typedArrayTags[arrayBufferTag$1]=typedArrayTags[boolTag$2]=typedArrayTags[dataViewTag$2]=typedArrayTags[dateTag$1]=typedArrayTags[errorTag$1]=typedArrayTags[funcTag]=typedArrayTags[mapTag$4]=typedArrayTags[numberTag$2]=typedArrayTags[objectTag$3]=typedArrayTags[regexpTag$1]=typedArrayTags[setTag$4]=typedArrayTags[stringTag$2]=typedArrayTags[weakMapTag$1]=!1;function baseIsTypedArray(a){return isObjectLike(a)&&isLength(a.length)&&!!typedArrayTags[baseGetTag(a)]}function baseUnary(a){return function(_){return a(_)}}var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,freeProcess=moduleExports&&freeGlobal$1.process,nodeUtil=function(){try{var a=freeModule&&freeModule.require&&freeModule.require("util").types;return a||freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch{}}();const nodeUtil$1=nodeUtil;var nodeIsTypedArray=nodeUtil$1&&nodeUtil$1.isTypedArray,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;const isTypedArray$1=isTypedArray;var objectProto$8=Object.prototype,hasOwnProperty$6=objectProto$8.hasOwnProperty;function arrayLikeKeys(a,_){var $=isArray$1(a),j=!$&&isArguments$1(a),_e=!$&&!j&&isBuffer$1(a),et=!$&&!j&&!_e&&isTypedArray$1(a),tt=$||j||_e||et,rt=tt?baseTimes(a.length,String):[],at=rt.length;for(var ct in a)(_||hasOwnProperty$6.call(a,ct))&&!(tt&&(ct=="length"||_e&&(ct=="offset"||ct=="parent")||et&&(ct=="buffer"||ct=="byteLength"||ct=="byteOffset")||isIndex(ct,at)))&&rt.push(ct);return rt}var objectProto$7=Object.prototype;function isPrototype(a){var _=a&&a.constructor,$=typeof _=="function"&&_.prototype||objectProto$7;return a===$}function overArg(a,_){return function($){return a(_($))}}var nativeKeys=overArg(Object.keys,Object);const nativeKeys$1=nativeKeys;var objectProto$6=Object.prototype,hasOwnProperty$5=objectProto$6.hasOwnProperty;function baseKeys(a){if(!isPrototype(a))return nativeKeys$1(a);var _=[];for(var $ in Object(a))hasOwnProperty$5.call(a,$)&&$!="constructor"&&_.push($);return _}function isArrayLike(a){return a!=null&&isLength(a.length)&&!isFunction(a)}function keys$1(a){return isArrayLike(a)?arrayLikeKeys(a):baseKeys(a)}function baseForOwn(a,_){return a&&baseFor$1(a,_,keys$1)}function createBaseEach(a,_){return function($,j){if($==null)return $;if(!isArrayLike($))return a($,j);for(var _e=$.length,et=_?_e:-1,tt=Object($);(_?et--:++et<_e)&&j(tt[et],et,tt)!==!1;);return $}}var baseEach=createBaseEach(baseForOwn);const baseEach$1=baseEach;function baseFilter(a,_){var $=[];return baseEach$1(a,function(j,_e,et){_(j,_e,et)&&$.push(j)}),$}function stackClear(){this.__data__=new ListCache,this.size=0}function stackDelete(a){var _=this.__data__,$=_.delete(a);return this.size=_.size,$}function stackGet(a){return this.__data__.get(a)}function stackHas(a){return this.__data__.has(a)}var LARGE_ARRAY_SIZE$2=200;function stackSet(a,_){var $=this.__data__;if($ instanceof ListCache){var j=$.__data__;if(!Map$2||j.length<LARGE_ARRAY_SIZE$2-1)return j.push([a,_]),this.size=++$.size,this;$=this.__data__=new MapCache(j)}return $.set(a,_),this.size=$.size,this}function Stack(a){var _=this.__data__=new ListCache(a);this.size=_.size}Stack.prototype.clear=stackClear;Stack.prototype.delete=stackDelete;Stack.prototype.get=stackGet;Stack.prototype.has=stackHas;Stack.prototype.set=stackSet;var HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd(a){return this.__data__.set(a,HASH_UNDEFINED),this}function setCacheHas(a){return this.__data__.has(a)}function SetCache(a){var _=-1,$=a==null?0:a.length;for(this.__data__=new MapCache;++_<$;)this.add(a[_])}SetCache.prototype.add=SetCache.prototype.push=setCacheAdd;SetCache.prototype.has=setCacheHas;function arraySome(a,_){for(var $=-1,j=a==null?0:a.length;++$<j;)if(_(a[$],$,a))return!0;return!1}function cacheHas(a,_){return a.has(_)}var COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function equalArrays(a,_,$,j,_e,et){var tt=$&COMPARE_PARTIAL_FLAG$5,rt=a.length,at=_.length;if(rt!=at&&!(tt&&at>rt))return!1;var ct=et.get(a),dt=et.get(_);if(ct&&dt)return ct==_&&dt==a;var yt=-1,bt=!0,Et=$&COMPARE_UNORDERED_FLAG$3?new SetCache:void 0;for(et.set(a,_),et.set(_,a);++yt<rt;){var $t=a[yt],_t=_[yt];if(j)var xt=tt?j(_t,$t,yt,_,a,et):j($t,_t,yt,a,_,et);if(xt!==void 0){if(xt)continue;bt=!1;break}if(Et){if(!arraySome(_,function(St,Mt){if(!cacheHas(Et,Mt)&&($t===St||_e($t,St,$,j,et)))return Et.push(Mt)})){bt=!1;break}}else if(!($t===_t||_e($t,_t,$,j,et))){bt=!1;break}}return et.delete(a),et.delete(_),bt}var Uint8Array$1=root$1.Uint8Array;const Uint8Array$2=Uint8Array$1;function mapToArray(a){var _=-1,$=Array(a.size);return a.forEach(function(j,_e){$[++_]=[_e,j]}),$}function setToArray(a){var _=-1,$=Array(a.size);return a.forEach(function(j){$[++_]=j}),$}var COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2,boolTag$1="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",mapTag$3="[object Map]",numberTag$1="[object Number]",regexpTag="[object RegExp]",setTag$3="[object Set]",stringTag$1="[object String]",symbolTag="[object Symbol]",arrayBufferTag="[object ArrayBuffer]",dataViewTag$1="[object DataView]",symbolProto=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function equalByTag(a,_,$,j,_e,et,tt){switch($){case dataViewTag$1:if(a.byteLength!=_.byteLength||a.byteOffset!=_.byteOffset)return!1;a=a.buffer,_=_.buffer;case arrayBufferTag:return!(a.byteLength!=_.byteLength||!et(new Uint8Array$2(a),new Uint8Array$2(_)));case boolTag$1:case dateTag:case numberTag$1:return eq(+a,+_);case errorTag:return a.name==_.name&&a.message==_.message;case regexpTag:case stringTag$1:return a==_+"";case mapTag$3:var rt=mapToArray;case setTag$3:var at=j&COMPARE_PARTIAL_FLAG$4;if(rt||(rt=setToArray),a.size!=_.size&&!at)return!1;var ct=tt.get(a);if(ct)return ct==_;j|=COMPARE_UNORDERED_FLAG$2,tt.set(a,_);var dt=equalArrays(rt(a),rt(_),j,_e,et,tt);return tt.delete(a),dt;case symbolTag:if(symbolValueOf)return symbolValueOf.call(a)==symbolValueOf.call(_)}return!1}function arrayPush(a,_){for(var $=-1,j=_.length,_e=a.length;++$<j;)a[_e+$]=_[$];return a}function baseGetAllKeys(a,_,$){var j=_(a);return isArray$1(a)?j:arrayPush(j,$(a))}function stubArray(){return[]}var objectProto$5=Object.prototype,propertyIsEnumerable=objectProto$5.propertyIsEnumerable,nativeGetSymbols=Object.getOwnPropertySymbols,getSymbols=nativeGetSymbols?function(a){return a==null?[]:(a=Object(a),arrayFilter(nativeGetSymbols(a),function(_){return propertyIsEnumerable.call(a,_)}))}:stubArray;const getSymbols$1=getSymbols;function getAllKeys(a){return baseGetAllKeys(a,keys$1,getSymbols$1)}var COMPARE_PARTIAL_FLAG$3=1,objectProto$4=Object.prototype,hasOwnProperty$4=objectProto$4.hasOwnProperty;function equalObjects(a,_,$,j,_e,et){var tt=$&COMPARE_PARTIAL_FLAG$3,rt=getAllKeys(a),at=rt.length,ct=getAllKeys(_),dt=ct.length;if(at!=dt&&!tt)return!1;for(var yt=at;yt--;){var bt=rt[yt];if(!(tt?bt in _:hasOwnProperty$4.call(_,bt)))return!1}var Et=et.get(a),$t=et.get(_);if(Et&&$t)return Et==_&&$t==a;var _t=!0;et.set(a,_),et.set(_,a);for(var xt=tt;++yt<at;){bt=rt[yt];var St=a[bt],Mt=_[bt];if(j)var Tt=tt?j(Mt,St,bt,_,a,et):j(St,Mt,bt,a,_,et);if(!(Tt===void 0?St===Mt||_e(St,Mt,$,j,et):Tt)){_t=!1;break}xt||(xt=bt=="constructor")}if(_t&&!xt){var Rt=a.constructor,Ct=_.constructor;Rt!=Ct&&"constructor"in a&&"constructor"in _&&!(typeof Rt=="function"&&Rt instanceof Rt&&typeof Ct=="function"&&Ct instanceof Ct)&&(_t=!1)}return et.delete(a),et.delete(_),_t}var DataView$1=getNative(root$1,"DataView");const DataView$2=DataView$1;var Promise$1=getNative(root$1,"Promise");const Promise$2=Promise$1;var Set$1=getNative(root$1,"Set");const Set$2=Set$1;var WeakMap$1=getNative(root$1,"WeakMap");const WeakMap$2=WeakMap$1;var mapTag$2="[object Map]",objectTag$2="[object Object]",promiseTag="[object Promise]",setTag$2="[object Set]",weakMapTag="[object WeakMap]",dataViewTag="[object DataView]",dataViewCtorString=toSource(DataView$2),mapCtorString=toSource(Map$2),promiseCtorString=toSource(Promise$2),setCtorString=toSource(Set$2),weakMapCtorString=toSource(WeakMap$2),getTag=baseGetTag;(DataView$2&&getTag(new DataView$2(new ArrayBuffer(1)))!=dataViewTag||Map$2&&getTag(new Map$2)!=mapTag$2||Promise$2&&getTag(Promise$2.resolve())!=promiseTag||Set$2&&getTag(new Set$2)!=setTag$2||WeakMap$2&&getTag(new WeakMap$2)!=weakMapTag)&&(getTag=function(a){var _=baseGetTag(a),$=_==objectTag$2?a.constructor:void 0,j=$?toSource($):"";if(j)switch(j){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag$2;case promiseCtorString:return promiseTag;case setCtorString:return setTag$2;case weakMapCtorString:return weakMapTag}return _});const getTag$1=getTag;var COMPARE_PARTIAL_FLAG$2=1,argsTag="[object Arguments]",arrayTag="[object Array]",objectTag$1="[object Object]",objectProto$3=Object.prototype,hasOwnProperty$3=objectProto$3.hasOwnProperty;function baseIsEqualDeep(a,_,$,j,_e,et){var tt=isArray$1(a),rt=isArray$1(_),at=tt?arrayTag:getTag$1(a),ct=rt?arrayTag:getTag$1(_);at=at==argsTag?objectTag$1:at,ct=ct==argsTag?objectTag$1:ct;var dt=at==objectTag$1,yt=ct==objectTag$1,bt=at==ct;if(bt&&isBuffer$1(a)){if(!isBuffer$1(_))return!1;tt=!0,dt=!1}if(bt&&!dt)return et||(et=new Stack),tt||isTypedArray$1(a)?equalArrays(a,_,$,j,_e,et):equalByTag(a,_,at,$,j,_e,et);if(!($&COMPARE_PARTIAL_FLAG$2)){var Et=dt&&hasOwnProperty$3.call(a,"__wrapped__"),$t=yt&&hasOwnProperty$3.call(_,"__wrapped__");if(Et||$t){var _t=Et?a.value():a,xt=$t?_.value():_;return et||(et=new Stack),_e(_t,xt,$,j,et)}}return bt?(et||(et=new Stack),equalObjects(a,_,$,j,_e,et)):!1}function baseIsEqual(a,_,$,j,_e){return a===_?!0:a==null||_==null||!isObjectLike(a)&&!isObjectLike(_)?a!==a&&_!==_:baseIsEqualDeep(a,_,$,j,baseIsEqual,_e)}var COMPARE_PARTIAL_FLAG$1=1,COMPARE_UNORDERED_FLAG$1=2;function baseIsMatch(a,_,$,j){var _e=$.length,et=_e,tt=!j;if(a==null)return!et;for(a=Object(a);_e--;){var rt=$[_e];if(tt&&rt[2]?rt[1]!==a[rt[0]]:!(rt[0]in a))return!1}for(;++_e<et;){rt=$[_e];var at=rt[0],ct=a[at],dt=rt[1];if(tt&&rt[2]){if(ct===void 0&&!(at in a))return!1}else{var yt=new Stack;if(j)var bt=j(ct,dt,at,a,_,yt);if(!(bt===void 0?baseIsEqual(dt,ct,COMPARE_PARTIAL_FLAG$1|COMPARE_UNORDERED_FLAG$1,j,yt):bt))return!1}}return!0}function isStrictComparable(a){return a===a&&!isObject(a)}function getMatchData(a){for(var _=keys$1(a),$=_.length;$--;){var j=_[$],_e=a[j];_[$]=[j,_e,isStrictComparable(_e)]}return _}function matchesStrictComparable(a,_){return function($){return $==null?!1:$[a]===_&&(_!==void 0||a in Object($))}}function baseMatches(a){var _=getMatchData(a);return _.length==1&&_[0][2]?matchesStrictComparable(_[0][0],_[0][1]):function($){return $===a||baseIsMatch($,a,_)}}function get(a,_,$){var j=a==null?void 0:baseGet(a,_);return j===void 0?$:j}function baseHasIn(a,_){return a!=null&&_ in Object(a)}function hasIn(a,_){return a!=null&&hasPath(a,_,baseHasIn)}var COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function baseMatchesProperty(a,_){return isKey(a)&&isStrictComparable(_)?matchesStrictComparable(toKey(a),_):function($){var j=get($,a);return j===void 0&&j===_?hasIn($,a):baseIsEqual(_,j,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}function baseProperty(a){return function(_){return _==null?void 0:_[a]}}function basePropertyDeep(a){return function(_){return baseGet(_,a)}}function property(a){return isKey(a)?baseProperty(toKey(a)):basePropertyDeep(a)}function baseIteratee(a){return typeof a=="function"?a:a==null?identity:typeof a=="object"?isArray$1(a)?baseMatchesProperty(a[0],a[1]):baseMatches(a):property(a)}function filter(a,_){var $=isArray$1(a)?arrayFilter:baseFilter;return $(a,baseIteratee(_))}var mapTag$1="[object Map]",setTag$1="[object Set]",objectProto$2=Object.prototype,hasOwnProperty$2=objectProto$2.hasOwnProperty;function isEmpty(a){if(a==null)return!0;if(isArrayLike(a)&&(isArray$1(a)||typeof a=="string"||typeof a.splice=="function"||isBuffer$1(a)||isTypedArray$1(a)||isArguments$1(a)))return!a.length;var _=getTag$1(a);if(_==mapTag$1||_==setTag$1)return!a.size;if(isPrototype(a))return!baseKeys(a).length;for(var $ in a)if(hasOwnProperty$2.call(a,$))return!1;return!0}function baseFindIndex(a,_,$,j){for(var _e=a.length,et=$+(j?1:-1);j?et--:++et<_e;)if(_(a[et],et,a))return et;return-1}function baseIsNaN(a){return a!==a}function strictIndexOf(a,_,$){for(var j=$-1,_e=a.length;++j<_e;)if(a[j]===_)return j;return-1}function baseIndexOf(a,_,$){return _===_?strictIndexOf(a,_,$):baseFindIndex(a,baseIsNaN,$)}function arrayIncludes(a,_){var $=a==null?0:a.length;return!!$&&baseIndexOf(a,_,0)>-1}function arrayIncludesWith(a,_,$){for(var j=-1,_e=a==null?0:a.length;++j<_e;)if($(_,a[j]))return!0;return!1}function isArrayLikeObject(a){return isObjectLike(a)&&isArrayLike(a)}function arrayEach(a,_){for(var $=-1,j=a==null?0:a.length;++$<j&&_(a[$],$,a)!==!1;);return a}function castFunction(a){return typeof a=="function"?a:identity}function forEach(a,_){var $=isArray$1(a)?arrayEach:baseEach$1;return $(a,castFunction(_))}var getDefaultPropName=function a(_){return"default"+(_[0].toUpperCase()+_.slice(1))},getAutoControlledStateValue=function a(_,$,j,_e){_e===void 0&&(_e=!1);var et=$[_];if(et!==void 0)return et;if(_e){var tt=$[getDefaultPropName(_)];if(tt!==void 0)return tt;if(j){var rt=j[_];if(rt!==void 0)return rt}}if(_==="checked")return!1;if(_==="value")return $.multiple?[]:""},ModernAutoControlledComponent=function(a){_inheritsLoose$6(_,a);function _(){for(var $,j=arguments.length,_e=new Array(j),et=0;et<j;et++)_e[et]=arguments[et];$=a.call.apply(a,[this].concat(_e))||this;var tt=$.constructor,rt=tt.autoControlledProps,at=tt.getAutoControlledStateFromProps,ct=_invoke(_assertThisInitialized($),"getInitialAutoControlledState",$.props)||{},dt=rt.reduce(function(yt,bt){return yt[bt]=getAutoControlledStateValue(bt,$.props,ct,!0),yt},{});return $.state=_extends$1({},ct,dt,{autoControlledProps:rt,getAutoControlledStateFromProps:at}),$}return _.getDerivedStateFromProps=function(j,_e){var et=_e.autoControlledProps,tt=_e.getAutoControlledStateFromProps,rt=et.reduce(function(ct,dt){var yt=!isUndefined(j[dt]);return yt&&(ct[dt]=j[dt]),ct},{});if(tt){var at=tt(j,_extends$1({},_e,rt),_e);return _extends$1({},rt,at)}return rt},_.getAutoControlledStateFromProps=function(){return null},_}(React$5.Component);function createFind(a){return function(_,$,j){var _e=Object(_);if(!isArrayLike(_)){var et=baseIteratee($);_=keys$1(_),$=function(rt){return et(_e[rt],rt,_e)}}var tt=a(_,$,j);return tt>-1?_e[et?_[tt]:tt]:void 0}}var nativeMax$2=Math.max;function findIndex(a,_,$){var j=a==null?0:a.length;if(!j)return-1;var _e=$==null?0:toInteger($);return _e<0&&(_e=nativeMax$2(j+_e,0)),baseFindIndex(a,baseIteratee(_),_e)}var find=createFind(findIndex);const _find=find;function baseSome(a,_){var $;return baseEach$1(a,function(j,_e,et){return $=_(j,_e,et),!$}),!!$}function isIterateeCall(a,_,$){if(!isObject($))return!1;var j=typeof _;return(j=="number"?isArrayLike($)&&isIndex(_,$.length):j=="string"&&_ in $)?eq($[_],a):!1}function some(a,_,$){var j=isArray$1(a)?arraySome:baseSome;return $&&isIterateeCall(a,_,$)&&(_=void 0),j(a,baseIteratee(_))}var someByType=function a(_,$){return some(reactExports.Children.toArray(_),{type:$})},isNil$1=function a(_){return _==null||Array.isArray(_)&&_.length===0},numberToWordMap={1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine",10:"ten",11:"eleven",12:"twelve",13:"thirteen",14:"fourteen",15:"fifteen",16:"sixteen"};function numberToWord(a){var _=typeof a;return _==="string"||_==="number"?numberToWordMap[a]||a:""}var useKeyOnly=function a(_,$){return _&&$},useValueAndKey=function a(_,$){return _&&_!==!0&&_+" "+$},useKeyOrValueAndKey=function a(_,$){return _&&(_===!0?$:_+" "+$)},useTextAlignProp=function a(_){return _==="justified"?"justified":useValueAndKey(_,"aligned")},useVerticalAlignProp=function a(_){return useValueAndKey(_,"aligned")},useWidthProp=function a(_,$,j){if($===void 0&&($=""),j===void 0&&(j=!1),j&&_==="equal")return"equal width";var _e=typeof _;return(_e==="string"||_e==="number")&&$?numberToWord(_)+" "+$:numberToWord(_)},LARGE_ARRAY_SIZE$1=200;function baseDifference(a,_,$,j){var _e=-1,et=arrayIncludes,tt=!0,rt=a.length,at=[],ct=_.length;if(!rt)return at;$&&(_=arrayMap(_,baseUnary($))),j?(et=arrayIncludesWith,tt=!1):_.length>=LARGE_ARRAY_SIZE$1&&(et=cacheHas,tt=!1,_=new SetCache(_));e:for(;++_e<rt;){var dt=a[_e],yt=$==null?dt:$(dt);if(dt=j||dt!==0?dt:0,tt&&yt===yt){for(var bt=ct;bt--;)if(_[bt]===yt)continue e;at.push(dt)}else et(_,yt,j)||at.push(dt)}return at}var spreadableSymbol=Symbol$2?Symbol$2.isConcatSpreadable:void 0;function isFlattenable(a){return isArray$1(a)||isArguments$1(a)||!!(spreadableSymbol&&a&&a[spreadableSymbol])}function baseFlatten(a,_,$,j,_e){var et=-1,tt=a.length;for($||($=isFlattenable),_e||(_e=[]);++et<tt;){var rt=a[et];_>0&&$(rt)?_>1?baseFlatten(rt,_-1,$,j,_e):arrayPush(_e,rt):j||(_e[_e.length]=rt)}return _e}var difference=baseRest(function(a,_){return isArrayLikeObject(a)?baseDifference(a,baseFlatten(_,1,isArrayLikeObject,!0)):[]});const _difference=difference;var rsAstralRange$1="\\ud800-\\udfff",rsComboMarksRange$2="\\u0300-\\u036f",reComboHalfMarksRange$2="\\ufe20-\\ufe2f",rsComboSymbolsRange$2="\\u20d0-\\u20ff",rsComboRange$2=rsComboMarksRange$2+reComboHalfMarksRange$2+rsComboSymbolsRange$2,rsVarRange$1="\\ufe0e\\ufe0f",rsZWJ$1="\\u200d",reHasUnicode=RegExp("["+rsZWJ$1+rsAstralRange$1+rsComboRange$2+rsVarRange$1+"]");function hasUnicode(a){return reHasUnicode.test(a)}function baseAssignValue(a,_,$){_=="__proto__"&&defineProperty$1?defineProperty$1(a,_,{configurable:!0,enumerable:!0,value:$,writable:!0}):a[_]=$}var objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function assignValue(a,_,$){var j=a[_];(!(hasOwnProperty$1.call(a,_)&&eq(j,$))||$===void 0&&!(_ in a))&&baseAssignValue(a,_,$)}function baseSet(a,_,$,j){if(!isObject(a))return a;_=castPath(_,a);for(var _e=-1,et=_.length,tt=et-1,rt=a;rt!=null&&++_e<et;){var at=toKey(_[_e]),ct=$;if(at==="__proto__"||at==="constructor"||at==="prototype")return a;if(_e!=tt){var dt=rt[at];ct=j?j(dt,at,rt):void 0,ct===void 0&&(ct=isObject(dt)?dt:isIndex(_[_e+1])?[]:{})}assignValue(rt,at,ct),rt=rt[at]}return a}function basePickBy(a,_,$){for(var j=-1,_e=_.length,et={};++j<_e;){var tt=_[j],rt=baseGet(a,tt);$(rt,tt)&&baseSet(et,castPath(tt,a),rt)}return et}function basePick(a,_){return basePickBy(a,_,function($,j){return hasIn(a,j)})}function flatten(a){var _=a==null?0:a.length;return _?baseFlatten(a,1):[]}function flatRest(a){return setToString$1(overRest(a,void 0,flatten),a+"")}var pick$1=flatRest(function(a,_){return a==null?{}:basePick(a,_)});const _pick=pick$1;var getPrototype=overArg(Object.getPrototypeOf,Object);const getPrototype$1=getPrototype;var objectTag="[object Object]",funcProto=Function.prototype,objectProto=Object.prototype,funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject(a){if(!isObjectLike(a)||baseGetTag(a)!=objectTag)return!1;var _=getPrototype$1(a);if(_===null)return!0;var $=hasOwnProperty.call(_,"constructor")&&_.constructor;return typeof $=="function"&&$ instanceof $&&funcToString.call($)==objectCtorString}function isNil(a){return a==null}function baseMap(a,_){var $=-1,j=isArrayLike(a)?Array(a.length):[];return baseEach$1(a,function(_e,et,tt){j[++$]=_(_e,et,tt)}),j}function map(a,_){var $=isArray$1(a)?arrayMap:baseMap;return $(a,baseIteratee(_))}var libExports=requireLib$1();const EventStack=getDefaultExportFromCjs$1(libExports);function noop(){}var INFINITY=1/0,createSet=Set$2&&1/setToArray(new Set$2([,-0]))[1]==INFINITY?function(a){return new Set$2(a)}:noop;const createSet$1=createSet;var LARGE_ARRAY_SIZE=200;function baseUniq(a,_,$){var j=-1,_e=arrayIncludes,et=a.length,tt=!0,rt=[],at=rt;if($)tt=!1,_e=arrayIncludesWith;else if(et>=LARGE_ARRAY_SIZE){var ct=_?null:createSet$1(a);if(ct)return setToArray(ct);tt=!1,_e=cacheHas,at=new SetCache}else at=_?[]:rt;e:for(;++j<et;){var dt=a[j],yt=_?_(dt):dt;if(dt=$||dt!==0?dt:0,tt&&yt===yt){for(var bt=at.length;bt--;)if(at[bt]===yt)continue e;_&&at.push(yt),rt.push(dt)}else _e(at,yt,$)||(at!==rt&&at.push(yt),rt.push(dt))}return rt}function uniq(a){return a&&a.length?baseUniq(a):[]}var numberTag="[object Number]";function isNumber(a){return typeof a=="number"||isObjectLike(a)&&baseGetTag(a)==numberTag}var stringTag="[object String]";function isString(a){return typeof a=="string"||!isArray$1(a)&&isObjectLike(a)&&baseGetTag(a)==stringTag}var boolTag="[object Boolean]";function isBoolean(a){return a===!0||a===!1||isObjectLike(a)&&baseGetTag(a)==boolTag}function createShorthand(a,_,$,j){if(j===void 0&&(j={}),typeof a!="function"&&typeof a!="string")throw new Error("createShorthand() Component must be a string or function.");if(isNil($)||isBoolean($))return null;var _e=isString($),et=isNumber($),tt=isFunction($),rt=reactExports.isValidElement($),at=isPlainObject($),ct=_e||et||isArray$1($);if(!tt&&!rt&&!at&&!ct)return null;var dt=j,yt=dt.defaultProps,bt=yt===void 0?{}:yt,Et=rt&&$.props||at&&$||ct&&_($),$t=j,_t=$t.overrideProps,xt=_t===void 0?{}:_t;xt=isFunction(xt)?xt(_extends$1({},bt,Et)):xt;var St=_extends$1({},bt,Et,xt);if(bt.className||xt.className||Et.className){var Mt=clsx(bt.className,xt.className,Et.className);St.className=uniq(Mt.split(" ")).join(" ")}if((bt.style||xt.style||Et.style)&&(St.style=_extends$1({},bt.style,Et.style,xt.style)),isNil(St.key)){var Tt=St.childKey,Rt=j,Ct=Rt.autoGenerateKey,It=Ct===void 0?!0:Ct;isNil(Tt)?It&&(_e||et)&&(St.key=$):(St.key=typeof Tt=="function"?Tt(St):Tt,delete St.childKey)}if(rt)return reactExports.cloneElement($,St);if(typeof St.children=="function")return St.children(a,_extends$1({},St,{children:void 0}));if(ct||at)return reactExports.createElement(a,St);if(tt)return $(a,St,St.children)}function createShorthandFactory(a,_){if(typeof a!="function"&&typeof a!="string")throw new Error("createShorthandFactory() Component must be a string or function.");return function($,j){return createShorthand(a,_,$,j)}}var createHTMLInput=createShorthandFactory("input",function(a){return{type:a}}),createHTMLLabel=createShorthandFactory("label",function(a){return{children:a}}),getUnhandledProps=function a(_,$){var j=_.handledProps,_e=j===void 0?[]:j;return Object.keys($).reduce(function(et,tt){return tt==="childKey"||_e.indexOf(tt)===-1&&(et[tt]=$[tt]),et},{})};const getUnhandledProps$1=getUnhandledProps;function getElementType(a,_,$){var j=a.defaultProps,_e=j===void 0?{}:j;if(_.as&&_.as!==_e.as)return _.as;if($){var et=$();if(et)return et}return _.href?"a":_e.as||"div"}function baseValues(a,_){return arrayMap(_,function($){return a[$]})}function values(a){return a==null?[]:baseValues(a,keys$1(a))}var nativeMax$1=Math.max;function includes(a,_,$,j){a=isArrayLike(a)?a:values(a),$=$&&!j?toInteger($):0;var _e=a.length;return $<0&&($=nativeMax$1(_e+$,0)),isString(a)?$<=_e&&a.indexOf(_,$)>-1:!!_e&&baseIndexOf(a,_,$)>-1}var htmlInputAttrs=["selected","defaultValue","defaultChecked","accept","autoCapitalize","autoComplete","autoCorrect","autoFocus","checked","disabled","enterKeyHint","form","id","inputMode","lang","list","max","maxLength","min","minLength","multiple","name","pattern","placeholder","readOnly","required","step","title","type","value"],htmlInputEvents=["onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onClick","onContextMenu","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],htmlInputProps=[].concat(htmlInputAttrs,htmlInputEvents),htmlImageProps=["alt","height","src","srcSet","width","loading"],partitionHTMLProps=function a(_,$){$===void 0&&($={});var j=$,_e=j.htmlProps,et=_e===void 0?htmlInputProps:_e,tt=j.includeAria,rt=tt===void 0?!0:tt,at={},ct={};return forEach(_,function(dt,yt){var bt=rt&&(/^aria-.*$/.test(yt)||yt==="role"),Et=includes(et,yt)||bt?at:ct;Et[yt]=dt}),[at,ct]},hasDocument=typeof document=="object"&&document!==null,hasWindow=typeof window=="object"&&window!==null&&window.self===window,isBrowser=function a(){return isNil(a.override)?hasDocument&&hasWindow:a.override};const isBrowser$1=isBrowser;var nativeMax=Math.max,nativeMin=Math.min;function baseInRange(a,_,$){return a>=nativeMin(_,$)&&a<nativeMax(_,$)}function inRange(a,_,$){return _=toFinite(_),$===void 0?($=_,_=0):$=toFinite($),a=toNumber(a),baseInRange(a,_,$)}function head(a){return a&&a.length?a[0]:void 0}var doesNodeContainClick=function a(_,$){if(some([$,_],isNil))return!1;if($.target&&(_invoke($.target,"setAttribute","data-suir-click-target",!0),document.querySelector("[data-suir-click-target=true]")))return _invoke($.target,"removeAttribute","data-suir-click-target"),_.contains($.target);var j=$.clientX,_e=$.clientY;if(some([j,_e],isNil))return!1;var et=_.getClientRects();if(!_.offsetWidth||!_.offsetHeight||!et||!et.length)return!1;var tt=head(et),rt=tt.top,at=tt.bottom,ct=tt.left,dt=tt.right;return some([rt,at,ct,dt],isNil)?!1:inRange(_e,rt,at+.001)&&inRange(j,ct,dt+.001)};const doesNodeContainClick$1=doesNodeContainClick;function isEqual(a,_){return baseIsEqual(a,_)}var without=baseRest(function(a,_){return isArrayLikeObject(a)?baseDifference(a,_):[]});const _without=without;function IconGroup(a){var _=a.children,$=a.className,j=a.content,_e=a.size,et=clsx(_e,"icons",$),tt=getUnhandledProps$1(IconGroup,a),rt=getElementType(IconGroup,a);return React$5.createElement(rt,_extends$1({},tt,{className:et}),isNil$1(_)?j:_)}IconGroup.handledProps=["as","children","className","content","size"];IconGroup.propTypes={};IconGroup.defaultProps={as:"i"};var Icon$1=function(a){_inheritsLoose$6(_,a);function _(){for(var j,_e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=a.call.apply(a,[this].concat(et))||this,j.handleClick=function(rt){var at=j.props.disabled;if(at){rt.preventDefault();return}_invoke(j.props,"onClick",rt,j.props)},j}var $=_.prototype;return $.getIconAriaOptions=function(){var _e={},et=this.props,tt=et["aria-label"],rt=et["aria-hidden"];return isNil(tt)?_e["aria-hidden"]="true":_e["aria-label"]=tt,isNil(rt)||(_e["aria-hidden"]=rt),_e},$.render=function(){var _e=this.props,et=_e.bordered,tt=_e.circular,rt=_e.className,at=_e.color,ct=_e.corner,dt=_e.disabled,yt=_e.fitted,bt=_e.flipped,Et=_e.inverted,$t=_e.link,_t=_e.loading,xt=_e.name,St=_e.rotated,Mt=_e.size,Tt=clsx(at,xt,Mt,useKeyOnly(et,"bordered"),useKeyOnly(tt,"circular"),useKeyOnly(dt,"disabled"),useKeyOnly(yt,"fitted"),useKeyOnly(Et,"inverted"),useKeyOnly($t,"link"),useKeyOnly(_t,"loading"),useKeyOrValueAndKey(ct,"corner"),useValueAndKey(bt,"flipped"),useValueAndKey(St,"rotated"),"icon",rt),Rt=getUnhandledProps$1(_,this.props),Ct=getElementType(_,this.props),It=this.getIconAriaOptions();return React$5.createElement(Ct,_extends$1({},Rt,It,{className:Tt,onClick:this.handleClick}))},_}(reactExports.PureComponent);Icon$1.handledProps=["aria-hidden","aria-label","as","bordered","circular","className","color","corner","disabled","fitted","flipped","inverted","link","loading","name","rotated","size"];Icon$1.propTypes={};Icon$1.defaultProps={as:"i"};Icon$1.Group=IconGroup;Icon$1.create=createShorthandFactory(Icon$1,function(a){return{name:a}});const Icon$2=Icon$1;var keyboardKeyExports=requireKeyboardKey();const keyboardKey=getDefaultExportFromCjs$1(keyboardKeyExports);var PortalInner=function(a){_inheritsLoose$6(_,a);function _(){for(var j,_e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=a.call.apply(a,[this].concat(et))||this,j.handleRef=function(rt){handleRef(j.props.innerRef,rt)},j}var $=_.prototype;return $.componentDidMount=function(){_invoke(this.props,"onMount",null,this.props)},$.componentWillUnmount=function(){_invoke(this.props,"onUnmount",null,this.props)},$.render=function(){if(!isBrowser$1())return null;var _e=this.props,et=_e.children,tt=_e.mountNode,rt=tt===void 0?document.body:tt;return reactDomExports.createPortal(React$5.createElement(Ref,{innerRef:this.handleRef},et),rt)},_}(reactExports.Component);PortalInner.handledProps=["children","innerRef","mountNode","onMount","onUnmount"];PortalInner.propTypes={};const PortalInner$1=PortalInner;var Portal=function(a){_inheritsLoose$6(_,a);function _(){for(var j,_e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=a.call.apply(a,[this].concat(et))||this,j.contentRef=React$5.createRef(),j.triggerRef=React$5.createRef(),j.latestDocumentMouseDownEvent=null,j.handleDocumentMouseDown=function(rt){j.latestDocumentMouseDownEvent=rt},j.handleDocumentClick=function(rt){var at=j.props.closeOnDocumentClick,ct=j.latestDocumentMouseDownEvent;j.latestDocumentMouseDownEvent=null,!(!j.contentRef.current||doesNodeContainClick$1(j.triggerRef.current,rt)||ct&&doesNodeContainClick$1(j.contentRef.current,ct)||doesNodeContainClick$1(j.contentRef.current,rt))&&at&&j.close(rt)},j.handleEscape=function(rt){j.props.closeOnEscape&&keyboardKey.getCode(rt)===keyboardKey.Escape&&j.close(rt)},j.handlePortalMouseLeave=function(rt){var at=j.props,ct=at.closeOnPortalMouseLeave,dt=at.mouseLeaveDelay;ct&&rt.target===j.contentRef.current&&(j.mouseLeaveTimer=j.closeWithTimeout(rt,dt))},j.handlePortalMouseEnter=function(){var rt=j.props.closeOnPortalMouseLeave;rt&&clearTimeout(j.mouseLeaveTimer)},j.handleTriggerBlur=function(rt){for(var at=j.props,ct=at.trigger,dt=at.closeOnTriggerBlur,yt=arguments.length,bt=new Array(yt>1?yt-1:0),Et=1;Et<yt;Et++)bt[Et-1]=arguments[Et];_invoke.apply(void 0,[ct,"props.onBlur",rt].concat(bt));var $t=rt.relatedTarget||document.activeElement,_t=_invoke(j.contentRef.current,"contains",$t);!dt||_t||j.close(rt)},j.handleTriggerClick=function(rt){for(var at=j.props,ct=at.trigger,dt=at.closeOnTriggerClick,yt=at.openOnTriggerClick,bt=j.state.open,Et=arguments.length,$t=new Array(Et>1?Et-1:0),_t=1;_t<Et;_t++)$t[_t-1]=arguments[_t];_invoke.apply(void 0,[ct,"props.onClick",rt].concat($t)),bt&&dt?j.close(rt):!bt&&yt&&j.open(rt)},j.handleTriggerFocus=function(rt){for(var at=j.props,ct=at.trigger,dt=at.openOnTriggerFocus,yt=arguments.length,bt=new Array(yt>1?yt-1:0),Et=1;Et<yt;Et++)bt[Et-1]=arguments[Et];_invoke.apply(void 0,[ct,"props.onFocus",rt].concat(bt)),dt&&j.open(rt)},j.handleTriggerMouseLeave=function(rt){clearTimeout(j.mouseEnterTimer);for(var at=j.props,ct=at.trigger,dt=at.closeOnTriggerMouseLeave,yt=at.mouseLeaveDelay,bt=arguments.length,Et=new Array(bt>1?bt-1:0),$t=1;$t<bt;$t++)Et[$t-1]=arguments[$t];_invoke.apply(void 0,[ct,"props.onMouseLeave",rt].concat(Et)),dt&&(j.mouseLeaveTimer=j.closeWithTimeout(rt,yt))},j.handleTriggerMouseEnter=function(rt){clearTimeout(j.mouseLeaveTimer);for(var at=j.props,ct=at.trigger,dt=at.mouseEnterDelay,yt=at.openOnTriggerMouseEnter,bt=arguments.length,Et=new Array(bt>1?bt-1:0),$t=1;$t<bt;$t++)Et[$t-1]=arguments[$t];_invoke.apply(void 0,[ct,"props.onMouseEnter",rt].concat(Et)),yt&&(j.mouseEnterTimer=j.openWithTimeout(rt,dt))},j.open=function(rt){_invoke(j.props,"onOpen",rt,_extends$1({},j.props,{open:!0})),j.setState({open:!0})},j.openWithTimeout=function(rt,at){var ct=_extends$1({},rt);return setTimeout(function(){return j.open(ct)},at||0)},j.close=function(rt){j.setState({open:!1}),_invoke(j.props,"onClose",rt,_extends$1({},j.props,{open:!1}))},j.closeWithTimeout=function(rt,at){var ct=_extends$1({},rt);return setTimeout(function(){return j.close(ct)},at||0)},j.handleMount=function(){_invoke(j.props,"onMount",null,j.props)},j.handleUnmount=function(){_invoke(j.props,"onUnmount",null,j.props)},j.handleTriggerRef=function(rt){j.triggerRef.current=rt,handleRef(j.props.triggerRef,rt)},j}var $=_.prototype;return $.componentWillUnmount=function(){clearTimeout(this.mouseEnterTimer),clearTimeout(this.mouseLeaveTimer)},$.render=function(){var _e=this.props,et=_e.children,tt=_e.eventPool,rt=_e.mountNode,at=_e.trigger,ct=this.state.open;return React$5.createElement(React$5.Fragment,null,ct&&React$5.createElement(React$5.Fragment,null,React$5.createElement(PortalInner$1,{innerRef:this.contentRef,mountNode:rt,onMount:this.handleMount,onUnmount:this.handleUnmount},et),React$5.createElement(EventStack,{name:"mouseleave",on:this.handlePortalMouseLeave,pool:tt,target:this.contentRef}),React$5.createElement(EventStack,{name:"mouseenter",on:this.handlePortalMouseEnter,pool:tt,target:this.contentRef}),React$5.createElement(EventStack,{name:"mousedown",on:this.handleDocumentMouseDown,pool:tt}),React$5.createElement(EventStack,{name:"click",on:this.handleDocumentClick,pool:tt}),React$5.createElement(EventStack,{name:"keydown",on:this.handleEscape,pool:tt})),at&&React$5.createElement(Ref,{innerRef:this.handleTriggerRef},React$5.cloneElement(at,{onBlur:this.handleTriggerBlur,onClick:this.handleTriggerClick,onFocus:this.handleTriggerFocus,onMouseLeave:this.handleTriggerMouseLeave,onMouseEnter:this.handleTriggerMouseEnter})))},_}(ModernAutoControlledComponent);Portal.handledProps=["children","closeOnDocumentClick","closeOnEscape","closeOnPortalMouseLeave","closeOnTriggerBlur","closeOnTriggerClick","closeOnTriggerMouseLeave","defaultOpen","eventPool","mountNode","mouseEnterDelay","mouseLeaveDelay","onClose","onMount","onOpen","onUnmount","open","openOnTriggerClick","openOnTriggerFocus","openOnTriggerMouseEnter","trigger","triggerRef"];Portal.propTypes={};Portal.defaultProps={closeOnDocumentClick:!0,closeOnEscape:!0,eventPool:"default",openOnTriggerClick:!0};Portal.autoControlledProps=["open"];Portal.Inner=PortalInner$1;const Portal$1=Portal;function DimmerDimmable(a){var _=a.blurring,$=a.className,j=a.children,_e=a.content,et=a.dimmed,tt=clsx(useKeyOnly(_,"blurring"),useKeyOnly(et,"dimmed"),"dimmable",$),rt=getUnhandledProps$1(DimmerDimmable,a),at=getElementType(DimmerDimmable,a);return React$5.createElement(at,_extends$1({},rt,{className:tt}),isNil$1(j)?_e:j)}DimmerDimmable.handledProps=["as","blurring","children","className","content","dimmed"];DimmerDimmable.propTypes={};var DimmerInner=function(a){_inheritsLoose$6(_,a);function _(){for(var j,_e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=a.call.apply(a,[this].concat(et))||this,j.containerRef=reactExports.createRef(),j.contentRef=reactExports.createRef(),j.handleClick=function(rt){var at=j.contentRef.current;_invoke(j.props,"onClick",rt,j.props),!(at&&at!==rt.target&&doesNodeContainClick$1(at,rt))&&_invoke(j.props,"onClickOutside",rt,j.props)},j}var $=_.prototype;return $.componentDidMount=function(){var _e=this.props.active;this.toggleStyles(_e)},$.componentDidUpdate=function(_e){var et=this.props.active,tt=_e.active;tt!==et&&this.toggleStyles(et)},$.toggleStyles=function(_e){var et=this.containerRef.current;!et||!et.style||(_e?et.style.setProperty("display","flex","important"):et.style.removeProperty("display"))},$.render=function(){var _e=this.props,et=_e.active,tt=_e.children,rt=_e.className,at=_e.content,ct=_e.disabled,dt=_e.inverted,yt=_e.page,bt=_e.simple,Et=_e.verticalAlign,$t=clsx("ui",useKeyOnly(et,"active transition visible"),useKeyOnly(ct,"disabled"),useKeyOnly(dt,"inverted"),useKeyOnly(yt,"page"),useKeyOnly(bt,"simple"),useVerticalAlignProp(Et),"dimmer",rt),_t=getUnhandledProps$1(_,this.props),xt=getElementType(_,this.props),St=isNil$1(tt)?at:tt;return React$5.createElement(Ref,{innerRef:this.containerRef},React$5.createElement(xt,_extends$1({},_t,{className:$t,onClick:this.handleClick}),St&&React$5.createElement("div",{className:"content",ref:this.contentRef},St)))},_}(reactExports.Component);DimmerInner.handledProps=["active","as","children","className","content","disabled","inverted","onClick","onClickOutside","page","simple","verticalAlign"];DimmerInner.propTypes={};var Dimmer=function(a){_inheritsLoose$6(_,a);function _(){for(var j,_e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=a.call.apply(a,[this].concat(et))||this,j.handlePortalMount=function(){isBrowser$1()&&(document.body.classList.add("dimmed"),document.body.classList.add("dimmable"))},j.handlePortalUnmount=function(){isBrowser$1()&&(document.body.classList.remove("dimmed"),document.body.classList.remove("dimmable"))},j}var $=_.prototype;return $.render=function(){var _e=this.props,et=_e.active,tt=_e.page,rt=getUnhandledProps$1(_,this.props);return tt?React$5.createElement(Portal$1,{closeOnEscape:!1,closeOnDocumentClick:!1,onMount:this.handlePortalMount,onUnmount:this.handlePortalUnmount,open:et,openOnTriggerClick:!1},React$5.createElement(DimmerInner,_extends$1({},rt,{active:et,page:tt}))):React$5.createElement(DimmerInner,_extends$1({},rt,{active:et,page:tt}))},_}(reactExports.Component);Dimmer.handledProps=["active","page"];Dimmer.propTypes={};Dimmer.Dimmable=DimmerDimmable;Dimmer.Inner=DimmerInner;Dimmer.create=createShorthandFactory(Dimmer,function(a){return{content:a}});function ImageGroup(a){var _=a.children,$=a.className,j=a.content,_e=a.size,et=clsx("ui",_e,$,"images"),tt=getUnhandledProps$1(ImageGroup,a),rt=getElementType(ImageGroup,a);return React$5.createElement(rt,_extends$1({},tt,{className:et}),isNil$1(_)?j:_)}ImageGroup.handledProps=["as","children","className","content","size"];ImageGroup.propTypes={};function Image$1(a){var _=a.avatar,$=a.bordered,j=a.centered,_e=a.children,et=a.circular,tt=a.className,rt=a.content,at=a.dimmer,ct=a.disabled,dt=a.floated,yt=a.fluid,bt=a.hidden,Et=a.href,$t=a.inline,_t=a.label,xt=a.rounded,St=a.size,Mt=a.spaced,Tt=a.verticalAlign,Rt=a.wrapped,Ct=a.ui,It=clsx(useKeyOnly(Ct,"ui"),St,useKeyOnly(_,"avatar"),useKeyOnly($,"bordered"),useKeyOnly(et,"circular"),useKeyOnly(j,"centered"),useKeyOnly(ct,"disabled"),useKeyOnly(yt,"fluid"),useKeyOnly(bt,"hidden"),useKeyOnly($t,"inline"),useKeyOnly(xt,"rounded"),useKeyOrValueAndKey(Mt,"spaced"),useValueAndKey(dt,"floated"),useVerticalAlignProp(Tt),"image",tt),kt=getUnhandledProps$1(Image$1,a),Dt=partitionHTMLProps(kt,{htmlProps:htmlImageProps}),Bt=Dt[0],zt=Dt[1],vt=getElementType(Image$1,a,function(){if(!isNil(at)||!isNil(_t)||!isNil(Rt)||!isNil$1(_e))return"div"});return isNil$1(_e)?isNil$1(rt)?vt==="img"?React$5.createElement(vt,_extends$1({},zt,Bt,{className:It})):React$5.createElement(vt,_extends$1({},zt,{className:It,href:Et}),Dimmer.create(at,{autoGenerateKey:!1}),Label$1.create(_t,{autoGenerateKey:!1}),React$5.createElement("img",Bt)):React$5.createElement(vt,_extends$1({},kt,{className:It}),rt):React$5.createElement(vt,_extends$1({},kt,{className:It}),_e)}Image$1.handledProps=["as","avatar","bordered","centered","children","circular","className","content","dimmer","disabled","floated","fluid","hidden","href","inline","label","rounded","size","spaced","ui","verticalAlign","wrapped"];Image$1.Group=ImageGroup;Image$1.propTypes={};Image$1.defaultProps={as:"img",ui:!0};Image$1.create=createShorthandFactory(Image$1,function(a){return{src:a}});function LabelDetail(a){var _=a.children,$=a.className,j=a.content,_e=clsx("detail",$),et=getUnhandledProps$1(LabelDetail,a),tt=getElementType(LabelDetail,a);return React$5.createElement(tt,_extends$1({},et,{className:_e}),isNil$1(_)?j:_)}LabelDetail.handledProps=["as","children","className","content"];LabelDetail.propTypes={};LabelDetail.create=createShorthandFactory(LabelDetail,function(a){return{content:a}});function LabelGroup(a){var _=a.children,$=a.circular,j=a.className,_e=a.color,et=a.content,tt=a.size,rt=a.tag,at=clsx("ui",_e,tt,useKeyOnly($,"circular"),useKeyOnly(rt,"tag"),"labels",j),ct=getUnhandledProps$1(LabelGroup,a),dt=getElementType(LabelGroup,a);return React$5.createElement(dt,_extends$1({},ct,{className:at}),isNil$1(_)?et:_)}LabelGroup.handledProps=["as","children","circular","className","color","content","size","tag"];LabelGroup.propTypes={};var Label$1=function(a){_inheritsLoose$6(_,a);function _(){for(var j,_e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=a.call.apply(a,[this].concat(et))||this,j.handleClick=function(rt){var at=j.props.onClick;at&&at(rt,j.props)},j.handleIconOverrides=function(rt){return{onClick:function(ct){_invoke(rt,"onClick",ct),_invoke(j.props,"onRemove",ct,j.props)}}},j}var $=_.prototype;return $.render=function(){var _e=this.props,et=_e.active,tt=_e.attached,rt=_e.basic,at=_e.children,ct=_e.circular,dt=_e.className,yt=_e.color,bt=_e.content,Et=_e.corner,$t=_e.detail,_t=_e.empty,xt=_e.floating,St=_e.horizontal,Mt=_e.icon,Tt=_e.image,Rt=_e.onRemove,Ct=_e.pointing,It=_e.prompt,kt=_e.removeIcon,Dt=_e.ribbon,Bt=_e.size,zt=_e.tag,vt=Ct===!0&&"pointing"||(Ct==="left"||Ct==="right")&&Ct+" pointing"||(Ct==="above"||Ct==="below")&&"pointing "+Ct,nt=clsx("ui",yt,vt,Bt,useKeyOnly(et,"active"),useKeyOnly(rt,"basic"),useKeyOnly(ct,"circular"),useKeyOnly(_t,"empty"),useKeyOnly(xt,"floating"),useKeyOnly(St,"horizontal"),useKeyOnly(Tt===!0,"image"),useKeyOnly(It,"prompt"),useKeyOnly(zt,"tag"),useKeyOrValueAndKey(Et,"corner"),useKeyOrValueAndKey(Dt,"ribbon"),useValueAndKey(tt,"attached"),"label",dt),st=getUnhandledProps$1(_,this.props),lt=getElementType(_,this.props);if(!isNil$1(at))return React$5.createElement(lt,_extends$1({},st,{className:nt,onClick:this.handleClick}),at);var ht=isUndefined(kt)?"delete":kt;return React$5.createElement(lt,_extends$1({className:nt,onClick:this.handleClick},st),Icon$2.create(Mt,{autoGenerateKey:!1}),typeof Tt!="boolean"&&Image$1.create(Tt,{autoGenerateKey:!1}),bt,LabelDetail.create($t,{autoGenerateKey:!1}),Rt&&Icon$2.create(ht,{autoGenerateKey:!1,overrideProps:this.handleIconOverrides}))},_}(reactExports.Component);Label$1.handledProps=["active","as","attached","basic","children","circular","className","color","content","corner","detail","empty","floating","horizontal","icon","image","onClick","onRemove","pointing","prompt","removeIcon","ribbon","size","tag"];Label$1.propTypes={};Label$1.Detail=LabelDetail;Label$1.Group=LabelGroup;Label$1.create=createShorthandFactory(Label$1,function(a){return{content:a}});function ButtonContent(a){var _=a.children,$=a.className,j=a.content,_e=a.hidden,et=a.visible,tt=clsx(useKeyOnly(et,"visible"),useKeyOnly(_e,"hidden"),"content",$),rt=getUnhandledProps$1(ButtonContent,a),at=getElementType(ButtonContent,a);return React$5.createElement(at,_extends$1({},rt,{className:tt}),isNil$1(_)?j:_)}ButtonContent.handledProps=["as","children","className","content","hidden","visible"];ButtonContent.propTypes={};function ButtonGroup(a){var _=a.attached,$=a.basic,j=a.buttons,_e=a.children,et=a.className,tt=a.color,rt=a.compact,at=a.content,ct=a.floated,dt=a.fluid,yt=a.icon,bt=a.inverted,Et=a.labeled,$t=a.negative,_t=a.positive,xt=a.primary,St=a.secondary,Mt=a.size,Tt=a.toggle,Rt=a.vertical,Ct=a.widths,It=clsx("ui",tt,Mt,useKeyOnly($,"basic"),useKeyOnly(rt,"compact"),useKeyOnly(dt,"fluid"),useKeyOnly(yt,"icon"),useKeyOnly(bt,"inverted"),useKeyOnly(Et,"labeled"),useKeyOnly($t,"negative"),useKeyOnly(_t,"positive"),useKeyOnly(xt,"primary"),useKeyOnly(St,"secondary"),useKeyOnly(Tt,"toggle"),useKeyOnly(Rt,"vertical"),useKeyOrValueAndKey(_,"attached"),useValueAndKey(ct,"floated"),useWidthProp(Ct),"buttons",et),kt=getUnhandledProps$1(ButtonGroup,a),Dt=getElementType(ButtonGroup,a);return isNil(j)?React$5.createElement(Dt,_extends$1({},kt,{className:It}),isNil$1(_e)?at:_e):React$5.createElement(Dt,_extends$1({},kt,{className:It}),map(j,function(Bt){return Button$2.create(Bt)}))}ButtonGroup.handledProps=["as","attached","basic","buttons","children","className","color","compact","content","floated","fluid","icon","inverted","labeled","negative","positive","primary","secondary","size","toggle","vertical","widths"];ButtonGroup.propTypes={};function ButtonOr(a){var _=a.className,$=a.text,j=clsx("or",_),_e=getUnhandledProps$1(ButtonOr,a),et=getElementType(ButtonOr,a);return React$5.createElement(et,_extends$1({},_e,{className:j,"data-text":$}))}ButtonOr.handledProps=["as","className","text"];ButtonOr.propTypes={};var Button$1=function(a){_inheritsLoose$6(_,a);function _(){for(var j,_e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=a.call.apply(a,[this].concat(et))||this,j.ref=reactExports.createRef(),j.computeElementType=function(){var rt=j.props,at=rt.attached,ct=rt.label;if(!isNil(at)||!isNil(ct))return"div"},j.computeTabIndex=function(rt){var at=j.props,ct=at.disabled,dt=at.tabIndex;if(!isNil(dt))return dt;if(ct)return-1;if(rt==="div")return 0},j.focus=function(rt){return _invoke(j.ref.current,"focus",rt)},j.handleClick=function(rt){var at=j.props.disabled;if(at){rt.preventDefault();return}_invoke(j.props,"onClick",rt,j.props)},j.hasIconClass=function(){var rt=j.props,at=rt.labelPosition,ct=rt.children,dt=rt.content,yt=rt.icon;return yt===!0?!0:yt&&(at||isNil$1(ct)&&isNil(dt))},j}var $=_.prototype;return $.computeButtonAriaRole=function(_e){var et=this.props.role;if(!isNil(et))return et;if(_e!=="button")return"button"},$.render=function(){var _e=this.props,et=_e.active,tt=_e.animated,rt=_e.attached,at=_e.basic,ct=_e.children,dt=_e.circular,yt=_e.className,bt=_e.color,Et=_e.compact,$t=_e.content,_t=_e.disabled,xt=_e.floated,St=_e.fluid,Mt=_e.icon,Tt=_e.inverted,Rt=_e.label,Ct=_e.labelPosition,It=_e.loading,kt=_e.negative,Dt=_e.positive,Bt=_e.primary,zt=_e.secondary,vt=_e.size,nt=_e.toggle,st=_e.type,lt=clsx(bt,vt,useKeyOnly(et,"active"),useKeyOnly(at,"basic"),useKeyOnly(dt,"circular"),useKeyOnly(Et,"compact"),useKeyOnly(St,"fluid"),useKeyOnly(this.hasIconClass(),"icon"),useKeyOnly(Tt,"inverted"),useKeyOnly(It,"loading"),useKeyOnly(kt,"negative"),useKeyOnly(Dt,"positive"),useKeyOnly(Bt,"primary"),useKeyOnly(zt,"secondary"),useKeyOnly(nt,"toggle"),useKeyOrValueAndKey(tt,"animated"),useKeyOrValueAndKey(rt,"attached")),ht=clsx(useKeyOrValueAndKey(Ct||!!Rt,"labeled")),mt=clsx(useKeyOnly(_t,"disabled"),useValueAndKey(xt,"floated")),wt=getUnhandledProps$1(_,this.props),At=getElementType(_,this.props,this.computeElementType),gt=this.computeTabIndex(At);if(!isNil(Rt)){var ot=clsx("ui",lt,"button",yt),pt=clsx("ui",ht,"button",yt,mt),Pt=Label$1.create(Rt,{defaultProps:{basic:!0,pointing:Ct==="left"?"right":"left"},autoGenerateKey:!1});return React$5.createElement(At,_extends$1({},wt,{className:pt,onClick:this.handleClick}),Ct==="left"&&Pt,React$5.createElement(Ref,{innerRef:this.ref},React$5.createElement("button",{className:ot,"aria-pressed":nt?!!et:void 0,disabled:_t,type:st,tabIndex:gt},Icon$2.create(Mt,{autoGenerateKey:!1})," ",$t)),(Ct==="right"||!Ct)&&Pt)}var Ot=clsx("ui",lt,mt,ht,"button",yt),Nt=!isNil$1(ct),jt=this.computeButtonAriaRole(At);return React$5.createElement(Ref,{innerRef:this.ref},React$5.createElement(At,_extends$1({},wt,{className:Ot,"aria-pressed":nt?!!et:void 0,disabled:_t&&At==="button"||void 0,onClick:this.handleClick,role:jt,type:st,tabIndex:gt}),Nt&&ct,!Nt&&Icon$2.create(Mt,{autoGenerateKey:!1}),!Nt&&$t))},_}(reactExports.Component);Button$1.handledProps=["active","animated","as","attached","basic","children","circular","className","color","compact","content","disabled","floated","fluid","icon","inverted","label","labelPosition","loading","negative","onClick","positive","primary","role","secondary","size","tabIndex","toggle","type"];Button$1.propTypes={};Button$1.defaultProps={as:"button"};Button$1.Content=ButtonContent;Button$1.Group=ButtonGroup;Button$1.Or=ButtonOr;Button$1.create=createShorthandFactory(Button$1,function(a){return{content:a}});const Button$2=Button$1;function arrayReduce(a,_,$,j){var _e=-1,et=a==null?0:a.length;for(j&&et&&($=a[++_e]);++_e<et;)$=_($,a[_e],_e,a);return $}function baseReduce(a,_,$,j,_e){return _e(a,function(et,tt,rt){$=j?(j=!1,et):_($,et,tt,rt)}),$}function reduce(a,_,$){var j=isArray$1(a)?arrayReduce:baseReduce,_e=arguments.length<3;return j(a,baseIteratee(_),$,_e,baseEach$1)}var shallowequalExports=requireShallowequal();const shallowEqual=getDefaultExportFromCjs$1(shallowequalExports);function basePropertyOf(a){return function(_){return a==null?void 0:a[_]}}var deburredLetters={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},deburrLetter=basePropertyOf(deburredLetters);const deburrLetter$1=deburrLetter;var reLatin=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rsComboMarksRange$1="\\u0300-\\u036f",reComboHalfMarksRange$1="\\ufe20-\\ufe2f",rsComboSymbolsRange$1="\\u20d0-\\u20ff",rsComboRange$1=rsComboMarksRange$1+reComboHalfMarksRange$1+rsComboSymbolsRange$1,rsCombo$1="["+rsComboRange$1+"]",reComboMark=RegExp(rsCombo$1,"g");function deburr(a){return a=toString(a),a&&a.replace(reLatin,deburrLetter$1).replace(reComboMark,"")}function set(a,_,$){return a==null?a:baseSet(a,_,$)}var Checkbox=function(a){_inheritsLoose$6(_,a);function _(){for(var j,_e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=a.call.apply(a,[this].concat(et))||this,j.inputRef=reactExports.createRef(),j.labelRef=reactExports.createRef(),j.canToggle=function(){var rt=j.props,at=rt.disabled,ct=rt.radio,dt=rt.readOnly,yt=j.state.checked;return!at&&!dt&&!(ct&&yt)},j.computeTabIndex=function(){var rt=j.props,at=rt.disabled,ct=rt.tabIndex;return isNil(ct)?at?-1:0:ct},j.handleClick=function(rt){var at=j.props.id,ct=j.state,dt=ct.checked,yt=ct.indeterminate,bt=_invoke(j.inputRef.current,"contains",rt.target),Et=_invoke(j.labelRef.current,"contains",rt.target),$t=!Et&&!bt,_t=!isNil(at),xt=Et&&_t;xt||_invoke(j.props,"onClick",rt,_extends$1({},j.props,{checked:!dt,indeterminate:!!yt})),j.isClickFromMouse&&(j.isClickFromMouse=!1,Et&&!_t&&j.handleChange(rt),$t&&j.handleChange(rt),Et&&_t&&rt.stopPropagation())},j.handleChange=function(rt){var at=j.state.checked;j.canToggle()&&(_invoke(j.props,"onChange",rt,_extends$1({},j.props,{checked:!at,indeterminate:!1})),j.setState({checked:!at,indeterminate:!1}))},j.handleMouseDown=function(rt){var at=j.state,ct=at.checked,dt=at.indeterminate;_invoke(j.props,"onMouseDown",rt,_extends$1({},j.props,{checked:!!ct,indeterminate:!!dt})),rt.defaultPrevented||_invoke(j.inputRef.current,"focus"),rt.preventDefault()},j.handleMouseUp=function(rt){var at=j.state,ct=at.checked,dt=at.indeterminate;j.isClickFromMouse=!0,_invoke(j.props,"onMouseUp",rt,_extends$1({},j.props,{checked:!!ct,indeterminate:!!dt}))},j.setIndeterminate=function(){var rt=j.state.indeterminate;set(j.inputRef,"current.indeterminate",!!rt)},j}var $=_.prototype;return $.componentDidMount=function(){this.setIndeterminate()},$.componentDidUpdate=function(){this.setIndeterminate()},$.render=function(){var _e=this.props,et=_e.className,tt=_e.disabled,rt=_e.label,at=_e.id,ct=_e.name,dt=_e.radio,yt=_e.readOnly,bt=_e.slider,Et=_e.toggle,$t=_e.type,_t=_e.value,xt=this.state,St=xt.checked,Mt=xt.indeterminate,Tt=clsx("ui",useKeyOnly(St,"checked"),useKeyOnly(tt,"disabled"),useKeyOnly(Mt,"indeterminate"),useKeyOnly(isNil(rt),"fitted"),useKeyOnly(dt,"radio"),useKeyOnly(yt,"read-only"),useKeyOnly(bt,"slider"),useKeyOnly(Et,"toggle"),"checkbox",et),Rt=getUnhandledProps$1(_,this.props),Ct=getElementType(_,this.props),It=partitionHTMLProps(Rt,{htmlProps:htmlInputAttrs}),kt=It[0],Dt=It[1],Bt=createHTMLLabel(rt,{defaultProps:{htmlFor:at},autoGenerateKey:!1})||React$5.createElement("label",{htmlFor:at});return React$5.createElement(Ct,_extends$1({},Dt,{className:Tt,onClick:this.handleClick,onChange:this.handleChange,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp}),React$5.createElement(Ref,{innerRef:this.inputRef},React$5.createElement("input",_extends$1({},kt,{checked:St,className:"hidden",disabled:tt,id:at,name:ct,readOnly:!0,tabIndex:this.computeTabIndex(),type:$t,value:_t}))),React$5.createElement(Ref,{innerRef:this.labelRef},Bt))},_}(ModernAutoControlledComponent);Checkbox.handledProps=["as","checked","className","defaultChecked","defaultIndeterminate","disabled","fitted","id","indeterminate","label","name","onChange","onClick","onMouseDown","onMouseUp","radio","readOnly","slider","tabIndex","toggle","type","value"];Checkbox.propTypes={};Checkbox.defaultProps={type:"checkbox"};Checkbox.autoControlledProps=["checked","indeterminate"];function Radio(a){var _=a.slider,$=a.toggle,j=a.type,_e=getUnhandledProps$1(Radio,a),et=!(_||$)||void 0;return React$5.createElement(Checkbox,_extends$1({},_e,{type:j,radio:et,slider:_,toggle:$}))}Radio.handledProps=["slider","toggle","type"];Radio.propTypes={};Radio.defaultProps={type:"radio"};function compact(a){for(var _=-1,$=a==null?0:a.length,j=0,_e=[];++_<$;){var et=a[_];et&&(_e[j++]=et)}return _e}function arrayEvery(a,_){for(var $=-1,j=a==null?0:a.length;++$<j;)if(!_(a[$],$,a))return!1;return!0}function baseEvery(a,_){var $=!0;return baseEach$1(a,function(j,_e,et){return $=!!_(j,_e,et),$}),$}function every(a,_,$){var j=isArray$1(a)?arrayEvery:baseEvery;return $&&isIterateeCall(a,_,$)&&(_=void 0),j(a,baseIteratee(_))}function dropRight(a,_,$){var j=a==null?0:a.length;return j?(_=$||_===void 0?1:toInteger(_),_=j-_,baseSlice(a,0,_<0?0:_)):[]}var asciiSize=baseProperty("length");const asciiSize$1=asciiSize;var rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsVarRange="\\ufe0e\\ufe0f",rsAstral="["+rsAstralRange+"]",rsCombo="["+rsComboRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ="\\u200d",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")",reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g");function unicodeSize(a){for(var _=reUnicode.lastIndex=0;reUnicode.test(a);)++_;return _}function stringSize(a){return hasUnicode(a)?unicodeSize(a):asciiSize$1(a)}var mapTag="[object Map]",setTag="[object Set]";function size(a){if(a==null)return 0;if(isArrayLike(a))return isString(a)?stringSize(a):a.length;var _=getTag$1(a);return _==mapTag||_==setTag?a.size:baseKeys(a).length}var union=baseRest(function(a){return baseUniq(baseFlatten(a,1,isArrayLikeObject,!0))});const _union=union;var Flag=function(a){_inheritsLoose$6(_,a);function _(){return a.apply(this,arguments)||this}var $=_.prototype;return $.render=function(){var _e=this.props,et=_e.className,tt=_e.name,rt=clsx(tt,"flag",et),at=getUnhandledProps$1(_,this.props),ct=getElementType(_,this.props);return React$5.createElement(ct,_extends$1({},at,{className:rt}))},_}(reactExports.PureComponent);Flag.handledProps=["as","className","name"];Flag.propTypes={};Flag.defaultProps={as:"i"};Flag.create=createShorthandFactory(Flag,function(a){return{name:a}});const Flag$1=Flag;function DropdownDivider(a){var _=a.className,$=clsx("divider",_),j=getUnhandledProps$1(DropdownDivider,a),_e=getElementType(DropdownDivider,a);return React$5.createElement(_e,_extends$1({},j,{className:$}))}DropdownDivider.handledProps=["as","className"];DropdownDivider.propTypes={};var DropdownItem=function(a){_inheritsLoose$6(_,a);function _(){for(var j,_e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=a.call.apply(a,[this].concat(et))||this,j.handleClick=function(rt){_invoke(j.props,"onClick",rt,j.props)},j}var $=_.prototype;return $.render=function(){var _e=this.props,et=_e.active,tt=_e.children,rt=_e.className,at=_e.content,ct=_e.disabled,dt=_e.description,yt=_e.flag,bt=_e.icon,Et=_e.image,$t=_e.label,_t=_e.selected,xt=_e.text,St=clsx(useKeyOnly(et,"active"),useKeyOnly(ct,"disabled"),useKeyOnly(_t,"selected"),"item",rt),Mt=isNil(bt)?someByType(tt,"DropdownMenu")&&"dropdown":bt,Tt=getUnhandledProps$1(_,this.props),Rt=getElementType(_,this.props),Ct={role:"option","aria-disabled":ct,"aria-checked":et,"aria-selected":_t};if(!isNil$1(tt))return React$5.createElement(Rt,_extends$1({},Tt,Ct,{className:St,onClick:this.handleClick}),tt);var It=Flag$1.create(yt,{autoGenerateKey:!1}),kt=Icon$2.create(Mt,{autoGenerateKey:!1}),Dt=Image$1.create(Et,{autoGenerateKey:!1}),Bt=Label$1.create($t,{autoGenerateKey:!1}),zt=createShorthand("span",function(nt){return{children:nt}},dt,{defaultProps:{className:"description"},autoGenerateKey:!1}),vt=createShorthand("span",function(nt){return{children:nt}},isNil$1(at)?xt:at,{defaultProps:{className:"text"},autoGenerateKey:!1});return React$5.createElement(Rt,_extends$1({},Tt,Ct,{className:St,onClick:this.handleClick}),Dt,kt,It,Bt,zt,vt)},_}(reactExports.Component);DropdownItem.handledProps=["active","as","children","className","content","description","disabled","flag","icon","image","label","onClick","selected","text","value"];DropdownItem.propTypes={};DropdownItem.create=createShorthandFactory(DropdownItem,function(a){return a});const DropdownItem$1=DropdownItem;function DropdownHeader(a){var _=a.children,$=a.className,j=a.content,_e=a.icon,et=clsx("header",$),tt=getUnhandledProps$1(DropdownHeader,a),rt=getElementType(DropdownHeader,a);return isNil$1(_)?React$5.createElement(rt,_extends$1({},tt,{className:et}),Icon$2.create(_e,{autoGenerateKey:!1}),j):React$5.createElement(rt,_extends$1({},tt,{className:et}),_)}DropdownHeader.handledProps=["as","children","className","content","icon"];DropdownHeader.propTypes={};DropdownHeader.create=createShorthandFactory(DropdownHeader,function(a){return{content:a}});function DropdownMenu(a){var _=a.children,$=a.className,j=a.content,_e=a.direction,et=a.open,tt=a.scrolling,rt=clsx(_e,useKeyOnly(et,"visible"),useKeyOnly(tt,"scrolling"),"menu transition",$),at=getUnhandledProps$1(DropdownMenu,a),ct=getElementType(DropdownMenu,a);return React$5.createElement(ct,_extends$1({},at,{className:rt}),isNil$1(_)?j:_)}DropdownMenu.handledProps=["as","children","className","content","direction","open","scrolling"];DropdownMenu.propTypes={};var DropdownSearchInput=function(a){_inheritsLoose$6(_,a);function _(){for(var j,_e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=a.call.apply(a,[this].concat(et))||this,j.handleChange=function(rt){var at=get(rt,"target.value");_invoke(j.props,"onChange",rt,_extends$1({},j.props,{value:at}))},j}var $=_.prototype;return $.render=function(){var _e=this.props,et=_e.autoComplete,tt=_e.className,rt=_e.tabIndex,at=_e.type,ct=_e.value,dt=clsx("search",tt),yt=getUnhandledProps$1(_,this.props);return React$5.createElement("input",_extends$1({},yt,{"aria-autocomplete":"list",autoComplete:et,className:dt,onChange:this.handleChange,tabIndex:rt,type:at,value:ct}))},_}(reactExports.Component);DropdownSearchInput.handledProps=["as","autoComplete","className","tabIndex","type","value"];DropdownSearchInput.propTypes={};DropdownSearchInput.defaultProps={autoComplete:"off",type:"text"};DropdownSearchInput.create=createShorthandFactory(DropdownSearchInput,function(a){return{type:a}});const DropdownSearchInput$1=DropdownSearchInput;function DropdownText(a){var _=a.children,$=a.className,j=a.content,_e=clsx("divider",$),et=getUnhandledProps$1(DropdownText,a),tt=getElementType(DropdownText,a);return React$5.createElement(tt,_extends$1({"aria-atomic":!0,"aria-live":"polite",role:"alert"},et,{className:_e}),isNil$1(_)?j:_)}DropdownText.handledProps=["as","children","className","content"];DropdownText.propTypes={};DropdownText.create=createShorthandFactory(DropdownText,function(a){return{content:a}});var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reHasRegExpChar=RegExp(reRegExpChar.source);function escapeRegExp(a){return a=toString(a),a&&reHasRegExpChar.test(a)?a.replace(reRegExpChar,"\\$&"):a}function getMenuOptions(a){var _=a.additionLabel,$=a.additionPosition,j=a.allowAdditions,_e=a.deburr,et=a.multiple,tt=a.options,rt=a.search,at=a.searchQuery,ct=a.value,dt=tt;if(et&&(dt=filter(dt,function(_t){return!includes(ct,_t.value)})),rt&&at)if(isFunction(rt))dt=rt(dt,at);else{var yt=_e?deburr(at):at,bt=new RegExp(escapeRegExp(yt),"i");dt=filter(dt,function(_t){return bt.test(_e?deburr(_t.text):_t.text)})}if(j&&rt&&at&&!some(dt,{text:at})){var Et=React$5.isValidElement(_)?React$5.cloneElement(_,{key:"addition-label"}):_||"",$t={key:"addition",text:[Et,React$5.createElement("b",{key:"addition-query"},at)],value:at,className:"addition","data-additional":!0};$==="top"?dt.unshift($t):dt.push($t)}return dt}getMenuOptions.handledProps=[];function getSelectedIndex(a){var _=a.additionLabel,$=a.additionPosition,j=a.allowAdditions,_e=a.deburr,et=a.multiple,tt=a.options,rt=a.search,at=a.searchQuery,ct=a.selectedIndex,dt=a.value,yt=getMenuOptions({value:dt,options:tt,searchQuery:at,additionLabel:_,additionPosition:$,allowAdditions:j,deburr:_e,multiple:et,search:rt}),bt=reduce(yt,function(xt,St,Mt){return St.disabled||xt.push(Mt),xt},[]),Et;if(!ct||ct<0){var $t=bt[0];Et=et?$t:findIndex(yt,["value",dt])||bt[0]}else if(et)Et=_find(bt,function(xt){return xt>=ct}),ct>=yt.length-1&&(Et=bt[bt.length-1]);else{var _t=findIndex(yt,["value",dt]);Et=includes(bt,_t)?_t:void 0}return(!Et||Et<0)&&(Et=bt[0]),Et}var getKeyOrValue=function a(_,$){return isNil(_)?$:_},getKeyAndValues=function a(_){return _&&_.map(function($){return _pick($,["key","value"])})};function renderItemContent(a){var _=a.flag,$=a.image,j=a.text;return isFunction(j)?j:{content:React$5.createElement(React$5.Fragment,null,Flag$1.create(_),Image$1.create($),j)}}var Dropdown=function(a){_inheritsLoose$6(_,a);function _(){for(var j,_e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=a.call.apply(a,[this].concat(et))||this,j.searchRef=reactExports.createRef(),j.sizerRef=reactExports.createRef(),j.ref=reactExports.createRef(),j.handleChange=function(rt,at){_invoke(j.props,"onChange",rt,_extends$1({},j.props,{value:at}))},j.closeOnChange=function(rt){var at=j.props,ct=at.closeOnChange,dt=at.multiple,yt=isUndefined(ct)?!dt:ct;yt&&j.close(rt,noop)},j.closeOnEscape=function(rt){j.props.closeOnEscape&&keyboardKey.getCode(rt)===keyboardKey.Escape&&(rt.preventDefault(),j.close(rt))},j.moveSelectionOnKeyDown=function(rt){var at,ct=j.props,dt=ct.multiple,yt=ct.selectOnNavigation,bt=j.state.open;if(bt){var Et=(at={},at[keyboardKey.ArrowDown]=1,at[keyboardKey.ArrowUp]=-1,at),$t=Et[keyboardKey.getCode(rt)];if($t!==void 0){rt.preventDefault();var _t=j.getSelectedIndexAfterMove($t);!dt&&yt&&j.makeSelectedItemActive(rt,_t),j.setState({selectedIndex:_t})}}},j.openOnSpace=function(rt){var at,ct,dt,yt=j.state.focus&&!j.state.open&&keyboardKey.getCode(rt)===keyboardKey.Spacebar,bt=((at=rt.target)==null?void 0:at.tagName)!=="INPUT"&&((ct=rt.target)==null?void 0:ct.tagName)!=="TEXTAREA"&&((dt=rt.target)==null?void 0:dt.isContentEditable)!==!0;yt&&(bt&&rt.preventDefault(),j.open(rt))},j.openOnArrow=function(rt){var at=j.state,ct=at.focus,dt=at.open;if(ct&&!dt){var yt=keyboardKey.getCode(rt);(yt===keyboardKey.ArrowDown||yt===keyboardKey.ArrowUp)&&(rt.preventDefault(),j.open(rt))}},j.makeSelectedItemActive=function(rt,at){var ct=j.state,dt=ct.open,yt=ct.value,bt=j.props.multiple,Et=j.getSelectedItem(at),$t=get(Et,"value"),_t=get(Et,"disabled");if(isNil($t)||!dt||_t)return yt;var xt=bt?_union(yt,[$t]):$t,St=bt?!!_difference(xt,yt).length:xt!==yt;return St&&(j.setState({value:xt}),j.handleChange(rt,xt),Et["data-additional"]&&_invoke(j.props,"onAddItem",rt,_extends$1({},j.props,{value:$t}))),yt},j.selectItemOnEnter=function(rt){var at=j.props.search,ct=j.state,dt=ct.open,yt=ct.selectedIndex;if(dt){var bt=keyboardKey.getCode(rt)===keyboardKey.Enter||!at&&keyboardKey.getCode(rt)===keyboardKey.Spacebar;if(bt){rt.preventDefault();var Et=size(getMenuOptions({value:j.state.value,options:j.props.options,searchQuery:j.state.searchQuery,additionLabel:j.props.additionLabel,additionPosition:j.props.additionPosition,allowAdditions:j.props.allowAdditions,deburr:j.props.deburr,multiple:j.props.multiple,search:j.props.search}));if(!(at&&Et===0)){var $t=j.makeSelectedItemActive(rt,yt);j.setState({selectedIndex:getSelectedIndex({additionLabel:j.props.additionLabel,additionPosition:j.props.additionPosition,allowAdditions:j.props.allowAdditions,deburr:j.props.deburr,multiple:j.props.multiple,search:j.props.search,selectedIndex:yt,value:$t,options:j.props.options,searchQuery:""})}),j.closeOnChange(rt),j.clearSearchQuery(),at&&_invoke(j.searchRef.current,"focus")}}}},j.removeItemOnBackspace=function(rt){var at=j.props,ct=at.multiple,dt=at.search,yt=j.state,bt=yt.searchQuery,Et=yt.value;if(keyboardKey.getCode(rt)===keyboardKey.Backspace&&!(bt||!dt||!ct||isEmpty(Et))){rt.preventDefault();var $t=dropRight(Et);j.setState({value:$t}),j.handleChange(rt,$t)}},j.closeOnDocumentClick=function(rt){j.props.closeOnBlur&&(j.ref.current&&doesNodeContainClick$1(j.ref.current,rt)||j.close())},j.handleMouseDown=function(rt){j.isMouseDown=!0,_invoke(j.props,"onMouseDown",rt,j.props),document.addEventListener("mouseup",j.handleDocumentMouseUp)},j.handleDocumentMouseUp=function(){j.isMouseDown=!1,document.removeEventListener("mouseup",j.handleDocumentMouseUp)},j.handleClick=function(rt){var at=j.props,ct=at.minCharacters,dt=at.search,yt=j.state,bt=yt.open,Et=yt.searchQuery;if(_invoke(j.props,"onClick",rt,j.props),rt.stopPropagation(),!dt)return j.toggle(rt);if(bt){_invoke(j.searchRef.current,"focus");return}if(Et.length>=ct||ct===1){j.open(rt);return}_invoke(j.searchRef.current,"focus")},j.handleIconClick=function(rt){var at=j.props.clearable,ct=j.hasValue();_invoke(j.props,"onClick",rt,j.props),rt.stopPropagation(),at&&ct?j.clearValue(rt):j.toggle(rt)},j.handleItemClick=function(rt,at){var ct=j.props,dt=ct.multiple,yt=ct.search,bt=j.state.value,Et=at.value;if(rt.stopPropagation(),(dt||at.disabled)&&rt.nativeEvent.stopImmediatePropagation(),!at.disabled){var $t=at["data-additional"],_t=dt?_union(j.state.value,[Et]):Et,xt=dt?!!_difference(_t,bt).length:_t!==bt;xt&&(j.setState({value:_t}),j.handleChange(rt,_t)),j.clearSearchQuery(),_invoke(yt?j.searchRef.current:j.ref.current,"focus"),j.closeOnChange(rt),$t&&_invoke(j.props,"onAddItem",rt,_extends$1({},j.props,{value:Et}))}},j.handleFocus=function(rt){var at=j.state.focus;at||(_invoke(j.props,"onFocus",rt,j.props),j.setState({focus:!0}))},j.handleBlur=function(rt){var at=get(rt,"currentTarget");if(!(at&&at.contains(document.activeElement))){var ct=j.props,dt=ct.closeOnBlur,yt=ct.multiple,bt=ct.selectOnBlur;j.isMouseDown||(_invoke(j.props,"onBlur",rt,j.props),bt&&!yt&&(j.makeSelectedItemActive(rt,j.state.selectedIndex),dt&&j.close()),j.setState({focus:!1}),j.clearSearchQuery())}},j.handleSearchChange=function(rt,at){var ct=at.value;rt.stopPropagation();var dt=j.props.minCharacters,yt=j.state.open,bt=ct;if(_invoke(j.props,"onSearchChange",rt,_extends$1({},j.props,{searchQuery:bt})),j.setState({searchQuery:bt,selectedIndex:0}),!yt&&bt.length>=dt){j.open();return}yt&&dt!==1&&bt.length<dt&&j.close()},j.handleKeyDown=function(rt){j.moveSelectionOnKeyDown(rt),j.openOnArrow(rt),j.openOnSpace(rt),j.selectItemOnEnter(rt),_invoke(j.props,"onKeyDown",rt)},j.getSelectedItem=function(rt){var at=getMenuOptions({value:j.state.value,options:j.props.options,searchQuery:j.state.searchQuery,additionLabel:j.props.additionLabel,additionPosition:j.props.additionPosition,allowAdditions:j.props.allowAdditions,deburr:j.props.deburr,multiple:j.props.multiple,search:j.props.search});return get(at,"["+rt+"]")},j.getItemByValue=function(rt){var at=j.props.options;return _find(at,{value:rt})},j.getDropdownAriaOptions=function(){var rt=j.props,at=rt.loading,ct=rt.disabled,dt=rt.search,yt=rt.multiple,bt=j.state.open,Et={role:dt?"combobox":"listbox","aria-busy":at,"aria-disabled":ct,"aria-expanded":!!bt};return Et.role==="listbox"&&(Et["aria-multiselectable"]=yt),Et},j.clearSearchQuery=function(){var rt=j.state.searchQuery;rt===void 0||rt===""||j.setState({searchQuery:""})},j.handleLabelClick=function(rt,at){rt.stopPropagation(),j.setState({selectedLabel:at.value}),_invoke(j.props,"onLabelClick",rt,at)},j.handleLabelRemove=function(rt,at){rt.stopPropagation();var ct=j.state.value,dt=_without(ct,at.value);j.setState({value:dt}),j.handleChange(rt,dt)},j.getSelectedIndexAfterMove=function(rt,at){at===void 0&&(at=j.state.selectedIndex);var ct=getMenuOptions({value:j.state.value,options:j.props.options,searchQuery:j.state.searchQuery,additionLabel:j.props.additionLabel,additionPosition:j.props.additionPosition,allowAdditions:j.props.allowAdditions,deburr:j.props.deburr,multiple:j.props.multiple,search:j.props.search});if(!(ct===void 0||every(ct,"disabled"))){var dt=ct.length-1,yt=j.props.wrapSelection,bt=at+rt;return!yt&&(bt>dt||bt<0)?bt=at:bt>dt?bt=0:bt<0&&(bt=dt),ct[bt].disabled?j.getSelectedIndexAfterMove(rt,bt):bt}},j.handleIconOverrides=function(rt){var at=j.props.clearable,ct=clsx(at&&j.hasValue()&&"clear",rt.className);return{className:ct,onClick:function(yt){_invoke(rt,"onClick",yt,rt),j.handleIconClick(yt)}}},j.clearValue=function(rt){var at=j.props.multiple,ct=at?[]:"";j.setState({value:ct}),j.handleChange(rt,ct)},j.computeSearchInputTabIndex=function(){var rt=j.props,at=rt.disabled,ct=rt.tabIndex;return isNil(ct)?at?-1:0:ct},j.computeSearchInputWidth=function(){var rt=j.state.searchQuery;if(j.sizerRef.current&&rt){j.sizerRef.current.style.display="inline",j.sizerRef.current.textContent=rt;var at=Math.ceil(j.sizerRef.current.getBoundingClientRect().width);return j.sizerRef.current.style.removeProperty("display"),at}},j.computeTabIndex=function(){var rt=j.props,at=rt.disabled,ct=rt.search,dt=rt.tabIndex;if(!ct)return at?-1:isNil(dt)?0:dt},j.handleSearchInputOverrides=function(rt){return{onChange:function(ct,dt){_invoke(rt,"onChange",ct,dt),j.handleSearchChange(ct,dt)}}},j.hasValue=function(){var rt=j.props.multiple,at=j.state.value;return rt?!isEmpty(at):!isNil(at)&&at!==""},j.scrollSelectedItemIntoView=function(){if(j.ref.current){var rt=j.ref.current.querySelector(".menu.visible");if(rt){var at=rt.querySelector(".item.selected");if(at){var ct=at.offsetTop<rt.scrollTop,dt=at.offsetTop+at.clientHeight>rt.scrollTop+rt.clientHeight;ct?rt.scrollTop=at.offsetTop:dt&&(rt.scrollTop=at.offsetTop+at.clientHeight-rt.clientHeight)}}}},j.setOpenDirection=function(){if(j.ref.current){var rt=j.ref.current.querySelector(".menu.visible");if(rt){var at=j.ref.current.getBoundingClientRect(),ct=rt.clientHeight,dt=document.documentElement.clientHeight-at.top-at.height-ct,yt=at.top-ct,bt=dt<0&&yt>dt;!bt!=!j.state.upward&&j.setState({upward:bt})}}},j.open=function(rt,at){rt===void 0&&(rt=null),at===void 0&&(at=!0);var ct=j.props,dt=ct.disabled,yt=ct.search;dt||(yt&&_invoke(j.searchRef.current,"focus"),_invoke(j.props,"onOpen",rt,j.props),at&&j.setState({open:!0}),j.scrollSelectedItemIntoView())},j.close=function(rt,at){at===void 0&&(at=j.handleClose),j.state.open&&(_invoke(j.props,"onClose",rt,j.props),j.setState({open:!1},at))},j.handleClose=function(){var rt=document.activeElement===j.searchRef.current;!rt&&j.ref.current&&j.ref.current.blur();var at=document.activeElement===j.ref.current,ct=rt||at;j.setState({focus:ct})},j.toggle=function(rt){return j.state.open?j.close(rt):j.open(rt)},j.renderText=function(){var rt=j.props,at=rt.multiple,ct=rt.placeholder,dt=rt.search,yt=rt.text,bt=j.state,Et=bt.searchQuery,$t=bt.selectedIndex,_t=bt.value,xt=bt.open,St=j.hasValue(),Mt=clsx(ct&&!St&&"default","text",dt&&Et&&"filtered"),Tt=ct,Rt;return yt?Tt=yt:xt&&!at?Rt=j.getSelectedItem($t):St&&(Rt=j.getItemByValue(_t)),DropdownText.create(Rt?renderItemContent(Rt):Tt,{defaultProps:{className:Mt}})},j.renderSearchInput=function(){var rt=j.props,at=rt.search,ct=rt.searchInput,dt=j.state.searchQuery;return at&&React$5.createElement(Ref,{innerRef:j.searchRef},DropdownSearchInput$1.create(ct,{defaultProps:{style:{width:j.computeSearchInputWidth()},tabIndex:j.computeSearchInputTabIndex(),value:dt},overrideProps:j.handleSearchInputOverrides}))},j.renderSearchSizer=function(){var rt=j.props,at=rt.search,ct=rt.multiple;return at&&ct&&React$5.createElement("span",{className:"sizer",ref:j.sizerRef})},j.renderLabels=function(){var rt=j.props,at=rt.multiple,ct=rt.renderLabel,dt=j.state,yt=dt.selectedLabel,bt=dt.value;if(!(!at||isEmpty(bt))){var Et=map(bt,j.getItemByValue);return map(compact(Et),function($t,_t){var xt={active:$t.value===yt,as:"a",key:getKeyOrValue($t.key,$t.value),onClick:j.handleLabelClick,onRemove:j.handleLabelRemove,value:$t.value};return Label$1.create(ct($t,_t,xt),{defaultProps:xt})})}},j.renderOptions=function(){var rt=j.props,at=rt.lazyLoad,ct=rt.multiple,dt=rt.search,yt=rt.noResultsMessage,bt=j.state,Et=bt.open,$t=bt.selectedIndex,_t=bt.value;if(at&&!Et)return null;var xt=getMenuOptions({value:j.state.value,options:j.props.options,searchQuery:j.state.searchQuery,additionLabel:j.props.additionLabel,additionPosition:j.props.additionPosition,allowAdditions:j.props.allowAdditions,deburr:j.props.deburr,multiple:j.props.multiple,search:j.props.search});if(yt!==null&&dt&&isEmpty(xt))return React$5.createElement("div",{className:"message"},yt);var St=ct?function(Mt){return includes(_t,Mt)}:function(Mt){return Mt===_t};return map(xt,function(Mt,Tt){return DropdownItem$1.create(_extends$1({active:St(Mt.value),selected:$t===Tt},Mt,{key:getKeyOrValue(Mt.key,Mt.value),style:_extends$1({},Mt.style,{pointerEvents:"all"})}),{generateKey:!1,overrideProps:function(Ct){return{onClick:function(kt,Dt){Ct.onClick==null||Ct.onClick(kt,Dt),j.handleItemClick(kt,Dt)}}}})})},j.renderMenu=function(){var rt=j.props,at=rt.children,ct=rt.direction,dt=rt.header,yt=j.state.open,bt=j.getDropdownMenuAriaOptions();if(!isNil$1(at)){var Et=reactExports.Children.only(at),$t=clsx(ct,useKeyOnly(yt,"visible"),Et.props.className);return reactExports.cloneElement(Et,_extends$1({className:$t},bt))}return React$5.createElement(DropdownMenu,_extends$1({},bt,{direction:ct,open:yt}),DropdownHeader.create(dt,{autoGenerateKey:!1}),j.renderOptions())},j}var $=_.prototype;return $.getInitialAutoControlledState=function(){return{focus:!1,searchQuery:""}},_.getAutoControlledStateFromProps=function(_e,et,tt){var rt={__options:_e.options,__value:et.value},at=!shallowEqual(tt.__value,et.value)||!isEqual(getKeyAndValues(_e.options),getKeyAndValues(tt.__options));return at&&(rt.selectedIndex=getSelectedIndex({additionLabel:_e.additionLabel,additionPosition:_e.additionPosition,allowAdditions:_e.allowAdditions,deburr:_e.deburr,multiple:_e.multiple,search:_e.search,selectedIndex:et.selectedIndex,value:et.value,options:_e.options,searchQuery:et.searchQuery})),rt},$.componentDidMount=function(){var _e=this.state.open;_e&&this.open(null,!1)},$.shouldComponentUpdate=function(_e,et){return!shallowEqual(_e,this.props)||!shallowEqual(et,this.state)},$.componentDidUpdate=function(_e,et){var tt=this.props,rt=tt.closeOnBlur,at=tt.minCharacters,ct=tt.openOnFocus,dt=tt.search;if(!et.focus&&this.state.focus){if(!this.isMouseDown){var yt=!dt||dt&&at===1&&!this.state.open;ct&&yt&&this.open()}}else et.focus&&!this.state.focus&&!this.isMouseDown&&rt&&this.close();!et.open&&this.state.open?(this.setOpenDirection(),this.scrollSelectedItemIntoView()):et.open&&this.state.open,et.selectedIndex!==this.state.selectedIndex&&this.scrollSelectedItemIntoView()},$.getDropdownMenuAriaOptions=function(){var _e=this.props,et=_e.search,tt=_e.multiple,rt={};return et&&(rt["aria-multiselectable"]=tt,rt.role="listbox"),rt},$.render=function(){var _e=this.props,et=_e.basic,tt=_e.button,rt=_e.className,at=_e.compact,ct=_e.disabled,dt=_e.error,yt=_e.fluid,bt=_e.floating,Et=_e.icon,$t=_e.inline,_t=_e.item,xt=_e.labeled,St=_e.loading,Mt=_e.multiple,Tt=_e.pointing,Rt=_e.search,Ct=_e.selection,It=_e.scrolling,kt=_e.simple,Dt=_e.trigger,Bt=this.state,zt=Bt.focus,vt=Bt.open,nt=Bt.upward,st=clsx("ui",useKeyOnly(vt,"active visible"),useKeyOnly(ct,"disabled"),useKeyOnly(dt,"error"),useKeyOnly(St,"loading"),useKeyOnly(et,"basic"),useKeyOnly(tt,"button"),useKeyOnly(at,"compact"),useKeyOnly(yt,"fluid"),useKeyOnly(bt,"floating"),useKeyOnly($t,"inline"),useKeyOnly(xt,"labeled"),useKeyOnly(_t,"item"),useKeyOnly(Mt,"multiple"),useKeyOnly(Rt,"search"),useKeyOnly(Ct,"selection"),useKeyOnly(kt,"simple"),useKeyOnly(It,"scrolling"),useKeyOnly(nt,"upward"),useKeyOrValueAndKey(Tt,"pointing"),"dropdown",rt),lt=getUnhandledProps$1(_,this.props),ht=getElementType(_,this.props),mt=this.getDropdownAriaOptions(ht,this.props);return React$5.createElement(Ref,{innerRef:this.ref},React$5.createElement(ht,_extends$1({},lt,mt,{className:st,onBlur:this.handleBlur,onClick:this.handleClick,onKeyDown:this.handleKeyDown,onMouseDown:this.handleMouseDown,onFocus:this.handleFocus,onChange:this.handleChange,tabIndex:this.computeTabIndex()}),this.renderLabels(),this.renderSearchInput(),this.renderSearchSizer(),Dt||this.renderText(),Icon$2.create(Et,{overrideProps:this.handleIconOverrides,autoGenerateKey:!1}),this.renderMenu(),vt&&React$5.createElement(EventStack,{name:"keydown",on:this.closeOnEscape}),vt&&React$5.createElement(EventStack,{name:"click",on:this.closeOnDocumentClick}),zt&&React$5.createElement(EventStack,{name:"keydown",on:this.removeItemOnBackspace})))},_}(ModernAutoControlledComponent);Dropdown.handledProps=["additionLabel","additionPosition","allowAdditions","as","basic","button","children","className","clearable","closeOnBlur","closeOnChange","closeOnEscape","compact","deburr","defaultOpen","defaultSearchQuery","defaultSelectedLabel","defaultUpward","defaultValue","direction","disabled","error","floating","fluid","header","icon","inline","item","labeled","lazyLoad","loading","minCharacters","multiple","noResultsMessage","onAddItem","onBlur","onChange","onClick","onClose","onFocus","onLabelClick","onMouseDown","onOpen","onSearchChange","open","openOnFocus","options","placeholder","pointing","renderLabel","scrolling","search","searchInput","searchQuery","selectOnBlur","selectOnNavigation","selectedLabel","selection","simple","tabIndex","text","trigger","upward","value","wrapSelection"];Dropdown.propTypes={};Dropdown.defaultProps={additionLabel:"Add ",additionPosition:"top",closeOnBlur:!0,closeOnEscape:!0,deburr:!1,icon:"dropdown",minCharacters:1,noResultsMessage:"No results found.",openOnFocus:!0,renderLabel:renderItemContent,searchInput:"text",selectOnBlur:!0,selectOnNavigation:!0,wrapSelection:!0};Dropdown.autoControlledProps=["open","searchQuery","selectedLabel","value","upward"];Dropdown.Divider=DropdownDivider;Dropdown.Header=DropdownHeader;Dropdown.Item=DropdownItem$1;Dropdown.Menu=DropdownMenu;Dropdown.SearchInput=DropdownSearchInput$1;Dropdown.Text=DropdownText;function Select(a){return React$5.createElement(Dropdown,_extends$1({},a,{selection:!0}))}Select.handledProps=["options"];Select.propTypes={};Select.Divider=Dropdown.Divider;Select.Header=Dropdown.Header;Select.Item=Dropdown.Item;Select.Menu=Dropdown.Menu;var TextArea=function(a){_inheritsLoose$6(_,a);function _(){for(var j,_e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=a.call.apply(a,[this].concat(et))||this,j.ref=reactExports.createRef(),j.focus=function(){return j.ref.current.focus()},j.handleChange=function(rt){var at=get(rt,"target.value");_invoke(j.props,"onChange",rt,_extends$1({},j.props,{value:at}))},j.handleInput=function(rt){var at=get(rt,"target.value");_invoke(j.props,"onInput",rt,_extends$1({},j.props,{value:at}))},j}var $=_.prototype;return $.render=function(){var _e=this.props,et=_e.rows,tt=_e.value,rt=getUnhandledProps$1(_,this.props),at=getElementType(_,this.props);return React$5.createElement(Ref,{innerRef:this.ref},React$5.createElement(at,_extends$1({},rt,{onChange:this.handleChange,onInput:this.handleInput,rows:et,value:tt})))},_}(reactExports.Component);TextArea.handledProps=["as","onChange","onInput","rows","value"];TextArea.propTypes={};TextArea.defaultProps={as:"textarea",rows:3};const TextArea$1=TextArea;function FormField(a){var _=a.children,$=a.className,j=a.content,_e=a.control,et=a.disabled,tt=a.error,rt=a.inline,at=a.label,ct=a.required,dt=a.type,yt=a.width,bt=a.id,Et=clsx(useKeyOnly(et,"disabled"),useKeyOnly(tt,"error"),useKeyOnly(rt,"inline"),useKeyOnly(ct,"required"),useWidthProp(yt,"wide"),"field",$),$t=getUnhandledProps$1(FormField,a),_t=getElementType(FormField,a),xt=get(tt,"pointing","above"),St=Label$1.create(tt,{autoGenerateKey:!1,defaultProps:{prompt:!0,pointing:xt,id:bt?bt+"-error-message":void 0,role:"alert","aria-atomic":!0}}),Mt=(xt==="below"||xt==="right")&&St,Tt=(xt==="above"||xt==="left")&&St;if(isNil(_e))return isNil(at)?React$5.createElement(_t,_extends$1({},$t,{className:Et,id:bt}),isNil$1(_)?j:_):React$5.createElement(_t,_extends$1({},$t,{className:Et,id:bt}),Mt,createHTMLLabel(at,{autoGenerateKey:!1}),Tt);var Rt=bt&&tt?bt+"-error-message":null,Ct={"aria-describedby":Rt,"aria-invalid":tt?!0:void 0},It=_extends$1({},$t,{content:j,children:_,disabled:et,required:ct,type:dt,id:bt});return _e==="input"&&(dt==="checkbox"||dt==="radio")?React$5.createElement(_t,{className:Et},React$5.createElement("label",null,Mt,reactExports.createElement(_e,_extends$1({},Ct,It))," ",at,Tt)):_e===Checkbox||_e===Radio?React$5.createElement(_t,{className:Et},Mt,reactExports.createElement(_e,_extends$1({},Ct,It,{label:at})),Tt):React$5.createElement(_t,{className:Et},createHTMLLabel(at,{defaultProps:{htmlFor:bt},autoGenerateKey:!1}),Mt,reactExports.createElement(_e,_extends$1({},Ct,It)),Tt)}FormField.handledProps=["as","children","className","content","control","disabled","error","id","inline","label","required","type","width"];FormField.propTypes={};function FormButton(a){var _=a.control,$=getUnhandledProps$1(FormButton,a),j=getElementType(FormButton,a);return React$5.createElement(j,_extends$1({},$,{control:_}))}FormButton.handledProps=["as","control"];FormButton.propTypes={};FormButton.defaultProps={as:FormField,control:Button$2};function FormCheckbox(a){var _=a.control,$=getUnhandledProps$1(FormCheckbox,a),j=getElementType(FormCheckbox,a);return React$5.createElement(j,_extends$1({},$,{control:_}))}FormCheckbox.handledProps=["as","control"];FormCheckbox.propTypes={};FormCheckbox.defaultProps={as:FormField,control:Checkbox};function FormDropdown(a){var _=a.control,$=getUnhandledProps$1(FormDropdown,a),j=getElementType(FormDropdown,a);return React$5.createElement(j,_extends$1({},$,{control:_}))}FormDropdown.handledProps=["as","control"];FormDropdown.propTypes={};FormDropdown.defaultProps={as:FormField,control:Dropdown};function FormGroup(a){var _=a.children,$=a.className,j=a.grouped,_e=a.inline,et=a.unstackable,tt=a.widths,rt=clsx(useKeyOnly(j,"grouped"),useKeyOnly(_e,"inline"),useKeyOnly(et,"unstackable"),useWidthProp(tt,null,!0),"fields",$),at=getUnhandledProps$1(FormGroup,a),ct=getElementType(FormGroup,a);return React$5.createElement(ct,_extends$1({},at,{className:rt}),_)}FormGroup.handledProps=["as","children","className","grouped","inline","unstackable","widths"];FormGroup.propTypes={};var Input$2=function(a){_inheritsLoose$6(_,a);function _(){for(var j,_e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=a.call.apply(a,[this].concat(et))||this,j.inputRef=reactExports.createRef(),j.computeIcon=function(){var rt=j.props,at=rt.loading,ct=rt.icon;if(!isNil(ct))return ct;if(at)return"spinner"},j.computeTabIndex=function(){var rt=j.props,at=rt.disabled,ct=rt.tabIndex;if(!isNil(ct))return ct;if(at)return-1},j.focus=function(rt){return j.inputRef.current.focus(rt)},j.select=function(){return j.inputRef.current.select()},j.handleChange=function(rt){var at=get(rt,"target.value");_invoke(j.props,"onChange",rt,_extends$1({},j.props,{value:at}))},j.handleChildOverrides=function(rt,at){return _extends$1({},at,rt.props,{ref:function(dt){handleRef(rt.ref,dt),j.inputRef.current=dt}})},j.partitionProps=function(){var rt=j.props,at=rt.disabled,ct=rt.type,dt=j.computeTabIndex(),yt=getUnhandledProps$1(_,j.props),bt=partitionHTMLProps(yt),Et=bt[0],$t=bt[1];return[_extends$1({},Et,{disabled:at,type:ct,tabIndex:dt,onChange:j.handleChange,ref:j.inputRef}),$t]},j}var $=_.prototype;return $.render=function(){var _e=this,et=this.props,tt=et.action,rt=et.actionPosition,at=et.children,ct=et.className,dt=et.disabled,yt=et.error,bt=et.fluid,Et=et.focus,$t=et.icon,_t=et.iconPosition,xt=et.input,St=et.inverted,Mt=et.label,Tt=et.labelPosition,Rt=et.loading,Ct=et.size,It=et.transparent,kt=et.type,Dt=clsx("ui",Ct,useKeyOnly(dt,"disabled"),useKeyOnly(yt,"error"),useKeyOnly(bt,"fluid"),useKeyOnly(Et,"focus"),useKeyOnly(St,"inverted"),useKeyOnly(Rt,"loading"),useKeyOnly(It,"transparent"),useValueAndKey(rt,"action")||useKeyOnly(tt,"action"),useValueAndKey(_t,"icon")||useKeyOnly($t||Rt,"icon"),useValueAndKey(Tt,"labeled")||useKeyOnly(Mt,"labeled"),"input",ct),Bt=getElementType(_,this.props),zt=this.partitionProps(),vt=zt[0],nt=zt[1];if(!isNil$1(at)){var st=map(reactExports.Children.toArray(at),function(mt){return mt.type!=="input"?mt:reactExports.cloneElement(mt,_e.handleChildOverrides(mt,vt))});return React$5.createElement(Bt,_extends$1({},nt,{className:Dt}),st)}var lt=Button$2.create(tt,{autoGenerateKey:!1}),ht=Label$1.create(Mt,{defaultProps:{className:clsx("label",includes(Tt,"corner")&&Tt)},autoGenerateKey:!1});return React$5.createElement(Bt,_extends$1({},nt,{className:Dt}),rt==="left"&&lt,Tt!=="right"&&ht,createHTMLInput(xt||kt,{defaultProps:vt,autoGenerateKey:!1}),Icon$2.create(this.computeIcon(),{autoGenerateKey:!1}),rt!=="left"&&lt,Tt==="right"&&ht)},_}(reactExports.Component);Input$2.handledProps=["action","actionPosition","as","children","className","disabled","error","fluid","focus","icon","iconPosition","input","inverted","label","labelPosition","loading","onChange","size","tabIndex","transparent","type"];Input$2.propTypes={};Input$2.defaultProps={type:"text"};Input$2.create=createShorthandFactory(Input$2,function(a){return{type:a}});const Input$3=Input$2;function FormInput(a){var _=a.control,$=getUnhandledProps$1(FormInput,a),j=getElementType(FormInput,a);return React$5.createElement(j,_extends$1({},$,{control:_}))}FormInput.handledProps=["as","control"];FormInput.propTypes={};FormInput.defaultProps={as:FormField,control:Input$3};function FormRadio(a){var _=a.control,$=getUnhandledProps$1(FormRadio,a),j=getElementType(FormRadio,a);return React$5.createElement(j,_extends$1({},$,{control:_}))}FormRadio.handledProps=["as","control"];FormRadio.propTypes={};FormRadio.defaultProps={as:FormField,control:Radio};function FormSelect(a){var _=a.control,$=a.options,j=getUnhandledProps$1(FormSelect,a),_e=getElementType(FormSelect,a);return React$5.createElement(_e,_extends$1({},j,{control:_,options:$}))}FormSelect.handledProps=["as","control","options"];FormSelect.propTypes={};FormSelect.defaultProps={as:FormField,control:Select};function FormTextArea(a){var _=a.control,$=getUnhandledProps$1(FormTextArea,a),j=getElementType(FormTextArea,a);return React$5.createElement(j,_extends$1({},$,{control:_}))}FormTextArea.handledProps=["as","control"];FormTextArea.propTypes={};FormTextArea.defaultProps={as:FormField,control:TextArea$1};var Form=function(a){_inheritsLoose$6(_,a);function _(){for(var j,_e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=a.call.apply(a,[this].concat(et))||this,j.handleSubmit=function(rt){var at=j.props.action;typeof at!="string"&&_invoke(rt,"preventDefault");for(var ct=arguments.length,dt=new Array(ct>1?ct-1:0),yt=1;yt<ct;yt++)dt[yt-1]=arguments[yt];_invoke.apply(void 0,[j.props,"onSubmit",rt,j.props].concat(dt))},j}var $=_.prototype;return $.render=function(){var _e=this.props,et=_e.action,tt=_e.children,rt=_e.className,at=_e.error,ct=_e.inverted,dt=_e.loading,yt=_e.reply,bt=_e.size,Et=_e.success,$t=_e.unstackable,_t=_e.warning,xt=_e.widths,St=clsx("ui",bt,useKeyOnly(at,"error"),useKeyOnly(ct,"inverted"),useKeyOnly(dt,"loading"),useKeyOnly(yt,"reply"),useKeyOnly(Et,"success"),useKeyOnly($t,"unstackable"),useKeyOnly(_t,"warning"),useWidthProp(xt,null,!0),"form",rt),Mt=getUnhandledProps$1(_,this.props),Tt=getElementType(_,this.props);return React$5.createElement(Tt,_extends$1({},Mt,{action:et,className:St,onSubmit:this.handleSubmit}),tt)},_}(reactExports.Component);Form.handledProps=["action","as","children","className","error","inverted","loading","onSubmit","reply","size","success","unstackable","warning","widths"];Form.propTypes={};Form.defaultProps={as:"form"};Form.Field=FormField;Form.Button=FormButton;Form.Checkbox=FormCheckbox;Form.Dropdown=FormDropdown;Form.Group=FormGroup;Form.Input=FormInput;Form.Radio=FormRadio;Form.Select=FormSelect;Form.TextArea=FormTextArea;const Form$1=Form;function SegmentGroup(a){var _=a.children,$=a.className,j=a.compact,_e=a.content,et=a.horizontal,tt=a.piled,rt=a.raised,at=a.size,ct=a.stacked,dt=clsx("ui",at,useKeyOnly(j,"compact"),useKeyOnly(et,"horizontal"),useKeyOnly(tt,"piled"),useKeyOnly(rt,"raised"),useKeyOnly(ct,"stacked"),"segments",$),yt=getUnhandledProps$1(SegmentGroup,a),bt=getElementType(SegmentGroup,a);return React$5.createElement(bt,_extends$1({},yt,{className:dt}),isNil$1(_)?_e:_)}SegmentGroup.handledProps=["as","children","className","compact","content","horizontal","piled","raised","size","stacked"];SegmentGroup.propTypes={};function SegmentInline(a){var _=a.children,$=a.className,j=a.content,_e=clsx("inline",$),et=getUnhandledProps$1(SegmentInline,a),tt=getElementType(SegmentInline,a);return React$5.createElement(tt,_extends$1({},et,{className:_e}),isNil$1(_)?j:_)}SegmentInline.handledProps=["as","children","className","content"];SegmentInline.propTypes={};function Segment(a){var _=a.attached,$=a.basic,j=a.children,_e=a.circular,et=a.className,tt=a.clearing,rt=a.color,at=a.compact,ct=a.content,dt=a.disabled,yt=a.floated,bt=a.inverted,Et=a.loading,$t=a.placeholder,_t=a.padded,xt=a.piled,St=a.raised,Mt=a.secondary,Tt=a.size,Rt=a.stacked,Ct=a.tertiary,It=a.textAlign,kt=a.vertical,Dt=clsx("ui",rt,Tt,useKeyOnly($,"basic"),useKeyOnly(_e,"circular"),useKeyOnly(tt,"clearing"),useKeyOnly(at,"compact"),useKeyOnly(dt,"disabled"),useKeyOnly(bt,"inverted"),useKeyOnly(Et,"loading"),useKeyOnly($t,"placeholder"),useKeyOnly(xt,"piled"),useKeyOnly(St,"raised"),useKeyOnly(Mt,"secondary"),useKeyOnly(Rt,"stacked"),useKeyOnly(Ct,"tertiary"),useKeyOnly(kt,"vertical"),useKeyOrValueAndKey(_,"attached"),useKeyOrValueAndKey(_t,"padded"),useTextAlignProp(It),useValueAndKey(yt,"floated"),"segment",et),Bt=getUnhandledProps$1(Segment,a),zt=getElementType(Segment,a);return React$5.createElement(zt,_extends$1({},Bt,{className:Dt}),isNil$1(j)?ct:j)}Segment.handledProps=["as","attached","basic","children","circular","className","clearing","color","compact","content","disabled","floated","inverted","loading","padded","piled","placeholder","raised","secondary","size","stacked","tertiary","textAlign","vertical"];Segment.Group=SegmentGroup;Segment.Inline=SegmentInline;Segment.propTypes={};function _defineProperties(a,_){for(var $=0;$<_.length;$++){var j=_[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(a,j.key,j)}}function _createClass(a,_,$){return _&&_defineProperties(a.prototype,_),$&&_defineProperties(a,$),Object.defineProperty(a,"prototype",{writable:!1}),a}function _extends(){return _extends=Object.assign?Object.assign.bind():function(a){for(var _=1;_<arguments.length;_++){var $=arguments[_];for(var j in $)Object.prototype.hasOwnProperty.call($,j)&&(a[j]=$[j])}return a},_extends.apply(this,arguments)}function _inheritsLoose(a,_){a.prototype=Object.create(_.prototype),a.prototype.constructor=a,_setPrototypeOf(a,_)}function _setPrototypeOf(a,_){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,_e){return j.__proto__=_e,j},_setPrototypeOf(a,_)}function _objectWithoutPropertiesLoose(a,_){if(a==null)return{};var $={},j=Object.keys(a),_e,et;for(et=0;et<j.length;et++)_e=j[et],!(_.indexOf(_e)>=0)&&($[_e]=a[_e]);return $}var keys={enter:13,escape:27,space:32},isSelectable=function a(_,$,j){return!($&&isBefore$1(_,$)||j&&isBefore$1(j,_))},getToday=function a(_,$){var j=new Date;return{date:startOfDay$1(j),nextMonth:!1,prevMonth:!1,selectable:isSelectable(j,_,$),selected:!1,today:!0}},formatDate=function a(_,$,j){return _?format(startOfDay$1(_),convertTokens_2($),j):void 0},omit=function a(_,$){var j=_extends({},$);return _.forEach(function(_e){return delete j[_e]}),j},pick=function a(_,$){var j={};return _.forEach(function(_e){j[_e]=$[_e]}),j},moveElementsByN=function a(_,$){return $.slice(_).concat($.slice(0,_))},formatSelectedDate=function a(_,$,j){return _?Array.isArray(_)?_.map(function(_e){return formatDate(_e,$,j)}).join(" - "):formatDate(_,$,j):""},parseFormatString=function a(_){return _.replace(/[D, Y]/gi,function($){return $.toLowerCase()})},parseOnBlur=function a(_,$){return parse(_,parseFormatString($),new Date)},parseRangeOnBlur=function a(_,$){var j=parseFormatString($),_e=_.split(" - ");return _e.map(function(et){return parse(et,j,new Date)}).sort(function(et,tt){return et>tt?1:-1})},onlyNumbers=function a(_){return _===void 0&&(_=""),_.replace(/[^\d]/g,"")};function getShortDate(a){if(a)return format(a,"yyyy-MM-dd")}function composeEventHandlers(){for(var a=arguments.length,_=new Array(a),$=0;$<a;$++)_[$]=arguments[$];return function(j){for(var _e=arguments.length,et=new Array(_e>1?_e-1:0),tt=1;tt<_e;tt++)et[tt-1]=arguments[tt];return _.some(function(rt){return rt&&rt.apply(void 0,[j].concat(et)),j.defaultPrevented})}}function getArrowKeyHandlers(a){return function(_){var $=_.keyCode,j={37:a.left,39:a.right,38:a.up,40:a.down}[$];j&&j(_)}}function isInRange(a,_){return a.length===2&&a[0]<=_&&a[1]>=_}var _excluded$6=["refKey"],_excluded2$1=["children"],BaseDatePicker=function(a){_inheritsLoose(_,a);function _(){for(var j,_e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=a.call.apply(a,[this].concat(et))||this,j.state={offset:0},j.rootNode=React$5.createRef(),j.handleArrowKeys=getArrowKeyHandlers({left:function(){return j.getKeyOffset(-1)},right:function(){return j.getKeyOffset(1)},up:function(){return j.getKeyOffset(-7)},down:function(){return j.getKeyOffset(7)}}),j.getRootProps=function(rt){var at,ct=rt===void 0?{}:rt,dt=ct.refKey,yt=dt===void 0?"ref":dt,bt=_objectWithoutPropertiesLoose(ct,_excluded$6);return _extends((at={},at[yt]=j.rootNode,at.onKeyDown=j.handleArrowKeys,at),bt)},j._handleOffsetChanged=function(rt){j.setState({offset:rt})},j}var $=_.prototype;return $.getKeyOffset=function(_e){if(this.rootNode.current){var et=document.activeElement,tt=Array.from(this.rootNode.current.querySelectorAll("button:not(:disabled)"));tt.some(function(rt,at){var ct=at+_e;return rt!==et?!1:ct<=tt.length-1&&ct>=0?(tt[ct].focus(),!0):(tt[0].focus(),!0)})}},$.componentDidUpdate=function(_e){this.props.date!==_e.date&&this._handleOffsetChanged(0)},$.render=function(){var _e=this,et=this.props,tt=et.children,rt=_objectWithoutPropertiesLoose(et,_excluded2$1);return jsxRuntimeExports.jsx(Dayzed,_extends({},rt,{offset:this.state.offset,onOffsetChanged:this._handleOffsetChanged,render:function(ct){return tt(_extends({},ct,{getRootProps:_e.getRootProps}))}}))},_}(React$5.Component),DatePicker=function(a){_inheritsLoose(_,a);function _(){for(var j,_e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=a.call.apply(a,[this].concat(et))||this,j._handleOnDateSelected=function(rt,at){var ct=rt.selectable,dt=rt.date,yt=j.props,bt=yt.clearOnSameDateClick,Et=yt.selected,$t=yt.onChange;if(ct){var _t=dt;Et&&Et.getTime()===dt.getTime()&&bt&&(_t=null),$t&&$t(at,_t)}},j}var $=_.prototype;return $.render=function(){return jsxRuntimeExports.jsx(BaseDatePicker,_extends({},this.props,{onDateSelected:this._handleOnDateSelected}))},_}(React$5.Component),_excluded$5=["onMouseEnter","onFocus"],_excluded2=["children"],_excluded3=["getRootProps","getDateProps"],RangeDatePicker=function(a){_inheritsLoose(_,a);function _(){for(var j,_e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=a.call.apply(a,[this].concat(et))||this,j.state={hoveredDate:null},j.setHoveredDate=function(rt){j.setState(function(at){return at.hoveredDate===rt?null:{hoveredDate:rt}})},j.onMouseLeave=function(){j.setHoveredDate(null)},j._handleOnDateSelected=function(rt,at){var ct=rt.selectable,dt=rt.date,yt=j.props,bt=yt.selected,Et=yt.onChange;if(ct){var $t=dt.getTime(),_t=[].concat(bt);if(bt.length)if(bt.length===1){var xt=bt[0].getTime();xt<$t?_t.push(dt):_t.unshift(dt)}else _t.length===2&&(_t=[dt]);else _t.push(dt);Et&&Et(at,_t),_t.length===2&&j.setHoveredDate(null)}},j.getEnhancedDateProps=function(rt,at,ct){var dt=ct.onMouseEnter,yt=ct.onFocus,bt=_objectWithoutPropertiesLoose(ct,_excluded$5),Et=j.state.hoveredDate,$t=bt.dateObj.date;return rt(_extends({},bt,{inRange:isInRange(at,$t),start:at[0]&&isSameDay(at[0],$t),end:at[1]&&isSameDay(at[1],$t),hovered:Et&&isSameDay(Et,$t),onMouseEnter:composeEventHandlers(dt,function(){j.onHoverFocusDate($t)}),onFocus:composeEventHandlers(yt,function(){j.onHoverFocusDate($t)})}))},j.getEnhancedRootProps=function(rt,at){return rt(_extends({},at,{onMouseLeave:j.onMouseLeave}))},j}var $=_.prototype;return $.onHoverFocusDate=function(_e){this.props.selected.length===1&&this.setHoveredDate(_e)},$.render=function(){var _e=this,et=this.props,tt=et.children,rt=_objectWithoutPropertiesLoose(et,_excluded2),at=this.state.hoveredDate,ct=this.props.selected,dt=ct.length===2||!ct.length||!at?ct:[ct[0],at].sort(compareAsc);return jsxRuntimeExports.jsx(BaseDatePicker,_extends({},rt,{onDateSelected:this._handleOnDateSelected,children:function(bt){var Et=bt.getRootProps,$t=bt.getDateProps,_t=_objectWithoutPropertiesLoose(bt,_excluded3);return tt(_extends({},_t,{getRootProps:_e.getEnhancedRootProps.bind(_e,Et),getDateProps:_e.getEnhancedDateProps.bind(_e,$t,dt)}))}}))},_}(React$5.Component);RangeDatePicker.defaultProps={selected:[]};var _excluded$4=["icon"],CustomButton=function a(_){var $=_.icon,j=_objectWithoutPropertiesLoose(_,_excluded$4);return jsxRuntimeExports.jsx(Button$2,_extends({basic:!0,compact:!0,icon:$,type:"button"},j))};function styleInject(a,_){_===void 0&&(_={});var $=_.insertAt;if(!(!a||typeof document>"u")){var j=document.head||document.getElementsByTagName("head")[0],_e=document.createElement("style");_e.type="text/css",$==="top"&&j.firstChild?j.insertBefore(_e,j.firstChild):j.appendChild(_e),_e.styleSheet?_e.styleSheet.cssText=a:_e.appendChild(document.createTextNode(a))}}var css_248z$1=".clndr-cell{background-color:#fff;border:none;color:inherit;cursor:pointer;font-family:inherit;height:30px;padding:5px 0;transition:all .2s}.clndr-cell.inverted{background-color:#4f4f4f}.clndr-cell.inverted:hover{background-color:#757575;color:inherit}.clndr-cell:hover{background-color:#cacbcd;color:inherit}.clndr-cell-today{background-color:#e0e1e2}.clndr-cell-inrange{background-color:#cacbcd;color:inherit}.clndr-cell-inrange.inverted{background-color:#757575;color:inherit}.clndr-cell-disabled{cursor:default;opacity:.45}.clndr-cell-disabled:hover{background-color:#fff}.clndr-cell-disabled.inverted:hover{background-color:#4f4f4f;color:inherit}.clndr-cell-selected{background-color:#4f4f4f;color:#f2f2f2}.clndr-cell-selected.inverted{background-color:#fff;color:#000}.clndr-cell-other-month{color:#d9d9d9}.clndr-cell-other-month.inverted{color:#a6a6a6}";styleInject(css_248z$1);var _excluded$3=["children","end","hovered","inRange","inverted","nextMonth","prevMonth","selectable","selected","start","today"],CalendarCell=function a(_){var $=_.children,j=_.inRange,_e=_.inverted,et=_.nextMonth,tt=_.prevMonth,rt=_.selectable,at=_.selected,ct=_.today,dt=_objectWithoutPropertiesLoose(_,_excluded$3),yt=classNames("clndr-cell",{inverted:_e,"clndr-cell-today":ct,"clndr-cell-disabled":!rt,"clndr-cell-other-month":et||tt,"clndr-cell-inrange":j,"clndr-cell-selected":at});return $?jsxRuntimeExports.jsx("button",_extends({className:yt,disabled:!rt,type:"button"},dt,{children:$})):jsxRuntimeExports.jsx("span",_extends({className:yt,tabIndex:$?0:-1},dt,{children:$}))};CalendarCell.defaultProps={end:!1,hovered:!1,inRange:!1,nextMonth:!1,prevMonth:!1,start:!1};var _excluded$2=["aria-label","children","end","hovered","inRange","nextMonth","prevMonth","selectable","selected","start","today"],style$1={marginTop:10},TodayButton=function a(_){var $=_["aria-label"],j=_.children,_e=_objectWithoutPropertiesLoose(_,_excluded$2);return jsxRuntimeExports.jsx(Button$2,_extends({"aria-label":$+", "+j,className:"clndr-button-today",compact:!0,"data-testid":"datepicker-today-button",fluid:!0,style:style$1,type:"button"},_e,{children:j}))},css_248z=".clndr-calendars-segment{margin-bottom:.25rem!important;margin-top:.25rem!important;text-align:center}.clndr-calendars-segment.clndr-floating{position:absolute!important;z-index:2000}.clndr-calendars-wrapper{grid-gap:1em;display:grid;grid-template-columns:repeat(var(--n,1),1fr)}.clndr-control{align-items:center;display:grid;grid-template-columns:repeat(3,1fr);margin-bottom:10px}.clndr-days{grid-gap:1px;background-color:rgba(0,0,0,.1);border:1px solid rgba(0,0,0,.1);border-radius:.28571429rem;display:grid;grid-template-columns:repeat(7,minmax(2.2rem,1fr));overflow:hidden;text-align:center}.clndr-left{left:0}.clndr-right{right:0}.clndr-top{bottom:100%}.clndr-bottom{top:100%}.clndr-calendars-segment.clndr-top{box-shadow:0 -1px 2px 0 rgba(34,36,38,.15)!important;margin-bottom:.25rem!important}";styleInject(css_248z);var _excluded$1=["ref"],styles$7={leftBtn:{textAlign:"start"},rightBtn:{textAlign:"end"}},pointings={"top left":"clndr-top clndr-left","top right":"clndr-top clndr-right",left:"clndr-left",right:"clndr-right"},Calendar=function a(_){var $,j=_.calendars,_e=_.filterDate,et=_.getBackProps,tt=_.getDateProps,rt=_.getForwardProps,at=_.getRootProps,ct=_.inline,dt=_.inverted,yt=_.maxDate,bt=_.minDate,Et=_.months,$t=_.nextMonth,_t=_.nextYear,xt=_.previousMonth,St=_.previousYear,Mt=_.showToday,Tt=_.todayButton,Rt=_.weekdays,Ct=_.pointing,It=at(),kt=It.ref,Dt=_objectWithoutPropertiesLoose(It,_excluded$1),Bt=reactExports.useRef(),zt=function(nt){Bt.current=nt.target.getAttribute("aria-label")};return reactExports.useEffect(function(){if(Bt.current){var vt='[aria-label="'+Bt.current+'"]',nt=document.querySelector(vt);nt&&document.activeElement!==nt&&nt.focus()}}),jsxRuntimeExports.jsx(Ref,{innerRef:kt,children:jsxRuntimeExports.jsxs(Segment,_extends({},Dt,{inverted:dt,className:classNames("clndr-calendars-segment",($={"clndr-floating":!ct},$[pointings[Ct]]=!ct,$)),children:[jsxRuntimeExports.jsx("div",{className:"clndr-calendars-wrapper",style:{"--n":j.length},children:j.map(function(vt,nt){return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:"clndr-control",children:[jsxRuntimeExports.jsx("div",{style:styles$7.leftBtn,children:nt===0&&jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(CustomButton,_extends({icon:"angle double left",inverted:dt,title:St,type:"button"},et({calendars:j,"aria-label":St,offset:12,onClick:zt}))),jsxRuntimeExports.jsx(CustomButton,_extends({icon:"angle left",inverted:dt,style:{marginRight:0},title:xt,type:"button"},et({calendars:j,"aria-label":xt,onClick:zt})))]})}),jsxRuntimeExports.jsxs("span",{title:Et[vt.month]+" "+vt.year,children:[Et[vt.month].slice(0,3)," ",vt.year]}),jsxRuntimeExports.jsx("div",{style:styles$7.rightBtn,children:nt===j.length-1&&jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(CustomButton,_extends({icon:"angle right",inverted:dt,title:$t,type:"button"},rt({calendars:j,"aria-label":$t,onClick:zt}))),jsxRuntimeExports.jsx(CustomButton,_extends({icon:"angle double right",inverted:dt,style:{marginRight:0},title:_t,type:"button"},rt({calendars:j,"aria-label":_t,offset:12,onClick:zt})))]})})]}),jsxRuntimeExports.jsxs("div",{className:"clndr-days",children:[Rt.map(function(st){return jsxRuntimeExports.jsx(CalendarCell,{inverted:dt,"aria-label":st,title:st,children:st.slice(0,2)},vt.year+"-"+vt.month+"-"+st)}),vt.weeks.map(function(st){return st.map(function(lt,ht){var mt=vt.year+"-"+vt.month+"-"+ht;if(!lt)return jsxRuntimeExports.jsx(CalendarCell,{inverted:dt},mt);var wt=lt.selectable&&_e(lt.date),At=getShortDate(lt.date);return jsxRuntimeExports.jsx(CalendarCell,_extends({},lt,tt({dateObj:_extends({},lt,{selectable:wt}),onClick:zt}),{"data-testid":"datepicker-cell-"+At,inverted:dt,selectable:wt,children:lt.date.getDate()}),mt)})})]})]},vt.year+"-"+vt.month)})}),Mt?jsxRuntimeExports.jsx(TodayButton,_extends({inverted:dt},getToday(bt,yt),tt({dateObj:getToday(bt,yt),onClick:zt}),{children:Tt})):null]}))})},CustomIcon=function a(_){var $=_.clearIcon,j=_.icon,_e=_.isClearIconVisible,et=_.onClear,tt=_.onClick;return _e&&$&&React$5.isValidElement($)?React$5.cloneElement($,{"data-testid":"datepicker-clear-icon",onClick:et}):_e&&$&&!React$5.isValidElement($)?jsxRuntimeExports.jsx(Icon$2,{"aria-pressed":"false","data-testid":"datepicker-clear-icon",link:!0,name:$,onClick:et}):j&&React$5.isValidElement(j)?React$5.cloneElement(j,{"data-testid":"datepicker-icon",onClick:tt}):jsxRuntimeExports.jsx(Icon$2,{"data-testid":"datepicker-icon",name:j})},_excluded=["clearIcon","error","icon","isClearIconVisible","label","onClear","onFocus","required","value"],inputData={"data-testid":"datepicker-input"},CustomInput=React$5.forwardRef(function(a,_){var $=a.clearIcon,j=a.error,_e=a.icon,et=a.isClearIconVisible,tt=a.label,rt=a.onClear,at=a.onFocus,ct=a.required,dt=a.value,yt=_objectWithoutPropertiesLoose(a,_excluded);return jsxRuntimeExports.jsxs(Form$1.Field,{error:j,required:ct,children:[tt?jsxRuntimeExports.jsx("label",{htmlFor:yt.id,children:tt}):null,jsxRuntimeExports.jsx(Input$3,_extends({},yt,{ref:_,error:j,required:ct,icon:jsxRuntimeExports.jsx(CustomIcon,{clearIcon:$,icon:_e,isClearIconVisible:et,onClear:rt,onClick:at}),input:inputData,onFocus:at,value:dt}))]})}),style$2={display:"inline-block",position:"relative"},semanticInputProps=["autoComplete","autoFocus","className","clearIcon","disabled","error","icon","iconPosition","id","label","loading","name","onBlur","onChange","onClick","onContextMenu","onDoubleClick","onFocus","onInput","onKeyDown","onKeyPress","onKeyUp","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","placeholder","required","size","tabIndex","transparent","readOnly"],SemanticDatepicker=function(a){_inheritsLoose(_,a);function _(){for(var j,_e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=a.call.apply(a,[this].concat(et))||this,j.el=React$5.createRef(),j.inputRef=React$5.createRef(),j.state=j.initialState,j.Component=j.isRangeInput?RangeDatePicker:DatePicker,j.resetState=function(rt){var at=j.props,ct=at.keepOpenOnClear,dt=at.onChange,yt={isVisible:ct,selectedDate:j.isRangeInput?[]:null,selectedDateFormatted:""};ct&&j.focusOnInput(),j.setState(yt,function(){dt(rt,_extends({},j.props,{value:null}))})},j.clearInput=function(rt){j.resetState(rt)},j.mousedownCb=function(rt){var at=j.state.isVisible;at&&j.el&&j.el.current&&!j.el.current.contains(rt.target)&&j.close()},j.keydownCb=function(rt){var at=j.state.isVisible;rt.keyCode===keys.escape&&at&&j.close()},j.close=function(){window.removeEventListener("keydown",j.keydownCb),window.removeEventListener("mousedown",j.mousedownCb),j.setState({isVisible:!1})},j.focusOnInput=function(){var rt;if((rt=j.inputRef)!=null&&rt.current){var at=j.inputRef.current,ct=at.focus,dt=at.inputRef;document.activeElement!==dt.current&&ct()}},j.showCalendar=function(rt){var at=j.props.onFocus;at(rt),window.addEventListener("mousedown",j.mousedownCb),window.addEventListener("keydown",j.keydownCb),j.focusOnInput(),j.setState({isVisible:!0})},j.handleRangeInput=function(rt,at){var ct=j.props,dt=ct.format,yt=ct.keepOpenOnSelect,bt=ct.onChange,Et=ct.formatOptions;if(!rt||!rt.length){j.resetState(at);return}var $t={selectedDate:rt,selectedDateFormatted:formatSelectedDate(rt,dt,Et),typedValue:null};j.setState($t,function(){bt(at,_extends({},j.props,{value:rt})),rt.length===2&&j.setState({isVisible:yt})})},j.handleBasicInput=function(rt,at){var ct=j.props,dt=ct.format,yt=ct.keepOpenOnSelect,bt=ct.onChange,Et=ct.formatOptions;if(!rt){j.resetState(at);return}var $t={isVisible:yt,selectedDate:rt,selectedDateFormatted:formatSelectedDate(rt,dt,Et),typedValue:null};j.setState($t,function(){bt(at,_extends({},j.props,{value:rt}))})},j.handleBlur=function(rt){var at=j.props,ct=at.format,dt=at.onBlur,yt=at.onChange,bt=j.state.typedValue;if(rt&&dt(rt),!!bt){if(j.isRangeInput){var Et=parseRangeOnBlur(String(bt),ct),$t=Et.every(isValid);if($t){j.handleRangeInput(Et,rt);return}}else{var _t=parseOnBlur(String(bt),ct),xt=isValid(_t);if(xt){j.handleBasicInput(_t,rt);return}}j.setState({typedValue:null},function(){yt(rt,_extends({},j.props,{value:null}))})}},j.handleChange=function(rt,at){var ct=at.value,dt=j.props,yt=dt.allowOnlyNumbers,bt=dt.format,Et=dt.onChange,$t=j.isRangeInput?bt+" - "+bt:bt,_t=yt?onlyNumbers(ct):ct;if(!_t){var xt={selectedDate:j.isRangeInput?[]:null,selectedDateFormatted:"",typedValue:null};j.setState(xt,function(){Et(rt,_extends({},j.props,{value:null}))});return}j.setState({selectedDate:j.isRangeInput?[]:null,selectedDateFormatted:"",typedValue:formatStringByPattern($t,_t)})},j.handleKeyDown=function(rt){rt.keyCode===keys.enter&&j.handleBlur()},j.onDateSelected=function(rt,at){j.isRangeInput?j.handleRangeInput(at,rt):j.handleBasicInput(at,rt)},j}var $=_.prototype;return $.componentDidUpdate=function(_e){var et=this.props,tt=et.locale,rt=et.value;isEqual$1(rt,_e.value)||this.onDateSelected(void 0,rt),tt!==_e.locale&&this.setState({locale:this.locale})},$.render=function(){var _e=this,et=this.state,tt=et.isVisible,rt=et.locale,at=et.selectedDate,ct=et.selectedDateFormatted,dt=et.typedValue,yt=this.props,bt=yt.clearable,Et=yt.pointing,$t=yt.filterDate,_t=yt.inline,xt=yt.inverted,St=yt.readOnly,Mt=yt.datePickerOnly,Tt=jsxRuntimeExports.jsx(this.Component,_extends({},this.dayzedProps,{monthsToDisplay:this.isRangeInput?2:1,onChange:this.onDateSelected,selected:at,date:this.date,children:function(Ct){return jsxRuntimeExports.jsx(Calendar,_extends({},_e.dayzedProps,Ct,rt,{filterDate:$t,inverted:xt,pointing:Et,weekdays:_e.weekdays}))}}));return _t?Tt:jsxRuntimeExports.jsxs("div",{className:"field",style:style$2,ref:this.el,children:[jsxRuntimeExports.jsx(CustomInput,_extends({},this.inputProps,{isClearIconVisible:!!(bt&&ct),onBlur:this.handleBlur,onChange:this.handleChange,onClear:this.clearInput,onFocus:St?null:this.showCalendar,onKeyDown:this.handleKeyDown,readOnly:St||Mt,ref:this.inputRef,value:dt||ct})),tt&&Tt]})},_createClass(_,[{key:"isRangeInput",get:function(){return this.props.type==="range"}},{key:"initialState",get:function(){var _e=this.props,et=_e.format,tt=_e.value,rt=_e.formatOptions,at=this.isRangeInput?[]:null;return{isVisible:!1,locale:this.locale,selectedDate:tt||at,selectedDateFormatted:formatSelectedDate(tt,et,rt),typedValue:null}}},{key:"dayzedProps",get:function(){return omit(semanticInputProps,this.props)}},{key:"inputProps",get:function(){var _e=pick(semanticInputProps,this.props),et=_e.placeholder!==void 0?_e.placeholder:this.props.format;return _extends({},_e,{placeholder:et})}},{key:"date",get:function(){var _e=this.state.selectedDate,et=this.props.date;return et||!_e?et:this.isRangeInput?_e[0]:_e}},{key:"locale",get:function(){var _e=this.props.locale,et;try{et=commonjsRequire("./locales/"+_e+".json")}catch{console.warn('"'+_e+'" is not a valid locale'),et=require$$0}return et}},{key:"weekdays",get:function(){var _e=this.dayzedProps.firstDayOfWeek,et=this.state.locale.weekdays;return moveElementsByN(_e,et)}}]),_}(React$5.Component);SemanticDatepicker.defaultProps={allowOnlyNumbers:!1,autoFocus:!1,clearIcon:"close",clearOnSameDateClick:!0,clearable:!0,date:void 0,filterDate:function a(){return!0},firstDayOfWeek:0,format:"YYYY-MM-DD",icon:"calendar",id:void 0,inline:!1,keepOpenOnClear:!1,keepOpenOnSelect:!1,label:void 0,locale:"en-US",name:void 0,onBlur:function a(){},onChange:function a(){},onFocus:function a(){},placeholder:void 0,pointing:"left",readOnly:!1,datePickerOnly:!1,required:!1,showToday:!0,showOutsideDays:!1,type:"basic",value:null,inverted:!1};const reactSemanticUiDatepickers_esm=Object.freeze(Object.defineProperty({__proto__:null,default:SemanticDatepicker},Symbol.toStringTag,{value:"Module"})),require$$2=getAugmentedNamespace(reactSemanticUiDatepickers_esm),reactSemanticUiDatepickers="";var Input$1={},Button={},hasRequiredButton;function requireButton(){if(hasRequiredButton)return Button;hasRequiredButton=1;var a=interopRequireDefaultExports;Button.__esModule=!0;var _=a(requireButton$1());return Button.default=_.default,Button}var Icon={},hasRequiredIcon;function requireIcon(){if(hasRequiredIcon)return Icon;hasRequiredIcon=1;var a=interopRequireDefaultExports;Icon.__esModule=!0;var _=a(Icon$4);return Icon.default=_.default,Icon}var Label={},hasRequiredLabel;function requireLabel(){if(hasRequiredLabel)return Label;hasRequiredLabel=1;var a=interopRequireDefaultExports;Label.__esModule=!0;var _=a(requireLabel$1());return Label.default=_.default,Label}var _interopRequireWildcard$1=interopRequireWildcardExports,_interopRequireDefault$2=interopRequireDefaultExports;Input$1.__esModule=!0;Input$1.default=void 0;var _extends2$2=_interopRequireDefault$2(require_extends()),_inheritsLoose2$1=_interopRequireDefault$2(requireInheritsLoose()),_includes2$1=_interopRequireDefault$2(requireIncludes()),_map2=_interopRequireDefault$2(requireMap()),_invoke2$1=_interopRequireDefault$2(requireInvoke()),_get2=_interopRequireDefault$2(requireGet()),_isNil2=_interopRequireDefault$2(requireIsNil()),_reactComponentRef$1=require$$10,_clsx$2=_interopRequireDefault$2(require$$0$4);_interopRequireDefault$2(requirePropTypes());var _react$2=_interopRequireWildcard$1(reactExports),_lib$2=requireLib(),_Button=_interopRequireDefault$2(requireButton()),_Icon$2=_interopRequireDefault$2(requireIcon()),_Label=_interopRequireDefault$2(requireLabel()),Input=function(a){(0,_inheritsLoose2$1.default)(_,a);function _(){for(var j,_e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=a.call.apply(a,[this].concat(et))||this,j.inputRef=(0,_react$2.createRef)(),j.computeIcon=function(){var rt=j.props,at=rt.loading,ct=rt.icon;if(!(0,_isNil2.default)(ct))return ct;if(at)return"spinner"},j.computeTabIndex=function(){var rt=j.props,at=rt.disabled,ct=rt.tabIndex;if(!(0,_isNil2.default)(ct))return ct;if(at)return-1},j.focus=function(rt){return j.inputRef.current.focus(rt)},j.select=function(){return j.inputRef.current.select()},j.handleChange=function(rt){var at=(0,_get2.default)(rt,"target.value");(0,_invoke2$1.default)(j.props,"onChange",rt,(0,_extends2$2.default)({},j.props,{value:at}))},j.handleChildOverrides=function(rt,at){return(0,_extends2$2.default)({},at,rt.props,{ref:function(dt){(0,_reactComponentRef$1.handleRef)(rt.ref,dt),j.inputRef.current=dt}})},j.partitionProps=function(){var rt=j.props,at=rt.disabled,ct=rt.type,dt=j.computeTabIndex(),yt=(0,_lib$2.getUnhandledProps)(_,j.props),bt=(0,_lib$2.partitionHTMLProps)(yt),Et=bt[0],$t=bt[1];return[(0,_extends2$2.default)({},Et,{disabled:at,type:ct,tabIndex:dt,onChange:j.handleChange,ref:j.inputRef}),$t]},j}var $=_.prototype;return $.render=function(){var _e=this,et=this.props,tt=et.action,rt=et.actionPosition,at=et.children,ct=et.className,dt=et.disabled,yt=et.error,bt=et.fluid,Et=et.focus,$t=et.icon,_t=et.iconPosition,xt=et.input,St=et.inverted,Mt=et.label,Tt=et.labelPosition,Rt=et.loading,Ct=et.size,It=et.transparent,kt=et.type,Dt=(0,_clsx$2.default)("ui",Ct,(0,_lib$2.useKeyOnly)(dt,"disabled"),(0,_lib$2.useKeyOnly)(yt,"error"),(0,_lib$2.useKeyOnly)(bt,"fluid"),(0,_lib$2.useKeyOnly)(Et,"focus"),(0,_lib$2.useKeyOnly)(St,"inverted"),(0,_lib$2.useKeyOnly)(Rt,"loading"),(0,_lib$2.useKeyOnly)(It,"transparent"),(0,_lib$2.useValueAndKey)(rt,"action")||(0,_lib$2.useKeyOnly)(tt,"action"),(0,_lib$2.useValueAndKey)(_t,"icon")||(0,_lib$2.useKeyOnly)($t||Rt,"icon"),(0,_lib$2.useValueAndKey)(Tt,"labeled")||(0,_lib$2.useKeyOnly)(Mt,"labeled"),"input",ct),Bt=(0,_lib$2.getElementType)(_,this.props),zt=this.partitionProps(),vt=zt[0],nt=zt[1];if(!_lib$2.childrenUtils.isNil(at)){var st=(0,_map2.default)(_react$2.Children.toArray(at),function(mt){return mt.type!=="input"?mt:(0,_react$2.cloneElement)(mt,_e.handleChildOverrides(mt,vt))});return _react$2.default.createElement(Bt,(0,_extends2$2.default)({},nt,{className:Dt}),st)}var lt=_Button.default.create(tt,{autoGenerateKey:!1}),ht=_Label.default.create(Mt,{defaultProps:{className:(0,_clsx$2.default)("label",(0,_includes2$1.default)(Tt,"corner")&&Tt)},autoGenerateKey:!1});return _react$2.default.createElement(Bt,(0,_extends2$2.default)({},nt,{className:Dt}),rt==="left"&&lt,Tt!=="right"&&ht,(0,_lib$2.createHTMLInput)(xt||kt,{defaultProps:vt,autoGenerateKey:!1}),_Icon$2.default.create(this.computeIcon(),{autoGenerateKey:!1}),rt!=="left"&&lt,Tt==="right"&&ht)},_}(_react$2.Component);Input.handledProps=["action","actionPosition","as","children","className","disabled","error","fluid","focus","icon","iconPosition","input","inverted","label","labelPosition","loading","onChange","size","tabIndex","transparent","type"];Input.propTypes={};Input.defaultProps={type:"text"};Input.create=(0,_lib$2.createShorthandFactory)(Input,function(a){return{type:a}});var _default$2=Input;Input$1.default=_default$2;var input={};Object.defineProperty(input,"__esModule",{value:!0});input.getInputValueLength=void 0;function getInputValueLength(a){return a==null?0:typeof a=="string"?a.length:a.toString().length}input.getInputValueLength=getInputValueLength;var Blockie$2={},blockies$1={exports:{}};(function(a){(function(){var _=new Array(4);function $(dt){for(var yt=0;yt<_.length;yt++)_[yt]=0;for(var yt=0;yt<dt.length;yt++)_[yt%4]=(_[yt%4]<<5)-_[yt%4]+dt.charCodeAt(yt)}function j(){var dt=_[0]^_[0]<<11;return _[0]=_[1],_[1]=_[2],_[2]=_[3],_[3]=_[3]^_[3]>>19^dt^dt>>8,(_[3]>>>0)/(1<<31>>>0)}function _e(){var dt=Math.floor(j()*360),yt=j()*60+40+"%",bt=(j()+j()+j()+j())*25+"%",Et="hsl("+dt+","+yt+","+bt+")";return Et}function et(dt){for(var yt=dt,bt=dt,Et=Math.ceil(yt/2),$t=yt-Et,_t=[],xt=0;xt<bt;xt++){for(var St=[],Mt=0;Mt<Et;Mt++)St[Mt]=Math.floor(j()*2.3);var Tt=St.slice(0,$t);Tt.reverse(),St=St.concat(Tt);for(var Rt=0;Rt<St.length;Rt++)_t.push(St[Rt])}return _t}function tt(dt){var yt={};return yt.size=dt.size||8,yt.scale=dt.scale||4,yt.seed=dt.seed||Math.floor(Math.random()*Math.pow(10,16)).toString(16),yt.color=dt.color||_e(),yt.bgcolor=dt.bgcolor||_e(),yt.spotcolor=dt.spotcolor||_e(),$(yt.seed),yt}function rt(bt,yt){var bt=tt(bt||{}),Et=et(bt.size),$t=Math.sqrt(Et.length);yt.width=yt.height=bt.size*bt.scale;var _t=yt.getContext("2d");_t.fillStyle=bt.bgcolor,_t.fillRect(0,0,yt.width,yt.height),_t.fillStyle=bt.color;for(var xt=0;xt<Et.length;xt++)if(Et[xt]){var St=Math.floor(xt/$t),Mt=xt%$t;_t.fillStyle=Et[xt]==1?bt.color:bt.spotcolor,_t.fillRect(Mt*bt.scale,St*bt.scale,bt.scale,bt.scale)}return yt}function at(yt){var yt=tt(yt||{}),bt=document.createElement("canvas");return rt(yt,bt),bt}var ct={create:at,render:rt};a.exports=ct,typeof window<"u"&&(window.blockies=ct)})()})(blockies$1);var blockiesExports=blockies$1.exports;const Blockie$1="";var __extends$2=commonjsGlobal&&commonjsGlobal.__extends||function(){var a=function(_,$){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(j,_e){j.__proto__=_e}||function(j,_e){for(var et in _e)Object.prototype.hasOwnProperty.call(_e,et)&&(j[et]=_e[et])},a(_,$)};return function(_,$){if(typeof $!="function"&&$!==null)throw new TypeError("Class extends value "+String($)+" is not a constructor or null");a(_,$);function j(){this.constructor=_}_.prototype=$===null?Object.create($):(j.prototype=$.prototype,new j)}}(),__createBinding$2=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(a,_,$,j){j===void 0&&(j=$);var _e=Object.getOwnPropertyDescriptor(_,$);(!_e||("get"in _e?!_.__esModule:_e.writable||_e.configurable))&&(_e={enumerable:!0,get:function(){return _[$]}}),Object.defineProperty(a,j,_e)}:function(a,_,$,j){j===void 0&&(j=$),a[j]=_[$]}),__setModuleDefault$2=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(a,_){Object.defineProperty(a,"default",{enumerable:!0,value:_})}:function(a,_){a.default=_}),__importStar$2=commonjsGlobal&&commonjsGlobal.__importStar||function(a){if(a&&a.__esModule)return a;var _={};if(a!=null)for(var $ in a)$!=="default"&&Object.prototype.hasOwnProperty.call(a,$)&&__createBinding$2(_,a,$);return __setModuleDefault$2(_,a),_};Object.defineProperty(Blockie$2,"__esModule",{value:!0});Blockie$2.Blockie=void 0;var React$2=__importStar$2(reactExports),blockies=__importStar$2(blockiesExports),Blockie=function(a){__extends$2(_,a);function _(){var $=a!==null&&a.apply(this,arguments)||this;return $.canvas=React$2.createRef(),$}return _.prototype.componentDidMount=function(){this.draw()},_.prototype.componentDidUpdate=function(){this.draw()},_.prototype.getOpts=function(){var $=this.props,j=$.seed,_e=$.color,et=$.spotcolor,tt=$.bgcolor,rt=$.size,at=$.scale;return{seed:j?j.toLowerCase():"",color:_e,spotcolor:et,bgcolor:tt,size:rt,scale:at}},_.prototype.draw=function(){if(!this.canvas||!this.canvas.current)return"🦄";var $=this.props,j=$.size,_e=$.scale,et=this.canvas.current.getContext("2d");et.clearRect(0,0,j*_e,j*_e),blockies.render(this.getOpts(),this.canvas.current)},_.prototype.render=function(){var $=this.props,j=$.size,_e=$.scale,et=$.children,tt=$.className,rt="dcl blockie ".concat(tt).trim();_e*j<=16?rt+=" mini":_e*j<=24?rt+=" tiny":_e*j<=36&&(rt+=" small");var at=React$2.createElement("canvas",{className:rt,ref:this.canvas});return et?React$2.createElement("span",{className:"dcl blockie-wrapper"},at,React$2.createElement("span",{className:"dcl blockie-children"},et)):at},_.defaultProps={color:"#e449c2",bgcolor:"#3149de",spotcolor:"#e449c2",size:6,scale:6,className:""},_}(React$2.PureComponent);Blockie$2.Blockie=Blockie;var Header$3={},Header$2={},Image={},hasRequiredImage;function requireImage(){if(hasRequiredImage)return Image;hasRequiredImage=1;var a=interopRequireDefaultExports;Image.__esModule=!0;var _=a(requireImage$1());return Image.default=_.default,Image}var HeaderSubheader={},hasRequiredHeaderSubheader;function requireHeaderSubheader(){if(hasRequiredHeaderSubheader)return HeaderSubheader;hasRequiredHeaderSubheader=1;var a=interopRequireDefaultExports;HeaderSubheader.__esModule=!0,HeaderSubheader.default=void 0;var _=a(require_extends()),$=a(require$$0$4);a(requirePropTypes());var j=a(reactExports),_e=requireLib();function et(rt){var at=rt.children,ct=rt.className,dt=rt.content,yt=(0,$.default)("sub header",ct),bt=(0,_e.getUnhandledProps)(et,rt),Et=(0,_e.getElementType)(et,rt);return j.default.createElement(Et,(0,_.default)({},bt,{className:yt}),_e.childrenUtils.isNil(at)?dt:at)}et.handledProps=["as","children","className","content"],et.propTypes={},et.create=(0,_e.createShorthandFactory)(et,function(rt){return{content:rt}});var tt=et;return HeaderSubheader.default=tt,HeaderSubheader}var HeaderContent={},hasRequiredHeaderContent;function requireHeaderContent(){if(hasRequiredHeaderContent)return HeaderContent;hasRequiredHeaderContent=1;var a=interopRequireDefaultExports;HeaderContent.__esModule=!0,HeaderContent.default=void 0;var _=a(require_extends()),$=a(require$$0$4);a(requirePropTypes());var j=a(reactExports),_e=requireLib();function et(rt){var at=rt.children,ct=rt.className,dt=rt.content,yt=(0,$.default)("content",ct),bt=(0,_e.getUnhandledProps)(et,rt),Et=(0,_e.getElementType)(et,rt);return j.default.createElement(Et,(0,_.default)({},bt,{className:yt}),_e.childrenUtils.isNil(at)?dt:at)}et.handledProps=["as","children","className","content"],et.propTypes={};var tt=et;return HeaderContent.default=tt,HeaderContent}var _interopRequireDefault$1=interopRequireDefaultExports;Header$2.__esModule=!0;Header$2.default=void 0;var _extends2$1=_interopRequireDefault$1(require_extends());_interopRequireDefault$1(requireWithout());var _clsx$1=_interopRequireDefault$1(require$$0$4);_interopRequireDefault$1(requirePropTypes());var _react$1=_interopRequireDefault$1(reactExports),_lib$1=requireLib(),_Icon$1=_interopRequireDefault$1(requireIcon()),_Image=_interopRequireDefault$1(requireImage()),_HeaderSubheader=_interopRequireDefault$1(requireHeaderSubheader()),_HeaderContent=_interopRequireDefault$1(requireHeaderContent());function Header$1(a){var _=a.attached,$=a.block,j=a.children,_e=a.className,et=a.color,tt=a.content,rt=a.disabled,at=a.dividing,ct=a.floated,dt=a.icon,yt=a.image,bt=a.inverted,Et=a.size,$t=a.sub,_t=a.subheader,xt=a.textAlign,St=(0,_clsx$1.default)("ui",et,Et,(0,_lib$1.useKeyOnly)($,"block"),(0,_lib$1.useKeyOnly)(rt,"disabled"),(0,_lib$1.useKeyOnly)(at,"dividing"),(0,_lib$1.useValueAndKey)(ct,"floated"),(0,_lib$1.useKeyOnly)(dt===!0,"icon"),(0,_lib$1.useKeyOnly)(yt===!0,"image"),(0,_lib$1.useKeyOnly)(bt,"inverted"),(0,_lib$1.useKeyOnly)($t,"sub"),(0,_lib$1.useKeyOrValueAndKey)(_,"attached"),(0,_lib$1.useTextAlignProp)(xt),"header",_e),Mt=(0,_lib$1.getUnhandledProps)(Header$1,a),Tt=(0,_lib$1.getElementType)(Header$1,a);if(!_lib$1.childrenUtils.isNil(j))return _react$1.default.createElement(Tt,(0,_extends2$1.default)({},Mt,{className:St}),j);var Rt=_Icon$1.default.create(dt,{autoGenerateKey:!1}),Ct=_Image.default.create(yt,{autoGenerateKey:!1}),It=_HeaderSubheader.default.create(_t,{autoGenerateKey:!1});return Rt||Ct?_react$1.default.createElement(Tt,(0,_extends2$1.default)({},Mt,{className:St}),Rt||Ct,(tt||It)&&_react$1.default.createElement(_HeaderContent.default,null,tt,It)):_react$1.default.createElement(Tt,(0,_extends2$1.default)({},Mt,{className:St}),tt,It)}Header$1.handledProps=["as","attached","block","children","className","color","content","disabled","dividing","floated","icon","image","inverted","size","sub","subheader","textAlign"];Header$1.propTypes={};Header$1.Content=_HeaderContent.default;Header$1.Subheader=_HeaderSubheader.default;var _default$1=Header$1;Header$2.default=_default$1;const Header="";(function(a){var _=commonjsGlobal&&commonjsGlobal.__importDefault||function(j){return j&&j.__esModule?j:{default:j}};Object.defineProperty(a,"__esModule",{value:!0}),a.Header=void 0;var $=Header$2;Object.defineProperty(a,"Header",{enumerable:!0,get:function(){return _($).default}})})(Header$3);const Field$1="";var __extends$1=commonjsGlobal&&commonjsGlobal.__extends||function(){var a=function(_,$){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(j,_e){j.__proto__=_e}||function(j,_e){for(var et in _e)Object.prototype.hasOwnProperty.call(_e,et)&&(j[et]=_e[et])},a(_,$)};return function(_,$){if(typeof $!="function"&&$!==null)throw new TypeError("Class extends value "+String($)+" is not a constructor or null");a(_,$);function j(){this.constructor=_}_.prototype=$===null?Object.create($):(j.prototype=$.prototype,new j)}}(),__assign=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign=Object.assign||function(a){for(var _,$=1,j=arguments.length;$<j;$++){_=arguments[$];for(var _e in _)Object.prototype.hasOwnProperty.call(_,_e)&&(a[_e]=_[_e])}return a},__assign.apply(this,arguments)},__createBinding$1=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(a,_,$,j){j===void 0&&(j=$);var _e=Object.getOwnPropertyDescriptor(_,$);(!_e||("get"in _e?!_.__esModule:_e.writable||_e.configurable))&&(_e={enumerable:!0,get:function(){return _[$]}}),Object.defineProperty(a,j,_e)}:function(a,_,$,j){j===void 0&&(j=$),a[j]=_[$]}),__setModuleDefault$1=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(a,_){Object.defineProperty(a,"default",{enumerable:!0,value:_})}:function(a,_){a.default=_}),__importStar$1=commonjsGlobal&&commonjsGlobal.__importStar||function(a){if(a&&a.__esModule)return a;var _={};if(a!=null)for(var $ in a)$!=="default"&&Object.prototype.hasOwnProperty.call(a,$)&&__createBinding$1(_,a,$);return __setModuleDefault$1(_,a),_},__rest=commonjsGlobal&&commonjsGlobal.__rest||function(a,_){var $={};for(var j in a)Object.prototype.hasOwnProperty.call(a,j)&&_.indexOf(j)<0&&($[j]=a[j]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,j=Object.getOwnPropertySymbols(a);_e<j.length;_e++)_.indexOf(j[_e])<0&&Object.prototype.propertyIsEnumerable.call(a,j[_e])&&($[j[_e]]=a[j[_e]]);return $},__importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Field$2,"__esModule",{value:!0});var Field_2=Field$2.Field=void 0,React$1=__importStar$1(reactExports),Icon_1=__importDefault(Icon$4),react_semantic_ui_datepickers_1=__importDefault(require$$2),Input_1=__importDefault(Input$1),classnames_1=__importDefault(classnamesExports),input_1=input,Blockie_1=Blockie$2,Button_1=Button$5,Header_1=Header$3,DATE_TYPE="date";function renderMessage(a){var _=a.error,$=a.warning,j=a.info,_e=a.message;if(_||_e)return React$1.createElement(React$1.Fragment,null,_&&_e?React$1.createElement(Icon_1.default,{name:"remove circle"}):null," ",_e);if($)return React$1.createElement(React$1.Fragment,null,React$1.createElement(Icon_1.default,{name:"warning sign"})," ",$);if(j)return React$1.createElement(React$1.Fragment,null,React$1.createElement(Icon_1.default,{name:"info circle"})," ",j)}var Field=function(a){__extends$1(_,a);function _(){var $=a!==null&&a.apply(this,arguments)||this;return $.onChangeDatePicker=function(j,_e){var et="";if(_e.value){var tt=_e.value&&_e.value.getFullYear(),rt=_e.value&&"".concat(_e.value.getDate()<10?"0":"").concat(_e.value.getDate()),at=_e.value&&"".concat(_e.value.getMonth()+1<10?"0":"").concat(_e.value.getMonth()+1);et="".concat(tt,"-").concat(at,"-").concat(rt)}var ct=__assign(__assign({},$.props),{value:et});$.props.onChange&&$.props.onChange(j,ct)},$}return _.prototype.hasAction=function(){var $=this.props,j=$.loading,_e=$.error,et=$.action,tt=this.props.onAction!==null&&this.props.onAction!==void 0;return!this.isAddress()&&!j&&!_e&&et&&tt},_.prototype.isAddress=function(){var $=this.props.type;return $==="address"},_.prototype.render=function(){var $,j=this.props,_e=j.value,et=j.label,tt=j.error,rt=j.warning,at=j.info,ct=j.type,dt=j.loading,yt=j.action,bt=j.onAction,Et=j.disabled,$t=j.kind,_t=j.fitContent,xt=j.isClearable,St=xt===void 0?!0:xt,Mt=j.id,Tt=j.maxLength,Rt=__rest(j,["value","label","error","warning","info","type","loading","action","onAction","disabled","kind","fitContent","isClearable","id","maxLength"]),Ct=this.isAddress(),It=tt&&!Ct?"warning circle":void 0,kt=(0,classnames_1.default)("dcl field",$t,($={error:tt,warning:!tt&&rt,info:!tt&&!rt&&at,disabled:Et,address:Ct,resizable:_t},$["has-label"]=et,$));return Ct&&yt&&console.warn(`The address fields don't support actions, "`.concat(yt,'" will be ignored')),React$1.createElement("div",{className:kt},et||Tt!==void 0?React$1.createElement(Header_1.Header,{sub:!0},et?React$1.createElement("label",{htmlFor:Mt},et):null,Tt!==void 0?React$1.createElement("span",{className:"maxLength"},(0,input_1.getInputValueLength)(_e),"/",Tt):null):null,ct===DATE_TYPE?React$1.createElement(react_semantic_ui_datepickers_1.default,__assign({value:_e?new Date("".concat(_e," 00:00:00")):void 0,icon:It||void 0,loading:dt&&!Ct,disabled:Et,showOutsideDays:!0,className:"datePickerWidth",clearable:St},Rt,{onChange:this.onChangeDatePicker,id:Mt})):React$1.createElement(Input_1.default,__assign({id:Mt,value:_e,type:Ct?"text":ct,icon:It,loading:dt&&!Ct,disabled:Et,maxLength:Tt},Rt)),this.hasAction()&&React$1.createElement("div",{className:"overlay"},React$1.createElement(Button_1.Button,{onClick:bt,disabled:Et,basic:!0},yt)),this.isAddress()&&_e?React$1.createElement(Blockie_1.Blockie,{seed:_e,scale:4}):null,React$1.createElement("p",{className:"message"},renderMessage(this.props)," "))},_.defaultProps={kind:"simple",fitContent:!1},_}(React$1.PureComponent);Field_2=Field$2.Field=Field;var Media={},reactResponsive={exports:{}};(function(a,_){(function(j,_e){a.exports=_e(reactExports)})(commonjsGlobal,$=>(()=>{var j={"./node_modules/css-mediaquery/index.js":(rt,at)=>{at.match=$t,at.parse=_t;var ct=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,dt=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,yt=/^(?:(min|max)-)?(.+)/,bt=/(em|rem|px|cm|mm|in|pt|pc)?$/,Et=/(dpi|dpcm|dppx)?$/;function $t(Tt,Rt){return _t(Tt).some(function(Ct){var It=Ct.inverse,kt=Ct.type==="all"||Rt.type===Ct.type;if(kt&&It||!(kt||It))return!1;var Dt=Ct.expressions.every(function(Bt){var zt=Bt.feature,vt=Bt.modifier,nt=Bt.value,st=Rt[zt];if(!st)return!1;switch(zt){case"orientation":case"scan":return st.toLowerCase()===nt.toLowerCase();case"width":case"height":case"device-width":case"device-height":nt=Mt(nt),st=Mt(st);break;case"resolution":nt=St(nt),st=St(st);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":nt=xt(nt),st=xt(st);break;case"grid":case"color":case"color-index":case"monochrome":nt=parseInt(nt,10)||1,st=parseInt(st,10)||0;break}switch(vt){case"min":return st>=nt;case"max":return st<=nt;default:return st===nt}});return Dt&&!It||!Dt&&It})}function _t(Tt){return Tt.split(",").map(function(Rt){Rt=Rt.trim();var Ct=Rt.match(ct),It=Ct[1],kt=Ct[2],Dt=Ct[3]||"",Bt={};return Bt.inverse=!!It&&It.toLowerCase()==="not",Bt.type=kt?kt.toLowerCase():"all",Dt=Dt.match(/\([^\)]+\)/g)||[],Bt.expressions=Dt.map(function(zt){var vt=zt.match(dt),nt=vt[1].toLowerCase().match(yt);return{modifier:nt[1],feature:nt[2],value:vt[2]}}),Bt})}function xt(Tt){var Rt=Number(Tt),Ct;return Rt||(Ct=Tt.match(/^(\d+)\s*\/\s*(\d+)$/),Rt=Ct[1]/Ct[2]),Rt}function St(Tt){var Rt=parseFloat(Tt),Ct=String(Tt).match(Et)[1];switch(Ct){case"dpcm":return Rt/2.54;case"dppx":return Rt*96;default:return Rt}}function Mt(Tt){var Rt=parseFloat(Tt),Ct=String(Tt).match(bt)[1];switch(Ct){case"em":return Rt*16;case"rem":return Rt*16;case"cm":return Rt*96/2.54;case"mm":return Rt*96/2.54/10;case"in":return Rt*96;case"pt":return Rt*72;case"pc":return Rt*72/12;default:return Rt}}},"./node_modules/hyphenate-style-name/index.js":(rt,at,ct)=>{ct.r(at),ct.d(at,{default:()=>_t});var dt=/[A-Z]/g,yt=/^ms-/,bt={};function Et(xt){return"-"+xt.toLowerCase()}function $t(xt){if(bt.hasOwnProperty(xt))return bt[xt];var St=xt.replace(dt,Et);return bt[xt]=yt.test(St)?"-"+St:St}const _t=$t},"./node_modules/matchmediaquery/index.js":(rt,at,ct)=>{var dt=ct("./node_modules/css-mediaquery/index.js").match,yt=typeof window<"u"?window.matchMedia:null;function bt($t,_t,xt){var St=this;if(yt&&!xt){var Mt=yt.call(window,$t);this.matches=Mt.matches,this.media=Mt.media,Mt.addListener(Ct)}else this.matches=dt($t,_t),this.media=$t;this.addListener=Tt,this.removeListener=Rt,this.dispose=It;function Tt(kt){Mt&&Mt.addListener(kt)}function Rt(kt){Mt&&Mt.removeListener(kt)}function Ct(kt){St.matches=kt.matches,St.media=kt.media}function It(){Mt&&Mt.removeListener(Ct)}}function Et($t,_t,xt){return new bt($t,_t,xt)}rt.exports=Et},"./node_modules/object-assign/index.js":rt=>{/*
146
146
  object-assign
147
147
  (c) Sindre Sorhus
@@ -154,5 +154,5 @@ Valid keys: `+JSON.stringify(Object.keys(Zt),null," "));var Vr=Mr(sn,ln,jr,Sr,E
154
154
  *
155
155
  * This source code is licensed under the MIT license found in the
156
156
  * LICENSE file in the root directory of this source tree.
157
- */(function(){var ct=typeof Symbol=="function"&&Symbol.for,dt=ct?Symbol.for("react.element"):60103,yt=ct?Symbol.for("react.portal"):60106,bt=ct?Symbol.for("react.fragment"):60107,Et=ct?Symbol.for("react.strict_mode"):60108,$t=ct?Symbol.for("react.profiler"):60114,_t=ct?Symbol.for("react.provider"):60109,xt=ct?Symbol.for("react.context"):60110,St=ct?Symbol.for("react.async_mode"):60111,Mt=ct?Symbol.for("react.concurrent_mode"):60111,Tt=ct?Symbol.for("react.forward_ref"):60112,Rt=ct?Symbol.for("react.suspense"):60113,Ct=ct?Symbol.for("react.suspense_list"):60120,It=ct?Symbol.for("react.memo"):60115,kt=ct?Symbol.for("react.lazy"):60116,Dt=ct?Symbol.for("react.block"):60121,Bt=ct?Symbol.for("react.fundamental"):60117,zt=ct?Symbol.for("react.responder"):60118,vt=ct?Symbol.for("react.scope"):60119;function nt(Mr){return typeof Mr=="string"||typeof Mr=="function"||Mr===bt||Mr===Mt||Mr===$t||Mr===Et||Mr===Rt||Mr===Ct||typeof Mr=="object"&&Mr!==null&&(Mr.$$typeof===kt||Mr.$$typeof===It||Mr.$$typeof===_t||Mr.$$typeof===xt||Mr.$$typeof===Tt||Mr.$$typeof===Bt||Mr.$$typeof===zt||Mr.$$typeof===vt||Mr.$$typeof===Dt)}function st(Mr){if(typeof Mr=="object"&&Mr!==null){var Vr=Mr.$$typeof;switch(Vr){case dt:var pn=Mr.type;switch(pn){case St:case Mt:case bt:case $t:case Et:case Rt:return pn;default:var Gr=pn&&pn.$$typeof;switch(Gr){case xt:case Tt:case kt:case It:case _t:return Gr;default:return Vr}}case yt:return Vr}}}var lt=St,ht=Mt,mt=xt,wt=_t,At=dt,gt=Tt,ot=bt,pt=kt,Pt=It,Ot=yt,Nt=$t,jt=Et,Ut=Rt,Vt=!1;function rr(Mr){return Vt||(Vt=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),tr(Mr)||st(Mr)===St}function tr(Mr){return st(Mr)===Mt}function Zt(Mr){return st(Mr)===xt}function Yt(Mr){return st(Mr)===_t}function Wt(Mr){return typeof Mr=="object"&&Mr!==null&&Mr.$$typeof===dt}function fr(Mr){return st(Mr)===Tt}function jr(Mr){return st(Mr)===bt}function Sr(Mr){return st(Mr)===kt}function Er(Mr){return st(Mr)===It}function sn(Mr){return st(Mr)===yt}function Ir(Mr){return st(Mr)===$t}function gr(Mr){return st(Mr)===Et}function ln(Mr){return st(Mr)===Rt}at.AsyncMode=lt,at.ConcurrentMode=ht,at.ContextConsumer=mt,at.ContextProvider=wt,at.Element=At,at.ForwardRef=gt,at.Fragment=ot,at.Lazy=pt,at.Memo=Pt,at.Portal=Ot,at.Profiler=Nt,at.StrictMode=jt,at.Suspense=Ut,at.isAsyncMode=rr,at.isConcurrentMode=tr,at.isContextConsumer=Zt,at.isContextProvider=Yt,at.isElement=Wt,at.isForwardRef=fr,at.isFragment=jr,at.isLazy=Sr,at.isMemo=Er,at.isPortal=sn,at.isProfiler=Ir,at.isStrictMode=gr,at.isSuspense=ln,at.isValidElementType=nt,at.typeOf=st})()},"./node_modules/react-is/index.js":(rt,at,ct)=>{rt.exports=ct("./node_modules/react-is/cjs/react-is.development.js")},"./node_modules/shallow-equal/dist/index.esm.js":(rt,at,ct)=>{ct.r(at),ct.d(at,{shallowEqualArrays:()=>yt,shallowEqualObjects:()=>dt});function dt(bt,Et){if(bt===Et)return!0;if(!bt||!Et)return!1;var $t=Object.keys(bt),_t=Object.keys(Et),xt=$t.length;if(_t.length!==xt)return!1;for(var St=0;St<xt;St++){var Mt=$t[St];if(bt[Mt]!==Et[Mt]||!Object.prototype.hasOwnProperty.call(Et,Mt))return!1}return!0}function yt(bt,Et){if(bt===Et)return!0;if(!bt||!Et)return!1;var $t=bt.length;if(Et.length!==$t)return!1;for(var _t=0;_t<$t;_t++)if(bt[_t]!==Et[_t])return!1;return!0}},"./src/Component.ts":function(rt,at,ct){var dt=this&&this.__rest||function($t,_t){var xt={};for(var St in $t)Object.prototype.hasOwnProperty.call($t,St)&&_t.indexOf(St)<0&&(xt[St]=$t[St]);if($t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Mt=0,St=Object.getOwnPropertySymbols($t);Mt<St.length;Mt++)_t.indexOf(St[Mt])<0&&Object.prototype.propertyIsEnumerable.call($t,St[Mt])&&(xt[St[Mt]]=$t[St[Mt]]);return xt},yt=this&&this.__importDefault||function($t){return $t&&$t.__esModule?$t:{default:$t}};Object.defineProperty(at,"__esModule",{value:!0});var bt=yt(ct("./src/useMediaQuery.ts")),Et=function($t){var _t=$t.children,xt=$t.device,St=$t.onChange,Mt=dt($t,["children","device","onChange"]),Tt=(0,bt.default)(Mt,xt,St);return typeof _t=="function"?_t(Tt):Tt?_t:null};at.default=Et},"./src/Context.ts":(rt,at,ct)=>{Object.defineProperty(at,"__esModule",{value:!0});var dt=ct("react"),yt=(0,dt.createContext)(void 0);at.default=yt},"./src/index.ts":function(rt,at,ct){var dt=this&&this.__importDefault||function(_t){return _t&&_t.__esModule?_t:{default:_t}};Object.defineProperty(at,"__esModule",{value:!0}),at.Context=at.toQuery=at.useMediaQuery=at.default=void 0;var yt=dt(ct("./src/useMediaQuery.ts"));at.useMediaQuery=yt.default;var bt=dt(ct("./src/Component.ts"));at.default=bt.default;var Et=dt(ct("./src/toQuery.ts"));at.toQuery=Et.default;var $t=dt(ct("./src/Context.ts"));at.Context=$t.default},"./src/mediaQuery.ts":function(rt,at,ct){var dt=this&&this.__assign||function(){return dt=Object.assign||function(Rt){for(var Ct,It=1,kt=arguments.length;It<kt;It++){Ct=arguments[It];for(var Dt in Ct)Object.prototype.hasOwnProperty.call(Ct,Dt)&&(Rt[Dt]=Ct[Dt])}return Rt},dt.apply(this,arguments)},yt=this&&this.__rest||function(Rt,Ct){var It={};for(var kt in Rt)Object.prototype.hasOwnProperty.call(Rt,kt)&&Ct.indexOf(kt)<0&&(It[kt]=Rt[kt]);if(Rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Dt=0,kt=Object.getOwnPropertySymbols(Rt);Dt<kt.length;Dt++)Ct.indexOf(kt[Dt])<0&&Object.prototype.propertyIsEnumerable.call(Rt,kt[Dt])&&(It[kt[Dt]]=Rt[kt[Dt]]);return It},bt=this&&this.__importDefault||function(Rt){return Rt&&Rt.__esModule?Rt:{default:Rt}};Object.defineProperty(at,"__esModule",{value:!0});var Et=bt(ct("./node_modules/prop-types/index.js")),$t=Et.default.oneOfType([Et.default.string,Et.default.number]),_t={all:Et.default.bool,grid:Et.default.bool,aural:Et.default.bool,braille:Et.default.bool,handheld:Et.default.bool,print:Et.default.bool,projection:Et.default.bool,screen:Et.default.bool,tty:Et.default.bool,tv:Et.default.bool,embossed:Et.default.bool},xt={orientation:Et.default.oneOf(["portrait","landscape"]),scan:Et.default.oneOf(["progressive","interlace"]),aspectRatio:Et.default.string,deviceAspectRatio:Et.default.string,height:$t,deviceHeight:$t,width:$t,deviceWidth:$t,color:Et.default.bool,colorIndex:Et.default.bool,monochrome:Et.default.bool,resolution:$t,type:Object.keys(_t)};xt.type;var St=yt(xt,["type"]),Mt=dt({minAspectRatio:Et.default.string,maxAspectRatio:Et.default.string,minDeviceAspectRatio:Et.default.string,maxDeviceAspectRatio:Et.default.string,minHeight:$t,maxHeight:$t,minDeviceHeight:$t,maxDeviceHeight:$t,minWidth:$t,maxWidth:$t,minDeviceWidth:$t,maxDeviceWidth:$t,minColor:Et.default.number,maxColor:Et.default.number,minColorIndex:Et.default.number,maxColorIndex:Et.default.number,minMonochrome:Et.default.number,maxMonochrome:Et.default.number,minResolution:$t,maxResolution:$t},St),Tt=dt(dt({},_t),Mt);at.default={all:Tt,types:_t,matchers:xt,features:Mt}},"./src/toQuery.ts":function(rt,at,ct){var dt=this&&this.__importDefault||function(St){return St&&St.__esModule?St:{default:St}};Object.defineProperty(at,"__esModule",{value:!0});var yt=dt(ct("./node_modules/hyphenate-style-name/index.js")),bt=dt(ct("./src/mediaQuery.ts")),Et=function(St){return"not ".concat(St)},$t=function(St,Mt){var Tt=(0,yt.default)(St);return typeof Mt=="number"&&(Mt="".concat(Mt,"px")),Mt===!0?Tt:Mt===!1?Et(Tt):"(".concat(Tt,": ").concat(Mt,")")},_t=function(St){return St.join(" and ")},xt=function(St){var Mt=[];return Object.keys(bt.default.all).forEach(function(Tt){var Rt=St[Tt];Rt!=null&&Mt.push($t(Tt,Rt))}),_t(Mt)};at.default=xt},"./src/useMediaQuery.ts":function(rt,at,ct){var dt=this&&this.__importDefault||function(Bt){return Bt&&Bt.__esModule?Bt:{default:Bt}};Object.defineProperty(at,"__esModule",{value:!0});var yt=ct("react"),bt=dt(ct("./node_modules/matchmediaquery/index.js")),Et=dt(ct("./node_modules/hyphenate-style-name/index.js")),$t=ct("./node_modules/shallow-equal/dist/index.esm.js"),_t=dt(ct("./src/toQuery.ts")),xt=dt(ct("./src/Context.ts")),St=function(Bt){return Bt.query||(0,_t.default)(Bt)},Mt=function(Bt){if(Bt){var zt=Object.keys(Bt);return zt.reduce(function(vt,nt){return vt[(0,Et.default)(nt)]=Bt[nt],vt},{})}},Tt=function(){var Bt=(0,yt.useRef)(!1);return(0,yt.useEffect)(function(){Bt.current=!0},[]),Bt.current},Rt=function(Bt){var zt=(0,yt.useContext)(xt.default),vt=function(){return Mt(Bt)||Mt(zt)},nt=(0,yt.useState)(vt),st=nt[0],lt=nt[1];return(0,yt.useEffect)(function(){var ht=vt();(0,$t.shallowEqualObjects)(st,ht)||lt(ht)},[Bt,zt]),st},Ct=function(Bt){var zt=function(){return St(Bt)},vt=(0,yt.useState)(zt),nt=vt[0],st=vt[1];return(0,yt.useEffect)(function(){var lt=zt();nt!==lt&&st(lt)},[Bt]),nt},It=function(Bt,zt){var vt=function(){return(0,bt.default)(Bt,zt||{},!!zt)},nt=(0,yt.useState)(vt),st=nt[0],lt=nt[1],ht=Tt();return(0,yt.useEffect)(function(){if(ht){var mt=vt();return lt(mt),function(){mt&&mt.dispose()}}},[Bt,zt]),st},kt=function(Bt){var zt=(0,yt.useState)(Bt.matches),vt=zt[0],nt=zt[1];return(0,yt.useEffect)(function(){var st=function(lt){nt(lt.matches)};return Bt.addListener(st),nt(Bt.matches),function(){Bt.removeListener(st)}},[Bt]),vt},Dt=function(Bt,zt,vt){var nt=Rt(zt),st=Ct(Bt);if(!st)throw new Error("Invalid or missing MediaQuery!");var lt=It(st,nt),ht=kt(lt),mt=Tt();return(0,yt.useEffect)(function(){mt&&vt&&vt(ht)},[ht]),(0,yt.useEffect)(function(){return function(){lt&&lt.dispose()}},[]),ht};at.default=Dt},react:rt=>{rt.exports=$}},_e={};function et(rt){var at=_e[rt];if(at!==void 0)return at.exports;var ct=_e[rt]={exports:{}};return j[rt].call(ct.exports,ct,ct.exports,et),ct.exports}et.d=(rt,at)=>{for(var ct in at)et.o(at,ct)&&!et.o(rt,ct)&&Object.defineProperty(rt,ct,{enumerable:!0,get:at[ct]})},et.o=(rt,at)=>Object.prototype.hasOwnProperty.call(rt,at),et.r=rt=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(rt,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(rt,"__esModule",{value:!0})};var tt=et("./src/index.ts");return tt})())})(reactResponsive);var reactResponsiveExports=reactResponsive.exports;Object.defineProperty(Media,"__esModule",{value:!0});Media.useNotMobileMediaQuery=Media.useMobileMediaQuery=Media.useTabletAndBelowMediaQuery=Media.useTabletMediaQuery=Media.useDesktopMediaQuery=Media.useBigDesktopMediaQuery=NotMobile_1=Media.NotMobile=Mobile_1=Media.Mobile=Media.TabletAndBelow=Media.Tablet=Media.Desktop=void 0;var react_responsive_1=reactResponsiveExports,useBigDesktopMediaQuery=function(){return(0,react_responsive_1.useMediaQuery)({minWidth:1920})};Media.useBigDesktopMediaQuery=useBigDesktopMediaQuery;var useDesktopMediaQuery=function(){return(0,react_responsive_1.useMediaQuery)({minWidth:992})};Media.useDesktopMediaQuery=useDesktopMediaQuery;var useTabletMediaQuery=function(){return(0,react_responsive_1.useMediaQuery)({minWidth:768,maxWidth:991})};Media.useTabletMediaQuery=useTabletMediaQuery;var useTabletAndBelowMediaQuery=function(){return(0,react_responsive_1.useMediaQuery)({maxWidth:991})};Media.useTabletAndBelowMediaQuery=useTabletAndBelowMediaQuery;var useMobileMediaQuery=function(){return(0,react_responsive_1.useMediaQuery)({maxWidth:767})};Media.useMobileMediaQuery=useMobileMediaQuery;var useNotMobileMediaQuery=function(){return(0,react_responsive_1.useMediaQuery)({minWidth:768})};Media.useNotMobileMediaQuery=useNotMobileMediaQuery;var Desktop=function(a){var _=a.children,$=useDesktopMediaQuery();return $?_:null};Media.Desktop=Desktop;var Tablet=function(a){var _=a.children,$=useTabletMediaQuery();return $?_:null};Media.Tablet=Tablet;var TabletAndBelow=function(a){var _=a.children,$=useTabletAndBelowMediaQuery();return $?_:null};Media.TabletAndBelow=TabletAndBelow;var Mobile=function(a){var _=a.children,$=useMobileMediaQuery();return $?_:null},Mobile_1=Media.Mobile=Mobile,NotMobile=function(a){var _=a.children,$=useNotMobileMediaQuery();return $?_:null},NotMobile_1=Media.NotMobile=NotMobile;const backImg="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239233428.commit-2de01c8/assets/back-26d3dbd9.svg",diceImg="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239233428.commit-2de01c8/assets/dice-b919368b.svg",wrongImg="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239233428.commit-2de01c8/assets/wrong-1ccde1e7.svg",useAfterLoginRedirection=()=>{const a=useLocation(),_=new URLSearchParams(a.search),$=extractRedirectToFromSearchParameters(_);let j=locations.home();try{let et;$.startsWith("/")?et=new URL($,window.location.origin):et=new URL($),et.hostname!==window.location.hostname&&(et=new URL("/auth/invalidRedirection",window.location.origin));const tt=_.get("targetConfigId");tt&&!et.searchParams.has("targetConfigId")&&et.searchParams.append("targetConfigId",tt),j=et.href}catch{console.error("Can't parse redirectTo URL"),j=locations.home()}const _e=reactExports.useCallback(()=>{window.location.href=j},[j]);return{url:j,redirect:_e}};var FeatureFlagsKeys=(a=>(a.MAGIC_TEST="dapps-magic-dev-test",a.DAPPS_MAGIC_AUTO_SIGN="dapps-magic-auto-sign",a))(FeatureFlagsKeys||{});const defaultFeatureFlagsContextValue={flags:{},initialized:!1},FeatureFlagsContext=reactExports.createContext(defaultFeatureFlagsContextValue),FeatureFlagsProvider=a=>{const[_,$]=reactExports.useState(defaultFeatureFlagsContextValue),[j,_e]=reactExports.useState(!0),et=reactExports.useRef();return reactExports.useEffect(()=>{(async()=>{if(j){_e(!1);const tt=config$1.get("FEATURE_FLAGS_URL"),at=await(await fetch(`${tt}/dapps.json`)).json();$({..._,flags:at.flags,initialized:!0})}})()},[j]),reactExports.useEffect(()=>{const tt=config$1.get("FEATURE_FLAGS_INTERVAL");return et.current=setInterval(()=>{_e(!0)},Number(tt)),()=>{clearInterval(et.current)}},[]),jsxRuntimeExports.jsx(FeatureFlagsContext.Provider,{value:_,children:a.children})};async function subscribeToNewsletter(a){const _=config$1.get("BUILDER_SERVER_URL");if(!_)throw new Error("Missing BUILDER_SERVER_URL.");const $=await fetch(_+"/v1/newsletter",{method:"post",body:JSON.stringify({email:a,source:"auth"}),headers:{"content-type":"application/json"}});if(!$.ok)throw new Error(`Could not subscribe to newsletter. Status: ${$.status}`)}async function deployProfileFromDefault({defaultProfile:a,connectedAccount:_,deploymentProfileName:$,connectedAccountIdentity:j}){var St;const _e=config$1.get("PEER_URL",""),et=dist$2.createContentClient({url:_e+"/content",fetcher:dist$3.createFetchComponent()}),rt=(await et.fetchEntitiesByPointers([a]))[0],at="body.png",ct="face256.png",dt=rt.content.reduce((Mt,Tt)=>({...Mt,[Tt.file]:Tt.hash}),{}),[yt,bt]=await Promise.all([et.downloadContent(dt[at]),et.downloadContent(dt[ct])]),Et=new Map;Et.set(at,yt),Et.set(ct,bt);const $t=Mt=>Mt.replace("dcl://base-avatars/","urn:decentraland:off-chain:base-avatars:"),_t=(St=rt.metadata.avatars)==null?void 0:St[0];_t.name=$,_t.ethAddress=_,_t.userId=_,_t.version=1,_t.tutorialStep=0,_t.hasClaimedName=!1,_t.hasConnectedWeb3=!0,_t.avatar.bodyShape=$t(rt.metadata.avatars[0].avatar.bodyShape),_t.avatar.wearables=rt.metadata.avatars[0].avatar.wearables.map($t),_t.avatar.emotes=[];const xt=await dist$2.DeploymentBuilder.buildEntity({type:dist$8.EntityType.PROFILE,pointers:[_],metadata:{avatars:[_t]},timestamp:Date.now(),files:Et});await et.deploy({entityId:xt.entityId,files:xt.files,authChain:dist$7.Authenticator.signPayload(j,xt.entityId)})}const container$1="_container_wdiad_1",background$1="_background_wdiad_9",left$1="_left_wdiad_20",leftInner="_leftInner_wdiad_48",logo="_logo_wdiad_54",title$2="_title_wdiad_59",subtitle="_subtitle_wdiad_66",meetYourAvatar="_meetYourAvatar_wdiad_72",meetYourAvatarDescription="_meetYourAvatarDescription_wdiad_79",randomize="_randomize_wdiad_86",logoSmall="_logoSmall_wdiad_102",back="_back_wdiad_9",name="_name_wdiad_121",agree="_agree_wdiad_125",error="_error_wdiad_145",emailError="_emailError_wdiad_156",agreeError="_agreeError_wdiad_160",jumpIn="_jumpIn_wdiad_166",right$1="_right_wdiad_170",mobileContainer="_mobileContainer_wdiad_183",mobilePreviewContainer="_mobilePreviewContainer_wdiad_196",mobileButtons="_mobileButtons_wdiad_206",mobileCompleteYourProfile="_mobileCompleteYourProfile_wdiad_231",styles$6={container:container$1,background:background$1,left:left$1,leftInner,logo,title:title$2,subtitle,meetYourAvatar,meetYourAvatarDescription,randomize,continue:"_continue_wdiad_97",logoSmall,back,name,agree,error,emailError,agreeError,jumpIn,right:right$1,mobileContainer,mobilePreviewContainer,mobileButtons,mobileCompleteYourProfile};function getRandomDefaultProfile(){return"default"+(Math.floor(Math.random()*(160-1+1))+1)}const ErrorMessage=a=>jsxRuntimeExports.jsxs("div",{className:classNames(styles$6.error,a.className),children:[jsxRuntimeExports.jsx("img",{src:wrongImg}),jsxRuntimeExports.jsx("div",{children:a.message})]}),SetupPage=()=>{const a=useNavigateWithSearchParams(),[_,$]=reactExports.useState(!1),[j,_e]=reactExports.useState(0),[et,tt]=reactExports.useState(getRandomDefaultProfile()),[rt,at]=reactExports.useState(""),[ct,dt]=reactExports.useState(""),[yt,bt]=reactExports.useState(!1),[Et,$t]=reactExports.useState(!1),[_t,xt]=reactExports.useState(!1),St=reactExports.useRef(),Mt=reactExports.useRef(),{initialized:Tt}=reactExports.useContext(FeatureFlagsContext),{url:Rt,redirect:Ct}=useAfterLoginRedirection(),It=reactExports.useMemo(()=>rt.length?rt.length>=15?"Sorry, usernames can have a maximum of 15 characters.":rt.includes(" ")?"Sorry, spaces are not permitted.":/^[a-zA-Z0-9]+$/.test(rt)?"":"Sorry, special characters (!@#$%) are not permitted.":"Please enter your username.",[rt]),kt=reactExports.useMemo(()=>ct&&!ct.includes("@")?"Invalid email, please try again.":"",[ct]),Dt=reactExports.useMemo(()=>yt?"":"Please accept the terms of use and privacy policy.",[yt]),Bt=reactExports.useMemo(()=>{if(Rt){if(Rt.includes("play"))return"jump into decentraland";const wt=["marketplace","builder","account","profile","events","places","governance","dao","rewards"];for(const At of wt)if(Rt.includes(At))return`continue to ${At}`}return"continue"},[Rt]),zt=reactExports.useCallback(()=>{getAnalytics().track(TrackingEvents.CLICK,{action:ClickEvents.RANDOMIZE}),tt(getRandomDefaultProfile())},[]),vt=reactExports.useCallback(()=>{getAnalytics().track(TrackingEvents.AVATAR_EDIT_SUCCESS,{eth_address:St.current,is_guest:!1,profile:et}),_e(1)},[et]),nt=reactExports.useCallback(()=>{getAnalytics().track(TrackingEvents.CLICK,{action:ClickEvents.BACK_TO_AVATAR_RANDOMIZATION_VIEW}),_e(0)},[]),st=reactExports.useCallback((wt,At)=>at(At.value),[]),lt=reactExports.useCallback((wt,At)=>dt(At.value),[]),ht=reactExports.useCallback(()=>bt(!yt),[yt]),mt=reactExports.useCallback(async wt=>{if(wt.preventDefault(),getAnalytics().track(TrackingEvents.CLICK,{action:ClickEvents.SUBMIT_PROFILE}),$t(!0),!(It||kt||Dt)){if(!St.current||!Mt.current){console.warn("No account or identity found.");return}try{if(xt(!0),await deployProfileFromDefault({connectedAccount:St.current,connectedAccountIdentity:Mt.current,defaultProfile:et,deploymentProfileName:rt}),ct)try{await subscribeToNewsletter(ct)}catch(At){console.warn("There was an error subscribing to the newsletter",At.message)}getAnalytics().track(TrackingEvents.TERMS_OF_SERVICE_SUCCESS,{eth_address:St.current,is_guest:!1,email:ct||void 0,name:rt}),Ct()}catch(At){xt(!1),console.error("There was an error deploying the profile",At.message)}}},[It,kt,Dt,rt,ct,yt,et,Ct]);return reactExports.useEffect(()=>{(async()=>{try{const At=await getCurrentConnectionData();if(!At)throw new Error("No connection data found");St.current=At.account,Mt.current=At.identity}catch{return console.warn("No previous connection found"),a(locations.login(Rt))}if(await fetchProfile(St.current))return console.warn("Profile already exists"),Ct();$(!0)})()},[Ct,a]),!_||!Tt?jsxRuntimeExports.jsxs("div",{className:styles$6.container,children:[jsxRuntimeExports.jsx("div",{className:styles$6.background}),jsxRuntimeExports.jsx(Loader_3,{active:!0,size:"huge"})]}):j===0?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Mobile_1,{children:jsxRuntimeExports.jsxs("div",{className:styles$6.container,children:[jsxRuntimeExports.jsx("div",{className:styles$6.background}),jsxRuntimeExports.jsxs("div",{className:styles$6.mobileContainer,children:[jsxRuntimeExports.jsx("img",{className:styles$6.logo,src:logoImg,alt:"logo"}),jsxRuntimeExports.jsx("div",{className:styles$6.title,children:"Welcome to Decentraland!"}),jsxRuntimeExports.jsx("div",{className:styles$6.meetYourAvatar,children:"First, Meet Your Avatar"}),jsxRuntimeExports.jsxs("div",{className:styles$6.meetYourAvatarDescription,children:["Choose an avatar to start your journey.",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("b",{children:"You can customize it later on desktop"}),", where all the magic happens!"]}),jsxRuntimeExports.jsx("div",{className:styles$6.mobilePreviewContainer,children:jsxRuntimeExports.jsx(CustomWearablePreview,{profile:et})}),jsxRuntimeExports.jsxs("div",{className:styles$6.mobileButtons,children:[jsxRuntimeExports.jsx("div",{className:styles$6.randomize,children:jsxRuntimeExports.jsxs(Button$5.Button,{compact:!0,inverted:!0,onClick:zt,children:[jsxRuntimeExports.jsx("img",{src:diceImg,alt:"diceImg"}),jsxRuntimeExports.jsx("span",{children:"randomize"})]})}),jsxRuntimeExports.jsx("div",{className:styles$6.continue,children:jsxRuntimeExports.jsx(Button$5.Button,{compact:!0,primary:!0,onClick:vt,children:"Continue"})})]})]})]})}),jsxRuntimeExports.jsx(NotMobile_1,{children:jsxRuntimeExports.jsxs("div",{className:styles$6.container,children:[jsxRuntimeExports.jsx("div",{className:styles$6.background}),jsxRuntimeExports.jsx("div",{className:styles$6.left,children:jsxRuntimeExports.jsxs("div",{className:styles$6.leftInner,children:[jsxRuntimeExports.jsx("img",{className:styles$6.logo,src:logoImg,alt:"logo"}),jsxRuntimeExports.jsx("div",{className:styles$6.title,children:"Welcome to Decentraland!"}),jsxRuntimeExports.jsx("div",{className:styles$6.subtitle,children:"Your journey begins here"}),jsxRuntimeExports.jsx("div",{className:styles$6.meetYourAvatar,children:"First, Meet Your Avatar"}),jsxRuntimeExports.jsxs("div",{className:styles$6.meetYourAvatarDescription,children:["Say hi to your new digital self!",jsxRuntimeExports.jsx("br",{}),"Don't worry, of course they're not quite 'you' yet—soon you'll be able to customize them to your heart's content."]}),jsxRuntimeExports.jsx("div",{className:styles$6.randomize,children:jsxRuntimeExports.jsxs(Button$5.Button,{compact:!0,inverted:!0,onClick:zt,children:[jsxRuntimeExports.jsx("img",{src:diceImg,alt:"diceImg"}),jsxRuntimeExports.jsx("span",{children:"randomize"})]})}),jsxRuntimeExports.jsx("div",{className:styles$6.continue,children:jsxRuntimeExports.jsx(Button$5.Button,{primary:!0,fluid:!0,onClick:vt,children:"Continue"})})]})}),jsxRuntimeExports.jsx("div",{className:styles$6.right,children:jsxRuntimeExports.jsx(CustomWearablePreview,{profile:et})})]})})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Mobile_1,{children:jsxRuntimeExports.jsxs("div",{className:styles$6.container,children:[jsxRuntimeExports.jsx("div",{className:styles$6.background}),jsxRuntimeExports.jsxs("div",{className:styles$6.mobileContainer,children:[jsxRuntimeExports.jsxs("div",{className:styles$6.back,onClick:nt,children:[jsxRuntimeExports.jsx("img",{src:backImg,alt:"backImg"}),jsxRuntimeExports.jsx("span",{children:"BACK"})]}),jsxRuntimeExports.jsx("div",{className:classNames(styles$6.title,styles$6.mobileCompleteYourProfile),children:"Complete your Profile"}),jsxRuntimeExports.jsxs("form",{onSubmit:mt,children:[jsxRuntimeExports.jsx("div",{className:styles$6.name,children:jsxRuntimeExports.jsx(Field_2,{label:"Username",placeholder:"Enter your Username",onChange:st,message:Et&&It?jsxRuntimeExports.jsx(ErrorMessage,{message:It}):void 0})}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Field_2,{label:"Email (optional)",placeholder:"Enter your email",message:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Et&&kt?jsxRuntimeExports.jsx(ErrorMessage,{className:styles$6.emailError,message:kt}):null,jsxRuntimeExports.jsx("span",{children:"Subscribe to Decentraland's newsletter to receive the latest news about events, updates, contests and more."})]}),onChange:lt})}),jsxRuntimeExports.jsxs("div",{className:styles$6.agree,children:[jsxRuntimeExports.jsx(Checkbox$4.Checkbox,{onChange:ht}),jsxRuntimeExports.jsxs("div",{children:["I agree with Decentraland's ",jsxRuntimeExports.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://decentraland.org/terms/",children:"Terms of use"})," and ",jsxRuntimeExports.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://decentraland.org/privacy",children:"Privacy policy"}),"."]})]}),Et&&Dt?jsxRuntimeExports.jsx(ErrorMessage,{className:styles$6.agreeError,message:Dt}):null,jsxRuntimeExports.jsx("div",{className:styles$6.jumpIn,children:jsxRuntimeExports.jsx(Button$5.Button,{primary:!0,fluid:!0,type:"submit",disabled:!yt||_t,loading:_t,children:Bt})})]})]})]})}),jsxRuntimeExports.jsx(NotMobile_1,{children:jsxRuntimeExports.jsxs("div",{className:styles$6.container,children:[jsxRuntimeExports.jsx("div",{className:styles$6.background}),jsxRuntimeExports.jsx("div",{className:styles$6.left,children:jsxRuntimeExports.jsxs("div",{className:styles$6.leftInner,children:[jsxRuntimeExports.jsx("img",{className:styles$6.logoSmall,src:logoImg,alt:"logo"}),jsxRuntimeExports.jsxs("div",{className:styles$6.back,onClick:nt,children:[jsxRuntimeExports.jsx("img",{src:backImg,alt:"backImg"}),jsxRuntimeExports.jsx("span",{children:"BACK"})]}),jsxRuntimeExports.jsx("div",{className:styles$6.title,children:"Complete your Profile"}),jsxRuntimeExports.jsxs("form",{onSubmit:mt,children:[jsxRuntimeExports.jsx("div",{className:styles$6.name,children:jsxRuntimeExports.jsx(Field_2,{label:"Username",placeholder:"Enter your username",onChange:st,message:Et&&It?jsxRuntimeExports.jsx(ErrorMessage,{message:It}):void 0})}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Field_2,{label:"Email (optional)",placeholder:"Enter your email",message:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Et&&kt?jsxRuntimeExports.jsx(ErrorMessage,{className:styles$6.emailError,message:kt}):null,jsxRuntimeExports.jsx("span",{children:"Subscribe to Decentraland's newsletter to receive the latest news about events, updates, contests and more."})]}),onChange:lt})}),jsxRuntimeExports.jsxs("div",{className:styles$6.agree,children:[jsxRuntimeExports.jsx(Checkbox$4.Checkbox,{onChange:ht}),"I agree with Decentraland's ",jsxRuntimeExports.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://decentraland.org/terms/",children:"Terms of use"})," and ",jsxRuntimeExports.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://decentraland.org/privacy",children:"Privacy policy"}),"."]}),Et&&Dt?jsxRuntimeExports.jsx(ErrorMessage,{className:styles$6.agreeError,message:Dt}):null,jsxRuntimeExports.jsx("div",{className:styles$6.jumpIn,children:jsxRuntimeExports.jsx(Button$5.Button,{primary:!0,fluid:!0,type:"submit",disabled:!yt||_t,loading:_t,children:Bt})})]})]})}),jsxRuntimeExports.jsx("div",{className:styles$6.right,children:jsxRuntimeExports.jsx(CustomWearablePreview,{profile:et})})]})})]})},main$4="_main_qbssu_1",styles$5={main:main$4},DefaultPage=()=>{const a=useNavigateWithSearchParams();return reactExports.useEffect(()=>{getCurrentConnectionData().then(_=>{_?window.location.href=locations.home():a(locations.login())})},[getCurrentConnectionData,a]),jsxRuntimeExports.jsx("div",{className:styles$5.main,children:jsxRuntimeExports.jsx(Loader_3,{active:!0,size:"huge"})})},intercomWindow=window,Qp=class Qp{constructor(){Dr(this,"_appId");Dr(this,"_settings");Dr(this,"client")}static getInstance(){return this.instance||(this.instance=new Qp),this.instance}set appId(_){this._appId=_,this.client=getWindowClient(_)}get appId(){return this._appId}set settings(_){this._settings=_,intercomWindow.intercomSettings=_}get settings(){return this._settings}init(_,$){this.appId=_,$&&(this.settings=$)}inject(){return new Promise(_=>{if(this.isInjected())return _();insertScript({src:`https://widget.intercom.io/widget/${this._appId}`}).addEventListener("load",()=>_(),!0)}).then(()=>{this.client=getWindowClient(this._appId)})}render(_={}){var $,j;($=this.client)==null||$.call(this,"reattach_activator"),(j=this.client)==null||j.call(this,"update",{..._,app_id:this._appId})}showNewMessage(_){var $;($=this.client)==null||$.call(this,"showNewMessage",_)}unmount(){var _;(_=this.client)==null||_.call(this,"shutdown")}isInjected(){return isInjected()}};Dr(Qp,"instance");let IntercomWidget=Qp;function getWindowClient(a){return(..._)=>{var $;if(!a)return console.warn("Intercom app id empty. Check that the environment is property set");if(!isMobile()){if(!isInjected())return console.warn("Intercom called before injection");($=intercomWindow.Intercom)==null||$.call(intercomWindow,..._)}}}function isInjected(){return typeof intercomWindow.Intercom=="function"}function isMobile(){const a=window.navigator;return!!a&&(/Mobi/i.test(a.userAgent)||/Android/i.test(a.userAgent))}function insertScript({type:a="text/javascript",async:_=!0,...$}){const j=document.createElement("script");return Object.assign(j,{type:a,async:_,...$}),document.body.appendChild(j),j}class Intercom extends React$5.PureComponent{constructor($){super($);Dr(this,"widget");if(this.widget=IntercomWidget.getInstance(),!this.widget.appId)this.widget.init($.appId,$.settings);else if(this.widget.appId!==$.appId)throw new Error(`Intercom widget already initialized with app id "${$.appId}". Only one intercom widget is allowed.`)}componentDidMount(){this.renderWidget()}componentDidUpdate(){this.props.settings&&(this.widget.settings=this.props.settings),this.renderWidget()}componentWillUnmount(){this.widget.unmount()}async renderWidget(){const{data:$}=this.props;try{await this.widget.inject(),this.widget.render($)}catch(j){console.error("Could not render intercom",isErrorWithMessage(j)?j.message:"Unknown error")}}render(){return null}}Dr(Intercom,"defaultProps",{data:{},settings:{alignment:"left",horizontal_padding:10,vertical_padding:10}});var Modal$3={},Modal$2={},ModalActions={},hasRequiredModalActions;function requireModalActions(){if(hasRequiredModalActions)return ModalActions;hasRequiredModalActions=1;var a=interopRequireWildcardExports,_=interopRequireDefaultExports;ModalActions.__esModule=!0,ModalActions.default=void 0;var $=_(require_extends()),j=_(requireInheritsLoose()),_e=_(requireMap()),et=_(requireInvoke()),tt=_(require$$0$4);_(requirePropTypes());var rt=a(reactExports),at=requireLib(),ct=_(requireButton()),dt=function(yt){(0,j.default)(bt,yt);function bt(){for(var $t,_t=arguments.length,xt=new Array(_t),St=0;St<_t;St++)xt[St]=arguments[St];return $t=yt.call.apply(yt,[this].concat(xt))||this,$t.handleButtonOverrides=function(Mt){return{onClick:function(Rt,Ct){(0,et.default)(Mt,"onClick",Rt,Ct),(0,et.default)($t.props,"onActionClick",Rt,Ct)}}},$t}var Et=bt.prototype;return Et.render=function(){var _t=this,xt=this.props,St=xt.actions,Mt=xt.children,Tt=xt.className,Rt=xt.content,Ct=(0,tt.default)("actions",Tt),It=(0,at.getUnhandledProps)(bt,this.props),kt=(0,at.getElementType)(bt,this.props);return at.childrenUtils.isNil(Mt)?at.childrenUtils.isNil(Rt)?rt.default.createElement(kt,(0,$.default)({},It,{className:Ct}),(0,_e.default)(St,function(Dt){return ct.default.create(Dt,{overrideProps:_t.handleButtonOverrides})})):rt.default.createElement(kt,(0,$.default)({},It,{className:Ct}),Rt):rt.default.createElement(kt,(0,$.default)({},It,{className:Ct}),Mt)},bt}(rt.Component);return ModalActions.default=dt,dt.handledProps=["actions","as","children","className","content","onActionClick"],dt.propTypes={},dt.create=(0,at.createShorthandFactory)(dt,function(yt){return{actions:yt}}),ModalActions}var ModalContent$1={},hasRequiredModalContent;function requireModalContent(){if(hasRequiredModalContent)return ModalContent$1;hasRequiredModalContent=1;var a=interopRequireDefaultExports;ModalContent$1.__esModule=!0,ModalContent$1.default=void 0;var _=a(require_extends()),$=a(require$$0$4);a(requirePropTypes());var j=a(reactExports),_e=requireLib();function et(rt){var at=rt.children,ct=rt.className,dt=rt.content,yt=rt.image,bt=rt.scrolling,Et=(0,$.default)(ct,(0,_e.useKeyOnly)(yt,"image"),(0,_e.useKeyOnly)(bt,"scrolling"),"content"),$t=(0,_e.getUnhandledProps)(et,rt),_t=(0,_e.getElementType)(et,rt);return j.default.createElement(_t,(0,_.default)({},$t,{className:Et}),_e.childrenUtils.isNil(at)?dt:at)}et.handledProps=["as","children","className","content","image","scrolling"],et.propTypes={},et.create=(0,_e.createShorthandFactory)(et,function(rt){return{content:rt}});var tt=et;return ModalContent$1.default=tt,ModalContent$1}var ModalDescription={},hasRequiredModalDescription;function requireModalDescription(){if(hasRequiredModalDescription)return ModalDescription;hasRequiredModalDescription=1;var a=interopRequireDefaultExports;ModalDescription.__esModule=!0,ModalDescription.default=void 0;var _=a(require_extends()),$=a(require$$0$4);a(requirePropTypes());var j=a(reactExports),_e=requireLib();function et(rt){var at=rt.children,ct=rt.className,dt=rt.content,yt=(0,$.default)("description",ct),bt=(0,_e.getUnhandledProps)(et,rt),Et=(0,_e.getElementType)(et,rt);return j.default.createElement(Et,(0,_.default)({},bt,{className:yt}),_e.childrenUtils.isNil(at)?dt:at)}et.handledProps=["as","children","className","content"],et.propTypes={};var tt=et;return ModalDescription.default=tt,ModalDescription}var ModalDimmer={},hasRequiredModalDimmer;function requireModalDimmer(){if(hasRequiredModalDimmer)return ModalDimmer;hasRequiredModalDimmer=1;var a=interopRequireDefaultExports;ModalDimmer.__esModule=!0,ModalDimmer.default=void 0;var _=a(require_extends()),$=require$$10,j=a(require$$0$4);a(requirePropTypes());var _e=a(reactExports),et=requireLib();function tt(at){var ct=at.blurring,dt=at.children,yt=at.className,bt=at.centered,Et=at.content,$t=at.inverted,_t=at.mountNode,xt=at.scrolling,St=_e.default.useRef(),Mt=(0,j.default)("ui",(0,et.useKeyOnly)($t,"inverted"),(0,et.useKeyOnly)(!bt,"top aligned"),"page modals dimmer transition visible active",yt),Tt=(0,j.default)("dimmable dimmed",(0,et.useKeyOnly)(ct,"blurring"),(0,et.useKeyOnly)(xt,"scrolling")),Rt=(0,et.getUnhandledProps)(tt,at),Ct=(0,et.getElementType)(tt,at);return(0,et.useClassNamesOnNode)(_t,Tt),_e.default.useEffect(function(){St.current&&St.current.style&&St.current.style.setProperty("display","flex","important")},[]),_e.default.createElement($.Ref,{innerRef:St},_e.default.createElement(Ct,(0,_.default)({},Rt,{className:Mt}),et.childrenUtils.isNil(dt)?Et:dt))}tt.handledProps=["as","blurring","centered","children","className","content","inverted","mountNode","scrolling"],tt.propTypes={},tt.create=(0,et.createShorthandFactory)(tt,function(at){return{content:at}});var rt=tt;return ModalDimmer.default=rt,ModalDimmer}var ModalHeader={},hasRequiredModalHeader;function requireModalHeader(){if(hasRequiredModalHeader)return ModalHeader;hasRequiredModalHeader=1;var a=interopRequireDefaultExports;ModalHeader.__esModule=!0,ModalHeader.default=void 0;var _=a(require_extends()),$=a(require$$0$4);a(requirePropTypes());var j=a(reactExports),_e=requireLib();function et(rt){var at=rt.children,ct=rt.className,dt=rt.content,yt=(0,$.default)("header",ct),bt=(0,_e.getUnhandledProps)(et,rt),Et=(0,_e.getElementType)(et,rt);return j.default.createElement(Et,(0,_.default)({},bt,{className:yt}),_e.childrenUtils.isNil(at)?dt:at)}et.handledProps=["as","children","className","content"],et.propTypes={},et.create=(0,_e.createShorthandFactory)(et,function(rt){return{content:rt}});var tt=et;return ModalHeader.default=tt,ModalHeader}var utils={},hasRequiredUtils;function requireUtils(){if(hasRequiredUtils)return utils;hasRequiredUtils=1,utils.__esModule=!0,utils.isLegacy=utils.getLegacyStyles=utils.canFit=void 0;var a=0,_=50,$=function(tt){var rt=tt.height+a,at=tt.height+a,ct=window.innerHeight,dt=ct/2,yt=-(at/2),bt=_,Et=dt+yt;return Et+rt+bt<ct};utils.canFit=$;var j=function(tt,rt,at){var ct=rt&&tt?-(at.height/2):0,dt=-(at.width/2);return{marginLeft:dt,marginTop:ct}};utils.getLegacyStyles=j;var _e=function(){return!window.ActiveXObject&&"ActiveXObject"in window};return utils.isLegacy=_e,utils}var _interopRequireWildcard=interopRequireWildcardExports,_interopRequireDefault=interopRequireDefaultExports;Modal$2.__esModule=!0;Modal$2.default=void 0;var _extends2=_interopRequireDefault(require_extends()),_inheritsLoose2=_interopRequireDefault(requireInheritsLoose()),_isPlainObject2=_interopRequireDefault(requireIsPlainObject()),_pick2=_interopRequireDefault(requirePick()),_includes2=_interopRequireDefault(requireIncludes()),_reduce2=_interopRequireDefault(requireReduce()),_isEmpty2=_interopRequireDefault(requireIsEmpty()),_invoke2=_interopRequireDefault(requireInvoke()),_reactComponentRef=require$$10,_clsx=_interopRequireDefault(require$$0$4);_interopRequireDefault(requirePropTypes());var _react=_interopRequireWildcard(reactExports),_shallowequal=_interopRequireDefault(requireShallowequal()),_lib=requireLib(),_Icon=_interopRequireDefault(requireIcon()),_Portal=_interopRequireDefault(requirePortal()),_ModalActions=_interopRequireDefault(requireModalActions()),_ModalContent=_interopRequireDefault(requireModalContent()),_ModalDescription=_interopRequireDefault(requireModalDescription()),_ModalDimmer=_interopRequireDefault(requireModalDimmer()),_ModalHeader=_interopRequireDefault(requireModalHeader()),_utils=requireUtils(),Modal$1=function(a){(0,_inheritsLoose2.default)(_,a);function _(){for(var j,_e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=a.call.apply(a,[this].concat(et))||this,j.legacy=(0,_lib.isBrowser)()&&(0,_utils.isLegacy)(),j.ref=(0,_react.createRef)(),j.dimmerRef=(0,_react.createRef)(),j.latestDocumentMouseDownEvent=null,j.getMountNode=function(){return(0,_lib.isBrowser)()?j.props.mountNode||document.body:null},j.handleActionsOverrides=function(rt){return{onActionClick:function(ct,dt){(0,_invoke2.default)(rt,"onActionClick",ct,dt),(0,_invoke2.default)(j.props,"onActionClick",ct,j.props),j.handleClose(ct)}}},j.handleClose=function(rt){j.setState({open:!1}),(0,_invoke2.default)(j.props,"onClose",rt,(0,_extends2.default)({},j.props,{open:!1}))},j.handleDocumentMouseDown=function(rt){j.latestDocumentMouseDownEvent=rt},j.handleDocumentClick=function(rt){var at=j.props.closeOnDimmerClick,ct=j.latestDocumentMouseDownEvent;j.latestDocumentMouseDownEvent=null,!(!at||(0,_lib.doesNodeContainClick)(j.ref.current,ct)||(0,_lib.doesNodeContainClick)(j.ref.current,rt))&&(j.setState({open:!1}),(0,_invoke2.default)(j.props,"onClose",rt,(0,_extends2.default)({},j.props,{open:!1})))},j.handleIconOverrides=function(rt){return{onClick:function(ct){(0,_invoke2.default)(rt,"onClick",ct),j.handleClose(ct)}}},j.handleOpen=function(rt){(0,_invoke2.default)(j.props,"onOpen",rt,(0,_extends2.default)({},j.props,{open:!0})),j.setState({open:!0})},j.handlePortalMount=function(rt){var at=j.props.eventPool;j.setState({scrolling:!1}),j.setPositionAndClassNames(),_lib.eventStack.sub("mousedown",j.handleDocumentMouseDown,{pool:at,target:j.dimmerRef.current}),_lib.eventStack.sub("click",j.handleDocumentClick,{pool:at,target:j.dimmerRef.current}),(0,_invoke2.default)(j.props,"onMount",rt,j.props)},j.handlePortalUnmount=function(rt){var at=j.props.eventPool;cancelAnimationFrame(j.animationRequestId),_lib.eventStack.unsub("mousedown",j.handleDocumentMouseDown,{pool:at,target:j.dimmerRef.current}),_lib.eventStack.unsub("click",j.handleDocumentClick,{pool:at,target:j.dimmerRef.current}),(0,_invoke2.default)(j.props,"onUnmount",rt,j.props)},j.setPositionAndClassNames=function(){var rt=j.props.centered,at,ct={};if(j.ref.current){var dt=j.ref.current.getBoundingClientRect(),yt=(0,_utils.canFit)(dt);at=!yt;var bt=j.legacy?(0,_utils.getLegacyStyles)(yt,rt,dt):{};(0,_shallowequal.default)(j.state.legacyStyles,bt)||(ct.legacyStyles=bt),j.state.scrolling!==at&&(ct.scrolling=at)}(0,_isEmpty2.default)(ct)||j.setState(ct),j.animationRequestId=requestAnimationFrame(j.setPositionAndClassNames)},j.renderContent=function(rt){var at=j.props,ct=at.actions,dt=at.basic,yt=at.children,bt=at.className,Et=at.closeIcon,$t=at.content,_t=at.header,xt=at.size,St=at.style,Mt=j.state,Tt=Mt.legacyStyles,Rt=Mt.scrolling,Ct=(0,_clsx.default)("ui",xt,(0,_lib.useKeyOnly)(dt,"basic"),(0,_lib.useKeyOnly)(j.legacy,"legacy"),(0,_lib.useKeyOnly)(Rt,"scrolling"),"modal transition visible active",bt),It=(0,_lib.getElementType)(_,j.props),kt=Et===!0?"close":Et,Dt=_Icon.default.create(kt,{overrideProps:j.handleIconOverrides});return _react.default.createElement(_reactComponentRef.Ref,{innerRef:j.ref},_react.default.createElement(It,(0,_extends2.default)({},rt,{className:Ct,style:(0,_extends2.default)({},Tt,St)}),Dt,_lib.childrenUtils.isNil(yt)?_react.default.createElement(_react.default.Fragment,null,_ModalHeader.default.create(_t,{autoGenerateKey:!1}),_ModalContent.default.create($t,{autoGenerateKey:!1}),_ModalActions.default.create(ct,{overrideProps:j.handleActionsOverrides})):yt))},j}var $=_.prototype;return $.componentWillUnmount=function(){this.handlePortalUnmount()},$.render=function(){var _e=this.props,et=_e.centered,tt=_e.closeOnDocumentClick,rt=_e.dimmer,at=_e.eventPool,ct=_e.trigger,dt=this.state,yt=dt.open,bt=dt.scrolling,Et=this.getMountNode();if(!(0,_lib.isBrowser)())return(0,_react.isValidElement)(ct)?ct:null;var $t=(0,_lib.getUnhandledProps)(_,this.props),_t=_Portal.default.handledProps,xt=(0,_reduce2.default)($t,function(Mt,Tt,Rt){return(0,_includes2.default)(_t,Rt)||(Mt[Rt]=Tt),Mt},{}),St=(0,_pick2.default)($t,_t);return _react.default.createElement(_Portal.default,(0,_extends2.default)({closeOnDocumentClick:tt},St,{trigger:ct,eventPool:at,mountNode:Et,open:yt,onClose:this.handleClose,onMount:this.handlePortalMount,onOpen:this.handleOpen,onUnmount:this.handlePortalUnmount}),_react.default.createElement(_reactComponentRef.Ref,{innerRef:this.dimmerRef},_ModalDimmer.default.create((0,_isPlainObject2.default)(rt)?rt:{},{autoGenerateKey:!1,defaultProps:{blurring:rt==="blurring",inverted:rt==="inverted"},overrideProps:{children:this.renderContent(xt),centered:et,mountNode:Et,scrolling:bt}})))},_}(_lib.ModernAutoControlledComponent);Modal$1.handledProps=["actions","as","basic","centered","children","className","closeIcon","closeOnDimmerClick","closeOnDocumentClick","content","defaultOpen","dimmer","eventPool","header","mountNode","onActionClick","onClose","onMount","onOpen","onUnmount","open","size","style","trigger"];Modal$1.propTypes={};Modal$1.defaultProps={centered:!0,dimmer:!0,closeOnDimmerClick:!0,closeOnDocumentClick:!1,eventPool:"Modal"};Modal$1.autoControlledProps=["open"];Modal$1.Actions=_ModalActions.default;Modal$1.Content=_ModalContent.default;Modal$1.Description=_ModalDescription.default;Modal$1.Dimmer=_ModalDimmer.default;Modal$1.Header=_ModalHeader.default;var _default=Modal$1;Modal$2.default=_default;const Modal="";(function(a){var _=commonjsGlobal&&commonjsGlobal.__importDefault||function(j){return j&&j.__esModule?j:{default:j}};Object.defineProperty(a,"__esModule",{value:!0}),a.Modal=void 0;var $=Modal$2;Object.defineProperty(a,"Modal",{enumerable:!0,get:function(){return _($).default}})})(Modal$3);const wait=a=>new Promise(_=>setTimeout(_,a));var ModalContentExports=requireModalContent();const ModalContent=getDefaultExportFromCjs$1(ModalContentExports);var ModalNavigation$2={};const ModalNavigation$1="";var __extends=commonjsGlobal&&commonjsGlobal.__extends||function(){var a=function(_,$){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(j,_e){j.__proto__=_e}||function(j,_e){for(var et in _e)Object.prototype.hasOwnProperty.call(_e,et)&&(j[et]=_e[et])},a(_,$)};return function(_,$){if(typeof $!="function"&&$!==null)throw new TypeError("Class extends value "+String($)+" is not a constructor or null");a(_,$);function j(){this.constructor=_}_.prototype=$===null?Object.create($):(j.prototype=$.prototype,new j)}}(),__createBinding=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(a,_,$,j){j===void 0&&(j=$);var _e=Object.getOwnPropertyDescriptor(_,$);(!_e||("get"in _e?!_.__esModule:_e.writable||_e.configurable))&&(_e={enumerable:!0,get:function(){return _[$]}}),Object.defineProperty(a,j,_e)}:function(a,_,$,j){j===void 0&&(j=$),a[j]=_[$]}),__setModuleDefault=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(a,_){Object.defineProperty(a,"default",{enumerable:!0,value:_})}:function(a,_){a.default=_}),__importStar=commonjsGlobal&&commonjsGlobal.__importStar||function(a){if(a&&a.__esModule)return a;var _={};if(a!=null)for(var $ in a)$!=="default"&&Object.prototype.hasOwnProperty.call(a,$)&&__createBinding(_,a,$);return __setModuleDefault(_,a),_};Object.defineProperty(ModalNavigation$2,"__esModule",{value:!0});var ModalNavigation_2=ModalNavigation$2.ModalNavigation=void 0,React=__importStar(reactExports),ModalNavigation=function(a){__extends(_,a);function _(){return a!==null&&a.apply(this,arguments)||this}return _.prototype.render=function(){var $=this.props,j=$.title,_e=$.subtitle,et=$.onBack,tt=$.onClose,rt=$.onInfo;return React.createElement("div",{className:"dcl modal-navigation"},React.createElement("div",{className:"dcl modal-navigation-title"},j),_e&&React.createElement("div",{className:"dcl modal-navigation-subtitle"},_e),et&&React.createElement("div",{className:"dcl modal-navigation-button modal-navigation-back",onClick:et}),rt&&React.createElement("div",{className:"dcl modal-navigation-button modal-navigation-info",onClick:rt}),tt&&React.createElement("div",{className:"dcl modal-navigation-button modal-navigation-close",onClick:tt}))},_}(React.PureComponent);ModalNavigation_2=ModalNavigation$2.ModalNavigation=ModalNavigation;const warningSrc="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239233428.commit-2de01c8/assets/warning-057948e8.svg";var ConnectionModalState=(a=>(a.CONNECTING_WALLET="CONNECTING_WALLET",a.WAITING_FOR_SIGNATURE="WAITING_FOR_SIGNATURE",a.ERROR="ERROR",a.LOADING_MAGIC="LOADING_MAGIC",a.VALIDATING_SIGN_IN="VALIDATING_SIGN_IN",a.WAITING_FOR_CONFIRMATION="WAITING_FOR_CONFIRMATION",a.ERROR_LOCKED_WALLET="ERROR_LOCKED_WALLET",a))(ConnectionModalState||{});function getConnectionMessage(a,_){switch(a){case ConnectionModalState.ERROR:return"You did not confirm this action in your digital wallet extension. To continue, please try again.";case ConnectionModalState.ERROR_LOCKED_WALLET:return"Your wallet is currently locked. To continue, please unlock your wallet and try again.";case ConnectionModalState.CONNECTING_WALLET:case ConnectionModalState.WAITING_FOR_SIGNATURE:return _===dist$8.ProviderType.MAGIC||_===dist$8.ProviderType.MAGIC_TEST?"Almost done! Confirm your request to login Decentraland":"Confirm in your digital wallet extension to continue.";case ConnectionModalState.VALIDATING_SIGN_IN:return"Just a moment, we're verifying your login credentials...";case ConnectionModalState.LOADING_MAGIC:return"Redirecting..."}}const main$3="_main_1qx1l_1",content$1="_content_1qx1l_8",errorImage="_errorImage_1qx1l_16",message="_message_1qx1l_22",loader="_loader_1qx1l_29",styles$4={main:main$3,content:content$1,errorImage,message,loader},ConnectionModal=a=>{const{open:_,state:$,providerType:j,onClose:_e,onTryAgain:et}=a,tt=$===ConnectionModalState.CONNECTING_WALLET||$===ConnectionModalState.WAITING_FOR_SIGNATURE||$===ConnectionModalState.LOADING_MAGIC||$===ConnectionModalState.VALIDATING_SIGN_IN,rt=$===ConnectionModalState.ERROR||$===ConnectionModalState.ERROR_LOCKED_WALLET;return jsxRuntimeExports.jsxs(Modal$3.Modal,{size:"tiny",open:_,children:[jsxRuntimeExports.jsx(ModalNavigation_2,{title:"",onClose:tt?void 0:_e}),jsxRuntimeExports.jsx("div",{className:styles$4.main,children:jsxRuntimeExports.jsxs("div",{className:styles$4.content,children:[rt&&jsxRuntimeExports.jsx("img",{className:styles$4.errorImage,src:warningSrc}),tt&&jsxRuntimeExports.jsx(Loader_3,{className:styles$4.loader,size:"huge",inline:!0}),jsxRuntimeExports.jsx("p",{className:styles$4.message,children:getConnectionMessage($,j)}),rt&&jsxRuntimeExports.jsx(Button$5.Button,{primary:!0,onClick:et,children:"Try again"})]})}),jsxRuntimeExports.jsx(ModalContent,{})]})},container="_container_1jfc2_1",info$2="_info_1jfc2_19",title$1="_title_1jfc2_28",styles$3={container,info:info$2,title:title$1},CallbackPage=()=>{usePageTracking();const{url:a,redirect:_}=useAfterLoginRedirection(),$=useNavigateWithSearchParams(),[j,_e]=reactExports.useState(!1),[et,tt]=reactExports.useState(ConnectionModalState.WAITING_FOR_CONFIRMATION),{flags:rt,initialized:at}=reactExports.useContext(FeatureFlagsContext),[ct]=useTargetConfig(),dt=reactExports.useCallback(async()=>{var $t;const Et=await connection$1.connect(rt[FeatureFlagsKeys.MAGIC_TEST]?dist$8.ProviderType.MAGIC_TEST:dist$8.ProviderType.MAGIC);return await getIdentitySignature((($t=Et.account)==null?void 0:$t.toLowerCase())??"",Et.provider),Et},[rt[FeatureFlagsKeys.MAGIC_TEST]]),yt=reactExports.useCallback(async()=>{var Et;try{rt[FeatureFlagsKeys.DAPPS_MAGIC_AUTO_SIGN]||tt(ConnectionModalState.WAITING_FOR_SIGNATURE);const $t=await dt(),_t=((Et=$t.account)==null?void 0:Et.toLowerCase())??"";if(getAnalytics().identify({ethAddress:_t}),getAnalytics().track(TrackingEvents.LOGIN_SUCCESS,{eth_address:_t,type:ConnectionType.WEB2}),await wait(800),!ct.skipSetup&&$t.account&&!await fetchProfile($t.account))return $(locations.setup(a));_()}catch($t){console.log($t),$(locations.login())}},[$,a,dt,_,rt[FeatureFlagsKeys.DAPPS_MAGIC_AUTO_SIGN]]),bt=reactExports.useCallback(async()=>{const{Magic:Et}=await __vitePreload(()=>import("./index-34c625fd.js"),["assets/index-34c625fd.js","assets/index-7fb3637e.js"]),{OAuthExtension:$t}=await __vitePreload(()=>import("./index-604dcebc.js"),["assets/index-604dcebc.js","assets/index-7fb3637e.js"]),_t=rt[FeatureFlagsKeys.MAGIC_TEST]?getConfiguration().magic_test.apiKey:getConfiguration().magic.apiKey,xt=new Et(_t,{extensions:[new $t]});try{tt(ConnectionModalState.VALIDATING_SIGN_IN),await(xt==null?void 0:xt.oauth2.getRedirectResult()),rt[FeatureFlagsKeys.DAPPS_MAGIC_AUTO_SIGN]?yt():tt(ConnectionModalState.WAITING_FOR_CONFIRMATION)}catch(St){console.error("Error logging in",St),getAnalytics().track(TrackingEvents.LOGIN_ERROR,{error:isErrorWithMessage(St)?St.message:St}),await wait(800),$(locations.login())}},[$,yt,rt[FeatureFlagsKeys.MAGIC_TEST],rt[FeatureFlagsKeys.DAPPS_MAGIC_AUTO_SIGN]]);return reactExports.useEffect(()=>{!j&&at&&(_e(!0),bt())},[bt,at,j]),et===ConnectionModalState.WAITING_FOR_CONFIRMATION?jsxRuntimeExports.jsx(Modal$3.Modal,{size:"tiny",open:!0,children:jsxRuntimeExports.jsxs("div",{className:styles$3.container,children:[jsxRuntimeExports.jsx("h3",{className:styles$3.title,children:"Confirm your login"}),jsxRuntimeExports.jsxs("div",{className:styles$3.info,children:[jsxRuntimeExports.jsx("span",{children:"The next step only verifies your identity."}),jsxRuntimeExports.jsx("span",{children:"No payments or transactions will occur without your explicit approval."})]}),jsxRuntimeExports.jsx(Button$5.Button,{primary:!0,onClick:yt,children:"Continue"})]})}):jsxRuntimeExports.jsx(ConnectionModal,{open:!0,state:et,onTryAgain:dt,providerType:rt[FeatureFlagsKeys.MAGIC_TEST]?dist$8.ProviderType.MAGIC_TEST:dist$8.ProviderType.MAGIC})},warningImage="_warningImage_xwxyz_1",content="_content_xwxyz_7",style={warningImage,content},InvalidRedirectionPage=()=>jsxRuntimeExports.jsxs(Modal$3.Modal,{size:"tiny",open:!0,children:[jsxRuntimeExports.jsx(ModalNavigation_2,{title:"Invalid redirection",onClose:void 0}),jsxRuntimeExports.jsxs(Modal$3.Modal.Content,{className:style.content,children:[jsxRuntimeExports.jsx("img",{className:style.warningImage,src:warningSrc}),jsxRuntimeExports.jsx("p",{children:"The site you were redirected to is invalid."})]}),jsxRuntimeExports.jsx(Modal$3.Modal.Actions,{children:jsxRuntimeExports.jsx(Button$5.Button,{primary:!0,as:Link,to:locations.login(),children:"Go back to the login page"})})]}),Image1="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239233428.commit-2de01c8/assets/image1-a4aa795b.webp",Image10="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239233428.commit-2de01c8/assets/image10-c7fbcc61.webp",Image2="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239233428.commit-2de01c8/assets/image2-0af6ed59.webp",Image3="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239233428.commit-2de01c8/assets/image3-c864ad86.webp",Image4="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239233428.commit-2de01c8/assets/image4-7964be5f.webp",Image5="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239233428.commit-2de01c8/assets/image5-fcca517e.webp",Image6="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239233428.commit-2de01c8/assets/image6-c770bdf5.webp",Image7="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239233428.commit-2de01c8/assets/image7-341595c4.webp",Image8="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239233428.commit-2de01c8/assets/image8-fea9fe85.webp",Image9="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239233428.commit-2de01c8/assets/image9-714885ef.webp",main$2="_main_rwmls_1",title="_title_rwmls_11",infoModal$1="_infoModal_rwmls_15",infoContent$1="_infoContent_rwmls_19",info$1="_info_rwmls_15",goBackButton$1="_goBackButton_rwmls_33",styles$2={main:main$2,title,infoModal:infoModal$1,infoContent:infoContent$1,info:info$1,goBackButton:goBackButton$1},defaultProps$1={i18n:{title:"How does Magic work?",subtitle:"Magic handles digital wallet creation & management behind the scenes so you don't have to. Just log into Decentraland with your favorite social account and let Magic handle the rest.<br /> <br />If you'd rather take a more hands-on approach to your digital asset storage (e.g. Wearables, NAMEs, etc.), you can get a digital wallet from a provider such as <a href='https://metamask.io/'>MetaMask</a> and use it to create your Decentraland account.",goBack:"Return to log in page"}},MagicInformationModal=a=>{const{i18n:_=defaultProps$1.i18n,onClose:$,open:j}=a;return jsxRuntimeExports.jsxs(Modal$3.Modal,{size:"tiny",open:j,className:styles$2.infoModal,onClose:$,children:[jsxRuntimeExports.jsx(ModalNavigation_2,{title:"",onClose:$}),jsxRuntimeExports.jsx(ModalContent,{className:styles$2.infoContent,children:jsxRuntimeExports.jsxs("div",{className:styles$2.main,children:[jsxRuntimeExports.jsx("h1",{className:styles$2.title,children:_==null?void 0:_.title}),jsxRuntimeExports.jsx("span",{className:styles$2.info,dangerouslySetInnerHTML:{__html:_==null?void 0:_.subtitle}}),jsxRuntimeExports.jsx(Button$5.Button,{className:styles$2.goBackButton,secondary:!0,inverted:!0,onClick:$,children:_==null?void 0:_.goBack})]})})]})},main$1="_main_1yy07_1",infoModal="_infoModal_1yy07_11",infoContent="_infoContent_1yy07_15",info="_info_1yy07_11",infoImage="_infoImage_1yy07_26",assets="_assets_1yy07_34",login="_login_1yy07_38",goBackButton="_goBackButton_1yy07_42",styles$1={main:main$1,infoModal,infoContent,info,infoImage,assets,login,goBackButton},defaultProps={i18n:{title:"What is a digital wallet?",assets:{title:"A Home For Your Digital Assets",text:"Wallets are used to send, receive, store, and display digital assets, such as your Decentraland Wearables, NAMEs, LANDs, etc."},logIn:{title:"A New Way To Log In",text:"Instead of creating new accounts and passwords on every website, in the world of Web3 all you need to do is just connect your digital wallet."},goBack:"Return to log in page"}},WalletInformationModal=a=>{const{i18n:_=defaultProps.i18n,onClose:$,open:j}=a;return jsxRuntimeExports.jsxs(Modal$3.Modal,{size:"tiny",open:j,className:styles$1.infoModal,onClose:$,children:[jsxRuntimeExports.jsx(ModalNavigation_2,{title:"",onClose:$}),jsxRuntimeExports.jsx(ModalContent,{className:styles$1.infoContent,children:jsxRuntimeExports.jsxs("div",{className:styles$1.main,children:[jsxRuntimeExports.jsx("h1",{className:styles$1.title,children:_==null?void 0:_.title}),jsxRuntimeExports.jsxs("article",{className:styles$1.info,children:[jsxRuntimeExports.jsx("div",{className:classNames(styles$1.infoImage,styles$1.assets)}),jsxRuntimeExports.jsx("h3",{children:_==null?void 0:_.assets.title}),jsxRuntimeExports.jsx("p",{children:_==null?void 0:_.assets.text})]}),jsxRuntimeExports.jsxs("article",{className:styles$1.info,children:[jsxRuntimeExports.jsx("div",{className:classNames(styles$1.infoImage,styles$1.login)}),jsxRuntimeExports.jsx("h3",{children:_==null?void 0:_.logIn.title}),jsxRuntimeExports.jsx("p",{children:_==null?void 0:_.logIn.text})]}),jsxRuntimeExports.jsx(Button$5.Button,{className:styles$1.goBackButton,secondary:!0,inverted:!0,onClick:$,children:_==null?void 0:_.goBack})]})})]})},main="_main_15y2x_1",background="_background_15y2x_8",left="_left_15y2x_32",leftInfo="_leftInfo_15y2x_42",right="_right_15y2x_51",footer="_footer_15y2x_60",guestInfo="_guestInfo_15y2x_79",styles={main,background,"move-background":"_move-background_15y2x_1",left,leftInfo,right,footer,guestInfo},BACKGROUND_IMAGES=[Image1,Image2,Image3,Image4,Image5,Image6,Image7,Image8,Image9,Image10],LoginPage=()=>{usePageTracking();const a=useNavigateWithSearchParams(),[_,$]=reactExports.useState(ConnectionModalState.CONNECTING_WALLET),[j,_e]=reactExports.useState(!1),[et,tt]=reactExports.useState(!1),[rt,at]=reactExports.useState(!1),[ct,dt]=reactExports.useState(),{url:yt,redirect:bt}=useAfterLoginRedirection(),{flags:Et,initialized:$t}=reactExports.useContext(FeatureFlagsContext),_t=yt&&new URL(yt).pathname.includes("/play"),[xt,St]=reactExports.useState(0),[Mt]=useTargetConfig(),Tt=reactExports.useCallback(vt=>{const nt=vt&&isSocialLogin(vt);getAnalytics().track(TrackingEvents.CLICK,{action:ClickEvents.LEARN_MORE,type:nt?"Learn more about Magic":"Learn more about wallets"}),nt?tt(!0):_e(!0)},[_e,tt,j]),Rt=reactExports.useCallback(()=>{_e(!1),tt(!1)},[_e,tt]),Ct=reactExports.useCallback(()=>{tt(!et)},[tt,et]),It=reactExports.useCallback(async()=>{getAnalytics().track(TrackingEvents.LOGIN_CLICK,{type:"guest"}),await wait(800)},[]),kt=reactExports.useMemo(()=>{if(yt){const vt=new URL(yt);return vt.searchParams.append("guest","true"),vt.toString()}return""},[yt]),Dt=reactExports.useCallback(async vt=>{var lt;const nt=isSocialLogin(vt),st=nt?ConnectionType.WEB2:ConnectionType.WEB3;if(dt(vt),getAnalytics().track(TrackingEvents.LOGIN_CLICK,{method:vt,type:st}),nt)$(ConnectionModalState.LOADING_MAGIC),await wait(800),await connectToSocialProvider(vt,Et[FeatureFlagsKeys.MAGIC_TEST],yt);else try{at(!0),$(ConnectionModalState.CONNECTING_WALLET);const ht=await connectToProvider(vt);if(await wait(800),$(ConnectionModalState.WAITING_FOR_SIGNATURE),await getIdentitySignature(((lt=ht.account)==null?void 0:lt.toLowerCase())??"",ht.provider),getAnalytics().track(TrackingEvents.LOGIN_SUCCESS,{eth_address:ht.account,type:st}),getAnalytics().identify({ethAddress:ht.account}),await wait(800),!Mt.skipSetup&&ht.account&&!await fetchProfile(ht.account))return a(locations.setup(yt)),at(!1);bt(),at(!1)}catch(ht){console.error("Error",isErrorWithMessage(ht)?ht.message:JSON.stringify(ht)),getAnalytics().track(TrackingEvents.LOGIN_ERROR,{error:isErrorWithMessage(ht)?ht.message:ht}),isErrorWithName(ht)&&ht.name==="ErrorUnlockingWallet"?$(ConnectionModalState.ERROR_LOCKED_WALLET):$(ConnectionModalState.ERROR)}},[$,at,dt,yt,Et[FeatureFlagsKeys.MAGIC_TEST],a,bt]),Bt=reactExports.useCallback(()=>{at(!1),dt(void 0),$(ConnectionModalState.CONNECTING_WALLET)},[at]),zt=reactExports.useCallback(()=>{ct&&Dt(ct)},[ct,Dt]);return reactExports.useEffect(()=>{const vt=setInterval(()=>{St(nt=>nt===BACKGROUND_IMAGES.length-1?0:nt+1)},5e3);return()=>{clearInterval(vt)}},[]),jsxRuntimeExports.jsxs("main",{className:styles.main,children:[jsxRuntimeExports.jsx("div",{className:styles.background,style:{backgroundImage:`url(${BACKGROUND_IMAGES[xt]})`}}),config$1.is(dist$4.Env.DEVELOPMENT)&&!$t?jsxRuntimeExports.jsx(Loader_3,{active:!0,size:"massive"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(WalletInformationModal,{open:j,onClose:Rt}),jsxRuntimeExports.jsx(MagicInformationModal,{open:et,onClose:Ct}),jsxRuntimeExports.jsx(ConnectionModal,{open:rt,state:_,onClose:Bt,onTryAgain:zt,providerType:ct?fromConnectionOptionToProviderType(ct):null}),jsxRuntimeExports.jsx("div",{className:styles.left,children:jsxRuntimeExports.jsxs("div",{className:styles.leftInfo,children:[jsxRuntimeExports.jsx(Connection,{onLearnMore:Tt,onConnect:Dt,loadingOption:ct,connectionOptions:Mt.connectionOptions}),_t&&jsxRuntimeExports.jsxs("div",{className:styles.guestInfo,children:["Quick dive?"," ",jsxRuntimeExports.jsx("a",{href:kt,onClick:It,children:"Explore as a guest"})]})]})})]})]})};(function(){const a=window.analytics=window.analytics||[];if(!a.initialize){if(a.invoked){window.console&&console.error&&console.error("Segment snippet included twice.");return}a.invoked=!0,a.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","user","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],a.factory=function(_){return function(){const $=Array.prototype.slice.call(arguments);return $.unshift(_),a.push($),a}};for(let _=0;_<a.methods.length;_++){const $=a.methods[_];a[$]=a.factory($)}a.load=function(_,$){const j=document.createElement("script");j.type="text/javascript",j.async=!0,j.src="https://cdn.segment.com/analytics.js/v1/"+_+"/analytics.min.js";const _e=document.getElementsByTagName("script")[0];_e.parentNode.insertBefore(j,_e),a._loadOptions=$},a.SNIPPET_VERSION="4.15.2"}})();const darkTheme="",index="";getAnalytics().load(config$1.get("SEGMENT_API_KEY"));ReactDOM.render(jsxRuntimeExports.jsx(React$5.StrictMode,{children:jsxRuntimeExports.jsxs(FeatureFlagsProvider,{children:[jsxRuntimeExports.jsx(BrowserRouter,{basename:"/auth",children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/login",element:jsxRuntimeExports.jsx(LoginPage,{})}),jsxRuntimeExports.jsx(Route,{path:"/invalidRedirection",element:jsxRuntimeExports.jsx(InvalidRedirectionPage,{})}),jsxRuntimeExports.jsx(Route,{path:"/callback",element:jsxRuntimeExports.jsx(CallbackPage,{})}),jsxRuntimeExports.jsx(Route,{path:"/requests/:requestId",element:jsxRuntimeExports.jsx(RequestPage,{})}),jsxRuntimeExports.jsx(Route,{path:"/setup",element:jsxRuntimeExports.jsx(SetupPage,{})}),jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(DefaultPage,{})})]})}),jsxRuntimeExports.jsx(Intercom,{appId:config$1.get("INTERCOM_APP_ID"),settings:{alignment:"right"}})]})}),document.getElementById("root"));export{BN$b as B,__vitePreload as _,getAugmentedNamespace as a,getDefaultExportFromCjs$1 as b,commonjsGlobal as c,commonjsRequire as d,require$$0$3 as e,hash$5 as f,global$1 as g,hash$4 as h,inherits_browserExports as i,requireBrorand as j,hmacDrbg as k,Buffer$G as l,minimalisticAssert as m,eventsExports as n,it as o,process$1 as p,o as q,requireCryptoBrowserify as r,sideChannel as s,bnExports$4 as t,utils$n as u,sha_jsExports as v,readableBrowserExports as w,require$$0$4 as x};
158
- //# sourceMappingURL=index-fc637d45.js.map
157
+ */(function(){var ct=typeof Symbol=="function"&&Symbol.for,dt=ct?Symbol.for("react.element"):60103,yt=ct?Symbol.for("react.portal"):60106,bt=ct?Symbol.for("react.fragment"):60107,Et=ct?Symbol.for("react.strict_mode"):60108,$t=ct?Symbol.for("react.profiler"):60114,_t=ct?Symbol.for("react.provider"):60109,xt=ct?Symbol.for("react.context"):60110,St=ct?Symbol.for("react.async_mode"):60111,Mt=ct?Symbol.for("react.concurrent_mode"):60111,Tt=ct?Symbol.for("react.forward_ref"):60112,Rt=ct?Symbol.for("react.suspense"):60113,Ct=ct?Symbol.for("react.suspense_list"):60120,It=ct?Symbol.for("react.memo"):60115,kt=ct?Symbol.for("react.lazy"):60116,Dt=ct?Symbol.for("react.block"):60121,Bt=ct?Symbol.for("react.fundamental"):60117,zt=ct?Symbol.for("react.responder"):60118,vt=ct?Symbol.for("react.scope"):60119;function nt(Mr){return typeof Mr=="string"||typeof Mr=="function"||Mr===bt||Mr===Mt||Mr===$t||Mr===Et||Mr===Rt||Mr===Ct||typeof Mr=="object"&&Mr!==null&&(Mr.$$typeof===kt||Mr.$$typeof===It||Mr.$$typeof===_t||Mr.$$typeof===xt||Mr.$$typeof===Tt||Mr.$$typeof===Bt||Mr.$$typeof===zt||Mr.$$typeof===vt||Mr.$$typeof===Dt)}function st(Mr){if(typeof Mr=="object"&&Mr!==null){var Vr=Mr.$$typeof;switch(Vr){case dt:var pn=Mr.type;switch(pn){case St:case Mt:case bt:case $t:case Et:case Rt:return pn;default:var Gr=pn&&pn.$$typeof;switch(Gr){case xt:case Tt:case kt:case It:case _t:return Gr;default:return Vr}}case yt:return Vr}}}var lt=St,ht=Mt,mt=xt,wt=_t,At=dt,gt=Tt,ot=bt,pt=kt,Pt=It,Ot=yt,Nt=$t,jt=Et,Ut=Rt,Vt=!1;function rr(Mr){return Vt||(Vt=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),tr(Mr)||st(Mr)===St}function tr(Mr){return st(Mr)===Mt}function Zt(Mr){return st(Mr)===xt}function Yt(Mr){return st(Mr)===_t}function Wt(Mr){return typeof Mr=="object"&&Mr!==null&&Mr.$$typeof===dt}function fr(Mr){return st(Mr)===Tt}function jr(Mr){return st(Mr)===bt}function Sr(Mr){return st(Mr)===kt}function Er(Mr){return st(Mr)===It}function sn(Mr){return st(Mr)===yt}function Ir(Mr){return st(Mr)===$t}function gr(Mr){return st(Mr)===Et}function ln(Mr){return st(Mr)===Rt}at.AsyncMode=lt,at.ConcurrentMode=ht,at.ContextConsumer=mt,at.ContextProvider=wt,at.Element=At,at.ForwardRef=gt,at.Fragment=ot,at.Lazy=pt,at.Memo=Pt,at.Portal=Ot,at.Profiler=Nt,at.StrictMode=jt,at.Suspense=Ut,at.isAsyncMode=rr,at.isConcurrentMode=tr,at.isContextConsumer=Zt,at.isContextProvider=Yt,at.isElement=Wt,at.isForwardRef=fr,at.isFragment=jr,at.isLazy=Sr,at.isMemo=Er,at.isPortal=sn,at.isProfiler=Ir,at.isStrictMode=gr,at.isSuspense=ln,at.isValidElementType=nt,at.typeOf=st})()},"./node_modules/react-is/index.js":(rt,at,ct)=>{rt.exports=ct("./node_modules/react-is/cjs/react-is.development.js")},"./node_modules/shallow-equal/dist/index.esm.js":(rt,at,ct)=>{ct.r(at),ct.d(at,{shallowEqualArrays:()=>yt,shallowEqualObjects:()=>dt});function dt(bt,Et){if(bt===Et)return!0;if(!bt||!Et)return!1;var $t=Object.keys(bt),_t=Object.keys(Et),xt=$t.length;if(_t.length!==xt)return!1;for(var St=0;St<xt;St++){var Mt=$t[St];if(bt[Mt]!==Et[Mt]||!Object.prototype.hasOwnProperty.call(Et,Mt))return!1}return!0}function yt(bt,Et){if(bt===Et)return!0;if(!bt||!Et)return!1;var $t=bt.length;if(Et.length!==$t)return!1;for(var _t=0;_t<$t;_t++)if(bt[_t]!==Et[_t])return!1;return!0}},"./src/Component.ts":function(rt,at,ct){var dt=this&&this.__rest||function($t,_t){var xt={};for(var St in $t)Object.prototype.hasOwnProperty.call($t,St)&&_t.indexOf(St)<0&&(xt[St]=$t[St]);if($t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Mt=0,St=Object.getOwnPropertySymbols($t);Mt<St.length;Mt++)_t.indexOf(St[Mt])<0&&Object.prototype.propertyIsEnumerable.call($t,St[Mt])&&(xt[St[Mt]]=$t[St[Mt]]);return xt},yt=this&&this.__importDefault||function($t){return $t&&$t.__esModule?$t:{default:$t}};Object.defineProperty(at,"__esModule",{value:!0});var bt=yt(ct("./src/useMediaQuery.ts")),Et=function($t){var _t=$t.children,xt=$t.device,St=$t.onChange,Mt=dt($t,["children","device","onChange"]),Tt=(0,bt.default)(Mt,xt,St);return typeof _t=="function"?_t(Tt):Tt?_t:null};at.default=Et},"./src/Context.ts":(rt,at,ct)=>{Object.defineProperty(at,"__esModule",{value:!0});var dt=ct("react"),yt=(0,dt.createContext)(void 0);at.default=yt},"./src/index.ts":function(rt,at,ct){var dt=this&&this.__importDefault||function(_t){return _t&&_t.__esModule?_t:{default:_t}};Object.defineProperty(at,"__esModule",{value:!0}),at.Context=at.toQuery=at.useMediaQuery=at.default=void 0;var yt=dt(ct("./src/useMediaQuery.ts"));at.useMediaQuery=yt.default;var bt=dt(ct("./src/Component.ts"));at.default=bt.default;var Et=dt(ct("./src/toQuery.ts"));at.toQuery=Et.default;var $t=dt(ct("./src/Context.ts"));at.Context=$t.default},"./src/mediaQuery.ts":function(rt,at,ct){var dt=this&&this.__assign||function(){return dt=Object.assign||function(Rt){for(var Ct,It=1,kt=arguments.length;It<kt;It++){Ct=arguments[It];for(var Dt in Ct)Object.prototype.hasOwnProperty.call(Ct,Dt)&&(Rt[Dt]=Ct[Dt])}return Rt},dt.apply(this,arguments)},yt=this&&this.__rest||function(Rt,Ct){var It={};for(var kt in Rt)Object.prototype.hasOwnProperty.call(Rt,kt)&&Ct.indexOf(kt)<0&&(It[kt]=Rt[kt]);if(Rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Dt=0,kt=Object.getOwnPropertySymbols(Rt);Dt<kt.length;Dt++)Ct.indexOf(kt[Dt])<0&&Object.prototype.propertyIsEnumerable.call(Rt,kt[Dt])&&(It[kt[Dt]]=Rt[kt[Dt]]);return It},bt=this&&this.__importDefault||function(Rt){return Rt&&Rt.__esModule?Rt:{default:Rt}};Object.defineProperty(at,"__esModule",{value:!0});var Et=bt(ct("./node_modules/prop-types/index.js")),$t=Et.default.oneOfType([Et.default.string,Et.default.number]),_t={all:Et.default.bool,grid:Et.default.bool,aural:Et.default.bool,braille:Et.default.bool,handheld:Et.default.bool,print:Et.default.bool,projection:Et.default.bool,screen:Et.default.bool,tty:Et.default.bool,tv:Et.default.bool,embossed:Et.default.bool},xt={orientation:Et.default.oneOf(["portrait","landscape"]),scan:Et.default.oneOf(["progressive","interlace"]),aspectRatio:Et.default.string,deviceAspectRatio:Et.default.string,height:$t,deviceHeight:$t,width:$t,deviceWidth:$t,color:Et.default.bool,colorIndex:Et.default.bool,monochrome:Et.default.bool,resolution:$t,type:Object.keys(_t)};xt.type;var St=yt(xt,["type"]),Mt=dt({minAspectRatio:Et.default.string,maxAspectRatio:Et.default.string,minDeviceAspectRatio:Et.default.string,maxDeviceAspectRatio:Et.default.string,minHeight:$t,maxHeight:$t,minDeviceHeight:$t,maxDeviceHeight:$t,minWidth:$t,maxWidth:$t,minDeviceWidth:$t,maxDeviceWidth:$t,minColor:Et.default.number,maxColor:Et.default.number,minColorIndex:Et.default.number,maxColorIndex:Et.default.number,minMonochrome:Et.default.number,maxMonochrome:Et.default.number,minResolution:$t,maxResolution:$t},St),Tt=dt(dt({},_t),Mt);at.default={all:Tt,types:_t,matchers:xt,features:Mt}},"./src/toQuery.ts":function(rt,at,ct){var dt=this&&this.__importDefault||function(St){return St&&St.__esModule?St:{default:St}};Object.defineProperty(at,"__esModule",{value:!0});var yt=dt(ct("./node_modules/hyphenate-style-name/index.js")),bt=dt(ct("./src/mediaQuery.ts")),Et=function(St){return"not ".concat(St)},$t=function(St,Mt){var Tt=(0,yt.default)(St);return typeof Mt=="number"&&(Mt="".concat(Mt,"px")),Mt===!0?Tt:Mt===!1?Et(Tt):"(".concat(Tt,": ").concat(Mt,")")},_t=function(St){return St.join(" and ")},xt=function(St){var Mt=[];return Object.keys(bt.default.all).forEach(function(Tt){var Rt=St[Tt];Rt!=null&&Mt.push($t(Tt,Rt))}),_t(Mt)};at.default=xt},"./src/useMediaQuery.ts":function(rt,at,ct){var dt=this&&this.__importDefault||function(Bt){return Bt&&Bt.__esModule?Bt:{default:Bt}};Object.defineProperty(at,"__esModule",{value:!0});var yt=ct("react"),bt=dt(ct("./node_modules/matchmediaquery/index.js")),Et=dt(ct("./node_modules/hyphenate-style-name/index.js")),$t=ct("./node_modules/shallow-equal/dist/index.esm.js"),_t=dt(ct("./src/toQuery.ts")),xt=dt(ct("./src/Context.ts")),St=function(Bt){return Bt.query||(0,_t.default)(Bt)},Mt=function(Bt){if(Bt){var zt=Object.keys(Bt);return zt.reduce(function(vt,nt){return vt[(0,Et.default)(nt)]=Bt[nt],vt},{})}},Tt=function(){var Bt=(0,yt.useRef)(!1);return(0,yt.useEffect)(function(){Bt.current=!0},[]),Bt.current},Rt=function(Bt){var zt=(0,yt.useContext)(xt.default),vt=function(){return Mt(Bt)||Mt(zt)},nt=(0,yt.useState)(vt),st=nt[0],lt=nt[1];return(0,yt.useEffect)(function(){var ht=vt();(0,$t.shallowEqualObjects)(st,ht)||lt(ht)},[Bt,zt]),st},Ct=function(Bt){var zt=function(){return St(Bt)},vt=(0,yt.useState)(zt),nt=vt[0],st=vt[1];return(0,yt.useEffect)(function(){var lt=zt();nt!==lt&&st(lt)},[Bt]),nt},It=function(Bt,zt){var vt=function(){return(0,bt.default)(Bt,zt||{},!!zt)},nt=(0,yt.useState)(vt),st=nt[0],lt=nt[1],ht=Tt();return(0,yt.useEffect)(function(){if(ht){var mt=vt();return lt(mt),function(){mt&&mt.dispose()}}},[Bt,zt]),st},kt=function(Bt){var zt=(0,yt.useState)(Bt.matches),vt=zt[0],nt=zt[1];return(0,yt.useEffect)(function(){var st=function(lt){nt(lt.matches)};return Bt.addListener(st),nt(Bt.matches),function(){Bt.removeListener(st)}},[Bt]),vt},Dt=function(Bt,zt,vt){var nt=Rt(zt),st=Ct(Bt);if(!st)throw new Error("Invalid or missing MediaQuery!");var lt=It(st,nt),ht=kt(lt),mt=Tt();return(0,yt.useEffect)(function(){mt&&vt&&vt(ht)},[ht]),(0,yt.useEffect)(function(){return function(){lt&&lt.dispose()}},[]),ht};at.default=Dt},react:rt=>{rt.exports=$}},_e={};function et(rt){var at=_e[rt];if(at!==void 0)return at.exports;var ct=_e[rt]={exports:{}};return j[rt].call(ct.exports,ct,ct.exports,et),ct.exports}et.d=(rt,at)=>{for(var ct in at)et.o(at,ct)&&!et.o(rt,ct)&&Object.defineProperty(rt,ct,{enumerable:!0,get:at[ct]})},et.o=(rt,at)=>Object.prototype.hasOwnProperty.call(rt,at),et.r=rt=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(rt,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(rt,"__esModule",{value:!0})};var tt=et("./src/index.ts");return tt})())})(reactResponsive);var reactResponsiveExports=reactResponsive.exports;Object.defineProperty(Media,"__esModule",{value:!0});Media.useNotMobileMediaQuery=Media.useMobileMediaQuery=Media.useTabletAndBelowMediaQuery=Media.useTabletMediaQuery=Media.useDesktopMediaQuery=Media.useBigDesktopMediaQuery=NotMobile_1=Media.NotMobile=Mobile_1=Media.Mobile=Media.TabletAndBelow=Media.Tablet=Media.Desktop=void 0;var react_responsive_1=reactResponsiveExports,useBigDesktopMediaQuery=function(){return(0,react_responsive_1.useMediaQuery)({minWidth:1920})};Media.useBigDesktopMediaQuery=useBigDesktopMediaQuery;var useDesktopMediaQuery=function(){return(0,react_responsive_1.useMediaQuery)({minWidth:992})};Media.useDesktopMediaQuery=useDesktopMediaQuery;var useTabletMediaQuery=function(){return(0,react_responsive_1.useMediaQuery)({minWidth:768,maxWidth:991})};Media.useTabletMediaQuery=useTabletMediaQuery;var useTabletAndBelowMediaQuery=function(){return(0,react_responsive_1.useMediaQuery)({maxWidth:991})};Media.useTabletAndBelowMediaQuery=useTabletAndBelowMediaQuery;var useMobileMediaQuery=function(){return(0,react_responsive_1.useMediaQuery)({maxWidth:767})};Media.useMobileMediaQuery=useMobileMediaQuery;var useNotMobileMediaQuery=function(){return(0,react_responsive_1.useMediaQuery)({minWidth:768})};Media.useNotMobileMediaQuery=useNotMobileMediaQuery;var Desktop=function(a){var _=a.children,$=useDesktopMediaQuery();return $?_:null};Media.Desktop=Desktop;var Tablet=function(a){var _=a.children,$=useTabletMediaQuery();return $?_:null};Media.Tablet=Tablet;var TabletAndBelow=function(a){var _=a.children,$=useTabletAndBelowMediaQuery();return $?_:null};Media.TabletAndBelow=TabletAndBelow;var Mobile=function(a){var _=a.children,$=useMobileMediaQuery();return $?_:null},Mobile_1=Media.Mobile=Mobile,NotMobile=function(a){var _=a.children,$=useNotMobileMediaQuery();return $?_:null},NotMobile_1=Media.NotMobile=NotMobile;const backImg="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239440432.commit-2fa6a22/assets/back-26d3dbd9.svg",diceImg="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239440432.commit-2fa6a22/assets/dice-b919368b.svg",wrongImg="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239440432.commit-2fa6a22/assets/wrong-1ccde1e7.svg",useAfterLoginRedirection=()=>{const a=useLocation(),_=new URLSearchParams(a.search),$=extractRedirectToFromSearchParameters(_);let j=locations.home();try{let et;$.startsWith("/")?et=new URL($,window.location.origin):et=new URL($),et.hostname!==window.location.hostname&&(et=new URL("/auth/invalidRedirection",window.location.origin));const tt=_.get("targetConfigId");tt&&!et.searchParams.has("targetConfigId")&&et.searchParams.append("targetConfigId",tt),j=et.href}catch{console.error("Can't parse redirectTo URL"),j=locations.home()}const _e=reactExports.useCallback(()=>{window.location.href=j},[j]);return{url:j,redirect:_e}};var FeatureFlagsKeys=(a=>(a.MAGIC_TEST="dapps-magic-dev-test",a.DAPPS_MAGIC_AUTO_SIGN="dapps-magic-auto-sign",a))(FeatureFlagsKeys||{});const defaultFeatureFlagsContextValue={flags:{},initialized:!1},FeatureFlagsContext=reactExports.createContext(defaultFeatureFlagsContextValue),FeatureFlagsProvider=a=>{const[_,$]=reactExports.useState(defaultFeatureFlagsContextValue),[j,_e]=reactExports.useState(!0),et=reactExports.useRef();return reactExports.useEffect(()=>{(async()=>{if(j){_e(!1);const tt=config$1.get("FEATURE_FLAGS_URL"),at=await(await fetch(`${tt}/dapps.json`)).json();$({..._,flags:at.flags,initialized:!0})}})()},[j]),reactExports.useEffect(()=>{const tt=config$1.get("FEATURE_FLAGS_INTERVAL");return et.current=setInterval(()=>{_e(!0)},Number(tt)),()=>{clearInterval(et.current)}},[]),jsxRuntimeExports.jsx(FeatureFlagsContext.Provider,{value:_,children:a.children})};async function subscribeToNewsletter(a){const _=config$1.get("BUILDER_SERVER_URL");if(!_)throw new Error("Missing BUILDER_SERVER_URL.");const $=await fetch(_+"/v1/newsletter",{method:"post",body:JSON.stringify({email:a,source:"auth"}),headers:{"content-type":"application/json"}});if(!$.ok)throw new Error(`Could not subscribe to newsletter. Status: ${$.status}`)}async function deployProfileFromDefault({defaultProfile:a,connectedAccount:_,deploymentProfileName:$,connectedAccountIdentity:j}){var St;const _e=config$1.get("PEER_URL",""),et=dist$2.createContentClient({url:_e+"/content",fetcher:dist$3.createFetchComponent()}),rt=(await et.fetchEntitiesByPointers([a]))[0],at="body.png",ct="face256.png",dt=rt.content.reduce((Mt,Tt)=>({...Mt,[Tt.file]:Tt.hash}),{}),[yt,bt]=await Promise.all([et.downloadContent(dt[at]),et.downloadContent(dt[ct])]),Et=new Map;Et.set(at,yt),Et.set(ct,bt);const $t=Mt=>Mt.replace("dcl://base-avatars/","urn:decentraland:off-chain:base-avatars:"),_t=(St=rt.metadata.avatars)==null?void 0:St[0];_t.name=$,_t.ethAddress=_,_t.userId=_,_t.version=1,_t.tutorialStep=0,_t.hasClaimedName=!1,_t.hasConnectedWeb3=!0,_t.avatar.bodyShape=$t(rt.metadata.avatars[0].avatar.bodyShape),_t.avatar.wearables=rt.metadata.avatars[0].avatar.wearables.map($t),_t.avatar.emotes=[];const xt=await dist$2.DeploymentBuilder.buildEntity({type:dist$8.EntityType.PROFILE,pointers:[_],metadata:{avatars:[_t]},timestamp:Date.now(),files:Et});await et.deploy({entityId:xt.entityId,files:xt.files,authChain:dist$7.Authenticator.signPayload(j,xt.entityId)})}const container$1="_container_wdiad_1",background$1="_background_wdiad_9",left$1="_left_wdiad_20",leftInner="_leftInner_wdiad_48",logo="_logo_wdiad_54",title$2="_title_wdiad_59",subtitle="_subtitle_wdiad_66",meetYourAvatar="_meetYourAvatar_wdiad_72",meetYourAvatarDescription="_meetYourAvatarDescription_wdiad_79",randomize="_randomize_wdiad_86",logoSmall="_logoSmall_wdiad_102",back="_back_wdiad_9",name="_name_wdiad_121",agree="_agree_wdiad_125",error="_error_wdiad_145",emailError="_emailError_wdiad_156",agreeError="_agreeError_wdiad_160",jumpIn="_jumpIn_wdiad_166",right$1="_right_wdiad_170",mobileContainer="_mobileContainer_wdiad_183",mobilePreviewContainer="_mobilePreviewContainer_wdiad_196",mobileButtons="_mobileButtons_wdiad_206",mobileCompleteYourProfile="_mobileCompleteYourProfile_wdiad_231",styles$6={container:container$1,background:background$1,left:left$1,leftInner,logo,title:title$2,subtitle,meetYourAvatar,meetYourAvatarDescription,randomize,continue:"_continue_wdiad_97",logoSmall,back,name,agree,error,emailError,agreeError,jumpIn,right:right$1,mobileContainer,mobilePreviewContainer,mobileButtons,mobileCompleteYourProfile};function getRandomDefaultProfile(){return"default"+(Math.floor(Math.random()*(160-1+1))+1)}const ErrorMessage=a=>jsxRuntimeExports.jsxs("div",{className:classNames(styles$6.error,a.className),children:[jsxRuntimeExports.jsx("img",{src:wrongImg}),jsxRuntimeExports.jsx("div",{children:a.message})]}),SetupPage=()=>{const a=useNavigateWithSearchParams(),[_,$]=reactExports.useState(!1),[j,_e]=reactExports.useState(0),[et,tt]=reactExports.useState(getRandomDefaultProfile()),[rt,at]=reactExports.useState(""),[ct,dt]=reactExports.useState(""),[yt,bt]=reactExports.useState(!1),[Et,$t]=reactExports.useState(!1),[_t,xt]=reactExports.useState(!1),St=reactExports.useRef(),Mt=reactExports.useRef(),{initialized:Tt}=reactExports.useContext(FeatureFlagsContext),{url:Rt,redirect:Ct}=useAfterLoginRedirection(),It=reactExports.useMemo(()=>rt.length?rt.length>=15?"Sorry, usernames can have a maximum of 15 characters.":rt.includes(" ")?"Sorry, spaces are not permitted.":/^[a-zA-Z0-9]+$/.test(rt)?"":"Sorry, special characters (!@#$%) are not permitted.":"Please enter your username.",[rt]),kt=reactExports.useMemo(()=>ct&&!ct.includes("@")?"Invalid email, please try again.":"",[ct]),Dt=reactExports.useMemo(()=>yt?"":"Please accept the terms of use and privacy policy.",[yt]),Bt=reactExports.useMemo(()=>{if(Rt){if(Rt.includes("play"))return"jump into decentraland";const wt=["marketplace","builder","account","profile","events","places","governance","dao","rewards"];for(const At of wt)if(Rt.includes(At))return`continue to ${At}`}return"continue"},[Rt]),zt=reactExports.useCallback(()=>{getAnalytics().track(TrackingEvents.CLICK,{action:ClickEvents.RANDOMIZE}),tt(getRandomDefaultProfile())},[]),vt=reactExports.useCallback(()=>{getAnalytics().track(TrackingEvents.AVATAR_EDIT_SUCCESS,{eth_address:St.current,is_guest:!1,profile:et}),_e(1)},[et]),nt=reactExports.useCallback(()=>{getAnalytics().track(TrackingEvents.CLICK,{action:ClickEvents.BACK_TO_AVATAR_RANDOMIZATION_VIEW}),_e(0)},[]),st=reactExports.useCallback((wt,At)=>at(At.value),[]),lt=reactExports.useCallback((wt,At)=>dt(At.value),[]),ht=reactExports.useCallback(()=>bt(!yt),[yt]),mt=reactExports.useCallback(async wt=>{if(wt.preventDefault(),getAnalytics().track(TrackingEvents.CLICK,{action:ClickEvents.SUBMIT_PROFILE}),$t(!0),!(It||kt||Dt)){if(!St.current||!Mt.current){console.warn("No account or identity found.");return}try{if(xt(!0),await deployProfileFromDefault({connectedAccount:St.current,connectedAccountIdentity:Mt.current,defaultProfile:et,deploymentProfileName:rt}),ct)try{await subscribeToNewsletter(ct)}catch(At){console.warn("There was an error subscribing to the newsletter",At.message)}getAnalytics().track(TrackingEvents.TERMS_OF_SERVICE_SUCCESS,{eth_address:St.current,is_guest:!1,email:ct||void 0,name:rt}),Ct()}catch(At){xt(!1),console.error("There was an error deploying the profile",At.message)}}},[It,kt,Dt,rt,ct,yt,et,Ct]);return reactExports.useEffect(()=>{(async()=>{try{const At=await getCurrentConnectionData();if(!At)throw new Error("No connection data found");St.current=At.account,Mt.current=At.identity}catch{return console.warn("No previous connection found"),a(locations.login(Rt))}if(await fetchProfile(St.current))return console.warn("Profile already exists"),Ct();$(!0)})()},[Ct,a]),!_||!Tt?jsxRuntimeExports.jsxs("div",{className:styles$6.container,children:[jsxRuntimeExports.jsx("div",{className:styles$6.background}),jsxRuntimeExports.jsx(Loader_3,{active:!0,size:"huge"})]}):j===0?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Mobile_1,{children:jsxRuntimeExports.jsxs("div",{className:styles$6.container,children:[jsxRuntimeExports.jsx("div",{className:styles$6.background}),jsxRuntimeExports.jsxs("div",{className:styles$6.mobileContainer,children:[jsxRuntimeExports.jsx("img",{className:styles$6.logo,src:logoImg,alt:"logo"}),jsxRuntimeExports.jsx("div",{className:styles$6.title,children:"Welcome to Decentraland!"}),jsxRuntimeExports.jsx("div",{className:styles$6.meetYourAvatar,children:"First, Meet Your Avatar"}),jsxRuntimeExports.jsxs("div",{className:styles$6.meetYourAvatarDescription,children:["Choose an avatar to start your journey.",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("b",{children:"You can customize it later on desktop"}),", where all the magic happens!"]}),jsxRuntimeExports.jsx("div",{className:styles$6.mobilePreviewContainer,children:jsxRuntimeExports.jsx(CustomWearablePreview,{profile:et})}),jsxRuntimeExports.jsxs("div",{className:styles$6.mobileButtons,children:[jsxRuntimeExports.jsx("div",{className:styles$6.randomize,children:jsxRuntimeExports.jsxs(Button$5.Button,{compact:!0,inverted:!0,onClick:zt,children:[jsxRuntimeExports.jsx("img",{src:diceImg,alt:"diceImg"}),jsxRuntimeExports.jsx("span",{children:"randomize"})]})}),jsxRuntimeExports.jsx("div",{className:styles$6.continue,children:jsxRuntimeExports.jsx(Button$5.Button,{compact:!0,primary:!0,onClick:vt,children:"Continue"})})]})]})]})}),jsxRuntimeExports.jsx(NotMobile_1,{children:jsxRuntimeExports.jsxs("div",{className:styles$6.container,children:[jsxRuntimeExports.jsx("div",{className:styles$6.background}),jsxRuntimeExports.jsx("div",{className:styles$6.left,children:jsxRuntimeExports.jsxs("div",{className:styles$6.leftInner,children:[jsxRuntimeExports.jsx("img",{className:styles$6.logo,src:logoImg,alt:"logo"}),jsxRuntimeExports.jsx("div",{className:styles$6.title,children:"Welcome to Decentraland!"}),jsxRuntimeExports.jsx("div",{className:styles$6.subtitle,children:"Your journey begins here"}),jsxRuntimeExports.jsx("div",{className:styles$6.meetYourAvatar,children:"First, Meet Your Avatar"}),jsxRuntimeExports.jsxs("div",{className:styles$6.meetYourAvatarDescription,children:["Say hi to your new digital self!",jsxRuntimeExports.jsx("br",{}),"Don't worry, of course they're not quite 'you' yet—soon you'll be able to customize them to your heart's content."]}),jsxRuntimeExports.jsx("div",{className:styles$6.randomize,children:jsxRuntimeExports.jsxs(Button$5.Button,{compact:!0,inverted:!0,onClick:zt,children:[jsxRuntimeExports.jsx("img",{src:diceImg,alt:"diceImg"}),jsxRuntimeExports.jsx("span",{children:"randomize"})]})}),jsxRuntimeExports.jsx("div",{className:styles$6.continue,children:jsxRuntimeExports.jsx(Button$5.Button,{primary:!0,fluid:!0,onClick:vt,children:"Continue"})})]})}),jsxRuntimeExports.jsx("div",{className:styles$6.right,children:jsxRuntimeExports.jsx(CustomWearablePreview,{profile:et})})]})})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Mobile_1,{children:jsxRuntimeExports.jsxs("div",{className:styles$6.container,children:[jsxRuntimeExports.jsx("div",{className:styles$6.background}),jsxRuntimeExports.jsxs("div",{className:styles$6.mobileContainer,children:[jsxRuntimeExports.jsxs("div",{className:styles$6.back,onClick:nt,children:[jsxRuntimeExports.jsx("img",{src:backImg,alt:"backImg"}),jsxRuntimeExports.jsx("span",{children:"BACK"})]}),jsxRuntimeExports.jsx("div",{className:classNames(styles$6.title,styles$6.mobileCompleteYourProfile),children:"Complete your Profile"}),jsxRuntimeExports.jsxs("form",{onSubmit:mt,children:[jsxRuntimeExports.jsx("div",{className:styles$6.name,children:jsxRuntimeExports.jsx(Field_2,{label:"Username",placeholder:"Enter your Username",onChange:st,message:Et&&It?jsxRuntimeExports.jsx(ErrorMessage,{message:It}):void 0})}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Field_2,{label:"Email (optional)",placeholder:"Enter your email",message:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Et&&kt?jsxRuntimeExports.jsx(ErrorMessage,{className:styles$6.emailError,message:kt}):null,jsxRuntimeExports.jsx("span",{children:"Subscribe to Decentraland's newsletter to receive the latest news about events, updates, contests and more."})]}),onChange:lt})}),jsxRuntimeExports.jsxs("div",{className:styles$6.agree,children:[jsxRuntimeExports.jsx(Checkbox$4.Checkbox,{onChange:ht}),jsxRuntimeExports.jsxs("div",{children:["I agree with Decentraland's ",jsxRuntimeExports.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://decentraland.org/terms/",children:"Terms of use"})," and ",jsxRuntimeExports.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://decentraland.org/privacy",children:"Privacy policy"}),"."]})]}),Et&&Dt?jsxRuntimeExports.jsx(ErrorMessage,{className:styles$6.agreeError,message:Dt}):null,jsxRuntimeExports.jsx("div",{className:styles$6.jumpIn,children:jsxRuntimeExports.jsx(Button$5.Button,{primary:!0,fluid:!0,type:"submit",disabled:!yt||_t,loading:_t,children:Bt})})]})]})]})}),jsxRuntimeExports.jsx(NotMobile_1,{children:jsxRuntimeExports.jsxs("div",{className:styles$6.container,children:[jsxRuntimeExports.jsx("div",{className:styles$6.background}),jsxRuntimeExports.jsx("div",{className:styles$6.left,children:jsxRuntimeExports.jsxs("div",{className:styles$6.leftInner,children:[jsxRuntimeExports.jsx("img",{className:styles$6.logoSmall,src:logoImg,alt:"logo"}),jsxRuntimeExports.jsxs("div",{className:styles$6.back,onClick:nt,children:[jsxRuntimeExports.jsx("img",{src:backImg,alt:"backImg"}),jsxRuntimeExports.jsx("span",{children:"BACK"})]}),jsxRuntimeExports.jsx("div",{className:styles$6.title,children:"Complete your Profile"}),jsxRuntimeExports.jsxs("form",{onSubmit:mt,children:[jsxRuntimeExports.jsx("div",{className:styles$6.name,children:jsxRuntimeExports.jsx(Field_2,{label:"Username",placeholder:"Enter your username",onChange:st,message:Et&&It?jsxRuntimeExports.jsx(ErrorMessage,{message:It}):void 0})}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Field_2,{label:"Email (optional)",placeholder:"Enter your email",message:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Et&&kt?jsxRuntimeExports.jsx(ErrorMessage,{className:styles$6.emailError,message:kt}):null,jsxRuntimeExports.jsx("span",{children:"Subscribe to Decentraland's newsletter to receive the latest news about events, updates, contests and more."})]}),onChange:lt})}),jsxRuntimeExports.jsxs("div",{className:styles$6.agree,children:[jsxRuntimeExports.jsx(Checkbox$4.Checkbox,{onChange:ht}),"I agree with Decentraland's ",jsxRuntimeExports.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://decentraland.org/terms/",children:"Terms of use"})," and ",jsxRuntimeExports.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://decentraland.org/privacy",children:"Privacy policy"}),"."]}),Et&&Dt?jsxRuntimeExports.jsx(ErrorMessage,{className:styles$6.agreeError,message:Dt}):null,jsxRuntimeExports.jsx("div",{className:styles$6.jumpIn,children:jsxRuntimeExports.jsx(Button$5.Button,{primary:!0,fluid:!0,type:"submit",disabled:!yt||_t,loading:_t,children:Bt})})]})]})}),jsxRuntimeExports.jsx("div",{className:styles$6.right,children:jsxRuntimeExports.jsx(CustomWearablePreview,{profile:et})})]})})]})},main$4="_main_qbssu_1",styles$5={main:main$4},DefaultPage=()=>{const a=useNavigateWithSearchParams();return reactExports.useEffect(()=>{getCurrentConnectionData().then(_=>{_?window.location.href=locations.home():a(locations.login())})},[getCurrentConnectionData,a]),jsxRuntimeExports.jsx("div",{className:styles$5.main,children:jsxRuntimeExports.jsx(Loader_3,{active:!0,size:"huge"})})},intercomWindow=window,Qp=class Qp{constructor(){Dr(this,"_appId");Dr(this,"_settings");Dr(this,"client")}static getInstance(){return this.instance||(this.instance=new Qp),this.instance}set appId(_){this._appId=_,this.client=getWindowClient(_)}get appId(){return this._appId}set settings(_){this._settings=_,intercomWindow.intercomSettings=_}get settings(){return this._settings}init(_,$){this.appId=_,$&&(this.settings=$)}inject(){return new Promise(_=>{if(this.isInjected())return _();insertScript({src:`https://widget.intercom.io/widget/${this._appId}`}).addEventListener("load",()=>_(),!0)}).then(()=>{this.client=getWindowClient(this._appId)})}render(_={}){var $,j;($=this.client)==null||$.call(this,"reattach_activator"),(j=this.client)==null||j.call(this,"update",{..._,app_id:this._appId})}showNewMessage(_){var $;($=this.client)==null||$.call(this,"showNewMessage",_)}unmount(){var _;(_=this.client)==null||_.call(this,"shutdown")}isInjected(){return isInjected()}};Dr(Qp,"instance");let IntercomWidget=Qp;function getWindowClient(a){return(..._)=>{var $;if(!a)return console.warn("Intercom app id empty. Check that the environment is property set");if(!isMobile()){if(!isInjected())return console.warn("Intercom called before injection");($=intercomWindow.Intercom)==null||$.call(intercomWindow,..._)}}}function isInjected(){return typeof intercomWindow.Intercom=="function"}function isMobile(){const a=window.navigator;return!!a&&(/Mobi/i.test(a.userAgent)||/Android/i.test(a.userAgent))}function insertScript({type:a="text/javascript",async:_=!0,...$}){const j=document.createElement("script");return Object.assign(j,{type:a,async:_,...$}),document.body.appendChild(j),j}class Intercom extends React$5.PureComponent{constructor($){super($);Dr(this,"widget");if(this.widget=IntercomWidget.getInstance(),!this.widget.appId)this.widget.init($.appId,$.settings);else if(this.widget.appId!==$.appId)throw new Error(`Intercom widget already initialized with app id "${$.appId}". Only one intercom widget is allowed.`)}componentDidMount(){this.renderWidget()}componentDidUpdate(){this.props.settings&&(this.widget.settings=this.props.settings),this.renderWidget()}componentWillUnmount(){this.widget.unmount()}async renderWidget(){const{data:$}=this.props;try{await this.widget.inject(),this.widget.render($)}catch(j){console.error("Could not render intercom",isErrorWithMessage(j)?j.message:"Unknown error")}}render(){return null}}Dr(Intercom,"defaultProps",{data:{},settings:{alignment:"left",horizontal_padding:10,vertical_padding:10}});var Modal$3={},Modal$2={},ModalActions={},hasRequiredModalActions;function requireModalActions(){if(hasRequiredModalActions)return ModalActions;hasRequiredModalActions=1;var a=interopRequireWildcardExports,_=interopRequireDefaultExports;ModalActions.__esModule=!0,ModalActions.default=void 0;var $=_(require_extends()),j=_(requireInheritsLoose()),_e=_(requireMap()),et=_(requireInvoke()),tt=_(require$$0$4);_(requirePropTypes());var rt=a(reactExports),at=requireLib(),ct=_(requireButton()),dt=function(yt){(0,j.default)(bt,yt);function bt(){for(var $t,_t=arguments.length,xt=new Array(_t),St=0;St<_t;St++)xt[St]=arguments[St];return $t=yt.call.apply(yt,[this].concat(xt))||this,$t.handleButtonOverrides=function(Mt){return{onClick:function(Rt,Ct){(0,et.default)(Mt,"onClick",Rt,Ct),(0,et.default)($t.props,"onActionClick",Rt,Ct)}}},$t}var Et=bt.prototype;return Et.render=function(){var _t=this,xt=this.props,St=xt.actions,Mt=xt.children,Tt=xt.className,Rt=xt.content,Ct=(0,tt.default)("actions",Tt),It=(0,at.getUnhandledProps)(bt,this.props),kt=(0,at.getElementType)(bt,this.props);return at.childrenUtils.isNil(Mt)?at.childrenUtils.isNil(Rt)?rt.default.createElement(kt,(0,$.default)({},It,{className:Ct}),(0,_e.default)(St,function(Dt){return ct.default.create(Dt,{overrideProps:_t.handleButtonOverrides})})):rt.default.createElement(kt,(0,$.default)({},It,{className:Ct}),Rt):rt.default.createElement(kt,(0,$.default)({},It,{className:Ct}),Mt)},bt}(rt.Component);return ModalActions.default=dt,dt.handledProps=["actions","as","children","className","content","onActionClick"],dt.propTypes={},dt.create=(0,at.createShorthandFactory)(dt,function(yt){return{actions:yt}}),ModalActions}var ModalContent$1={},hasRequiredModalContent;function requireModalContent(){if(hasRequiredModalContent)return ModalContent$1;hasRequiredModalContent=1;var a=interopRequireDefaultExports;ModalContent$1.__esModule=!0,ModalContent$1.default=void 0;var _=a(require_extends()),$=a(require$$0$4);a(requirePropTypes());var j=a(reactExports),_e=requireLib();function et(rt){var at=rt.children,ct=rt.className,dt=rt.content,yt=rt.image,bt=rt.scrolling,Et=(0,$.default)(ct,(0,_e.useKeyOnly)(yt,"image"),(0,_e.useKeyOnly)(bt,"scrolling"),"content"),$t=(0,_e.getUnhandledProps)(et,rt),_t=(0,_e.getElementType)(et,rt);return j.default.createElement(_t,(0,_.default)({},$t,{className:Et}),_e.childrenUtils.isNil(at)?dt:at)}et.handledProps=["as","children","className","content","image","scrolling"],et.propTypes={},et.create=(0,_e.createShorthandFactory)(et,function(rt){return{content:rt}});var tt=et;return ModalContent$1.default=tt,ModalContent$1}var ModalDescription={},hasRequiredModalDescription;function requireModalDescription(){if(hasRequiredModalDescription)return ModalDescription;hasRequiredModalDescription=1;var a=interopRequireDefaultExports;ModalDescription.__esModule=!0,ModalDescription.default=void 0;var _=a(require_extends()),$=a(require$$0$4);a(requirePropTypes());var j=a(reactExports),_e=requireLib();function et(rt){var at=rt.children,ct=rt.className,dt=rt.content,yt=(0,$.default)("description",ct),bt=(0,_e.getUnhandledProps)(et,rt),Et=(0,_e.getElementType)(et,rt);return j.default.createElement(Et,(0,_.default)({},bt,{className:yt}),_e.childrenUtils.isNil(at)?dt:at)}et.handledProps=["as","children","className","content"],et.propTypes={};var tt=et;return ModalDescription.default=tt,ModalDescription}var ModalDimmer={},hasRequiredModalDimmer;function requireModalDimmer(){if(hasRequiredModalDimmer)return ModalDimmer;hasRequiredModalDimmer=1;var a=interopRequireDefaultExports;ModalDimmer.__esModule=!0,ModalDimmer.default=void 0;var _=a(require_extends()),$=require$$10,j=a(require$$0$4);a(requirePropTypes());var _e=a(reactExports),et=requireLib();function tt(at){var ct=at.blurring,dt=at.children,yt=at.className,bt=at.centered,Et=at.content,$t=at.inverted,_t=at.mountNode,xt=at.scrolling,St=_e.default.useRef(),Mt=(0,j.default)("ui",(0,et.useKeyOnly)($t,"inverted"),(0,et.useKeyOnly)(!bt,"top aligned"),"page modals dimmer transition visible active",yt),Tt=(0,j.default)("dimmable dimmed",(0,et.useKeyOnly)(ct,"blurring"),(0,et.useKeyOnly)(xt,"scrolling")),Rt=(0,et.getUnhandledProps)(tt,at),Ct=(0,et.getElementType)(tt,at);return(0,et.useClassNamesOnNode)(_t,Tt),_e.default.useEffect(function(){St.current&&St.current.style&&St.current.style.setProperty("display","flex","important")},[]),_e.default.createElement($.Ref,{innerRef:St},_e.default.createElement(Ct,(0,_.default)({},Rt,{className:Mt}),et.childrenUtils.isNil(dt)?Et:dt))}tt.handledProps=["as","blurring","centered","children","className","content","inverted","mountNode","scrolling"],tt.propTypes={},tt.create=(0,et.createShorthandFactory)(tt,function(at){return{content:at}});var rt=tt;return ModalDimmer.default=rt,ModalDimmer}var ModalHeader={},hasRequiredModalHeader;function requireModalHeader(){if(hasRequiredModalHeader)return ModalHeader;hasRequiredModalHeader=1;var a=interopRequireDefaultExports;ModalHeader.__esModule=!0,ModalHeader.default=void 0;var _=a(require_extends()),$=a(require$$0$4);a(requirePropTypes());var j=a(reactExports),_e=requireLib();function et(rt){var at=rt.children,ct=rt.className,dt=rt.content,yt=(0,$.default)("header",ct),bt=(0,_e.getUnhandledProps)(et,rt),Et=(0,_e.getElementType)(et,rt);return j.default.createElement(Et,(0,_.default)({},bt,{className:yt}),_e.childrenUtils.isNil(at)?dt:at)}et.handledProps=["as","children","className","content"],et.propTypes={},et.create=(0,_e.createShorthandFactory)(et,function(rt){return{content:rt}});var tt=et;return ModalHeader.default=tt,ModalHeader}var utils={},hasRequiredUtils;function requireUtils(){if(hasRequiredUtils)return utils;hasRequiredUtils=1,utils.__esModule=!0,utils.isLegacy=utils.getLegacyStyles=utils.canFit=void 0;var a=0,_=50,$=function(tt){var rt=tt.height+a,at=tt.height+a,ct=window.innerHeight,dt=ct/2,yt=-(at/2),bt=_,Et=dt+yt;return Et+rt+bt<ct};utils.canFit=$;var j=function(tt,rt,at){var ct=rt&&tt?-(at.height/2):0,dt=-(at.width/2);return{marginLeft:dt,marginTop:ct}};utils.getLegacyStyles=j;var _e=function(){return!window.ActiveXObject&&"ActiveXObject"in window};return utils.isLegacy=_e,utils}var _interopRequireWildcard=interopRequireWildcardExports,_interopRequireDefault=interopRequireDefaultExports;Modal$2.__esModule=!0;Modal$2.default=void 0;var _extends2=_interopRequireDefault(require_extends()),_inheritsLoose2=_interopRequireDefault(requireInheritsLoose()),_isPlainObject2=_interopRequireDefault(requireIsPlainObject()),_pick2=_interopRequireDefault(requirePick()),_includes2=_interopRequireDefault(requireIncludes()),_reduce2=_interopRequireDefault(requireReduce()),_isEmpty2=_interopRequireDefault(requireIsEmpty()),_invoke2=_interopRequireDefault(requireInvoke()),_reactComponentRef=require$$10,_clsx=_interopRequireDefault(require$$0$4);_interopRequireDefault(requirePropTypes());var _react=_interopRequireWildcard(reactExports),_shallowequal=_interopRequireDefault(requireShallowequal()),_lib=requireLib(),_Icon=_interopRequireDefault(requireIcon()),_Portal=_interopRequireDefault(requirePortal()),_ModalActions=_interopRequireDefault(requireModalActions()),_ModalContent=_interopRequireDefault(requireModalContent()),_ModalDescription=_interopRequireDefault(requireModalDescription()),_ModalDimmer=_interopRequireDefault(requireModalDimmer()),_ModalHeader=_interopRequireDefault(requireModalHeader()),_utils=requireUtils(),Modal$1=function(a){(0,_inheritsLoose2.default)(_,a);function _(){for(var j,_e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];return j=a.call.apply(a,[this].concat(et))||this,j.legacy=(0,_lib.isBrowser)()&&(0,_utils.isLegacy)(),j.ref=(0,_react.createRef)(),j.dimmerRef=(0,_react.createRef)(),j.latestDocumentMouseDownEvent=null,j.getMountNode=function(){return(0,_lib.isBrowser)()?j.props.mountNode||document.body:null},j.handleActionsOverrides=function(rt){return{onActionClick:function(ct,dt){(0,_invoke2.default)(rt,"onActionClick",ct,dt),(0,_invoke2.default)(j.props,"onActionClick",ct,j.props),j.handleClose(ct)}}},j.handleClose=function(rt){j.setState({open:!1}),(0,_invoke2.default)(j.props,"onClose",rt,(0,_extends2.default)({},j.props,{open:!1}))},j.handleDocumentMouseDown=function(rt){j.latestDocumentMouseDownEvent=rt},j.handleDocumentClick=function(rt){var at=j.props.closeOnDimmerClick,ct=j.latestDocumentMouseDownEvent;j.latestDocumentMouseDownEvent=null,!(!at||(0,_lib.doesNodeContainClick)(j.ref.current,ct)||(0,_lib.doesNodeContainClick)(j.ref.current,rt))&&(j.setState({open:!1}),(0,_invoke2.default)(j.props,"onClose",rt,(0,_extends2.default)({},j.props,{open:!1})))},j.handleIconOverrides=function(rt){return{onClick:function(ct){(0,_invoke2.default)(rt,"onClick",ct),j.handleClose(ct)}}},j.handleOpen=function(rt){(0,_invoke2.default)(j.props,"onOpen",rt,(0,_extends2.default)({},j.props,{open:!0})),j.setState({open:!0})},j.handlePortalMount=function(rt){var at=j.props.eventPool;j.setState({scrolling:!1}),j.setPositionAndClassNames(),_lib.eventStack.sub("mousedown",j.handleDocumentMouseDown,{pool:at,target:j.dimmerRef.current}),_lib.eventStack.sub("click",j.handleDocumentClick,{pool:at,target:j.dimmerRef.current}),(0,_invoke2.default)(j.props,"onMount",rt,j.props)},j.handlePortalUnmount=function(rt){var at=j.props.eventPool;cancelAnimationFrame(j.animationRequestId),_lib.eventStack.unsub("mousedown",j.handleDocumentMouseDown,{pool:at,target:j.dimmerRef.current}),_lib.eventStack.unsub("click",j.handleDocumentClick,{pool:at,target:j.dimmerRef.current}),(0,_invoke2.default)(j.props,"onUnmount",rt,j.props)},j.setPositionAndClassNames=function(){var rt=j.props.centered,at,ct={};if(j.ref.current){var dt=j.ref.current.getBoundingClientRect(),yt=(0,_utils.canFit)(dt);at=!yt;var bt=j.legacy?(0,_utils.getLegacyStyles)(yt,rt,dt):{};(0,_shallowequal.default)(j.state.legacyStyles,bt)||(ct.legacyStyles=bt),j.state.scrolling!==at&&(ct.scrolling=at)}(0,_isEmpty2.default)(ct)||j.setState(ct),j.animationRequestId=requestAnimationFrame(j.setPositionAndClassNames)},j.renderContent=function(rt){var at=j.props,ct=at.actions,dt=at.basic,yt=at.children,bt=at.className,Et=at.closeIcon,$t=at.content,_t=at.header,xt=at.size,St=at.style,Mt=j.state,Tt=Mt.legacyStyles,Rt=Mt.scrolling,Ct=(0,_clsx.default)("ui",xt,(0,_lib.useKeyOnly)(dt,"basic"),(0,_lib.useKeyOnly)(j.legacy,"legacy"),(0,_lib.useKeyOnly)(Rt,"scrolling"),"modal transition visible active",bt),It=(0,_lib.getElementType)(_,j.props),kt=Et===!0?"close":Et,Dt=_Icon.default.create(kt,{overrideProps:j.handleIconOverrides});return _react.default.createElement(_reactComponentRef.Ref,{innerRef:j.ref},_react.default.createElement(It,(0,_extends2.default)({},rt,{className:Ct,style:(0,_extends2.default)({},Tt,St)}),Dt,_lib.childrenUtils.isNil(yt)?_react.default.createElement(_react.default.Fragment,null,_ModalHeader.default.create(_t,{autoGenerateKey:!1}),_ModalContent.default.create($t,{autoGenerateKey:!1}),_ModalActions.default.create(ct,{overrideProps:j.handleActionsOverrides})):yt))},j}var $=_.prototype;return $.componentWillUnmount=function(){this.handlePortalUnmount()},$.render=function(){var _e=this.props,et=_e.centered,tt=_e.closeOnDocumentClick,rt=_e.dimmer,at=_e.eventPool,ct=_e.trigger,dt=this.state,yt=dt.open,bt=dt.scrolling,Et=this.getMountNode();if(!(0,_lib.isBrowser)())return(0,_react.isValidElement)(ct)?ct:null;var $t=(0,_lib.getUnhandledProps)(_,this.props),_t=_Portal.default.handledProps,xt=(0,_reduce2.default)($t,function(Mt,Tt,Rt){return(0,_includes2.default)(_t,Rt)||(Mt[Rt]=Tt),Mt},{}),St=(0,_pick2.default)($t,_t);return _react.default.createElement(_Portal.default,(0,_extends2.default)({closeOnDocumentClick:tt},St,{trigger:ct,eventPool:at,mountNode:Et,open:yt,onClose:this.handleClose,onMount:this.handlePortalMount,onOpen:this.handleOpen,onUnmount:this.handlePortalUnmount}),_react.default.createElement(_reactComponentRef.Ref,{innerRef:this.dimmerRef},_ModalDimmer.default.create((0,_isPlainObject2.default)(rt)?rt:{},{autoGenerateKey:!1,defaultProps:{blurring:rt==="blurring",inverted:rt==="inverted"},overrideProps:{children:this.renderContent(xt),centered:et,mountNode:Et,scrolling:bt}})))},_}(_lib.ModernAutoControlledComponent);Modal$1.handledProps=["actions","as","basic","centered","children","className","closeIcon","closeOnDimmerClick","closeOnDocumentClick","content","defaultOpen","dimmer","eventPool","header","mountNode","onActionClick","onClose","onMount","onOpen","onUnmount","open","size","style","trigger"];Modal$1.propTypes={};Modal$1.defaultProps={centered:!0,dimmer:!0,closeOnDimmerClick:!0,closeOnDocumentClick:!1,eventPool:"Modal"};Modal$1.autoControlledProps=["open"];Modal$1.Actions=_ModalActions.default;Modal$1.Content=_ModalContent.default;Modal$1.Description=_ModalDescription.default;Modal$1.Dimmer=_ModalDimmer.default;Modal$1.Header=_ModalHeader.default;var _default=Modal$1;Modal$2.default=_default;const Modal="";(function(a){var _=commonjsGlobal&&commonjsGlobal.__importDefault||function(j){return j&&j.__esModule?j:{default:j}};Object.defineProperty(a,"__esModule",{value:!0}),a.Modal=void 0;var $=Modal$2;Object.defineProperty(a,"Modal",{enumerable:!0,get:function(){return _($).default}})})(Modal$3);const wait=a=>new Promise(_=>setTimeout(_,a));var ModalContentExports=requireModalContent();const ModalContent=getDefaultExportFromCjs$1(ModalContentExports);var ModalNavigation$2={};const ModalNavigation$1="";var __extends=commonjsGlobal&&commonjsGlobal.__extends||function(){var a=function(_,$){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(j,_e){j.__proto__=_e}||function(j,_e){for(var et in _e)Object.prototype.hasOwnProperty.call(_e,et)&&(j[et]=_e[et])},a(_,$)};return function(_,$){if(typeof $!="function"&&$!==null)throw new TypeError("Class extends value "+String($)+" is not a constructor or null");a(_,$);function j(){this.constructor=_}_.prototype=$===null?Object.create($):(j.prototype=$.prototype,new j)}}(),__createBinding=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(a,_,$,j){j===void 0&&(j=$);var _e=Object.getOwnPropertyDescriptor(_,$);(!_e||("get"in _e?!_.__esModule:_e.writable||_e.configurable))&&(_e={enumerable:!0,get:function(){return _[$]}}),Object.defineProperty(a,j,_e)}:function(a,_,$,j){j===void 0&&(j=$),a[j]=_[$]}),__setModuleDefault=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(a,_){Object.defineProperty(a,"default",{enumerable:!0,value:_})}:function(a,_){a.default=_}),__importStar=commonjsGlobal&&commonjsGlobal.__importStar||function(a){if(a&&a.__esModule)return a;var _={};if(a!=null)for(var $ in a)$!=="default"&&Object.prototype.hasOwnProperty.call(a,$)&&__createBinding(_,a,$);return __setModuleDefault(_,a),_};Object.defineProperty(ModalNavigation$2,"__esModule",{value:!0});var ModalNavigation_2=ModalNavigation$2.ModalNavigation=void 0,React=__importStar(reactExports),ModalNavigation=function(a){__extends(_,a);function _(){return a!==null&&a.apply(this,arguments)||this}return _.prototype.render=function(){var $=this.props,j=$.title,_e=$.subtitle,et=$.onBack,tt=$.onClose,rt=$.onInfo;return React.createElement("div",{className:"dcl modal-navigation"},React.createElement("div",{className:"dcl modal-navigation-title"},j),_e&&React.createElement("div",{className:"dcl modal-navigation-subtitle"},_e),et&&React.createElement("div",{className:"dcl modal-navigation-button modal-navigation-back",onClick:et}),rt&&React.createElement("div",{className:"dcl modal-navigation-button modal-navigation-info",onClick:rt}),tt&&React.createElement("div",{className:"dcl modal-navigation-button modal-navigation-close",onClick:tt}))},_}(React.PureComponent);ModalNavigation_2=ModalNavigation$2.ModalNavigation=ModalNavigation;const warningSrc="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239440432.commit-2fa6a22/assets/warning-057948e8.svg";var ConnectionModalState=(a=>(a.CONNECTING_WALLET="CONNECTING_WALLET",a.WAITING_FOR_SIGNATURE="WAITING_FOR_SIGNATURE",a.ERROR="ERROR",a.LOADING_MAGIC="LOADING_MAGIC",a.VALIDATING_SIGN_IN="VALIDATING_SIGN_IN",a.WAITING_FOR_CONFIRMATION="WAITING_FOR_CONFIRMATION",a.ERROR_LOCKED_WALLET="ERROR_LOCKED_WALLET",a))(ConnectionModalState||{});function getConnectionMessage(a,_){switch(a){case ConnectionModalState.ERROR:return"You did not confirm this action in your digital wallet extension. To continue, please try again.";case ConnectionModalState.ERROR_LOCKED_WALLET:return"Your wallet is currently locked. To continue, please unlock your wallet and try again.";case ConnectionModalState.CONNECTING_WALLET:case ConnectionModalState.WAITING_FOR_SIGNATURE:return _===dist$8.ProviderType.MAGIC||_===dist$8.ProviderType.MAGIC_TEST?"Almost done! Confirm your request to login Decentraland":"Confirm in your digital wallet extension to continue.";case ConnectionModalState.VALIDATING_SIGN_IN:return"Just a moment, we're verifying your login credentials...";case ConnectionModalState.LOADING_MAGIC:return"Redirecting..."}}const main$3="_main_1qx1l_1",content$1="_content_1qx1l_8",errorImage="_errorImage_1qx1l_16",message="_message_1qx1l_22",loader="_loader_1qx1l_29",styles$4={main:main$3,content:content$1,errorImage,message,loader},ConnectionModal=a=>{const{open:_,state:$,providerType:j,onClose:_e,onTryAgain:et}=a,tt=$===ConnectionModalState.CONNECTING_WALLET||$===ConnectionModalState.WAITING_FOR_SIGNATURE||$===ConnectionModalState.LOADING_MAGIC||$===ConnectionModalState.VALIDATING_SIGN_IN,rt=$===ConnectionModalState.ERROR||$===ConnectionModalState.ERROR_LOCKED_WALLET;return jsxRuntimeExports.jsxs(Modal$3.Modal,{size:"tiny",open:_,children:[jsxRuntimeExports.jsx(ModalNavigation_2,{title:"",onClose:tt?void 0:_e}),jsxRuntimeExports.jsx("div",{className:styles$4.main,children:jsxRuntimeExports.jsxs("div",{className:styles$4.content,children:[rt&&jsxRuntimeExports.jsx("img",{className:styles$4.errorImage,src:warningSrc}),tt&&jsxRuntimeExports.jsx(Loader_3,{className:styles$4.loader,size:"huge",inline:!0}),jsxRuntimeExports.jsx("p",{className:styles$4.message,children:getConnectionMessage($,j)}),rt&&jsxRuntimeExports.jsx(Button$5.Button,{primary:!0,onClick:et,children:"Try again"})]})}),jsxRuntimeExports.jsx(ModalContent,{})]})},container="_container_1jfc2_1",info$2="_info_1jfc2_19",title$1="_title_1jfc2_28",styles$3={container,info:info$2,title:title$1},CallbackPage=()=>{usePageTracking();const{url:a,redirect:_}=useAfterLoginRedirection(),$=useNavigateWithSearchParams(),[j,_e]=reactExports.useState(!1),[et,tt]=reactExports.useState(ConnectionModalState.WAITING_FOR_CONFIRMATION),{flags:rt,initialized:at}=reactExports.useContext(FeatureFlagsContext),[ct]=useTargetConfig(),dt=reactExports.useCallback(async()=>{var $t;const Et=await connection$1.connect(rt[FeatureFlagsKeys.MAGIC_TEST]?dist$8.ProviderType.MAGIC_TEST:dist$8.ProviderType.MAGIC);return await getIdentitySignature((($t=Et.account)==null?void 0:$t.toLowerCase())??"",Et.provider),Et},[rt[FeatureFlagsKeys.MAGIC_TEST]]),yt=reactExports.useCallback(async()=>{var Et;try{rt[FeatureFlagsKeys.DAPPS_MAGIC_AUTO_SIGN]||tt(ConnectionModalState.WAITING_FOR_SIGNATURE);const $t=await dt(),_t=((Et=$t.account)==null?void 0:Et.toLowerCase())??"";if(getAnalytics().identify({ethAddress:_t}),getAnalytics().track(TrackingEvents.LOGIN_SUCCESS,{eth_address:_t,type:ConnectionType.WEB2}),await wait(800),!ct.skipSetup&&$t.account&&!await fetchProfile($t.account))return $(locations.setup(a));_()}catch($t){console.log($t),$(locations.login())}},[$,a,dt,_,rt[FeatureFlagsKeys.DAPPS_MAGIC_AUTO_SIGN]]),bt=reactExports.useCallback(async()=>{const{Magic:Et}=await __vitePreload(()=>import("./index-0ee79f8d.js"),["assets/index-0ee79f8d.js","assets/index-cd62a0db.js"]),{OAuthExtension:$t}=await __vitePreload(()=>import("./index-d364b022.js"),["assets/index-d364b022.js","assets/index-cd62a0db.js"]),_t=rt[FeatureFlagsKeys.MAGIC_TEST]?getConfiguration().magic_test.apiKey:getConfiguration().magic.apiKey,xt=new Et(_t,{extensions:[new $t]});try{tt(ConnectionModalState.VALIDATING_SIGN_IN),await(xt==null?void 0:xt.oauth2.getRedirectResult()),rt[FeatureFlagsKeys.DAPPS_MAGIC_AUTO_SIGN]?yt():tt(ConnectionModalState.WAITING_FOR_CONFIRMATION)}catch(St){console.error("Error logging in",St),getAnalytics().track(TrackingEvents.LOGIN_ERROR,{error:isErrorWithMessage(St)?St.message:St}),await wait(800),$(locations.login())}},[$,yt,rt[FeatureFlagsKeys.MAGIC_TEST],rt[FeatureFlagsKeys.DAPPS_MAGIC_AUTO_SIGN]]);return reactExports.useEffect(()=>{!j&&at&&(_e(!0),bt())},[bt,at,j]),et===ConnectionModalState.WAITING_FOR_CONFIRMATION?jsxRuntimeExports.jsx(Modal$3.Modal,{size:"tiny",open:!0,children:jsxRuntimeExports.jsxs("div",{className:styles$3.container,children:[jsxRuntimeExports.jsx("h3",{className:styles$3.title,children:"Confirm your login"}),jsxRuntimeExports.jsxs("div",{className:styles$3.info,children:[jsxRuntimeExports.jsx("span",{children:"The next step only verifies your identity."}),jsxRuntimeExports.jsx("span",{children:"No payments or transactions will occur without your explicit approval."})]}),jsxRuntimeExports.jsx(Button$5.Button,{primary:!0,onClick:yt,children:"Continue"})]})}):jsxRuntimeExports.jsx(ConnectionModal,{open:!0,state:et,onTryAgain:dt,providerType:rt[FeatureFlagsKeys.MAGIC_TEST]?dist$8.ProviderType.MAGIC_TEST:dist$8.ProviderType.MAGIC})},warningImage="_warningImage_xwxyz_1",content="_content_xwxyz_7",style={warningImage,content},InvalidRedirectionPage=()=>jsxRuntimeExports.jsxs(Modal$3.Modal,{size:"tiny",open:!0,children:[jsxRuntimeExports.jsx(ModalNavigation_2,{title:"Invalid redirection",onClose:void 0}),jsxRuntimeExports.jsxs(Modal$3.Modal.Content,{className:style.content,children:[jsxRuntimeExports.jsx("img",{className:style.warningImage,src:warningSrc}),jsxRuntimeExports.jsx("p",{children:"The site you were redirected to is invalid."})]}),jsxRuntimeExports.jsx(Modal$3.Modal.Actions,{children:jsxRuntimeExports.jsx(Button$5.Button,{primary:!0,as:Link,to:locations.login(),children:"Go back to the login page"})})]}),Image1="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239440432.commit-2fa6a22/assets/image1-a4aa795b.webp",Image10="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239440432.commit-2fa6a22/assets/image10-c7fbcc61.webp",Image2="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239440432.commit-2fa6a22/assets/image2-0af6ed59.webp",Image3="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239440432.commit-2fa6a22/assets/image3-c864ad86.webp",Image4="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239440432.commit-2fa6a22/assets/image4-7964be5f.webp",Image5="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239440432.commit-2fa6a22/assets/image5-fcca517e.webp",Image6="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239440432.commit-2fa6a22/assets/image6-c770bdf5.webp",Image7="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239440432.commit-2fa6a22/assets/image7-341595c4.webp",Image8="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239440432.commit-2fa6a22/assets/image8-fea9fe85.webp",Image9="https://cdn.decentraland.org/@dcl/auth-site/2.1.1-13239440432.commit-2fa6a22/assets/image9-714885ef.webp",main$2="_main_rwmls_1",title="_title_rwmls_11",infoModal$1="_infoModal_rwmls_15",infoContent$1="_infoContent_rwmls_19",info$1="_info_rwmls_15",goBackButton$1="_goBackButton_rwmls_33",styles$2={main:main$2,title,infoModal:infoModal$1,infoContent:infoContent$1,info:info$1,goBackButton:goBackButton$1},defaultProps$1={i18n:{title:"How does Magic work?",subtitle:"Magic handles digital wallet creation & management behind the scenes so you don't have to. Just log into Decentraland with your favorite social account and let Magic handle the rest.<br /> <br />If you'd rather take a more hands-on approach to your digital asset storage (e.g. Wearables, NAMEs, etc.), you can get a digital wallet from a provider such as <a href='https://metamask.io/'>MetaMask</a> and use it to create your Decentraland account.",goBack:"Return to log in page"}},MagicInformationModal=a=>{const{i18n:_=defaultProps$1.i18n,onClose:$,open:j}=a;return jsxRuntimeExports.jsxs(Modal$3.Modal,{size:"tiny",open:j,className:styles$2.infoModal,onClose:$,children:[jsxRuntimeExports.jsx(ModalNavigation_2,{title:"",onClose:$}),jsxRuntimeExports.jsx(ModalContent,{className:styles$2.infoContent,children:jsxRuntimeExports.jsxs("div",{className:styles$2.main,children:[jsxRuntimeExports.jsx("h1",{className:styles$2.title,children:_==null?void 0:_.title}),jsxRuntimeExports.jsx("span",{className:styles$2.info,dangerouslySetInnerHTML:{__html:_==null?void 0:_.subtitle}}),jsxRuntimeExports.jsx(Button$5.Button,{className:styles$2.goBackButton,secondary:!0,inverted:!0,onClick:$,children:_==null?void 0:_.goBack})]})})]})},main$1="_main_1yy07_1",infoModal="_infoModal_1yy07_11",infoContent="_infoContent_1yy07_15",info="_info_1yy07_11",infoImage="_infoImage_1yy07_26",assets="_assets_1yy07_34",login="_login_1yy07_38",goBackButton="_goBackButton_1yy07_42",styles$1={main:main$1,infoModal,infoContent,info,infoImage,assets,login,goBackButton},defaultProps={i18n:{title:"What is a digital wallet?",assets:{title:"A Home For Your Digital Assets",text:"Wallets are used to send, receive, store, and display digital assets, such as your Decentraland Wearables, NAMEs, LANDs, etc."},logIn:{title:"A New Way To Log In",text:"Instead of creating new accounts and passwords on every website, in the world of Web3 all you need to do is just connect your digital wallet."},goBack:"Return to log in page"}},WalletInformationModal=a=>{const{i18n:_=defaultProps.i18n,onClose:$,open:j}=a;return jsxRuntimeExports.jsxs(Modal$3.Modal,{size:"tiny",open:j,className:styles$1.infoModal,onClose:$,children:[jsxRuntimeExports.jsx(ModalNavigation_2,{title:"",onClose:$}),jsxRuntimeExports.jsx(ModalContent,{className:styles$1.infoContent,children:jsxRuntimeExports.jsxs("div",{className:styles$1.main,children:[jsxRuntimeExports.jsx("h1",{className:styles$1.title,children:_==null?void 0:_.title}),jsxRuntimeExports.jsxs("article",{className:styles$1.info,children:[jsxRuntimeExports.jsx("div",{className:classNames(styles$1.infoImage,styles$1.assets)}),jsxRuntimeExports.jsx("h3",{children:_==null?void 0:_.assets.title}),jsxRuntimeExports.jsx("p",{children:_==null?void 0:_.assets.text})]}),jsxRuntimeExports.jsxs("article",{className:styles$1.info,children:[jsxRuntimeExports.jsx("div",{className:classNames(styles$1.infoImage,styles$1.login)}),jsxRuntimeExports.jsx("h3",{children:_==null?void 0:_.logIn.title}),jsxRuntimeExports.jsx("p",{children:_==null?void 0:_.logIn.text})]}),jsxRuntimeExports.jsx(Button$5.Button,{className:styles$1.goBackButton,secondary:!0,inverted:!0,onClick:$,children:_==null?void 0:_.goBack})]})})]})},main="_main_15y2x_1",background="_background_15y2x_8",left="_left_15y2x_32",leftInfo="_leftInfo_15y2x_42",right="_right_15y2x_51",footer="_footer_15y2x_60",guestInfo="_guestInfo_15y2x_79",styles={main,background,"move-background":"_move-background_15y2x_1",left,leftInfo,right,footer,guestInfo},BACKGROUND_IMAGES=[Image1,Image2,Image3,Image4,Image5,Image6,Image7,Image8,Image9,Image10],LoginPage=()=>{usePageTracking();const a=useNavigateWithSearchParams(),[_,$]=reactExports.useState(ConnectionModalState.CONNECTING_WALLET),[j,_e]=reactExports.useState(!1),[et,tt]=reactExports.useState(!1),[rt,at]=reactExports.useState(!1),[ct,dt]=reactExports.useState(),{url:yt,redirect:bt}=useAfterLoginRedirection(),{flags:Et,initialized:$t}=reactExports.useContext(FeatureFlagsContext),_t=yt&&new URL(yt).pathname.includes("/play"),[xt,St]=reactExports.useState(0),[Mt]=useTargetConfig(),Tt=reactExports.useCallback(vt=>{const nt=vt&&isSocialLogin(vt);getAnalytics().track(TrackingEvents.CLICK,{action:ClickEvents.LEARN_MORE,type:nt?"Learn more about Magic":"Learn more about wallets"}),nt?tt(!0):_e(!0)},[_e,tt,j]),Rt=reactExports.useCallback(()=>{_e(!1),tt(!1)},[_e,tt]),Ct=reactExports.useCallback(()=>{tt(!et)},[tt,et]),It=reactExports.useCallback(async()=>{getAnalytics().track(TrackingEvents.LOGIN_CLICK,{type:"guest"}),await wait(800)},[]),kt=reactExports.useMemo(()=>{if(yt){const vt=new URL(yt);return vt.searchParams.append("guest","true"),vt.toString()}return""},[yt]),Dt=reactExports.useCallback(async vt=>{var lt;const nt=isSocialLogin(vt),st=nt?ConnectionType.WEB2:ConnectionType.WEB3;if(dt(vt),getAnalytics().track(TrackingEvents.LOGIN_CLICK,{method:vt,type:st}),nt)$(ConnectionModalState.LOADING_MAGIC),await wait(800),await connectToSocialProvider(vt,Et[FeatureFlagsKeys.MAGIC_TEST],yt);else try{at(!0),$(ConnectionModalState.CONNECTING_WALLET);const ht=await connectToProvider(vt);if(await wait(800),$(ConnectionModalState.WAITING_FOR_SIGNATURE),await getIdentitySignature(((lt=ht.account)==null?void 0:lt.toLowerCase())??"",ht.provider),getAnalytics().track(TrackingEvents.LOGIN_SUCCESS,{eth_address:ht.account,type:st}),getAnalytics().identify({ethAddress:ht.account}),await wait(800),!Mt.skipSetup&&ht.account&&!await fetchProfile(ht.account))return a(locations.setup(yt)),at(!1);bt(),at(!1)}catch(ht){console.error("Error",isErrorWithMessage(ht)?ht.message:JSON.stringify(ht)),getAnalytics().track(TrackingEvents.LOGIN_ERROR,{error:isErrorWithMessage(ht)?ht.message:ht}),isErrorWithName(ht)&&ht.name==="ErrorUnlockingWallet"?$(ConnectionModalState.ERROR_LOCKED_WALLET):$(ConnectionModalState.ERROR)}},[$,at,dt,yt,Et[FeatureFlagsKeys.MAGIC_TEST],a,bt]),Bt=reactExports.useCallback(()=>{at(!1),dt(void 0),$(ConnectionModalState.CONNECTING_WALLET)},[at]),zt=reactExports.useCallback(()=>{ct&&Dt(ct)},[ct,Dt]);return reactExports.useEffect(()=>{const vt=setInterval(()=>{St(nt=>nt===BACKGROUND_IMAGES.length-1?0:nt+1)},5e3);return()=>{clearInterval(vt)}},[]),jsxRuntimeExports.jsxs("main",{className:styles.main,children:[jsxRuntimeExports.jsx("div",{className:styles.background,style:{backgroundImage:`url(${BACKGROUND_IMAGES[xt]})`}}),config$1.is(dist$4.Env.DEVELOPMENT)&&!$t?jsxRuntimeExports.jsx(Loader_3,{active:!0,size:"massive"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(WalletInformationModal,{open:j,onClose:Rt}),jsxRuntimeExports.jsx(MagicInformationModal,{open:et,onClose:Ct}),jsxRuntimeExports.jsx(ConnectionModal,{open:rt,state:_,onClose:Bt,onTryAgain:zt,providerType:ct?fromConnectionOptionToProviderType(ct):null}),jsxRuntimeExports.jsx("div",{className:styles.left,children:jsxRuntimeExports.jsxs("div",{className:styles.leftInfo,children:[jsxRuntimeExports.jsx(Connection,{onLearnMore:Tt,onConnect:Dt,loadingOption:ct,connectionOptions:Mt.connectionOptions}),_t&&jsxRuntimeExports.jsxs("div",{className:styles.guestInfo,children:["Quick dive?"," ",jsxRuntimeExports.jsx("a",{href:kt,onClick:It,children:"Explore as a guest"})]})]})})]})]})};(function(){const a=window.analytics=window.analytics||[];if(!a.initialize){if(a.invoked){window.console&&console.error&&console.error("Segment snippet included twice.");return}a.invoked=!0,a.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","user","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],a.factory=function(_){return function(){const $=Array.prototype.slice.call(arguments);return $.unshift(_),a.push($),a}};for(let _=0;_<a.methods.length;_++){const $=a.methods[_];a[$]=a.factory($)}a.load=function(_,$){const j=document.createElement("script");j.type="text/javascript",j.async=!0,j.src="https://cdn.segment.com/analytics.js/v1/"+_+"/analytics.min.js";const _e=document.getElementsByTagName("script")[0];_e.parentNode.insertBefore(j,_e),a._loadOptions=$},a.SNIPPET_VERSION="4.15.2"}})();const darkTheme="",index="";getAnalytics().load(config$1.get("SEGMENT_API_KEY"));ReactDOM.render(jsxRuntimeExports.jsx(React$5.StrictMode,{children:jsxRuntimeExports.jsxs(FeatureFlagsProvider,{children:[jsxRuntimeExports.jsx(BrowserRouter,{basename:"/auth",children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/login",element:jsxRuntimeExports.jsx(LoginPage,{})}),jsxRuntimeExports.jsx(Route,{path:"/invalidRedirection",element:jsxRuntimeExports.jsx(InvalidRedirectionPage,{})}),jsxRuntimeExports.jsx(Route,{path:"/callback",element:jsxRuntimeExports.jsx(CallbackPage,{})}),jsxRuntimeExports.jsx(Route,{path:"/requests/:requestId",element:jsxRuntimeExports.jsx(RequestPage,{})}),jsxRuntimeExports.jsx(Route,{path:"/setup",element:jsxRuntimeExports.jsx(SetupPage,{})}),jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(DefaultPage,{})})]})}),jsxRuntimeExports.jsx(Intercom,{appId:config$1.get("INTERCOM_APP_ID"),settings:{alignment:"right"}})]})}),document.getElementById("root"));export{BN$b as B,__vitePreload as _,getAugmentedNamespace as a,getDefaultExportFromCjs$1 as b,commonjsGlobal as c,commonjsRequire as d,require$$0$3 as e,hash$5 as f,global$1 as g,hash$4 as h,inherits_browserExports as i,requireBrorand as j,hmacDrbg as k,Buffer$G as l,minimalisticAssert as m,eventsExports as n,it as o,process$1 as p,o as q,requireCryptoBrowserify as r,sideChannel as s,bnExports$4 as t,utils$n as u,sha_jsExports as v,readableBrowserExports as w,require$$0$4 as x};
158
+ //# sourceMappingURL=index-03923982.js.map