@botpress/webchat 2.2.19 → 2.3.0

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.
Files changed (52) hide show
  1. package/.turbo/turbo-build.log +8 -8
  2. package/dist/adapters/adapters/webchat-to-target.d.ts +46 -0
  3. package/dist/adapters/webchat.d.ts +816 -0
  4. package/dist/client/{PushpinClient/index.d.ts → client.d.ts} +6 -5
  5. package/dist/client/index.d.ts +1 -2
  6. package/dist/client/{PushpinClient/inner-client → inner-client}/index.d.ts +3 -3
  7. package/dist/client/{PushpinClient/inner-client → inner-client}/signal-listener.d.ts +1 -1
  8. package/dist/client/types.d.ts +3 -26
  9. package/dist/components/Block.d.ts +2 -2
  10. package/dist/components/Message/Message.d.ts +4 -2
  11. package/dist/components/renderers/Audio/Audio.d.ts +3 -1
  12. package/dist/components/renderers/Bubble/Bubble.d.ts +2 -2
  13. package/dist/components/renderers/Button/Button.d.ts +2 -2
  14. package/dist/components/renderers/Carousel/Carousel.d.ts +3 -1
  15. package/dist/components/renderers/Column/Column.d.ts +2 -2
  16. package/dist/components/renderers/Dropdown/Dropdown.d.ts +2 -2
  17. package/dist/components/renderers/File/File.d.ts +3 -1
  18. package/dist/components/renderers/Image/Image.d.ts +3 -1
  19. package/dist/components/renderers/Location/Location.d.ts +3 -1
  20. package/dist/components/renderers/Row/Row.d.ts +2 -2
  21. package/dist/components/renderers/Text/Text.d.ts +2 -2
  22. package/dist/components/renderers/Video/Video.d.ts +3 -1
  23. package/dist/gen/client/models.d.ts +61 -0
  24. package/dist/gen/client/operations/createMessage.d.ts +122 -0
  25. package/dist/gen/client/operations/getMessage.d.ts +61 -0
  26. package/dist/gen/client/operations/listConversationMessages.d.ts +61 -0
  27. package/dist/gen/signals/index.d.ts +416 -8
  28. package/dist/gen/signals/messageCreated.t.d.ts +61 -0
  29. package/dist/gen/signals/messageCreated.z.d.ts +415 -0
  30. package/dist/get-client.d.ts +1 -2
  31. package/dist/hooks/useClient.d.ts +1 -2
  32. package/dist/index.js +12119 -14476
  33. package/dist/index.umd.cjs +88 -88
  34. package/dist/schemas/init.d.ts +0 -7
  35. package/dist/stores/offlineStore.d.ts +1 -1
  36. package/dist/stores/webchatStore.d.ts +1 -0
  37. package/dist/style.css +1 -1
  38. package/dist/types/block-type.d.ts +3 -0
  39. package/dist/types/init.d.ts +0 -1
  40. package/openapi.ts +1 -1
  41. package/package.json +3 -2
  42. package/dist/client/MessagingClient/client.d.ts +0 -35
  43. package/dist/client/MessagingClient/index.d.ts +0 -1
  44. package/dist/gen/signals/custom.j.d.ts +0 -3
  45. package/dist/gen/signals/messageCreated.j.d.ts +0 -3
  46. package/dist/gen/signals/typingStarted.j.d.ts +0 -3
  47. package/dist/gen/signals/typingStopped.j.d.ts +0 -3
  48. package/dist/gen/signals/webchatConfig.j.d.ts +0 -3
  49. package/dist/gen/signals/webchatVisibility.j.d.ts +0 -3
  50. /package/dist/client/{PushpinClient/inner-client → inner-client}/event-emitter.d.ts +0 -0
  51. /package/dist/client/{PushpinClient/inner-client → inner-client}/eventsource.d.ts +0 -0
  52. /package/dist/client/{PushpinClient/state-machine.d.ts → state-machine.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- (function(Oe,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],E):(Oe=typeof globalThis<"u"?globalThis:Oe||self,E(Oe.Webchat={},Oe.React,Oe.ReactDOM))})(this,function(Oe,E,rr){"use strict";var tle=Object.defineProperty;var nle=(Oe,E,rr)=>E in Oe?tle(Oe,E,{enumerable:!0,configurable:!0,writable:!0,value:rr}):Oe[E]=rr;var he=(Oe,E,rr)=>(nle(Oe,typeof E!="symbol"?E+"":E,rr),rr);function lv(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const C=lv(E),GO=lv(rr);var Ye;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ye||(Ye={}));var af;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(af||(af={}));const ge=Ye.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Jr=e=>{switch(typeof e){case"undefined":return ge.undefined;case"string":return ge.string;case"number":return isNaN(e)?ge.nan:ge.number;case"boolean":return ge.boolean;case"function":return ge.function;case"bigint":return ge.bigint;case"symbol":return ge.symbol;case"object":return Array.isArray(e)?ge.array:e===null?ge.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ge.promise:typeof Map<"u"&&e instanceof Map?ge.map:typeof Set<"u"&&e instanceof Set?ge.set:typeof Date<"u"&&e instanceof Date?ge.date:ge.object;default:return ge.unknown}},se=Ye.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),ZO=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Bn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,c=0;for(;c<a.path.length;){const l=a.path[c];c===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(a))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return o(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ye.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Bn.create=e=>new Bn(e);const ya=(e,t)=>{let n;switch(e.code){case se.invalid_type:e.received===ge.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case se.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ye.jsonStringifyReplacer)}`;break;case se.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ye.joinValues(e.keys,", ")}`;break;case se.invalid_union:n="Invalid input";break;case se.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ye.joinValues(e.options)}`;break;case se.invalid_enum_value:n=`Invalid enum value. Expected ${Ye.joinValues(e.options)}, received '${e.received}'`;break;case se.invalid_arguments:n="Invalid function arguments";break;case se.invalid_return_type:n="Invalid function return type";break;case se.invalid_date:n="Invalid date";break;case se.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Ye.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case se.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case se.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case se.custom:n="Invalid input";break;case se.invalid_intersection_types:n="Intersection results could not be merged";break;case se.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case se.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ye.assertNever(e)}return{message:n}};let uv=ya;function YO(e){uv=e}function Qs(){return uv}const ec=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};let s="";const c=r.filter(l=>!!l).slice().reverse();for(const l of c)s=l(a,{data:t,defaultError:s}).message;return{...o,path:i,message:o.message||s}},JO=[];function we(e,t){const n=ec({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Qs(),ya].filter(r=>!!r)});e.common.issues.push(n)}class Yt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return Me;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n)r.push({key:await o.key,value:await o.value});return Yt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return Me;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const Me=Object.freeze({status:"aborted"}),fv=e=>({status:"dirty",value:e}),an=e=>({status:"valid",value:e}),sf=e=>e.status==="aborted",cf=e=>e.status==="dirty",va=e=>e.status==="valid",tc=e=>typeof Promise<"u"&&e instanceof Promise;var Ee;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ee||(Ee={}));class or{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const dv=(e,t)=>{if(va(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Bn(e.common.issues);return this._error=n,this._error}}};function Ne(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>a.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:o}}class De{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Jr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Yt,ctx:{common:t.parent.common,data:t.data,parsedType:Jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(tc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Jr(t)},i=this._parseSync({data:t,path:o.path,parent:o});return dv(o,i)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Jr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(tc(o)?o:Promise.resolve(o));return dv(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:se.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new qn({schema:this,typeName:Ae.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Ar.create(this,this._def)}nullable(){return Ro.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return zn.create(this,this._def)}promise(){return ui.create(this,this._def)}or(t){return xa.create([this,t],this._def)}and(t){return Sa.create(this,t,this._def)}transform(t){return new qn({...Ne(this._def),schema:this,typeName:Ae.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ca({...Ne(this._def),innerType:this,defaultValue:n,typeName:Ae.ZodDefault})}brand(){return new hv({typeName:Ae.ZodBranded,type:this,...Ne(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new sc({...Ne(this._def),innerType:this,catchValue:n,typeName:Ae.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Oa.create(this,t)}readonly(){return lc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const XO=/^c[^\s-]{8,}$/i,QO=/^[a-z][a-z0-9]*$/,eT=/^[0-9A-HJKMNP-TV-Z]{26}$/,tT=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,nT=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,rT="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let lf;const oT=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,iT=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,aT=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function sT(e,t){return!!((t==="v4"||!t)&&oT.test(e)||(t==="v6"||!t)&&iT.test(e))}class Un extends De{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ge.string){const i=this._getOrReturnCtx(t);return we(i,{code:se.invalid_type,expected:ge.string,received:i.parsedType}),Me}const r=new Yt;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),we(o,{code:se.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),we(o,{code:se.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?we(o,{code:se.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&we(o,{code:se.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")nT.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"email",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")lf||(lf=new RegExp(rT,"u")),lf.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"emoji",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")tT.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"uuid",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")XO.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"cuid",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")QO.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"cuid2",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")eT.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"ulid",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),we(o,{validation:"url",code:se.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"regex",code:se.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),we(o,{code:se.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),we(o,{code:se.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),we(o,{code:se.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?aT(i).test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{code:se.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="ip"?sT(t.data,i.version)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"ip",code:se.invalid_string,message:i.message}),r.dirty()):Ye.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:se.invalid_string,...Ee.errToObj(r)})}_addCheck(t){return new Un({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ee.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ee.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ee.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ee.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ee.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ee.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ee.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ee.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...Ee.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ee.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ee.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ee.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ee.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ee.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ee.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ee.errToObj(n)})}nonempty(t){return this.min(1,Ee.errToObj(t))}trim(){return new Un({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Un({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Un({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Un.create=e=>{var t;return new Un({checks:[],typeName:Ae.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ne(e)})};function cT(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class Xr extends De{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ge.number){const i=this._getOrReturnCtx(t);return we(i,{code:se.invalid_type,expected:ge.number,received:i.parsedType}),Me}let r;const o=new Yt;for(const i of this._def.checks)i.kind==="int"?Ye.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),we(r,{code:se.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),we(r,{code:se.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),we(r,{code:se.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?cT(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),we(r,{code:se.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),we(r,{code:se.not_finite,message:i.message}),o.dirty()):Ye.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ee.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ee.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ee.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ee.toString(n))}setLimit(t,n,r,o){return new Xr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ee.toString(o)}]})}_addCheck(t){return new Xr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ee.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ee.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ee.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ee.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ee.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ee.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ee.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ee.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ee.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ye.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Xr.create=e=>new Xr({checks:[],typeName:Ae.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ne(e)});class Qr extends De{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ge.bigint){const i=this._getOrReturnCtx(t);return we(i,{code:se.invalid_type,expected:ge.bigint,received:i.parsedType}),Me}let r;const o=new Yt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),we(r,{code:se.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),we(r,{code:se.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),we(r,{code:se.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ye.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ee.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ee.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ee.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ee.toString(n))}setLimit(t,n,r,o){return new Qr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ee.toString(o)}]})}_addCheck(t){return new Qr({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ee.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ee.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ee.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ee.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ee.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Qr.create=e=>{var t;return new Qr({checks:[],typeName:Ae.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ne(e)})};class ga extends De{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ge.boolean){const r=this._getOrReturnCtx(t);return we(r,{code:se.invalid_type,expected:ge.boolean,received:r.parsedType}),Me}return an(t.data)}}ga.create=e=>new ga({typeName:Ae.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ne(e)});class Ao extends De{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ge.date){const i=this._getOrReturnCtx(t);return we(i,{code:se.invalid_type,expected:ge.date,received:i.parsedType}),Me}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return we(i,{code:se.invalid_date}),Me}const r=new Yt;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),we(o,{code:se.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),we(o,{code:se.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ye.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ao({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ee.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ee.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Ao.create=e=>new Ao({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ae.ZodDate,...Ne(e)});class nc extends De{_parse(t){if(this._getType(t)!==ge.symbol){const r=this._getOrReturnCtx(t);return we(r,{code:se.invalid_type,expected:ge.symbol,received:r.parsedType}),Me}return an(t.data)}}nc.create=e=>new nc({typeName:Ae.ZodSymbol,...Ne(e)});class ba extends De{_parse(t){if(this._getType(t)!==ge.undefined){const r=this._getOrReturnCtx(t);return we(r,{code:se.invalid_type,expected:ge.undefined,received:r.parsedType}),Me}return an(t.data)}}ba.create=e=>new ba({typeName:Ae.ZodUndefined,...Ne(e)});class wa extends De{_parse(t){if(this._getType(t)!==ge.null){const r=this._getOrReturnCtx(t);return we(r,{code:se.invalid_type,expected:ge.null,received:r.parsedType}),Me}return an(t.data)}}wa.create=e=>new wa({typeName:Ae.ZodNull,...Ne(e)});class si extends De{constructor(){super(...arguments),this._any=!0}_parse(t){return an(t.data)}}si.create=e=>new si({typeName:Ae.ZodAny,...Ne(e)});class Po extends De{constructor(){super(...arguments),this._unknown=!0}_parse(t){return an(t.data)}}Po.create=e=>new Po({typeName:Ae.ZodUnknown,...Ne(e)});class Tr extends De{_parse(t){const n=this._getOrReturnCtx(t);return we(n,{code:se.invalid_type,expected:ge.never,received:n.parsedType}),Me}}Tr.create=e=>new Tr({typeName:Ae.ZodNever,...Ne(e)});class rc extends De{_parse(t){if(this._getType(t)!==ge.undefined){const r=this._getOrReturnCtx(t);return we(r,{code:se.invalid_type,expected:ge.void,received:r.parsedType}),Me}return an(t.data)}}rc.create=e=>new rc({typeName:Ae.ZodVoid,...Ne(e)});class zn extends De{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ge.array)return we(n,{code:se.invalid_type,expected:ge.array,received:n.parsedType}),Me;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(we(n,{code:a?se.too_big:se.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(we(n,{code:se.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(we(n,{code:se.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>o.type._parseAsync(new or(n,a,n.path,s)))).then(a=>Yt.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new or(n,a,n.path,s)));return Yt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new zn({...this._def,minLength:{value:t,message:Ee.toString(n)}})}max(t,n){return new zn({...this._def,maxLength:{value:t,message:Ee.toString(n)}})}length(t,n){return new zn({...this._def,exactLength:{value:t,message:Ee.toString(n)}})}nonempty(t){return this.min(1,t)}}zn.create=(e,t)=>new zn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ae.ZodArray,...Ne(t)});function ci(e){if(e instanceof yt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ar.create(ci(r))}return new yt({...e._def,shape:()=>t})}else return e instanceof zn?new zn({...e._def,type:ci(e.element)}):e instanceof Ar?Ar.create(ci(e.unwrap())):e instanceof Ro?Ro.create(ci(e.unwrap())):e instanceof ir?ir.create(e.items.map(t=>ci(t))):e}class yt extends De{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Ye.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ge.object){const l=this._getOrReturnCtx(t);return we(l,{code:se.invalid_type,expected:ge.object,received:l.parsedType}),Me}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Tr&&this._def.unknownKeys==="strip"))for(const l in o.data)a.includes(l)||s.push(l);const c=[];for(const l of a){const u=i[l],f=o.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new or(o,f,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof Tr){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of s)c.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(l==="strict")s.length>0&&(we(o,{code:se.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of s){const f=o.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new or(o,f,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const f=await u.key;l.push({key:f,value:await u.value,alwaysSet:u.alwaysSet})}return l}).then(l=>Yt.mergeObjectSync(r,l)):Yt.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return Ee.errToObj,new yt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,s;const c=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Ee.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new yt({...this._def,unknownKeys:"strip"})}passthrough(){return new yt({...this._def,unknownKeys:"passthrough"})}extend(t){return new yt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new yt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ae.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new yt({...this._def,catchall:t})}pick(t){const n={};return Ye.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new yt({...this._def,shape:()=>n})}omit(t){const n={};return Ye.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new yt({...this._def,shape:()=>n})}deepPartial(){return ci(this)}partial(t){const n={};return Ye.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new yt({...this._def,shape:()=>n})}required(t){const n={};return Ye.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Ar;)i=i._def.innerType;n[r]=i}}),new yt({...this._def,shape:()=>n})}keyof(){return pv(Ye.objectKeys(this.shape))}}yt.create=(e,t)=>new yt({shape:()=>e,unknownKeys:"strip",catchall:Tr.create(),typeName:Ae.ZodObject,...Ne(t)}),yt.strictCreate=(e,t)=>new yt({shape:()=>e,unknownKeys:"strict",catchall:Tr.create(),typeName:Ae.ZodObject,...Ne(t)}),yt.lazycreate=(e,t)=>new yt({shape:e,unknownKeys:"strip",catchall:Tr.create(),typeName:Ae.ZodObject,...Ne(t)});class xa extends De{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new Bn(s.ctx.common.issues));return we(n,{code:se.invalid_union,unionErrors:a}),Me}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const c of r){const l={...n,common:{...n.common,issues:[]},parent:null},u=c._parseSync({data:n.data,path:n.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(c=>new Bn(c));return we(n,{code:se.invalid_union,unionErrors:s}),Me}}get options(){return this._def.options}}xa.create=(e,t)=>new xa({options:e,typeName:Ae.ZodUnion,...Ne(t)});const oc=e=>e instanceof _a?oc(e.schema):e instanceof qn?oc(e.innerType()):e instanceof $a?[e.value]:e instanceof eo?e.options:e instanceof ka?Object.keys(e.enum):e instanceof Ca?oc(e._def.innerType):e instanceof ba?[void 0]:e instanceof wa?[null]:null;class ic extends De{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.object)return we(n,{code:se.invalid_type,expected:ge.object,received:n.parsedType}),Me;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(we(n,{code:se.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=oc(i.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new ic({typeName:Ae.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Ne(r)})}}function uf(e,t){const n=Jr(e),r=Jr(t);if(e===t)return{valid:!0,data:e};if(n===ge.object&&r===ge.object){const o=Ye.objectKeys(t),i=Ye.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const c=uf(e[s],t[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(n===ge.array&&r===ge.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],c=uf(a,s);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return n===ge.date&&r===ge.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Sa extends De{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(sf(i)||sf(a))return Me;const s=uf(i.value,a.value);return s.valid?((cf(i)||cf(a))&&n.dirty(),{status:n.value,value:s.data}):(we(r,{code:se.invalid_intersection_types}),Me)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Sa.create=(e,t,n)=>new Sa({left:e,right:t,typeName:Ae.ZodIntersection,...Ne(n)});class ir extends De{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.array)return we(r,{code:se.invalid_type,expected:ge.array,received:r.parsedType}),Me;if(r.data.length<this._def.items.length)return we(r,{code:se.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Me;!this._def.rest&&r.data.length>this._def.items.length&&(we(r,{code:se.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new or(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Yt.mergeArray(n,a)):Yt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new ir({...this._def,rest:t})}}ir.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ir({items:e,typeName:Ae.ZodTuple,rest:null,...Ne(t)})};class Ea extends De{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.object)return we(r,{code:se.invalid_type,expected:ge.object,received:r.parsedType}),Me;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new or(r,s,r.path,s)),value:a._parse(new or(r,r.data[s],r.path,s))});return r.common.async?Yt.mergeObjectAsync(n,o):Yt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof De?new Ea({keyType:t,valueType:n,typeName:Ae.ZodRecord,...Ne(r)}):new Ea({keyType:Un.create(),valueType:t,typeName:Ae.ZodRecord,...Ne(n)})}}class ac extends De{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.map)return we(r,{code:se.invalid_type,expected:ge.map,received:r.parsedType}),Me;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,c],l)=>({key:o._parse(new or(r,s,r.path,[l,"key"])),value:i._parse(new or(r,c,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of a){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return Me;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const c of a){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return Me;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}}}}ac.create=(e,t,n)=>new ac({valueType:t,keyType:e,typeName:Ae.ZodMap,...Ne(n)});class Io extends De{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.set)return we(r,{code:se.invalid_type,expected:ge.set,received:r.parsedType}),Me;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(we(r,{code:se.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(we(r,{code:se.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(c){const l=new Set;for(const u of c){if(u.status==="aborted")return Me;u.status==="dirty"&&n.dirty(),l.add(u.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((c,l)=>i._parse(new or(r,c,r.path,l)));return r.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(t,n){return new Io({...this._def,minSize:{value:t,message:Ee.toString(n)}})}max(t,n){return new Io({...this._def,maxSize:{value:t,message:Ee.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Io.create=(e,t)=>new Io({valueType:e,minSize:null,maxSize:null,typeName:Ae.ZodSet,...Ne(t)});class li extends De{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.function)return we(n,{code:se.invalid_type,expected:ge.function,received:n.parsedType}),Me;function r(s,c){return ec({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Qs(),ya].filter(l=>!!l),issueData:{code:se.invalid_arguments,argumentsError:c}})}function o(s,c){return ec({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Qs(),ya].filter(l=>!!l),issueData:{code:se.invalid_return_type,returnTypeError:c}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof ui){const s=this;return an(async function(...c){const l=new Bn([]),u=await s._def.args.parseAsync(c,i).catch(d=>{throw l.addIssue(r(c,d)),l}),f=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(f,i).catch(d=>{throw l.addIssue(o(f,d)),l})})}else{const s=this;return an(function(...c){const l=s._def.args.safeParse(c,i);if(!l.success)throw new Bn([r(c,l.error)]);const u=Reflect.apply(a,this,l.data),f=s._def.returns.safeParse(u,i);if(!f.success)throw new Bn([o(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new li({...this._def,args:ir.create(t).rest(Po.create())})}returns(t){return new li({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new li({args:t||ir.create([]).rest(Po.create()),returns:n||Po.create(),typeName:Ae.ZodFunction,...Ne(r)})}}class _a extends De{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}_a.create=(e,t)=>new _a({getter:e,typeName:Ae.ZodLazy,...Ne(t)});class $a extends De{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return we(n,{received:n.data,code:se.invalid_literal,expected:this._def.value}),Me}return{status:"valid",value:t.data}}get value(){return this._def.value}}$a.create=(e,t)=>new $a({value:e,typeName:Ae.ZodLiteral,...Ne(t)});function pv(e,t){return new eo({values:e,typeName:Ae.ZodEnum,...Ne(t)})}class eo extends De{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return we(n,{expected:Ye.joinValues(r),received:n.parsedType,code:se.invalid_type}),Me}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return we(n,{received:n.data,code:se.invalid_enum_value,options:r}),Me}return an(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return eo.create(t)}exclude(t){return eo.create(this.options.filter(n=>!t.includes(n)))}}eo.create=pv;class ka extends De{_parse(t){const n=Ye.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ge.string&&r.parsedType!==ge.number){const o=Ye.objectValues(n);return we(r,{expected:Ye.joinValues(o),received:r.parsedType,code:se.invalid_type}),Me}if(n.indexOf(t.data)===-1){const o=Ye.objectValues(n);return we(r,{received:r.data,code:se.invalid_enum_value,options:o}),Me}return an(t.data)}get enum(){return this._def.values}}ka.create=(e,t)=>new ka({values:e,typeName:Ae.ZodNativeEnum,...Ne(t)});class ui extends De{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.promise&&n.common.async===!1)return we(n,{code:se.invalid_type,expected:ge.promise,received:n.parsedType}),Me;const r=n.parsedType===ge.promise?n.data:Promise.resolve(n.data);return an(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ui.create=(e,t)=>new ui({type:e,typeName:Ae.ZodPromise,...Ne(t)});class qn extends De{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ae.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{we(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(a).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}if(o.type==="refinement"){const a=s=>{const c=o.refinement(s,i);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Me:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Me:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!va(a))return a;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>va(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);Ye.assertNever(o)}}qn.create=(e,t,n)=>new qn({schema:e,typeName:Ae.ZodEffects,effect:t,...Ne(n)}),qn.createWithPreprocess=(e,t,n)=>new qn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ae.ZodEffects,...Ne(n)});class Ar extends De{_parse(t){return this._getType(t)===ge.undefined?an(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ar.create=(e,t)=>new Ar({innerType:e,typeName:Ae.ZodOptional,...Ne(t)});class Ro extends De{_parse(t){return this._getType(t)===ge.null?an(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ro.create=(e,t)=>new Ro({innerType:e,typeName:Ae.ZodNullable,...Ne(t)});class Ca extends De{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ge.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ca.create=(e,t)=>new Ca({innerType:e,typeName:Ae.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ne(t)});class sc extends De{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return tc(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Bn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Bn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}sc.create=(e,t)=>new sc({innerType:e,typeName:Ae.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ne(t)});class cc extends De{_parse(t){if(this._getType(t)!==ge.nan){const r=this._getOrReturnCtx(t);return we(r,{code:se.invalid_type,expected:ge.nan,received:r.parsedType}),Me}return{status:"valid",value:t.data}}}cc.create=e=>new cc({typeName:Ae.ZodNaN,...Ne(e)});const lT=Symbol("zod_brand");class hv extends De{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Oa extends De{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Me:i.status==="dirty"?(n.dirty(),fv(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Me:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Oa({in:t,out:n,typeName:Ae.ZodPipeline})}}class lc extends De{_parse(t){const n=this._def.innerType._parse(t);return va(n)&&(n.value=Object.freeze(n.value)),n}}lc.create=(e,t)=>new lc({innerType:e,typeName:Ae.ZodReadonly,...Ne(t)});const mv=(e,t={},n)=>e?si.create().superRefine((r,o)=>{var i,a;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(a=(i=s.fatal)!==null&&i!==void 0?i:n)!==null&&a!==void 0?a:!0,l=typeof s=="string"?{message:s}:s;o.addIssue({code:"custom",...l,fatal:c})}}):si.create(),uT={object:yt.lazycreate};var Ae;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ae||(Ae={}));const fT=(e,t={message:`Input not instance of ${e.name}`})=>mv(n=>n instanceof e,t),yv=Un.create,vv=Xr.create,dT=cc.create,pT=Qr.create,gv=ga.create,hT=Ao.create,mT=nc.create,yT=ba.create,vT=wa.create,gT=si.create,bT=Po.create,wT=Tr.create,xT=rc.create,ST=zn.create,ET=yt.create,_T=yt.strictCreate,$T=xa.create,kT=ic.create,CT=Sa.create,OT=ir.create,TT=Ea.create,AT=ac.create,PT=Io.create,IT=li.create,RT=_a.create,MT=$a.create,NT=eo.create,DT=ka.create,jT=ui.create,bv=qn.create,FT=Ar.create,LT=Ro.create,BT=qn.createWithPreprocess,UT=Oa.create;var x=Object.freeze({__proto__:null,defaultErrorMap:ya,setErrorMap:YO,getErrorMap:Qs,makeIssue:ec,EMPTY_PATH:JO,addIssueToContext:we,ParseStatus:Yt,INVALID:Me,DIRTY:fv,OK:an,isAborted:sf,isDirty:cf,isValid:va,isAsync:tc,get util(){return Ye},get objectUtil(){return af},ZodParsedType:ge,getParsedType:Jr,ZodType:De,ZodString:Un,ZodNumber:Xr,ZodBigInt:Qr,ZodBoolean:ga,ZodDate:Ao,ZodSymbol:nc,ZodUndefined:ba,ZodNull:wa,ZodAny:si,ZodUnknown:Po,ZodNever:Tr,ZodVoid:rc,ZodArray:zn,ZodObject:yt,ZodUnion:xa,ZodDiscriminatedUnion:ic,ZodIntersection:Sa,ZodTuple:ir,ZodRecord:Ea,ZodMap:ac,ZodSet:Io,ZodFunction:li,ZodLazy:_a,ZodLiteral:$a,ZodEnum:eo,ZodNativeEnum:ka,ZodPromise:ui,ZodEffects:qn,ZodTransformer:qn,ZodOptional:Ar,ZodNullable:Ro,ZodDefault:Ca,ZodCatch:sc,ZodNaN:cc,BRAND:lT,ZodBranded:hv,ZodPipeline:Oa,ZodReadonly:lc,custom:mv,Schema:De,ZodSchema:De,late:uT,get ZodFirstPartyTypeKind(){return Ae},coerce:{string:e=>Un.create({...e,coerce:!0}),number:e=>Xr.create({...e,coerce:!0}),boolean:e=>ga.create({...e,coerce:!0}),bigint:e=>Qr.create({...e,coerce:!0}),date:e=>Ao.create({...e,coerce:!0})},any:gT,array:ST,bigint:pT,boolean:gv,date:hT,discriminatedUnion:kT,effect:bv,enum:NT,function:IT,instanceof:fT,intersection:CT,lazy:RT,literal:MT,map:AT,nan:dT,nativeEnum:DT,never:wT,null:vT,nullable:LT,number:vv,object:ET,oboolean:()=>gv().optional(),onumber:()=>vv().optional(),optional:FT,ostring:()=>yv().optional(),pipeline:UT,preprocess:BT,promise:jT,record:TT,set:PT,strictObject:_T,string:yv,symbol:mT,transformer:bv,tuple:OT,undefined:yT,union:$T,unknown:bT,void:xT,NEVER:Me,ZodIssueCode:se,quotelessJson:ZO,ZodError:Bn});const sn=x.string().min(1),wv=x.object({text:sn}),xv=x.object({markdown:sn}),Sv=x.object({imageUrl:sn}),Ev=x.object({audioUrl:sn}),_v=x.object({videoUrl:sn}),$v=x.object({fileUrl:sn,title:sn.optional()}),kv=x.object({latitude:x.number(),longitude:x.number(),address:x.string().optional(),title:x.string().optional()}),Cv=x.object({title:sn,subtitle:sn.optional(),imageUrl:sn.optional(),actions:x.array(x.object({action:x.enum(["postback","url","say"]),label:sn,value:sn}))}),Ov=x.object({text:sn,options:x.array(x.object({label:sn,value:sn}))}),zT=x.object({items:x.array(Cv)}),qT=x.discriminatedUnion("type",[x.object({type:x.literal("text"),payload:wv}),x.object({type:x.literal("markdown"),payload:xv}),x.object({type:x.literal("image"),payload:Sv}),x.object({type:x.literal("audio"),payload:Ev}),x.object({type:x.literal("video"),payload:_v}),x.object({type:x.literal("file"),payload:$v}),x.object({type:x.literal("location"),payload:kv})]),HT=x.object({items:x.array(qT)}),ar={text:{schema:wv},markdown:{schema:xv},image:{schema:Sv},audio:{schema:Ev},video:{schema:_v},file:{schema:$v},location:{schema:kv},carousel:{schema:zT},card:{schema:Cv},dropdown:{schema:Ov},choice:{schema:Ov},bloc:{schema:HT}},Hn={className:x.string().describe("CSS className to apply to the message").optional()},Tv=ar.audio.schema.extend({...Hn,type:x.literal("audio")}),ff=ar.card.schema.extend({type:x.literal("card"),subtitle:x.string().optional(),imageUrl:x.string().optional(),...Hn}),VT=ff.omit({type:!0}),Av=x.object({items:x.array(VT),...Hn,type:x.literal("carousel")}),Pv=ar.choice.schema.extend({text:x.string(),...Hn,type:x.literal("choice"),disableFreeText:x.boolean().optional()}),Iv=ar.dropdown.schema.extend({text:x.string(),...Hn,type:x.literal("dropdown")}),Rv=ar.file.schema.extend({...Hn,type:x.literal("file")}),Mv=ar.image.schema.extend({...Hn,type:x.literal("image")}),Nv=ar.location.schema.extend({...Hn,type:x.literal("location")}),Dv=ar.markdown.schema.extend({...Hn,type:x.literal("markdown")}),jv=ar.text.schema.extend({...Hn,type:x.literal("text")}),Fv=ar.video.schema.extend({...Hn,type:x.literal("video")}),Lv=x.union([Tv,ff,Av,Pv,Iv,Rv,Mv,Nv,Dv,jv,Fv]),Bv=x.object({type:x.literal("webchat_visibility"),data:x.object({visibility:x.union([x.literal("show"),x.literal("hide"),x.literal("toggle")])})}),Uv=x.object({type:x.literal("webchat_config"),data:x.object({config:x.record(x.any())})}),zv=x.object({type:x.literal("custom"),data:x.object({event:x.record(x.any())})}),qv=x.union([Bv,Uv,zv]),WT=qv,KT=x.object({type:x.literal("message_created"),data:Lv}),GT=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:Tv,cardSchema:ff,carouselSchema:Av,choiceSchema:Pv,customSchema:zv,dropdownSchema:Iv,fileSchema:Rv,imageSchema:Mv,locationSchema:Nv,markdownSchema:Dv,messageCreatedSchema:KT,messageSchema:Lv,textSchema:jv,triggerSchema:qv,triggerSignalSchema:WT,videoSchema:Fv,webchatConfigSchema:Uv,webchatVisibilitySchema:Bv},Symbol.toStringTag,{value:"Module"})),sr=x.object({className:x.string().optional(),avatarUrl:x.string().url().optional()}),Hv=sr.extend({type:x.literal("audio"),audio:x.string(),title:x.string().optional()}),ZT=x.union([x.object({title:x.string(),action:x.literal("Say something"),text:x.string()}),x.object({title:x.string(),action:x.literal("Open URL"),url:x.string()}),x.object({title:x.string(),action:x.literal("Postback"),payload:x.string()})]),df=sr.extend({type:x.literal("card"),title:x.string(),subtitle:x.string().optional(),image:x.string().optional(),actions:x.array(ZT)}),Vv=sr.extend({type:x.literal("carousel"),items:x.array(df)}),Wv=sr.extend({type:x.literal("dropdown"),message:x.string().optional(),options:x.array(x.object({label:x.string(),value:x.string()})),allowCreation:x.boolean().optional(),placeholderText:x.string().optional(),allowMultiple:x.boolean().optional(),buttonText:x.string().optional(),width:x.number().optional(),displayInKeyboard:x.boolean().optional(),markdown:x.boolean().optional(),text:x.string().optional()}),Kv=sr.extend({type:x.literal("file"),file:x.string(),title:x.string().optional()}),Gv=sr.extend({type:x.literal("image"),image:x.string()}),Zv=sr.extend({type:x.literal("location"),latitude:x.number(),longitude:x.number(),address:x.string().optional(),title:x.string().optional()}),Yv=sr.extend({type:x.literal("single-choice"),text:x.string(),disableFreeText:x.boolean().optional(),choices:x.array(x.object({title:x.string(),value:x.string()}))}),Jv=sr.extend({type:x.literal("text"),text:x.string(),markdown:x.boolean().optional()}),Xv=sr.extend({type:x.literal("video"),video:x.string(),title:x.string().optional()}),Qv=x.object({type:x.literal("quick_reply"),text:x.string(),payload:x.string().optional()}),uc=x.union([Hv,df,Vv,Wv,Kv,Gv,Zv,Yv,Jv,Xv,Qv]),eg=x.object({type:x.literal("webchat-visibility"),visibility:x.union([x.literal("show"),x.literal("hide"),x.literal("toggle")])}),tg=x.object({type:x.literal("webchat-config"),config:x.record(x.any())}),ng=x.object({type:x.literal("custom-event"),event:x.record(x.any())}),rg=x.union([eg,tg,ng]),YT=x.object({type:x.literal("trigger"),trigger:rg}),JT=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:Hv,cardSchema:df,carouselSchame:Vv,customEventSchema:ng,dropdownSchema:Wv,fileSchema:Kv,imageSchema:Gv,locationSchema:Zv,messageSchema:uc,messageSignalSchema:uc,quickReplySchema:Qv,singleChoiceSchema:Yv,textSchema:Jv,triggerSchema:rg,triggerSignalSchema:YT,videoSchema:Xv,webchatConfigSchema:tg,webchatVisibilitySchema:eg},Symbol.toStringTag,{value:"Module"})),XT=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));let fc;const QT=new Uint8Array(16);function eA(){if(!fc&&(fc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!fc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return fc(QT)}const Ht=[];for(let e=0;e<256;++e)Ht.push((e+256).toString(16).slice(1));function tA(e,t=0){return Ht[e[t+0]]+Ht[e[t+1]]+Ht[e[t+2]]+Ht[e[t+3]]+"-"+Ht[e[t+4]]+Ht[e[t+5]]+"-"+Ht[e[t+6]]+Ht[e[t+7]]+"-"+Ht[e[t+8]]+Ht[e[t+9]]+"-"+Ht[e[t+10]]+Ht[e[t+11]]+Ht[e[t+12]]+Ht[e[t+13]]+Ht[e[t+14]]+Ht[e[t+15]]}const og={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function dc(e,t,n){if(og.randomUUID&&!t&&!e)return og.randomUUID();e=e||{};const r=e.random||(e.rng||eA)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=r[o];return t}return tA(r)}const pc=e=>({block:e,type:"bubble"}),nA=e=>e.action==="Say something"?{type:"button",variant:"action",text:e.title,buttonValue:e.text,reusable:!0}:e.action==="Open URL"?{type:"button",variant:"link",text:e.title,buttonValue:e.url,reusable:!0}:{type:"button",variant:"action",text:e.title,buttonValue:e.payload,reusable:!0},ig=({title:e,image:t,actions:n,subtitle:r})=>{const o=[];return t&&o.push({type:"image",url:t}),e&&o.push({type:"text",text:`## ${e}`}),r&&o.push({type:"text",text:r}),n.length>0&&o.push({type:"row",blocks:n.map(nA)}),{type:"column",horizontalAlignment:"center",blocks:[...o]}},rA=({choices:e,text:t})=>{const n=dc(),r=pc({type:"text",text:t});return e.length===0?r:{type:"column",horizontalAlignment:"left",blocks:[r,{type:"row",blocks:e.map(({title:o,value:i})=>({type:"button",variant:"action",text:o,buttonValue:i,groupId:n}))}]}},oA=({options:e,text:t})=>{const n=[{type:"dropdown",label:t??"Select an option",options:e}];return t&&n.unshift({type:"text",text:t}),{type:"column",blocks:n}},pf=({type:e,audio:t})=>({payload:{type:e,url:t}}),hf=e=>({payload:pc(ig(e))}),mf=({items:e})=>({payload:{type:"carousel",blocks:e.map(ig)}}),yf=e=>({disableInput:e.disableFreeText,payload:rA(e)}),vf=e=>({disableInput:!0,payload:pc(oA(e))}),gf=({file:e,...t})=>({payload:{url:e,...t}}),bf=({type:e,image:t})=>({payload:{type:e,url:t}}),wf=({type:e,latitude:t,longitude:n,title:r,address:o})=>({payload:{type:e,latitude:t,longitude:n,title:r??o??"View on map"}}),ag=({text:e,payload:t})=>({payload:{type:"text",text:e??t}}),hc=({type:e,text:t})=>({payload:pc({type:e,text:t})}),xf=({type:e,video:t})=>({payload:{type:e,url:t}}),Sf=e=>{switch(e.type){case"audio":return pf(e);case"card":return hf(e);case"carousel":return mf(e);case"single-choice":return yf(e);case"dropdown":return vf(e);case"file":return gf(e);case"image":return bf(e);case"location":return wf(e);case"quick_reply":return ag(e);case"text":return hc(e);case"video":return xf(e);default:throw new Error("Unsuported message type")}},iA=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:pf,cardAdapter:hf,carouselAdapter:mf,choiceAdapter:yf,dropdownAdapter:vf,fileAdapter:gf,imageAdapter:bf,locationAdapter:wf,messageAdapter:Sf,quickReplyAdapter:ag,textAdapter:hc,videoAdapter:xf},Symbol.toStringTag,{value:"Module"})),sg=e=>({type:"card",title:e.title,subtitle:e.subtitle,imageUrl:e.image,actions:e.actions.map(aA)}),aA=e=>{switch(e.action){case"Postback":return{label:e.title,action:"postback",value:e.payload};case"Open URL":return{label:e.title,action:"url",value:e.url};case"Say something":return{label:e.title,action:"say",value:e.text};default:throw new Error("Unknown action type")}},sA=e=>({...e,type:"audio",audioUrl:e.audio}),cA=e=>sg(e),lA=e=>({...e,type:"carousel",items:e.items.map(sg)}),uA=e=>({...e,type:"dropdown",text:e.message??"",options:e.options.map(t=>({label:t.label,value:t.value}))}),fA=e=>({...e,type:"file",fileUrl:e.file,title:e.title}),dA=e=>({...e,type:"image",imageUrl:e.image}),pA=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),hA=e=>({...e,type:"choice",text:e.text,options:e.choices.map(t=>({label:t.title,value:t.value})),disableFreeText:e.disableFreeText}),mA=e=>({...e,type:"text",text:e.text}),yA=e=>({...e,type:"video",videoUrl:e.video}),vA=e=>({...e,type:"text",text:e.text??e.payload}),gA=Object.freeze(Object.defineProperty({__proto__:null,messageAdapter:e=>{switch(e.type){case"audio":return sA(e);case"card":return cA(e);case"carousel":return lA(e);case"dropdown":return uA(e);case"file":return fA(e);case"image":return dA(e);case"location":return pA(e);case"single-choice":return hA(e);case"text":return mA(e);case"video":return yA(e);case"quick_reply":return vA(e);default:throw new Error("Unsuported message type")}}},Symbol.toStringTag,{value:"Module"})),cg=e=>({type:"card",title:e.title,subtitle:e.subtitle,image:e.imageUrl,actions:e.actions.map(bA)}),bA=e=>{switch(e.action){case"postback":return{title:e.label,action:"Postback",payload:e.value};case"url":return{title:e.label,action:"Open URL",url:e.value};case"say":return{title:e.label,action:"Say something",text:e.value};default:throw new Error(`Unknown action type ${e.action}`)}},Ef=e=>({...e,type:"audio",audio:e.audioUrl}),_f=e=>cg(e),$f=e=>({...e,type:"carousel",items:e.items.map(cg)}),kf=e=>({...e,type:"single-choice",text:e.text,choices:e.options.map(t=>({title:t.label,value:t.value})),disableFreeText:e.disableFreeText}),Cf=e=>({...e,type:"dropdown",message:e.text,options:e.options.map(t=>({label:t.label,value:t.value}))}),Of=e=>({...e,type:"file",file:e.fileUrl,title:e.title}),Tf=e=>({...e,type:"image",image:e.imageUrl}),Af=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),Pf=e=>({...e,type:"text",text:e.markdown,markdown:!0}),If=e=>({...e,type:"text",text:e.text,markdown:!0}),Rf=e=>({...e,type:"video",video:e.videoUrl}),wA=e=>{switch(e.type){case"audio":return Ef(e);case"card":return _f(e);case"carousel":return $f(e);case"choice":return kf(e);case"dropdown":return Cf(e);case"file":return Of(e);case"image":return Tf(e);case"location":return Af(e);case"markdown":return Pf(e);case"text":return If(e);case"video":return Rf(e);default:throw new Error("Unsuported message type")}},lg=e=>({type:"webchat-visibility",visibility:e.data.visibility}),ug=e=>({type:"webchat-config",config:e.data.config}),fg=e=>({type:"custom-event",event:e.data.event}),xA=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:Ef,cardAdapter:_f,carouselAdapter:$f,choiceAdapter:kf,customAdapter:fg,dropdownAdapter:Cf,fileAdapter:Of,imageAdapter:Tf,locationAdapter:Af,markdownAdapter:Pf,messageAdapter:wA,textAdapter:If,triggerAdapter:e=>{switch(e.type){case"webchat_visibility":return lg(e);case"webchat_config":return ug(e);case"custom":return fg(e);default:throw new Error("unknown trigger type")}},videoAdapter:Rf,webchatConfigAdapter:ug,webchatVisibilityAdapter:lg},Symbol.toStringTag,{value:"Module"})),dg=e=>{const t=Ef(e);return pf(t)},pg=e=>{const t=_f(e);return hf(t)},hg=e=>{const t=$f(e);return mf(t)},mg=e=>{const t=kf(e);return yf(t)},yg=e=>{const t=Cf(e);return vf(t)},vg=e=>{const t=Of(e);return gf(t)},gg=e=>{const t=Tf(e);return bf(t)},bg=e=>{const t=Af(e);return wf(t)},wg=e=>{const t=Pf(e);return hc(t)},xg=e=>{const t=If(e);return hc(t)},Sg=e=>{const t=Rf(e);return xf(t)},Eg=e=>{switch(e.type){case"audio":return dg(e);case"card":return pg(e);case"carousel":return hg(e);case"choice":return mg(e);case"dropdown":return yg(e);case"file":return vg(e);case"image":return gg(e);case"location":return bg(e);case"markdown":return wg(e);case"text":return xg(e);case"video":return Sg(e);default:throw new Error("Unsuported message type")}},SA=Object.freeze(Object.defineProperty({__proto__:null,messaging:JT,messagingToTarget:iA,messagingToWebChat:gA,target:XT,webchat:GT,webchatToMessaging:xA,webchatToTarget:Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:dg,cardAdapter:pg,carouselAdapter:hg,choiceAdapter:mg,dropdownAdapter:yg,fileAdapter:vg,imageAdapter:gg,locationAdapter:bg,markdownAdapter:wg,messageAdapter:Eg,textAdapter:xg,videoAdapter:Sg},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var be=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ue(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function _g(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Mf={exports:{}},Ta={};/**
1
+ (function(Te,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],E):(Te=typeof globalThis<"u"?globalThis:Te||self,E(Te.Webchat={},Te.React,Te.ReactDOM))})(this,function(Te,E,Zn){"use strict";var ofe=Object.defineProperty;var ife=(Te,E,Zn)=>E in Te?ofe(Te,E,{enumerable:!0,configurable:!0,writable:!0,value:Zn}):Te[E]=Zn;var we=(Te,E,Zn)=>(ife(Te,typeof E!="symbol"?E+"":E,Zn),Zn);function py(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const _=py(E),GC=py(Zn);var Ge;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ge||(Ge={}));var Au;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Au||(Au={}));const ye=Ge.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ur=e=>{switch(typeof e){case"undefined":return ye.undefined;case"string":return ye.string;case"number":return isNaN(e)?ye.nan:ye.number;case"boolean":return ye.boolean;case"function":return ye.function;case"bigint":return ye.bigint;case"symbol":return ye.symbol;case"object":return Array.isArray(e)?ye.array:e===null?ye.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ye.promise:typeof Map<"u"&&e instanceof Map?ye.map:typeof Set<"u"&&e instanceof Set?ye.set:typeof Date<"u"&&e instanceof Date?ye.date:ye.object;default:return ye.unknown}},se=Ge.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),ZC=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Pn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return o(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ge.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Pn.create=e=>new Pn(e);const Hi=(e,t)=>{let n;switch(e.code){case se.invalid_type:e.received===ye.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case se.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ge.jsonStringifyReplacer)}`;break;case se.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ge.joinValues(e.keys,", ")}`;break;case se.invalid_union:n="Invalid input";break;case se.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ge.joinValues(e.options)}`;break;case se.invalid_enum_value:n=`Invalid enum value. Expected ${Ge.joinValues(e.options)}, received '${e.received}'`;break;case se.invalid_arguments:n="Invalid function arguments";break;case se.invalid_return_type:n="Invalid function return type";break;case se.invalid_date:n="Invalid date";break;case se.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Ge.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case se.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case se.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case se.custom:n="Invalid input";break;case se.invalid_intersection_types:n="Intersection results could not be merged";break;case se.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case se.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ge.assertNever(e)}return{message:n}};let hy=Hi;function YC(e){hy=e}function $s(){return hy}const Os=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...o,path:i,message:o.message||s}},JC=[];function ge(e,t){const n=Os({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,$s(),Hi].filter(r=>!!r)});e.common.issues.push(n)}class Wt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return Re;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n)r.push({key:await o.key,value:await o.value});return Wt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return Re;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const Re=Object.freeze({status:"aborted"}),my=e=>({status:"dirty",value:e}),en=e=>({status:"valid",value:e}),Pu=e=>e.status==="aborted",Ru=e=>e.status==="dirty",qi=e=>e.status==="valid",ks=e=>typeof Promise<"u"&&e instanceof Promise;var Se;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Se||(Se={}));class Yn{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const vy=(e,t)=>{if(qi(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Pn(e.common.issues);return this._error=n,this._error}}};function Me(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>a.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:o}}class De{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Ur(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ur(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Wt,ctx:{common:t.parent.common,data:t.data,parsedType:Ur(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(ks(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ur(t)},i=this._parseSync({data:t,path:o.path,parent:o});return vy(o,i)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ur(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(ks(o)?o:Promise.resolve(o));return vy(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:se.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Dn({schema:this,typeName:Ce.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return wr.create(this,this._def)}nullable(){return wo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Mn.create(this,this._def)}promise(){return Ko.create(this,this._def)}or(t){return Gi.create([this,t],this._def)}and(t){return Zi.create(this,t,this._def)}transform(t){return new Dn({...Me(this._def),schema:this,typeName:Ce.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ea({...Me(this._def),innerType:this,defaultValue:n,typeName:Ce.ZodDefault})}brand(){return new gy({typeName:Ce.ZodBranded,type:this,...Me(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ps({...Me(this._def),innerType:this,catchValue:n,typeName:Ce.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return ta.create(this,t)}readonly(){return Ms.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const XC=/^c[^\s-]{8,}$/i,QC=/^[a-z][a-z0-9]*$/,eI=/^[0-9A-HJKMNP-TV-Z]{26}$/,tI=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,nI=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,rI="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Mu;const oI=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,iI=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,aI=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function sI(e,t){return!!((t==="v4"||!t)&&oI.test(e)||(t==="v6"||!t)&&iI.test(e))}class Rn extends De{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ye.string){const i=this._getOrReturnCtx(t);return ge(i,{code:se.invalid_type,expected:ye.string,received:i.parsedType}),Re}const r=new Wt;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ge(o,{code:se.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),ge(o,{code:se.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?ge(o,{code:se.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ge(o,{code:se.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")nI.test(t.data)||(o=this._getOrReturnCtx(t,o),ge(o,{validation:"email",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Mu||(Mu=new RegExp(rI,"u")),Mu.test(t.data)||(o=this._getOrReturnCtx(t,o),ge(o,{validation:"emoji",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")tI.test(t.data)||(o=this._getOrReturnCtx(t,o),ge(o,{validation:"uuid",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")XC.test(t.data)||(o=this._getOrReturnCtx(t,o),ge(o,{validation:"cuid",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")QC.test(t.data)||(o=this._getOrReturnCtx(t,o),ge(o,{validation:"cuid2",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")eI.test(t.data)||(o=this._getOrReturnCtx(t,o),ge(o,{validation:"ulid",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ge(o,{validation:"url",code:se.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ge(o,{validation:"regex",code:se.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),ge(o,{code:se.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),ge(o,{code:se.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ge(o,{code:se.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?aI(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ge(o,{code:se.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="ip"?sI(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ge(o,{validation:"ip",code:se.invalid_string,message:i.message}),r.dirty()):Ge.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:se.invalid_string,...Se.errToObj(r)})}_addCheck(t){return new Rn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Se.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Se.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Se.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Se.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Se.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Se.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Se.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Se.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...Se.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Se.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Se.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Se.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Se.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Se.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Se.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Se.errToObj(n)})}nonempty(t){return this.min(1,Se.errToObj(t))}trim(){return new Rn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Rn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Rn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Rn.create=e=>{var t;return new Rn({checks:[],typeName:Ce.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};function lI(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class zr extends De{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ye.number){const i=this._getOrReturnCtx(t);return ge(i,{code:se.invalid_type,expected:ye.number,received:i.parsedType}),Re}let r;const o=new Wt;for(const i of this._def.checks)i.kind==="int"?Ge.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ge(r,{code:se.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ge(r,{code:se.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ge(r,{code:se.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?lI(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ge(r,{code:se.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ge(r,{code:se.not_finite,message:i.message}),o.dirty()):Ge.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Se.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Se.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Se.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Se.toString(n))}setLimit(t,n,r,o){return new zr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Se.toString(o)}]})}_addCheck(t){return new zr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Se.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Se.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Se.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Se.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Se.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Se.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Se.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Se.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Se.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ge.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}zr.create=e=>new zr({checks:[],typeName:Ce.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Me(e)});class Hr extends De{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ye.bigint){const i=this._getOrReturnCtx(t);return ge(i,{code:se.invalid_type,expected:ye.bigint,received:i.parsedType}),Re}let r;const o=new Wt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ge(r,{code:se.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ge(r,{code:se.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ge(r,{code:se.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ge.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Se.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Se.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Se.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Se.toString(n))}setLimit(t,n,r,o){return new Hr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Se.toString(o)}]})}_addCheck(t){return new Hr({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Se.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Se.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Se.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Se.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Se.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Hr.create=e=>{var t;return new Hr({checks:[],typeName:Ce.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};class Wi extends De{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ye.boolean){const r=this._getOrReturnCtx(t);return ge(r,{code:se.invalid_type,expected:ye.boolean,received:r.parsedType}),Re}return en(t.data)}}Wi.create=e=>new Wi({typeName:Ce.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Me(e)});class yo extends De{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ye.date){const i=this._getOrReturnCtx(t);return ge(i,{code:se.invalid_type,expected:ye.date,received:i.parsedType}),Re}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ge(i,{code:se.invalid_date}),Re}const r=new Wt;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ge(o,{code:se.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),ge(o,{code:se.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ge.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new yo({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Se.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Se.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}yo.create=e=>new yo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ce.ZodDate,...Me(e)});class _s extends De{_parse(t){if(this._getType(t)!==ye.symbol){const r=this._getOrReturnCtx(t);return ge(r,{code:se.invalid_type,expected:ye.symbol,received:r.parsedType}),Re}return en(t.data)}}_s.create=e=>new _s({typeName:Ce.ZodSymbol,...Me(e)});class Vi extends De{_parse(t){if(this._getType(t)!==ye.undefined){const r=this._getOrReturnCtx(t);return ge(r,{code:se.invalid_type,expected:ye.undefined,received:r.parsedType}),Re}return en(t.data)}}Vi.create=e=>new Vi({typeName:Ce.ZodUndefined,...Me(e)});class Ki extends De{_parse(t){if(this._getType(t)!==ye.null){const r=this._getOrReturnCtx(t);return ge(r,{code:se.invalid_type,expected:ye.null,received:r.parsedType}),Re}return en(t.data)}}Ki.create=e=>new Ki({typeName:Ce.ZodNull,...Me(e)});class qo extends De{constructor(){super(...arguments),this._any=!0}_parse(t){return en(t.data)}}qo.create=e=>new qo({typeName:Ce.ZodAny,...Me(e)});class go extends De{constructor(){super(...arguments),this._unknown=!0}_parse(t){return en(t.data)}}go.create=e=>new go({typeName:Ce.ZodUnknown,...Me(e)});class br extends De{_parse(t){const n=this._getOrReturnCtx(t);return ge(n,{code:se.invalid_type,expected:ye.never,received:n.parsedType}),Re}}br.create=e=>new br({typeName:Ce.ZodNever,...Me(e)});class Ts extends De{_parse(t){if(this._getType(t)!==ye.undefined){const r=this._getOrReturnCtx(t);return ge(r,{code:se.invalid_type,expected:ye.void,received:r.parsedType}),Re}return en(t.data)}}Ts.create=e=>new Ts({typeName:Ce.ZodVoid,...Me(e)});class Mn extends De{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ye.array)return ge(n,{code:se.invalid_type,expected:ye.array,received:n.parsedType}),Re;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ge(n,{code:a?se.too_big:se.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ge(n,{code:se.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ge(n,{code:se.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>o.type._parseAsync(new Yn(n,a,n.path,s)))).then(a=>Wt.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Yn(n,a,n.path,s)));return Wt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Mn({...this._def,minLength:{value:t,message:Se.toString(n)}})}max(t,n){return new Mn({...this._def,maxLength:{value:t,message:Se.toString(n)}})}length(t,n){return new Mn({...this._def,exactLength:{value:t,message:Se.toString(n)}})}nonempty(t){return this.min(1,t)}}Mn.create=(e,t)=>new Mn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ce.ZodArray,...Me(t)});function Wo(e){if(e instanceof mt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=wr.create(Wo(r))}return new mt({...e._def,shape:()=>t})}else return e instanceof Mn?new Mn({...e._def,type:Wo(e.element)}):e instanceof wr?wr.create(Wo(e.unwrap())):e instanceof wo?wo.create(Wo(e.unwrap())):e instanceof Jn?Jn.create(e.items.map(t=>Wo(t))):e}class mt extends De{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Ge.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ye.object){const c=this._getOrReturnCtx(t);return ge(c,{code:se.invalid_type,expected:ye.object,received:c.parsedType}),Re}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof br&&this._def.unknownKeys==="strip"))for(const c in o.data)a.includes(c)||s.push(c);const l=[];for(const c of a){const u=i[c],f=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Yn(o,f,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof br){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")s.length>0&&(ge(o,{code:se.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const f=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Yn(o,f,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const f=await u.key;c.push({key:f,value:await u.value,alwaysSet:u.alwaysSet})}return c}).then(c=>Wt.mergeObjectSync(r,c)):Wt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Se.errToObj,new mt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,s;const l=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Se.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new mt({...this._def,unknownKeys:"strip"})}passthrough(){return new mt({...this._def,unknownKeys:"passthrough"})}extend(t){return new mt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new mt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ce.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new mt({...this._def,catchall:t})}pick(t){const n={};return Ge.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new mt({...this._def,shape:()=>n})}omit(t){const n={};return Ge.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new mt({...this._def,shape:()=>n})}deepPartial(){return Wo(this)}partial(t){const n={};return Ge.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new mt({...this._def,shape:()=>n})}required(t){const n={};return Ge.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof wr;)i=i._def.innerType;n[r]=i}}),new mt({...this._def,shape:()=>n})}keyof(){return yy(Ge.objectKeys(this.shape))}}mt.create=(e,t)=>new mt({shape:()=>e,unknownKeys:"strip",catchall:br.create(),typeName:Ce.ZodObject,...Me(t)}),mt.strictCreate=(e,t)=>new mt({shape:()=>e,unknownKeys:"strict",catchall:br.create(),typeName:Ce.ZodObject,...Me(t)}),mt.lazycreate=(e,t)=>new mt({shape:e,unknownKeys:"strip",catchall:br.create(),typeName:Ce.ZodObject,...Me(t)});class Gi extends De{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new Pn(s.ctx.common.issues));return ge(n,{code:se.invalid_union,unionErrors:a}),Re}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(l=>new Pn(l));return ge(n,{code:se.invalid_union,unionErrors:s}),Re}}get options(){return this._def.options}}Gi.create=(e,t)=>new Gi({options:e,typeName:Ce.ZodUnion,...Me(t)});const Cs=e=>e instanceof Ji?Cs(e.schema):e instanceof Dn?Cs(e.innerType()):e instanceof Xi?[e.value]:e instanceof qr?e.options:e instanceof Qi?Object.keys(e.enum):e instanceof ea?Cs(e._def.innerType):e instanceof Vi?[void 0]:e instanceof Ki?[null]:null;class Is extends De{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.object)return ge(n,{code:se.invalid_type,expected:ye.object,received:n.parsedType}),Re;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ge(n,{code:se.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Re)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=Cs(i.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new Is({typeName:Ce.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Me(r)})}}function Du(e,t){const n=Ur(e),r=Ur(t);if(e===t)return{valid:!0,data:e};if(n===ye.object&&r===ye.object){const o=Ge.objectKeys(t),i=Ge.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=Du(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===ye.array&&r===ye.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],l=Du(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ye.date&&r===ye.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Zi extends De{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(Pu(i)||Pu(a))return Re;const s=Du(i.value,a.value);return s.valid?((Ru(i)||Ru(a))&&n.dirty(),{status:n.value,value:s.data}):(ge(r,{code:se.invalid_intersection_types}),Re)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Zi.create=(e,t,n)=>new Zi({left:e,right:t,typeName:Ce.ZodIntersection,...Me(n)});class Jn extends De{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.array)return ge(r,{code:se.invalid_type,expected:ye.array,received:r.parsedType}),Re;if(r.data.length<this._def.items.length)return ge(r,{code:se.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Re;!this._def.rest&&r.data.length>this._def.items.length&&(ge(r,{code:se.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Yn(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Wt.mergeArray(n,a)):Wt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Jn({...this._def,rest:t})}}Jn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Jn({items:e,typeName:Ce.ZodTuple,rest:null,...Me(t)})};class Yi extends De{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.object)return ge(r,{code:se.invalid_type,expected:ye.object,received:r.parsedType}),Re;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new Yn(r,s,r.path,s)),value:a._parse(new Yn(r,r.data[s],r.path,s))});return r.common.async?Wt.mergeObjectAsync(n,o):Wt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof De?new Yi({keyType:t,valueType:n,typeName:Ce.ZodRecord,...Me(r)}):new Yi({keyType:Rn.create(),valueType:t,typeName:Ce.ZodRecord,...Me(n)})}}class As extends De{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.map)return ge(r,{code:se.invalid_type,expected:ye.map,received:r.parsedType}),Re;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Yn(r,s,r.path,[c,"key"])),value:i._parse(new Yn(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Re;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Re;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}As.create=(e,t,n)=>new As({valueType:t,keyType:e,typeName:Ce.ZodMap,...Me(n)});class bo extends De{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.set)return ge(r,{code:se.invalid_type,expected:ye.set,received:r.parsedType}),Re;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ge(r,{code:se.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ge(r,{code:se.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Re;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>i._parse(new Yn(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new bo({...this._def,minSize:{value:t,message:Se.toString(n)}})}max(t,n){return new bo({...this._def,maxSize:{value:t,message:Se.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}bo.create=(e,t)=>new bo({valueType:e,minSize:null,maxSize:null,typeName:Ce.ZodSet,...Me(t)});class Vo extends De{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.function)return ge(n,{code:se.invalid_type,expected:ye.function,received:n.parsedType}),Re;function r(s,l){return Os({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,$s(),Hi].filter(c=>!!c),issueData:{code:se.invalid_arguments,argumentsError:l}})}function o(s,l){return Os({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,$s(),Hi].filter(c=>!!c),issueData:{code:se.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Ko){const s=this;return en(async function(...l){const c=new Pn([]),u=await s._def.args.parseAsync(l,i).catch(d=>{throw c.addIssue(r(l,d)),c}),f=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(f,i).catch(d=>{throw c.addIssue(o(f,d)),c})})}else{const s=this;return en(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new Pn([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),f=s._def.returns.safeParse(u,i);if(!f.success)throw new Pn([o(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Vo({...this._def,args:Jn.create(t).rest(go.create())})}returns(t){return new Vo({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Vo({args:t||Jn.create([]).rest(go.create()),returns:n||go.create(),typeName:Ce.ZodFunction,...Me(r)})}}class Ji extends De{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Ji.create=(e,t)=>new Ji({getter:e,typeName:Ce.ZodLazy,...Me(t)});class Xi extends De{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ge(n,{received:n.data,code:se.invalid_literal,expected:this._def.value}),Re}return{status:"valid",value:t.data}}get value(){return this._def.value}}Xi.create=(e,t)=>new Xi({value:e,typeName:Ce.ZodLiteral,...Me(t)});function yy(e,t){return new qr({values:e,typeName:Ce.ZodEnum,...Me(t)})}class qr extends De{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ge(n,{expected:Ge.joinValues(r),received:n.parsedType,code:se.invalid_type}),Re}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return ge(n,{received:n.data,code:se.invalid_enum_value,options:r}),Re}return en(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return qr.create(t)}exclude(t){return qr.create(this.options.filter(n=>!t.includes(n)))}}qr.create=yy;class Qi extends De{_parse(t){const n=Ge.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ye.string&&r.parsedType!==ye.number){const o=Ge.objectValues(n);return ge(r,{expected:Ge.joinValues(o),received:r.parsedType,code:se.invalid_type}),Re}if(n.indexOf(t.data)===-1){const o=Ge.objectValues(n);return ge(r,{received:r.data,code:se.invalid_enum_value,options:o}),Re}return en(t.data)}get enum(){return this._def.values}}Qi.create=(e,t)=>new Qi({values:e,typeName:Ce.ZodNativeEnum,...Me(t)});class Ko extends De{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.promise&&n.common.async===!1)return ge(n,{code:se.invalid_type,expected:ye.promise,received:n.parsedType}),Re;const r=n.parsedType===ye.promise?n.data:Promise.resolve(n.data);return en(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ko.create=(e,t)=>new Ko({type:e,typeName:Ce.ZodPromise,...Me(t)});class Dn extends De{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ce.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{ge(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(a).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}if(o.type==="refinement"){const a=s=>{const l=o.refinement(s,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Re:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Re:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!qi(a))return a;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>qi(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);Ge.assertNever(o)}}Dn.create=(e,t,n)=>new Dn({schema:e,typeName:Ce.ZodEffects,effect:t,...Me(n)}),Dn.createWithPreprocess=(e,t,n)=>new Dn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ce.ZodEffects,...Me(n)});class wr extends De{_parse(t){return this._getType(t)===ye.undefined?en(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}wr.create=(e,t)=>new wr({innerType:e,typeName:Ce.ZodOptional,...Me(t)});class wo extends De{_parse(t){return this._getType(t)===ye.null?en(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}wo.create=(e,t)=>new wo({innerType:e,typeName:Ce.ZodNullable,...Me(t)});class ea extends De{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ye.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ea.create=(e,t)=>new ea({innerType:e,typeName:Ce.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Me(t)});class Ps extends De{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return ks(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Pn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Pn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ps.create=(e,t)=>new Ps({innerType:e,typeName:Ce.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Me(t)});class Rs extends De{_parse(t){if(this._getType(t)!==ye.nan){const r=this._getOrReturnCtx(t);return ge(r,{code:se.invalid_type,expected:ye.nan,received:r.parsedType}),Re}return{status:"valid",value:t.data}}}Rs.create=e=>new Rs({typeName:Ce.ZodNaN,...Me(e)});const cI=Symbol("zod_brand");class gy extends De{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class ta extends De{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Re:i.status==="dirty"?(n.dirty(),my(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Re:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new ta({in:t,out:n,typeName:Ce.ZodPipeline})}}class Ms extends De{_parse(t){const n=this._def.innerType._parse(t);return qi(n)&&(n.value=Object.freeze(n.value)),n}}Ms.create=(e,t)=>new Ms({innerType:e,typeName:Ce.ZodReadonly,...Me(t)});const by=(e,t={},n)=>e?qo.create().superRefine((r,o)=>{var i,a;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(a=(i=s.fatal)!==null&&i!==void 0?i:n)!==null&&a!==void 0?a:!0,c=typeof s=="string"?{message:s}:s;o.addIssue({code:"custom",...c,fatal:l})}}):qo.create(),uI={object:mt.lazycreate};var Ce;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ce||(Ce={}));const fI=(e,t={message:`Input not instance of ${e.name}`})=>by(n=>n instanceof e,t),wy=Rn.create,xy=zr.create,dI=Rs.create,pI=Hr.create,Sy=Wi.create,hI=yo.create,mI=_s.create,vI=Vi.create,yI=Ki.create,gI=qo.create,bI=go.create,wI=br.create,xI=Ts.create,SI=Mn.create,EI=mt.create,$I=mt.strictCreate,OI=Gi.create,kI=Is.create,_I=Zi.create,TI=Jn.create,CI=Yi.create,II=As.create,AI=bo.create,PI=Vo.create,RI=Ji.create,MI=Xi.create,DI=qr.create,jI=Qi.create,NI=Ko.create,Ey=Dn.create,LI=wr.create,FI=wo.create,BI=Dn.createWithPreprocess,UI=ta.create;var w=Object.freeze({__proto__:null,defaultErrorMap:Hi,setErrorMap:YC,getErrorMap:$s,makeIssue:Os,EMPTY_PATH:JC,addIssueToContext:ge,ParseStatus:Wt,INVALID:Re,DIRTY:my,OK:en,isAborted:Pu,isDirty:Ru,isValid:qi,isAsync:ks,get util(){return Ge},get objectUtil(){return Au},ZodParsedType:ye,getParsedType:Ur,ZodType:De,ZodString:Rn,ZodNumber:zr,ZodBigInt:Hr,ZodBoolean:Wi,ZodDate:yo,ZodSymbol:_s,ZodUndefined:Vi,ZodNull:Ki,ZodAny:qo,ZodUnknown:go,ZodNever:br,ZodVoid:Ts,ZodArray:Mn,ZodObject:mt,ZodUnion:Gi,ZodDiscriminatedUnion:Is,ZodIntersection:Zi,ZodTuple:Jn,ZodRecord:Yi,ZodMap:As,ZodSet:bo,ZodFunction:Vo,ZodLazy:Ji,ZodLiteral:Xi,ZodEnum:qr,ZodNativeEnum:Qi,ZodPromise:Ko,ZodEffects:Dn,ZodTransformer:Dn,ZodOptional:wr,ZodNullable:wo,ZodDefault:ea,ZodCatch:Ps,ZodNaN:Rs,BRAND:cI,ZodBranded:gy,ZodPipeline:ta,ZodReadonly:Ms,custom:by,Schema:De,ZodSchema:De,late:uI,get ZodFirstPartyTypeKind(){return Ce},coerce:{string:e=>Rn.create({...e,coerce:!0}),number:e=>zr.create({...e,coerce:!0}),boolean:e=>Wi.create({...e,coerce:!0}),bigint:e=>Hr.create({...e,coerce:!0}),date:e=>yo.create({...e,coerce:!0})},any:gI,array:SI,bigint:pI,boolean:Sy,date:hI,discriminatedUnion:kI,effect:Ey,enum:DI,function:PI,instanceof:fI,intersection:_I,lazy:RI,literal:MI,map:II,nan:dI,nativeEnum:jI,never:wI,null:yI,nullable:FI,number:xy,object:EI,oboolean:()=>Sy().optional(),onumber:()=>xy().optional(),optional:LI,ostring:()=>wy().optional(),pipeline:UI,preprocess:BI,promise:NI,record:CI,set:AI,strictObject:$I,string:wy,symbol:mI,transformer:Ey,tuple:TI,undefined:vI,union:OI,unknown:bI,void:xI,NEVER:Re,ZodIssueCode:se,quotelessJson:ZC,ZodError:Pn});const tn=w.string().min(1),$y=w.object({text:tn}),Oy=w.object({markdown:tn}),ky=w.object({imageUrl:tn}),_y=w.object({audioUrl:tn}),Ty=w.object({videoUrl:tn}),Cy=w.object({fileUrl:tn,title:tn.optional()}),Iy=w.object({latitude:w.number(),longitude:w.number(),address:w.string().optional(),title:w.string().optional()}),Ay=w.object({title:tn,subtitle:tn.optional(),imageUrl:tn.optional(),actions:w.array(w.object({action:w.enum(["postback","url","say"]),label:tn,value:tn}))}),Py=w.object({text:tn,options:w.array(w.object({label:tn,value:tn}))}),zI=w.object({items:w.array(Ay)}),HI=w.discriminatedUnion("type",[w.object({type:w.literal("text"),payload:$y}),w.object({type:w.literal("markdown"),payload:Oy}),w.object({type:w.literal("image"),payload:ky}),w.object({type:w.literal("audio"),payload:_y}),w.object({type:w.literal("video"),payload:Ty}),w.object({type:w.literal("file"),payload:Cy}),w.object({type:w.literal("location"),payload:Iy})]),qI=w.object({items:w.array(HI)}),jn={text:{schema:$y},markdown:{schema:Oy},image:{schema:ky},audio:{schema:_y},video:{schema:Ty},file:{schema:Cy},location:{schema:Iy},carousel:{schema:zI},card:{schema:Ay},dropdown:{schema:Py},choice:{schema:Py},bloc:{schema:qI}},En={className:w.string().describe("CSS className to apply to the message").optional()},Ry=jn.audio.schema.extend({...En,type:w.literal("audio")}),ju=jn.card.schema.extend({type:w.literal("card"),subtitle:w.string().optional(),imageUrl:w.string().optional(),...En}),WI=ju.omit({type:!0}),My=w.object({items:w.array(WI),...En,type:w.literal("carousel")}),Dy=jn.choice.schema.extend({text:w.string(),...En,type:w.literal("choice"),disableFreeText:w.boolean().optional()}),jy=jn.dropdown.schema.extend({text:w.string(),...En,type:w.literal("dropdown")}),Ny=jn.file.schema.extend({...En,type:w.literal("file")}),Ly=jn.image.schema.extend({...En,type:w.literal("image")}),Fy=jn.location.schema.extend({...En,type:w.literal("location")}),By=jn.markdown.schema.extend({...En,type:w.literal("markdown")}),Uy=jn.text.schema.extend({...En,type:w.literal("text")}),zy=jn.video.schema.extend({...En,type:w.literal("video")}),Hy=jn.bloc.schema.extend({...En,type:w.literal("bloc")}),qy=w.union([Ry,ju,My,Dy,jy,Ny,Ly,Fy,By,Uy,zy,Hy]),Wy=w.object({type:w.literal("webchat_visibility"),data:w.object({visibility:w.union([w.literal("show"),w.literal("hide"),w.literal("toggle")])})}),Vy=w.object({type:w.literal("webchat_config"),data:w.object({config:w.record(w.any())})}),Ky=w.object({type:w.literal("custom"),data:w.object({event:w.record(w.any())})}),Gy=w.union([Wy,Vy,Ky]),VI=Gy,KI=w.object({type:w.literal("message_created"),data:qy}),GI=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:Ry,blocSchema:Hy,cardSchema:ju,carouselSchema:My,choiceSchema:Dy,customSchema:Ky,dropdownSchema:jy,fileSchema:Ny,imageSchema:Ly,locationSchema:Fy,markdownSchema:By,messageCreatedSchema:KI,messageSchema:qy,textSchema:Uy,triggerSchema:Gy,triggerSignalSchema:VI,videoSchema:zy,webchatConfigSchema:Vy,webchatVisibilitySchema:Wy},Symbol.toStringTag,{value:"Module"})),Xn=w.object({className:w.string().optional(),avatarUrl:w.string().url().optional()}),Zy=Xn.extend({type:w.literal("audio"),audio:w.string(),title:w.string().optional()}),ZI=w.union([w.object({title:w.string(),action:w.literal("Say something"),text:w.string()}),w.object({title:w.string(),action:w.literal("Open URL"),url:w.string()}),w.object({title:w.string(),action:w.literal("Postback"),payload:w.string()})]),Nu=Xn.extend({type:w.literal("card"),title:w.string(),subtitle:w.string().optional(),image:w.string().optional(),actions:w.array(ZI)}),Yy=Xn.extend({type:w.literal("carousel"),items:w.array(Nu)}),Jy=Xn.extend({type:w.literal("dropdown"),message:w.string().optional(),options:w.array(w.object({label:w.string(),value:w.string()})),allowCreation:w.boolean().optional(),placeholderText:w.string().optional(),allowMultiple:w.boolean().optional(),buttonText:w.string().optional(),width:w.number().optional(),displayInKeyboard:w.boolean().optional(),markdown:w.boolean().optional(),text:w.string().optional()}),Xy=Xn.extend({type:w.literal("file"),file:w.string(),title:w.string().optional()}),Qy=Xn.extend({type:w.literal("image"),image:w.string()}),eg=Xn.extend({type:w.literal("location"),latitude:w.number(),longitude:w.number(),address:w.string().optional(),title:w.string().optional()}),tg=Xn.extend({type:w.literal("single-choice"),text:w.string(),disableFreeText:w.boolean().optional(),choices:w.array(w.object({title:w.string(),value:w.string()}))}),ng=Xn.extend({type:w.literal("text"),text:w.string(),markdown:w.boolean().optional()}),rg=Xn.extend({type:w.literal("video"),video:w.string(),title:w.string().optional()}),og=w.object({type:w.literal("quick_reply"),text:w.string(),payload:w.string().optional()}),ig=w.union([Zy,Nu,Yy,Jy,Xy,Qy,eg,tg,ng,rg,og]),ag=w.object({type:w.literal("webchat-visibility"),visibility:w.union([w.literal("show"),w.literal("hide"),w.literal("toggle")])}),sg=w.object({type:w.literal("webchat-config"),config:w.record(w.any())}),lg=w.object({type:w.literal("custom-event"),event:w.record(w.any())}),cg=w.union([ag,sg,lg]),YI=w.object({type:w.literal("trigger"),trigger:cg}),JI=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:Zy,cardSchema:Nu,carouselSchame:Yy,customEventSchema:lg,dropdownSchema:Jy,fileSchema:Xy,imageSchema:Qy,locationSchema:eg,messageSchema:ig,messageSignalSchema:ig,quickReplySchema:og,singleChoiceSchema:tg,textSchema:ng,triggerSchema:cg,triggerSignalSchema:YI,videoSchema:rg,webchatConfigSchema:sg,webchatVisibilitySchema:ag},Symbol.toStringTag,{value:"Module"})),XI=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));let Ds;const QI=new Uint8Array(16);function eA(){if(!Ds&&(Ds=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ds))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ds(QI)}const Bt=[];for(let e=0;e<256;++e)Bt.push((e+256).toString(16).slice(1));function tA(e,t=0){return Bt[e[t+0]]+Bt[e[t+1]]+Bt[e[t+2]]+Bt[e[t+3]]+"-"+Bt[e[t+4]]+Bt[e[t+5]]+"-"+Bt[e[t+6]]+Bt[e[t+7]]+"-"+Bt[e[t+8]]+Bt[e[t+9]]+"-"+Bt[e[t+10]]+Bt[e[t+11]]+Bt[e[t+12]]+Bt[e[t+13]]+Bt[e[t+14]]+Bt[e[t+15]]}const ug={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function na(e,t,n){if(ug.randomUUID&&!t&&!e)return ug.randomUUID();e=e||{};const r=e.random||(e.rng||eA)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=r[o];return t}return tA(r)}const js=e=>({block:e,type:"bubble"}),nA=e=>e.action==="Say something"?{type:"button",variant:"action",text:e.title,buttonValue:e.text,reusable:!0}:e.action==="Open URL"?{type:"button",variant:"link",text:e.title,buttonValue:e.url,reusable:!0}:{type:"button",variant:"action",text:e.title,buttonValue:e.payload,reusable:!0},fg=({title:e,image:t,actions:n,subtitle:r})=>{const o=[];return t&&o.push({type:"image",url:t}),e&&o.push({type:"text",text:`## ${e}`}),r&&o.push({type:"text",text:r}),n.length>0&&o.push({type:"row",blocks:n.map(nA)}),{type:"column",horizontalAlignment:"center",blocks:[...o]}},rA=({choices:e,text:t})=>{const n=na(),r=js({type:"text",text:t});return e.length===0?r:{type:"column",horizontalAlignment:"left",blocks:[r,{type:"row",blocks:e.map(({title:o,value:i})=>({type:"button",variant:"action",text:o,buttonValue:i,groupId:n}))}]}},oA=({options:e,text:t})=>{const n=[{type:"dropdown",label:t??"Select an option",options:e}];return t&&n.unshift({type:"text",text:t}),{type:"column",blocks:n}},Lu=({type:e,audio:t})=>({payload:{type:e,url:t}}),Fu=e=>({payload:js(fg(e))}),Bu=({items:e})=>({payload:{type:"carousel",blocks:e.map(fg)}}),Uu=e=>({disableInput:e.disableFreeText,payload:rA(e)}),zu=e=>({disableInput:!0,payload:js(oA(e))}),Hu=({file:e,...t})=>({payload:{url:e,...t}}),qu=({type:e,image:t})=>({payload:{type:e,url:t}}),Wu=({type:e,latitude:t,longitude:n,title:r,address:o})=>({payload:{type:e,latitude:t,longitude:n,title:r??o??"View on map"}}),dg=({text:e,payload:t})=>({payload:{type:"text",text:e??t}}),Ns=({type:e,text:t})=>({payload:js({type:e,text:t})}),Vu=({type:e,video:t})=>({payload:{type:e,url:t}}),iA=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:Lu,cardAdapter:Fu,carouselAdapter:Bu,choiceAdapter:Uu,dropdownAdapter:zu,fileAdapter:Hu,imageAdapter:qu,locationAdapter:Wu,messageAdapter:e=>{switch(e.type){case"audio":return Lu(e);case"card":return Fu(e);case"carousel":return Bu(e);case"single-choice":return Uu(e);case"dropdown":return zu(e);case"file":return Hu(e);case"image":return qu(e);case"location":return Wu(e);case"quick_reply":return dg(e);case"text":return Ns(e);case"video":return Vu(e);default:throw new Error("Unsuported message type")}},quickReplyAdapter:dg,textAdapter:Ns,videoAdapter:Vu},Symbol.toStringTag,{value:"Module"})),pg=e=>({type:"card",title:e.title,subtitle:e.subtitle,imageUrl:e.image,actions:e.actions.map(aA)}),aA=e=>{switch(e.action){case"Postback":return{label:e.title,action:"postback",value:e.payload};case"Open URL":return{label:e.title,action:"url",value:e.url};case"Say something":return{label:e.title,action:"say",value:e.text};default:throw new Error("Unknown action type")}},sA=e=>({...e,type:"audio",audioUrl:e.audio}),lA=e=>pg(e),cA=e=>({...e,type:"carousel",items:e.items.map(pg)}),uA=e=>({...e,type:"dropdown",text:e.message??"",options:e.options.map(t=>({label:t.label,value:t.value}))}),fA=e=>({...e,type:"file",fileUrl:e.file,title:e.title}),dA=e=>({...e,type:"image",imageUrl:e.image}),pA=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),hA=e=>({...e,type:"choice",text:e.text,options:e.choices.map(t=>({label:t.title,value:t.value})),disableFreeText:e.disableFreeText}),mA=e=>({...e,type:"text",text:e.text}),vA=e=>({...e,type:"video",videoUrl:e.video}),yA=e=>({...e,type:"text",text:e.text??e.payload}),gA=Object.freeze(Object.defineProperty({__proto__:null,messageAdapter:e=>{switch(e.type){case"audio":return sA(e);case"card":return lA(e);case"carousel":return cA(e);case"dropdown":return uA(e);case"file":return fA(e);case"image":return dA(e);case"location":return pA(e);case"single-choice":return hA(e);case"text":return mA(e);case"video":return vA(e);case"quick_reply":return yA(e);default:throw new Error("Unsuported message type")}}},Symbol.toStringTag,{value:"Module"})),hg=e=>({type:"card",title:e.title,subtitle:e.subtitle,image:e.imageUrl,actions:e.actions.map(bA)}),bA=e=>{switch(e.action){case"postback":return{title:e.label,action:"Postback",payload:e.value};case"url":return{title:e.label,action:"Open URL",url:e.value};case"say":return{title:e.label,action:"Say something",text:e.value};default:throw new Error(`Unknown action type ${e.action}`)}},Ku=e=>({...e,type:"audio",audio:e.audioUrl}),Gu=e=>hg(e),Zu=e=>({...e,type:"carousel",items:e.items.map(hg)}),Yu=e=>({...e,type:"single-choice",text:e.text,choices:e.options.map(t=>({title:t.label,value:t.value})),disableFreeText:e.disableFreeText}),Ju=e=>({...e,type:"dropdown",message:e.text,options:e.options.map(t=>({label:t.label,value:t.value}))}),Xu=e=>({...e,type:"file",file:e.fileUrl,title:e.title}),Qu=e=>({...e,type:"image",image:e.imageUrl}),ef=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),tf=e=>({...e,type:"text",text:e.markdown,markdown:!0}),nf=e=>({...e,type:"text",text:e.text,markdown:!0}),rf=e=>({...e,type:"video",video:e.videoUrl}),wA=e=>{switch(e.type){case"audio":return Ku(e);case"card":return Gu(e);case"carousel":return Zu(e);case"choice":return Yu(e);case"dropdown":return Ju(e);case"file":return Xu(e);case"image":return Qu(e);case"location":return ef(e);case"markdown":return tf(e);case"text":return nf(e);case"video":return rf(e);default:throw new Error("Unsuported message type")}},mg=e=>({type:"webchat-visibility",visibility:e.data.visibility}),vg=e=>({type:"webchat-config",config:e.data.config}),yg=e=>({type:"custom-event",event:e.data.event}),xA=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:Ku,cardAdapter:Gu,carouselAdapter:Zu,choiceAdapter:Yu,customAdapter:yg,dropdownAdapter:Ju,fileAdapter:Xu,imageAdapter:Qu,locationAdapter:ef,markdownAdapter:tf,messageAdapter:wA,textAdapter:nf,triggerAdapter:e=>{switch(e.type){case"webchat_visibility":return mg(e);case"webchat_config":return vg(e);case"custom":return yg(e);default:throw new Error("unknown trigger type")}},videoAdapter:rf,webchatConfigAdapter:vg,webchatVisibilityAdapter:mg},Symbol.toStringTag,{value:"Module"})),of=e=>{const t=Ku(e);return Lu(t)},gg=e=>{const t=Gu(e);return Fu(t)},bg=e=>{const t=Zu(e);return Bu(t)},wg=e=>{const t=Yu(e);return Uu(t)},xg=e=>{const t=Ju(e);return zu(t)},af=e=>{const t=Xu(e);return Hu(t)},sf=e=>{const t=Qu(e);return qu(t)},lf=e=>{const t=ef(e);return Wu(t)},cf=e=>{const t=tf(e);return Ns(t)},uf=e=>{const t=nf(e);return Ns(t)},ff=e=>{const t=rf(e);return Vu(t)},Sg=e=>({payload:{type:"column",blocks:e.items.map(n=>{switch(n.type){case"audio":return of({...n.payload,type:n.type}).payload;case"file":return af({...n.payload,type:n.type}).payload;case"image":return sf({...n.payload,type:n.type}).payload;case"location":return lf({...n.payload,type:n.type}).payload;case"markdown":return cf({...n.payload,type:n.type}).payload;case"text":return uf({...n.payload,type:n.type}).payload;case"video":return ff({...n.payload,type:n.type}).payload;default:throw new Error("Unsuported message type")}})}}),ra=e=>{switch(e.type){case"audio":return of(e);case"card":return gg(e);case"carousel":return bg(e);case"choice":return wg(e);case"dropdown":return xg(e);case"file":return af(e);case"image":return sf(e);case"location":return lf(e);case"markdown":return cf(e);case"text":return uf(e);case"video":return ff(e);case"bloc":return Sg(e);default:throw new Error("Unsuported message type")}},SA=Object.freeze(Object.defineProperty({__proto__:null,messaging:JI,messagingToTarget:iA,messagingToWebChat:gA,target:XI,webchat:GI,webchatToMessaging:xA,webchatToTarget:Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:of,blocAdapter:Sg,cardAdapter:gg,carouselAdapter:bg,choiceAdapter:wg,dropdownAdapter:xg,fileAdapter:af,imageAdapter:sf,locationAdapter:lf,markdownAdapter:cf,messageAdapter:ra,textAdapter:uf,videoAdapter:ff},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var Xe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Le(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function EA(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var df={exports:{}},oa={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var $g;function EA(){if($g)return Ta;$g=1;var e=E,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(s,c,l){var u,f={},p=null,d=null;l!==void 0&&(p=""+l),c.key!==void 0&&(p=""+c.key),c.ref!==void 0&&(d=c.ref);for(u in c)r.call(c,u)&&!i.hasOwnProperty(u)&&(f[u]=c[u]);if(s&&s.defaultProps)for(u in c=s.defaultProps,c)f[u]===void 0&&(f[u]=c[u]);return{$$typeof:t,type:s,key:p,ref:d,props:f,_owner:o.current}}return Ta.Fragment=n,Ta.jsx=a,Ta.jsxs=a,Ta}var Aa={};/**
9
+ */var Eg;function $A(){if(Eg)return oa;Eg=1;var e=E,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(s,l,c){var u,f={},p=null,d=null;c!==void 0&&(p=""+c),l.key!==void 0&&(p=""+l.key),l.ref!==void 0&&(d=l.ref);for(u in l)r.call(l,u)&&!i.hasOwnProperty(u)&&(f[u]=l[u]);if(s&&s.defaultProps)for(u in l=s.defaultProps,l)f[u]===void 0&&(f[u]=l[u]);return{$$typeof:t,type:s,key:p,ref:d,props:f,_owner:o.current}}return oa.Fragment=n,oa.jsx=a,oa.jsxs=a,oa}var ia={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,58 +14,58 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var kg;function _A(){return kg||(kg=1,process.env.NODE_ENV!=="production"&&function(){var e=E,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),h=Symbol.iterator,m="@@iterator";function v(A){if(A===null||typeof A!="object")return null;var ne=h&&A[h]||A[m];return typeof ne=="function"?ne:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(A){{for(var ne=arguments.length,ye=new Array(ne>1?ne-1:0),Re=1;Re<ne;Re++)ye[Re-1]=arguments[Re];b("error",A,ye)}}function b(A,ne,ye){{var Re=y.ReactDebugCurrentFrame,Qe=Re.getStackAddendum();Qe!==""&&(ne+="%s",ye=ye.concat([Qe]));var ft=ye.map(function(Ke){return String(Ke)});ft.unshift("Warning: "+ne),Function.prototype.apply.call(console[A],console,ft)}}var k=!1,S=!1,$=!1,T=!1,R=!1,B;B=Symbol.for("react.module.reference");function O(A){return!!(typeof A=="string"||typeof A=="function"||A===r||A===i||R||A===o||A===l||A===u||T||A===d||k||S||$||typeof A=="object"&&A!==null&&(A.$$typeof===p||A.$$typeof===f||A.$$typeof===a||A.$$typeof===s||A.$$typeof===c||A.$$typeof===B||A.getModuleId!==void 0))}function M(A,ne,ye){var Re=A.displayName;if(Re)return Re;var Qe=ne.displayName||ne.name||"";return Qe!==""?ye+"("+Qe+")":ye}function H(A){return A.displayName||"Context"}function L(A){if(A==null)return null;if(typeof A.tag=="number"&&g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof A=="function")return A.displayName||A.name||null;if(typeof A=="string")return A;switch(A){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case u:return"SuspenseList"}if(typeof A=="object")switch(A.$$typeof){case s:var ne=A;return H(ne)+".Consumer";case a:var ye=A;return H(ye._context)+".Provider";case c:return M(A,A.render,"ForwardRef");case f:var Re=A.displayName||null;return Re!==null?Re:L(A.type)||"Memo";case p:{var Qe=A,ft=Qe._payload,Ke=Qe._init;try{return L(Ke(ft))}catch{return null}}}return null}var P=Object.assign,N=0,j,W,V,D,w,z,K;function _(){}_.__reactDisabledLog=!0;function J(){{if(N===0){j=console.log,W=console.info,V=console.warn,D=console.error,w=console.group,z=console.groupCollapsed,K=console.groupEnd;var A={configurable:!0,enumerable:!0,value:_,writable:!0};Object.defineProperties(console,{info:A,log:A,warn:A,error:A,group:A,groupCollapsed:A,groupEnd:A})}N++}}function ae(){{if(N--,N===0){var A={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:P({},A,{value:j}),info:P({},A,{value:W}),warn:P({},A,{value:V}),error:P({},A,{value:D}),group:P({},A,{value:w}),groupCollapsed:P({},A,{value:z}),groupEnd:P({},A,{value:K})})}N<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var re=y.ReactCurrentDispatcher,le;function pe(A,ne,ye){{if(le===void 0)try{throw Error()}catch(Qe){var Re=Qe.stack.trim().match(/\n( *(at )?)/);le=Re&&Re[1]||""}return`
18
- `+le+A}}var me=!1,ce;{var Q=typeof WeakMap=="function"?WeakMap:Map;ce=new Q}function G(A,ne){if(!A||me)return"";{var ye=ce.get(A);if(ye!==void 0)return ye}var Re;me=!0;var Qe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ft;ft=re.current,re.current=null,J();try{if(ne){var Ke=function(){throw Error()};if(Object.defineProperty(Ke.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ke,[])}catch(Yr){Re=Yr}Reflect.construct(A,[],Ke)}else{try{Ke.call()}catch(Yr){Re=Yr}A.call(Ke.prototype)}}else{try{throw Error()}catch(Yr){Re=Yr}A()}}catch(Yr){if(Yr&&Re&&typeof Yr.stack=="string"){for(var He=Yr.stack.split(`
19
- `),fn=Re.stack.split(`
20
- `),St=He.length-1,Ct=fn.length-1;St>=1&&Ct>=0&&He[St]!==fn[Ct];)Ct--;for(;St>=1&&Ct>=0;St--,Ct--)if(He[St]!==fn[Ct]){if(St!==1||Ct!==1)do if(St--,Ct--,Ct<0||He[St]!==fn[Ct]){var Ln=`
21
- `+He[St].replace(" at new "," at ");return A.displayName&&Ln.includes("<anonymous>")&&(Ln=Ln.replace("<anonymous>",A.displayName)),typeof A=="function"&&ce.set(A,Ln),Ln}while(St>=1&&Ct>=0);break}}}finally{me=!1,re.current=ft,ae(),Error.prepareStackTrace=Qe}var ha=A?A.displayName||A.name:"",KO=ha?pe(ha):"";return typeof A=="function"&&ce.set(A,KO),KO}function fe(A,ne,ye){return G(A,!1)}function ve(A){var ne=A.prototype;return!!(ne&&ne.isReactComponent)}function _e(A,ne,ye){if(A==null)return"";if(typeof A=="function")return G(A,ve(A));if(typeof A=="string")return pe(A);switch(A){case l:return pe("Suspense");case u:return pe("SuspenseList")}if(typeof A=="object")switch(A.$$typeof){case c:return fe(A.render);case f:return _e(A.type,ne,ye);case p:{var Re=A,Qe=Re._payload,ft=Re._init;try{return _e(ft(Qe),ne,ye)}catch{}}}return""}var I=Object.prototype.hasOwnProperty,X={},oe=y.ReactDebugCurrentFrame;function ee(A){if(A){var ne=A._owner,ye=_e(A.type,A._source,ne?ne.type:null);oe.setExtraStackFrame(ye)}else oe.setExtraStackFrame(null)}function Se(A,ne,ye,Re,Qe){{var ft=Function.call.bind(I);for(var Ke in A)if(ft(A,Ke)){var He=void 0;try{if(typeof A[Ke]!="function"){var fn=Error((Re||"React class")+": "+ye+" type `"+Ke+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof A[Ke]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw fn.name="Invariant Violation",fn}He=A[Ke](ne,Ke,Re,ye,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(St){He=St}He&&!(He instanceof Error)&&(ee(Qe),g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Re||"React class",ye,Ke,typeof He),ee(null)),He instanceof Error&&!(He.message in X)&&(X[He.message]=!0,ee(Qe),g("Failed %s type: %s",ye,He.message),ee(null))}}}var xe=Array.isArray;function ke(A){return xe(A)}function Fe(A){{var ne=typeof Symbol=="function"&&Symbol.toStringTag,ye=ne&&A[Symbol.toStringTag]||A.constructor.name||"Object";return ye}}function Te(A){try{return U(A),!1}catch{return!0}}function U(A){return""+A}function Z(A){if(Te(A))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Fe(A)),U(A)}var q=y.ReactCurrentOwner,te={key:!0,ref:!0,__self:!0,__source:!0},de,Ie,Ce;Ce={};function Be(A){if(I.call(A,"ref")){var ne=Object.getOwnPropertyDescriptor(A,"ref").get;if(ne&&ne.isReactWarning)return!1}return A.ref!==void 0}function ut(A){if(I.call(A,"key")){var ne=Object.getOwnPropertyDescriptor(A,"key").get;if(ne&&ne.isReactWarning)return!1}return A.key!==void 0}function Nt(A,ne){if(typeof A.ref=="string"&&q.current&&ne&&q.current.stateNode!==ne){var ye=L(q.current.type);Ce[ye]||(g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',L(q.current.type),A.ref),Ce[ye]=!0)}}function ot(A,ne){{var ye=function(){de||(de=!0,g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ne))};ye.isReactWarning=!0,Object.defineProperty(A,"key",{get:ye,configurable:!0})}}function nt(A,ne){{var ye=function(){Ie||(Ie=!0,g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ne))};ye.isReactWarning=!0,Object.defineProperty(A,"ref",{get:ye,configurable:!0})}}var pt=function(A,ne,ye,Re,Qe,ft,Ke){var He={$$typeof:t,type:A,key:ne,ref:ye,props:Ke,_owner:ft};return He._store={},Object.defineProperty(He._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(He,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Re}),Object.defineProperty(He,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Qe}),Object.freeze&&(Object.freeze(He.props),Object.freeze(He)),He};function ht(A,ne,ye,Re,Qe){{var ft,Ke={},He=null,fn=null;ye!==void 0&&(Z(ye),He=""+ye),ut(ne)&&(Z(ne.key),He=""+ne.key),Be(ne)&&(fn=ne.ref,Nt(ne,Qe));for(ft in ne)I.call(ne,ft)&&!te.hasOwnProperty(ft)&&(Ke[ft]=ne[ft]);if(A&&A.defaultProps){var St=A.defaultProps;for(ft in St)Ke[ft]===void 0&&(Ke[ft]=St[ft])}if(He||fn){var Ct=typeof A=="function"?A.displayName||A.name||"Unknown":A;He&&ot(Ke,Ct),fn&&nt(Ke,Ct)}return pt(A,He,fn,Qe,Re,q.current,Ke)}}var wn=y.ReactCurrentOwner,Pn=y.ReactDebugCurrentFrame;function er(A){if(A){var ne=A._owner,ye=_e(A.type,A._source,ne?ne.type:null);Pn.setExtraStackFrame(ye)}else Pn.setExtraStackFrame(null)}var Gr;Gr=!1;function Or(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function tr(){{if(wn.current){var A=L(wn.current.type);if(A)return`
17
+ */var $g;function OA(){return $g||($g=1,process.env.NODE_ENV!=="production"&&function(){var e=E,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),h=Symbol.iterator,m="@@iterator";function y(I){if(I===null||typeof I!="object")return null;var ne=h&&I[h]||I[m];return typeof ne=="function"?ne:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(I){{for(var ne=arguments.length,me=new Array(ne>1?ne-1:0),Pe=1;Pe<ne;Pe++)me[Pe-1]=arguments[Pe];b("error",I,me)}}function b(I,ne,me){{var Pe=v.ReactDebugCurrentFrame,Je=Pe.getStackAddendum();Je!==""&&(ne+="%s",me=me.concat([Je]));var ut=me.map(function(We){return String(We)});ut.unshift("Warning: "+ne),Function.prototype.apply.call(console[I],console,ut)}}var k=!1,S=!1,$=!1,C=!1,P=!1,F;F=Symbol.for("react.module.reference");function T(I){return!!(typeof I=="string"||typeof I=="function"||I===r||I===i||P||I===o||I===c||I===u||C||I===d||k||S||$||typeof I=="object"&&I!==null&&(I.$$typeof===p||I.$$typeof===f||I.$$typeof===a||I.$$typeof===s||I.$$typeof===l||I.$$typeof===F||I.getModuleId!==void 0))}function M(I,ne,me){var Pe=I.displayName;if(Pe)return Pe;var Je=ne.displayName||ne.name||"";return Je!==""?me+"("+Je+")":me}function q(I){return I.displayName||"Context"}function B(I){if(I==null)return null;if(typeof I.tag=="number"&&g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof I=="function")return I.displayName||I.name||null;if(typeof I=="string")return I;switch(I){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof I=="object")switch(I.$$typeof){case s:var ne=I;return q(ne)+".Consumer";case a:var me=I;return q(me._context)+".Provider";case l:return M(I,I.render,"ForwardRef");case f:var Pe=I.displayName||null;return Pe!==null?Pe:B(I.type)||"Memo";case p:{var Je=I,ut=Je._payload,We=Je._init;try{return B(We(ut))}catch{return null}}}return null}var A=Object.assign,D=0,N,V,W,j,x,z,K;function O(){}O.__reactDisabledLog=!0;function J(){{if(D===0){N=console.log,V=console.info,W=console.warn,j=console.error,x=console.group,z=console.groupCollapsed,K=console.groupEnd;var I={configurable:!0,enumerable:!0,value:O,writable:!0};Object.defineProperties(console,{info:I,log:I,warn:I,error:I,group:I,groupCollapsed:I,groupEnd:I})}D++}}function ae(){{if(D--,D===0){var I={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},I,{value:N}),info:A({},I,{value:V}),warn:A({},I,{value:W}),error:A({},I,{value:j}),group:A({},I,{value:x}),groupCollapsed:A({},I,{value:z}),groupEnd:A({},I,{value:K})})}D<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var re=v.ReactCurrentDispatcher,ce;function pe(I,ne,me){{if(ce===void 0)try{throw Error()}catch(Je){var Pe=Je.stack.trim().match(/\n( *(at )?)/);ce=Pe&&Pe[1]||""}return`
18
+ `+ce+I}}var he=!1,le;{var Q=typeof WeakMap=="function"?WeakMap:Map;le=new Q}function G(I,ne){if(!I||he)return"";{var me=le.get(I);if(me!==void 0)return me}var Pe;he=!0;var Je=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ut;ut=re.current,re.current=null,J();try{if(ne){var We=function(){throw Error()};if(Object.defineProperty(We.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(We,[])}catch(Br){Pe=Br}Reflect.construct(I,[],We)}else{try{We.call()}catch(Br){Pe=Br}I.call(We.prototype)}}else{try{throw Error()}catch(Br){Pe=Br}I()}}catch(Br){if(Br&&Pe&&typeof Br.stack=="string"){for(var ze=Br.stack.split(`
19
+ `),on=Pe.stack.split(`
20
+ `),wt=ze.length-1,Ot=on.length-1;wt>=1&&Ot>=0&&ze[wt]!==on[Ot];)Ot--;for(;wt>=1&&Ot>=0;wt--,Ot--)if(ze[wt]!==on[Ot]){if(wt!==1||Ot!==1)do if(wt--,Ot--,Ot<0||ze[wt]!==on[Ot]){var An=`
21
+ `+ze[wt].replace(" at new "," at ");return I.displayName&&An.includes("<anonymous>")&&(An=An.replace("<anonymous>",I.displayName)),typeof I=="function"&&le.set(I,An),An}while(wt>=1&&Ot>=0);break}}}finally{he=!1,re.current=ut,ae(),Error.prepareStackTrace=Je}var zi=I?I.displayName||I.name:"",KC=zi?pe(zi):"";return typeof I=="function"&&le.set(I,KC),KC}function fe(I,ne,me){return G(I,!1)}function ve(I){var ne=I.prototype;return!!(ne&&ne.isReactComponent)}function Ee(I,ne,me){if(I==null)return"";if(typeof I=="function")return G(I,ve(I));if(typeof I=="string")return pe(I);switch(I){case c:return pe("Suspense");case u:return pe("SuspenseList")}if(typeof I=="object")switch(I.$$typeof){case l:return fe(I.render);case f:return Ee(I.type,ne,me);case p:{var Pe=I,Je=Pe._payload,ut=Pe._init;try{return Ee(ut(Je),ne,me)}catch{}}}return""}var R=Object.prototype.hasOwnProperty,X={},oe=v.ReactDebugCurrentFrame;function ee(I){if(I){var ne=I._owner,me=Ee(I.type,I._source,ne?ne.type:null);oe.setExtraStackFrame(me)}else oe.setExtraStackFrame(null)}function xe(I,ne,me,Pe,Je){{var ut=Function.call.bind(R);for(var We in I)if(ut(I,We)){var ze=void 0;try{if(typeof I[We]!="function"){var on=Error((Pe||"React class")+": "+me+" type `"+We+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof I[We]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw on.name="Invariant Violation",on}ze=I[We](ne,We,Pe,me,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(wt){ze=wt}ze&&!(ze instanceof Error)&&(ee(Je),g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Pe||"React class",me,We,typeof ze),ee(null)),ze instanceof Error&&!(ze.message in X)&&(X[ze.message]=!0,ee(Je),g("Failed %s type: %s",me,ze.message),ee(null))}}}var be=Array.isArray;function Oe(I){return be(I)}function Ne(I){{var ne=typeof Symbol=="function"&&Symbol.toStringTag,me=ne&&I[Symbol.toStringTag]||I.constructor.name||"Object";return me}}function _e(I){try{return U(I),!1}catch{return!0}}function U(I){return""+I}function Z(I){if(_e(I))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ne(I)),U(I)}var H=v.ReactCurrentOwner,te={key:!0,ref:!0,__self:!0,__source:!0},de,Ae,ke;ke={};function Be(I){if(R.call(I,"ref")){var ne=Object.getOwnPropertyDescriptor(I,"ref").get;if(ne&&ne.isReactWarning)return!1}return I.ref!==void 0}function ct(I){if(R.call(I,"key")){var ne=Object.getOwnPropertyDescriptor(I,"key").get;if(ne&&ne.isReactWarning)return!1}return I.key!==void 0}function Pt(I,ne){if(typeof I.ref=="string"&&H.current&&ne&&H.current.stateNode!==ne){var me=B(H.current.type);ke[me]||(g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',B(H.current.type),I.ref),ke[me]=!0)}}function rt(I,ne){{var me=function(){de||(de=!0,g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ne))};me.isReactWarning=!0,Object.defineProperty(I,"key",{get:me,configurable:!0})}}function tt(I,ne){{var me=function(){Ae||(Ae=!0,g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ne))};me.isReactWarning=!0,Object.defineProperty(I,"ref",{get:me,configurable:!0})}}var dt=function(I,ne,me,Pe,Je,ut,We){var ze={$$typeof:t,type:I,key:ne,ref:me,props:We,_owner:ut};return ze._store={},Object.defineProperty(ze._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ze,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Pe}),Object.defineProperty(ze,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Je}),Object.freeze&&(Object.freeze(ze.props),Object.freeze(ze)),ze};function pt(I,ne,me,Pe,Je){{var ut,We={},ze=null,on=null;me!==void 0&&(Z(me),ze=""+me),ct(ne)&&(Z(ne.key),ze=""+ne.key),Be(ne)&&(on=ne.ref,Pt(ne,Je));for(ut in ne)R.call(ne,ut)&&!te.hasOwnProperty(ut)&&(We[ut]=ne[ut]);if(I&&I.defaultProps){var wt=I.defaultProps;for(ut in wt)We[ut]===void 0&&(We[ut]=wt[ut])}if(ze||on){var Ot=typeof I=="function"?I.displayName||I.name||"Unknown":I;ze&&rt(We,Ot),on&&tt(We,Ot)}return dt(I,ze,on,Je,Pe,H.current,We)}}var dn=v.ReactCurrentOwner,Sn=v.ReactDebugCurrentFrame;function Vn(I){if(I){var ne=I._owner,me=Ee(I.type,I._source,ne?ne.type:null);Sn.setExtraStackFrame(me)}else Sn.setExtraStackFrame(null)}var Lr;Lr=!1;function gr(I){return typeof I=="object"&&I!==null&&I.$$typeof===t}function Kn(){{if(dn.current){var I=B(dn.current.type);if(I)return`
22
22
 
23
- Check the render method of \``+A+"`."}return""}}function Zr(A){{if(A!==void 0){var ne=A.fileName.replace(/^.*[\\\/]/,""),ye=A.lineNumber;return`
23
+ Check the render method of \``+I+"`."}return""}}function Fr(I){{if(I!==void 0){var ne=I.fileName.replace(/^.*[\\\/]/,""),me=I.lineNumber;return`
24
24
 
25
- Check your code at `+ne+":"+ye+"."}return""}}var it={};function mt(A){{var ne=tr();if(!ne){var ye=typeof A=="string"?A:A.displayName||A.name;ye&&(ne=`
25
+ Check your code at `+ne+":"+me+"."}return""}}var ot={};function ht(I){{var ne=Kn();if(!ne){var me=typeof I=="string"?I:I.displayName||I.name;me&&(ne=`
26
26
 
27
- Check the top-level render call using <`+ye+">.")}return ne}}function Dt(A,ne){{if(!A._store||A._store.validated||A.key!=null)return;A._store.validated=!0;var ye=mt(ne);if(it[ye])return;it[ye]=!0;var Re="";A&&A._owner&&A._owner!==wn.current&&(Re=" It was passed a child from "+L(A._owner.type)+"."),er(A),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ye,Re),er(null)}}function jt(A,ne){{if(typeof A!="object")return;if(ke(A))for(var ye=0;ye<A.length;ye++){var Re=A[ye];Or(Re)&&Dt(Re,ne)}else if(Or(A))A._store&&(A._store.validated=!0);else if(A){var Qe=v(A);if(typeof Qe=="function"&&Qe!==A.entries)for(var ft=Qe.call(A),Ke;!(Ke=ft.next()).done;)Or(Ke.value)&&Dt(Ke.value,ne)}}}function Zt(A){{var ne=A.type;if(ne==null||typeof ne=="string")return;var ye;if(typeof ne=="function")ye=ne.propTypes;else if(typeof ne=="object"&&(ne.$$typeof===c||ne.$$typeof===f))ye=ne.propTypes;else return;if(ye){var Re=L(ne);Se(ye,A.props,"prop",Re,A)}else if(ne.PropTypes!==void 0&&!Gr){Gr=!0;var Qe=L(ne);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Qe||"Unknown")}typeof ne.getDefaultProps=="function"&&!ne.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ft(A){{for(var ne=Object.keys(A.props),ye=0;ye<ne.length;ye++){var Re=ne[ye];if(Re!=="children"&&Re!=="key"){er(A),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Re),er(null);break}}A.ref!==null&&(er(A),g("Invalid attribute `ref` supplied to `React.Fragment`."),er(null))}}function Fn(A,ne,ye,Re,Qe,ft){{var Ke=O(A);if(!Ke){var He="";(A===void 0||typeof A=="object"&&A!==null&&Object.keys(A).length===0)&&(He+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var fn=Zr(Qe);fn?He+=fn:He+=tr();var St;A===null?St="null":ke(A)?St="array":A!==void 0&&A.$$typeof===t?(St="<"+(L(A.type)||"Unknown")+" />",He=" Did you accidentally export a JSX literal instead of a component?"):St=typeof A,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",St,He)}var Ct=ht(A,ne,ye,Qe,ft);if(Ct==null)return Ct;if(Ke){var Ln=ne.children;if(Ln!==void 0)if(Re)if(ke(Ln)){for(var ha=0;ha<Ln.length;ha++)jt(Ln[ha],A);Object.freeze&&Object.freeze(Ln)}else g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else jt(Ln,A)}return A===r?Ft(Ct):Zt(Ct),Ct}}function nr(A,ne,ye){return Fn(A,ne,ye,!0)}function To(A,ne,ye){return Fn(A,ne,ye,!1)}var Qce=To,ele=nr;Aa.Fragment=r,Aa.jsx=Qce,Aa.jsxs=ele}()),Aa}process.env.NODE_ENV==="production"?Mf.exports=EA():Mf.exports=_A();var F=Mf.exports;function Ot(){return Ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ot.apply(this,arguments)}function Nf(e,t=[]){let n=[];function r(i,a){const s=E.createContext(a),c=n.length;n=[...n,a];function l(f){const{scope:p,children:d,...h}=f,m=(p==null?void 0:p[e][c])||s,v=E.useMemo(()=>h,Object.values(h));return E.createElement(m.Provider,{value:v},d)}function u(f,p){const d=(p==null?void 0:p[e][c])||s,h=E.useContext(d);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const o=()=>{const i=n.map(a=>E.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return E.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,$A(o,...t)]}function $A(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:c,scopeName:l})=>{const f=c(i)[`__scope${l}`];return{...s,...f}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function to(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const Pa=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{};function no(){return no=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},no.apply(null,arguments)}function kA(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Cg(...e){return t=>e.forEach(n=>kA(n,t))}function Mo(...e){return E.useCallback(Cg(...e),e)}const Df=E.forwardRef((e,t)=>{const{children:n,...r}=e,o=E.Children.toArray(n),i=o.find(OA);if(i){const a=i.props.children,s=o.map(c=>c===i?E.Children.count(a)>1?E.Children.only(null):E.isValidElement(a)?a.props.children:null:c);return E.createElement(jf,no({},r,{ref:t}),E.isValidElement(a)?E.cloneElement(a,void 0,s):null)}return E.createElement(jf,no({},r,{ref:t}),n)});Df.displayName="Slot";const jf=E.forwardRef((e,t)=>{const{children:n,...r}=e;return E.isValidElement(n)?E.cloneElement(n,{...TA(r,n.props),ref:t?Cg(t,n.ref):n.ref}):E.Children.count(n)>1?E.Children.only(null):null});jf.displayName="SlotClone";const CA=({children:e})=>E.createElement(E.Fragment,null,e);function OA(e){return E.isValidElement(e)&&e.type===CA}function TA(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const In=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=E.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Df:t;return E.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),E.createElement(s,no({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function AA(e,t){e&&rr.flushSync(()=>e.dispatchEvent(t))}const Og="Avatar",[PA,hle]=Nf(Og),[IA,Tg]=PA(Og),Ag=E.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,i]=E.useState("idle");return E.createElement(IA,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:i},E.createElement(In.span,Ot({},r,{ref:t})))}),RA="AvatarImage",Pg=E.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...i}=e,a=Tg(RA,n),s=NA(r),c=to(l=>{o(l),a.onImageLoadingStatusChange(l)});return Pa(()=>{s!=="idle"&&c(s)},[s,c]),s==="loaded"?E.createElement(In.img,Ot({},i,{ref:t,src:r})):null}),MA="AvatarFallback",Ig=E.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,i=Tg(MA,n),[a,s]=E.useState(r===void 0);return E.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(c)}},[r]),a&&i.imageLoadingStatus!=="loaded"?E.createElement(In.span,Ot({},o,{ref:t})):null});function NA(e){const[t,n]=E.useState("idle");return E.useEffect(()=>{if(!e){n("error");return}let r=!0;const o=new window.Image,i=a=>()=>{r&&n(a)};return n("loading"),o.onload=i("loaded"),o.onerror=i("error"),o.src=e,()=>{r=!1}},[e]),t}function Ff(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const n=e.replace(/^#/,"");let r=n;n.length===3&&(r=n.split("").map(c=>c+c).join(""));const o=parseInt(r,16),i=o>>16&255,a=o>>8&255,s=o&255;return{r:i,g:a,b:s}}function DA(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const jA=(e,t=30)=>{const n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b,n+1);return{r:Math.floor((e.r-n)/(r-n)*t*(1-.299)+120-t/2),g:Math.floor((e.g-n)/(r-n)*t*(1-.587)+120-t/2),b:Math.floor((e.b-n)/(r-n)*t*(1-.114)+120-t/2)}};function Rg(e){return Object.entries(e).reduce((t,[n,r])=>{const o=n.replace(/(\d+)/,i=>(1e3-parseInt(i)).toString());return{...t,[o]:r}},{})}const FA=2.4,LA=.2126729,BA=.7151522,UA=.072175,zA=.56,qA=.57,HA=.62,VA=.65,mc=.022,Mg=1.414,WA=1.14,KA=1.14,GA=.035991,ZA=.035991,YA=27.7847239587675,JA=27.7847239587675,Ng=.027,Dg=.027,jg=.001,XA=5e-4;function Fg(e){const{r:t,g:n,b:r}=e,o=i=>(i/255)**FA;return LA*o(t)+BA*o(n)+UA*o(r)}function Lg(e,t){if(!e||!t)return 0;let n=Fg(Ff(e)),r=Fg(Ff(t)),o=0,i=0;return n=n>mc?n:n+(mc-n)**Mg,r=r>mc?r:r+(mc-r)**Mg,Math.abs(r-n)<XA?0:(r>n?(o=(r**zA-n**qA)*WA,i=o<jg?0:o<GA?o-o*YA*Ng:o-Ng):(o=(r**VA-n**HA)*KA,i=o>-jg?0:o>-ZA?o-o*JA*Dg:o+Dg),Math.abs(i*100))}let Lf=class{constructor(){he(this,"eventMap");this.eventMap={}}on(t,n){var r;return this.eventMap[t]||(this.eventMap[t]=new Set),(r=this.eventMap[t])==null||r.add(n),()=>{var o;(o=this.eventMap[t])==null||o.delete(n)}}emit(t,n){var r,o;(r=this.eventMap[t])==null||r.forEach(i=>{i(n)}),(o=this.eventMap["*"])==null||o.forEach(i=>{i({type:t,payload:n})})}};const QA=new Lf;function Bg(e,t){let n=`${e} {`;for(const[r,o]of Object.entries(t))n+=`${r}: ${o}; `;return n+="}",n}function Ug(e,t){let n=0;if(e.length==0)return n;for(let r=0;r<e.length;r++){const o=e.charCodeAt(r);n=(n<<5)-n+o,n=n&n}return Math.abs(n)%t}var zg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(be,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",s="minute",c="hour",l="day",u="week",f="month",p="quarter",d="year",h="date",m="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(P){var N=["th","st","nd","rd"],j=P%100;return"["+P+(N[(j-20)%10]||N[j]||N[0])+"]"}},b=function(P,N,j){var W=String(P);return!W||W.length>=N?P:""+Array(N+1-W.length).join(j)+P},k={s:b,z:function(P){var N=-P.utcOffset(),j=Math.abs(N),W=Math.floor(j/60),V=j%60;return(N<=0?"+":"-")+b(W,2,"0")+":"+b(V,2,"0")},m:function P(N,j){if(N.date()<j.date())return-P(j,N);var W=12*(j.year()-N.year())+(j.month()-N.month()),V=N.clone().add(W,f),D=j-V<0,w=N.clone().add(W+(D?-1:1),f);return+(-(W+(j-V)/(D?V-w:w-V))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:f,y:d,w:u,d:l,D:h,h:c,m:s,s:a,ms:i,Q:p}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},S="en",$={};$[S]=g;var T="$isDayjsObject",R=function(P){return P instanceof H||!(!P||!P[T])},B=function P(N,j,W){var V;if(!N)return S;if(typeof N=="string"){var D=N.toLowerCase();$[D]&&(V=D),j&&($[D]=j,V=D);var w=N.split("-");if(!V&&w.length>1)return P(w[0])}else{var z=N.name;$[z]=N,V=z}return!W&&V&&(S=V),V||!W&&S},O=function(P,N){if(R(P))return P.clone();var j=typeof N=="object"?N:{};return j.date=P,j.args=arguments,new H(j)},M=k;M.l=B,M.i=R,M.w=function(P,N){return O(P,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var H=function(){function P(j){this.$L=B(j.locale,null,!0),this.parse(j),this.$x=this.$x||j.x||{},this[T]=!0}var N=P.prototype;return N.parse=function(j){this.$d=function(W){var V=W.date,D=W.utc;if(V===null)return new Date(NaN);if(M.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var w=V.match(v);if(w){var z=w[2]-1||0,K=(w[7]||"0").substring(0,3);return D?new Date(Date.UTC(w[1],z,w[3]||1,w[4]||0,w[5]||0,w[6]||0,K)):new Date(w[1],z,w[3]||1,w[4]||0,w[5]||0,w[6]||0,K)}}return new Date(V)}(j),this.init()},N.init=function(){var j=this.$d;this.$y=j.getFullYear(),this.$M=j.getMonth(),this.$D=j.getDate(),this.$W=j.getDay(),this.$H=j.getHours(),this.$m=j.getMinutes(),this.$s=j.getSeconds(),this.$ms=j.getMilliseconds()},N.$utils=function(){return M},N.isValid=function(){return this.$d.toString()!==m},N.isSame=function(j,W){var V=O(j);return this.startOf(W)<=V&&V<=this.endOf(W)},N.isAfter=function(j,W){return O(j)<this.startOf(W)},N.isBefore=function(j,W){return this.endOf(W)<O(j)},N.$g=function(j,W,V){return M.u(j)?this[W]:this.set(V,j)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(j,W){var V=this,D=!!M.u(W)||W,w=M.p(j),z=function(me,ce){var Q=M.w(V.$u?Date.UTC(V.$y,ce,me):new Date(V.$y,ce,me),V);return D?Q:Q.endOf(l)},K=function(me,ce){return M.w(V.toDate()[me].apply(V.toDate("s"),(D?[0,0,0,0]:[23,59,59,999]).slice(ce)),V)},_=this.$W,J=this.$M,ae=this.$D,re="set"+(this.$u?"UTC":"");switch(w){case d:return D?z(1,0):z(31,11);case f:return D?z(1,J):z(0,J+1);case u:var le=this.$locale().weekStart||0,pe=(_<le?_+7:_)-le;return z(D?ae-pe:ae+(6-pe),J);case l:case h:return K(re+"Hours",0);case c:return K(re+"Minutes",1);case s:return K(re+"Seconds",2);case a:return K(re+"Milliseconds",3);default:return this.clone()}},N.endOf=function(j){return this.startOf(j,!1)},N.$set=function(j,W){var V,D=M.p(j),w="set"+(this.$u?"UTC":""),z=(V={},V[l]=w+"Date",V[h]=w+"Date",V[f]=w+"Month",V[d]=w+"FullYear",V[c]=w+"Hours",V[s]=w+"Minutes",V[a]=w+"Seconds",V[i]=w+"Milliseconds",V)[D],K=D===l?this.$D+(W-this.$W):W;if(D===f||D===d){var _=this.clone().set(h,1);_.$d[z](K),_.init(),this.$d=_.set(h,Math.min(this.$D,_.daysInMonth())).$d}else z&&this.$d[z](K);return this.init(),this},N.set=function(j,W){return this.clone().$set(j,W)},N.get=function(j){return this[M.p(j)]()},N.add=function(j,W){var V,D=this;j=Number(j);var w=M.p(W),z=function(J){var ae=O(D);return M.w(ae.date(ae.date()+Math.round(J*j)),D)};if(w===f)return this.set(f,this.$M+j);if(w===d)return this.set(d,this.$y+j);if(w===l)return z(1);if(w===u)return z(7);var K=(V={},V[s]=r,V[c]=o,V[a]=n,V)[w]||1,_=this.$d.getTime()+j*K;return M.w(_,this)},N.subtract=function(j,W){return this.add(-1*j,W)},N.format=function(j){var W=this,V=this.$locale();if(!this.isValid())return V.invalidDate||m;var D=j||"YYYY-MM-DDTHH:mm:ssZ",w=M.z(this),z=this.$H,K=this.$m,_=this.$M,J=V.weekdays,ae=V.months,re=V.meridiem,le=function(ce,Q,G,fe){return ce&&(ce[Q]||ce(W,D))||G[Q].slice(0,fe)},pe=function(ce){return M.s(z%12||12,ce,"0")},me=re||function(ce,Q,G){var fe=ce<12?"AM":"PM";return G?fe.toLowerCase():fe};return D.replace(y,function(ce,Q){return Q||function(G){switch(G){case"YY":return String(W.$y).slice(-2);case"YYYY":return M.s(W.$y,4,"0");case"M":return _+1;case"MM":return M.s(_+1,2,"0");case"MMM":return le(V.monthsShort,_,ae,3);case"MMMM":return le(ae,_);case"D":return W.$D;case"DD":return M.s(W.$D,2,"0");case"d":return String(W.$W);case"dd":return le(V.weekdaysMin,W.$W,J,2);case"ddd":return le(V.weekdaysShort,W.$W,J,3);case"dddd":return J[W.$W];case"H":return String(z);case"HH":return M.s(z,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return me(z,K,!0);case"A":return me(z,K,!1);case"m":return String(K);case"mm":return M.s(K,2,"0");case"s":return String(W.$s);case"ss":return M.s(W.$s,2,"0");case"SSS":return M.s(W.$ms,3,"0");case"Z":return w}return null}(ce)||w.replace(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(j,W,V){var D,w=this,z=M.p(W),K=O(j),_=(K.utcOffset()-this.utcOffset())*r,J=this-K,ae=function(){return M.m(w,K)};switch(z){case d:D=ae()/12;break;case f:D=ae();break;case p:D=ae()/3;break;case u:D=(J-_)/6048e5;break;case l:D=(J-_)/864e5;break;case c:D=J/o;break;case s:D=J/r;break;case a:D=J/n;break;default:D=J}return V?D:M.a(D)},N.daysInMonth=function(){return this.endOf(f).$D},N.$locale=function(){return $[this.$L]},N.locale=function(j,W){if(!j)return this.$L;var V=this.clone(),D=B(j,W,!0);return D&&(V.$L=D),V},N.clone=function(){return M.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},P}(),L=H.prototype;return O.prototype=L,[["$ms",i],["$s",a],["$m",s],["$H",c],["$W",l],["$M",f],["$y",d],["$D",h]].forEach(function(P){L[P[1]]=function(N){return this.$g(N,P[0],P[1])}}),O.extend=function(P,N){return P.$i||(P(N,H,O),P.$i=!0),O},O.locale=B,O.isDayjs=R,O.unix=function(P){return O(1e3*P)},O.en=$[S],O.Ls=$,O.p={},O})})(zg);var eP=zg.exports;const yc=Ue(eP);var qg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(be,function(){return function(n,r,o){r.prototype.isToday=function(){var i="YYYY-MM-DD",a=o();return this.format(i)===a.format(i)}}})})(qg);var tP=qg.exports;const nP=Ue(tP);var Hg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(be,function(){return function(n,r,o){r.prototype.isYesterday=function(){var i="YYYY-MM-DD",a=o().subtract(1,"day");return this.format(i)===a.format(i)}}})})(Hg);var rP=Hg.exports;const oP=Ue(rP);yc.extend(nP),yc.extend(oP);function iP(e,t="day"){if(!e||e.length===0)return[];const n=[];n.push(Vg(e[0].timestamp));for(let r=0;r<e.length;r++)if(n.push(e[r]),r+1<e.length){const o=e[r].timestamp,i=e[r+1].timestamp;yc(o).isSame(i,t)||n.push(Vg(i))}return n}function Vg(e){return{id:dc(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:aP(e)}}}function aP(e,t=!1){const n=yc(e),r="h:mma";return n.isToday()?t?`Today • ${n.format(r)}`:"Today":n.isYesterday()?t?`Yesterday • ${n.format(r)}`:"Yesterday":t?n.format(`YYYY-MM-DD • ${r}`):n.format("YYYY-MM-DD")}function sP(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(r=>Number.parseInt(r,16));const n=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(n)return n.splice(1).map(r=>Number.parseInt(r+r,16));if(e.includes(","))return e.split(",").map(r=>Number.parseInt(r));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function cP(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function lP(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function uP(e,t){return e.map(n=>Math.round(n*t))}const Ia=e=>t=>lP(t,e),Ra=e=>t=>uP(t,e),fP={50:Ia(.95),100:Ia(.9),200:Ia(.75),300:Ia(.6),400:Ia(.3),500:e=>e,600:Ra(.9),700:Ra(.6),800:Ra(.45),900:Ra(.3),950:Ra(.2)};function Wg(e,t=fP){const n={},r=sP(e);for(const[o,i]of Object.entries(t))n[o]=cP(i(r));return n}const fi=x.object({title:x.string().optional(),link:x.string().optional()}),Bf=x.object({color:x.string().optional(),variant:x.enum(["soft","solid"]).optional(),themeMode:x.enum(["light","dark"]).optional(),fontFamily:x.enum(["rubik","inter","ibm","fira"]).optional(),radius:x.number().min(.5).max(4).optional()}),Kg=x.object({composerPlaceholder:x.string().optional(),botName:x.string().optional(),botAvatar:x.string().optional(),botDescription:x.string().optional(),website:fi.optional(),email:fi.optional(),phone:fi.optional(),privacyPolicy:fi.optional(),termsOfService:fi.optional(),showPoweredBy:x.boolean().optional()}).merge(Bf),Gg=x.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),Zg=x.object({}).passthrough().transform(e=>e),ue=x.object({className:x.string().optional(),style:Zg.optional()}),vc=x.object({container:ue.optional(),image:ue.optional(),fallback:ue.optional()}),Yg=x.object({button:ue.optional(),text:x.record(Gg,ue.optional()),image:x.object({image:ue.optional(),placeholder:ue.optional()}).optional(),audio:ue.optional(),video:ue.optional(),file:x.object({container:ue.optional(),title:ue.optional(),icon:ue.optional()}).optional(),location:x.object({container:ue.optional(),title:ue.optional(),icon:ue.optional()}).optional(),column:ue.optional(),row:ue.optional(),bubble:ue.optional(),carousel:x.object({container:ue.optional(),slidesContainer:ue.optional(),backButton:ue.optional(),nextButton:ue.optional()}).optional(),dropdown:x.object({button:x.object({container:ue.optional(),icon:ue.optional(),text:ue.optional()}).optional(),content:x.object({container:ue.optional(),item:ue.optional()}).optional()}).optional()}),Jg=x.object({container:ue.optional(),modal:x.object({overlay:ue.optional(),container:ue.optional(),dialog:x.object({container:ue.optional(),title:x.object({container:ue.optional(),text:ue.optional(),closeIcon:ue.optional()}).optional(),content:ue.optional(),newConversation:x.object({text:ue.optional(),button:ue.optional()}).optional()}).optional()}).optional(),notification:x.object({container:ue.optional(),title:ue.optional(),description:ue.optional(),icon:ue.optional(),closeIcon:ue.optional()}).optional(),header:x.object({container:ue.optional(),content:x.object({container:ue.optional(),title:ue.optional(),description:ue.optional(),avatar:vc.optional(),actions:x.object({container:ue.optional(),icons:ue.optional()}).optional()}),expandedContent:x.object({container:ue.optional(),group:ue.optional(),descriptionItems:x.object({container:ue.optional(),icon:ue.optional(),text:ue.optional(),link:ue.optional(),poweredBy:ue.optional()}).optional()}).optional(),description:x.object({container:ue.optional(),title:ue.optional(),subtitle:ue.optional()}).optional(),newConversationIcon:ue.optional()}).optional(),composer:x.object({container:ue.optional(),input:ue.optional(),uploadButton:x.object({container:ue.optional(),icon:ue.optional()}).optional(),button:x.object({container:ue.optional(),icon:ue.optional()}).optional()}).optional(),fab:x.object({icon:ue.optional(),container:ue.optional()}).optional(),messageList:x.object({scrollbar:x.object({container:ue.optional(),viewport:ue.optional(),thumb:ue.optional(),corner:ue.optional(),background:ue.optional()}).optional(),container:ue.optional(),marquee:x.object({content:ue.optional(),title:ue.optional(),description:ue.optional(),avatar:vc.optional(),container:ue.optional()}).optional(),scrollDownButton:x.object({container:ue.optional(),button:ue.optional(),icon:ue.optional()}).optional()}).optional(),message:x.object({container:ue.optional(),avatar:vc.optional(),blocks:Yg.optional()}).optional(),loadingIndicator:x.object({container:ue.optional(),loader:ue.optional()}).optional()}),Xg=x.enum(["opened","closed","initial"]),Qg=x.object({name:x.string().optional(),pictureUrl:x.string().optional(),data:x.record(x.unknown()).optional()}),eb=x.enum(["messaging","pushpin"]),tb=x.object({configuration:Kg.optional().catch(void 0),theme:Jg.optional().catch(void 0),style:x.string().optional().catch(void 0),user:Qg.optional().catch(void 0)}),dP=tb.extend({clientId:x.string(),botId:x.string(),selector:x.string().optional().catch(void 0),webchatScriptUrl:x.string().optional().catch(void 0),fabScriptUrl:x.string().optional().catch(void 0),messagingUrl:x.string().optional().catch(void 0),pushpinUrl:x.string().optional().catch(void 0),clientMode:eb.optional().catch(void 0),defaultState:Xg.optional().catch(void 0)});function nb(e){const{fontFamily:t,radius:n,themeMode:r,variant:o,color:i}=Bf.parse(e);let a={},s={};if(i){const u=Wg(i),f=r==="dark"?Rg(u):u,p=Wg(DA(jA(Ff(i)))),d=r==="dark"?Rg(p):p,h=r==="dark"?"#101010":"#fdfdfd";s=Object.entries({...f,1:h}).reduce((v,[y,g])=>({...v,[`--bpPrimary-${y}`]:g}),{});const m=Object.entries({...d,1:h}).reduce((v,[y,g])=>({...v,[`--bpGray-${y}`]:g}),{});a={...s,...m}}n&&(a={...a,"--bpRadius-scale":n.toString()});const c=s?Lg(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",l=o==="solid"?{"--header-bg":"var(--bpPrimary-600)","--header-bg-hover":"var(--bpPrimary-700)","--header-hover-dark":"var(--bpPrimary-800)","--header-title":c,"--header-description":c,"--header-description-icon":c,"--header-description-link":c,"--header-avatar-bg":"var(--bpPrimary-300)","--header-avatar-text":"var(--bpPrimary-700)","--message-bg":"var(--bpPrimary-600)","--message-bg-hover":"var(--bpPrimary-700)","--message-text":c,"--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-50)","--button-bg-hover":"var(--bpPrimary-100)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":c}:{"--header-bg":"var(--bpGray-50)","--header-bg-hover":"var(--bpGray-100)","--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-800)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)","--message-bg":"var(--bpPrimary-100)","--message-bg-hover":"var(--bpPrimary-200)","--message-text":"var(--bpPrimary-900)","--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-500)","--button-bg-hover":"var(--bpPrimary-600)","--button-text":s?Lg(s["--bpPrimary-500"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)","--fab-bg":"var(--bpPrimary-100)","--fab-bg-hover":"var(--bpPrimary-200)","--fab-icon":"var(--bpPrimary-700)"};return a={...a,...l},Bg(":root",a)+(t?Bg(".bpContainer",{"font-family":`var(--${t}-font)`}):"")}const Uf=E.forwardRef(({userId:e,src:t,container:n,image:r,fallback:o,...i},a)=>{const s=Ug(e??"",15);return F.jsxs(Ag,{ref:a,"data-color":s,...n,...i,children:[F.jsx(Pg,{src:t,...r}),F.jsx(Ig,{...o,children:typeof i.children=="string"?i.children[0]:i.children})]})});function mle(){}function yle(){}function pP(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const hP=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mP=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yP={};function rb(e,t){return((t||yP).jsx?mP:hP).test(e)}const vP=/[ \t\n\f\r]/g;function gP(e){return typeof e=="object"?e.type==="text"?ob(e.value):!1:ob(e)}function ob(e){return e.replace(vP,"")===""}class Ma{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ma.prototype.property={},Ma.prototype.normal={},Ma.prototype.space=null;function ib(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new Ma(n,r,t)}function zf(e){return e.toLowerCase()}class Rn{constructor(t,n){this.property=t,this.attribute=n}}Rn.prototype.space=null,Rn.prototype.boolean=!1,Rn.prototype.booleanish=!1,Rn.prototype.overloadedBoolean=!1,Rn.prototype.number=!1,Rn.prototype.commaSeparated=!1,Rn.prototype.spaceSeparated=!1,Rn.prototype.commaOrSpaceSeparated=!1,Rn.prototype.mustUseProperty=!1,Rn.prototype.defined=!1;let bP=0;const je=No(),Et=No(),ab=No(),ie=No(),dt=No(),di=No(),xn=No();function No(){return 2**++bP}const qf=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:Et,commaOrSpaceSeparated:xn,commaSeparated:di,number:ie,overloadedBoolean:ab,spaceSeparated:dt},Symbol.toStringTag,{value:"Module"})),Hf=Object.keys(qf);class Vf extends Rn{constructor(t,n,r,o){let i=-1;if(super(t,n),sb(this,"space",o),typeof r=="number")for(;++i<Hf.length;){const a=Hf[i];sb(this,Hf[i],(r&qf[a])===qf[a])}}}Vf.prototype.defined=!0;function sb(e,t,n){n&&(e[t]=n)}const wP={}.hasOwnProperty;function pi(e){const t={},n={};let r;for(r in e.properties)if(wP.call(e.properties,r)){const o=e.properties[r],i=new Vf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[zf(r)]=r,n[zf(i.attribute)]=r}return new Ma(t,n,e.space)}const cb=pi({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),lb=pi({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function ub(e,t){return t in e?e[t]:t}function fb(e,t){return ub(e,t.toLowerCase())}const db=pi({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:fb,properties:{xmlns:null,xmlnsXLink:null}}),pb=pi({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Et,ariaAutoComplete:null,ariaBusy:Et,ariaChecked:Et,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:dt,ariaCurrent:null,ariaDescribedBy:dt,ariaDetails:null,ariaDisabled:Et,ariaDropEffect:dt,ariaErrorMessage:null,ariaExpanded:Et,ariaFlowTo:dt,ariaGrabbed:Et,ariaHasPopup:null,ariaHidden:Et,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:dt,ariaLevel:ie,ariaLive:null,ariaModal:Et,ariaMultiLine:Et,ariaMultiSelectable:Et,ariaOrientation:null,ariaOwns:dt,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:Et,ariaReadOnly:Et,ariaRelevant:null,ariaRequired:Et,ariaRoleDescription:dt,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:Et,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null}}),xP=pi({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:fb,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:di,acceptCharset:dt,accessKey:dt,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:dt,autoFocus:je,autoPlay:je,capture:je,charSet:null,checked:je,cite:null,className:dt,cols:ie,colSpan:null,content:null,contentEditable:Et,controls:je,controlsList:dt,coords:ie|di,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:ab,draggable:Et,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:dt,height:ie,hidden:je,high:ie,href:null,hrefLang:null,htmlFor:dt,httpEquiv:dt,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:dt,itemRef:dt,itemScope:je,itemType:dt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:je,optimum:ie,pattern:null,ping:dt,placeholder:null,playsInline:je,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:dt,required:je,reversed:je,rows:ie,rowSpan:ie,sandbox:dt,scope:null,scoped:je,seamless:je,selected:je,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:Et,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:Et,width:ie,wrap:null,align:null,aLink:null,archive:dt,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:Et,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:je,disableRemotePlayback:je,prefix:null,property:null,results:ie,security:null,unselectable:null}}),SP=pi({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:ub,properties:{about:xn,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:dt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:di,g2:di,glyphName:di,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:xn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ie,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:dt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:xn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:xn,rev:xn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:xn,requiredFeatures:xn,requiredFonts:xn,requiredFormats:xn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:xn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:xn,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:xn,to:null,transform:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),EP=/^data[-\w.:]+$/i,hb=/-[a-z]/g,_P=/[A-Z]/g;function $P(e,t){const n=zf(t);let r=t,o=Rn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&EP.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(hb,CP);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!hb.test(i)){let a=i.replace(_P,kP);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Vf}return new o(r,t)}function kP(e){return"-"+e.toLowerCase()}function CP(e){return e.charAt(1).toUpperCase()}const OP={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},TP=ib([lb,cb,db,pb,xP],"html"),Wf=ib([lb,cb,db,pb,SP],"svg");function AP(e){return e.join(" ").trim()}var mb={},yb=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,PP=/\n/g,IP=/^\s*/,RP=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,MP=/^:\s*/,NP=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,DP=/^[;\s]*/,jP=/^\s+|\s+$/g,FP=`
28
- `,vb="/",gb="*",Do="",LP="comment",BP="declaration",UP=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(h){var m=h.match(PP);m&&(n+=m.length);var v=h.lastIndexOf(FP);r=~v?h.length-v:r+h.length}function i(){var h={line:n,column:r};return function(m){return m.position=new a(h),l(),m}}function a(h){this.start=h,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(h){var m=new Error(t.source+":"+n+":"+r+": "+h);if(m.reason=h,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function c(h){var m=h.exec(e);if(m){var v=m[0];return o(v),e=e.slice(v.length),m}}function l(){c(IP)}function u(h){var m;for(h=h||[];m=f();)m!==!1&&h.push(m);return h}function f(){var h=i();if(!(vb!=e.charAt(0)||gb!=e.charAt(1))){for(var m=2;Do!=e.charAt(m)&&(gb!=e.charAt(m)||vb!=e.charAt(m+1));)++m;if(m+=2,Do===e.charAt(m-1))return s("End of comment missing");var v=e.slice(2,m-2);return r+=2,o(v),e=e.slice(m),r+=2,h({type:LP,comment:v})}}function p(){var h=i(),m=c(RP);if(m){if(f(),!c(MP))return s("property missing ':'");var v=c(NP),y=h({type:BP,property:bb(m[0].replace(yb,Do)),value:v?bb(v[0].replace(yb,Do)):Do});return c(DP),y}}function d(){var h=[];u(h);for(var m;m=p();)m!==!1&&(h.push(m),u(h));return h}return l(),d()};function bb(e){return e?e.replace(jP,Do):Do}var zP=be&&be.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mb,"__esModule",{value:!0});var qP=zP(UP);function HP(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,qP.default)(e),o=typeof t=="function";return r.forEach(function(i){if(i.type==="declaration"){var a=i.property,s=i.value;o?t(a,s,i):s&&(n=n||{},n[a]=s)}}),n}var wb=mb.default=HP;const VP=wb.default||wb,xb=Sb("end"),Kf=Sb("start");function Sb(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function WP(e){const t=Kf(e),n=xb(e);if(t&&n)return{start:t,end:n}}function Na(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Eb(e.position):"start"in e||"end"in e?Eb(e):"line"in e||"column"in e?Gf(e):""}function Gf(e){return _b(e&&e.line)+":"+_b(e&&e.column)}function Eb(e){return Gf(e&&e.start)+"-"+Gf(e&&e.end)}function _b(e){return e&&typeof e=="number"?e:1}class Jt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},a=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?o=t:!i.cause&&t&&(a=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?i.ruleId=r:(i.source=r.slice(0,c),i.ruleId=r.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=s?s.line:void 0,this.name=Na(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}Jt.prototype.file="",Jt.prototype.name="",Jt.prototype.reason="",Jt.prototype.message="",Jt.prototype.stack="",Jt.prototype.column=void 0,Jt.prototype.line=void 0,Jt.prototype.ancestors=void 0,Jt.prototype.cause=void 0,Jt.prototype.fatal=void 0,Jt.prototype.place=void 0,Jt.prototype.ruleId=void 0,Jt.prototype.source=void 0;const Zf={}.hasOwnProperty,KP=new Map,GP=/[A-Z]/g,ZP=/-([a-z])/g,YP=new Set(["table","tbody","thead","tfoot","tr"]),JP=new Set(["td","th"]),$b="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function XP(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=aI(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=iI(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Wf:TP,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=kb(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function kb(e,t,n){if(t.type==="element")return QP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return eI(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return nI(e,t,n);if(t.type==="mdxjsEsm")return tI(e,t);if(t.type==="root")return rI(e,t,n);if(t.type==="text")return oI(e,t)}function QP(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Wf,e.schema=o),e.ancestors.push(t);const i=Ob(e,t.tagName,!1),a=sI(e,t);let s=Jf(e,t);return YP.has(t.tagName)&&(s=s.filter(function(c){return typeof c=="string"?!gP(c):!0})),Cb(e,a,i,t),Yf(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function eI(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Da(e,t.position)}function tI(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Da(e,t.position)}function nI(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Wf,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:Ob(e,t.name,!0),a=cI(e,t),s=Jf(e,t);return Cb(e,a,i,t),Yf(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function rI(e,t,n){const r={};return Yf(r,Jf(e,t)),e.create(t,e.Fragment,r,n)}function oI(e,t){return t.value}function Cb(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Yf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function iI(e,t,n){return r;function r(o,i,a,s){const l=Array.isArray(a.children)?n:t;return s?l(i,a,s):l(i,a)}}function aI(e,t){return n;function n(r,o,i,a){const s=Array.isArray(i.children),c=Kf(r);return t(o,i,a,s,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function sI(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Zf.call(t.properties,o)){const i=lI(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&JP.has(t.tagName)?r=s:n[a]=s}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function cI(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Da(e,t.position);else{const o=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,i=e.evaluater.evaluateExpression(s.expression)}else Da(e,t.position);else i=r.value===null?!0:r.value;n[o]=i}return n}function Jf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:KP;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const c=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(c){const l=o.get(c)||0;a=c+"-"+l,o.set(c,l+1)}}const s=kb(e,i,a);s!==void 0&&n.push(s)}return n}function lI(e,t,n){const r=$P(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?pP(n):AP(n)),r.property==="style"){let o=typeof n=="object"?n:uI(e,String(n));return e.stylePropertyNameCase==="css"&&(o=fI(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?OP[r.property]||r.property:r.attribute,n]}}function uI(e,t){const n={};try{VP(t,r)}catch(o){if(!e.ignoreInvalidStyle){const i=o,a=new Jt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=$b+"#cannot-parse-style-attribute",a}}return n;function r(o,i){let a=o;a.slice(0,2)!=="--"&&(a.slice(0,4)==="-ms-"&&(a="ms-"+a.slice(4)),a=a.replace(ZP,pI)),n[a]=i}}function Ob(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let i=-1,a;for(;++i<o.length;){const s=rb(o[i])?{type:"Identifier",name:o[i]}:{type:"Literal",value:o[i]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}r=a}else r=rb(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Zf.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Da(e)}function Da(e,t){const n=new Jt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=$b+"#cannot-handle-mdx-estrees-without-createevaluater",n}function fI(e){const t={};let n;for(n in e)Zf.call(e,n)&&(t[dI(n)]=e[n]);return t}function dI(e){let t=e.replace(GP,hI);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function pI(e,t){return t.toUpperCase()}function hI(e){return"-"+e.toLowerCase()}const Xf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},mI={};function Qf(e,t){const n=t||mI,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Tb(e,r,o)}function Tb(e,t,n){if(yI(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ab(e.children,t,n)}return Array.isArray(e)?Ab(e,t,n):""}function Ab(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Tb(e[o],t,n);return r.join("")}function yI(e){return!!(e&&typeof e=="object")}const Pb=document.createElement("i");function ed(e){const t="&"+e+";";Pb.innerHTML=t;const n=Pb.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Sn(e,t,n,r){const o=e.length;let i=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function Mn(e,t){return e.length>0?(Sn(e,e.length,0,t),e):t}const Ib={}.hasOwnProperty;function Rb(e){const t={};let n=-1;for(;++n<e.length;)vI(t,e[n]);return t}function vI(e,t){let n;for(n in t){const o=(Ib.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){Ib.call(o,a)||(o[a]=[]);const s=i[a];gI(o[a],Array.isArray(s)?s:s?[s]:[])}}}function gI(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Sn(e,0,0,r)}function Mb(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Vn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const cn=ro(/[A-Za-z]/),Xt=ro(/[\dA-Za-z]/),bI=ro(/[#-'*+\--9=?A-Z^-~]/);function gc(e){return e!==null&&(e<32||e===127)}const td=ro(/\d/),wI=ro(/[\dA-Fa-f]/),xI=ro(/[!-/:-@[-`{-~]/);function $e(e){return e!==null&&e<-2}function st(e){return e!==null&&(e<0||e===32)}function Le(e){return e===-2||e===-1||e===32}const bc=ro(/\p{P}|\p{S}/u),jo=ro(/\s/);function ro(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function hi(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(i===37&&Xt(e.charCodeAt(n+1))&&Xt(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(a=String.fromCharCode(i,s),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Ve(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(c){return Le(c)?(e.enter(n),s(c)):t(c)}function s(c){return Le(c)&&i++<o?(e.consume(c),s):(e.exit(n),t(c))}}const SI={tokenize:EI};function EI(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ve(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),i(s)}function i(s){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return $e(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),a)}}const _I={tokenize:$I},Nb={tokenize:kI};function $I(e){const t=this,n=[];let r=0,o,i,a;return s;function s(b){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,c,l)(b)}return l(b)}function c(b){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&g();const k=t.events.length;let S=k,$;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){$=t.events[S][1].end;break}y(r);let T=k;for(;T<t.events.length;)t.events[T][1].end=Object.assign({},$),T++;return Sn(t.events,S+1,0,t.events.slice(k)),t.events.length=T,l(b)}return s(b)}function l(b){if(r===n.length){if(!o)return p(b);if(o.currentConstruct&&o.currentConstruct.concrete)return h(b);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Nb,u,f)(b)}function u(b){return o&&g(),y(r),p(b)}function f(b){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,h(b)}function p(b){return t.containerState={},e.attempt(Nb,d,h)(b)}function d(b){return r++,n.push([t.currentConstruct,t.containerState]),p(b)}function h(b){if(b===null){o&&g(),y(0),e.consume(b);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:o}),m(b)}function m(b){if(b===null){v(e.exit("chunkFlow"),!0),y(0),e.consume(b);return}return $e(b)?(e.consume(b),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(b),m)}function v(b,k){const S=t.sliceStream(b);if(k&&S.push(null),b.previous=i,i&&(i.next=b),i=b,o.defineSkip(b.start),o.write(S),t.parser.lazy[b.start.line]){let $=o.events.length;for(;$--;)if(o.events[$][1].start.offset<a&&(!o.events[$][1].end||o.events[$][1].end.offset>a))return;const T=t.events.length;let R=T,B,O;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(B){O=t.events[R][1].end;break}B=!0}for(y(r),$=T;$<t.events.length;)t.events[$][1].end=Object.assign({},O),$++;Sn(t.events,R+1,0,t.events.slice(T)),t.events.length=$}}function y(b){let k=n.length;for(;k-- >b;){const S=n[k];t.containerState=S[1],S[0].exit.call(t,e)}n.length=b}function g(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function kI(e,t,n){return Ve(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function wc(e){if(e===null||st(e)||jo(e))return 1;if(bc(e))return 2}function xc(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const nd={name:"attention",tokenize:OI,resolveAll:CI};function CI(e,t){let n=-1,r,o,i,a,s,c,l,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),p=Object.assign({},e[n][1].start);Db(f,-c),Db(p,c),a={type:c>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},s={type:c>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:p},i={type:c>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o={type:c>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},a.start),e[n][1].start=Object.assign({},s.end),l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Mn(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=Mn(l,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),l=Mn(l,xc(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Mn(l,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Mn(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,Sn(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function OI(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=wc(r);let i;return a;function a(c){return i=c,e.enter("attentionSequence"),s(c)}function s(c){if(c===i)return e.consume(c),s;const l=e.exit("attentionSequence"),u=wc(c),f=!u||u===2&&o||n.includes(c),p=!o||o===2&&u||n.includes(r);return l._open=!!(i===42?f:f&&(o||!p)),l._close=!!(i===42?p:p&&(u||!f)),t(c)}}function Db(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const TI={name:"autolink",tokenize:AI};function AI(e,t,n){let r=0;return o;function o(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(d){return cn(d)?(e.consume(d),a):l(d)}function a(d){return d===43||d===45||d===46||Xt(d)?(r=1,s(d)):l(d)}function s(d){return d===58?(e.consume(d),r=0,c):(d===43||d===45||d===46||Xt(d))&&r++<32?(e.consume(d),s):(r=0,l(d))}function c(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||gc(d)?n(d):(e.consume(d),c)}function l(d){return d===64?(e.consume(d),u):bI(d)?(e.consume(d),l):n(d)}function u(d){return Xt(d)?f(d):n(d)}function f(d){return d===46?(e.consume(d),r=0,u):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||Xt(d))&&r++<63){const h=d===45?p:f;return e.consume(d),h}return n(d)}}const ja={tokenize:PI,partial:!0};function PI(e,t,n){return r;function r(i){return Le(i)?Ve(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||$e(i)?t(i):n(i)}}const jb={name:"blockQuote",tokenize:II,continuation:{tokenize:RI},exit:MI};function II(e,t,n){const r=this;return o;function o(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return n(a)}function i(a){return Le(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function RI(e,t,n){const r=this;return o;function o(a){return Le(a)?Ve(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(jb,t,n)(a)}}function MI(e){e.exit("blockQuote")}const Fb={name:"characterEscape",tokenize:NI};function NI(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return xI(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const Lb={name:"characterReference",tokenize:DI};function DI(e,t,n){const r=this;let o=0,i,a;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),c}function c(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,a=Xt,u(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=wI,u):(e.enter("characterReferenceValue"),i=7,a=td,u(f))}function u(f){if(f===59&&o){const p=e.exit("characterReferenceValue");return a===Xt&&!ed(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&o++<i?(e.consume(f),u):n(f)}}const Bb={tokenize:FI,partial:!0},Ub={name:"codeFenced",tokenize:jI,concrete:!0};function jI(e,t,n){const r=this,o={tokenize:S,partial:!0};let i=0,a=0,s;return c;function c($){return l($)}function l($){const T=r.events[r.events.length-1];return i=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,s=$,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u($)}function u($){return $===s?(a++,e.consume($),u):a<3?n($):(e.exit("codeFencedFenceSequence"),Le($)?Ve(e,f,"whitespace")($):f($))}function f($){return $===null||$e($)?(e.exit("codeFencedFence"),r.interrupt?t($):e.check(Bb,m,k)($)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p($))}function p($){return $===null||$e($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f($)):Le($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ve(e,d,"whitespace")($)):$===96&&$===s?n($):(e.consume($),p)}function d($){return $===null||$e($)?f($):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h($))}function h($){return $===null||$e($)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f($)):$===96&&$===s?n($):(e.consume($),h)}function m($){return e.attempt(o,k,v)($)}function v($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),y}function y($){return i>0&&Le($)?Ve(e,g,"linePrefix",i+1)($):g($)}function g($){return $===null||$e($)?e.check(Bb,m,k)($):(e.enter("codeFlowValue"),b($))}function b($){return $===null||$e($)?(e.exit("codeFlowValue"),g($)):(e.consume($),b)}function k($){return e.exit("codeFenced"),t($)}function S($,T,R){let B=0;return O;function O(N){return $.enter("lineEnding"),$.consume(N),$.exit("lineEnding"),M}function M(N){return $.enter("codeFencedFence"),Le(N)?Ve($,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):H(N)}function H(N){return N===s?($.enter("codeFencedFenceSequence"),L(N)):R(N)}function L(N){return N===s?(B++,$.consume(N),L):B>=a?($.exit("codeFencedFenceSequence"),Le(N)?Ve($,P,"whitespace")(N):P(N)):R(N)}function P(N){return N===null||$e(N)?($.exit("codeFencedFence"),T(N)):R(N)}}}function FI(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const rd={name:"codeIndented",tokenize:BI},LI={tokenize:UI,partial:!0};function BI(e,t,n){const r=this;return o;function o(l){return e.enter("codeIndented"),Ve(e,i,"linePrefix",4+1)(l)}function i(l){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(l):n(l)}function a(l){return l===null?c(l):$e(l)?e.attempt(LI,a,c)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||$e(l)?(e.exit("codeFlowValue"),a(l)):(e.consume(l),s)}function c(l){return e.exit("codeIndented"),t(l)}}function UI(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):$e(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):Ve(e,i,"linePrefix",4+1)(a)}function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):$e(a)?o(a):n(a)}}const zI={name:"codeText",tokenize:VI,resolve:qI,previous:HI};function qI(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function HI(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function VI(e,t,n){let r=0,o,i;return a;function a(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),c(f))}function c(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),c):f===96?(i=e.enter("codeTextSequence"),o=0,u(f)):$e(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("codeTextData"),l(f))}function l(f){return f===null||f===32||f===96||$e(f)?(e.exit("codeTextData"),c(f)):(e.consume(f),l)}function u(f){return f===96?(e.consume(f),o++,u):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(i.type="codeTextData",l(f))}}function zb(e){const t={};let n=-1,r,o,i,a,s,c,l;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,i=0,i<c.length&&c[i][1].type==="lineEndingBlank"&&(i+=2),i<c.length&&c[i][1].type==="content"))for(;++i<c.length&&c[i][1].type!=="content";)c[i][1].type==="chunkText"&&(c[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,WI(e,n)),n=t[n],l=!0);else if(r[1]._container){for(i=n,o=void 0;i--&&(a=e[i],a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(o&&(e[o][1].type="lineEndingBlank"),a[1].type="lineEnding",o=i);o&&(r[1].end=Object.assign({},e[o][1].start),s=e.slice(o,n),s.unshift(r),Sn(e,o,n-o+1,s))}}return!l}function WI(e,t){const n=e[t][1],r=e[t][2];let o=t-1;const i=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,c=[],l={};let u,f,p=-1,d=n,h=0,m=0;const v=[m];for(;d;){for(;e[++o][1]!==d;);i.push(o),d._tokenizer||(u=r.sliceStream(d),d.next||u.push(null),f&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,v.push(m),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(a.events=[],d?(d._tokenizer=void 0,d.previous=void 0):v.pop(),p=v.length;p--;){const y=s.slice(v[p],v[p+1]),g=i.pop();c.unshift([g,g+y.length-1]),Sn(e,g,2,y)}for(p=-1;++p<c.length;)l[h+c[p][0]]=h+c[p][1],h+=c[p][1]-c[p][0]-1;return l}const KI={tokenize:YI,resolve:ZI},GI={tokenize:JI,partial:!0};function ZI(e){return zb(e),e}function YI(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(s)}function o(s){return s===null?i(s):$e(s)?e.check(GI,a,i)(s):(e.consume(s),o)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function JI(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ve(e,i,"linePrefix")}function i(a){if(a===null||$e(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function qb(e,t,n,r,o,i,a,s,c){const l=c||Number.POSITIVE_INFINITY;let u=0;return f;function f(y){return y===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(y),e.exit(i),p):y===null||y===32||y===41||gc(y)?n(y):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),m(y))}function p(y){return y===62?(e.enter(i),e.consume(y),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(y))}function d(y){return y===62?(e.exit("chunkString"),e.exit(s),p(y)):y===null||y===60||$e(y)?n(y):(e.consume(y),y===92?h:d)}function h(y){return y===60||y===62||y===92?(e.consume(y),d):d(y)}function m(y){return!u&&(y===null||y===41||st(y))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(y)):u<l&&y===40?(e.consume(y),u++,m):y===41?(e.consume(y),u--,m):y===null||y===32||y===40||gc(y)?n(y):(e.consume(y),y===92?v:m)}function v(y){return y===40||y===41||y===92?(e.consume(y),m):m(y)}}function Hb(e,t,n,r,o,i){const a=this;let s=0,c;return l;function l(d){return e.enter(r),e.enter(o),e.consume(d),e.exit(o),e.enter(i),u}function u(d){return s>999||d===null||d===91||d===93&&!c||d===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):d===93?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):$e(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||$e(d)||s++>999?(e.exit("chunkString"),u(d)):(e.consume(d),c||(c=!Le(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(e.consume(d),s++,f):f(d)}}function Vb(e,t,n,r,o,i){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(o),e.consume(p),e.exit(o),a=p===40?41:p,c):n(p)}function c(p){return p===a?(e.enter(o),e.consume(p),e.exit(o),e.exit(r),t):(e.enter(i),l(p))}function l(p){return p===a?(e.exit(i),c(a)):p===null?n(p):$e(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Ve(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===a||p===null||$e(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?f:u)}function f(p){return p===a||p===92?(e.consume(p),u):u(p)}}function Fa(e,t){let n;return r;function r(o){return $e(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Le(o)?Ve(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const XI={name:"definition",tokenize:eR},QI={tokenize:tR,partial:!0};function eR(e,t,n){const r=this;let o;return i;function i(d){return e.enter("definition"),a(d)}function a(d){return Hb.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return o=Vn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),c):n(d)}function c(d){return st(d)?Fa(e,l)(d):l(d)}function l(d){return qb(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function u(d){return e.attempt(QI,f,f)(d)}function f(d){return Le(d)?Ve(e,p,"whitespace")(d):p(d)}function p(d){return d===null||$e(d)?(e.exit("definition"),r.parser.defined.push(o),t(d)):n(d)}}function tR(e,t,n){return r;function r(s){return st(s)?Fa(e,o)(s):n(s)}function o(s){return Vb(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return Le(s)?Ve(e,a,"whitespace")(s):a(s)}function a(s){return s===null||$e(s)?t(s):n(s)}}const nR={name:"hardBreakEscape",tokenize:rR};function rR(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return $e(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const oR={name:"headingAtx",tokenize:aR,resolve:iR};function iR(e,t){let n=e.length-2,r=3,o,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Sn(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function aR(e,t,n){let r=0;return o;function o(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&r++<6?(e.consume(u),a):u===null||st(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),c(u)):u===null||$e(u)?(e.exit("atxHeading"),t(u)):Le(u)?Ve(e,s,"whitespace")(u):(e.enter("atxHeadingText"),l(u))}function c(u){return u===35?(e.consume(u),c):(e.exit("atxHeadingSequence"),s(u))}function l(u){return u===null||u===35||st(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),l)}}const sR=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Wb=["pre","script","style","textarea"],cR={name:"htmlFlow",tokenize:dR,resolveTo:fR,concrete:!0},lR={tokenize:hR,partial:!0},uR={tokenize:pR,partial:!0};function fR(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function dR(e,t,n){const r=this;let o,i,a,s,c;return l;function l(_){return u(_)}function u(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),f}function f(_){return _===33?(e.consume(_),p):_===47?(e.consume(_),i=!0,m):_===63?(e.consume(_),o=3,r.interrupt?t:w):cn(_)?(e.consume(_),a=String.fromCharCode(_),v):n(_)}function p(_){return _===45?(e.consume(_),o=2,d):_===91?(e.consume(_),o=5,s=0,h):cn(_)?(e.consume(_),o=4,r.interrupt?t:w):n(_)}function d(_){return _===45?(e.consume(_),r.interrupt?t:w):n(_)}function h(_){const J="CDATA[";return _===J.charCodeAt(s++)?(e.consume(_),s===J.length?r.interrupt?t:H:h):n(_)}function m(_){return cn(_)?(e.consume(_),a=String.fromCharCode(_),v):n(_)}function v(_){if(_===null||_===47||_===62||st(_)){const J=_===47,ae=a.toLowerCase();return!J&&!i&&Wb.includes(ae)?(o=1,r.interrupt?t(_):H(_)):sR.includes(a.toLowerCase())?(o=6,J?(e.consume(_),y):r.interrupt?t(_):H(_)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):i?g(_):b(_))}return _===45||Xt(_)?(e.consume(_),a+=String.fromCharCode(_),v):n(_)}function y(_){return _===62?(e.consume(_),r.interrupt?t:H):n(_)}function g(_){return Le(_)?(e.consume(_),g):O(_)}function b(_){return _===47?(e.consume(_),O):_===58||_===95||cn(_)?(e.consume(_),k):Le(_)?(e.consume(_),b):O(_)}function k(_){return _===45||_===46||_===58||_===95||Xt(_)?(e.consume(_),k):S(_)}function S(_){return _===61?(e.consume(_),$):Le(_)?(e.consume(_),S):b(_)}function $(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),c=_,T):Le(_)?(e.consume(_),$):R(_)}function T(_){return _===c?(e.consume(_),c=null,B):_===null||$e(_)?n(_):(e.consume(_),T)}function R(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||st(_)?S(_):(e.consume(_),R)}function B(_){return _===47||_===62||Le(_)?b(_):n(_)}function O(_){return _===62?(e.consume(_),M):n(_)}function M(_){return _===null||$e(_)?H(_):Le(_)?(e.consume(_),M):n(_)}function H(_){return _===45&&o===2?(e.consume(_),j):_===60&&o===1?(e.consume(_),W):_===62&&o===4?(e.consume(_),z):_===63&&o===3?(e.consume(_),w):_===93&&o===5?(e.consume(_),D):$e(_)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(lR,K,L)(_)):_===null||$e(_)?(e.exit("htmlFlowData"),L(_)):(e.consume(_),H)}function L(_){return e.check(uR,P,K)(_)}function P(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),N}function N(_){return _===null||$e(_)?L(_):(e.enter("htmlFlowData"),H(_))}function j(_){return _===45?(e.consume(_),w):H(_)}function W(_){return _===47?(e.consume(_),a="",V):H(_)}function V(_){if(_===62){const J=a.toLowerCase();return Wb.includes(J)?(e.consume(_),z):H(_)}return cn(_)&&a.length<8?(e.consume(_),a+=String.fromCharCode(_),V):H(_)}function D(_){return _===93?(e.consume(_),w):H(_)}function w(_){return _===62?(e.consume(_),z):_===45&&o===2?(e.consume(_),w):H(_)}function z(_){return _===null||$e(_)?(e.exit("htmlFlowData"),K(_)):(e.consume(_),z)}function K(_){return e.exit("htmlFlow"),t(_)}}function pR(e,t,n){const r=this;return o;function o(a){return $e(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):n(a)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function hR(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(ja,t,n)}}const mR={name:"htmlText",tokenize:yR};function yR(e,t,n){const r=this;let o,i,a;return s;function s(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),c}function c(w){return w===33?(e.consume(w),l):w===47?(e.consume(w),S):w===63?(e.consume(w),b):cn(w)?(e.consume(w),R):n(w)}function l(w){return w===45?(e.consume(w),u):w===91?(e.consume(w),i=0,h):cn(w)?(e.consume(w),g):n(w)}function u(w){return w===45?(e.consume(w),d):n(w)}function f(w){return w===null?n(w):w===45?(e.consume(w),p):$e(w)?(a=f,W(w)):(e.consume(w),f)}function p(w){return w===45?(e.consume(w),d):f(w)}function d(w){return w===62?j(w):w===45?p(w):f(w)}function h(w){const z="CDATA[";return w===z.charCodeAt(i++)?(e.consume(w),i===z.length?m:h):n(w)}function m(w){return w===null?n(w):w===93?(e.consume(w),v):$e(w)?(a=m,W(w)):(e.consume(w),m)}function v(w){return w===93?(e.consume(w),y):m(w)}function y(w){return w===62?j(w):w===93?(e.consume(w),y):m(w)}function g(w){return w===null||w===62?j(w):$e(w)?(a=g,W(w)):(e.consume(w),g)}function b(w){return w===null?n(w):w===63?(e.consume(w),k):$e(w)?(a=b,W(w)):(e.consume(w),b)}function k(w){return w===62?j(w):b(w)}function S(w){return cn(w)?(e.consume(w),$):n(w)}function $(w){return w===45||Xt(w)?(e.consume(w),$):T(w)}function T(w){return $e(w)?(a=T,W(w)):Le(w)?(e.consume(w),T):j(w)}function R(w){return w===45||Xt(w)?(e.consume(w),R):w===47||w===62||st(w)?B(w):n(w)}function B(w){return w===47?(e.consume(w),j):w===58||w===95||cn(w)?(e.consume(w),O):$e(w)?(a=B,W(w)):Le(w)?(e.consume(w),B):j(w)}function O(w){return w===45||w===46||w===58||w===95||Xt(w)?(e.consume(w),O):M(w)}function M(w){return w===61?(e.consume(w),H):$e(w)?(a=M,W(w)):Le(w)?(e.consume(w),M):B(w)}function H(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),o=w,L):$e(w)?(a=H,W(w)):Le(w)?(e.consume(w),H):(e.consume(w),P)}function L(w){return w===o?(e.consume(w),o=void 0,N):w===null?n(w):$e(w)?(a=L,W(w)):(e.consume(w),L)}function P(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||st(w)?B(w):(e.consume(w),P)}function N(w){return w===47||w===62||st(w)?B(w):n(w)}function j(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function W(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),V}function V(w){return Le(w)?Ve(e,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):D(w)}function D(w){return e.enter("htmlTextData"),a(w)}}const od={name:"labelEnd",tokenize:SR,resolveTo:xR,resolveAll:wR},vR={tokenize:ER},gR={tokenize:_R},bR={tokenize:$R};function wR(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function xR(e,t){let n=e.length,r=0,o,i,a,s;for(;n--;)if(o=e[n][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const c={type:e[i][1].type==="labelLink"?"link":"image",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"label",start:Object.assign({},e[i][1].start),end:Object.assign({},e[a][1].end)},u={type:"labelText",start:Object.assign({},e[i+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",c,t],["enter",l,t]],s=Mn(s,e.slice(i+1,i+r+3)),s=Mn(s,[["enter",u,t]]),s=Mn(s,xc(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),s=Mn(s,[["exit",u,t],e[a-2],e[a-1],["exit",l,t]]),s=Mn(s,e.slice(a+1)),s=Mn(s,[["exit",c,t]]),Sn(e,i,e.length,s),e}function SR(e,t,n){const r=this;let o=r.events.length,i,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){i=r.events[o][1];break}return s;function s(p){return i?i._inactive?f(p):(a=r.parser.defined.includes(Vn(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):n(p)}function c(p){return p===40?e.attempt(vR,u,a?u:f)(p):p===91?e.attempt(gR,u,a?l:f)(p):a?u(p):f(p)}function l(p){return e.attempt(bR,u,f)(p)}function u(p){return t(p)}function f(p){return i._balanced=!0,n(p)}}function ER(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),o}function o(f){return st(f)?Fa(e,i)(f):i(f)}function i(f){return f===41?u(f):qb(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return st(f)?Fa(e,c)(f):u(f)}function s(f){return n(f)}function c(f){return f===34||f===39||f===40?Vb(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function l(f){return st(f)?Fa(e,u)(f):u(f)}function u(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function _R(e,t,n){const r=this;return o;function o(s){return Hb.call(r,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(Vn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function $R(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const kR={name:"labelStartImage",tokenize:CR,resolveAll:od.resolveAll};function CR(e,t,n){const r=this;return o;function o(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const OR={name:"labelStartLink",tokenize:TR,resolveAll:od.resolveAll};function TR(e,t,n){const r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const id={name:"lineEnding",tokenize:AR};function AR(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ve(e,t,"linePrefix")}}const Sc={name:"thematicBreak",tokenize:PR};function PR(e,t,n){let r=0,o;return i;function i(l){return e.enter("thematicBreak"),a(l)}function a(l){return o=l,s(l)}function s(l){return l===o?(e.enter("thematicBreakSequence"),c(l)):r>=3&&(l===null||$e(l))?(e.exit("thematicBreak"),t(l)):n(l)}function c(l){return l===o?(e.consume(l),r++,c):(e.exit("thematicBreakSequence"),Le(l)?Ve(e,s,"whitespace")(l):s(l))}}const dn={name:"list",tokenize:MR,continuation:{tokenize:NR},exit:jR},IR={tokenize:FR,partial:!0},RR={tokenize:DR,partial:!0};function MR(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return s;function s(d){const h=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:td(d)){if(r.containerState.type||(r.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(Sc,n,l)(d):l(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(d)}return n(d)}function c(d){return td(d)&&++a<10?(e.consume(d),c):(!r.interrupt||a<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),l(d)):n(d)}function l(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(ja,r.interrupt?n:u,e.attempt(IR,p,f))}function u(d){return r.containerState.initialBlankLine=!0,i++,p(d)}function f(d){return Le(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function NR(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ja,o,i);function o(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ve(e,t,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!Le(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(RR,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ve(e,e.attempt(dn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function DR(e,t,n){const r=this;return Ve(e,o,"listItemIndent",r.containerState.size+1);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(i):n(i)}}function jR(e){e.exit(this.containerState.type)}function FR(e,t,n){const r=this;return Ve(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function o(i){const a=r.events[r.events.length-1];return!Le(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const Kb={name:"setextUnderline",tokenize:BR,resolveTo:LR};function LR(e,t){let n=e.length,r,o,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const a={type:"setextHeading",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function BR(e,t,n){const r=this;let o;return i;function i(l){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),o=l,a(l)):n(l)}function a(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===o?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),Le(l)?Ve(e,c,"lineSuffix")(l):c(l))}function c(l){return l===null||$e(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const UR={tokenize:zR};function zR(e){const t=this,n=e.attempt(ja,r,e.attempt(this.parser.constructs.flowInitial,o,Ve(e,e.attempt(this.parser.constructs.flow,o,e.attempt(KI,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const qR={resolveAll:Zb()},HR=Gb("string"),VR=Gb("text");function Gb(e){return{tokenize:t,resolveAll:Zb(e==="text"?WR:void 0)};function t(n){const r=this,o=this.parser.constructs[e],i=n.attempt(o,a,s);return a;function a(u){return l(u)?i(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),c}function c(u){return l(u)?(n.exit("data"),i(u)):(n.consume(u),c)}function l(u){if(u===null)return!0;const f=o[u];let p=-1;if(f)for(;++p<f.length;){const d=f[p];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function Zb(e){return t;function t(n,r){let o=-1,i;for(;++o<=n.length;)i===void 0?n[o]&&n[o][1].type==="data"&&(i=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==i+2&&(n[i][1].end=n[o-1][1].end,n.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(n,r):n}}function WR(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let i=o.length,a=-1,s=0,c;for(;i--;){const l=o[i];if(typeof l=="string"){for(a=l.length;l.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(l===-2)c=!0,s++;else if(l!==-1){i++;break}}if(s){const l={type:n===e.length||c||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+i,_bufferIndex:i?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},l.start),r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}function KR(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const o={},i=[];let a=[],s=[];const c={consume:g,enter:b,exit:k,attempt:T(S),check:T($),interrupt:T($,{interrupt:!0})},l={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:d,sliceSerialize:p,now:h,defineSkip:m,write:f};let u=t.tokenize.call(l,c);return t.resolveAll&&i.push(t),l;function f(M){return a=Mn(a,M),v(),a[a.length-1]!==null?[]:(R(t,0),l.events=xc(i,l.events,l),l.events)}function p(M,H){return ZR(d(M),H)}function d(M){return GR(a,M)}function h(){const{line:M,column:H,offset:L,_index:P,_bufferIndex:N}=r;return{line:M,column:H,offset:L,_index:P,_bufferIndex:N}}function m(M){o[M.line]=M.column,O()}function v(){let M;for(;r._index<a.length;){const H=a[r._index];if(typeof H=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<H.length;)y(H.charCodeAt(r._bufferIndex));else y(H)}}function y(M){u=u(M)}function g(M){$e(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,O()):M!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=M}function b(M,H){const L=H||{};return L.type=M,L.start=h(),l.events.push(["enter",L,l]),s.push(L),L}function k(M){const H=s.pop();return H.end=h(),l.events.push(["exit",H,l]),H}function S(M,H){R(M,H.from)}function $(M,H){H.restore()}function T(M,H){return L;function L(P,N,j){let W,V,D,w;return Array.isArray(P)?K(P):"tokenize"in P?K([P]):z(P);function z(re){return le;function le(pe){const me=pe!==null&&re[pe],ce=pe!==null&&re.null,Q=[...Array.isArray(me)?me:me?[me]:[],...Array.isArray(ce)?ce:ce?[ce]:[]];return K(Q)(pe)}}function K(re){return W=re,V=0,re.length===0?j:_(re[V])}function _(re){return le;function le(pe){return w=B(),D=re,re.partial||(l.currentConstruct=re),re.name&&l.parser.constructs.disable.null.includes(re.name)?ae():re.tokenize.call(H?Object.assign(Object.create(l),H):l,c,J,ae)(pe)}}function J(re){return M(D,w),N}function ae(re){return w.restore(),++V<W.length?_(W[V]):j}}}function R(M,H){M.resolveAll&&!i.includes(M)&&i.push(M),M.resolve&&Sn(l.events,H,l.events.length-H,M.resolve(l.events.slice(H),l)),M.resolveTo&&(l.events=M.resolveTo(l.events,l))}function B(){const M=h(),H=l.previous,L=l.currentConstruct,P=l.events.length,N=Array.from(s);return{restore:j,from:P};function j(){r=M,l.previous=H,l.currentConstruct=L,l.events.length=P,s=N,O()}}function O(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function GR(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}function ZR(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
27
+ Check the top-level render call using <`+me+">.")}return ne}}function Rt(I,ne){{if(!I._store||I._store.validated||I.key!=null)return;I._store.validated=!0;var me=ht(ne);if(ot[me])return;ot[me]=!0;var Pe="";I&&I._owner&&I._owner!==dn.current&&(Pe=" It was passed a child from "+B(I._owner.type)+"."),Vn(I),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',me,Pe),Vn(null)}}function Mt(I,ne){{if(typeof I!="object")return;if(Oe(I))for(var me=0;me<I.length;me++){var Pe=I[me];gr(Pe)&&Rt(Pe,ne)}else if(gr(I))I._store&&(I._store.validated=!0);else if(I){var Je=y(I);if(typeof Je=="function"&&Je!==I.entries)for(var ut=Je.call(I),We;!(We=ut.next()).done;)gr(We.value)&&Rt(We.value,ne)}}}function qt(I){{var ne=I.type;if(ne==null||typeof ne=="string")return;var me;if(typeof ne=="function")me=ne.propTypes;else if(typeof ne=="object"&&(ne.$$typeof===l||ne.$$typeof===f))me=ne.propTypes;else return;if(me){var Pe=B(ne);xe(me,I.props,"prop",Pe,I)}else if(ne.PropTypes!==void 0&&!Lr){Lr=!0;var Je=B(ne);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Je||"Unknown")}typeof ne.getDefaultProps=="function"&&!ne.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Dt(I){{for(var ne=Object.keys(I.props),me=0;me<ne.length;me++){var Pe=ne[me];if(Pe!=="children"&&Pe!=="key"){Vn(I),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Pe),Vn(null);break}}I.ref!==null&&(Vn(I),g("Invalid attribute `ref` supplied to `React.Fragment`."),Vn(null))}}function In(I,ne,me,Pe,Je,ut){{var We=T(I);if(!We){var ze="";(I===void 0||typeof I=="object"&&I!==null&&Object.keys(I).length===0)&&(ze+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var on=Fr(Je);on?ze+=on:ze+=Kn();var wt;I===null?wt="null":Oe(I)?wt="array":I!==void 0&&I.$$typeof===t?(wt="<"+(B(I.type)||"Unknown")+" />",ze=" Did you accidentally export a JSX literal instead of a component?"):wt=typeof I,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",wt,ze)}var Ot=pt(I,ne,me,Je,ut);if(Ot==null)return Ot;if(We){var An=ne.children;if(An!==void 0)if(Pe)if(Oe(An)){for(var zi=0;zi<An.length;zi++)Mt(An[zi],I);Object.freeze&&Object.freeze(An)}else g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Mt(An,I)}return I===r?Dt(Ot):qt(Ot),Ot}}function Gn(I,ne,me){return In(I,ne,me,!0)}function vo(I,ne,me){return In(I,ne,me,!1)}var nfe=vo,rfe=Gn;ia.Fragment=r,ia.jsx=nfe,ia.jsxs=rfe}()),ia}process.env.NODE_ENV==="production"?df.exports=$A():df.exports=OA();var L=df.exports;function kt(){return kt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kt.apply(this,arguments)}function pf(e,t=[]){let n=[];function r(i,a){const s=E.createContext(a),l=n.length;n=[...n,a];function c(f){const{scope:p,children:d,...h}=f,m=(p==null?void 0:p[e][l])||s,y=E.useMemo(()=>h,Object.values(h));return E.createElement(m.Provider,{value:y},d)}function u(f,p){const d=(p==null?void 0:p[e][l])||s,h=E.useContext(d);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,u]}const o=()=>{const i=n.map(a=>E.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return E.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,kA(o,...t)]}function kA(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...s,...f}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Wr(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const aa=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{};function Vr(){return Vr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vr.apply(null,arguments)}function _A(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Og(...e){return t=>e.forEach(n=>_A(n,t))}function xo(...e){return E.useCallback(Og(...e),e)}const hf=E.forwardRef((e,t)=>{const{children:n,...r}=e,o=E.Children.toArray(n),i=o.find(CA);if(i){const a=i.props.children,s=o.map(l=>l===i?E.Children.count(a)>1?E.Children.only(null):E.isValidElement(a)?a.props.children:null:l);return E.createElement(mf,Vr({},r,{ref:t}),E.isValidElement(a)?E.cloneElement(a,void 0,s):null)}return E.createElement(mf,Vr({},r,{ref:t}),n)});hf.displayName="Slot";const mf=E.forwardRef((e,t)=>{const{children:n,...r}=e;return E.isValidElement(n)?E.cloneElement(n,{...IA(r,n.props),ref:t?Og(t,n.ref):n.ref}):E.Children.count(n)>1?E.Children.only(null):null});mf.displayName="SlotClone";const TA=({children:e})=>E.createElement(E.Fragment,null,e);function CA(e){return E.isValidElement(e)&&e.type===TA}function IA(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const $n=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=E.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?hf:t;return E.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),E.createElement(s,Vr({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function AA(e,t){e&&Zn.flushSync(()=>e.dispatchEvent(t))}const kg="Avatar",[PA,gfe]=pf(kg),[RA,_g]=PA(kg),Tg=E.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,i]=E.useState("idle");return E.createElement(RA,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:i},E.createElement($n.span,kt({},r,{ref:t})))}),MA="AvatarImage",Cg=E.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...i}=e,a=_g(MA,n),s=jA(r),l=Wr(c=>{o(c),a.onImageLoadingStatusChange(c)});return aa(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?E.createElement($n.img,kt({},i,{ref:t,src:r})):null}),DA="AvatarFallback",Ig=E.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,i=_g(DA,n),[a,s]=E.useState(r===void 0);return E.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),a&&i.imageLoadingStatus!=="loaded"?E.createElement($n.span,kt({},o,{ref:t})):null});function jA(e){const[t,n]=E.useState("idle");return E.useEffect(()=>{if(!e){n("error");return}let r=!0;const o=new window.Image,i=a=>()=>{r&&n(a)};return n("loading"),o.onload=i("loaded"),o.onerror=i("error"),o.src=e,()=>{r=!1}},[e]),t}function vf(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const n=e.replace(/^#/,"");let r=n;n.length===3&&(r=n.split("").map(l=>l+l).join(""));const o=parseInt(r,16),i=o>>16&255,a=o>>8&255,s=o&255;return{r:i,g:a,b:s}}function NA(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const LA=(e,t=30)=>{const n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b,n+1);return{r:Math.floor((e.r-n)/(r-n)*t*(1-.299)+120-t/2),g:Math.floor((e.g-n)/(r-n)*t*(1-.587)+120-t/2),b:Math.floor((e.b-n)/(r-n)*t*(1-.114)+120-t/2)}};function Ag(e){return Object.entries(e).reduce((t,[n,r])=>{const o=n.replace(/(\d+)/,i=>(1e3-parseInt(i)).toString());return{...t,[o]:r}},{})}const FA=2.4,BA=.2126729,UA=.7151522,zA=.072175,HA=.56,qA=.57,WA=.62,VA=.65,Ls=.022,Pg=1.414,KA=1.14,GA=1.14,ZA=.035991,YA=.035991,JA=27.7847239587675,XA=27.7847239587675,Rg=.027,Mg=.027,Dg=.001,QA=5e-4;function jg(e){const{r:t,g:n,b:r}=e,o=i=>(i/255)**FA;return BA*o(t)+UA*o(n)+zA*o(r)}function Ng(e,t){if(!e||!t)return 0;let n=jg(vf(e)),r=jg(vf(t)),o=0,i=0;return n=n>Ls?n:n+(Ls-n)**Pg,r=r>Ls?r:r+(Ls-r)**Pg,Math.abs(r-n)<QA?0:(r>n?(o=(r**HA-n**qA)*KA,i=o<Dg?0:o<ZA?o-o*JA*Rg:o-Rg):(o=(r**VA-n**WA)*GA,i=o>-Dg?0:o>-YA?o-o*XA*Mg:o+Mg),Math.abs(i*100))}let Lg=class{constructor(){we(this,"eventMap");this.eventMap={}}on(t,n){var r;return this.eventMap[t]||(this.eventMap[t]=new Set),(r=this.eventMap[t])==null||r.add(n),()=>{var o;(o=this.eventMap[t])==null||o.delete(n)}}emit(t,n){var r,o;(r=this.eventMap[t])==null||r.forEach(i=>{i(n)}),(o=this.eventMap["*"])==null||o.forEach(i=>{i({type:t,payload:n})})}};const eP=new Lg;function Fg(e,t){let n=`${e} {`;for(const[r,o]of Object.entries(t))n+=`${r}: ${o}; `;return n+="}",n}function Bg(e,t){let n=0;if(e.length==0)return n;for(let r=0;r<e.length;r++){const o=e.charCodeAt(r);n=(n<<5)-n+o,n=n&n}return Math.abs(n)%t}var Ug={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xe,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",s="minute",l="hour",c="day",u="week",f="month",p="quarter",d="year",h="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(A){var D=["th","st","nd","rd"],N=A%100;return"["+A+(D[(N-20)%10]||D[N]||D[0])+"]"}},b=function(A,D,N){var V=String(A);return!V||V.length>=D?A:""+Array(D+1-V.length).join(N)+A},k={s:b,z:function(A){var D=-A.utcOffset(),N=Math.abs(D),V=Math.floor(N/60),W=N%60;return(D<=0?"+":"-")+b(V,2,"0")+":"+b(W,2,"0")},m:function A(D,N){if(D.date()<N.date())return-A(N,D);var V=12*(N.year()-D.year())+(N.month()-D.month()),W=D.clone().add(V,f),j=N-W<0,x=D.clone().add(V+(j?-1:1),f);return+(-(V+(N-W)/(j?W-x:x-W))||0)},a:function(A){return A<0?Math.ceil(A)||0:Math.floor(A)},p:function(A){return{M:f,y:d,w:u,d:c,D:h,h:l,m:s,s:a,ms:i,Q:p}[A]||String(A||"").toLowerCase().replace(/s$/,"")},u:function(A){return A===void 0}},S="en",$={};$[S]=g;var C="$isDayjsObject",P=function(A){return A instanceof q||!(!A||!A[C])},F=function A(D,N,V){var W;if(!D)return S;if(typeof D=="string"){var j=D.toLowerCase();$[j]&&(W=j),N&&($[j]=N,W=j);var x=D.split("-");if(!W&&x.length>1)return A(x[0])}else{var z=D.name;$[z]=D,W=z}return!V&&W&&(S=W),W||!V&&S},T=function(A,D){if(P(A))return A.clone();var N=typeof D=="object"?D:{};return N.date=A,N.args=arguments,new q(N)},M=k;M.l=F,M.i=P,M.w=function(A,D){return T(A,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var q=function(){function A(N){this.$L=F(N.locale,null,!0),this.parse(N),this.$x=this.$x||N.x||{},this[C]=!0}var D=A.prototype;return D.parse=function(N){this.$d=function(V){var W=V.date,j=V.utc;if(W===null)return new Date(NaN);if(M.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var x=W.match(y);if(x){var z=x[2]-1||0,K=(x[7]||"0").substring(0,3);return j?new Date(Date.UTC(x[1],z,x[3]||1,x[4]||0,x[5]||0,x[6]||0,K)):new Date(x[1],z,x[3]||1,x[4]||0,x[5]||0,x[6]||0,K)}}return new Date(W)}(N),this.init()},D.init=function(){var N=this.$d;this.$y=N.getFullYear(),this.$M=N.getMonth(),this.$D=N.getDate(),this.$W=N.getDay(),this.$H=N.getHours(),this.$m=N.getMinutes(),this.$s=N.getSeconds(),this.$ms=N.getMilliseconds()},D.$utils=function(){return M},D.isValid=function(){return this.$d.toString()!==m},D.isSame=function(N,V){var W=T(N);return this.startOf(V)<=W&&W<=this.endOf(V)},D.isAfter=function(N,V){return T(N)<this.startOf(V)},D.isBefore=function(N,V){return this.endOf(V)<T(N)},D.$g=function(N,V,W){return M.u(N)?this[V]:this.set(W,N)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(N,V){var W=this,j=!!M.u(V)||V,x=M.p(N),z=function(he,le){var Q=M.w(W.$u?Date.UTC(W.$y,le,he):new Date(W.$y,le,he),W);return j?Q:Q.endOf(c)},K=function(he,le){return M.w(W.toDate()[he].apply(W.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(le)),W)},O=this.$W,J=this.$M,ae=this.$D,re="set"+(this.$u?"UTC":"");switch(x){case d:return j?z(1,0):z(31,11);case f:return j?z(1,J):z(0,J+1);case u:var ce=this.$locale().weekStart||0,pe=(O<ce?O+7:O)-ce;return z(j?ae-pe:ae+(6-pe),J);case c:case h:return K(re+"Hours",0);case l:return K(re+"Minutes",1);case s:return K(re+"Seconds",2);case a:return K(re+"Milliseconds",3);default:return this.clone()}},D.endOf=function(N){return this.startOf(N,!1)},D.$set=function(N,V){var W,j=M.p(N),x="set"+(this.$u?"UTC":""),z=(W={},W[c]=x+"Date",W[h]=x+"Date",W[f]=x+"Month",W[d]=x+"FullYear",W[l]=x+"Hours",W[s]=x+"Minutes",W[a]=x+"Seconds",W[i]=x+"Milliseconds",W)[j],K=j===c?this.$D+(V-this.$W):V;if(j===f||j===d){var O=this.clone().set(h,1);O.$d[z](K),O.init(),this.$d=O.set(h,Math.min(this.$D,O.daysInMonth())).$d}else z&&this.$d[z](K);return this.init(),this},D.set=function(N,V){return this.clone().$set(N,V)},D.get=function(N){return this[M.p(N)]()},D.add=function(N,V){var W,j=this;N=Number(N);var x=M.p(V),z=function(J){var ae=T(j);return M.w(ae.date(ae.date()+Math.round(J*N)),j)};if(x===f)return this.set(f,this.$M+N);if(x===d)return this.set(d,this.$y+N);if(x===c)return z(1);if(x===u)return z(7);var K=(W={},W[s]=r,W[l]=o,W[a]=n,W)[x]||1,O=this.$d.getTime()+N*K;return M.w(O,this)},D.subtract=function(N,V){return this.add(-1*N,V)},D.format=function(N){var V=this,W=this.$locale();if(!this.isValid())return W.invalidDate||m;var j=N||"YYYY-MM-DDTHH:mm:ssZ",x=M.z(this),z=this.$H,K=this.$m,O=this.$M,J=W.weekdays,ae=W.months,re=W.meridiem,ce=function(le,Q,G,fe){return le&&(le[Q]||le(V,j))||G[Q].slice(0,fe)},pe=function(le){return M.s(z%12||12,le,"0")},he=re||function(le,Q,G){var fe=le<12?"AM":"PM";return G?fe.toLowerCase():fe};return j.replace(v,function(le,Q){return Q||function(G){switch(G){case"YY":return String(V.$y).slice(-2);case"YYYY":return M.s(V.$y,4,"0");case"M":return O+1;case"MM":return M.s(O+1,2,"0");case"MMM":return ce(W.monthsShort,O,ae,3);case"MMMM":return ce(ae,O);case"D":return V.$D;case"DD":return M.s(V.$D,2,"0");case"d":return String(V.$W);case"dd":return ce(W.weekdaysMin,V.$W,J,2);case"ddd":return ce(W.weekdaysShort,V.$W,J,3);case"dddd":return J[V.$W];case"H":return String(z);case"HH":return M.s(z,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return he(z,K,!0);case"A":return he(z,K,!1);case"m":return String(K);case"mm":return M.s(K,2,"0");case"s":return String(V.$s);case"ss":return M.s(V.$s,2,"0");case"SSS":return M.s(V.$ms,3,"0");case"Z":return x}return null}(le)||x.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(N,V,W){var j,x=this,z=M.p(V),K=T(N),O=(K.utcOffset()-this.utcOffset())*r,J=this-K,ae=function(){return M.m(x,K)};switch(z){case d:j=ae()/12;break;case f:j=ae();break;case p:j=ae()/3;break;case u:j=(J-O)/6048e5;break;case c:j=(J-O)/864e5;break;case l:j=J/o;break;case s:j=J/r;break;case a:j=J/n;break;default:j=J}return W?j:M.a(j)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return $[this.$L]},D.locale=function(N,V){if(!N)return this.$L;var W=this.clone(),j=F(N,V,!0);return j&&(W.$L=j),W},D.clone=function(){return M.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},A}(),B=q.prototype;return T.prototype=B,[["$ms",i],["$s",a],["$m",s],["$H",l],["$W",c],["$M",f],["$y",d],["$D",h]].forEach(function(A){B[A[1]]=function(D){return this.$g(D,A[0],A[1])}}),T.extend=function(A,D){return A.$i||(A(D,q,T),A.$i=!0),T},T.locale=F,T.isDayjs=P,T.unix=function(A){return T(1e3*A)},T.en=$[S],T.Ls=$,T.p={},T})})(Ug);var tP=Ug.exports;const Fs=Le(tP);var zg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xe,function(){return function(n,r,o){r.prototype.isToday=function(){var i="YYYY-MM-DD",a=o();return this.format(i)===a.format(i)}}})})(zg);var nP=zg.exports;const rP=Le(nP);var Hg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xe,function(){return function(n,r,o){r.prototype.isYesterday=function(){var i="YYYY-MM-DD",a=o().subtract(1,"day");return this.format(i)===a.format(i)}}})})(Hg);var oP=Hg.exports;const iP=Le(oP);Fs.extend(rP),Fs.extend(iP);function aP(e,t="day"){if(!e||e.length===0)return[];const n=[];n.push(qg(e[0].timestamp));for(let r=0;r<e.length;r++)if(n.push(e[r]),r+1<e.length){const o=e[r].timestamp,i=e[r+1].timestamp;Fs(o).isSame(i,t)||n.push(qg(i))}return n}function qg(e){return{id:na(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:sP(e)}}}function sP(e,t=!1){const n=Fs(e),r="h:mma";return n.isToday()?t?`Today • ${n.format(r)}`:"Today":n.isYesterday()?t?`Yesterday • ${n.format(r)}`:"Yesterday":t?n.format(`YYYY-MM-DD • ${r}`):n.format("YYYY-MM-DD")}function lP(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(r=>Number.parseInt(r,16));const n=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(n)return n.splice(1).map(r=>Number.parseInt(r+r,16));if(e.includes(","))return e.split(",").map(r=>Number.parseInt(r));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function cP(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function uP(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function fP(e,t){return e.map(n=>Math.round(n*t))}const sa=e=>t=>uP(t,e),la=e=>t=>fP(t,e),dP={50:sa(.95),100:sa(.9),200:sa(.75),300:sa(.6),400:sa(.3),500:e=>e,600:la(.9),700:la(.6),800:la(.45),900:la(.3),950:la(.2)};function Wg(e,t=dP){const n={},r=lP(e);for(const[o,i]of Object.entries(t))n[o]=cP(i(r));return n}const Go=w.object({title:w.string().optional(),link:w.string().optional()}),yf=w.object({color:w.string().optional(),variant:w.enum(["soft","solid"]).optional(),themeMode:w.enum(["light","dark"]).optional(),fontFamily:w.enum(["rubik","inter","ibm","fira"]).optional(),radius:w.number().min(.5).max(4).optional()}),Vg=w.object({composerPlaceholder:w.string().optional(),botName:w.string().optional(),botAvatar:w.string().optional(),botDescription:w.string().optional(),website:Go.optional(),email:Go.optional(),phone:Go.optional(),privacyPolicy:Go.optional(),termsOfService:Go.optional(),showPoweredBy:w.boolean().optional()}).merge(yf),Kg=w.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),Gg=w.object({}).passthrough().transform(e=>e),ue=w.object({className:w.string().optional(),style:Gg.optional()}),Bs=w.object({container:ue.optional(),image:ue.optional(),fallback:ue.optional()}),Zg=w.object({button:ue.optional(),text:w.record(Kg,ue.optional()),image:w.object({image:ue.optional(),placeholder:ue.optional()}).optional(),audio:ue.optional(),video:ue.optional(),file:w.object({container:ue.optional(),title:ue.optional(),icon:ue.optional()}).optional(),location:w.object({container:ue.optional(),title:ue.optional(),icon:ue.optional()}).optional(),column:ue.optional(),row:ue.optional(),bubble:ue.optional(),carousel:w.object({container:ue.optional(),slidesContainer:ue.optional(),backButton:ue.optional(),nextButton:ue.optional()}).optional(),dropdown:w.object({button:w.object({container:ue.optional(),icon:ue.optional(),text:ue.optional()}).optional(),content:w.object({container:ue.optional(),item:ue.optional()}).optional()}).optional()}),Yg=w.object({container:ue.optional(),modal:w.object({overlay:ue.optional(),container:ue.optional(),dialog:w.object({container:ue.optional(),title:w.object({container:ue.optional(),text:ue.optional(),closeIcon:ue.optional()}).optional(),content:ue.optional(),newConversation:w.object({text:ue.optional(),button:ue.optional()}).optional()}).optional()}).optional(),notification:w.object({container:ue.optional(),title:ue.optional(),description:ue.optional(),icon:ue.optional(),closeIcon:ue.optional()}).optional(),header:w.object({container:ue.optional(),content:w.object({container:ue.optional(),title:ue.optional(),description:ue.optional(),avatar:Bs.optional(),actions:w.object({container:ue.optional(),icons:ue.optional()}).optional()}),expandedContent:w.object({container:ue.optional(),group:ue.optional(),descriptionItems:w.object({container:ue.optional(),icon:ue.optional(),text:ue.optional(),link:ue.optional(),poweredBy:ue.optional()}).optional()}).optional(),description:w.object({container:ue.optional(),title:ue.optional(),subtitle:ue.optional()}).optional(),newConversationIcon:ue.optional()}).optional(),composer:w.object({container:ue.optional(),input:ue.optional(),uploadButton:w.object({container:ue.optional(),icon:ue.optional()}).optional(),button:w.object({container:ue.optional(),icon:ue.optional()}).optional()}).optional(),fab:w.object({icon:ue.optional(),container:ue.optional()}).optional(),messageList:w.object({scrollbar:w.object({container:ue.optional(),viewport:ue.optional(),thumb:ue.optional(),corner:ue.optional(),background:ue.optional()}).optional(),container:ue.optional(),marquee:w.object({content:ue.optional(),title:ue.optional(),description:ue.optional(),avatar:Bs.optional(),container:ue.optional()}).optional(),scrollDownButton:w.object({container:ue.optional(),button:ue.optional(),icon:ue.optional()}).optional()}).optional(),message:w.object({container:ue.optional(),avatar:Bs.optional(),blocks:Zg.optional()}).optional(),loadingIndicator:w.object({container:ue.optional(),loader:ue.optional()}).optional()}),Jg=w.enum(["opened","closed","initial"]),Xg=w.object({name:w.string().optional(),pictureUrl:w.string().optional(),data:w.record(w.unknown()).optional()}),Qg=w.object({configuration:Vg.optional().catch(void 0),theme:Yg.optional().catch(void 0),style:w.string().optional().catch(void 0),user:Xg.optional().catch(void 0)}),pP=Qg.extend({clientId:w.string(),botId:w.string(),selector:w.string().optional().catch(void 0),webchatScriptUrl:w.string().optional().catch(void 0),fabScriptUrl:w.string().optional().catch(void 0),pushpinUrl:w.string().optional().catch(void 0),defaultState:Jg.optional().catch(void 0)});function eb(e){const{fontFamily:t,radius:n,themeMode:r,variant:o,color:i}=yf.parse(e);let a={},s={};if(i){const u=Wg(i),f=r==="dark"?Ag(u):u,p=Wg(NA(LA(vf(i)))),d=r==="dark"?Ag(p):p,h=r==="dark"?"#101010":"#fdfdfd";s=Object.entries({...f,1:h}).reduce((y,[v,g])=>({...y,[`--bpPrimary-${v}`]:g}),{});const m=Object.entries({...d,1:h}).reduce((y,[v,g])=>({...y,[`--bpGray-${v}`]:g}),{});a={...s,...m}}n&&(a={...a,"--bpRadius-scale":n.toString()});const l=s?Ng(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",c=o==="solid"?{"--header-bg":"var(--bpPrimary-600)","--header-bg-hover":"var(--bpPrimary-700)","--header-hover-dark":"var(--bpPrimary-800)","--header-title":l,"--header-description":l,"--header-description-icon":l,"--header-description-link":l,"--header-avatar-bg":"var(--bpPrimary-300)","--header-avatar-text":"var(--bpPrimary-700)","--message-bg":"var(--bpPrimary-600)","--message-bg-hover":"var(--bpPrimary-700)","--message-text":l,"--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-50)","--button-bg-hover":"var(--bpPrimary-100)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":l}:{"--header-bg":"var(--bpGray-50)","--header-bg-hover":"var(--bpGray-100)","--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-800)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)","--message-bg":"var(--bpPrimary-100)","--message-bg-hover":"var(--bpPrimary-200)","--message-text":"var(--bpPrimary-900)","--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-500)","--button-bg-hover":"var(--bpPrimary-600)","--button-text":s?Ng(s["--bpPrimary-500"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)","--fab-bg":"var(--bpPrimary-100)","--fab-bg-hover":"var(--bpPrimary-200)","--fab-icon":"var(--bpPrimary-700)"};return a={...a,...c},Fg(":root",a)+(t?Fg(".bpContainer",{"font-family":`var(--${t}-font)`}):"")}const gf=E.forwardRef(({userId:e,src:t,container:n,image:r,fallback:o,...i},a)=>{const s=Bg(e??"",15);return L.jsxs(Tg,{ref:a,"data-color":s,...n,...i,children:[L.jsx(Cg,{src:t,...r}),L.jsx(Ig,{...o,children:typeof i.children=="string"?i.children[0]:i.children})]})});function bfe(){}function wfe(){}function hP(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const mP=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vP=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yP={};function tb(e,t){return((t||yP).jsx?vP:mP).test(e)}const gP=/[ \t\n\f\r]/g;function bP(e){return typeof e=="object"?e.type==="text"?nb(e.value):!1:nb(e)}function nb(e){return e.replace(gP,"")===""}class ca{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}ca.prototype.property={},ca.prototype.normal={},ca.prototype.space=null;function rb(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new ca(n,r,t)}function bf(e){return e.toLowerCase()}class On{constructor(t,n){this.property=t,this.attribute=n}}On.prototype.space=null,On.prototype.boolean=!1,On.prototype.booleanish=!1,On.prototype.overloadedBoolean=!1,On.prototype.number=!1,On.prototype.commaSeparated=!1,On.prototype.spaceSeparated=!1,On.prototype.commaOrSpaceSeparated=!1,On.prototype.mustUseProperty=!1,On.prototype.defined=!1;let wP=0;const je=So(),xt=So(),ob=So(),ie=So(),ft=So(),Zo=So(),pn=So();function So(){return 2**++wP}const wf=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:xt,commaOrSpaceSeparated:pn,commaSeparated:Zo,number:ie,overloadedBoolean:ob,spaceSeparated:ft},Symbol.toStringTag,{value:"Module"})),xf=Object.keys(wf);class Sf extends On{constructor(t,n,r,o){let i=-1;if(super(t,n),ib(this,"space",o),typeof r=="number")for(;++i<xf.length;){const a=xf[i];ib(this,xf[i],(r&wf[a])===wf[a])}}}Sf.prototype.defined=!0;function ib(e,t,n){n&&(e[t]=n)}const xP={}.hasOwnProperty;function Yo(e){const t={},n={};let r;for(r in e.properties)if(xP.call(e.properties,r)){const o=e.properties[r],i=new Sf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[bf(r)]=r,n[bf(i.attribute)]=r}return new ca(t,n,e.space)}const ab=Yo({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),sb=Yo({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function lb(e,t){return t in e?e[t]:t}function cb(e,t){return lb(e,t.toLowerCase())}const ub=Yo({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:cb,properties:{xmlns:null,xmlnsXLink:null}}),fb=Yo({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:xt,ariaAutoComplete:null,ariaBusy:xt,ariaChecked:xt,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:ft,ariaCurrent:null,ariaDescribedBy:ft,ariaDetails:null,ariaDisabled:xt,ariaDropEffect:ft,ariaErrorMessage:null,ariaExpanded:xt,ariaFlowTo:ft,ariaGrabbed:xt,ariaHasPopup:null,ariaHidden:xt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ft,ariaLevel:ie,ariaLive:null,ariaModal:xt,ariaMultiLine:xt,ariaMultiSelectable:xt,ariaOrientation:null,ariaOwns:ft,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:xt,ariaReadOnly:xt,ariaRelevant:null,ariaRequired:xt,ariaRoleDescription:ft,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:xt,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null}}),SP=Yo({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:cb,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Zo,acceptCharset:ft,accessKey:ft,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:ft,autoFocus:je,autoPlay:je,capture:je,charSet:null,checked:je,cite:null,className:ft,cols:ie,colSpan:null,content:null,contentEditable:xt,controls:je,controlsList:ft,coords:ie|Zo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:ob,draggable:xt,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:ft,height:ie,hidden:je,high:ie,href:null,hrefLang:null,htmlFor:ft,httpEquiv:ft,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:ft,itemRef:ft,itemScope:je,itemType:ft,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:je,optimum:ie,pattern:null,ping:ft,placeholder:null,playsInline:je,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:ft,required:je,reversed:je,rows:ie,rowSpan:ie,sandbox:ft,scope:null,scoped:je,seamless:je,selected:je,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:xt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:xt,width:ie,wrap:null,align:null,aLink:null,archive:ft,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:xt,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:je,disableRemotePlayback:je,prefix:null,property:null,results:ie,security:null,unselectable:null}}),EP=Yo({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:lb,properties:{about:pn,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:ft,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Zo,g2:Zo,glyphName:Zo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:pn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ie,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ft,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:pn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:pn,rev:pn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:pn,requiredFeatures:pn,requiredFonts:pn,requiredFormats:pn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:pn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:pn,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:pn,to:null,transform:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),$P=/^data[-\w.:]+$/i,db=/-[a-z]/g,OP=/[A-Z]/g;function kP(e,t){const n=bf(t);let r=t,o=On;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&$P.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(db,TP);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!db.test(i)){let a=i.replace(OP,_P);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Sf}return new o(r,t)}function _P(e){return"-"+e.toLowerCase()}function TP(e){return e.charAt(1).toUpperCase()}const CP={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},IP=rb([sb,ab,ub,fb,SP],"html"),Ef=rb([sb,ab,ub,fb,EP],"svg");function AP(e){return e.join(" ").trim()}var pb={},hb=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,PP=/\n/g,RP=/^\s*/,MP=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,DP=/^:\s*/,jP=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,NP=/^[;\s]*/,LP=/^\s+|\s+$/g,FP=`
28
+ `,mb="/",vb="*",Eo="",BP="comment",UP="declaration",zP=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(h){var m=h.match(PP);m&&(n+=m.length);var y=h.lastIndexOf(FP);r=~y?h.length-y:r+h.length}function i(){var h={line:n,column:r};return function(m){return m.position=new a(h),c(),m}}function a(h){this.start=h,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(h){var m=new Error(t.source+":"+n+":"+r+": "+h);if(m.reason=h,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function l(h){var m=h.exec(e);if(m){var y=m[0];return o(y),e=e.slice(y.length),m}}function c(){l(RP)}function u(h){var m;for(h=h||[];m=f();)m!==!1&&h.push(m);return h}function f(){var h=i();if(!(mb!=e.charAt(0)||vb!=e.charAt(1))){for(var m=2;Eo!=e.charAt(m)&&(vb!=e.charAt(m)||mb!=e.charAt(m+1));)++m;if(m+=2,Eo===e.charAt(m-1))return s("End of comment missing");var y=e.slice(2,m-2);return r+=2,o(y),e=e.slice(m),r+=2,h({type:BP,comment:y})}}function p(){var h=i(),m=l(MP);if(m){if(f(),!l(DP))return s("property missing ':'");var y=l(jP),v=h({type:UP,property:yb(m[0].replace(hb,Eo)),value:y?yb(y[0].replace(hb,Eo)):Eo});return l(NP),v}}function d(){var h=[];u(h);for(var m;m=p();)m!==!1&&(h.push(m),u(h));return h}return c(),d()};function yb(e){return e?e.replace(LP,Eo):Eo}var HP=Xe&&Xe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pb,"__esModule",{value:!0});var qP=HP(zP);function WP(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,qP.default)(e),o=typeof t=="function";return r.forEach(function(i){if(i.type==="declaration"){var a=i.property,s=i.value;o?t(a,s,i):s&&(n=n||{},n[a]=s)}}),n}var gb=pb.default=WP;const VP=gb.default||gb,bb=wb("end"),$f=wb("start");function wb(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function KP(e){const t=$f(e),n=bb(e);if(t&&n)return{start:t,end:n}}function ua(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?xb(e.position):"start"in e||"end"in e?xb(e):"line"in e||"column"in e?Of(e):""}function Of(e){return Sb(e&&e.line)+":"+Sb(e&&e.column)}function xb(e){return Of(e&&e.start)+"-"+Of(e&&e.end)}function Sb(e){return e&&typeof e=="number"?e:1}class Vt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},a=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?o=t:!i.cause&&t&&(a=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=s?s.line:void 0,this.name=ua(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}Vt.prototype.file="",Vt.prototype.name="",Vt.prototype.reason="",Vt.prototype.message="",Vt.prototype.stack="",Vt.prototype.column=void 0,Vt.prototype.line=void 0,Vt.prototype.ancestors=void 0,Vt.prototype.cause=void 0,Vt.prototype.fatal=void 0,Vt.prototype.place=void 0,Vt.prototype.ruleId=void 0,Vt.prototype.source=void 0;const kf={}.hasOwnProperty,GP=new Map,ZP=/[A-Z]/g,YP=/-([a-z])/g,JP=new Set(["table","tbody","thead","tfoot","tr"]),XP=new Set(["td","th"]),Eb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function QP(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=sR(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=aR(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ef:IP,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=$b(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function $b(e,t,n){if(t.type==="element")return eR(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return tR(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return rR(e,t,n);if(t.type==="mdxjsEsm")return nR(e,t);if(t.type==="root")return oR(e,t,n);if(t.type==="text")return iR(e,t)}function eR(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Ef,e.schema=o),e.ancestors.push(t);const i=kb(e,t.tagName,!1),a=lR(e,t);let s=Tf(e,t);return JP.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!bP(l):!0})),Ob(e,a,i,t),_f(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function tR(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}fa(e,t.position)}function nR(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);fa(e,t.position)}function rR(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Ef,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:kb(e,t.name,!0),a=cR(e,t),s=Tf(e,t);return Ob(e,a,i,t),_f(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function oR(e,t,n){const r={};return _f(r,Tf(e,t)),e.create(t,e.Fragment,r,n)}function iR(e,t){return t.value}function Ob(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function _f(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function aR(e,t,n){return r;function r(o,i,a,s){const c=Array.isArray(a.children)?n:t;return s?c(i,a,s):c(i,a)}}function sR(e,t){return n;function n(r,o,i,a){const s=Array.isArray(i.children),l=$f(r);return t(o,i,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function lR(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&kf.call(t.properties,o)){const i=uR(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&XP.has(t.tagName)?r=s:n[a]=s}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function cR(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else fa(e,t.position);else{const o=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,i=e.evaluater.evaluateExpression(s.expression)}else fa(e,t.position);else i=r.value===null?!0:r.value;n[o]=i}return n}function Tf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:GP;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const c=o.get(l)||0;a=l+"-"+c,o.set(l,c+1)}}const s=$b(e,i,a);s!==void 0&&n.push(s)}return n}function uR(e,t,n){const r=kP(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?hP(n):AP(n)),r.property==="style"){let o=typeof n=="object"?n:fR(e,String(n));return e.stylePropertyNameCase==="css"&&(o=dR(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?CP[r.property]||r.property:r.attribute,n]}}function fR(e,t){const n={};try{VP(t,r)}catch(o){if(!e.ignoreInvalidStyle){const i=o,a=new Vt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Eb+"#cannot-parse-style-attribute",a}}return n;function r(o,i){let a=o;a.slice(0,2)!=="--"&&(a.slice(0,4)==="-ms-"&&(a="ms-"+a.slice(4)),a=a.replace(YP,hR)),n[a]=i}}function kb(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let i=-1,a;for(;++i<o.length;){const s=tb(o[i])?{type:"Identifier",name:o[i]}:{type:"Literal",value:o[i]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}r=a}else r=tb(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return kf.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);fa(e)}function fa(e,t){const n=new Vt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Eb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function dR(e){const t={};let n;for(n in e)kf.call(e,n)&&(t[pR(n)]=e[n]);return t}function pR(e){let t=e.replace(ZP,mR);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function hR(e,t){return t.toUpperCase()}function mR(e){return"-"+e.toLowerCase()}const Cf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},vR={};function If(e,t){const n=t||vR,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return _b(e,r,o)}function _b(e,t,n){if(yR(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Tb(e.children,t,n)}return Array.isArray(e)?Tb(e,t,n):""}function Tb(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=_b(e[o],t,n);return r.join("")}function yR(e){return!!(e&&typeof e=="object")}const Cb=document.createElement("i");function Af(e){const t="&"+e+";";Cb.innerHTML=t;const n=Cb.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function hn(e,t,n,r){const o=e.length;let i=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function kn(e,t){return e.length>0?(hn(e,e.length,0,t),e):t}const Ib={}.hasOwnProperty;function Ab(e){const t={};let n=-1;for(;++n<e.length;)gR(t,e[n]);return t}function gR(e,t){let n;for(n in t){const o=(Ib.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){Ib.call(o,a)||(o[a]=[]);const s=i[a];bR(o[a],Array.isArray(s)?s:s?[s]:[])}}}function bR(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);hn(e,0,0,r)}function Pb(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Nn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const nn=Kr(/[A-Za-z]/),Kt=Kr(/[\dA-Za-z]/),wR=Kr(/[#-'*+\--9=?A-Z^-~]/);function Us(e){return e!==null&&(e<32||e===127)}const Pf=Kr(/\d/),xR=Kr(/[\dA-Fa-f]/),SR=Kr(/[!-/:-@[-`{-~]/);function $e(e){return e!==null&&e<-2}function at(e){return e!==null&&(e<0||e===32)}function Fe(e){return e===-2||e===-1||e===32}const zs=Kr(/\p{P}|\p{S}/u),$o=Kr(/\s/);function Kr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Jo(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(i===37&&Kt(e.charCodeAt(n+1))&&Kt(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(a=String.fromCharCode(i,s),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function He(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(l){return Fe(l)?(e.enter(n),s(l)):t(l)}function s(l){return Fe(l)&&i++<o?(e.consume(l),s):(e.exit(n),t(l))}}const ER={tokenize:$R};function $R(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),He(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),i(s)}function i(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return $e(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),a)}}const OR={tokenize:kR},Rb={tokenize:_R};function kR(e){const t=this,n=[];let r=0,o,i,a;return s;function s(b){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,l,c)(b)}return c(b)}function l(b){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&g();const k=t.events.length;let S=k,$;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){$=t.events[S][1].end;break}v(r);let C=k;for(;C<t.events.length;)t.events[C][1].end=Object.assign({},$),C++;return hn(t.events,S+1,0,t.events.slice(k)),t.events.length=C,c(b)}return s(b)}function c(b){if(r===n.length){if(!o)return p(b);if(o.currentConstruct&&o.currentConstruct.concrete)return h(b);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Rb,u,f)(b)}function u(b){return o&&g(),v(r),p(b)}function f(b){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,h(b)}function p(b){return t.containerState={},e.attempt(Rb,d,h)(b)}function d(b){return r++,n.push([t.currentConstruct,t.containerState]),p(b)}function h(b){if(b===null){o&&g(),v(0),e.consume(b);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:o}),m(b)}function m(b){if(b===null){y(e.exit("chunkFlow"),!0),v(0),e.consume(b);return}return $e(b)?(e.consume(b),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(b),m)}function y(b,k){const S=t.sliceStream(b);if(k&&S.push(null),b.previous=i,i&&(i.next=b),i=b,o.defineSkip(b.start),o.write(S),t.parser.lazy[b.start.line]){let $=o.events.length;for(;$--;)if(o.events[$][1].start.offset<a&&(!o.events[$][1].end||o.events[$][1].end.offset>a))return;const C=t.events.length;let P=C,F,T;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(F){T=t.events[P][1].end;break}F=!0}for(v(r),$=C;$<t.events.length;)t.events[$][1].end=Object.assign({},T),$++;hn(t.events,P+1,0,t.events.slice(C)),t.events.length=$}}function v(b){let k=n.length;for(;k-- >b;){const S=n[k];t.containerState=S[1],S[0].exit.call(t,e)}n.length=b}function g(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function _R(e,t,n){return He(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Hs(e){if(e===null||at(e)||$o(e))return 1;if(zs(e))return 2}function qs(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const Rf={name:"attention",tokenize:CR,resolveAll:TR};function TR(e,t){let n=-1,r,o,i,a,s,l,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),p=Object.assign({},e[n][1].start);Mb(f,-l),Mb(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:p},i={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o={type:l>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},a.start),e[n][1].start=Object.assign({},s.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=kn(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=kn(c,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),c=kn(c,qs(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=kn(c,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=kn(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,hn(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function CR(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Hs(r);let i;return a;function a(l){return i=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===i)return e.consume(l),s;const c=e.exit("attentionSequence"),u=Hs(l),f=!u||u===2&&o||n.includes(l),p=!o||o===2&&u||n.includes(r);return c._open=!!(i===42?f:f&&(o||!p)),c._close=!!(i===42?p:p&&(u||!f)),t(l)}}function Mb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const IR={name:"autolink",tokenize:AR};function AR(e,t,n){let r=0;return o;function o(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(d){return nn(d)?(e.consume(d),a):c(d)}function a(d){return d===43||d===45||d===46||Kt(d)?(r=1,s(d)):c(d)}function s(d){return d===58?(e.consume(d),r=0,l):(d===43||d===45||d===46||Kt(d))&&r++<32?(e.consume(d),s):(r=0,c(d))}function l(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||Us(d)?n(d):(e.consume(d),l)}function c(d){return d===64?(e.consume(d),u):wR(d)?(e.consume(d),c):n(d)}function u(d){return Kt(d)?f(d):n(d)}function f(d){return d===46?(e.consume(d),r=0,u):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||Kt(d))&&r++<63){const h=d===45?p:f;return e.consume(d),h}return n(d)}}const da={tokenize:PR,partial:!0};function PR(e,t,n){return r;function r(i){return Fe(i)?He(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||$e(i)?t(i):n(i)}}const Db={name:"blockQuote",tokenize:RR,continuation:{tokenize:MR},exit:DR};function RR(e,t,n){const r=this;return o;function o(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return n(a)}function i(a){return Fe(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function MR(e,t,n){const r=this;return o;function o(a){return Fe(a)?He(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(Db,t,n)(a)}}function DR(e){e.exit("blockQuote")}const jb={name:"characterEscape",tokenize:jR};function jR(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return SR(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const Nb={name:"characterReference",tokenize:NR};function NR(e,t,n){const r=this;let o=0,i,a;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),l}function l(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),i=31,a=Kt,u(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=xR,u):(e.enter("characterReferenceValue"),i=7,a=Pf,u(f))}function u(f){if(f===59&&o){const p=e.exit("characterReferenceValue");return a===Kt&&!Af(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&o++<i?(e.consume(f),u):n(f)}}const Lb={tokenize:FR,partial:!0},Fb={name:"codeFenced",tokenize:LR,concrete:!0};function LR(e,t,n){const r=this,o={tokenize:S,partial:!0};let i=0,a=0,s;return l;function l($){return c($)}function c($){const C=r.events[r.events.length-1];return i=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,s=$,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u($)}function u($){return $===s?(a++,e.consume($),u):a<3?n($):(e.exit("codeFencedFenceSequence"),Fe($)?He(e,f,"whitespace")($):f($))}function f($){return $===null||$e($)?(e.exit("codeFencedFence"),r.interrupt?t($):e.check(Lb,m,k)($)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p($))}function p($){return $===null||$e($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f($)):Fe($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),He(e,d,"whitespace")($)):$===96&&$===s?n($):(e.consume($),p)}function d($){return $===null||$e($)?f($):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h($))}function h($){return $===null||$e($)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f($)):$===96&&$===s?n($):(e.consume($),h)}function m($){return e.attempt(o,k,y)($)}function y($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),v}function v($){return i>0&&Fe($)?He(e,g,"linePrefix",i+1)($):g($)}function g($){return $===null||$e($)?e.check(Lb,m,k)($):(e.enter("codeFlowValue"),b($))}function b($){return $===null||$e($)?(e.exit("codeFlowValue"),g($)):(e.consume($),b)}function k($){return e.exit("codeFenced"),t($)}function S($,C,P){let F=0;return T;function T(D){return $.enter("lineEnding"),$.consume(D),$.exit("lineEnding"),M}function M(D){return $.enter("codeFencedFence"),Fe(D)?He($,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):q(D)}function q(D){return D===s?($.enter("codeFencedFenceSequence"),B(D)):P(D)}function B(D){return D===s?(F++,$.consume(D),B):F>=a?($.exit("codeFencedFenceSequence"),Fe(D)?He($,A,"whitespace")(D):A(D)):P(D)}function A(D){return D===null||$e(D)?($.exit("codeFencedFence"),C(D)):P(D)}}}function FR(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Mf={name:"codeIndented",tokenize:UR},BR={tokenize:zR,partial:!0};function UR(e,t,n){const r=this;return o;function o(c){return e.enter("codeIndented"),He(e,i,"linePrefix",4+1)(c)}function i(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):$e(c)?e.attempt(BR,a,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||$e(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function zR(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):$e(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):He(e,i,"linePrefix",4+1)(a)}function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):$e(a)?o(a):n(a)}}const HR={name:"codeText",tokenize:VR,resolve:qR,previous:WR};function qR(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function WR(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function VR(e,t,n){let r=0,o,i;return a;function a(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),l):f===96?(i=e.enter("codeTextSequence"),o=0,u(f)):$e(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||$e(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),c)}function u(f){return f===96?(e.consume(f),o++,u):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(i.type="codeTextData",c(f))}}function Bb(e){const t={};let n=-1,r,o,i,a,s,l,c;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,KR(e,n)),n=t[n],c=!0);else if(r[1]._container){for(i=n,o=void 0;i--&&(a=e[i],a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(o&&(e[o][1].type="lineEndingBlank"),a[1].type="lineEnding",o=i);o&&(r[1].end=Object.assign({},e[o][1].start),s=e.slice(o,n),s.unshift(r),hn(e,o,n-o+1,s))}}return!c}function KR(e,t){const n=e[t][1],r=e[t][2];let o=t-1;const i=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,l=[],c={};let u,f,p=-1,d=n,h=0,m=0;const y=[m];for(;d;){for(;e[++o][1]!==d;);i.push(o),d._tokenizer||(u=r.sliceStream(d),d.next||u.push(null),f&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,y.push(m),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(a.events=[],d?(d._tokenizer=void 0,d.previous=void 0):y.pop(),p=y.length;p--;){const v=s.slice(y[p],y[p+1]),g=i.pop();l.unshift([g,g+v.length-1]),hn(e,g,2,v)}for(p=-1;++p<l.length;)c[h+l[p][0]]=h+l[p][1],h+=l[p][1]-l[p][0]-1;return c}const GR={tokenize:JR,resolve:YR},ZR={tokenize:XR,partial:!0};function YR(e){return Bb(e),e}function JR(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(s)}function o(s){return s===null?i(s):$e(s)?e.check(ZR,a,i)(s):(e.consume(s),o)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function XR(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),He(e,i,"linePrefix")}function i(a){if(a===null||$e(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Ub(e,t,n,r,o,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return f;function f(v){return v===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(v),e.exit(i),p):v===null||v===32||v===41||Us(v)?n(v):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),m(v))}function p(v){return v===62?(e.enter(i),e.consume(v),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(v))}function d(v){return v===62?(e.exit("chunkString"),e.exit(s),p(v)):v===null||v===60||$e(v)?n(v):(e.consume(v),v===92?h:d)}function h(v){return v===60||v===62||v===92?(e.consume(v),d):d(v)}function m(v){return!u&&(v===null||v===41||at(v))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(v)):u<c&&v===40?(e.consume(v),u++,m):v===41?(e.consume(v),u--,m):v===null||v===32||v===40||Us(v)?n(v):(e.consume(v),v===92?y:m)}function y(v){return v===40||v===41||v===92?(e.consume(v),m):m(v)}}function zb(e,t,n,r,o,i){const a=this;let s=0,l;return c;function c(d){return e.enter(r),e.enter(o),e.consume(d),e.exit(o),e.enter(i),u}function u(d){return s>999||d===null||d===91||d===93&&!l||d===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):d===93?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):$e(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||$e(d)||s++>999?(e.exit("chunkString"),u(d)):(e.consume(d),l||(l=!Fe(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(e.consume(d),s++,f):f(d)}}function Hb(e,t,n,r,o,i){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(o),e.consume(p),e.exit(o),a=p===40?41:p,l):n(p)}function l(p){return p===a?(e.enter(o),e.consume(p),e.exit(o),e.exit(r),t):(e.enter(i),c(p))}function c(p){return p===a?(e.exit(i),l(a)):p===null?n(p):$e(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),He(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===a||p===null||$e(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?f:u)}function f(p){return p===a||p===92?(e.consume(p),u):u(p)}}function pa(e,t){let n;return r;function r(o){return $e(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Fe(o)?He(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const QR={name:"definition",tokenize:t2},e2={tokenize:n2,partial:!0};function t2(e,t,n){const r=this;let o;return i;function i(d){return e.enter("definition"),a(d)}function a(d){return zb.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return o=Nn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),l):n(d)}function l(d){return at(d)?pa(e,c)(d):c(d)}function c(d){return Ub(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function u(d){return e.attempt(e2,f,f)(d)}function f(d){return Fe(d)?He(e,p,"whitespace")(d):p(d)}function p(d){return d===null||$e(d)?(e.exit("definition"),r.parser.defined.push(o),t(d)):n(d)}}function n2(e,t,n){return r;function r(s){return at(s)?pa(e,o)(s):n(s)}function o(s){return Hb(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return Fe(s)?He(e,a,"whitespace")(s):a(s)}function a(s){return s===null||$e(s)?t(s):n(s)}}const r2={name:"hardBreakEscape",tokenize:o2};function o2(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return $e(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const i2={name:"headingAtx",tokenize:s2,resolve:a2};function a2(e,t){let n=e.length-2,r=3,o,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},hn(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function s2(e,t,n){let r=0;return o;function o(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&r++<6?(e.consume(u),a):u===null||at(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||$e(u)?(e.exit("atxHeading"),t(u)):Fe(u)?He(e,s,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),s(u))}function c(u){return u===null||u===35||at(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),c)}}const l2=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],qb=["pre","script","style","textarea"],c2={name:"htmlFlow",tokenize:p2,resolveTo:d2,concrete:!0},u2={tokenize:m2,partial:!0},f2={tokenize:h2,partial:!0};function d2(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function p2(e,t,n){const r=this;let o,i,a,s,l;return c;function c(O){return u(O)}function u(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),f}function f(O){return O===33?(e.consume(O),p):O===47?(e.consume(O),i=!0,m):O===63?(e.consume(O),o=3,r.interrupt?t:x):nn(O)?(e.consume(O),a=String.fromCharCode(O),y):n(O)}function p(O){return O===45?(e.consume(O),o=2,d):O===91?(e.consume(O),o=5,s=0,h):nn(O)?(e.consume(O),o=4,r.interrupt?t:x):n(O)}function d(O){return O===45?(e.consume(O),r.interrupt?t:x):n(O)}function h(O){const J="CDATA[";return O===J.charCodeAt(s++)?(e.consume(O),s===J.length?r.interrupt?t:q:h):n(O)}function m(O){return nn(O)?(e.consume(O),a=String.fromCharCode(O),y):n(O)}function y(O){if(O===null||O===47||O===62||at(O)){const J=O===47,ae=a.toLowerCase();return!J&&!i&&qb.includes(ae)?(o=1,r.interrupt?t(O):q(O)):l2.includes(a.toLowerCase())?(o=6,J?(e.consume(O),v):r.interrupt?t(O):q(O)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):i?g(O):b(O))}return O===45||Kt(O)?(e.consume(O),a+=String.fromCharCode(O),y):n(O)}function v(O){return O===62?(e.consume(O),r.interrupt?t:q):n(O)}function g(O){return Fe(O)?(e.consume(O),g):T(O)}function b(O){return O===47?(e.consume(O),T):O===58||O===95||nn(O)?(e.consume(O),k):Fe(O)?(e.consume(O),b):T(O)}function k(O){return O===45||O===46||O===58||O===95||Kt(O)?(e.consume(O),k):S(O)}function S(O){return O===61?(e.consume(O),$):Fe(O)?(e.consume(O),S):b(O)}function $(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),l=O,C):Fe(O)?(e.consume(O),$):P(O)}function C(O){return O===l?(e.consume(O),l=null,F):O===null||$e(O)?n(O):(e.consume(O),C)}function P(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||at(O)?S(O):(e.consume(O),P)}function F(O){return O===47||O===62||Fe(O)?b(O):n(O)}function T(O){return O===62?(e.consume(O),M):n(O)}function M(O){return O===null||$e(O)?q(O):Fe(O)?(e.consume(O),M):n(O)}function q(O){return O===45&&o===2?(e.consume(O),N):O===60&&o===1?(e.consume(O),V):O===62&&o===4?(e.consume(O),z):O===63&&o===3?(e.consume(O),x):O===93&&o===5?(e.consume(O),j):$e(O)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(u2,K,B)(O)):O===null||$e(O)?(e.exit("htmlFlowData"),B(O)):(e.consume(O),q)}function B(O){return e.check(f2,A,K)(O)}function A(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),D}function D(O){return O===null||$e(O)?B(O):(e.enter("htmlFlowData"),q(O))}function N(O){return O===45?(e.consume(O),x):q(O)}function V(O){return O===47?(e.consume(O),a="",W):q(O)}function W(O){if(O===62){const J=a.toLowerCase();return qb.includes(J)?(e.consume(O),z):q(O)}return nn(O)&&a.length<8?(e.consume(O),a+=String.fromCharCode(O),W):q(O)}function j(O){return O===93?(e.consume(O),x):q(O)}function x(O){return O===62?(e.consume(O),z):O===45&&o===2?(e.consume(O),x):q(O)}function z(O){return O===null||$e(O)?(e.exit("htmlFlowData"),K(O)):(e.consume(O),z)}function K(O){return e.exit("htmlFlow"),t(O)}}function h2(e,t,n){const r=this;return o;function o(a){return $e(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):n(a)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function m2(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(da,t,n)}}const v2={name:"htmlText",tokenize:y2};function y2(e,t,n){const r=this;let o,i,a;return s;function s(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),l}function l(x){return x===33?(e.consume(x),c):x===47?(e.consume(x),S):x===63?(e.consume(x),b):nn(x)?(e.consume(x),P):n(x)}function c(x){return x===45?(e.consume(x),u):x===91?(e.consume(x),i=0,h):nn(x)?(e.consume(x),g):n(x)}function u(x){return x===45?(e.consume(x),d):n(x)}function f(x){return x===null?n(x):x===45?(e.consume(x),p):$e(x)?(a=f,V(x)):(e.consume(x),f)}function p(x){return x===45?(e.consume(x),d):f(x)}function d(x){return x===62?N(x):x===45?p(x):f(x)}function h(x){const z="CDATA[";return x===z.charCodeAt(i++)?(e.consume(x),i===z.length?m:h):n(x)}function m(x){return x===null?n(x):x===93?(e.consume(x),y):$e(x)?(a=m,V(x)):(e.consume(x),m)}function y(x){return x===93?(e.consume(x),v):m(x)}function v(x){return x===62?N(x):x===93?(e.consume(x),v):m(x)}function g(x){return x===null||x===62?N(x):$e(x)?(a=g,V(x)):(e.consume(x),g)}function b(x){return x===null?n(x):x===63?(e.consume(x),k):$e(x)?(a=b,V(x)):(e.consume(x),b)}function k(x){return x===62?N(x):b(x)}function S(x){return nn(x)?(e.consume(x),$):n(x)}function $(x){return x===45||Kt(x)?(e.consume(x),$):C(x)}function C(x){return $e(x)?(a=C,V(x)):Fe(x)?(e.consume(x),C):N(x)}function P(x){return x===45||Kt(x)?(e.consume(x),P):x===47||x===62||at(x)?F(x):n(x)}function F(x){return x===47?(e.consume(x),N):x===58||x===95||nn(x)?(e.consume(x),T):$e(x)?(a=F,V(x)):Fe(x)?(e.consume(x),F):N(x)}function T(x){return x===45||x===46||x===58||x===95||Kt(x)?(e.consume(x),T):M(x)}function M(x){return x===61?(e.consume(x),q):$e(x)?(a=M,V(x)):Fe(x)?(e.consume(x),M):F(x)}function q(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),o=x,B):$e(x)?(a=q,V(x)):Fe(x)?(e.consume(x),q):(e.consume(x),A)}function B(x){return x===o?(e.consume(x),o=void 0,D):x===null?n(x):$e(x)?(a=B,V(x)):(e.consume(x),B)}function A(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||at(x)?F(x):(e.consume(x),A)}function D(x){return x===47||x===62||at(x)?F(x):n(x)}function N(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function V(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),W}function W(x){return Fe(x)?He(e,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):j(x)}function j(x){return e.enter("htmlTextData"),a(x)}}const Df={name:"labelEnd",tokenize:E2,resolveTo:S2,resolveAll:x2},g2={tokenize:$2},b2={tokenize:O2},w2={tokenize:k2};function x2(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function S2(e,t){let n=e.length,r=0,o,i,a,s;for(;n--;)if(o=e[n][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const l={type:e[i][1].type==="labelLink"?"link":"image",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[i][1].start),end:Object.assign({},e[a][1].end)},u={type:"labelText",start:Object.assign({},e[i+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",l,t],["enter",c,t]],s=kn(s,e.slice(i+1,i+r+3)),s=kn(s,[["enter",u,t]]),s=kn(s,qs(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),s=kn(s,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),s=kn(s,e.slice(a+1)),s=kn(s,[["exit",l,t]]),hn(e,i,e.length,s),e}function E2(e,t,n){const r=this;let o=r.events.length,i,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){i=r.events[o][1];break}return s;function s(p){return i?i._inactive?f(p):(a=r.parser.defined.includes(Nn(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt(g2,u,a?u:f)(p):p===91?e.attempt(b2,u,a?c:f)(p):a?u(p):f(p)}function c(p){return e.attempt(w2,u,f)(p)}function u(p){return t(p)}function f(p){return i._balanced=!0,n(p)}}function $2(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),o}function o(f){return at(f)?pa(e,i)(f):i(f)}function i(f){return f===41?u(f):Ub(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return at(f)?pa(e,l)(f):u(f)}function s(f){return n(f)}function l(f){return f===34||f===39||f===40?Hb(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function c(f){return at(f)?pa(e,u)(f):u(f)}function u(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function O2(e,t,n){const r=this;return o;function o(s){return zb.call(r,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(Nn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function k2(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const _2={name:"labelStartImage",tokenize:T2,resolveAll:Df.resolveAll};function T2(e,t,n){const r=this;return o;function o(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const C2={name:"labelStartLink",tokenize:I2,resolveAll:Df.resolveAll};function I2(e,t,n){const r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const jf={name:"lineEnding",tokenize:A2};function A2(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),He(e,t,"linePrefix")}}const Ws={name:"thematicBreak",tokenize:P2};function P2(e,t,n){let r=0,o;return i;function i(c){return e.enter("thematicBreak"),a(c)}function a(c){return o=c,s(c)}function s(c){return c===o?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||$e(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===o?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),Fe(c)?He(e,s,"whitespace")(c):s(c))}}const an={name:"list",tokenize:D2,continuation:{tokenize:j2},exit:L2},R2={tokenize:F2,partial:!0},M2={tokenize:N2,partial:!0};function D2(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return s;function s(d){const h=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:Pf(d)){if(r.containerState.type||(r.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(Ws,n,c)(d):c(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(d)}return n(d)}function l(d){return Pf(d)&&++a<10?(e.consume(d),l):(!r.interrupt||a<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),c(d)):n(d)}function c(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(da,r.interrupt?n:u,e.attempt(R2,p,f))}function u(d){return r.containerState.initialBlankLine=!0,i++,p(d)}function f(d){return Fe(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function j2(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(da,o,i);function o(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,He(e,t,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!Fe(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(M2,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,He(e,e.attempt(an,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function N2(e,t,n){const r=this;return He(e,o,"listItemIndent",r.containerState.size+1);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(i):n(i)}}function L2(e){e.exit(this.containerState.type)}function F2(e,t,n){const r=this;return He(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function o(i){const a=r.events[r.events.length-1];return!Fe(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const Wb={name:"setextUnderline",tokenize:U2,resolveTo:B2};function B2(e,t){let n=e.length,r,o,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const a={type:"setextHeading",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function U2(e,t,n){const r=this;let o;return i;function i(c){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),o=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===o?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),Fe(c)?He(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||$e(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const z2={tokenize:H2};function H2(e){const t=this,n=e.attempt(da,r,e.attempt(this.parser.constructs.flowInitial,o,He(e,e.attempt(this.parser.constructs.flow,o,e.attempt(GR,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const q2={resolveAll:Kb()},W2=Vb("string"),V2=Vb("text");function Vb(e){return{tokenize:t,resolveAll:Kb(e==="text"?K2:void 0)};function t(n){const r=this,o=this.parser.constructs[e],i=n.attempt(o,a,s);return a;function a(u){return c(u)?i(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),i(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const f=o[u];let p=-1;if(f)for(;++p<f.length;){const d=f[p];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function Kb(e){return t;function t(n,r){let o=-1,i;for(;++o<=n.length;)i===void 0?n[o]&&n[o][1].type==="data"&&(i=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==i+2&&(n[i][1].end=n[o-1][1].end,n.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(n,r):n}}function K2(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let i=o.length,a=-1,s=0,l;for(;i--;){const c=o[i];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(c===-2)l=!0,s++;else if(c!==-1){i++;break}}if(s){const c={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+i,_bufferIndex:i?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}function G2(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const o={},i=[];let a=[],s=[];const l={consume:g,enter:b,exit:k,attempt:C(S),check:C($),interrupt:C($,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:d,sliceSerialize:p,now:h,defineSkip:m,write:f};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function f(M){return a=kn(a,M),y(),a[a.length-1]!==null?[]:(P(t,0),c.events=qs(i,c.events,c),c.events)}function p(M,q){return Y2(d(M),q)}function d(M){return Z2(a,M)}function h(){const{line:M,column:q,offset:B,_index:A,_bufferIndex:D}=r;return{line:M,column:q,offset:B,_index:A,_bufferIndex:D}}function m(M){o[M.line]=M.column,T()}function y(){let M;for(;r._index<a.length;){const q=a[r._index];if(typeof q=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<q.length;)v(q.charCodeAt(r._bufferIndex));else v(q)}}function v(M){u=u(M)}function g(M){$e(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,T()):M!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=M}function b(M,q){const B=q||{};return B.type=M,B.start=h(),c.events.push(["enter",B,c]),s.push(B),B}function k(M){const q=s.pop();return q.end=h(),c.events.push(["exit",q,c]),q}function S(M,q){P(M,q.from)}function $(M,q){q.restore()}function C(M,q){return B;function B(A,D,N){let V,W,j,x;return Array.isArray(A)?K(A):"tokenize"in A?K([A]):z(A);function z(re){return ce;function ce(pe){const he=pe!==null&&re[pe],le=pe!==null&&re.null,Q=[...Array.isArray(he)?he:he?[he]:[],...Array.isArray(le)?le:le?[le]:[]];return K(Q)(pe)}}function K(re){return V=re,W=0,re.length===0?N:O(re[W])}function O(re){return ce;function ce(pe){return x=F(),j=re,re.partial||(c.currentConstruct=re),re.name&&c.parser.constructs.disable.null.includes(re.name)?ae():re.tokenize.call(q?Object.assign(Object.create(c),q):c,l,J,ae)(pe)}}function J(re){return M(j,x),D}function ae(re){return x.restore(),++W<V.length?O(V[W]):N}}}function P(M,q){M.resolveAll&&!i.includes(M)&&i.push(M),M.resolve&&hn(c.events,q,c.events.length-q,M.resolve(c.events.slice(q),c)),M.resolveTo&&(c.events=M.resolveTo(c.events,c))}function F(){const M=h(),q=c.previous,B=c.currentConstruct,A=c.events.length,D=Array.from(s);return{restore:N,from:A};function N(){r=M,c.previous=q,c.currentConstruct=B,c.events.length=A,s=D,T()}}function T(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function Z2(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}function Y2(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
29
29
  `;break}case-3:{a=`\r
30
- `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(i)}o=i===-2,r.push(a)}return r.join("")}const YR=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:XI},disable:{null:[]},document:{42:dn,43:dn,45:dn,48:dn,49:dn,50:dn,51:dn,52:dn,53:dn,54:dn,55:dn,56:dn,57:dn,62:jb},flow:{35:oR,42:Sc,45:[Kb,Sc],60:cR,61:Kb,95:Sc,96:Ub,126:Ub},flowInitial:{[-2]:rd,[-1]:rd,32:rd},insideSpan:{null:[nd,qR]},string:{38:Lb,92:Fb},text:{[-5]:id,[-4]:id,[-3]:id,33:kR,38:Lb,42:nd,60:[TI,mR],91:OR,92:[nR,Fb],93:od,95:nd,96:zI}},Symbol.toStringTag,{value:"Module"}));function JR(e){const n=Rb([YR,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:o(SI),document:o(_I),flow:o(UR),string:o(HR),text:o(VR)};return r;function o(i){return a;function a(s){return KR(r,i,s)}}}function XR(e){for(;!zb(e););return e}const Yb=/[\0\t\n\r]/g;function QR(){let e=1,t="",n=!0,r;return o;function o(i,a,s){const c=[];let l,u,f,p,d;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),f=0,t="",n&&(i.charCodeAt(0)===65279&&f++,n=void 0);f<i.length;){if(Yb.lastIndex=f,l=Yb.exec(i),p=l&&l.index!==void 0?l.index:i.length,d=i.charCodeAt(p),!l){t=i.slice(f);break}if(d===10&&f===p&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),f<p&&(c.push(i.slice(f,p)),e+=p-f),d){case 0:{c.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,c.push(-2);e++<u;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}f=p+1}return s&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const eM=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function tM(e){return e.replace(eM,nM)}function nM(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),i=o===120||o===88;return Mb(n.slice(i?2:1),i?16:10)}return ed(n)||e}const Jb={}.hasOwnProperty;function rM(e,t,n){return typeof t!="string"&&(n=t,t=void 0),oM(n)(XR(JR(n).document().write(QR()(e,t,!0))))}function oM(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(oe),autolinkProtocol:B,autolinkEmail:B,atxHeading:i(ve),blockQuote:i(me),characterEscape:B,characterReference:B,codeFenced:i(ce),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(ce,a),codeText:i(Q,a),codeTextData:B,data:B,codeFlowValue:B,definition:i(G),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(fe),hardBreakEscape:i(_e),hardBreakTrailing:i(_e),htmlFlow:i(I,a),htmlFlowData:B,htmlText:i(I,a),htmlTextData:B,image:i(X),label:a,link:i(oe),listItem:i(Se),listItemValue:p,listOrdered:i(ee,f),listUnordered:i(ee),paragraph:i(xe),reference:_,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(ve),strong:i(ke),thematicBreak:i(Te)},exit:{atxHeading:c(),atxHeadingSequence:S,autolink:c(),autolinkEmail:pe,autolinkProtocol:le,blockQuote:c(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:re,codeFenced:c(v),codeFencedFence:m,codeFencedFenceInfo:d,codeFencedFenceMeta:h,codeFlowValue:O,codeIndented:c(y),codeText:c(N),codeTextData:O,data:O,definition:c(),definitionDestinationString:k,definitionLabelString:g,definitionTitleString:b,emphasis:c(),hardBreakEscape:c(H),hardBreakTrailing:c(H),htmlFlow:c(L),htmlFlowData:O,htmlText:c(P),htmlTextData:O,image:c(W),label:D,labelText:V,lineEnding:M,link:c(j),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:J,resourceDestinationString:w,resourceTitleString:z,resource:K,setextHeading:c(R),setextHeadingLineSequence:T,setextHeadingText:$,strong:c(),thematicBreak:c()}};Xb(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(U){let Z={type:"root",children:[]};const q={stack:[Z],tokenStack:[],config:t,enter:s,exit:l,buffer:a,resume:u,data:n},te=[];let de=-1;for(;++de<U.length;)if(U[de][1].type==="listOrdered"||U[de][1].type==="listUnordered")if(U[de][0]==="enter")te.push(de);else{const Ie=te.pop();de=o(U,Ie,de)}for(de=-1;++de<U.length;){const Ie=t[U[de][0]];Jb.call(Ie,U[de][1].type)&&Ie[U[de][1].type].call(Object.assign({sliceSerialize:U[de][2].sliceSerialize},q),U[de][1])}if(q.tokenStack.length>0){const Ie=q.tokenStack[q.tokenStack.length-1];(Ie[1]||Qb).call(q,void 0,Ie[0])}for(Z.position={start:oo(U.length>0?U[0][1].start:{line:1,column:1,offset:0}),end:oo(U.length>0?U[U.length-2][1].end:{line:1,column:1,offset:0})},de=-1;++de<t.transforms.length;)Z=t.transforms[de](Z)||Z;return Z}function o(U,Z,q){let te=Z-1,de=-1,Ie=!1,Ce,Be,ut,Nt;for(;++te<=q;){const ot=U[te];switch(ot[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ot[0]==="enter"?de++:de--,Nt=void 0;break}case"lineEndingBlank":{ot[0]==="enter"&&(Ce&&!Nt&&!de&&!ut&&(ut=te),Nt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Nt=void 0}if(!de&&ot[0]==="enter"&&ot[1].type==="listItemPrefix"||de===-1&&ot[0]==="exit"&&(ot[1].type==="listUnordered"||ot[1].type==="listOrdered")){if(Ce){let nt=te;for(Be=void 0;nt--;){const pt=U[nt];if(pt[1].type==="lineEnding"||pt[1].type==="lineEndingBlank"){if(pt[0]==="exit")continue;Be&&(U[Be][1].type="lineEndingBlank",Ie=!0),pt[1].type="lineEnding",Be=nt}else if(!(pt[1].type==="linePrefix"||pt[1].type==="blockQuotePrefix"||pt[1].type==="blockQuotePrefixWhitespace"||pt[1].type==="blockQuoteMarker"||pt[1].type==="listItemIndent"))break}ut&&(!Be||ut<Be)&&(Ce._spread=!0),Ce.end=Object.assign({},Be?U[Be][1].start:ot[1].end),U.splice(Be||te,0,["exit",Ce,ot[2]]),te++,q++}if(ot[1].type==="listItemPrefix"){const nt={type:"listItem",_spread:!1,start:Object.assign({},ot[1].start),end:void 0};Ce=nt,U.splice(te,0,["enter",nt,ot[2]]),te++,q++,ut=void 0,Nt=!0}}}return U[Z][1]._spread=Ie,q}function i(U,Z){return q;function q(te){s.call(this,U(te),te),Z&&Z.call(this,te)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(U,Z,q){this.stack[this.stack.length-1].children.push(U),this.stack.push(U),this.tokenStack.push([Z,q]),U.position={start:oo(Z.start),end:void 0}}function c(U){return Z;function Z(q){U&&U.call(this,q),l.call(this,q)}}function l(U,Z){const q=this.stack.pop(),te=this.tokenStack.pop();if(te)te[0].type!==U.type&&(Z?Z.call(this,U,te[0]):(te[1]||Qb).call(this,U,te[0]));else throw new Error("Cannot close `"+U.type+"` ("+Na({start:U.start,end:U.end})+"): it’s not open");q.position.end=oo(U.end)}function u(){return Qf(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(U){if(this.data.expectingFirstListItemValue){const Z=this.stack[this.stack.length-2];Z.start=Number.parseInt(this.sliceSerialize(U),10),this.data.expectingFirstListItemValue=void 0}}function d(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.lang=U}function h(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.meta=U}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.value=U.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.value=U.replace(/(\r?\n|\r)$/g,"")}function g(U){const Z=this.resume(),q=this.stack[this.stack.length-1];q.label=Z,q.identifier=Vn(this.sliceSerialize(U)).toLowerCase()}function b(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.title=U}function k(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.url=U}function S(U){const Z=this.stack[this.stack.length-1];if(!Z.depth){const q=this.sliceSerialize(U).length;Z.depth=q}}function $(){this.data.setextHeadingSlurpLineEnding=!0}function T(U){const Z=this.stack[this.stack.length-1];Z.depth=this.sliceSerialize(U).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function B(U){const q=this.stack[this.stack.length-1].children;let te=q[q.length-1];(!te||te.type!=="text")&&(te=Fe(),te.position={start:oo(U.start),end:void 0},q.push(te)),this.stack.push(te)}function O(U){const Z=this.stack.pop();Z.value+=this.sliceSerialize(U),Z.position.end=oo(U.end)}function M(U){const Z=this.stack[this.stack.length-1];if(this.data.atHardBreak){const q=Z.children[Z.children.length-1];q.position.end=oo(U.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Z.type)&&(B.call(this,U),O.call(this,U))}function H(){this.data.atHardBreak=!0}function L(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.value=U}function P(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.value=U}function N(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.value=U}function j(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const Z=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=Z,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function W(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const Z=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=Z,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function V(U){const Z=this.sliceSerialize(U),q=this.stack[this.stack.length-2];q.label=tM(Z),q.identifier=Vn(Z).toLowerCase()}function D(){const U=this.stack[this.stack.length-1],Z=this.resume(),q=this.stack[this.stack.length-1];if(this.data.inReference=!0,q.type==="link"){const te=U.children;q.children=te}else q.alt=Z}function w(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.url=U}function z(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.title=U}function K(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function J(U){const Z=this.resume(),q=this.stack[this.stack.length-1];q.label=Z,q.identifier=Vn(this.sliceSerialize(U)).toLowerCase(),this.data.referenceType="full"}function ae(U){this.data.characterReferenceType=U.type}function re(U){const Z=this.sliceSerialize(U),q=this.data.characterReferenceType;let te;q?(te=Mb(Z,q==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):te=ed(Z);const de=this.stack.pop();de.value+=te,de.position.end=oo(U.end)}function le(U){O.call(this,U);const Z=this.stack[this.stack.length-1];Z.url=this.sliceSerialize(U)}function pe(U){O.call(this,U);const Z=this.stack[this.stack.length-1];Z.url="mailto:"+this.sliceSerialize(U)}function me(){return{type:"blockquote",children:[]}}function ce(){return{type:"code",lang:null,meta:null,value:""}}function Q(){return{type:"inlineCode",value:""}}function G(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function fe(){return{type:"emphasis",children:[]}}function ve(){return{type:"heading",depth:0,children:[]}}function _e(){return{type:"break"}}function I(){return{type:"html",value:""}}function X(){return{type:"image",title:null,url:"",alt:null}}function oe(){return{type:"link",title:null,url:"",children:[]}}function ee(U){return{type:"list",ordered:U.type==="listOrdered",start:null,spread:U._spread,children:[]}}function Se(U){return{type:"listItem",spread:U._spread,checked:null,children:[]}}function xe(){return{type:"paragraph",children:[]}}function ke(){return{type:"strong",children:[]}}function Fe(){return{type:"text",value:""}}function Te(){return{type:"thematicBreak"}}}function oo(e){return{line:e.line,column:e.column,offset:e.offset}}function Xb(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Xb(e,r):iM(e,r)}}function iM(e,t){let n;for(n in t)if(Jb.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Qb(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Na({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Na({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Na({start:t.start,end:t.end})+") is still open")}function aM(e){const t=this;t.parser=n;function n(r){return rM(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function sM(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function cM(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
31
- `}]}function lM(e,t){const n=t.value?t.value+`
32
- `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function uM(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fM(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dM(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=hi(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(r,s);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,c);const l={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function pM(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hM(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function e0(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&a.type==="text"?a.value+=r:o.push({type:"text",value:r}),o}function mM(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return e0(e,t);const o={src:hi(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)}function yM(e,t){const n={src:hi(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function vM(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function gM(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return e0(e,t);const o={href:hi(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function bM(e,t){const n={href:hi(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function wM(e,t,n){const r=e.all(t),o=n?xM(n):t0(t),i={},a=[];if(typeof t.checked=="boolean"){const u=r[0];let f;u&&u.type==="element"&&u.tagName==="p"?f=u:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const u=r[s];(o||s!==0||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
33
- `}),u.type==="element"&&u.tagName==="p"&&!o?a.push(...u.children):a.push(u)}const c=r[r.length-1];c&&(o||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:`
34
- `});const l={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,l),e.applyData(t,l)}function xM(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=t0(n[r])}return t}function t0(e){const t=e.spread;return t??e.children.length>1}function SM(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const a=r[o];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function EM(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _M(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function $M(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kM(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),o.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Kf(t.children[1]),c=xb(t.children[t.children.length-1]);s&&c&&(a.position={start:s,end:c}),o.push(a)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)}function CM(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:t.children.length;let c=-1;const l=[];for(;++c<s;){const f=t.children[c],p={},d=a?a[c]:void 0;d&&(p.align=d);let h={type:"element",tagName:i,properties:p,children:[]};f&&(h.children=e.all(f),e.patch(f,h),h=e.applyData(f,h)),l.push(h)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,u),e.applyData(t,u)}function OM(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const n0=9,r0=32;function TM(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(o0(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(o0(t.slice(o),o>0,!1)),i.join("")}function o0(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===n0||i===r0;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===n0||i===r0;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function AM(e,t){const n={type:"text",value:TM(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function PM(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const IM={blockquote:sM,break:cM,code:lM,delete:uM,emphasis:fM,footnoteReference:dM,heading:pM,html:hM,imageReference:mM,image:yM,inlineCode:vM,linkReference:gM,link:bM,listItem:wM,list:SM,paragraph:EM,root:_M,strong:$M,table:kM,tableCell:OM,tableRow:CM,text:AM,thematicBreak:PM,toml:Ec,yaml:Ec,definition:Ec,footnoteDefinition:Ec};function Ec(){}const i0=-1,_c=0,$c=1,kc=2,ad=3,sd=4,cd=5,ld=6,a0=7,s0=8,c0=typeof self=="object"?self:globalThis,RM=(e,t)=>{const n=(o,i)=>(e.set(i,o),o),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case _c:case i0:return n(a,o);case $c:{const s=n([],o);for(const c of a)s.push(r(c));return s}case kc:{const s=n({},o);for(const[c,l]of a)s[r(c)]=r(l);return s}case ad:return n(new Date(a),o);case sd:{const{source:s,flags:c}=a;return n(new RegExp(s,c),o)}case cd:{const s=n(new Map,o);for(const[c,l]of a)s.set(r(c),r(l));return s}case ld:{const s=n(new Set,o);for(const c of a)s.add(r(c));return s}case a0:{const{name:s,message:c}=a;return n(new c0[s](c),o)}case s0:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o)}return n(new c0[i](a),o)};return r},l0=e=>RM(new Map,e)(0),mi="",{toString:MM}={},{keys:NM}=Object,La=e=>{const t=typeof e;if(t!=="object"||!e)return[_c,t];const n=MM.call(e).slice(8,-1);switch(n){case"Array":return[$c,mi];case"Object":return[kc,mi];case"Date":return[ad,mi];case"RegExp":return[sd,mi];case"Map":return[cd,mi];case"Set":return[ld,mi]}return n.includes("Array")?[$c,n]:n.includes("Error")?[a0,n]:[kc,n]},Cc=([e,t])=>e===_c&&(t==="function"||t==="symbol"),DM=(e,t,n,r)=>{const o=(a,s)=>{const c=r.push(a)-1;return n.set(s,c),c},i=a=>{if(n.has(a))return n.get(a);let[s,c]=La(a);switch(s){case _c:{let u=a;switch(c){case"bigint":s=s0,u=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);u=null;break;case"undefined":return o([i0],a)}return o([s,u],a)}case $c:{if(c)return o([c,[...a]],a);const u=[],f=o([s,u],a);for(const p of a)u.push(i(p));return f}case kc:{if(c)switch(c){case"BigInt":return o([c,a.toString()],a);case"Boolean":case"Number":case"String":return o([c,a.valueOf()],a)}if(t&&"toJSON"in a)return i(a.toJSON());const u=[],f=o([s,u],a);for(const p of NM(a))(e||!Cc(La(a[p])))&&u.push([i(p),i(a[p])]);return f}case ad:return o([s,a.toISOString()],a);case sd:{const{source:u,flags:f}=a;return o([s,{source:u,flags:f}],a)}case cd:{const u=[],f=o([s,u],a);for(const[p,d]of a)(e||!(Cc(La(p))||Cc(La(d))))&&u.push([i(p),i(d)]);return f}case ld:{const u=[],f=o([s,u],a);for(const p of a)(e||!Cc(La(p)))&&u.push(i(p));return f}}const{message:l}=a;return o([s,{name:c,message:l}],a)};return i},u0=(e,{json:t,lossy:n}={})=>{const r=[];return DM(!(t||n),!!t,new Map,r)(e),r},Oc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?l0(u0(e,t)):structuredClone(e):(e,t)=>l0(u0(e,t));function jM(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function FM(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function LM(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||jM,r=e.options.footnoteBackLabel||FM,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let c=-1;for(;++c<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[c]);if(!l)continue;const u=e.all(l),f=String(l.identifier).toUpperCase(),p=hi(f.toLowerCase());let d=0;const h=[],m=e.footnoteCounts.get(f);for(;m!==void 0&&++d<=m;){h.length>0&&h.push({type:"text",value:" "});let g=typeof n=="string"?n:n(c,d);typeof g=="string"&&(g={type:"text",value:g}),h.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,d),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const v=u[u.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const g=v.children[v.children.length-1];g&&g.type==="text"?g.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...h)}else u.push(...h);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(u,!0)};e.patch(l,y),s.push(y)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Oc(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
30
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(i)}o=i===-2,r.push(a)}return r.join("")}const J2=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:QR},disable:{null:[]},document:{42:an,43:an,45:an,48:an,49:an,50:an,51:an,52:an,53:an,54:an,55:an,56:an,57:an,62:Db},flow:{35:i2,42:Ws,45:[Wb,Ws],60:c2,61:Wb,95:Ws,96:Fb,126:Fb},flowInitial:{[-2]:Mf,[-1]:Mf,32:Mf},insideSpan:{null:[Rf,q2]},string:{38:Nb,92:jb},text:{[-5]:jf,[-4]:jf,[-3]:jf,33:_2,38:Nb,42:Rf,60:[IR,v2],91:C2,92:[r2,jb],93:Df,95:Rf,96:HR}},Symbol.toStringTag,{value:"Module"}));function X2(e){const n=Ab([J2,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:o(ER),document:o(OR),flow:o(z2),string:o(W2),text:o(V2)};return r;function o(i){return a;function a(s){return G2(r,i,s)}}}function Q2(e){for(;!Bb(e););return e}const Gb=/[\0\t\n\r]/g;function eM(){let e=1,t="",n=!0,r;return o;function o(i,a,s){const l=[];let c,u,f,p,d;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),f=0,t="",n&&(i.charCodeAt(0)===65279&&f++,n=void 0);f<i.length;){if(Gb.lastIndex=f,c=Gb.exec(i),p=c&&c.index!==void 0?c.index:i.length,d=i.charCodeAt(p),!c){t=i.slice(f);break}if(d===10&&f===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<p&&(l.push(i.slice(f,p)),e+=p-f),d){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}f=p+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const tM=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nM(e){return e.replace(tM,rM)}function rM(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),i=o===120||o===88;return Pb(n.slice(i?2:1),i?16:10)}return Af(n)||e}const Zb={}.hasOwnProperty;function oM(e,t,n){return typeof t!="string"&&(n=t,t=void 0),iM(n)(Q2(X2(n).document().write(eM()(e,t,!0))))}function iM(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(oe),autolinkProtocol:F,autolinkEmail:F,atxHeading:i(ve),blockQuote:i(he),characterEscape:F,characterReference:F,codeFenced:i(le),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(le,a),codeText:i(Q,a),codeTextData:F,data:F,codeFlowValue:F,definition:i(G),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(fe),hardBreakEscape:i(Ee),hardBreakTrailing:i(Ee),htmlFlow:i(R,a),htmlFlowData:F,htmlText:i(R,a),htmlTextData:F,image:i(X),label:a,link:i(oe),listItem:i(xe),listItemValue:p,listOrdered:i(ee,f),listUnordered:i(ee),paragraph:i(be),reference:O,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(ve),strong:i(Oe),thematicBreak:i(_e)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:pe,autolinkProtocol:ce,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:re,codeFenced:l(y),codeFencedFence:m,codeFencedFenceInfo:d,codeFencedFenceMeta:h,codeFlowValue:T,codeIndented:l(v),codeText:l(D),codeTextData:T,data:T,definition:l(),definitionDestinationString:k,definitionLabelString:g,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(q),hardBreakTrailing:l(q),htmlFlow:l(B),htmlFlowData:T,htmlText:l(A),htmlTextData:T,image:l(V),label:j,labelText:W,lineEnding:M,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:J,resourceDestinationString:x,resourceTitleString:z,resource:K,setextHeading:l(P),setextHeadingLineSequence:C,setextHeadingText:$,strong:l(),thematicBreak:l()}};Yb(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(U){let Z={type:"root",children:[]};const H={stack:[Z],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},te=[];let de=-1;for(;++de<U.length;)if(U[de][1].type==="listOrdered"||U[de][1].type==="listUnordered")if(U[de][0]==="enter")te.push(de);else{const Ae=te.pop();de=o(U,Ae,de)}for(de=-1;++de<U.length;){const Ae=t[U[de][0]];Zb.call(Ae,U[de][1].type)&&Ae[U[de][1].type].call(Object.assign({sliceSerialize:U[de][2].sliceSerialize},H),U[de][1])}if(H.tokenStack.length>0){const Ae=H.tokenStack[H.tokenStack.length-1];(Ae[1]||Jb).call(H,void 0,Ae[0])}for(Z.position={start:Gr(U.length>0?U[0][1].start:{line:1,column:1,offset:0}),end:Gr(U.length>0?U[U.length-2][1].end:{line:1,column:1,offset:0})},de=-1;++de<t.transforms.length;)Z=t.transforms[de](Z)||Z;return Z}function o(U,Z,H){let te=Z-1,de=-1,Ae=!1,ke,Be,ct,Pt;for(;++te<=H;){const rt=U[te];switch(rt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{rt[0]==="enter"?de++:de--,Pt=void 0;break}case"lineEndingBlank":{rt[0]==="enter"&&(ke&&!Pt&&!de&&!ct&&(ct=te),Pt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Pt=void 0}if(!de&&rt[0]==="enter"&&rt[1].type==="listItemPrefix"||de===-1&&rt[0]==="exit"&&(rt[1].type==="listUnordered"||rt[1].type==="listOrdered")){if(ke){let tt=te;for(Be=void 0;tt--;){const dt=U[tt];if(dt[1].type==="lineEnding"||dt[1].type==="lineEndingBlank"){if(dt[0]==="exit")continue;Be&&(U[Be][1].type="lineEndingBlank",Ae=!0),dt[1].type="lineEnding",Be=tt}else if(!(dt[1].type==="linePrefix"||dt[1].type==="blockQuotePrefix"||dt[1].type==="blockQuotePrefixWhitespace"||dt[1].type==="blockQuoteMarker"||dt[1].type==="listItemIndent"))break}ct&&(!Be||ct<Be)&&(ke._spread=!0),ke.end=Object.assign({},Be?U[Be][1].start:rt[1].end),U.splice(Be||te,0,["exit",ke,rt[2]]),te++,H++}if(rt[1].type==="listItemPrefix"){const tt={type:"listItem",_spread:!1,start:Object.assign({},rt[1].start),end:void 0};ke=tt,U.splice(te,0,["enter",tt,rt[2]]),te++,H++,ct=void 0,Pt=!0}}}return U[Z][1]._spread=Ae,H}function i(U,Z){return H;function H(te){s.call(this,U(te),te),Z&&Z.call(this,te)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(U,Z,H){this.stack[this.stack.length-1].children.push(U),this.stack.push(U),this.tokenStack.push([Z,H]),U.position={start:Gr(Z.start),end:void 0}}function l(U){return Z;function Z(H){U&&U.call(this,H),c.call(this,H)}}function c(U,Z){const H=this.stack.pop(),te=this.tokenStack.pop();if(te)te[0].type!==U.type&&(Z?Z.call(this,U,te[0]):(te[1]||Jb).call(this,U,te[0]));else throw new Error("Cannot close `"+U.type+"` ("+ua({start:U.start,end:U.end})+"): it’s not open");H.position.end=Gr(U.end)}function u(){return If(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(U){if(this.data.expectingFirstListItemValue){const Z=this.stack[this.stack.length-2];Z.start=Number.parseInt(this.sliceSerialize(U),10),this.data.expectingFirstListItemValue=void 0}}function d(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.lang=U}function h(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.meta=U}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.value=U.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.value=U.replace(/(\r?\n|\r)$/g,"")}function g(U){const Z=this.resume(),H=this.stack[this.stack.length-1];H.label=Z,H.identifier=Nn(this.sliceSerialize(U)).toLowerCase()}function b(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.title=U}function k(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.url=U}function S(U){const Z=this.stack[this.stack.length-1];if(!Z.depth){const H=this.sliceSerialize(U).length;Z.depth=H}}function $(){this.data.setextHeadingSlurpLineEnding=!0}function C(U){const Z=this.stack[this.stack.length-1];Z.depth=this.sliceSerialize(U).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function F(U){const H=this.stack[this.stack.length-1].children;let te=H[H.length-1];(!te||te.type!=="text")&&(te=Ne(),te.position={start:Gr(U.start),end:void 0},H.push(te)),this.stack.push(te)}function T(U){const Z=this.stack.pop();Z.value+=this.sliceSerialize(U),Z.position.end=Gr(U.end)}function M(U){const Z=this.stack[this.stack.length-1];if(this.data.atHardBreak){const H=Z.children[Z.children.length-1];H.position.end=Gr(U.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Z.type)&&(F.call(this,U),T.call(this,U))}function q(){this.data.atHardBreak=!0}function B(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.value=U}function A(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.value=U}function D(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.value=U}function N(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const Z=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=Z,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function V(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const Z=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=Z,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function W(U){const Z=this.sliceSerialize(U),H=this.stack[this.stack.length-2];H.label=nM(Z),H.identifier=Nn(Z).toLowerCase()}function j(){const U=this.stack[this.stack.length-1],Z=this.resume(),H=this.stack[this.stack.length-1];if(this.data.inReference=!0,H.type==="link"){const te=U.children;H.children=te}else H.alt=Z}function x(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.url=U}function z(){const U=this.resume(),Z=this.stack[this.stack.length-1];Z.title=U}function K(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function J(U){const Z=this.resume(),H=this.stack[this.stack.length-1];H.label=Z,H.identifier=Nn(this.sliceSerialize(U)).toLowerCase(),this.data.referenceType="full"}function ae(U){this.data.characterReferenceType=U.type}function re(U){const Z=this.sliceSerialize(U),H=this.data.characterReferenceType;let te;H?(te=Pb(Z,H==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):te=Af(Z);const de=this.stack.pop();de.value+=te,de.position.end=Gr(U.end)}function ce(U){T.call(this,U);const Z=this.stack[this.stack.length-1];Z.url=this.sliceSerialize(U)}function pe(U){T.call(this,U);const Z=this.stack[this.stack.length-1];Z.url="mailto:"+this.sliceSerialize(U)}function he(){return{type:"blockquote",children:[]}}function le(){return{type:"code",lang:null,meta:null,value:""}}function Q(){return{type:"inlineCode",value:""}}function G(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function fe(){return{type:"emphasis",children:[]}}function ve(){return{type:"heading",depth:0,children:[]}}function Ee(){return{type:"break"}}function R(){return{type:"html",value:""}}function X(){return{type:"image",title:null,url:"",alt:null}}function oe(){return{type:"link",title:null,url:"",children:[]}}function ee(U){return{type:"list",ordered:U.type==="listOrdered",start:null,spread:U._spread,children:[]}}function xe(U){return{type:"listItem",spread:U._spread,checked:null,children:[]}}function be(){return{type:"paragraph",children:[]}}function Oe(){return{type:"strong",children:[]}}function Ne(){return{type:"text",value:""}}function _e(){return{type:"thematicBreak"}}}function Gr(e){return{line:e.line,column:e.column,offset:e.offset}}function Yb(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Yb(e,r):aM(e,r)}}function aM(e,t){let n;for(n in t)if(Zb.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Jb(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ua({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ua({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ua({start:t.start,end:t.end})+") is still open")}function sM(e){const t=this;t.parser=n;function n(r){return oM(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function lM(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function cM(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
31
+ `}]}function uM(e,t){const n=t.value?t.value+`
32
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function fM(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dM(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pM(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Jo(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function hM(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mM(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Xb(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&a.type==="text"?a.value+=r:o.push({type:"text",value:r}),o}function vM(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Xb(e,t);const o={src:Jo(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)}function yM(e,t){const n={src:Jo(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function gM(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function bM(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Xb(e,t);const o={href:Jo(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function wM(e,t){const n={href:Jo(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function xM(e,t,n){const r=e.all(t),o=n?SM(n):Qb(t),i={},a=[];if(typeof t.checked=="boolean"){const u=r[0];let f;u&&u.type==="element"&&u.tagName==="p"?f=u:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const u=r[s];(o||s!==0||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
33
+ `}),u.type==="element"&&u.tagName==="p"&&!o?a.push(...u.children):a.push(u)}const l=r[r.length-1];l&&(o||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
34
+ `});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)}function SM(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Qb(n[r])}return t}function Qb(e){const t=e.spread;return t??e.children.length>1}function EM(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const a=r[o];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function $M(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function OM(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function kM(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _M(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),o.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=$f(t.children[1]),l=bb(t.children[t.children.length-1]);s&&l&&(a.position={start:s,end:l}),o.push(a)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)}function TM(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:t.children.length;let l=-1;const c=[];for(;++l<s;){const f=t.children[l],p={},d=a?a[l]:void 0;d&&(p.align=d);let h={type:"element",tagName:i,properties:p,children:[]};f&&(h.children=e.all(f),e.patch(f,h),h=e.applyData(f,h)),c.push(h)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function CM(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const e0=9,t0=32;function IM(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(n0(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(n0(t.slice(o),o>0,!1)),i.join("")}function n0(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===e0||i===t0;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===e0||i===t0;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function AM(e,t){const n={type:"text",value:IM(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function PM(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const RM={blockquote:lM,break:cM,code:uM,delete:fM,emphasis:dM,footnoteReference:pM,heading:hM,html:mM,imageReference:vM,image:yM,inlineCode:gM,linkReference:bM,link:wM,listItem:xM,list:EM,paragraph:$M,root:OM,strong:kM,table:_M,tableCell:CM,tableRow:TM,text:AM,thematicBreak:PM,toml:Vs,yaml:Vs,definition:Vs,footnoteDefinition:Vs};function Vs(){}const r0=-1,Ks=0,Gs=1,Zs=2,Nf=3,Lf=4,Ff=5,Bf=6,o0=7,i0=8,a0=typeof self=="object"?self:globalThis,MM=(e,t)=>{const n=(o,i)=>(e.set(i,o),o),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case Ks:case r0:return n(a,o);case Gs:{const s=n([],o);for(const l of a)s.push(r(l));return s}case Zs:{const s=n({},o);for(const[l,c]of a)s[r(l)]=r(c);return s}case Nf:return n(new Date(a),o);case Lf:{const{source:s,flags:l}=a;return n(new RegExp(s,l),o)}case Ff:{const s=n(new Map,o);for(const[l,c]of a)s.set(r(l),r(c));return s}case Bf:{const s=n(new Set,o);for(const l of a)s.add(r(l));return s}case o0:{const{name:s,message:l}=a;return n(new a0[s](l),o)}case i0:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o)}return n(new a0[i](a),o)};return r},s0=e=>MM(new Map,e)(0),Xo="",{toString:DM}={},{keys:jM}=Object,ha=e=>{const t=typeof e;if(t!=="object"||!e)return[Ks,t];const n=DM.call(e).slice(8,-1);switch(n){case"Array":return[Gs,Xo];case"Object":return[Zs,Xo];case"Date":return[Nf,Xo];case"RegExp":return[Lf,Xo];case"Map":return[Ff,Xo];case"Set":return[Bf,Xo]}return n.includes("Array")?[Gs,n]:n.includes("Error")?[o0,n]:[Zs,n]},Ys=([e,t])=>e===Ks&&(t==="function"||t==="symbol"),NM=(e,t,n,r)=>{const o=(a,s)=>{const l=r.push(a)-1;return n.set(s,l),l},i=a=>{if(n.has(a))return n.get(a);let[s,l]=ha(a);switch(s){case Ks:{let u=a;switch(l){case"bigint":s=i0,u=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return o([r0],a)}return o([s,u],a)}case Gs:{if(l)return o([l,[...a]],a);const u=[],f=o([s,u],a);for(const p of a)u.push(i(p));return f}case Zs:{if(l)switch(l){case"BigInt":return o([l,a.toString()],a);case"Boolean":case"Number":case"String":return o([l,a.valueOf()],a)}if(t&&"toJSON"in a)return i(a.toJSON());const u=[],f=o([s,u],a);for(const p of jM(a))(e||!Ys(ha(a[p])))&&u.push([i(p),i(a[p])]);return f}case Nf:return o([s,a.toISOString()],a);case Lf:{const{source:u,flags:f}=a;return o([s,{source:u,flags:f}],a)}case Ff:{const u=[],f=o([s,u],a);for(const[p,d]of a)(e||!(Ys(ha(p))||Ys(ha(d))))&&u.push([i(p),i(d)]);return f}case Bf:{const u=[],f=o([s,u],a);for(const p of a)(e||!Ys(ha(p)))&&u.push(i(p));return f}}const{message:c}=a;return o([s,{name:l,message:c}],a)};return i},l0=(e,{json:t,lossy:n}={})=>{const r=[];return NM(!(t||n),!!t,new Map,r)(e),r},Js=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?s0(l0(e,t)):structuredClone(e):(e,t)=>s0(l0(e,t));function LM(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function FM(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function BM(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||LM,r=e.options.footnoteBackLabel||FM,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const u=e.all(c),f=String(c.identifier).toUpperCase(),p=Jo(f.toLowerCase());let d=0;const h=[],m=e.footnoteCounts.get(f);for(;m!==void 0&&++d<=m;){h.length>0&&h.push({type:"text",value:" "});let g=typeof n=="string"?n:n(l,d);typeof g=="string"&&(g={type:"text",value:g}),h.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,d),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const y=u[u.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const g=y.children[y.children.length-1];g&&g.type==="text"?g.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...h)}else u.push(...h);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(u,!0)};e.patch(c,v),s.push(v)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Js(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
35
35
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
36
- `}]}}const Tc=function(e){if(e==null)return qM;if(typeof e=="function")return Ac(e);if(typeof e=="object")return Array.isArray(e)?BM(e):UM(e);if(typeof e=="string")return zM(e);throw new Error("Expected function, string, or object as test")};function BM(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Tc(e[n]);return Ac(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function UM(e){const t=e;return Ac(n);function n(r){const o=r;let i;for(i in e)if(o[i]!==t[i])return!1;return!0}}function zM(e){return Ac(t);function t(n){return n&&n.type===e}}function Ac(e){return t;function t(n,r,o){return!!(HM(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function qM(){return!0}function HM(e){return e!==null&&typeof e=="object"&&"type"in e}function kle(e){return e}const f0=[],VM=!0,ud=!1,WM="skip";function d0(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const i=Tc(o),a=r?-1:1;s(e,void 0,[])();function s(c,l,u){const f=c&&typeof c=="object"?c:{};if(typeof f.type=="string"){const d=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(c.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=f0,h,m,v;if((!t||i(c,l,u[u.length-1]||void 0))&&(d=KM(n(c,u)),d[0]===ud))return d;if("children"in c&&c.children){const y=c;if(y.children&&d[0]!==WM)for(m=(r?y.children.length:-1)+a,v=u.concat(y);m>-1&&m<y.children.length;){const g=y.children[m];if(h=s(g,m,v)(),h[0]===ud)return h;m=typeof h[1]=="number"?h[1]:m+a}}return d}}}function KM(e){return Array.isArray(e)?e:typeof e=="number"?[VM,e]:e==null?f0:[e]}function fd(e,t,n,r){let o,i,a;typeof t=="function"&&typeof n!="function"?(i=void 0,a=t,o=n):(i=t,a=n,o=r),d0(e,i,s,o);function s(c,l){const u=l[l.length-1],f=u?u.children.indexOf(c):void 0;return a(c,f,u)}}const dd={}.hasOwnProperty,GM={};function ZM(e,t){const n=t||GM,r=new Map,o=new Map,i=new Map,a={...IM,...n.handlers},s={all:l,applyData:JM,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:c,options:n,patch:YM,wrap:QM};return fd(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const f=u.type==="definition"?r:o,p=String(u.identifier).toUpperCase();f.has(p)||f.set(p,u)}}),s;function c(u,f){const p=u.type,d=s.handlers[p];if(dd.call(s.handlers,p)&&d)return d(s,u,f);if(s.options.passThrough&&s.options.passThrough.includes(p)){if("children"in u){const{children:m,...v}=u,y=Oc(v);return y.children=s.all(u),y}return Oc(u)}return(s.options.unknownHandler||XM)(s,u,f)}function l(u){const f=[];if("children"in u){const p=u.children;let d=-1;for(;++d<p.length;){const h=s.one(p[d],u);if(h){if(d&&p[d-1].type==="break"&&(!Array.isArray(h)&&h.type==="text"&&(h.value=p0(h.value)),!Array.isArray(h)&&h.type==="element")){const m=h.children[0];m&&m.type==="text"&&(m.value=p0(m.value))}Array.isArray(h)?f.push(...h):f.push(h)}}}return f}}function YM(e,t){e.position&&(t.position=WP(e))}function JM(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&i&&Object.assign(n.properties,Oc(i)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function XM(e,t){const n=t.data||{},r="value"in t&&!(dd.call(n,"hProperties")||dd.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function QM(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
36
+ `}]}}const Xs=function(e){if(e==null)return qM;if(typeof e=="function")return Qs(e);if(typeof e=="object")return Array.isArray(e)?UM(e):zM(e);if(typeof e=="string")return HM(e);throw new Error("Expected function, string, or object as test")};function UM(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Xs(e[n]);return Qs(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function zM(e){const t=e;return Qs(n);function n(r){const o=r;let i;for(i in e)if(o[i]!==t[i])return!1;return!0}}function HM(e){return Qs(t);function t(n){return n&&n.type===e}}function Qs(e){return t;function t(n,r,o){return!!(WM(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function qM(){return!0}function WM(e){return e!==null&&typeof e=="object"&&"type"in e}function Ife(e){return e}const c0=[],VM=!0,Uf=!1,KM="skip";function u0(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const i=Xs(o),a=r?-1:1;s(e,void 0,[])();function s(l,c,u){const f=l&&typeof l=="object"?l:{};if(typeof f.type=="string"){const d=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(l.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=c0,h,m,y;if((!t||i(l,c,u[u.length-1]||void 0))&&(d=GM(n(l,u)),d[0]===Uf))return d;if("children"in l&&l.children){const v=l;if(v.children&&d[0]!==KM)for(m=(r?v.children.length:-1)+a,y=u.concat(v);m>-1&&m<v.children.length;){const g=v.children[m];if(h=s(g,m,y)(),h[0]===Uf)return h;m=typeof h[1]=="number"?h[1]:m+a}}return d}}}function GM(e){return Array.isArray(e)?e:typeof e=="number"?[VM,e]:e==null?c0:[e]}function zf(e,t,n,r){let o,i,a;typeof t=="function"&&typeof n!="function"?(i=void 0,a=t,o=n):(i=t,a=n,o=r),u0(e,i,s,o);function s(l,c){const u=c[c.length-1],f=u?u.children.indexOf(l):void 0;return a(l,f,u)}}const Hf={}.hasOwnProperty,ZM={};function YM(e,t){const n=t||ZM,r=new Map,o=new Map,i=new Map,a={...RM,...n.handlers},s={all:c,applyData:XM,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:l,options:n,patch:JM,wrap:eD};return zf(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const f=u.type==="definition"?r:o,p=String(u.identifier).toUpperCase();f.has(p)||f.set(p,u)}}),s;function l(u,f){const p=u.type,d=s.handlers[p];if(Hf.call(s.handlers,p)&&d)return d(s,u,f);if(s.options.passThrough&&s.options.passThrough.includes(p)){if("children"in u){const{children:m,...y}=u,v=Js(y);return v.children=s.all(u),v}return Js(u)}return(s.options.unknownHandler||QM)(s,u,f)}function c(u){const f=[];if("children"in u){const p=u.children;let d=-1;for(;++d<p.length;){const h=s.one(p[d],u);if(h){if(d&&p[d-1].type==="break"&&(!Array.isArray(h)&&h.type==="text"&&(h.value=f0(h.value)),!Array.isArray(h)&&h.type==="element")){const m=h.children[0];m&&m.type==="text"&&(m.value=f0(m.value))}Array.isArray(h)?f.push(...h):f.push(h)}}}return f}}function JM(e,t){e.position&&(t.position=KP(e))}function XM(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&i&&Object.assign(n.properties,Js(i)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function QM(e,t){const n=t.data||{},r="value"in t&&!(Hf.call(n,"hProperties")||Hf.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function eD(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
37
37
  `});++r<e.length;)r&&n.push({type:"text",value:`
38
38
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
39
- `}),n}function p0(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function h0(e,t){const n=ZM(e,t),r=n.one(e,void 0),o=LM(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:`
40
- `},o),i}function e2(e,t){return e&&"run"in e?async function(n,r){const o=h0(n,{file:r,...t});await e.run(o,r)}:function(n,r){return h0(n,{file:r,...t||e})}}function m0(e){if(e)throw e}var Pc=Object.prototype.hasOwnProperty,y0=Object.prototype.toString,v0=Object.defineProperty,g0=Object.getOwnPropertyDescriptor,b0=function(t){return typeof Array.isArray=="function"?Array.isArray(t):y0.call(t)==="[object Array]"},w0=function(t){if(!t||y0.call(t)!=="[object Object]")return!1;var n=Pc.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Pc.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var o;for(o in t);return typeof o>"u"||Pc.call(t,o)},x0=function(t,n){v0&&n.name==="__proto__"?v0(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},S0=function(t,n){if(n==="__proto__")if(Pc.call(t,n)){if(g0)return g0(t,n).value}else return;return t[n]},t2=function e(){var t,n,r,o,i,a,s=arguments[0],c=1,l=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},c=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});c<l;++c)if(t=arguments[c],t!=null)for(n in t)r=S0(s,n),o=S0(t,n),s!==o&&(u&&o&&(w0(o)||(i=b0(o)))?(i?(i=!1,a=r&&b0(r)?r:[]):a=r&&w0(r)?r:{},x0(s,{name:n,newValue:e(u,a,o)})):typeof o<"u"&&x0(s,{name:n,newValue:o}));return s};const pd=Ue(t2);function hd(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function n2(){const e=[],t={run:n,use:r};return t;function n(...o){let i=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...o);function s(c,...l){const u=e[++i];let f=-1;if(c){a(c);return}for(;++f<o.length;)(l[f]===null||l[f]===void 0)&&(l[f]=o[f]);o=l,u?r2(u,s)(...l):a(null,...l)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function r2(e,t){let n;return r;function r(...a){const s=e.length>a.length;let c;s&&a.push(o);try{c=e.apply(this,a)}catch(l){const u=l;if(s&&n)throw u;return o(u)}s||(c instanceof Promise?c.then(i,o):c instanceof Error?o(c):i(c))}function o(a,...s){n||(n=!0,t(a,...s))}function i(a){o(null,a)}}const cr={basename:o2,dirname:i2,extname:a2,join:s2,sep:"/"};function o2(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ba(e);let n=0,r=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else a<0&&(i=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(r=o):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function i2(e){if(Ba(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function a2(e){Ba(e);let t=e.length,n=-1,r=0,o=-1,i=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function s2(...e){let t=-1,n;for(;++t<e.length;)Ba(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":c2(n)}function c2(e){Ba(e);const t=e.codePointAt(0)===47;let n=l2(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function l2(e,t){let n="",r=0,o=-1,i=0,a=-1,s,c;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(o===a-1||i===1))if(o!==a-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),o=a,i=0;continue}}else if(n.length>0){n="",r=0,o=a,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,i=0}else s===46&&i>-1?i++:i=-1}return n}function Ba(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const u2={cwd:f2};function f2(){return"/"}function md(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function d2(e){if(typeof e=="string")e=new URL(e);else if(!md(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return p2(e)}function p2(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const yd=["history","path","basename","stem","extname","dirname"];class E0{constructor(t){let n;t?md(t)?n={path:t}:typeof t=="string"||h2(t)?n={value:t}:n=t:n={},this.cwd=u2.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<yd.length;){const i=yd[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)yd.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?cr.basename(this.path):void 0}set basename(t){gd(t,"basename"),vd(t,"basename"),this.path=cr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?cr.dirname(this.path):void 0}set dirname(t){_0(this.basename,"dirname"),this.path=cr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?cr.extname(this.path):void 0}set extname(t){if(vd(t,"extname"),_0(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=cr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){md(t)&&(t=d2(t)),gd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?cr.basename(this.path,this.extname):void 0}set stem(t){gd(t,"stem"),vd(t,"stem"),this.path=cr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new Jt(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function vd(e,t){if(e&&e.includes(cr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+cr.sep+"`")}function gd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function _0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function h2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const m2=function(e){const r=this.constructor.prototype,o=r[e],i=function(){return o.apply(i,arguments)};Object.setPrototypeOf(i,r);const a=Object.getOwnPropertyNames(o);for(const s of a){const c=Object.getOwnPropertyDescriptor(o,s);c&&Object.defineProperty(i,s,c)}return i},y2={}.hasOwnProperty;class bd extends m2{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=n2()}copy(){const t=new bd;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(pd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Sd("data",this.frozen),this.namespace[t]=n,this):y2.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Sd("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ic(t),r=this.parser||this.Parser;return wd("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),wd("process",this.parser||this.Parser),xd("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,a){const s=Ic(t),c=r.parse(s);r.run(c,s,function(u,f,p){if(u||!f||!p)return l(u);const d=f,h=r.stringify(d,p);b2(h)?p.value=h:p.result=h,l(u,p)});function l(u,f){u||!f?a(u):i?i(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),wd("processSync",this.parser||this.Parser),xd("processSync",this.compiler||this.Compiler),this.process(t,o),k0("processSync","process",n),r;function o(i,a){n=!0,m0(i),r=a}}run(t,n,r){$0(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(a,s){const c=Ic(n);o.run(t,c,l);function l(u,f,p){const d=f||t;u?s(u):a?a(d):r(void 0,d,p)}}}runSync(t,n){let r=!1,o;return this.run(t,n,i),k0("runSync","run",r),o;function i(a,s){m0(a),o=s,r=!0}}stringify(t,n){this.freeze();const r=Ic(n),o=this.compiler||this.Compiler;return xd("stringify",o),$0(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Sd("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(l){if(typeof l=="function")c(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[u,...f]=l;c(u,f)}else a(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function a(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(l.plugins),l.settings&&(o.settings=pd(!0,o.settings,l.settings))}function s(l){let u=-1;if(l!=null)if(Array.isArray(l))for(;++u<l.length;){const f=l[u];i(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function c(l,u){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===l){p=f;break}if(p===-1)r.push([l,...u]);else if(u.length>0){let[d,...h]=u;const m=r[p][1];hd(m)&&hd(d)&&(d=pd(!0,m,d)),r[p]=[l,d,...h]}}}}const v2=new bd().freeze();function wd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function xd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Sd(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function $0(e){if(!hd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function k0(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ic(e){return g2(e)?e:new E0(e)}function g2(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function b2(e){return typeof e=="string"||w2(e)}function w2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const x2="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",C0=[],O0={allowDangerousHtml:!0},S2=/^(https?|ircs?|mailto|xmpp)$/i,E2=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function _2(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,a=e.disallowedElements,s=e.rehypePlugins||C0,c=e.remarkPlugins||C0,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...O0}:O0,u=e.skipHtml,f=e.unwrapDisallowed,p=e.urlTransform||$2,d=v2().use(aM).use(c).use(e2,l).use(s),h=new E0;typeof r=="string"&&(h.value=r);for(const g of E2)Object.hasOwn(e,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+x2+g.id,void 0);const m=d.parse(h);let v=d.runSync(m,h);return o&&(v={type:"element",tagName:"div",properties:{className:o},children:v.type==="root"?v.children:[v]}),fd(v,y),XP(v,{Fragment:F.Fragment,components:i,ignoreInvalidStyle:!0,jsx:F.jsx,jsxs:F.jsxs,passKeys:!0,passNode:!0});function y(g,b,k){if(g.type==="raw"&&k&&typeof b=="number")return u?k.children.splice(b,1):k.children[b]={type:"text",value:g.value},b;if(g.type==="element"){let S;for(S in Xf)if(Object.hasOwn(Xf,S)&&Object.hasOwn(g.properties,S)){const $=g.properties[S],T=Xf[S];(T===null||T.includes(g.tagName))&&(g.properties[S]=p(String($||""),S,g))}}if(g.type==="element"){let S=t?!t.includes(g.tagName):a?a.includes(g.tagName):!1;if(!S&&n&&typeof b=="number"&&(S=!n(g,b,k)),S&&k&&typeof b=="number")return f&&g.children?k.children.splice(b,1,...g.children):k.children.splice(b,1),b}}}function $2(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t<0||o>-1&&t>o||n>-1&&t>n||r>-1&&t>r||S2.test(e.slice(0,t))?e:""}function k2(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function T0(e,t,n){const o=Tc((n||{}).ignore||[]),i=C2(t);let a=-1;for(;++a<i.length;)d0(e,"text",s);function s(l,u){let f=-1,p;for(;++f<u.length;){const d=u[f],h=p?p.children:void 0;if(o(d,h?h.indexOf(d):void 0,p))return;p=d}if(p)return c(l,u)}function c(l,u){const f=u[u.length-1],p=i[a][0],d=i[a][1];let h=0;const v=f.children.indexOf(l);let y=!1,g=[];p.lastIndex=0;let b=p.exec(l.value);for(;b;){const k=b.index,S={index:b.index,input:b.input,stack:[...u,l]};let $=d(...b,S);if(typeof $=="string"&&($=$.length>0?{type:"text",value:$}:void 0),$===!1?p.lastIndex=k+1:(h!==k&&g.push({type:"text",value:l.value.slice(h,k)}),Array.isArray($)?g.push(...$):$&&g.push($),h=k+b[0].length,y=!0),!p.global)break;b=p.exec(l.value)}return y?(h<l.value.length&&g.push({type:"text",value:l.value.slice(h)}),f.children.splice(v,1,...g)):g=[l],v+g.length}}function C2(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([O2(o[0]),T2(o[1])])}return t}function O2(e){return typeof e=="string"?new RegExp(k2(e),"g"):e}function T2(e){return typeof e=="function"?e:function(){return e}}function A2(e){T0(e,[/\r?\n|\r/g,P2])}function P2(){return{type:"break"}}function I2(){return function(e){A2(e)}}function A0(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}const Ed="phrasing",_d=["autolink","link","image","label"];function R2(){return{transforms:[B2],enter:{literalAutolink:N2,literalAutolinkEmail:$d,literalAutolinkHttp:$d,literalAutolinkWww:$d},exit:{literalAutolink:L2,literalAutolinkEmail:F2,literalAutolinkHttp:D2,literalAutolinkWww:j2}}}function M2(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ed,notInConstruct:_d},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ed,notInConstruct:_d},{character:":",before:"[ps]",after:"\\/",inConstruct:Ed,notInConstruct:_d}]}}function N2(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function $d(e){this.config.enter.autolinkProtocol.call(this,e)}function D2(e){this.config.exit.autolinkProtocol.call(this,e)}function j2(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function F2(e){this.config.exit.autolinkEmail.call(this,e)}function L2(e){this.exit(e)}function B2(e){T0(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,U2],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,z2]],{ignore:["link","linkReference"]})}function U2(e,t,n,r,o){let i="";if(!P0(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!q2(n)))return!1;const a=H2(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function z2(e,t,n,r){return!P0(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function q2(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function H2(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=A0(e,"(");let i=A0(e,")");for(;r!==-1&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function P0(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||jo(n)||bc(n))&&(!t||n!==47)}I0.peek=tN;function V2(){return{enter:{gfmFootnoteDefinition:K2,gfmFootnoteDefinitionLabelString:G2,gfmFootnoteCall:J2,gfmFootnoteCallString:X2},exit:{gfmFootnoteDefinition:Y2,gfmFootnoteDefinitionLabelString:Z2,gfmFootnoteCall:eN,gfmFootnoteCallString:Q2}}}function W2(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:nN,footnoteReference:I0}}}function K2(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function G2(){this.buffer()}function Z2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Vn(this.sliceSerialize(e)).toLowerCase()}function Y2(e){this.exit(e)}function J2(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function X2(){this.buffer()}function Q2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Vn(this.sliceSerialize(e)).toLowerCase()}function eN(e){this.exit(e)}function I0(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{...o.current(),before:i,after:"]"})),s(),a(),i+=o.move("]"),i}function tN(){return"["}function nN(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteDefinition"),s=n.enter("label");return i+=o.move(n.safe(n.associationId(e),{...o.current(),before:i,after:"]"})),s(),i+=o.move("]:"+(e.children&&e.children.length>0?" ":"")),o.shift(4),i+=o.move(n.indentLines(n.containerFlow(e,o.current()),rN)),a(),i}function rN(e,t,n){return t===0?e:(n?"":" ")+e}const oN=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];R0.peek=lN;function iN(){return{canContainEols:["delete"],enter:{strikethrough:sN},exit:{strikethrough:cN}}}function aN(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:oN}],handlers:{delete:R0}}}function sN(e){this.enter({type:"delete",children:[]},e)}function cN(e){this.exit(e)}function R0(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function lN(){return"~"}function uN(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||dN,o=[],i=[],a=[],s=[];let c=0,l=-1;for(;++l<e.length;){const h=[],m=[];let v=-1;for(e[l].length>c&&(c=e[l].length);++v<e[l].length;){const y=fN(e[l][v]);if(t.alignDelimiters!==!1){const g=r(y);m[v]=g,(s[v]===void 0||g>s[v])&&(s[v]=g)}h.push(y)}i[l]=h,a[l]=m}let u=-1;if(typeof n=="object"&&"length"in n)for(;++u<c;)o[u]=M0(n[u]);else{const h=M0(n);for(;++u<c;)o[u]=h}u=-1;const f=[],p=[];for(;++u<c;){const h=o[u];let m="",v="";h===99?(m=":",v=":"):h===108?m=":":h===114&&(v=":");let y=t.alignDelimiters===!1?1:Math.max(1,s[u]-m.length-v.length);const g=m+"-".repeat(y)+v;t.alignDelimiters!==!1&&(y=m.length+y+v.length,y>s[u]&&(s[u]=y),p[u]=y),f[u]=g}i.splice(1,0,f),a.splice(1,0,p),l=-1;const d=[];for(;++l<i.length;){const h=i[l],m=a[l];u=-1;const v=[];for(;++u<c;){const y=h[u]||"";let g="",b="";if(t.alignDelimiters!==!1){const k=s[u]-(m[u]||0),S=o[u];S===114?g=" ".repeat(k):S===99?k%2?(g=" ".repeat(k/2+.5),b=" ".repeat(k/2-.5)):(g=" ".repeat(k/2),b=g):b=" ".repeat(k)}t.delimiterStart!==!1&&!u&&v.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&y==="")&&(t.delimiterStart!==!1||u)&&v.push(" "),t.alignDelimiters!==!1&&v.push(g),v.push(y),t.alignDelimiters!==!1&&v.push(b),t.padding!==!1&&v.push(" "),(t.delimiterEnd!==!1||u!==c-1)&&v.push("|")}d.push(t.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return d.join(`
41
- `)}function fN(e){return e==null?"":String(e)}function dN(e){return e.length}function M0(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function pN(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),hN);return o(),a}function hN(e,t,n){return">"+(n?"":" ")+e}function mN(e,t){return N0(e,t.inConstruct,!0)&&!N0(e,t.notInConstruct,!1)}function N0(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function D0(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
42
- `&&mN(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
43
- `}function yN(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}function vN(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function gN(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function bN(e,t,n,r){const o=gN(n),i=e.value||"",a=o==="`"?"GraveAccent":"Tilde";if(vN(e,n)){const f=n.enter("codeIndented"),p=n.indentLines(i,wN);return f(),p}const s=n.createTracker(r),c=o.repeat(Math.max(yN(i,o)+1,3)),l=n.enter("codeFenced");let u=s.move(c);if(e.lang){const f=n.enter(`codeFencedLang${a}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${a}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:`
39
+ `}),n}function f0(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function d0(e,t){const n=YM(e,t),r=n.one(e,void 0),o=BM(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:`
40
+ `},o),i}function tD(e,t){return e&&"run"in e?async function(n,r){const o=d0(n,{file:r,...t});await e.run(o,r)}:function(n,r){return d0(n,{file:r,...t||e})}}function p0(e){if(e)throw e}var el=Object.prototype.hasOwnProperty,h0=Object.prototype.toString,m0=Object.defineProperty,v0=Object.getOwnPropertyDescriptor,y0=function(t){return typeof Array.isArray=="function"?Array.isArray(t):h0.call(t)==="[object Array]"},g0=function(t){if(!t||h0.call(t)!=="[object Object]")return!1;var n=el.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&el.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var o;for(o in t);return typeof o>"u"||el.call(t,o)},b0=function(t,n){m0&&n.name==="__proto__"?m0(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},w0=function(t,n){if(n==="__proto__")if(el.call(t,n)){if(v0)return v0(t,n).value}else return;return t[n]},nD=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,c=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=w0(s,n),o=w0(t,n),s!==o&&(u&&o&&(g0(o)||(i=y0(o)))?(i?(i=!1,a=r&&y0(r)?r:[]):a=r&&g0(r)?r:{},b0(s,{name:n,newValue:e(u,a,o)})):typeof o<"u"&&b0(s,{name:n,newValue:o}));return s};const qf=Le(nD);function Wf(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function rD(){const e=[],t={run:n,use:r};return t;function n(...o){let i=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...o);function s(l,...c){const u=e[++i];let f=-1;if(l){a(l);return}for(;++f<o.length;)(c[f]===null||c[f]===void 0)&&(c[f]=o[f]);o=c,u?oD(u,s)(...c):a(null,...c)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function oD(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(o);try{l=e.apply(this,a)}catch(c){const u=c;if(s&&n)throw u;return o(u)}s||(l instanceof Promise?l.then(i,o):l instanceof Error?o(l):i(l))}function o(a,...s){n||(n=!0,t(a,...s))}function i(a){o(null,a)}}const Qn={basename:iD,dirname:aD,extname:sD,join:lD,sep:"/"};function iD(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ma(e);let n=0,r=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else a<0&&(i=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(r=o):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function aD(e){if(ma(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function sD(e){ma(e);let t=e.length,n=-1,r=0,o=-1,i=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function lD(...e){let t=-1,n;for(;++t<e.length;)ma(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":cD(n)}function cD(e){ma(e);const t=e.codePointAt(0)===47;let n=uD(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function uD(e,t){let n="",r=0,o=-1,i=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(o===a-1||i===1))if(o!==a-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),o=a,i=0;continue}}else if(n.length>0){n="",r=0,o=a,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,i=0}else s===46&&i>-1?i++:i=-1}return n}function ma(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const fD={cwd:dD};function dD(){return"/"}function Vf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function pD(e){if(typeof e=="string")e=new URL(e);else if(!Vf(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return hD(e)}function hD(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Kf=["history","path","basename","stem","extname","dirname"];class x0{constructor(t){let n;t?Vf(t)?n={path:t}:typeof t=="string"||mD(t)?n={value:t}:n=t:n={},this.cwd=fD.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Kf.length;){const i=Kf[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)Kf.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Qn.basename(this.path):void 0}set basename(t){Zf(t,"basename"),Gf(t,"basename"),this.path=Qn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Qn.dirname(this.path):void 0}set dirname(t){S0(this.basename,"dirname"),this.path=Qn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Qn.extname(this.path):void 0}set extname(t){if(Gf(t,"extname"),S0(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Qn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Vf(t)&&(t=pD(t)),Zf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Qn.basename(this.path,this.extname):void 0}set stem(t){Zf(t,"stem"),Gf(t,"stem"),this.path=Qn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new Vt(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Gf(e,t){if(e&&e.includes(Qn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Qn.sep+"`")}function Zf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function S0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function mD(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const vD=function(e){const r=this.constructor.prototype,o=r[e],i=function(){return o.apply(i,arguments)};Object.setPrototypeOf(i,r);const a=Object.getOwnPropertyNames(o);for(const s of a){const l=Object.getOwnPropertyDescriptor(o,s);l&&Object.defineProperty(i,s,l)}return i},yD={}.hasOwnProperty;class Yf extends vD{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=rD()}copy(){const t=new Yf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(qf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Qf("data",this.frozen),this.namespace[t]=n,this):yD.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Qf("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=tl(t),r=this.parser||this.Parser;return Jf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Jf("process",this.parser||this.Parser),Xf("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,a){const s=tl(t),l=r.parse(s);r.run(l,s,function(u,f,p){if(u||!f||!p)return c(u);const d=f,h=r.stringify(d,p);wD(h)?p.value=h:p.result=h,c(u,p)});function c(u,f){u||!f?a(u):i?i(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Jf("processSync",this.parser||this.Parser),Xf("processSync",this.compiler||this.Compiler),this.process(t,o),$0("processSync","process",n),r;function o(i,a){n=!0,p0(i),r=a}}run(t,n,r){E0(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(a,s){const l=tl(n);o.run(t,l,c);function c(u,f,p){const d=f||t;u?s(u):a?a(d):r(void 0,d,p)}}}runSync(t,n){let r=!1,o;return this.run(t,n,i),$0("runSync","run",r),o;function i(a,s){p0(a),o=s,r=!0}}stringify(t,n){this.freeze();const r=tl(n),o=this.compiler||this.Compiler;return Xf("stringify",o),E0(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Qf("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...f]=c;l(u,f)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(c.plugins),c.settings&&(o.settings=qf(!0,o.settings,c.settings))}function s(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const f=c[u];i(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===c){p=f;break}if(p===-1)r.push([c,...u]);else if(u.length>0){let[d,...h]=u;const m=r[p][1];Wf(m)&&Wf(d)&&(d=qf(!0,m,d)),r[p]=[c,d,...h]}}}}const gD=new Yf().freeze();function Jf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Xf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Qf(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function E0(e){if(!Wf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function $0(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function tl(e){return bD(e)?e:new x0(e)}function bD(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function wD(e){return typeof e=="string"||xD(e)}function xD(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const SD="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",O0=[],k0={allowDangerousHtml:!0},ED=/^(https?|ircs?|mailto|xmpp)$/i,$D=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function OD(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,a=e.disallowedElements,s=e.rehypePlugins||O0,l=e.remarkPlugins||O0,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...k0}:k0,u=e.skipHtml,f=e.unwrapDisallowed,p=e.urlTransform||kD,d=gD().use(sM).use(l).use(tD,c).use(s),h=new x0;typeof r=="string"&&(h.value=r);for(const g of $D)Object.hasOwn(e,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+SD+g.id,void 0);const m=d.parse(h);let y=d.runSync(m,h);return o&&(y={type:"element",tagName:"div",properties:{className:o},children:y.type==="root"?y.children:[y]}),zf(y,v),QP(y,{Fragment:L.Fragment,components:i,ignoreInvalidStyle:!0,jsx:L.jsx,jsxs:L.jsxs,passKeys:!0,passNode:!0});function v(g,b,k){if(g.type==="raw"&&k&&typeof b=="number")return u?k.children.splice(b,1):k.children[b]={type:"text",value:g.value},b;if(g.type==="element"){let S;for(S in Cf)if(Object.hasOwn(Cf,S)&&Object.hasOwn(g.properties,S)){const $=g.properties[S],C=Cf[S];(C===null||C.includes(g.tagName))&&(g.properties[S]=p(String($||""),S,g))}}if(g.type==="element"){let S=t?!t.includes(g.tagName):a?a.includes(g.tagName):!1;if(!S&&n&&typeof b=="number"&&(S=!n(g,b,k)),S&&k&&typeof b=="number")return f&&g.children?k.children.splice(b,1,...g.children):k.children.splice(b,1),b}}}function kD(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t<0||o>-1&&t>o||n>-1&&t>n||r>-1&&t>r||ED.test(e.slice(0,t))?e:""}function _D(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function _0(e,t,n){const o=Xs((n||{}).ignore||[]),i=TD(t);let a=-1;for(;++a<i.length;)u0(e,"text",s);function s(c,u){let f=-1,p;for(;++f<u.length;){const d=u[f],h=p?p.children:void 0;if(o(d,h?h.indexOf(d):void 0,p))return;p=d}if(p)return l(c,u)}function l(c,u){const f=u[u.length-1],p=i[a][0],d=i[a][1];let h=0;const y=f.children.indexOf(c);let v=!1,g=[];p.lastIndex=0;let b=p.exec(c.value);for(;b;){const k=b.index,S={index:b.index,input:b.input,stack:[...u,c]};let $=d(...b,S);if(typeof $=="string"&&($=$.length>0?{type:"text",value:$}:void 0),$===!1?p.lastIndex=k+1:(h!==k&&g.push({type:"text",value:c.value.slice(h,k)}),Array.isArray($)?g.push(...$):$&&g.push($),h=k+b[0].length,v=!0),!p.global)break;b=p.exec(c.value)}return v?(h<c.value.length&&g.push({type:"text",value:c.value.slice(h)}),f.children.splice(y,1,...g)):g=[c],y+g.length}}function TD(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([CD(o[0]),ID(o[1])])}return t}function CD(e){return typeof e=="string"?new RegExp(_D(e),"g"):e}function ID(e){return typeof e=="function"?e:function(){return e}}function AD(e){_0(e,[/\r?\n|\r/g,PD])}function PD(){return{type:"break"}}function RD(){return function(e){AD(e)}}function T0(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}const ed="phrasing",td=["autolink","link","image","label"];function MD(){return{transforms:[UD],enter:{literalAutolink:jD,literalAutolinkEmail:nd,literalAutolinkHttp:nd,literalAutolinkWww:nd},exit:{literalAutolink:BD,literalAutolinkEmail:FD,literalAutolinkHttp:ND,literalAutolinkWww:LD}}}function DD(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ed,notInConstruct:td},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ed,notInConstruct:td},{character:":",before:"[ps]",after:"\\/",inConstruct:ed,notInConstruct:td}]}}function jD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function nd(e){this.config.enter.autolinkProtocol.call(this,e)}function ND(e){this.config.exit.autolinkProtocol.call(this,e)}function LD(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function FD(e){this.config.exit.autolinkEmail.call(this,e)}function BD(e){this.exit(e)}function UD(e){_0(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,zD],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,HD]],{ignore:["link","linkReference"]})}function zD(e,t,n,r,o){let i="";if(!C0(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!qD(n)))return!1;const a=WD(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function HD(e,t,n,r){return!C0(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function qD(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function WD(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=T0(e,"(");let i=T0(e,")");for(;r!==-1&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function C0(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||$o(n)||zs(n))&&(!t||n!==47)}I0.peek=nj;function VD(){return{enter:{gfmFootnoteDefinition:GD,gfmFootnoteDefinitionLabelString:ZD,gfmFootnoteCall:XD,gfmFootnoteCallString:QD},exit:{gfmFootnoteDefinition:JD,gfmFootnoteDefinitionLabelString:YD,gfmFootnoteCall:tj,gfmFootnoteCallString:ej}}}function KD(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:rj,footnoteReference:I0}}}function GD(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ZD(){this.buffer()}function YD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Nn(this.sliceSerialize(e)).toLowerCase()}function JD(e){this.exit(e)}function XD(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function QD(){this.buffer()}function ej(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Nn(this.sliceSerialize(e)).toLowerCase()}function tj(e){this.exit(e)}function I0(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{...o.current(),before:i,after:"]"})),s(),a(),i+=o.move("]"),i}function nj(){return"["}function rj(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteDefinition"),s=n.enter("label");return i+=o.move(n.safe(n.associationId(e),{...o.current(),before:i,after:"]"})),s(),i+=o.move("]:"+(e.children&&e.children.length>0?" ":"")),o.shift(4),i+=o.move(n.indentLines(n.containerFlow(e,o.current()),oj)),a(),i}function oj(e,t,n){return t===0?e:(n?"":" ")+e}const ij=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];A0.peek=uj;function aj(){return{canContainEols:["delete"],enter:{strikethrough:lj},exit:{strikethrough:cj}}}function sj(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ij}],handlers:{delete:A0}}}function lj(e){this.enter({type:"delete",children:[]},e)}function cj(e){this.exit(e)}function A0(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function uj(){return"~"}function fj(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||pj,o=[],i=[],a=[],s=[];let l=0,c=-1;for(;++c<e.length;){const h=[],m=[];let y=-1;for(e[c].length>l&&(l=e[c].length);++y<e[c].length;){const v=dj(e[c][y]);if(t.alignDelimiters!==!1){const g=r(v);m[y]=g,(s[y]===void 0||g>s[y])&&(s[y]=g)}h.push(v)}i[c]=h,a[c]=m}let u=-1;if(typeof n=="object"&&"length"in n)for(;++u<l;)o[u]=P0(n[u]);else{const h=P0(n);for(;++u<l;)o[u]=h}u=-1;const f=[],p=[];for(;++u<l;){const h=o[u];let m="",y="";h===99?(m=":",y=":"):h===108?m=":":h===114&&(y=":");let v=t.alignDelimiters===!1?1:Math.max(1,s[u]-m.length-y.length);const g=m+"-".repeat(v)+y;t.alignDelimiters!==!1&&(v=m.length+v+y.length,v>s[u]&&(s[u]=v),p[u]=v),f[u]=g}i.splice(1,0,f),a.splice(1,0,p),c=-1;const d=[];for(;++c<i.length;){const h=i[c],m=a[c];u=-1;const y=[];for(;++u<l;){const v=h[u]||"";let g="",b="";if(t.alignDelimiters!==!1){const k=s[u]-(m[u]||0),S=o[u];S===114?g=" ".repeat(k):S===99?k%2?(g=" ".repeat(k/2+.5),b=" ".repeat(k/2-.5)):(g=" ".repeat(k/2),b=g):b=" ".repeat(k)}t.delimiterStart!==!1&&!u&&y.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&v==="")&&(t.delimiterStart!==!1||u)&&y.push(" "),t.alignDelimiters!==!1&&y.push(g),y.push(v),t.alignDelimiters!==!1&&y.push(b),t.padding!==!1&&y.push(" "),(t.delimiterEnd!==!1||u!==l-1)&&y.push("|")}d.push(t.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return d.join(`
41
+ `)}function dj(e){return e==null?"":String(e)}function pj(e){return e.length}function P0(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function hj(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),mj);return o(),a}function mj(e,t,n){return">"+(n?"":" ")+e}function vj(e,t){return R0(e,t.inConstruct,!0)&&!R0(e,t.notInConstruct,!1)}function R0(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function M0(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
42
+ `&&vj(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
43
+ `}function yj(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}function gj(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function bj(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function wj(e,t,n,r){const o=bj(n),i=e.value||"",a=o==="`"?"GraveAccent":"Tilde";if(gj(e,n)){const f=n.enter("codeIndented"),p=n.indentLines(i,xj);return f(),p}const s=n.createTracker(r),l=o.repeat(Math.max(yj(i,o)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const f=n.enter(`codeFencedLang${a}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${a}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:`
44
44
  `,encode:["`"],...s.current()})),f()}return u+=s.move(`
45
45
  `),i&&(u+=s.move(i+`
46
- `)),u+=s.move(c),l(),u}function wN(e,t,n){return(n?"":" ")+e}function kd(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function xN(e,t,n,r){const o=kd(n),i=o==='"'?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const c=n.createTracker(r);let l=c.move("[");return l+=c.move(n.safe(n.associationId(e),{before:l,after:"]",...c.current()})),l+=c.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=c.move("<"),l+=c.move(n.safe(e.url,{before:l,after:">",...c.current()})),l+=c.move(">")):(s=n.enter("destinationRaw"),l+=c.move(n.safe(e.url,{before:l,after:e.title?" ":`
47
- `,...c.current()}))),s(),e.title&&(s=n.enter(`title${i}`),l+=c.move(" "+o),l+=c.move(n.safe(e.title,{before:l,after:o,...c.current()})),l+=c.move(o),s()),a(),l}function SN(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}j0.peek=EN;function j0(e,t,n,r){const o=SN(n),i=n.enter("emphasis"),a=n.createTracker(r);let s=a.move(o);return s+=a.move(n.containerPhrasing(e,{before:s,after:o,...a.current()})),s+=a.move(o),i(),s}function EN(e,t,n){return n.options.emphasis||"*"}function _N(e,t){let n=!1;return fd(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,ud}),!!((!e.depth||e.depth<3)&&Qf(e)&&(t.options.setext||n))}function $N(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(_N(e,n)){const u=n.enter("headingSetext"),f=n.enter("phrasing"),p=n.containerPhrasing(e,{...i.current(),before:`
46
+ `)),u+=s.move(l),c(),u}function xj(e,t,n){return(n?"":" ")+e}function rd(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Sj(e,t,n,r){const o=rd(n),i=o==='"'?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
47
+ `,...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),a(),c}function Ej(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}D0.peek=$j;function D0(e,t,n,r){const o=Ej(n),i=n.enter("emphasis"),a=n.createTracker(r);let s=a.move(o);return s+=a.move(n.containerPhrasing(e,{before:s,after:o,...a.current()})),s+=a.move(o),i(),s}function $j(e,t,n){return n.options.emphasis||"*"}function Oj(e,t){let n=!1;return zf(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Uf}),!!((!e.depth||e.depth<3)&&If(e)&&(t.options.setext||n))}function kj(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(Oj(e,n)){const u=n.enter("headingSetext"),f=n.enter("phrasing"),p=n.containerPhrasing(e,{...i.current(),before:`
48
48
  `,after:`
49
49
  `});return f(),u(),p+`
50
50
  `+(o===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
51
- `))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),c=n.enter("phrasing");i.move(a+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
52
- `,...i.current()});return/^[\t ]/.test(l)&&(l="&#x"+l.charCodeAt(0).toString(16).toUpperCase()+";"+l.slice(1)),l=l?a+" "+l:a,n.options.closeAtx&&(l+=" "+a),c(),s(),l}F0.peek=kN;function F0(e){return e.value||""}function kN(){return"<"}L0.peek=CN;function L0(e,t,n,r){const o=kd(n),i=o==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const c=n.createTracker(r);let l=c.move("![");return l+=c.move(n.safe(e.alt,{before:l,after:"]",...c.current()})),l+=c.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=c.move("<"),l+=c.move(n.safe(e.url,{before:l,after:">",...c.current()})),l+=c.move(">")):(s=n.enter("destinationRaw"),l+=c.move(n.safe(e.url,{before:l,after:e.title?" ":")",...c.current()}))),s(),e.title&&(s=n.enter(`title${i}`),l+=c.move(" "+o),l+=c.move(n.safe(e.title,{before:l,after:o,...c.current()})),l+=c.move(o),s()),l+=c.move(")"),a(),l}function CN(){return"!"}B0.peek=ON;function B0(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let c=s.move("![");const l=n.safe(e.alt,{before:c,after:"]",...s.current()});c+=s.move(l+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:c,after:"]",...s.current()});return a(),n.stack=u,i(),o==="full"||!l||l!==f?c+=s.move(f+"]"):o==="shortcut"?c=c.slice(0,-1):c+=s.move("]"),c}function ON(){return"!"}U0.peek=TN;function U0(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const a=n.unsafe[i],s=n.compilePattern(a);let c;if(a.atBreak)for(;c=s.exec(r);){let l=c.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(c.index+1)}}return o+r+o}function TN(){return"`"}function z0(e,t){const n=Qf(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}q0.peek=AN;function q0(e,t,n,r){const o=kd(n),i=o==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,c;if(z0(e,n)){const u=n.stack;n.stack=[],s=n.enter("autolink");let f=a.move("<");return f+=a.move(n.containerPhrasing(e,{before:f,after:">",...a.current()})),f+=a.move(">"),s(),n.stack=u,f}s=n.enter("link"),c=n.enter("label");let l=a.move("[");return l+=a.move(n.containerPhrasing(e,{before:l,after:"](",...a.current()})),l+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),l+=a.move("<"),l+=a.move(n.safe(e.url,{before:l,after:">",...a.current()})),l+=a.move(">")):(c=n.enter("destinationRaw"),l+=a.move(n.safe(e.url,{before:l,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=n.enter(`title${i}`),l+=a.move(" "+o),l+=a.move(n.safe(e.title,{before:l,after:o,...a.current()})),l+=a.move(o),c()),l+=a.move(")"),s(),l}function AN(e,t,n){return z0(e,n)?"<":"["}H0.peek=PN;function H0(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let c=s.move("[");const l=n.containerPhrasing(e,{before:c,after:"]",...s.current()});c+=s.move(l+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:c,after:"]",...s.current()});return a(),n.stack=u,i(),o==="full"||!l||l!==f?c+=s.move(f+"]"):o==="shortcut"?c=c.slice(0,-1):c+=s.move("]"),c}function PN(){return"["}function Cd(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function IN(e){const t=Cd(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function RN(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function V0(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function MN(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?RN(n):Cd(n);const s=e.ordered?a==="."?")":".":IN(n);let c=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),V0(n)===a&&u){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(a=s),n.bulletCurrent=a;const l=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),l}function NN(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function DN(e,t,n,r){const o=NN(n);let i=n.bulletCurrent||Cd(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let a=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const c=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(f,p,d){return p?(d?"":" ".repeat(a))+f:(d?i:i+" ".repeat(a-i.length))+f}}function jN(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a}const FN=Tc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function LN(e,t,n,r){return(e.children.some(function(a){return FN(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function BN(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}W0.peek=UN;function W0(e,t,n,r){const o=BN(n),i=n.enter("strong"),a=n.createTracker(r);let s=a.move(o+o);return s+=a.move(n.containerPhrasing(e,{before:s,after:o,...a.current()})),s+=a.move(o+o),i(),s}function UN(e,t,n){return n.options.strong||"*"}function zN(e,t,n,r){return n.safe(e.value,r)}function qN(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function HN(e,t,n){const r=(V0(n)+(n.options.ruleSpaces?" ":"")).repeat(qN(n));return n.options.ruleSpaces?r.slice(0,-1):r}const K0={blockquote:pN,break:D0,code:bN,definition:xN,emphasis:j0,hardBreak:D0,heading:$N,html:F0,image:L0,imageReference:B0,inlineCode:U0,link:q0,linkReference:H0,list:MN,listItem:DN,paragraph:jN,root:LN,strong:W0,text:zN,thematicBreak:HN};function VN(){return{enter:{table:WN,tableData:G0,tableHeader:G0,tableRow:GN},exit:{codeText:ZN,table:KN,tableData:Od,tableHeader:Od,tableRow:Od}}}function WN(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function KN(e){this.exit(e),this.data.inTable=void 0}function GN(e){this.enter({type:"tableRow",children:[]},e)}function Od(e){this.exit(e)}function G0(e){this.enter({type:"tableCell",children:[]},e)}function ZN(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,YN));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function YN(e,t){return t==="|"?t:e}function JN(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
53
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:c,tableRow:s}};function a(d,h,m,v){return l(u(d,m,v),d.align)}function s(d,h,m,v){const y=f(d,m,v),g=l([y]);return g.slice(0,g.indexOf(`
54
- `))}function c(d,h,m,v){const y=m.enter("tableCell"),g=m.enter("phrasing"),b=m.containerPhrasing(d,{...v,before:i,after:i});return g(),y(),b}function l(d,h){return uN(d,{align:h,alignDelimiters:r,padding:n,stringLength:o})}function u(d,h,m){const v=d.children;let y=-1;const g=[],b=h.enter("table");for(;++y<v.length;)g[y]=f(v[y],h,m);return b(),g}function f(d,h,m){const v=d.children;let y=-1;const g=[],b=h.enter("tableRow");for(;++y<v.length;)g[y]=c(v[y],d,h,m);return b(),g}function p(d,h,m){let v=K0.inlineCode(d,h,m);return m.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function XN(){return{exit:{taskListCheckValueChecked:Z0,taskListCheckValueUnchecked:Z0,paragraph:eD}}}function QN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:tD}}}function Z0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function eD(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let i=-1,a;for(;++i<o.length;){const s=o[i];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function tD(e,t,n,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let c=K0.listItem(e,t,n,{...r,...s.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(u){return u+a}}function nD(){return[R2(),V2(),iN(),VN(),XN()]}function rD(e){return{extensions:[M2(),W2(),aN(),JN(e),QN()]}}const oD={tokenize:uD,partial:!0},Y0={tokenize:fD,partial:!0},J0={tokenize:dD,partial:!0},X0={tokenize:pD,partial:!0},iD={tokenize:hD,partial:!0},Q0={tokenize:cD,previous:tw},ew={tokenize:lD,previous:nw},Pr={tokenize:sD,previous:rw},lr={};function aD(){return{text:lr}}let Fo=48;for(;Fo<123;)lr[Fo]=Pr,Fo++,Fo===58?Fo=65:Fo===91&&(Fo=97);lr[43]=Pr,lr[45]=Pr,lr[46]=Pr,lr[95]=Pr,lr[72]=[Pr,ew],lr[104]=[Pr,ew],lr[87]=[Pr,Q0],lr[119]=[Pr,Q0];function sD(e,t,n){const r=this;let o,i;return a;function a(f){return!Td(f)||!rw.call(r,r.previous)||Ad(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Td(f)?(e.consume(f),s):f===64?(e.consume(f),c):n(f)}function c(f){return f===46?e.check(iD,u,l)(f):f===45||f===95||Xt(f)?(i=!0,e.consume(f),c):u(f)}function l(f){return e.consume(f),o=!0,c}function u(f){return i&&o&&cn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function cD(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!tw.call(r,r.previous)||Ad(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(oD,e.attempt(Y0,e.attempt(J0,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function lD(e,t,n){const r=this;let o="",i=!1;return a;function a(f){return(f===72||f===104)&&nw.call(r,r.previous)&&!Ad(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(cn(f)&&o.length<5)return o+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const p=o.toLowerCase();if(p==="http"||p==="https")return e.consume(f),c}return n(f)}function c(f){return f===47?(e.consume(f),i?l:(i=!0,c)):n(f)}function l(f){return f===null||gc(f)||st(f)||jo(f)||bc(f)?n(f):e.attempt(Y0,e.attempt(J0,u),n)(f)}function u(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function uD(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function fD(e,t,n){let r,o,i;return a;function a(l){return l===46||l===95?e.check(X0,c,s)(l):l===null||st(l)||jo(l)||l!==45&&bc(l)?c(l):(i=!0,e.consume(l),a)}function s(l){return l===95?r=!0:(o=r,r=void 0),e.consume(l),a}function c(l){return o||r||!i?n(l):t(l)}}function dD(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(X0,t,i)(a):a===null||st(a)||jo(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&r++,e.consume(a),o}}function pD(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),i):s===93?(e.consume(s),o):s===60||s===null||st(s)||jo(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||st(s)||jo(s)?t(s):r(s)}function i(s){return cn(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):cn(s)?(e.consume(s),a):n(s)}}function hD(e,t,n){return r;function r(i){return e.consume(i),o}function o(i){return Xt(i)?n(i):t(i)}}function tw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||st(e)}function nw(e){return!cn(e)}function rw(e){return!(e===47||Td(e))}function Td(e){return e===43||e===45||e===46||e===95||Xt(e)}function Ad(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const mD={tokenize:ED,partial:!0};function yD(){return{document:{91:{tokenize:wD,continuation:{tokenize:xD},exit:SD}},text:{91:{tokenize:bD},93:{add:"after",tokenize:vD,resolveTo:gD}}}}function vD(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const c=r.events[o][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return s;function s(c){if(!a||!a._balanced)return n(c);const l=Vn(r.sliceSerialize({start:a.end,end:r.now()}));return l.codePointAt(0)!==94||!i.includes(l.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function gD(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function bD(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),c}function c(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(i>999||f===93&&!a||f===null||f===91||st(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return o.includes(Vn(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return st(f)||(a=!0),i++,e.consume(f),f===92?u:l}function u(f){return f===91||f===92||f===93?(e.consume(f),i++,l):l(f)}}function wD(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,s;return c;function c(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(h)}function u(h){if(a>999||h===93&&!s||h===null||h===91||st(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return i=Vn(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return st(h)||(s=!0),a++,e.consume(h),h===92?f:u}function f(h){return h===91||h===92||h===93?(e.consume(h),a++,u):u(h)}function p(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o.includes(i)||o.push(i),Ve(e,d,"gfmFootnoteDefinitionWhitespace")):n(h)}function d(h){return t(h)}}function xD(e,t,n){return e.check(ja,t,e.attempt(mD,t,n))}function SD(e){e.exit("gfmFootnoteDefinition")}function ED(e,t,n){const r=this;return Ve(e,o,"gfmFootnoteDefinitionIndent",4+1);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function _D(e){let n=(e||{}).singleTilde;const r={tokenize:i,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(a,s){let c=-1;for(;++c<a.length;)if(a[c][0]==="enter"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._close){let l=c;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[c][1].end.offset-a[c][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[c][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[c][1].end)},f={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[c][1].start)},p=[["enter",u,s],["enter",a[l][1],s],["exit",a[l][1],s],["enter",f,s]],d=s.parser.constructs.insideSpan.null;d&&Sn(p,p.length,0,xc(d,a.slice(l+1,c),s)),Sn(p,p.length,0,[["exit",f,s],["enter",a[c][1],s],["exit",a[c][1],s],["exit",u,s]]),Sn(a,l-1,c-l+3,p),c=l+p.length-2;break}}for(c=-1;++c<a.length;)a[c][1].type==="strikethroughSequenceTemporary"&&(a[c][1].type="data");return a}function i(a,s,c){const l=this.previous,u=this.events;let f=0;return p;function p(h){return l===126&&u[u.length-1][1].type!=="characterEscape"?c(h):(a.enter("strikethroughSequenceTemporary"),d(h))}function d(h){const m=wc(l);if(h===126)return f>1?c(h):(a.consume(h),f++,d);if(f<2&&!n)return c(h);const v=a.exit("strikethroughSequenceTemporary"),y=wc(h);return v._open=!y||y===2&&!!m,v._close=!m||m===2&&!!y,s(h)}}}class $D{constructor(){this.map=[]}add(t,n,r){kD(this,t,n,r)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let o=r.pop();for(;o;)t.push(...o),o=r.pop();this.map.length=0}}function kD(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function CD(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function OD(){return{flow:{null:{tokenize:TD,resolveAll:AD}}}}function TD(e,t,n){const r=this;let o=0,i=0,a;return s;function s(O){let M=r.events.length-1;for(;M>-1;){const P=r.events[M][1].type;if(P==="lineEnding"||P==="linePrefix")M--;else break}const H=M>-1?r.events[M][1].type:null,L=H==="tableHead"||H==="tableRow"?$:c;return L===$&&r.parser.lazy[r.now().line]?n(O):L(O)}function c(O){return e.enter("tableHead"),e.enter("tableRow"),l(O)}function l(O){return O===124||(a=!0,i+=1),u(O)}function u(O){return O===null?n(O):$e(O)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),d):n(O):Le(O)?Ve(e,u,"whitespace")(O):(i+=1,a&&(a=!1,o+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),f(O)))}function f(O){return O===null||O===124||st(O)?(e.exit("data"),u(O)):(e.consume(O),O===92?p:f)}function p(O){return O===92||O===124?(e.consume(O),f):f(O)}function d(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(O):(e.enter("tableDelimiterRow"),a=!1,Le(O)?Ve(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):h(O))}function h(O){return O===45||O===58?v(O):O===124?(a=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),m):S(O)}function m(O){return Le(O)?Ve(e,v,"whitespace")(O):v(O)}function v(O){return O===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),y):O===45?(i+=1,y(O)):O===null||$e(O)?k(O):S(O)}function y(O){return O===45?(e.enter("tableDelimiterFiller"),g(O)):S(O)}function g(O){return O===45?(e.consume(O),g):O===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(O))}function b(O){return Le(O)?Ve(e,k,"whitespace")(O):k(O)}function k(O){return O===124?h(O):O===null||$e(O)?!a||o!==i?S(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):S(O)}function S(O){return n(O)}function $(O){return e.enter("tableRow"),T(O)}function T(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),T):O===null||$e(O)?(e.exit("tableRow"),t(O)):Le(O)?Ve(e,T,"whitespace")(O):(e.enter("data"),R(O))}function R(O){return O===null||O===124||st(O)?(e.exit("data"),T(O)):(e.consume(O),O===92?B:R)}function B(O){return O===92||O===124?(e.consume(O),R):R(O)}}function AD(e,t){let n=-1,r=!0,o=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,c=0,l,u,f;const p=new $D;for(;++n<e.length;){const d=e[n],h=d[1];d[0]==="enter"?h.type==="tableHead"?(s=!1,c!==0&&(ow(p,t,c,l,u),u=void 0,c=0),l={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(n,0,[["enter",l,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(r=!0,f=void 0,i=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(n,0,[["enter",u,t]])),o=h.type==="tableDelimiterRow"?2:u?3:1):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],f=Rc(p,t,i,o,void 0,f),i=[0,0,0,0]),a[2]=n)):h.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(a[0]=a[1],f=Rc(p,t,i,o,void 0,f)),i=a,a=[i[1],n,0,0])):h.type==="tableHead"?(s=!0,c=n):h.type==="tableRow"||h.type==="tableDelimiterRow"?(c=n,i[1]!==0?(a[0]=a[1],f=Rc(p,t,i,o,n,f)):a[1]!==0&&(f=Rc(p,t,a,o,n,f)),o=0):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=n)}for(c!==0&&ow(p,t,c,l,u),p.consume(t.events),n=-1;++n<t.events.length;){const d=t.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=CD(t.events,n))}return e}function Rc(e,t,n,r,o,i){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},yi(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const c=yi(t.events,n[1]);if(i={type:a,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const l=yi(t.events,n[2]),u=yi(t.events,n[3]),f={type:s,start:Object.assign({},l),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const p=t.events[n[2]],d=t.events[n[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const h=n[2]+1,m=n[3]-n[2]-1;e.add(h,m,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return o!==void 0&&(i.end=Object.assign({},yi(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function ow(e,t,n,r,o){const i=[],a=yi(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function yi(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const PD={tokenize:RD};function ID(){return{text:{91:PD}}}function RD(e,t,n){const r=this;return o;function o(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return st(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):n(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(c)}function s(c){return $e(c)?t(c):Le(c)?e.check({tokenize:MD},t,n)(c):n(c)}}function MD(e,t,n){return Ve(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function ND(e){return Rb([aD(),yD(),_D(e),OD(),ID()])}const DD={};function jD(e){const t=this,n=e||DD,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(ND(n)),i.push(nD()),a.push(rD(n))}const ct={container:{className:"bpContainer"},modal:{container:{className:"bpModalContainer"},overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpModalDialogContainer"},title:{container:{className:"bpModalDialogTitleContainer"},text:{className:"bpModalDialogTitleText"},closeIcon:{className:"bpModalDialogTitleCloseIcon"}},content:{className:"bpModalDialogContent"},newConversation:{button:{className:"bpModalDialogNewConversationButton"},text:{className:"bpModalDialogNewConversationText"}}}},fab:{container:{className:"bpFabContainer"},icon:{className:"bpFabIcon"}},notification:{container:{className:"bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpHeaderContainer"},content:{container:{className:"bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},actions:{container:{className:"bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{container:{className:"bpComposerContainer"},poweredBy:{className:"bpComposerPoweredBy"},input:{className:"bpComposerInput"},button:{container:{className:"bpComposerButtonContainer"},icon:{className:"bpComposerButtonIcon"}},uploadButton:{icon:{className:"bpComposerUploadButtonIcon"},container:{className:"bpComposerUploadButtonContainer"}},voiceButton:{icon:{className:"bpComposerVoiceButtonIcon"},container:{className:"bpComposerVoiceButtonContainer"}}},messageList:{scrollDownButton:{container:{className:"bpMessageListScrollDownButtonContainer"},button:{className:"bpMessageListScrollDownButtonButton"},icon:{className:"bpMessageListScrollDownButtonIcon"}},container:{className:"bpMessageListContainer"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}},headerMessage:{className:"bpMessageListHeaderMessage"}},message:{container:{className:"bpMessageContainer"},avatar:{container:{className:"bpMessageAvatarContainer"},image:{className:"bpMessageAvatarImage"},fallback:{className:"bpMessageAvatarFallback"}},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},listItem:{className:"bpMessageBlocksTextListItem"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},pre:{className:"bpMessageBlocksTextPre"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"}},video:{className:"bpMessageBlocksVideo"},location:{container:{className:"bpMessageBlocksLocationContainer"},title:{className:"bpMessageBlocksLocationTitle"},icon:{className:"bpMessageBlocksLocationIcon"}},file:{container:{className:"bpMessageBlocksFileContainer"},title:{className:"bpMessageBlocksFileTitle"},icon:{className:"bpMessageBlocksFileIcon"}},row:{className:"bpMessageBlocksRow"},column:{className:"bpMessageBlocksColumn"},bubble:{className:"bpMessageBlocksBubble"},carousel:{container:{className:"bpMessageBlocksCarouselContainer"},slidesContainer:{className:"bpMessageBlocksCarouselSlidesContainer"},backButton:{className:"bpMessageBlocksCarouselBackButton"},nextButton:{className:"bpMessageBlocksCarouselNextButton"}},dropdown:{button:{container:{className:"bpMessageBlocksDropdownButtonContainer"},text:{className:"bpMessageBlocksDropdownButtonText"},icon:{className:"bpMessageBlocksDropdownButtonIcon"}},content:{container:{className:"bpMessageBlocksDropdownContentContainer"},item:{className:"bpMessageBlocksDropdownContentItem"}}},button:{className:"bpMessageBlocksButton"}}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}}},FD=({text:e})=>{const{message:{blocks:{text:t}}}=ct,n={h1:({node:r,...o})=>F.jsx("h1",{...o,...t==null?void 0:t.heading1}),h2:({node:r,...o})=>F.jsx("h2",{...o,...t==null?void 0:t.heading2}),h3:({node:r,...o})=>F.jsx("h3",{...o,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:r,...o})=>F.jsx("em",{...o,...t==null?void 0:t.italic}),strong:({node:r,...o})=>F.jsx("strong",{...o,...t==null?void 0:t.bold}),p:({node:r,...o})=>F.jsx("p",{...o,...t==null?void 0:t.text}),hr:({node:r,...o})=>F.jsx("hr",{...o,...t==null?void 0:t.horizontalRule}),a:({node:r,...o})=>F.jsx("a",{...o,...t==null?void 0:t.link,target:"_blank"}),ol:({node:r,...o})=>F.jsx("ol",{...o,...t==null?void 0:t.orderedList}),ul:({node:r,...o})=>F.jsx("ul",{...o,...t==null?void 0:t.unorderedList}),li:({node:r,...o})=>F.jsx("li",{...o,...t==null?void 0:t.listItem}),br:({node:r,...o})=>F.jsx("br",{...o,...t==null?void 0:t.lineBreak}),pre:({node:r,...o})=>F.jsx("pre",{...o,...t==null?void 0:t.pre})};return F.jsx(_2,{components:n,remarkPlugins:[jD,I2],children:e})};var iw={},Pd={},aw={};Object.defineProperty(aw,"__esModule",{value:!0});var Mc={},LD=be&&be.__awaiter||function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{l(r.next(u))}catch(f){a(f)}}function c(u){try{l(r.throw(u))}catch(f){a(f)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.Emitter=void 0;let BD=class{constructor(){this.listeners={}}on(t,n,r=!1){const o=this.listeners[t];o?r?o.unshift(n):o.push(n):this.listeners[t]=[n]}emit(t,n){return LD(this,void 0,void 0,function*(){const r=this.listeners[t];if(r!=null&&r.length){for(const o of r)yield o(n);return!0}else return!1})}};Mc.Emitter=BD;var sw={};Object.defineProperty(sw,"__esModule",{value:!0});var cw={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HealthEventType=void 0,function(t){t.Create="create",t.Configure="configure",t.Start="start",t.StartFailure="start-failure",t.Initialize="initialize",t.InitializeFailure="initialize-failure",t.Sleep="sleep",t.Delete="delete"}(e.HealthEventType||(e.HealthEventType={}))})(cw);var lw={};Object.defineProperty(lw,"__esModule",{value:!0});var uw={};Object.defineProperty(uw,"__esModule",{value:!0});var fw={};Object.defineProperty(fw,"__esModule",{value:!0});var dw={};Object.defineProperty(dw,"__esModule",{value:!0}),function(e){var t=be&&be.__createBinding||(Object.create?function(r,o,i,a){a===void 0&&(a=i),Object.defineProperty(r,a,{enumerable:!0,get:function(){return o[i]}})}:function(r,o,i,a){a===void 0&&(a=i),r[a]=o[i]}),n=be&&be.__exportStar||function(r,o){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,r,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(aw,e),n(Mc,e),n(sw,e),n(cw,e),n(lw,e),n(uw,e),n(fw,e),n(dw,e)}(Pd);var Nc={},pw={},Id={exports:{}},Dc={},Rd={},jc={},Ua={},vi={},Lo={},gi={},bi={},ur={};Object.defineProperty(ur,"__esModule",{value:!0}),ur.ERROR_PACKET=ur.PACKET_TYPES_REVERSE=ur.PACKET_TYPES=void 0;const fr=Object.create(null);ur.PACKET_TYPES=fr,fr.open="0",fr.close="1",fr.ping="2",fr.pong="3",fr.message="4",fr.upgrade="5",fr.noop="6";const hw=Object.create(null);ur.PACKET_TYPES_REVERSE=hw,Object.keys(fr).forEach(e=>{hw[fr[e]]=e});const UD={type:"error",data:"parser error"};ur.ERROR_PACKET=UD,Object.defineProperty(bi,"__esModule",{value:!0}),bi.encodePacket=bi.encodePacketToBinary=void 0;const zD=ur,mw=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",yw=typeof ArrayBuffer=="function",vw=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,gw=({type:e,data:t},n,r)=>mw&&t instanceof Blob?n?r(t):bw(t,r):yw&&(t instanceof ArrayBuffer||vw(t))?n?r(t):bw(new Blob([t]),r):r(zD.PACKET_TYPES[e]+(t||""));bi.encodePacket=gw;const bw=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function ww(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Md;function qD(e,t){if(mw&&e.data instanceof Blob)return e.data.arrayBuffer().then(ww).then(t);if(yw&&(e.data instanceof ArrayBuffer||vw(e.data)))return t(ww(e.data));gw(e,!1,n=>{Md||(Md=new TextEncoder),t(Md.encode(n))})}bi.encodePacketToBinary=qD;var Fc={},wi={};Object.defineProperty(wi,"__esModule",{value:!0}),wi.decode=wi.encode=void 0;const xi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",za=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<xi.length;e++)za[xi.charCodeAt(e)]=e;const HD=e=>{let t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=xi[t[n]>>2],o+=xi[(t[n]&3)<<4|t[n+1]>>4],o+=xi[(t[n+1]&15)<<2|t[n+2]>>6],o+=xi[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};wi.encode=HD;const VD=e=>{let t=e.length*.75,n=e.length,r,o=0,i,a,s,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const l=new ArrayBuffer(t),u=new Uint8Array(l);for(r=0;r<n;r+=4)i=za[e.charCodeAt(r)],a=za[e.charCodeAt(r+1)],s=za[e.charCodeAt(r+2)],c=za[e.charCodeAt(r+3)],u[o++]=i<<2|a>>4,u[o++]=(a&15)<<4|s>>2,u[o++]=(s&3)<<6|c&63;return l};wi.decode=VD,Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.decodePacket=void 0;const Lc=ur,WD=wi,KD=typeof ArrayBuffer=="function",GD=(e,t)=>{if(typeof e!="string")return{type:"message",data:xw(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:ZD(e.substring(1),t)}:Lc.PACKET_TYPES_REVERSE[n]?e.length>1?{type:Lc.PACKET_TYPES_REVERSE[n],data:e.substring(1)}:{type:Lc.PACKET_TYPES_REVERSE[n]}:Lc.ERROR_PACKET};Fc.decodePacket=GD;const ZD=(e,t)=>{if(KD){const n=(0,WD.decode)(e);return xw(n,t)}else return{base64:!0,data:e}},xw=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=e.createPacketDecoderStream=e.createPacketEncoderStream=void 0;const t=bi;Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const n=Fc;Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return n.decodePacket}});const r=ur,o=String.fromCharCode(30),i=(p,d)=>{const h=p.length,m=new Array(h);let v=0;p.forEach((y,g)=>{(0,t.encodePacket)(y,!1,b=>{m[g]=b,++v===h&&d(m.join(o))})})};e.encodePayload=i;const a=(p,d)=>{const h=p.split(o),m=[];for(let v=0;v<h.length;v++){const y=(0,n.decodePacket)(h[v],d);if(m.push(y),y.type==="error")break}return m};e.decodePayload=a;function s(){return new TransformStream({transform(p,d){(0,t.encodePacketToBinary)(p,h=>{const m=h.length;let v;if(m<126)v=new Uint8Array(1),new DataView(v.buffer).setUint8(0,m);else if(m<65536){v=new Uint8Array(3);const y=new DataView(v.buffer);y.setUint8(0,126),y.setUint16(1,m)}else{v=new Uint8Array(9);const y=new DataView(v.buffer);y.setUint8(0,127),y.setBigUint64(1,BigInt(m))}p.data&&typeof p.data!="string"&&(v[0]|=128),d.enqueue(v),d.enqueue(h)})}})}e.createPacketEncoderStream=s;let c;function l(p){return p.reduce((d,h)=>d+h.length,0)}function u(p,d){if(p[0].length===d)return p.shift();const h=new Uint8Array(d);let m=0;for(let v=0;v<d;v++)h[v]=p[0][m++],m===p[0].length&&(p.shift(),m=0);return p.length&&m<p[0].length&&(p[0]=p[0].slice(m)),h}function f(p,d){c||(c=new TextDecoder);const h=[];let m=0,v=-1,y=!1;return new TransformStream({transform(g,b){for(h.push(g);;){if(m===0){if(l(h)<1)break;const k=u(h,1);y=(k[0]&128)===128,v=k[0]&127,v<126?m=3:v===126?m=1:m=2}else if(m===1){if(l(h)<2)break;const k=u(h,2);v=new DataView(k.buffer,k.byteOffset,k.length).getUint16(0),m=3}else if(m===2){if(l(h)<8)break;const k=u(h,8),S=new DataView(k.buffer,k.byteOffset,k.length),$=S.getUint32(0);if($>Math.pow(2,53-32)-1){b.enqueue(r.ERROR_PACKET);break}v=$*Math.pow(2,32)+S.getUint32(4),m=3}else{if(l(h)<v)break;const k=u(h,v);b.enqueue((0,n.decodePacket)(y?k:c.decode(k),d)),m=0}if(v===0||v>p){b.enqueue(r.ERROR_PACKET);break}}}})}e.createPacketDecoderStream=f,e.protocol=4})(gi);function ln(e){if(e)return YD(e)}function YD(e){for(var t in ln.prototype)e[t]=ln.prototype[t];return e}ln.prototype.on=ln.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},ln.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},ln.prototype.off=ln.prototype.removeListener=ln.prototype.removeAllListeners=ln.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},ln.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},ln.prototype.emitReserved=ln.prototype.emit,ln.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},ln.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Si=_g(Object.freeze(Object.defineProperty({__proto__:null,Emitter:ln},Symbol.toStringTag,{value:"Module"})));var Nn={},Bo={};Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.globalThisShim=void 0,Bo.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())(),Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.byteLength=Nn.installTimerFunctions=Nn.pick=void 0;const io=Bo;function JD(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}Nn.pick=JD;const XD=io.globalThisShim.setTimeout,QD=io.globalThisShim.clearTimeout;function ej(e,t){t.useNativeTimers?(e.setTimeoutFn=XD.bind(io.globalThisShim),e.clearTimeoutFn=QD.bind(io.globalThisShim)):(e.setTimeoutFn=io.globalThisShim.setTimeout.bind(io.globalThisShim),e.clearTimeoutFn=io.globalThisShim.clearTimeout.bind(io.globalThisShim))}Nn.installTimerFunctions=ej;const tj=1.33;function nj(e){return typeof e=="string"?rj(e):Math.ceil((e.byteLength||e.size)*tj)}Nn.byteLength=nj;function rj(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}var Nd={exports:{}},Dd,Sw;function oj(){if(Sw)return Dd;Sw=1;var e=1e3,t=e*60,n=t*60,r=n*24,o=r*7,i=r*365.25;Dd=function(u,f){f=f||{};var p=typeof u;if(p==="string"&&u.length>0)return a(u);if(p==="number"&&isFinite(u))return f.long?c(u):s(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function a(u){if(u=String(u),!(u.length>100)){var f=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(f){var p=parseFloat(f[1]),d=(f[2]||"ms").toLowerCase();switch(d){case"years":case"year":case"yrs":case"yr":case"y":return p*i;case"weeks":case"week":case"w":return p*o;case"days":case"day":case"d":return p*r;case"hours":case"hour":case"hrs":case"hr":case"h":return p*n;case"minutes":case"minute":case"mins":case"min":case"m":return p*t;case"seconds":case"second":case"secs":case"sec":case"s":return p*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}}}function s(u){var f=Math.abs(u);return f>=r?Math.round(u/r)+"d":f>=n?Math.round(u/n)+"h":f>=t?Math.round(u/t)+"m":f>=e?Math.round(u/e)+"s":u+"ms"}function c(u){var f=Math.abs(u);return f>=r?l(u,f,r,"day"):f>=n?l(u,f,n,"hour"):f>=t?l(u,f,t,"minute"):f>=e?l(u,f,e,"second"):u+" ms"}function l(u,f,p,d){var h=f>=p*1.5;return Math.round(u/p)+" "+d+(h?"s":"")}return Dd}function ij(e){n.debug=n,n.default=n,n.coerce=c,n.disable=i,n.enable=o,n.enabled=a,n.humanize=oj(),n.destroy=l,Object.keys(e).forEach(u=>{n[u]=e[u]}),n.names=[],n.skips=[],n.formatters={};function t(u){let f=0;for(let p=0;p<u.length;p++)f=(f<<5)-f+u.charCodeAt(p),f|=0;return n.colors[Math.abs(f)%n.colors.length]}n.selectColor=t;function n(u){let f,p=null,d,h;function m(...v){if(!m.enabled)return;const y=m,g=Number(new Date),b=g-(f||g);y.diff=b,y.prev=f,y.curr=g,f=g,v[0]=n.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let k=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,($,T)=>{if($==="%%")return"%";k++;const R=n.formatters[T];if(typeof R=="function"){const B=v[k];$=R.call(y,B),v.splice(k,1),k--}return $}),n.formatArgs.call(y,v),(y.log||n.log).apply(y,v)}return m.namespace=u,m.useColors=n.useColors(),m.color=n.selectColor(u),m.extend=r,m.destroy=n.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(d!==n.namespaces&&(d=n.namespaces,h=n.enabled(u)),h),set:v=>{p=v}}),typeof n.init=="function"&&n.init(m),m}function r(u,f){const p=n(this.namespace+(typeof f>"u"?":":f)+u);return p.log=this.log,p}function o(u){n.save(u),n.namespaces=u,n.names=[],n.skips=[];let f;const p=(typeof u=="string"?u:"").split(/[\s,]+/),d=p.length;for(f=0;f<d;f++)p[f]&&(u=p[f].replace(/\*/g,".*?"),u[0]==="-"?n.skips.push(new RegExp("^"+u.slice(1)+"$")):n.names.push(new RegExp("^"+u+"$")))}function i(){const u=[...n.names.map(s),...n.skips.map(s).map(f=>"-"+f)].join(",");return n.enable(""),u}function a(u){if(u[u.length-1]==="*")return!0;let f,p;for(f=0,p=n.skips.length;f<p;f++)if(n.skips[f].test(u))return!1;for(f=0,p=n.names.length;f<p;f++)if(n.names[f].test(u))return!0;return!1}function s(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function c(u){return u instanceof Error?u.stack||u.message:u}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}var aj=ij;(function(e,t){t.formatArgs=r,t.save=o,t.load=i,t.useColors=n,t.storage=a(),t.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let c;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(c=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(c[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;c.splice(1,0,l,"color: inherit");let u=0,f=0;c[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(u++,p==="%c"&&(f=u))}),c.splice(f,0,l)}t.log=console.debug||console.log||(()=>{});function o(c){try{c?t.storage.setItem("debug",c):t.storage.removeItem("debug")}catch{}}function i(){let c;try{c=t.storage.getItem("debug")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=process.env.DEBUG),c}function a(){try{return localStorage}catch{}}e.exports=aj(t);const{formatters:s}=e.exports;s.j=function(c){try{return JSON.stringify(c)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(Nd,Nd.exports);var dr=Nd.exports,Uo={};Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.decode=Uo.encode=void 0;function sj(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}Uo.encode=sj;function cj(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}Uo.decode=cj;var lj=be&&be.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lo,"__esModule",{value:!0}),Lo.Transport=void 0;const uj=gi,fj=Si,dj=Nn,pj=lj(dr),hj=Uo,mj=(0,pj.default)("engine.io-client:transport");class yj extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class vj extends fj.Emitter{constructor(t){super(),this.writable=!1,(0,dj.installTimerFunctions)(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new yj(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"?this.write(t):mj("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=(0,uj.decodePacket)(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=(0,hj.encode)(t);return n.length?"?"+n:""}}Lo.Transport=vj;var Ir={};Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.yeast=Ir.decode=Ir.encode=void 0;const Ew="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Bc=64,_w={};let $w=0,ao=0,kw;function jd(e){let t="";do t=Ew[e%Bc]+t,e=Math.floor(e/Bc);while(e>0);return t}Ir.encode=jd;function gj(e){let t=0;for(ao=0;ao<e.length;ao++)t=t*Bc+_w[e.charAt(ao)];return t}Ir.decode=gj;function bj(){const e=jd(+new Date);return e!==kw?($w=0,kw=e):e+"."+jd($w++)}for(Ir.yeast=bj;ao<Bc;ao++)_w[Ew[ao]]=ao;var Ei={},Uc={};Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.hasCORS=void 0;let Cw=!1;try{Cw=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}Uc.hasCORS=Cw,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.createCookieJar=Ei.XHR=void 0;const wj=Uc,xj=Bo;function Sj(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||wj.hasCORS))return new XMLHttpRequest}catch{}if(!t)try{return new xj.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}Ei.XHR=Sj;function Ej(){}Ei.createCookieJar=Ej;var _j=be&&be.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vi,"__esModule",{value:!0}),vi.Request=vi.Polling=void 0;const $j=Lo,kj=_j(dr),Cj=Ir,Ow=gi,Fd=Ei,Oj=Si,Tw=Nn,Tj=Bo,pn=(0,kj.default)("engine.io-client:polling");function Aj(){}const Pj=function(){return new Fd.XHR({xdomain:!1}).responseType!=null}();class Ij extends $j.Transport{constructor(t){if(super(t),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let o=location.port;o||(o=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||o!==t.port}const n=t&&t.forceBase64;this.supportsBinary=Pj&&!n,this.opts.withCredentials&&(this.cookieJar=(0,Fd.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const n=()=>{pn("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(pn("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){pn("pre-pause polling complete"),--r||n()})),this.writable||(pn("we are currently writing - waiting to pause"),r++,this.once("drain",function(){pn("pre-pause writing complete"),--r||n()}))}else n()}poll(){pn("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){pn("polling got data %s",t);const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};(0,Ow.decodePayload)(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():pn('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{pn("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(pn("transport open - closing"),t()):(pn("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,Ow.encodePayload)(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=(0,Cj.yeast)()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Wn(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,i)=>{this.onError("xhr post error",o,i)})}doPoll(){pn("xhr poll");const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}vi.Polling=Ij;class Wn extends Oj.Emitter{constructor(t,n){super(),(0,Tw.installTimerFunctions)(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=(0,Tw.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new Fd.XHR(n);try{pn("xhr open %s: %s",this.method,this.uri),r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this.opts.extraHeaders[o])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this.opts.cookieJar)===null||o===void 0||o.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},pn("xhr data %s",this.data),r.send(this.data)}catch(o){this.setTimeoutFn(()=>{this.onError(o)},0);return}typeof document<"u"&&(this.index=Wn.requestsCount++,Wn.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Aj,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Wn.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(vi.Request=Wn,Wn.requestsCount=0,Wn.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Aw);else if(typeof addEventListener=="function"){const e="onpagehide"in Tj.globalThisShim?"pagehide":"unload";addEventListener(e,Aw,!1)}}function Aw(){for(let e in Wn.requests)Wn.requests.hasOwnProperty(e)&&Wn.requests[e].abort()}var zc={},En={};Object.defineProperty(En,"__esModule",{value:!0}),En.defaultBinaryType=En.usingBrowserWebSocket=En.WebSocket=En.nextTick=void 0;const Pw=Bo;En.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),En.WebSocket=Pw.globalThisShim.WebSocket||Pw.globalThisShim.MozWebSocket,En.usingBrowserWebSocket=!0,En.defaultBinaryType="arraybuffer";var Rj=be&&be.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zc,"__esModule",{value:!0}),zc.WS=void 0;const Mj=Lo,Nj=Ir,Dj=Nn,so=En,jj=Rj(dr),Fj=gi,Lj=(0,jj.default)("engine.io-client:websocket"),Iw=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Bj extends Mj.Transport{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=Iw?{}:(0,Dj.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=so.usingBrowserWebSocket&&!Iw?n?new so.WebSocket(t,n):new so.WebSocket(t):new so.WebSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;(0,Fj.encodePacket)(r,this.supportsBinary,i=>{const a={};so.usingBrowserWebSocket||(r.options&&(a.compress=r.options.compress),this.opts.perMessageDeflate&&(typeof i=="string"?Buffer.byteLength(i):i.length)<this.opts.perMessageDeflate.threshold&&(a.compress=!1));try{so.usingBrowserWebSocket?this.ws.send(i):this.ws.send(i,a)}catch{Lj("websocket closed before onclose event")}o&&(0,so.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=(0,Nj.yeast)()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!so.WebSocket}}zc.WS=Bj;var qc={},Uj=be&&be.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qc,"__esModule",{value:!0}),qc.WT=void 0;const zj=Lo,qj=En,Rw=gi,qa=(0,Uj(dr).default)("engine.io-client:webtransport");class Hj extends zj.Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{qa("transport closed gracefully"),this.onClose()}).catch(t=>{qa("transport closed due to %s",t),this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=(0,Rw.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=(0,Rw.createPacketEncoderStream)();o.readable.pipeTo(t.writable),this.writer=o.writable.getWriter();const i=()=>{r.read().then(({done:s,value:c})=>{if(s){qa("session is closed");return}qa("received chunk: %o",c),this.onPacket(c),i()}).catch(s=>{qa("an error occurred while reading: %s",s)})};i();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this.writer.write(a).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this.writer.write(r).then(()=>{o&&(0,qj.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}qc.WT=Hj,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.transports=void 0;const Vj=vi,Wj=zc,Kj=qc;Ua.transports={websocket:Wj.WS,webtransport:Kj.WT,polling:Vj.Polling};var Ha={};Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.parse=void 0;const Gj=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Zj=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Yj(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=Gj.exec(e||""),i={},a=14;for(;a--;)i[Zj[a]]=o[a]||"";return n!=-1&&r!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=Jj(i,i.path),i.queryKey=Xj(i,i.query),i}Ha.parse=Yj;function Jj(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Xj(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,i){o&&(n[o]=i)}),n}var Qj=be&&be.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jc,"__esModule",{value:!0}),jc.Socket=void 0;const eF=Ua,Mw=Nn,tF=Uo,Nw=Ha,nF=Qj(dr),rF=Si,Dw=gi,oF=En,vt=(0,nF.default)("engine.io-client:socket");let jw=class ma extends rF.Emitter{constructor(t,n={}){super(),this.binaryType=oF.defaultBinaryType,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=(0,Nw.parse)(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=(0,Nw.parse)(n.host).host),(0,Mw.installTimerFunctions)(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=(0,tF.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){vt('creating transport "%s"',t);const n=Object.assign({},this.opts.query);n.EIO=Dw.protocol,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return vt("options: %j",r),new eF.transports[t](r)}open(){let t;if(this.opts.rememberUpgrade&&ma.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch(n){vt("error while creating transport: %s",n),this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){vt("setting transport %s",t.name),this.transport&&(vt("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){vt('probing transport "%s"',t);let n=this.createTransport(t),r=!1;ma.priorWebsocketSuccess=!1;const o=()=>{r||(vt('probe transport "%s" opened',t),n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(vt('probe transport "%s" pong',t),this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ma.priorWebsocketSuccess=n.name==="websocket",vt('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{r||this.readyState!=="closed"&&(vt("changing transport and sending upgrade packet"),u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{vt('probe transport "%s" failed',t);const p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function i(){r||(r=!0,u(),n.close(),n=null)}const a=f=>{const p=new Error("probe error: "+f);p.transport=n.name,i(),vt('probe transport "%s" failed because of error: %s',t,f),this.emitReserved("upgradeError",p)};function s(){a("transport closed")}function c(){a("socket closed")}function l(f){n&&f.name!==n.name&&(vt('"%s" works - aborting "%s"',f.name,n.name),i())}const u=()=>{n.removeListener("open",o),n.removeListener("error",a),n.removeListener("close",s),this.off("close",c),this.off("upgrading",l)};n.once("open",o),n.once("error",a),n.once("close",s),this.once("close",c),this.once("upgrading",l),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(vt("socket open"),this.readyState="open",ma.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){vt("starting upgrade probes");let t=0;const n=this.upgrades.length;for(;t<n;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(vt('socket receive: type "%s", data "%s"',t.type,t.data),this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=t.data,this.onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}else vt('packet received with socket readyState "%s"',this.readyState)}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();vt("flushing %d packets in socket",t.length),this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=(0,Mw.byteLength)(o)),r>0&&n>this.maxPayload)return vt("only send %d out of %d packets",r,this.writeBuffer.length),this.writeBuffer.slice(0,r);n+=2}return vt("payload size is %d (max: %d)",n,this.maxPayload),this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:t,data:n,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this.onClose("forced close"),vt("socket closing - telling transport to close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){vt("socket error %j",t),ma.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(vt('socket close with reason: "%s"',t),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const o=t.length;for(;r<o;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}};jc.Socket=jw,jw.protocol=Dw.protocol,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const t=jc;Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var n=Lo;Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return n.Transport}});var r=Ua;Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return r.transports}});var o=Nn;Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return o.installTimerFunctions}});var i=Ha;Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return i.parse}});var a=En;Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return a.nextTick}})}(Rd);var iF=be&&be.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.url=void 0;const aF=Rd,Fw=iF(dr).default("socket.io-client:url");function sF(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(Fw("protocol-less url %s",e),typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),Fw("parse %s",e),r=aF.parse(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}Dc.url=sF;var Hc={},Va={},Vc={},_i={},zo={};Object.defineProperty(zo,"__esModule",{value:!0}),zo.hasBinary=zo.isBinary=void 0;const cF=typeof ArrayBuffer=="function",lF=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Lw=Object.prototype.toString,uF=typeof Blob=="function"||typeof Blob<"u"&&Lw.call(Blob)==="[object BlobConstructor]",fF=typeof File=="function"||typeof File<"u"&&Lw.call(File)==="[object FileConstructor]";function Bw(e){return cF&&(e instanceof ArrayBuffer||lF(e))||uF&&e instanceof Blob||fF&&e instanceof File}zo.isBinary=Bw;function Wc(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Wc(e[n]))return!0;return!1}if(Bw(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Wc(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Wc(e[n]))return!0;return!1}zo.hasBinary=Wc,Object.defineProperty(_i,"__esModule",{value:!0}),_i.reconstructPacket=_i.deconstructPacket=void 0;const dF=zo;function pF(e){const t=[],n=e.data,r=e;return r.data=Ld(n,t),r.attachments=t.length,{packet:r,buffers:t}}_i.deconstructPacket=pF;function Ld(e,t){if(!e)return e;if((0,dF.isBinary)(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Ld(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Ld(e[r],t));return n}return e}function hF(e,t){return e.data=Bd(e.data,t),delete e.attachments,e}_i.reconstructPacket=hF;function Bd(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Bd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Bd(e[n],t));return e}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const t=Si,n=_i,r=zo,i=(0,dr.default)("socket.io-parser"),a=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];e.protocol=5;var s;(function(p){p[p.CONNECT=0]="CONNECT",p[p.DISCONNECT=1]="DISCONNECT",p[p.EVENT=2]="EVENT",p[p.ACK=3]="ACK",p[p.CONNECT_ERROR=4]="CONNECT_ERROR",p[p.BINARY_EVENT=5]="BINARY_EVENT",p[p.BINARY_ACK=6]="BINARY_ACK"})(s=e.PacketType||(e.PacketType={}));class c{constructor(d){this.replacer=d}encode(d){return i("encoding packet %j",d),(d.type===s.EVENT||d.type===s.ACK)&&(0,r.hasBinary)(d)?this.encodeAsBinary({type:d.type===s.EVENT?s.BINARY_EVENT:s.BINARY_ACK,nsp:d.nsp,data:d.data,id:d.id}):[this.encodeAsString(d)]}encodeAsString(d){let h=""+d.type;return(d.type===s.BINARY_EVENT||d.type===s.BINARY_ACK)&&(h+=d.attachments+"-"),d.nsp&&d.nsp!=="/"&&(h+=d.nsp+","),d.id!=null&&(h+=d.id),d.data!=null&&(h+=JSON.stringify(d.data,this.replacer)),i("encoded %j as %s",d,h),h}encodeAsBinary(d){const h=(0,n.deconstructPacket)(d),m=this.encodeAsString(h.packet),v=h.buffers;return v.unshift(m),v}}e.Encoder=c;function l(p){return Object.prototype.toString.call(p)==="[object Object]"}class u extends t.Emitter{constructor(d){super(),this.reviver=d}add(d){let h;if(typeof d=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");h=this.decodeString(d);const m=h.type===s.BINARY_EVENT;m||h.type===s.BINARY_ACK?(h.type=m?s.EVENT:s.ACK,this.reconstructor=new f(h),h.attachments===0&&super.emitReserved("decoded",h)):super.emitReserved("decoded",h)}else if((0,r.isBinary)(d)||d.base64)if(this.reconstructor)h=this.reconstructor.takeBinaryData(d),h&&(this.reconstructor=null,super.emitReserved("decoded",h));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+d)}decodeString(d){let h=0;const m={type:Number(d.charAt(0))};if(s[m.type]===void 0)throw new Error("unknown packet type "+m.type);if(m.type===s.BINARY_EVENT||m.type===s.BINARY_ACK){const y=h+1;for(;d.charAt(++h)!=="-"&&h!=d.length;);const g=d.substring(y,h);if(g!=Number(g)||d.charAt(h)!=="-")throw new Error("Illegal attachments");m.attachments=Number(g)}if(d.charAt(h+1)==="/"){const y=h+1;for(;++h&&!(d.charAt(h)===","||h===d.length););m.nsp=d.substring(y,h)}else m.nsp="/";const v=d.charAt(h+1);if(v!==""&&Number(v)==v){const y=h+1;for(;++h;){const g=d.charAt(h);if(g==null||Number(g)!=g){--h;break}if(h===d.length)break}m.id=Number(d.substring(y,h+1))}if(d.charAt(++h)){const y=this.tryParse(d.substr(h));if(u.isPayloadValid(m.type,y))m.data=y;else throw new Error("invalid payload")}return i("decoded %s as %j",d,m),m}tryParse(d){try{return JSON.parse(d,this.reviver)}catch{return!1}}static isPayloadValid(d,h){switch(d){case s.CONNECT:return l(h);case s.DISCONNECT:return h===void 0;case s.CONNECT_ERROR:return typeof h=="string"||l(h);case s.EVENT:case s.BINARY_EVENT:return Array.isArray(h)&&(typeof h[0]=="number"||typeof h[0]=="string"&&a.indexOf(h[0])===-1);case s.ACK:case s.BINARY_ACK:return Array.isArray(h)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=u;class f{constructor(d){this.packet=d,this.buffers=[],this.reconPack=d}takeBinaryData(d){if(this.buffers.push(d),this.buffers.length===this.reconPack.attachments){const h=(0,n.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),h}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}})(Vc);var Wa={};Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.on=void 0;function mF(e,t,n){return e.on(t,n),function(){e.off(t,n)}}Wa.on=mF;var yF=be&&be.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Va,"__esModule",{value:!0}),Va.Socket=void 0;const Kn=Vc,Kc=Wa,vF=Si,Tt=yF(dr).default("socket.io-client:socket"),gF=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class bF extends vF.Emitter{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Kc.on(t,"open",this.onopen.bind(this)),Kc.on(t,"packet",this.onpacket.bind(this)),Kc.on(t,"error",this.onerror.bind(this)),Kc.on(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(gF.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:Kn.PacketType.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++;Tt("emitting packet with ack id %d",a);const s=n.pop();this._registerAckCallback(a,s),r.id=a}const o=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!o||!this.connected)?Tt("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&(Tt("removing packet with ack id %d from the buffer",t),this.sendBuffer.splice(a,1));Tt("event with ack id %d has timed out after %d ms",t,o),n.call(this,new Error("operation has timed out"))},o);this.acks[t]=(...a)=>{this.io.clearTimeoutFn(i),n.apply(this,[null,...a])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((o,i)=>{n.push((a,s)=>r?a?i(a):o(s):o(a)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...i)=>r!==this._queue[0]?void 0:(o!==null?r.tryCount>this._opts.retries&&(Tt("packet [%d] is discarded after %d tries",r.id,r.tryCount),this._queue.shift(),n&&n(o)):(Tt("packet [%d] was successfully sent",r.id),this._queue.shift(),n&&n(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(Tt("draining queue"),!this.connected||this._queue.length===0)return;const n=this._queue[0];if(n.pending&&!t){Tt("packet [%d] has already been sent and is waiting for an ack",n.id);return}n.pending=!0,n.tryCount++,Tt("sending packet [%d] (try n°%d)",n.id,n.tryCount),this.flags=n.flags,this.emit.apply(this,n.args)}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){Tt("transport is open - connecting"),typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Kn.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){Tt("close (%s)",t),this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Kn.PacketType.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Kn.PacketType.EVENT:case Kn.PacketType.BINARY_EVENT:this.onevent(t);break;case Kn.PacketType.ACK:case Kn.PacketType.BINARY_ACK:this.onack(t);break;case Kn.PacketType.DISCONNECT:this.ondisconnect();break;case Kn.PacketType.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];Tt("emitting event %j",n),t.id!=null&&(Tt("attaching ack callback to event"),n.push(this.ack(t.id))),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,Tt("sending ack %j",o),n.packet({type:Kn.PacketType.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"?(Tt("calling ack %s with %j",t.id,t.data),n.apply(this,t.data),delete this.acks[t.id]):Tt("bad ack %s",t.id)}onconnect(t,n){Tt("socket connected with id %s",t),this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){Tt("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(Tt("performing disconnect (%s)",this.nsp),this.packet({type:Kn.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}Va.Socket=bF;var Gc={};Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.Backoff=void 0;function $i(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Gc.Backoff=$i,$i.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},$i.prototype.reset=function(){this.attempts=0},$i.prototype.setMin=function(e){this.ms=e},$i.prototype.setMax=function(e){this.max=e},$i.prototype.setJitter=function(e){this.jitter=e};var wF=be&&be.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),xF=be&&be.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),SF=be&&be.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&wF(t,e,n);return xF(t,e),t},EF=be&&be.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.Manager=void 0;const Ud=Rd,_F=Va,$F=SF(Vc),qo=Wa,kF=Gc,CF=Si,Vt=EF(dr).default("socket.io-client:manager");class OF extends CF.Emitter{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Ud.installTimerFunctions(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new kF.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||$F;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(Vt("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;Vt("opening %s",this.uri),this.engine=new Ud.Socket(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=qo.on(n,"open",function(){r.onopen(),t&&t()}),i=s=>{Vt("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},a=qo.on(n,"error",i);if(this._timeout!==!1){const s=this._timeout;Vt("connect attempt will timeout after %d",s);const c=this.setTimeoutFn(()=>{Vt("connect attempt timed out after %d",s),o(),i(new Error("timeout")),n.close()},s);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){Vt("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(qo.on(t,"ping",this.onping.bind(this)),qo.on(t,"data",this.ondata.bind(this)),qo.on(t,"error",this.onerror.bind(this)),qo.on(t,"close",this.onclose.bind(this)),qo.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Ud.nextTick(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){Vt("error",t),this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new _F.Socket(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active){Vt("socket %s is still active, skipping close",r);return}this._close()}_packet(t){Vt("writing packet %j",t);const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){Vt("cleanup"),this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){Vt("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){Vt("closed due to %s",t),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)Vt("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();Vt("will wait %dms before reconnect attempt",n),this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(Vt("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(Vt("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):(Vt("reconnect success"),t.onreconnect())}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}Hc.Manager=OF,function(e,t){var n=be&&be.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.connect=t.io=t.Socket=t.Manager=t.protocol=void 0;const r=Dc,o=Hc;Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return o.Manager}});const i=Va;Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return i.Socket}});const s=n(dr).default("socket.io-client"),c={};function l(f,p){typeof f=="object"&&(p=f,f=void 0),p=p||{};const d=r.url(f,p.path||"/socket.io"),h=d.source,m=d.id,v=d.path,y=c[m]&&v in c[m].nsps,g=p.forceNew||p["force new connection"]||p.multiplex===!1||y;let b;return g?(s("ignoring socket cache for %s",h),b=new o.Manager(h,p)):(c[m]||(s("new io instance for %s",h),c[m]=new o.Manager(h,p)),b=c[m]),d.query&&!p.query&&(p.query=d.queryKey),b.socket(d.path,p)}t.io=l,t.connect=l,t.default=l,Object.assign(l,{Manager:o.Manager,Socket:i.Socket,io:l,connect:l});var u=Vc;Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return u.protocol}}),e.exports=l}(Id,Id.exports);var TF=Id.exports;(function(e){var t=be&&be.__awaiter||function(c,l,u,f){function p(d){return d instanceof u?d:new u(function(h){h(d)})}return new(u||(u=Promise))(function(d,h){function m(g){try{y(f.next(g))}catch(b){h(b)}}function v(g){try{y(f.throw(g))}catch(b){h(b)}}function y(g){g.done?d(g.value):p(g.value).then(m,v)}y((f=f.apply(c,l||[])).next())})},n=be&&be.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.SocketComEmitter=e.SocketComEvents=e.SocketCom=void 0;const r=Pd,o=n(TF);class i{constructor(l){this.url=l,this.pending={},this.emitter=new s,this.events=this.emitter}connect(l,u){return t(this,void 0,void 0,function*(){return new Promise((f,p)=>{this.disconnect(),this.socket=(0,o.default)(this.url,{transports:["websocket"],auth:l,autoConnect:!1,query:u});const d=setTimeout(()=>{p("connection timed out")},5e3);this.socket.on("login",h=>t(this,void 0,void 0,function*(){clearTimeout(d),f(h)})),this.socket.on("connect_error",h=>{var m;(m=this.socket)===null||m===void 0||m.close(),clearTimeout(d),p(h.message)}),this.socket.on("message",h=>t(this,void 0,void 0,function*(){var m;this.pending[h.request]&&(!((m=h.data)===null||m===void 0)&&m.error?this.pending[h.request].reject(new Error(h.data.message)):this.pending[h.request].resolve(h.data),delete this.pending[h.request]),yield this.emitter.emit(a.Message,h)})),this.socket.connect()})})}disconnect(){var l;this.socket&&!(!((l=this.socket)===null||l===void 0)&&l.disconnected)&&this.socket.disconnect()}request(l,u){var f;return t(this,void 0,void 0,function*(){if(!(!((f=this.socket)===null||f===void 0)&&f.connected))throw new Error("Client is disconnected");const p=this.random(32),d=new Promise((h,m)=>{this.pending[p]={resolve:h,reject:m}});return this.socket.send({request:p,type:l,data:u}),d})}random(l){const u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let f="";for(let p=0;p<l;p++)f+=u.charAt(Math.floor(Math.random()*u.length));return f}}e.SocketCom=i;var a;(function(c){c.Message="message"})(a=e.SocketComEvents||(e.SocketComEvents={}));class s extends r.Emitter{}e.SocketComEmitter=s})(pw);var Zc={},AF=be&&be.__awaiter||function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{l(r.next(u))}catch(f){a(f)}}function c(u){try{l(r.throw(u))}catch(f){a(f)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.SocketEmitter=void 0;class PF{constructor(){this.listeners={}}on(t,n){const r=this.listeners[t];r?r.push(n):this.listeners[t]=[n]}removeListeners(t){this.listeners[t]=[]}emit(t,n){return AF(this,void 0,void 0,function*(){const r=this.listeners[t];if(r!=null&&r.length){for(const o of r)yield o(n);return!0}else return!1})}}Zc.SocketEmitter=PF;var hn=be&&be.__awaiter||function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{l(r.next(u))}catch(f){a(f)}}function c(u){try{l(r.throw(u))}catch(f){a(f)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.MessagingSocket=void 0;const Uw=pw,IF=Zc;class RF extends IF.SocketEmitter{constructor(t){super(),this.clientId=t.clientId,this.com=new Uw.SocketCom(t.url),this.com.events.on(Uw.SocketComEvents.Message,n=>hn(this,void 0,void 0,function*(){n.type==="message.new"&&(yield this.emit("message",n.data.message))}))}get creds(){return this._creds}get userId(){var t;return(t=this._creds)===null||t===void 0?void 0:t.userId}get conversationId(){return this._conversationId}connect(t,n){return hn(this,void 0,void 0,function*(){const r=n?{userData:JSON.stringify(n)}:void 0,o=yield this.com.connect({clientId:this.clientId,creds:t},r);return o.userId===(t==null?void 0:t.userId)&&!o.userToken&&(o.userToken=t.userToken),this._creds=o,yield this.emit("connect",this._creds),yield this.emit("user",this._creds.userId),o})}disconnect(){return hn(this,void 0,void 0,function*(){this.com.disconnect(),yield this.emit("disconnect",void 0)})}getUser(){return hn(this,void 0,void 0,function*(){return this.request("users.get",{})})}switchConversation(t){return hn(this,void 0,void 0,function*(){this._conversationId=t,yield this.emit("conversation",this._conversationId)})}createConversation(t){return hn(this,void 0,void 0,function*(){const n=yield this.request("conversations.create",{});return(t==null?void 0:t.switch)!==!1&&(yield this.switchConversation(n.id)),n})}startConversation(t){return hn(this,void 0,void 0,function*(){yield this.request("conversations.start",{id:t||this._conversationId})})}getConversation(t){return hn(this,void 0,void 0,function*(){return this.request("conversations.get",{id:t||this._conversationId})})}deleteConversation(t){return hn(this,void 0,void 0,function*(){const n=yield this.request("conversations.delete",{id:t||this._conversationId});return n&&(yield this.switchConversation(void 0)),n})}listConversations(t){return hn(this,void 0,void 0,function*(){return this.request("conversations.list",{limit:t||20})})}sendText(t){return hn(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:{type:"text",text:t}})})}sendPayload(t){return hn(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:t})})}listMessages(t){return hn(this,void 0,void 0,function*(){return this.request("messages.list",{conversationId:this._conversationId,limit:t||20})})}sendFeedback(t,n){return hn(this,void 0,void 0,function*(){yield this.request("messages.feedback",{messageId:t,feedback:n})})}request(t,n){return this.com.request(t,n)}}Nc.MessagingSocket=RF,function(e){var t=be&&be.__createBinding||(Object.create?function(r,o,i,a){a===void 0&&(a=i),Object.defineProperty(r,a,{enumerable:!0,get:function(){return o[i]}})}:function(r,o,i,a){a===void 0&&(a=i),r[a]=o[i]}),n=be&&be.__exportStar||function(r,o){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,r,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pd,e),n(Nc,e)}(iw);class MF{constructor(t){he(this,"socket");he(this,"clientId");he(this,"apiUrl");he(this,"userId");he(this,"conversationId");he(this,"userToken");he(this,"connected",!1);he(this,"emitter");he(this,"on");he(this,"mode","messaging");this.socket=new iw.MessagingSocket(t),this.emitter=new Lf,this.clientId=t.clientId,this.apiUrl=t.url,this.on=this.emitter.on.bind(this.emitter),this.socket.on("message",n=>{const r=n.payload;if(r.type==="trigger")switch(r.trigger.type){case"webchat-visibility":this.emitter.emit("webchatVisibility",r.trigger.visibility);break;case"webchat-config":this.emitter.emit("webchatConfig",r.trigger.config);break;case"custom-event":this.emitter.emit("customEvent",r.trigger.event);break}else{const o=uc.parse(r),{payload:i,disableInput:a}=Sf(o);this.emitter.emit("message",{...n,payload:i,disableInput:a})}}),this.socket.on("conversation",n=>{this.emitter.emit("conversation",n)})}async connect(t,n){if(this.connected)return;this.connected=!0;const r=await this.socket.connect(t,n).catch(o=>{throw this.connected=!1,o});return this.userId=r.userId,this.userToken=r.userToken,r}async disconnect(){await this.socket.disconnect(),this.connected=!1}async getUser(){throw new Error("Get user is not supported in messaging mode")}async updateUser(){throw new Error("Update user is not supported in messaging mode")}async sendFile(t){throw new Error("Send file is not supported in messaging mode")}async sendMessage(t){this.conversationId||await this.newConversation(),await this.socket.sendText(t),this.emitter.emit("messageSent",t)}async sendEvent(t){this.conversationId||await this.newConversation(),await this.socket.sendPayload({type:"trigger",payload:t})}async switchConversation(t){await this.socket.switchConversation(t),this.conversationId=t}async conversationExists(t){return(await this.socket.listConversations()).some(r=>r.id===t)}async newConversation(){const{id:t}=await this.socket.createConversation();await this.socket.startConversation(),this.conversationId=t}async listMessages(t){return(await this.socket.listMessages(t)).map(r=>{const o=uc.parse(r.payload),{payload:i,disableInput:a}=Sf(o);return{...r,payload:i,disableInput:a}})}}function zw(e,t){return function(){return e.apply(t,arguments)}}const{toString:qw}=Object.prototype,{getPrototypeOf:zd}=Object,qd=(e=>t=>{const n=qw.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Rr=e=>(e=e.toLowerCase(),t=>qd(t)===e),Yc=e=>t=>typeof t===e,{isArray:ki}=Array,Ka=Yc("undefined");function NF(e){return e!==null&&!Ka(e)&&e.constructor!==null&&!Ka(e.constructor)&&Ho(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Hw=Rr("ArrayBuffer");function DF(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Hw(e.buffer),t}const jF=Yc("string"),Ho=Yc("function"),Vw=Yc("number"),Hd=e=>e!==null&&typeof e=="object",FF=e=>e===!0||e===!1,Jc=e=>{if(qd(e)!=="object")return!1;const t=zd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},LF=Rr("Date"),BF=Rr("File"),UF=Rr("Blob"),zF=Rr("FileList"),qF=e=>Hd(e)&&Ho(e.pipe),HF=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||qw.call(e)===t||Ho(e.toString)&&e.toString()===t)},VF=Rr("URLSearchParams"),WF=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ga(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),ki(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let s;for(r=0;r<a;r++)s=i[r],t.call(null,e[s],s,e)}}function Ww(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Kw=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Gw=e=>!Ka(e)&&e!==Kw;function Vd(){const{caseless:e}=Gw(this)&&this||{},t={},n=(r,o)=>{const i=e&&Ww(t,o)||o;Jc(t[i])&&Jc(r)?t[i]=Vd(t[i],r):Jc(r)?t[i]=Vd({},r):ki(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Ga(arguments[r],n);return t}const KF=(e,t,n,{allOwnKeys:r}={})=>(Ga(t,(o,i)=>{n&&Ho(o)?e[i]=zw(o,n):e[i]=o},{allOwnKeys:r}),e),GF=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ZF=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},YF=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&zd(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},JF=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},XF=e=>{if(!e)return null;if(ki(e))return e;let t=e.length;if(!Vw(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},QF=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&zd(Uint8Array)),eL=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},tL=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},nL=Rr("HTMLFormElement"),rL=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Zw=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),oL=Rr("RegExp"),Yw=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ga(n,(o,i)=>{t(o,i,e)!==!1&&(r[i]=o)}),Object.defineProperties(e,r)},Y={isArray:ki,isArrayBuffer:Hw,isBuffer:NF,isFormData:HF,isArrayBufferView:DF,isString:jF,isNumber:Vw,isBoolean:FF,isObject:Hd,isPlainObject:Jc,isUndefined:Ka,isDate:LF,isFile:BF,isBlob:UF,isRegExp:oL,isFunction:Ho,isStream:qF,isURLSearchParams:VF,isTypedArray:QF,isFileList:zF,forEach:Ga,merge:Vd,extend:KF,trim:WF,stripBOM:GF,inherits:ZF,toFlatObject:YF,kindOf:qd,kindOfTest:Rr,endsWith:JF,toArray:XF,forEachEntry:eL,matchAll:tL,isHTMLForm:nL,hasOwnProperty:Zw,hasOwnProp:Zw,reduceDescriptors:Yw,freezeMethods:e=>{Yw(e,(t,n)=>{if(Ho(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Ho(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet:(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return ki(e)?r(e):r(String(e).split(t)),n},toCamelCase:rL,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:Ww,global:Kw,isContextDefined:Gw,toJSONObject:e=>{const t=new Array(10),n=(r,o)=>{if(Hd(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=ki(r)?[]:{};return Ga(r,(a,s)=>{const c=n(a,o+1);!Ka(c)&&(i[s]=c)}),t[o]=void 0,i}}return r};return n(e,0)}};function Ge(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}Y.inherits(Ge,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Y.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Jw=Ge.prototype,Xw={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Xw[e]={value:e}}),Object.defineProperties(Ge,Xw),Object.defineProperty(Jw,"isAxiosError",{value:!0}),Ge.from=(e,t,n,r,o,i)=>{const a=Object.create(Jw);return Y.toFlatObject(e,a,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),Ge.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var iL=typeof self=="object"?self.FormData:window.FormData;const aL=Ue(iL);function Wd(e){return Y.isPlainObject(e)||Y.isArray(e)}function Qw(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function e1(e,t,n){return e?e.concat(t).map(function(o,i){return o=Qw(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function sL(e){return Y.isArray(e)&&!e.some(Wd)}const cL=Y.toFlatObject(Y,{},null,function(t){return/^is[A-Z]/.test(t)});function lL(e){return e&&Y.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function Xc(e,t,n){if(!Y.isObject(e))throw new TypeError("target must be an object");t=t||new(aL||FormData),n=Y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,v){return!Y.isUndefined(v[m])});const r=n.metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&lL(t);if(!Y.isFunction(o))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(Y.isDate(h))return h.toISOString();if(!c&&Y.isBlob(h))throw new Ge("Blob is not supported. Use a Buffer instead.");return Y.isArrayBuffer(h)||Y.isTypedArray(h)?c&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,m,v){let y=h;if(h&&!v&&typeof h=="object"){if(Y.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(Y.isArray(h)&&sL(h)||Y.isFileList(h)||Y.endsWith(m,"[]")&&(y=Y.toArray(h)))return m=Qw(m),y.forEach(function(b,k){!(Y.isUndefined(b)||b===null)&&t.append(a===!0?e1([m],k,i):a===null?m:m+"[]",l(b))}),!1}return Wd(h)?!0:(t.append(e1(v,m,i),l(h)),!1)}const f=[],p=Object.assign(cL,{defaultVisitor:u,convertValue:l,isVisitable:Wd});function d(h,m){if(!Y.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(h),Y.forEach(h,function(y,g){(!(Y.isUndefined(y)||y===null)&&o.call(t,y,Y.isString(g)?g.trim():g,m,p))===!0&&d(y,m?m.concat(g):[g])}),f.pop()}}if(!Y.isObject(e))throw new TypeError("data must be an object");return d(e),t}function t1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Kd(e,t){this._pairs=[],e&&Xc(e,this,t)}const n1=Kd.prototype;n1.append=function(t,n){this._pairs.push([t,n])},n1.toString=function(t){const n=t?function(r){return t.call(this,r,t1)}:t1;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function uL(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function r1(e,t,n){if(!t)return e;const r=n&&n.encode||uL,o=n&&n.serialize;let i;if(o?i=o(t,n):i=Y.isURLSearchParams(t)?t.toString():new Kd(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class fL{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Y.forEach(this.handlers,function(r){r!==null&&t(r)})}}const o1=fL,i1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},dL=typeof URLSearchParams<"u"?URLSearchParams:Kd,pL=FormData,hL=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),mL=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),pr={isBrowser:!0,classes:{URLSearchParams:dL,FormData:pL,Blob},isStandardBrowserEnv:hL,isStandardBrowserWebWorkerEnv:mL,protocols:["http","https","file","blob","url","data"]};function yL(e,t){return Xc(e,new pr.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return pr.isNode&&Y.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function vL(e){return Y.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function gL(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function a1(e){function t(n,r,o,i){let a=n[i++];const s=Number.isFinite(+a),c=i>=n.length;return a=!a&&Y.isArray(o)?o.length:a,c?(Y.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!Y.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&Y.isArray(o[a])&&(o[a]=gL(o[a])),!s)}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const n={};return Y.forEachEntry(e,(r,o)=>{t(vL(r),o,n,0)}),n}return null}const bL={"Content-Type":void 0};function wL(e,t,n){if(Y.isString(e))try{return(t||JSON.parse)(e),Y.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Qc={transitional:i1,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=Y.isObject(t);if(i&&Y.isHTMLForm(t)&&(t=new FormData(t)),Y.isFormData(t))return o&&o?JSON.stringify(a1(t)):t;if(Y.isArrayBuffer(t)||Y.isBuffer(t)||Y.isStream(t)||Y.isFile(t)||Y.isBlob(t))return t;if(Y.isArrayBufferView(t))return t.buffer;if(Y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return yL(t,this.formSerializer).toString();if((s=Y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Xc(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),wL(t)):t}],transformResponse:[function(t){const n=this.transitional||Qc.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(t&&Y.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?Ge.from(s,Ge.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pr.classes.FormData,Blob:pr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Y.forEach(["delete","get","head"],function(t){Qc.headers[t]={}}),Y.forEach(["post","put","patch"],function(t){Qc.headers[t]=Y.merge(bL)});const Gd=Qc,xL=Y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),SL=e=>{const t={};let n,r,o;return e&&e.split(`
55
- `).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&xL[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},s1=Symbol("internals");function Za(e){return e&&String(e).trim().toLowerCase()}function el(e){return e===!1||e==null?e:Y.isArray(e)?e.map(el):String(e)}function EL(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function _L(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function c1(e,t,n,r){if(Y.isFunction(r))return r.call(this,t,n);if(Y.isString(t)){if(Y.isString(r))return t.indexOf(r)!==-1;if(Y.isRegExp(r))return r.test(t)}}function $L(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function kL(e,t){const n=Y.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}class tl{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,c,l){const u=Za(c);if(!u)throw new Error("header name must be a non-empty string");const f=Y.findKey(o,u);(!f||o[f]===void 0||l===!0||l===void 0&&o[f]!==!1)&&(o[f||c]=el(s))}const a=(s,c)=>Y.forEach(s,(l,u)=>i(l,u,c));return Y.isPlainObject(t)||t instanceof this.constructor?a(t,n):Y.isString(t)&&(t=t.trim())&&!_L(t)?a(SL(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=Za(t),t){const r=Y.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return EL(o);if(Y.isFunction(n))return n.call(this,o,r);if(Y.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Za(t),t){const r=Y.findKey(this,t);return!!(r&&(!n||c1(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=Za(a),a){const s=Y.findKey(r,a);s&&(!n||c1(r,r[s],s,n))&&(delete r[s],o=!0)}}return Y.isArray(t)?t.forEach(i):i(t),o}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(t){const n=this,r={};return Y.forEach(this,(o,i)=>{const a=Y.findKey(r,i);if(a){n[a]=el(o),delete n[i];return}const s=t?$L(i):String(i).trim();s!==i&&delete n[i],n[s]=el(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Y.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&Y.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
56
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[s1]=this[s1]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=Za(a);r[s]||(kL(o,a),r[s]=!0)}return Y.isArray(t)?t.forEach(i):i(t),this}}tl.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),Y.freezeMethods(tl.prototype),Y.freezeMethods(tl);const Mr=tl;function Zd(e,t){const n=this||Gd,r=t||n,o=Mr.from(r.headers);let i=r.data;return Y.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function l1(e){return!!(e&&e.__CANCEL__)}function Ya(e,t,n){Ge.call(this,e??"canceled",Ge.ERR_CANCELED,t,n),this.name="CanceledError"}Y.inherits(Ya,Ge,{__CANCEL__:!0});const CL=null;function OL(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ge("Request failed with status code "+n.status,[Ge.ERR_BAD_REQUEST,Ge.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const TL=pr.isStandardBrowserEnv?function(){return{write:function(n,r,o,i,a,s){const c=[];c.push(n+"="+encodeURIComponent(r)),Y.isNumber(o)&&c.push("expires="+new Date(o).toGMTString()),Y.isString(i)&&c.push("path="+i),Y.isString(a)&&c.push("domain="+a),s===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function AL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function PL(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function u1(e,t){return e&&!AL(t)?PL(e,t):t}const IL=pr.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let a=i;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const s=Y.isString(a)?o(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function RL(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ML(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),u=r[i];a||(a=l),n[o]=c,r[o]=l;let f=i,p=0;for(;f!==o;)p+=n[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),l-a<t)return;const d=u&&l-u;return d?Math.round(p*1e3/d):void 0}}function f1(e,t){let n=0;const r=ML(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-n,c=r(s),l=i<=a;n=i;const u={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&l?(a-i)/c:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}const nl={http:CL,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let o=e.data;const i=Mr.from(e.headers).normalize(),a=e.responseType;let s;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}Y.isFormData(o)&&(pr.isStandardBrowserEnv||pr.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const d=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(d+":"+h))}const u=u1(e.baseURL,e.url);l.open(e.method.toUpperCase(),r1(u,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function f(){if(!l)return;const d=Mr.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),m={data:!a||a==="text"||a==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:d,config:e,request:l};OL(function(y){n(y),c()},function(y){r(y),c()},m),l=null}if("onloadend"in l?l.onloadend=f:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(f)},l.onabort=function(){l&&(r(new Ge("Request aborted",Ge.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new Ge("Network Error",Ge.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let h=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||i1;e.timeoutErrorMessage&&(h=e.timeoutErrorMessage),r(new Ge(h,m.clarifyTimeoutError?Ge.ETIMEDOUT:Ge.ECONNABORTED,e,l)),l=null},pr.isStandardBrowserEnv){const d=(e.withCredentials||IL(u))&&e.xsrfCookieName&&TL.read(e.xsrfCookieName);d&&i.set(e.xsrfHeaderName,d)}o===void 0&&i.setContentType(null),"setRequestHeader"in l&&Y.forEach(i.toJSON(),function(h,m){l.setRequestHeader(m,h)}),Y.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&a!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",f1(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",f1(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=d=>{l&&(r(!d||d.type?new Ya(null,e,l):d),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=RL(u);if(p&&pr.protocols.indexOf(p)===-1){r(new Ge("Unsupported protocol "+p+":",Ge.ERR_BAD_REQUEST,e));return}l.send(o||null)})}};Y.forEach(nl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const NL={getAdapter:e=>{e=Y.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;o<t&&(n=e[o],!(r=Y.isString(n)?nl[n.toLowerCase()]:n));o++);if(!r)throw r===!1?new Ge(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(Y.hasOwnProp(nl,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!Y.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:nl};function Yd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ya(null,e)}function d1(e){return Yd(e),e.headers=Mr.from(e.headers),e.data=Zd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),NL.getAdapter(e.adapter||Gd.adapter)(e).then(function(r){return Yd(e),r.data=Zd.call(e,e.transformResponse,r),r.headers=Mr.from(r.headers),r},function(r){return l1(r)||(Yd(e),r&&r.response&&(r.response.data=Zd.call(e,e.transformResponse,r.response),r.response.headers=Mr.from(r.response.headers))),Promise.reject(r)})}const p1=e=>e instanceof Mr?e.toJSON():e;function Ci(e,t){t=t||{};const n={};function r(l,u,f){return Y.isPlainObject(l)&&Y.isPlainObject(u)?Y.merge.call({caseless:f},l,u):Y.isPlainObject(u)?Y.merge({},u):Y.isArray(u)?u.slice():u}function o(l,u,f){if(Y.isUndefined(u)){if(!Y.isUndefined(l))return r(void 0,l,f)}else return r(l,u,f)}function i(l,u){if(!Y.isUndefined(u))return r(void 0,u)}function a(l,u){if(Y.isUndefined(u)){if(!Y.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function s(l,u,f){if(f in t)return r(l,u);if(f in e)return r(void 0,l)}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(l,u)=>o(p1(l),p1(u),!0)};return Y.forEach(Object.keys(e).concat(Object.keys(t)),function(u){const f=c[u]||o,p=f(e[u],t[u],u);Y.isUndefined(p)&&f!==s||(n[u]=p)}),n}const h1="1.2.5",Jd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Jd[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const m1={};Jd.transitional=function(t,n,r){function o(i,a){return"[Axios v"+h1+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(t===!1)throw new Ge(o(a," has been removed"+(n?" in "+n:"")),Ge.ERR_DEPRECATED);return n&&!m1[a]&&(m1[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,s):!0}};function DL(e,t,n){if(typeof e!="object")throw new Ge("options must be an object",Ge.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const s=e[i],c=s===void 0||a(s,i,e);if(c!==!0)throw new Ge("option "+i+" must be "+c,Ge.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ge("Unknown option "+i,Ge.ERR_BAD_OPTION)}}const Xd={assertOptions:DL,validators:Jd},co=Xd.validators;class rl{constructor(t){this.defaults=t,this.interceptors={request:new o1,response:new o1}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ci(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Xd.assertOptions(r,{silentJSONParsing:co.transitional(co.boolean),forcedJSONParsing:co.transitional(co.boolean),clarifyTimeoutError:co.transitional(co.boolean)},!1),o!==void 0&&Xd.assertOptions(o,{encode:co.function,serialize:co.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a;a=i&&Y.merge(i.common,i[n.method]),a&&Y.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=Mr.concat(a,i);const s=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(c=c&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let u,f=0,p;if(!c){const h=[d1.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,l),p=h.length,u=Promise.resolve(n);f<p;)u=u.then(h[f++],h[f++]);return u}p=s.length;let d=n;for(f=0;f<p;){const h=s[f++],m=s[f++];try{d=h(d)}catch(v){m.call(this,v);break}}try{u=d1.call(this,d)}catch(h){return Promise.reject(h)}for(f=0,p=l.length;f<p;)u=u.then(l[f++],l[f++]);return u}getUri(t){t=Ci(this.defaults,t);const n=u1(t.baseURL,t.url);return r1(n,t.params,t.paramsSerializer)}}Y.forEach(["delete","get","head","options"],function(t){rl.prototype[t]=function(n,r){return this.request(Ci(r||{},{method:t,url:n,data:(r||{}).data}))}}),Y.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,s){return this.request(Ci(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}rl.prototype[t]=n(),rl.prototype[t+"Form"]=n(!0)});const ol=rl;class Qd{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,s){r.reason||(r.reason=new Ya(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Qd(function(o){t=o}),cancel:t}}}const jL=Qd;function FL(e){return function(n){return e.apply(null,n)}}function LL(e){return Y.isObject(e)&&e.isAxiosError===!0}const ep={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ep).forEach(([e,t])=>{ep[t]=e});const BL=ep;function y1(e){const t=new ol(e),n=zw(ol.prototype.request,t);return Y.extend(n,ol.prototype,t,{allOwnKeys:!0}),Y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return y1(Ci(e,o))},n}const At=y1(Gd);At.Axios=ol,At.CanceledError=Ya,At.CancelToken=jL,At.isCancel=l1,At.VERSION=h1,At.toFormData=Xc,At.AxiosError=Ge,At.Cancel=At.CanceledError,At.all=function(t){return Promise.all(t)},At.spread=FL,At.isAxiosError=LL,At.mergeConfig=Ci,At.AxiosHeaders=Mr,At.formToJSON=e=>a1(Y.isHTMLForm(e)?new FormData(e):e),At.HttpStatusCode=BL,At.default=At;const v1=At,g1={},UL=Object.freeze(Object.defineProperty({__proto__:null,default:g1},Symbol.toStringTag,{value:"Module"})),zL={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))};let tp=typeof window<"u"&&typeof window.document<"u"?window.crypto:g1;tp.getRandomValues||(tp=zL);class lt extends Error{constructor(n,r,o,i,a,s){super(i);he(this,"isApiError",!0);this.code=n,this.description=r,this.type=o,this.message=i,this.error=a,this.id=s,this.id||(this.id=lt.generateId())}format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){const n=this.getPrefix(),r=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],o=4,i=Array.from(tp.getRandomValues(new Uint8Array(o))).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase();return`${n}_${r}x${i}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}}const qL=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,np=e=>e instanceof lt||qL(e)&&e.isApiError===!0;class Ja extends lt{constructor(t,n,r){super(500,"An unknown error occurred","Unknown",t,n,r)}}class HL extends lt{constructor(t,n,r){super(500,"An internal error occurred","Internal",t,n,r)}}class VL extends lt{constructor(t,n,r){super(401,"The request requires to be authenticated.","Unauthorized",t,n,r)}}class WL extends lt{constructor(t,n,r){super(403,"The requested action can't be peform by this resource.","Forbidden",t,n,r)}}class KL extends lt{constructor(t,n,r){super(413,"The request payload is too large.","PayloadTooLarge",t,n,r)}}class GL extends lt{constructor(t,n,r){super(400,"The request payload is invalid.","InvalidPayload",t,n,r)}}class ZL extends lt{constructor(t,n,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,n,r)}}class YL extends lt{constructor(t,n,r){super(405,"The requested method does not exist.","MethodNotFound",t,n,r)}}class JL extends lt{constructor(t,n,r){super(404,"The requested resource does not exist.","ResourceNotFound",t,n,r)}}class XL extends lt{constructor(t,n,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,n,r)}}class QL extends lt{constructor(t,n,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,n,r)}}class e3 extends lt{constructor(t,n,r){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",t,n,r)}}class t3 extends lt{constructor(t,n,r){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",t,n,r)}}class n3 extends lt{constructor(t,n,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,n,r)}}class r3 extends lt{constructor(t,n,r){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",t,n,r)}}class o3 extends lt{constructor(t,n,r){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",t,n,r)}}class i3 extends lt{constructor(t,n,r){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,n,r)}}class a3 extends lt{constructor(t,n,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,n,r)}}class s3 extends lt{constructor(t,n,r){super(409,"The record attempted to be created already exists.","AlreadyExists",t,n,r)}}class c3 extends lt{constructor(t,n,r){super(429,"The request has been rate limited.","RateLimited",t,n,r)}}class l3 extends lt{constructor(t,n,r){super(402,"A payment is required to perform this request.","PaymentRequired",t,n,r)}}class u3 extends lt{constructor(t,n,r){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,n,r)}}class f3 extends lt{constructor(t,n,r){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,n,r)}}class d3 extends lt{constructor(t,n,r){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,n,r)}}const p3={Unknown:Ja,Internal:HL,Unauthorized:VL,Forbidden:WL,PayloadTooLarge:KL,InvalidPayload:GL,UnsupportedMediaType:ZL,MethodNotFound:YL,ResourceNotFound:JL,InvalidJsonSchema:XL,InvalidDataFormat:QL,InvalidIdentifier:e3,RelationConflict:t3,ReferenceConstraint:n3,ResourceLockedConflict:r3,ReferenceNotFound:o3,InvalidQuery:i3,Runtime:a3,AlreadyExists:s3,RateLimited:c3,PaymentRequired:l3,QuotaExceeded:u3,LimitExceeded:f3,BreakingChanges:d3},b1=e=>np(e)?e:e instanceof Error?new Ja(e.message,e):typeof e=="string"?new Ja(e):h3(e);function h3(e){if(typeof e=="object"&&"code"in e&&"type"in e&&"id"in e&&"message"in e&&typeof e.type=="string"&&typeof e.message=="string"){const t=p3[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Ja(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Ja("An invalid error occurred: "+JSON.stringify(e))}var m3=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,n);if(a.value!==o||a.enumerable!==!0)return!1}return!0},w1=typeof Symbol<"u"&&Symbol,y3=m3,x1=function(){return typeof w1!="function"||typeof Symbol!="function"||typeof w1("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:y3()},rp={__proto__:null,foo:{}},v3=Object,S1=function(){return{__proto__:rp}.foo===rp.foo&&!(rp instanceof v3)},g3="Function.prototype.bind called on incompatible ",b3=Object.prototype.toString,w3=Math.max,x3="[object Function]",E1=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var i=0;i<n.length;i+=1)r[i+t.length]=n[i];return r},S3=function(t,n){for(var r=[],o=n||0,i=0;o<t.length;o+=1,i+=1)r[i]=t[o];return r},E3=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},_3=function(t){var n=this;if(typeof n!="function"||b3.apply(n)!==x3)throw new TypeError(g3+n);for(var r=S3(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,E1(r,arguments));return Object(u)===u?u:this}return n.apply(t,E1(r,arguments))},a=w3(0,n.length-r.length),s=[],c=0;c<a;c++)s[c]="$"+c;if(o=Function("binder","return function ("+E3(s,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var l=function(){};l.prototype=n.prototype,o.prototype=new l,l.prototype=null}return o},$3=_3,Xa=Function.prototype.bind||$3,k3=Xa,C3=k3.call(Function.call,Object.prototype.hasOwnProperty),ze,Oi=SyntaxError,_1=Function,Ti=TypeError,op=function(e){try{return _1('"use strict"; return ('+e+").constructor;")()}catch{}},Vo=Object.getOwnPropertyDescriptor;if(Vo)try{Vo({},"")}catch{Vo=null}var ip=function(){throw new Ti},O3=Vo?function(){try{return arguments.callee,ip}catch{try{return Vo(arguments,"callee").get}catch{return ip}}}():ip,Ai=x1(),T3=S1(),Lt=Object.getPrototypeOf||(T3?function(e){return e.__proto__}:null),Pi={},A3=typeof Uint8Array>"u"||!Lt?ze:Lt(Uint8Array),Wo={"%AggregateError%":typeof AggregateError>"u"?ze:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ze:ArrayBuffer,"%ArrayIteratorPrototype%":Ai&&Lt?Lt([][Symbol.iterator]()):ze,"%AsyncFromSyncIteratorPrototype%":ze,"%AsyncFunction%":Pi,"%AsyncGenerator%":Pi,"%AsyncGeneratorFunction%":Pi,"%AsyncIteratorPrototype%":Pi,"%Atomics%":typeof Atomics>"u"?ze:Atomics,"%BigInt%":typeof BigInt>"u"?ze:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ze:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ze:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ze:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ze:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ze:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ze:FinalizationRegistry,"%Function%":_1,"%GeneratorFunction%":Pi,"%Int8Array%":typeof Int8Array>"u"?ze:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ze:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ze:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ai&&Lt?Lt(Lt([][Symbol.iterator]())):ze,"%JSON%":typeof JSON=="object"?JSON:ze,"%Map%":typeof Map>"u"?ze:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ai||!Lt?ze:Lt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ze:Promise,"%Proxy%":typeof Proxy>"u"?ze:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ze:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ze:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ai||!Lt?ze:Lt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ze:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ai&&Lt?Lt(""[Symbol.iterator]()):ze,"%Symbol%":Ai?Symbol:ze,"%SyntaxError%":Oi,"%ThrowTypeError%":O3,"%TypedArray%":A3,"%TypeError%":Ti,"%Uint8Array%":typeof Uint8Array>"u"?ze:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ze:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ze:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ze:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ze:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ze:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ze:WeakSet};if(Lt)try{null.error}catch(e){var P3=Lt(Lt(e));Wo["%Error.prototype%"]=P3}var I3=function e(t){var n;if(t==="%AsyncFunction%")n=op("async function () {}");else if(t==="%GeneratorFunction%")n=op("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=op("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&Lt&&(n=Lt(o.prototype))}return Wo[t]=n,n},$1={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Qa=Xa,il=C3,R3=Qa.call(Function.call,Array.prototype.concat),M3=Qa.call(Function.apply,Array.prototype.splice),k1=Qa.call(Function.call,String.prototype.replace),al=Qa.call(Function.call,String.prototype.slice),N3=Qa.call(Function.call,RegExp.prototype.exec),D3=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,j3=/\\(\\)?/g,F3=function(t){var n=al(t,0,1),r=al(t,-1);if(n==="%"&&r!=="%")throw new Oi("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Oi("invalid intrinsic syntax, expected opening `%`");var o=[];return k1(t,D3,function(i,a,s,c){o[o.length]=s?k1(c,j3,"$1"):a||i}),o},L3=function(t,n){var r=t,o;if(il($1,r)&&(o=$1[r],r="%"+o[0]+"%"),il(Wo,r)){var i=Wo[r];if(i===Pi&&(i=I3(r)),typeof i>"u"&&!n)throw new Ti("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Oi("intrinsic "+t+" does not exist!")},B3=function(t,n){if(typeof t!="string"||t.length===0)throw new Ti("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Ti('"allowMissing" argument must be a boolean');if(N3(/^%?[^%]*%?$/,t)===null)throw new Oi("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=F3(t),o=r.length>0?r[0]:"",i=L3("%"+o+"%",n),a=i.name,s=i.value,c=!1,l=i.alias;l&&(o=l[0],M3(r,R3([0,1],l)));for(var u=1,f=!0;u<r.length;u+=1){var p=r[u],d=al(p,0,1),h=al(p,-1);if((d==='"'||d==="'"||d==="`"||h==='"'||h==="'"||h==="`")&&d!==h)throw new Oi("property names with quotes must have matching quotes");if((p==="constructor"||!f)&&(c=!0),o+="."+p,a="%"+o+"%",il(Wo,a))s=Wo[a];else if(s!=null){if(!(p in s)){if(!n)throw new Ti("base intrinsic for "+t+" exists, but the property is not available.");return}if(Vo&&u+1>=r.length){var m=Vo(s,p);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[p]}else f=il(s,p),s=s[p];f&&!c&&(Wo[a]=s)}}return s},U3=Error,z3=EvalError,q3=RangeError,H3=ReferenceError,V3=SyntaxError,W3=TypeError,K3=URIError,G3=Function.prototype.call,Z3=Object.prototype.hasOwnProperty,Y3=Xa,J3=Y3.call(G3,Z3),qe,X3=U3,Q3=z3,e5=q3,t5=H3,Ii=V3,Ri=W3,n5=K3,C1=Function,ap=function(e){try{return C1('"use strict"; return ('+e+").constructor;")()}catch{}},Ko=Object.getOwnPropertyDescriptor;if(Ko)try{Ko({},"")}catch{Ko=null}var sp=function(){throw new Ri},r5=Ko?function(){try{return arguments.callee,sp}catch{try{return Ko(arguments,"callee").get}catch{return sp}}}():sp,Mi=x1(),o5=S1(),Bt=Object.getPrototypeOf||(o5?function(e){return e.__proto__}:null),Ni={},i5=typeof Uint8Array>"u"||!Bt?qe:Bt(Uint8Array),Go={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?qe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?qe:ArrayBuffer,"%ArrayIteratorPrototype%":Mi&&Bt?Bt([][Symbol.iterator]()):qe,"%AsyncFromSyncIteratorPrototype%":qe,"%AsyncFunction%":Ni,"%AsyncGenerator%":Ni,"%AsyncGeneratorFunction%":Ni,"%AsyncIteratorPrototype%":Ni,"%Atomics%":typeof Atomics>"u"?qe:Atomics,"%BigInt%":typeof BigInt>"u"?qe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?qe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?qe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?qe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":X3,"%eval%":eval,"%EvalError%":Q3,"%Float32Array%":typeof Float32Array>"u"?qe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?qe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?qe:FinalizationRegistry,"%Function%":C1,"%GeneratorFunction%":Ni,"%Int8Array%":typeof Int8Array>"u"?qe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?qe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?qe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Mi&&Bt?Bt(Bt([][Symbol.iterator]())):qe,"%JSON%":typeof JSON=="object"?JSON:qe,"%Map%":typeof Map>"u"?qe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Mi||!Bt?qe:Bt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?qe:Promise,"%Proxy%":typeof Proxy>"u"?qe:Proxy,"%RangeError%":e5,"%ReferenceError%":t5,"%Reflect%":typeof Reflect>"u"?qe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?qe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Mi||!Bt?qe:Bt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?qe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Mi&&Bt?Bt(""[Symbol.iterator]()):qe,"%Symbol%":Mi?Symbol:qe,"%SyntaxError%":Ii,"%ThrowTypeError%":r5,"%TypedArray%":i5,"%TypeError%":Ri,"%Uint8Array%":typeof Uint8Array>"u"?qe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?qe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?qe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?qe:Uint32Array,"%URIError%":n5,"%WeakMap%":typeof WeakMap>"u"?qe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?qe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?qe:WeakSet};if(Bt)try{null.error}catch(e){var a5=Bt(Bt(e));Go["%Error.prototype%"]=a5}var s5=function e(t){var n;if(t==="%AsyncFunction%")n=ap("async function () {}");else if(t==="%GeneratorFunction%")n=ap("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=ap("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&Bt&&(n=Bt(o.prototype))}return Go[t]=n,n},O1={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},es=Xa,sl=J3,c5=es.call(Function.call,Array.prototype.concat),l5=es.call(Function.apply,Array.prototype.splice),T1=es.call(Function.call,String.prototype.replace),cl=es.call(Function.call,String.prototype.slice),u5=es.call(Function.call,RegExp.prototype.exec),f5=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,d5=/\\(\\)?/g,p5=function(t){var n=cl(t,0,1),r=cl(t,-1);if(n==="%"&&r!=="%")throw new Ii("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Ii("invalid intrinsic syntax, expected opening `%`");var o=[];return T1(t,f5,function(i,a,s,c){o[o.length]=s?T1(c,d5,"$1"):a||i}),o},h5=function(t,n){var r=t,o;if(sl(O1,r)&&(o=O1[r],r="%"+o[0]+"%"),sl(Go,r)){var i=Go[r];if(i===Ni&&(i=s5(r)),typeof i>"u"&&!n)throw new Ri("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Ii("intrinsic "+t+" does not exist!")},A1=function(t,n){if(typeof t!="string"||t.length===0)throw new Ri("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Ri('"allowMissing" argument must be a boolean');if(u5(/^%?[^%]*%?$/,t)===null)throw new Ii("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=p5(t),o=r.length>0?r[0]:"",i=h5("%"+o+"%",n),a=i.name,s=i.value,c=!1,l=i.alias;l&&(o=l[0],l5(r,c5([0,1],l)));for(var u=1,f=!0;u<r.length;u+=1){var p=r[u],d=cl(p,0,1),h=cl(p,-1);if((d==='"'||d==="'"||d==="`"||h==='"'||h==="'"||h==="`")&&d!==h)throw new Ii("property names with quotes must have matching quotes");if((p==="constructor"||!f)&&(c=!0),o+="."+p,a="%"+o+"%",sl(Go,a))s=Go[a];else if(s!=null){if(!(p in s)){if(!n)throw new Ri("base intrinsic for "+t+" exists, but the property is not available.");return}if(Ko&&u+1>=r.length){var m=Ko(s,p);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[p]}else f=sl(s,p),s=s[p];f&&!c&&(Go[a]=s)}}return s},P1={exports:{}};(function(e){var t=Xa,n=A1,r=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||t.call(o,r),a=n("%Object.getOwnPropertyDescriptor%",!0),s=n("%Object.defineProperty%",!0),c=n("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}e.exports=function(f){var p=i(t,o,arguments);if(a&&s){var d=a(p,"length");d.configurable&&s(p,"length",{value:1+c(0,f.length-(arguments.length-1))})}return p};var l=function(){return i(t,r,arguments)};s?s(e.exports,"apply",{value:l}):e.exports.apply=l})(P1);var m5=P1.exports,I1=A1,R1=m5,y5=R1(I1("String.prototype.indexOf")),v5=function(t,n){var r=I1(t,!!n);return typeof r=="function"&&y5(t,".prototype.")>-1?R1(r):r};const g5=_g(UL);var cp=typeof Map=="function"&&Map.prototype,lp=Object.getOwnPropertyDescriptor&&cp?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ll=cp&&lp&&typeof lp.get=="function"?lp.get:null,M1=cp&&Map.prototype.forEach,up=typeof Set=="function"&&Set.prototype,fp=Object.getOwnPropertyDescriptor&&up?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ul=up&&fp&&typeof fp.get=="function"?fp.get:null,N1=up&&Set.prototype.forEach,b5=typeof WeakMap=="function"&&WeakMap.prototype,ts=b5?WeakMap.prototype.has:null,w5=typeof WeakSet=="function"&&WeakSet.prototype,ns=w5?WeakSet.prototype.has:null,x5=typeof WeakRef=="function"&&WeakRef.prototype,D1=x5?WeakRef.prototype.deref:null,S5=Boolean.prototype.valueOf,E5=Object.prototype.toString,_5=Function.prototype.toString,$5=String.prototype.match,dp=String.prototype.slice,lo=String.prototype.replace,k5=String.prototype.toUpperCase,j1=String.prototype.toLowerCase,F1=RegExp.prototype.test,L1=Array.prototype.concat,hr=Array.prototype.join,C5=Array.prototype.slice,B1=Math.floor,pp=typeof BigInt=="function"?BigInt.prototype.valueOf:null,hp=Object.getOwnPropertySymbols,mp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Di=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Qt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Di||"symbol")?Symbol.toStringTag:null,U1=Object.prototype.propertyIsEnumerable,z1=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function q1(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||F1.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-B1(-e):B1(e);if(r!==e){var o=String(r),i=dp.call(t,o.length+1);return lo.call(o,n,"$&_")+"."+lo.call(lo.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return lo.call(t,n,"$&_")}var yp=g5,H1=yp.custom,V1=G1(H1)?H1:null,O5=function e(t,n,r,o){var i=n||{};if(uo(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(uo(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=uo(i,"customInspect")?i.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(uo(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(uo(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=i.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Y1(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return s?q1(t,c):c}if(typeof t=="bigint"){var l=String(t)+"n";return s?q1(t,l):l}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return vp(t)?"[Array]":"[Object]";var f=W5(i,r);if(typeof o>"u")o=[];else if(Z1(o,t)>=0)return"[Circular]";function p(L,P,N){if(P&&(o=C5.call(o),o.push(P)),N){var j={depth:i.depth};return uo(i,"quoteStyle")&&(j.quoteStyle=i.quoteStyle),e(L,j,r+1,o)}return e(L,i,r+1,o)}if(typeof t=="function"&&!K1(t)){var d=j5(t),h=fl(t,p);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(h.length>0?" { "+hr.call(h,", ")+" }":"")}if(G1(t)){var m=Di?lo.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):mp.call(t);return typeof t=="object"&&!Di?rs(m):m}if(q5(t)){for(var v="<"+j1.call(String(t.nodeName)),y=t.attributes||[],g=0;g<y.length;g++)v+=" "+y[g].name+"="+W1(T5(y[g].value),"double",i);return v+=">",t.childNodes&&t.childNodes.length&&(v+="..."),v+="</"+j1.call(String(t.nodeName))+">",v}if(vp(t)){if(t.length===0)return"[]";var b=fl(t,p);return f&&!V5(b)?"["+bp(b,f)+"]":"[ "+hr.call(b,", ")+" ]"}if(P5(t)){var k=fl(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!U1.call(t,"cause")?"{ ["+String(t)+"] "+hr.call(L1.call("[cause]: "+p(t.cause),k),", ")+" }":k.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+hr.call(k,", ")+" }"}if(typeof t=="object"&&a){if(V1&&typeof t[V1]=="function"&&yp)return yp(t,{depth:u-r});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(F5(t)){var S=[];return M1&&M1.call(t,function(L,P){S.push(p(P,t,!0)+" => "+p(L,t))}),J1("Map",ll.call(t),S,f)}if(U5(t)){var $=[];return N1&&N1.call(t,function(L){$.push(p(L,t))}),J1("Set",ul.call(t),$,f)}if(L5(t))return gp("WeakMap");if(z5(t))return gp("WeakSet");if(B5(t))return gp("WeakRef");if(R5(t))return rs(p(Number(t)));if(N5(t))return rs(p(pp.call(t)));if(M5(t))return rs(S5.call(t));if(I5(t))return rs(p(String(t)));if(!A5(t)&&!K1(t)){var T=fl(t,p),R=z1?z1(t)===Object.prototype:t instanceof Object||t.constructor===Object,B=t instanceof Object?"":"null prototype",O=!R&&Qt&&Object(t)===t&&Qt in t?dp.call(fo(t),8,-1):B?"Object":"",M=R||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",H=M+(O||B?"["+hr.call(L1.call([],O||[],B||[]),": ")+"] ":"");return T.length===0?H+"{}":f?H+"{"+bp(T,f)+"}":H+"{ "+hr.call(T,", ")+" }"}return String(t)};function W1(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function T5(e){return lo.call(String(e),/"/g,"&quot;")}function vp(e){return fo(e)==="[object Array]"&&(!Qt||!(typeof e=="object"&&Qt in e))}function A5(e){return fo(e)==="[object Date]"&&(!Qt||!(typeof e=="object"&&Qt in e))}function K1(e){return fo(e)==="[object RegExp]"&&(!Qt||!(typeof e=="object"&&Qt in e))}function P5(e){return fo(e)==="[object Error]"&&(!Qt||!(typeof e=="object"&&Qt in e))}function I5(e){return fo(e)==="[object String]"&&(!Qt||!(typeof e=="object"&&Qt in e))}function R5(e){return fo(e)==="[object Number]"&&(!Qt||!(typeof e=="object"&&Qt in e))}function M5(e){return fo(e)==="[object Boolean]"&&(!Qt||!(typeof e=="object"&&Qt in e))}function G1(e){if(Di)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!mp)return!1;try{return mp.call(e),!0}catch{}return!1}function N5(e){if(!e||typeof e!="object"||!pp)return!1;try{return pp.call(e),!0}catch{}return!1}var D5=Object.prototype.hasOwnProperty||function(e){return e in this};function uo(e,t){return D5.call(e,t)}function fo(e){return E5.call(e)}function j5(e){if(e.name)return e.name;var t=$5.call(_5.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Z1(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function F5(e){if(!ll||!e||typeof e!="object")return!1;try{ll.call(e);try{ul.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function L5(e){if(!ts||!e||typeof e!="object")return!1;try{ts.call(e,ts);try{ns.call(e,ns)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function B5(e){if(!D1||!e||typeof e!="object")return!1;try{return D1.call(e),!0}catch{}return!1}function U5(e){if(!ul||!e||typeof e!="object")return!1;try{ul.call(e);try{ll.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function z5(e){if(!ns||!e||typeof e!="object")return!1;try{ns.call(e,ns);try{ts.call(e,ts)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function q5(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Y1(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Y1(dp.call(e,0,t.maxStringLength),t)+r}var o=lo.call(lo.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,H5);return W1(o,"single",t)}function H5(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+k5.call(t.toString(16))}function rs(e){return"Object("+e+")"}function gp(e){return e+" { ? }"}function J1(e,t,n,r){var o=r?bp(n,r):hr.call(n,", ");return e+" ("+t+") {"+o+"}"}function V5(e){for(var t=0;t<e.length;t++)if(Z1(e[t],`
57
- `)>=0)return!1;return!0}function W5(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=hr.call(Array(e.indent+1)," ");else return null;return{base:n,prev:hr.call(Array(t+1),n)}}function bp(e,t){if(e.length===0)return"";var n=`
58
- `+t.prev+t.base;return n+hr.call(e,","+n)+`
59
- `+t.prev}function fl(e,t){var n=vp(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=uo(e,o)?t(e[o],e):""}var i=typeof hp=="function"?hp(e):[],a;if(Di){a={};for(var s=0;s<i.length;s++)a["$"+i[s]]=i[s]}for(var c in e)uo(e,c)&&(n&&String(Number(c))===c&&c<e.length||Di&&a["$"+c]instanceof Symbol||(F1.call(/[^\w$]/,c)?r.push(t(c,e)+": "+t(e[c],e)):r.push(c+": "+t(e[c],e))));if(typeof hp=="function")for(var l=0;l<i.length;l++)U1.call(e,i[l])&&r.push("["+t(i[l])+"]: "+t(e[i[l]],e));return r}var wp=B3,ji=v5,K5=O5,G5=wp("%TypeError%"),dl=wp("%WeakMap%",!0),pl=wp("%Map%",!0),Z5=ji("WeakMap.prototype.get",!0),Y5=ji("WeakMap.prototype.set",!0),J5=ji("WeakMap.prototype.has",!0),X5=ji("Map.prototype.get",!0),Q5=ji("Map.prototype.set",!0),e4=ji("Map.prototype.has",!0),xp=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},t4=function(e,t){var n=xp(e,t);return n&&n.value},n4=function(e,t,n){var r=xp(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},r4=function(e,t){return!!xp(e,t)},o4=function(){var t,n,r,o={assert:function(i){if(!o.has(i))throw new G5("Side channel does not contain "+K5(i))},get:function(i){if(dl&&i&&(typeof i=="object"||typeof i=="function")){if(t)return Z5(t,i)}else if(pl){if(n)return X5(n,i)}else if(r)return t4(r,i)},has:function(i){if(dl&&i&&(typeof i=="object"||typeof i=="function")){if(t)return J5(t,i)}else if(pl){if(n)return e4(n,i)}else if(r)return r4(r,i);return!1},set:function(i,a){dl&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new dl),Y5(t,i,a)):pl?(n||(n=new pl),Q5(n,i,a)):(r||(r={key:{},next:null}),n4(r,i,a))}};return o},i4=String.prototype.replace,a4=/%20/g,Sp={RFC1738:"RFC1738",RFC3986:"RFC3986"},Ep={default:Sp.RFC3986,formatters:{RFC1738:function(e){return i4.call(e,a4,"+")},RFC3986:function(e){return String(e)}},RFC1738:Sp.RFC1738,RFC3986:Sp.RFC3986},s4=Ep,_p=Object.prototype.hasOwnProperty,Zo=Array.isArray,mr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),c4=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Zo(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},X1=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},l4=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Zo(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!_p.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return Zo(t)&&!Zo(n)&&(o=X1(t,r)),Zo(t)&&Zo(n)?(n.forEach(function(i,a){if(_p.call(t,a)){var s=t[a];s&&typeof s=="object"&&i&&typeof i=="object"?t[a]=e(s,i,r):t.push(i)}else t[a]=i}),t):Object.keys(n).reduce(function(i,a){var s=n[a];return _p.call(i,a)?i[a]=e(i[a],s,r):i[a]=s,i},o)},u4=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},f4=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},d4=function(t,n,r,o,i){if(t.length===0)return t;var a=t;if(typeof t=="symbol"?a=Symbol.prototype.toString.call(t):typeof t!="string"&&(a=String(t)),r==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var s="",c=0;c<a.length;++c){var l=a.charCodeAt(c);if(l===45||l===46||l===95||l===126||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===s4.RFC1738&&(l===40||l===41)){s+=a.charAt(c);continue}if(l<128){s=s+mr[l];continue}if(l<2048){s=s+(mr[192|l>>6]+mr[128|l&63]);continue}if(l<55296||l>=57344){s=s+(mr[224|l>>12]+mr[128|l>>6&63]+mr[128|l&63]);continue}c+=1,l=65536+((l&1023)<<10|a.charCodeAt(c)&1023),s+=mr[240|l>>18]+mr[128|l>>12&63]+mr[128|l>>6&63]+mr[128|l&63]}return s},p4=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],a=i.obj[i.prop],s=Object.keys(a),c=0;c<s.length;++c){var l=s[c],u=a[l];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:a,prop:l}),r.push(u))}return c4(n),t},h4=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},m4=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},y4=function(t,n){return[].concat(t,n)},v4=function(t,n){if(Zo(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Q1={arrayToObject:X1,assign:u4,combine:y4,compact:p4,decode:f4,encode:d4,isBuffer:m4,isRegExp:h4,maybeMap:v4,merge:l4},ex=o4,hl=Q1,os=Ep,g4=Object.prototype.hasOwnProperty,tx={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Nr=Array.isArray,b4=Array.prototype.push,nx=function(e,t){b4.apply(e,Nr(t)?t:[t])},w4=Date.prototype.toISOString,rx=os.default,en={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:hl.encode,encodeValuesOnly:!1,format:rx,formatter:os.formatters[rx],indices:!1,serializeDate:function(t){return w4.call(t)},skipNulls:!1,strictNullHandling:!1},x4=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},$p={},S4=function e(t,n,r,o,i,a,s,c,l,u,f,p,d,h,m,v){for(var y=t,g=v,b=0,k=!1;(g=g.get($p))!==void 0&&!k;){var S=g.get(t);if(b+=1,typeof S<"u"){if(S===b)throw new RangeError("Cyclic object value");k=!0}typeof g.get($p)>"u"&&(b=0)}if(typeof c=="function"?y=c(n,y):y instanceof Date?y=f(y):r==="comma"&&Nr(y)&&(y=hl.maybeMap(y,function(j){return j instanceof Date?f(j):j})),y===null){if(i)return s&&!h?s(n,en.encoder,m,"key",p):n;y=""}if(x4(y)||hl.isBuffer(y)){if(s){var $=h?n:s(n,en.encoder,m,"key",p);return[d($)+"="+d(s(y,en.encoder,m,"value",p))]}return[d(n)+"="+d(String(y))]}var T=[];if(typeof y>"u")return T;var R;if(r==="comma"&&Nr(y))h&&s&&(y=hl.maybeMap(y,s)),R=[{value:y.length>0?y.join(",")||null:void 0}];else if(Nr(c))R=c;else{var B=Object.keys(y);R=l?B.sort(l):B}for(var O=o&&Nr(y)&&y.length===1?n+"[]":n,M=0;M<R.length;++M){var H=R[M],L=typeof H=="object"&&typeof H.value<"u"?H.value:y[H];if(!(a&&L===null)){var P=Nr(y)?typeof r=="function"?r(O,H):O:O+(u?"."+H:"["+H+"]");v.set(t,b);var N=ex();N.set($p,v),nx(T,e(L,P,r,o,i,a,r==="comma"&&h&&Nr(y)?null:s,c,l,u,f,p,d,h,m,N))}}return T},E4=function(t){if(!t)return en;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||en.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=os.default;if(typeof t.format<"u"){if(!g4.call(os.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=os.formatters[r],i=en.filter;return(typeof t.filter=="function"||Nr(t.filter))&&(i=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:en.addQueryPrefix,allowDots:typeof t.allowDots>"u"?en.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:en.charsetSentinel,delimiter:typeof t.delimiter>"u"?en.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:en.encode,encoder:typeof t.encoder=="function"?t.encoder:en.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:en.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:en.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:en.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:en.strictNullHandling}},_4=function(e,t){var n=e,r=E4(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):Nr(r.filter)&&(i=r.filter,o=i);var a=[];if(typeof n!="object"||n===null)return"";var s;t&&t.arrayFormat in tx?s=t.arrayFormat:t&&"indices"in t?s=t.indices?"indices":"repeat":s="indices";var c=tx[s];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l=c==="comma"&&t&&t.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var u=ex(),f=0;f<o.length;++f){var p=o[f];r.skipNulls&&n[p]===null||nx(a,S4(n[p],p,c,l,r.strictNullHandling,r.skipNulls,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,u))}var d=a.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),d.length>0?h+d:""},Fi=Q1,kp=Object.prototype.hasOwnProperty,$4=Array.isArray,Ut={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Fi.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},k4=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},ox=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},C4="utf8=%26%2310003%3B",O4="utf8=%E2%9C%93",T4=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,i=n.parameterLimit===1/0?void 0:n.parameterLimit,a=o.split(n.delimiter,i),s=-1,c,l=n.charset;if(n.charsetSentinel)for(c=0;c<a.length;++c)a[c].indexOf("utf8=")===0&&(a[c]===O4?l="utf-8":a[c]===C4&&(l="iso-8859-1"),s=c,c=a.length);for(c=0;c<a.length;++c)if(c!==s){var u=a[c],f=u.indexOf("]="),p=f===-1?u.indexOf("="):f+1,d,h;p===-1?(d=n.decoder(u,Ut.decoder,l,"key"),h=n.strictNullHandling?null:""):(d=n.decoder(u.slice(0,p),Ut.decoder,l,"key"),h=Fi.maybeMap(ox(u.slice(p+1),n),function(m){return n.decoder(m,Ut.decoder,l,"value")})),h&&n.interpretNumericEntities&&l==="iso-8859-1"&&(h=k4(h)),u.indexOf("[]=")>-1&&(h=$4(h)?[h]:h),kp.call(r,d)?r[d]=Fi.combine(r[d],h):r[d]=h}return r},A4=function(e,t,n,r){for(var o=r?t:ox(t,n),i=e.length-1;i>=0;--i){var a,s=e[i];if(s==="[]"&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var c=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,l=parseInt(c,10);!n.parseArrays&&c===""?a={0:o}:!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(a=[],a[l]=o):c!=="__proto__"&&(a[c]=o)}o=a}return o},P4=function(t,n,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=r.depth>0&&a.exec(i),l=c?i.slice(0,c.index):i,u=[];if(l){if(!r.plainObjects&&kp.call(Object.prototype,l)&&!r.allowPrototypes)return;u.push(l)}for(var f=0;r.depth>0&&(c=s.exec(i))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&kp.call(Object.prototype,c[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(c[1])}return c&&u.push("["+i.slice(c.index)+"]"),A4(u,n,r,o)}},I4=function(t){if(!t)return Ut;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?Ut.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Ut.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ut.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ut.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ut.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ut.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ut.comma,decoder:typeof t.decoder=="function"?t.decoder:Ut.decoder,delimiter:typeof t.delimiter=="string"||Fi.isRegExp(t.delimiter)?t.delimiter:Ut.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ut.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ut.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ut.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ut.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ut.strictNullHandling}},R4=function(e,t){var n=I4(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?T4(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),a=0;a<i.length;++a){var s=i[a],c=P4(s,r[s],n,typeof e=="string");o=Fi.merge(o,c,n)}return n.allowSparse===!0?o:Fi.compact(o)},M4=_4,N4=R4,D4=Ep,j4={formats:D4,parse:N4,stringify:M4};const F4=Ue(j4),L4=e=>e[1]!==void 0,_t=e=>{const{method:t,path:n,query:r,headers:o,body:i}=e,a=Object.entries(o).filter(L4),s=Object.fromEntries(a),c=F4.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),l=c?[n,c].join("?"):n;return{method:t,url:l,headers:s,data:i}},B4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),U4=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),z4=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),q4=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),H4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),V4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),W4=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),K4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),G4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Z4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),Y4=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),J4=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),X4=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Q4=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),eB=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),tB=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),nB=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),rB=e=>({path:"/events",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),oB=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),iB=e=>({path:"/files",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{key:e.key,size:e.size,accessPolicies:e.accessPolicies,index:e.index,contentType:e.contentType,tags:e.tags}});let aB=class{constructor(t,n={}){he(this,"addParticipant",async t=>{const{path:n,headers:r,query:o,body:i}=B4(t),s=(this.props.toAxiosRequest??_t)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"createConversation",async t=>{const{path:n,headers:r,query:o,body:i}=U4(t),s=(this.props.toAxiosRequest??_t)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"deleteConversation",async t=>{const{path:n,headers:r,query:o,body:i}=z4(t),s=(this.props.toAxiosRequest??_t)({method:"delete",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"getConversation",async t=>{const{path:n,headers:r,query:o,body:i}=q4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"getParticipant",async t=>{const{path:n,headers:r,query:o,body:i}=H4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"listConversationMessages",async t=>{const{path:n,headers:r,query:o,body:i}=V4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"listConversations",async t=>{const{path:n,headers:r,query:o,body:i}=W4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"listParticipants",async t=>{const{path:n,headers:r,query:o,body:i}=K4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"listenConversation",async t=>{const{path:n,headers:r,query:o,body:i}=G4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"removeParticipant",async t=>{const{path:n,headers:r,query:o,body:i}=Z4(t),s=(this.props.toAxiosRequest??_t)({method:"delete",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"createMessage",async t=>{const{path:n,headers:r,query:o,body:i}=Y4(t),s=(this.props.toAxiosRequest??_t)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"deleteMessage",async t=>{const{path:n,headers:r,query:o,body:i}=J4(t),s=(this.props.toAxiosRequest??_t)({method:"delete",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"getMessage",async t=>{const{path:n,headers:r,query:o,body:i}=X4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"createUser",async t=>{const{path:n,headers:r,query:o,body:i}=Q4(t),s=(this.props.toAxiosRequest??_t)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"deleteUser",async t=>{const{path:n,headers:r,query:o,body:i}=eB(t),s=(this.props.toAxiosRequest??_t)({method:"delete",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"getUser",async t=>{const{path:n,headers:r,query:o,body:i}=tB(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"updateUser",async t=>{const{path:n,headers:r,query:o,body:i}=nB(t),s=(this.props.toAxiosRequest??_t)({method:"put",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"createEvent",async t=>{const{path:n,headers:r,query:o,body:i}=rB(t),s=(this.props.toAxiosRequest??_t)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"getEvent",async t=>{const{path:n,headers:r,query:o,body:i}=oB(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"createFile",async t=>{const{path:n,headers:r,query:o,body:i}=iB(t),s=(this.props.toAxiosRequest??_t)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});this.axiosInstance=t,this.props=n}};function $t(e){var t;return v1.isAxiosError(e)&&((t=e.response)!=null&&t.data)?b1(e.response.data):b1(e)}class ix{constructor(){he(this,"listeners",{})}emit(t,n){const r=this.listeners[t];if(r)for(const o of[...r])o(n)}onceOrMore(t,n){const r=o=>{n(o)==="stop-listening"&&this.off(t,r)};this.on(t,r)}once(t,n){const r=o=>{this.off(t,r),n(o)};this.on(t,r)}on(t,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(n)}off(t,n){const r=this.listeners[t];if(!r)return;const o=r.indexOf(n);o!==-1&&r.splice(o,1)}cleanup(){this.listeners={}}}var Cp={exports:{}};/** @license
51
+ `))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
52
+ `,...i.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c}j0.peek=_j;function j0(e){return e.value||""}function _j(){return"<"}N0.peek=Tj;function N0(e,t,n,r){const o=rd(n),i=o==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),c+=l.move(")"),a(),c}function Tj(){return"!"}L0.peek=Cj;function L0(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),o==="full"||!c||c!==f?l+=s.move(f+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function Cj(){return"!"}F0.peek=Ij;function F0(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const a=n.unsafe[i],s=n.compilePattern(a);let l;if(a.atBreak)for(;l=s.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return o+r+o}function Ij(){return"`"}function B0(e,t){const n=If(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}U0.peek=Aj;function U0(e,t,n,r){const o=rd(n),i=o==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(B0(e,n)){const u=n.stack;n.stack=[],s=n.enter("autolink");let f=a.move("<");return f+=a.move(n.containerPhrasing(e,{before:f,after:">",...a.current()})),f+=a.move(">"),s(),n.stack=u,f}s=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),l()),c+=a.move(")"),s(),c}function Aj(e,t,n){return B0(e,n)?"<":"["}z0.peek=Pj;function z0(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),o==="full"||!c||c!==f?l+=s.move(f+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function Pj(){return"["}function od(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Rj(e){const t=od(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Mj(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function H0(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Dj(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?Mj(n):od(n);const s=e.ordered?a==="."?")":".":Rj(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),H0(n)===a&&u){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),c}function jj(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Nj(e,t,n,r){const o=jj(n);let i=n.bulletCurrent||od(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let a=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),u);return l(),c;function u(f,p,d){return p?(d?"":" ".repeat(a))+f:(d?i:i+" ".repeat(a-i.length))+f}}function Lj(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a}const Fj=Xs(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Bj(e,t,n,r){return(e.children.some(function(a){return Fj(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Uj(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}q0.peek=zj;function q0(e,t,n,r){const o=Uj(n),i=n.enter("strong"),a=n.createTracker(r);let s=a.move(o+o);return s+=a.move(n.containerPhrasing(e,{before:s,after:o,...a.current()})),s+=a.move(o+o),i(),s}function zj(e,t,n){return n.options.strong||"*"}function Hj(e,t,n,r){return n.safe(e.value,r)}function qj(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Wj(e,t,n){const r=(H0(n)+(n.options.ruleSpaces?" ":"")).repeat(qj(n));return n.options.ruleSpaces?r.slice(0,-1):r}const W0={blockquote:hj,break:M0,code:wj,definition:Sj,emphasis:D0,hardBreak:M0,heading:kj,html:j0,image:N0,imageReference:L0,inlineCode:F0,link:U0,linkReference:z0,list:Dj,listItem:Nj,paragraph:Lj,root:Bj,strong:q0,text:Hj,thematicBreak:Wj};function Vj(){return{enter:{table:Kj,tableData:V0,tableHeader:V0,tableRow:Zj},exit:{codeText:Yj,table:Gj,tableData:id,tableHeader:id,tableRow:id}}}function Kj(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Gj(e){this.exit(e),this.data.inTable=void 0}function Zj(e){this.enter({type:"tableRow",children:[]},e)}function id(e){this.exit(e)}function V0(e){this.enter({type:"tableCell",children:[]},e)}function Yj(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Jj));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Jj(e,t){return t==="|"?t:e}function Xj(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
53
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:l,tableRow:s}};function a(d,h,m,y){return c(u(d,m,y),d.align)}function s(d,h,m,y){const v=f(d,m,y),g=c([v]);return g.slice(0,g.indexOf(`
54
+ `))}function l(d,h,m,y){const v=m.enter("tableCell"),g=m.enter("phrasing"),b=m.containerPhrasing(d,{...y,before:i,after:i});return g(),v(),b}function c(d,h){return fj(d,{align:h,alignDelimiters:r,padding:n,stringLength:o})}function u(d,h,m){const y=d.children;let v=-1;const g=[],b=h.enter("table");for(;++v<y.length;)g[v]=f(y[v],h,m);return b(),g}function f(d,h,m){const y=d.children;let v=-1;const g=[],b=h.enter("tableRow");for(;++v<y.length;)g[v]=l(y[v],d,h,m);return b(),g}function p(d,h,m){let y=W0.inlineCode(d,h,m);return m.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function Qj(){return{exit:{taskListCheckValueChecked:K0,taskListCheckValueUnchecked:K0,paragraph:tN}}}function eN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:nN}}}function K0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function tN(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let i=-1,a;for(;++i<o.length;){const s=o[i];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function nN(e,t,n,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=W0.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+a}}function rN(){return[MD(),VD(),aj(),Vj(),Qj()]}function oN(e){return{extensions:[DD(),KD(),sj(),Xj(e),eN()]}}const iN={tokenize:fN,partial:!0},G0={tokenize:dN,partial:!0},Z0={tokenize:pN,partial:!0},Y0={tokenize:hN,partial:!0},aN={tokenize:mN,partial:!0},J0={tokenize:cN,previous:Q0},X0={tokenize:uN,previous:ew},xr={tokenize:lN,previous:tw},er={};function sN(){return{text:er}}let Oo=48;for(;Oo<123;)er[Oo]=xr,Oo++,Oo===58?Oo=65:Oo===91&&(Oo=97);er[43]=xr,er[45]=xr,er[46]=xr,er[95]=xr,er[72]=[xr,X0],er[104]=[xr,X0],er[87]=[xr,J0],er[119]=[xr,J0];function lN(e,t,n){const r=this;let o,i;return a;function a(f){return!ad(f)||!tw.call(r,r.previous)||sd(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return ad(f)?(e.consume(f),s):f===64?(e.consume(f),l):n(f)}function l(f){return f===46?e.check(aN,u,c)(f):f===45||f===95||Kt(f)?(i=!0,e.consume(f),l):u(f)}function c(f){return e.consume(f),o=!0,l}function u(f){return i&&o&&nn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function cN(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!Q0.call(r,r.previous)||sd(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(iN,e.attempt(G0,e.attempt(Z0,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function uN(e,t,n){const r=this;let o="",i=!1;return a;function a(f){return(f===72||f===104)&&ew.call(r,r.previous)&&!sd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(nn(f)&&o.length<5)return o+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const p=o.toLowerCase();if(p==="http"||p==="https")return e.consume(f),l}return n(f)}function l(f){return f===47?(e.consume(f),i?c:(i=!0,l)):n(f)}function c(f){return f===null||Us(f)||at(f)||$o(f)||zs(f)?n(f):e.attempt(G0,e.attempt(Z0,u),n)(f)}function u(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function fN(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function dN(e,t,n){let r,o,i;return a;function a(c){return c===46||c===95?e.check(Y0,l,s)(c):c===null||at(c)||$o(c)||c!==45&&zs(c)?l(c):(i=!0,e.consume(c),a)}function s(c){return c===95?r=!0:(o=r,r=void 0),e.consume(c),a}function l(c){return o||r||!i?n(c):t(c)}}function pN(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Y0,t,i)(a):a===null||at(a)||$o(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&r++,e.consume(a),o}}function hN(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),i):s===93?(e.consume(s),o):s===60||s===null||at(s)||$o(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||at(s)||$o(s)?t(s):r(s)}function i(s){return nn(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):nn(s)?(e.consume(s),a):n(s)}}function mN(e,t,n){return r;function r(i){return e.consume(i),o}function o(i){return Kt(i)?n(i):t(i)}}function Q0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||at(e)}function ew(e){return!nn(e)}function tw(e){return!(e===47||ad(e))}function ad(e){return e===43||e===45||e===46||e===95||Kt(e)}function sd(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const vN={tokenize:$N,partial:!0};function yN(){return{document:{91:{tokenize:xN,continuation:{tokenize:SN},exit:EN}},text:{91:{tokenize:wN},93:{add:"after",tokenize:gN,resolveTo:bN}}}}function gN(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const l=r.events[o][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const c=Nn(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!i.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function bN(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function wN(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){if(i>999||f===93&&!a||f===null||f===91||at(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return o.includes(Nn(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return at(f)||(a=!0),i++,e.consume(f),f===92?u:c}function u(f){return f===91||f===92||f===93?(e.consume(f),i++,c):c(f)}}function xN(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,s;return l;function l(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(h)}function u(h){if(a>999||h===93&&!s||h===null||h===91||at(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return i=Nn(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return at(h)||(s=!0),a++,e.consume(h),h===92?f:u}function f(h){return h===91||h===92||h===93?(e.consume(h),a++,u):u(h)}function p(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o.includes(i)||o.push(i),He(e,d,"gfmFootnoteDefinitionWhitespace")):n(h)}function d(h){return t(h)}}function SN(e,t,n){return e.check(da,t,e.attempt(vN,t,n))}function EN(e){e.exit("gfmFootnoteDefinition")}function $N(e,t,n){const r=this;return He(e,o,"gfmFootnoteDefinitionIndent",4+1);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function ON(e){let n=(e||{}).singleTilde;const r={tokenize:i,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},f={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},p=[["enter",u,s],["enter",a[c][1],s],["exit",a[c][1],s],["enter",f,s]],d=s.parser.constructs.insideSpan.null;d&&hn(p,p.length,0,qs(d,a.slice(c+1,l),s)),hn(p,p.length,0,[["exit",f,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",u,s]]),hn(a,c-1,l-c+3,p),l=c+p.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function i(a,s,l){const c=this.previous,u=this.events;let f=0;return p;function p(h){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(h):(a.enter("strikethroughSequenceTemporary"),d(h))}function d(h){const m=Hs(c);if(h===126)return f>1?l(h):(a.consume(h),f++,d);if(f<2&&!n)return l(h);const y=a.exit("strikethroughSequenceTemporary"),v=Hs(h);return y._open=!v||v===2&&!!m,y._close=!m||m===2&&!!v,s(h)}}}class kN{constructor(){this.map=[]}add(t,n,r){_N(this,t,n,r)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let o=r.pop();for(;o;)t.push(...o),o=r.pop();this.map.length=0}}function _N(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function TN(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function CN(){return{flow:{null:{tokenize:IN,resolveAll:AN}}}}function IN(e,t,n){const r=this;let o=0,i=0,a;return s;function s(T){let M=r.events.length-1;for(;M>-1;){const A=r.events[M][1].type;if(A==="lineEnding"||A==="linePrefix")M--;else break}const q=M>-1?r.events[M][1].type:null,B=q==="tableHead"||q==="tableRow"?$:l;return B===$&&r.parser.lazy[r.now().line]?n(T):B(T)}function l(T){return e.enter("tableHead"),e.enter("tableRow"),c(T)}function c(T){return T===124||(a=!0,i+=1),u(T)}function u(T){return T===null?n(T):$e(T)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),d):n(T):Fe(T)?He(e,u,"whitespace")(T):(i+=1,a&&(a=!1,o+=1),T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),f(T)))}function f(T){return T===null||T===124||at(T)?(e.exit("data"),u(T)):(e.consume(T),T===92?p:f)}function p(T){return T===92||T===124?(e.consume(T),f):f(T)}function d(T){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(T):(e.enter("tableDelimiterRow"),a=!1,Fe(T)?He(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):h(T))}function h(T){return T===45||T===58?y(T):T===124?(a=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),m):S(T)}function m(T){return Fe(T)?He(e,y,"whitespace")(T):y(T)}function y(T){return T===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),v):T===45?(i+=1,v(T)):T===null||$e(T)?k(T):S(T)}function v(T){return T===45?(e.enter("tableDelimiterFiller"),g(T)):S(T)}function g(T){return T===45?(e.consume(T),g):T===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(T))}function b(T){return Fe(T)?He(e,k,"whitespace")(T):k(T)}function k(T){return T===124?h(T):T===null||$e(T)?!a||o!==i?S(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(T)):S(T)}function S(T){return n(T)}function $(T){return e.enter("tableRow"),C(T)}function C(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),C):T===null||$e(T)?(e.exit("tableRow"),t(T)):Fe(T)?He(e,C,"whitespace")(T):(e.enter("data"),P(T))}function P(T){return T===null||T===124||at(T)?(e.exit("data"),C(T)):(e.consume(T),T===92?F:P)}function F(T){return T===92||T===124?(e.consume(T),P):P(T)}}function AN(e,t){let n=-1,r=!0,o=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,c,u,f;const p=new kN;for(;++n<e.length;){const d=e[n],h=d[1];d[0]==="enter"?h.type==="tableHead"?(s=!1,l!==0&&(nw(p,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(n,0,[["enter",c,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(r=!0,f=void 0,i=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(n,0,[["enter",u,t]])),o=h.type==="tableDelimiterRow"?2:u?3:1):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],f=nl(p,t,i,o,void 0,f),i=[0,0,0,0]),a[2]=n)):h.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(a[0]=a[1],f=nl(p,t,i,o,void 0,f)),i=a,a=[i[1],n,0,0])):h.type==="tableHead"?(s=!0,l=n):h.type==="tableRow"||h.type==="tableDelimiterRow"?(l=n,i[1]!==0?(a[0]=a[1],f=nl(p,t,i,o,n,f)):a[1]!==0&&(f=nl(p,t,a,o,n,f)),o=0):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&nw(p,t,l,c,u),p.consume(t.events),n=-1;++n<t.events.length;){const d=t.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=TN(t.events,n))}return e}function nl(e,t,n,r,o,i){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},Qo(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=Qo(t.events,n[1]);if(i={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const c=Qo(t.events,n[2]),u=Qo(t.events,n[3]),f={type:s,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const p=t.events[n[2]],d=t.events[n[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const h=n[2]+1,m=n[3]-n[2]-1;e.add(h,m,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return o!==void 0&&(i.end=Object.assign({},Qo(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function nw(e,t,n,r,o){const i=[],a=Qo(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function Qo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const PN={tokenize:MN};function RN(){return{text:{91:PN}}}function MN(e,t,n){const r=this;return o;function o(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return at(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return $e(l)?t(l):Fe(l)?e.check({tokenize:DN},t,n)(l):n(l)}}function DN(e,t,n){return He(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function jN(e){return Ab([sN(),yN(),ON(e),CN(),RN()])}const NN={};function LN(e){const t=this,n=e||NN,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(jN(n)),i.push(rN()),a.push(oN(n))}const st={container:{className:"bpContainer"},modal:{container:{className:"bpModalContainer"},overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpModalDialogContainer"},title:{container:{className:"bpModalDialogTitleContainer"},text:{className:"bpModalDialogTitleText"},closeIcon:{className:"bpModalDialogTitleCloseIcon"}},content:{className:"bpModalDialogContent"},newConversation:{button:{className:"bpModalDialogNewConversationButton"},text:{className:"bpModalDialogNewConversationText"}}}},fab:{container:{className:"bpFabContainer"},icon:{className:"bpFabIcon"}},notification:{container:{className:"bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpHeaderContainer"},content:{container:{className:"bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},actions:{container:{className:"bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{container:{className:"bpComposerContainer"},poweredBy:{className:"bpComposerPoweredBy"},input:{className:"bpComposerInput"},button:{container:{className:"bpComposerButtonContainer"},icon:{className:"bpComposerButtonIcon"}},uploadButton:{icon:{className:"bpComposerUploadButtonIcon"},container:{className:"bpComposerUploadButtonContainer"}},voiceButton:{icon:{className:"bpComposerVoiceButtonIcon"},container:{className:"bpComposerVoiceButtonContainer"}}},messageList:{scrollDownButton:{container:{className:"bpMessageListScrollDownButtonContainer"},button:{className:"bpMessageListScrollDownButtonButton"},icon:{className:"bpMessageListScrollDownButtonIcon"}},container:{className:"bpMessageListContainer"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}},headerMessage:{className:"bpMessageListHeaderMessage"}},message:{container:{className:"bpMessageContainer"},avatar:{container:{className:"bpMessageAvatarContainer"},image:{className:"bpMessageAvatarImage"},fallback:{className:"bpMessageAvatarFallback"}},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},listItem:{className:"bpMessageBlocksTextListItem"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},pre:{className:"bpMessageBlocksTextPre"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"}},video:{className:"bpMessageBlocksVideo"},location:{container:{className:"bpMessageBlocksLocationContainer"},title:{className:"bpMessageBlocksLocationTitle"},icon:{className:"bpMessageBlocksLocationIcon"}},file:{container:{className:"bpMessageBlocksFileContainer"},title:{className:"bpMessageBlocksFileTitle"},icon:{className:"bpMessageBlocksFileIcon"}},row:{className:"bpMessageBlocksRow"},column:{className:"bpMessageBlocksColumn"},bubble:{className:"bpMessageBlocksBubble"},carousel:{container:{className:"bpMessageBlocksCarouselContainer"},slidesContainer:{className:"bpMessageBlocksCarouselSlidesContainer"},backButton:{className:"bpMessageBlocksCarouselBackButton"},nextButton:{className:"bpMessageBlocksCarouselNextButton"}},dropdown:{button:{container:{className:"bpMessageBlocksDropdownButtonContainer"},text:{className:"bpMessageBlocksDropdownButtonText"},icon:{className:"bpMessageBlocksDropdownButtonIcon"}},content:{container:{className:"bpMessageBlocksDropdownContentContainer"},item:{className:"bpMessageBlocksDropdownContentItem"}}},button:{className:"bpMessageBlocksButton"}}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}}},FN=({text:e})=>{const{message:{blocks:{text:t}}}=st,n={h1:({node:r,...o})=>L.jsx("h1",{...o,...t==null?void 0:t.heading1}),h2:({node:r,...o})=>L.jsx("h2",{...o,...t==null?void 0:t.heading2}),h3:({node:r,...o})=>L.jsx("h3",{...o,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:r,...o})=>L.jsx("em",{...o,...t==null?void 0:t.italic}),strong:({node:r,...o})=>L.jsx("strong",{...o,...t==null?void 0:t.bold}),p:({node:r,...o})=>L.jsx("p",{...o,...t==null?void 0:t.text}),hr:({node:r,...o})=>L.jsx("hr",{...o,...t==null?void 0:t.horizontalRule}),a:({node:r,...o})=>L.jsx("a",{...o,...t==null?void 0:t.link,target:"_blank"}),ol:({node:r,...o})=>L.jsx("ol",{...o,...t==null?void 0:t.orderedList}),ul:({node:r,...o})=>L.jsx("ul",{...o,...t==null?void 0:t.unorderedList}),li:({node:r,...o})=>L.jsx("li",{...o,...t==null?void 0:t.listItem}),br:({node:r,...o})=>L.jsx("br",{...o,...t==null?void 0:t.lineBreak}),pre:({node:r,...o})=>L.jsx("pre",{...o,...t==null?void 0:t.pre})};return L.jsx(OD,{components:n,remarkPlugins:[LN,RD],children:e})};function rw(e,t){return function(){return e.apply(t,arguments)}}const{toString:ow}=Object.prototype,{getPrototypeOf:ld}=Object,cd=(e=>t=>{const n=ow.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Sr=e=>(e=e.toLowerCase(),t=>cd(t)===e),rl=e=>t=>typeof t===e,{isArray:ei}=Array,va=rl("undefined");function BN(e){return e!==null&&!va(e)&&e.constructor!==null&&!va(e.constructor)&&ko(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const iw=Sr("ArrayBuffer");function UN(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&iw(e.buffer),t}const zN=rl("string"),ko=rl("function"),aw=rl("number"),ud=e=>e!==null&&typeof e=="object",HN=e=>e===!0||e===!1,ol=e=>{if(cd(e)!=="object")return!1;const t=ld(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},qN=Sr("Date"),WN=Sr("File"),VN=Sr("Blob"),KN=Sr("FileList"),GN=e=>ud(e)&&ko(e.pipe),ZN=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||ow.call(e)===t||ko(e.toString)&&e.toString()===t)},YN=Sr("URLSearchParams"),JN=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ya(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),ei(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let s;for(r=0;r<a;r++)s=i[r],t.call(null,e[s],s,e)}}function sw(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const lw=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),cw=e=>!va(e)&&e!==lw;function fd(){const{caseless:e}=cw(this)&&this||{},t={},n=(r,o)=>{const i=e&&sw(t,o)||o;ol(t[i])&&ol(r)?t[i]=fd(t[i],r):ol(r)?t[i]=fd({},r):ei(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ya(arguments[r],n);return t}const XN=(e,t,n,{allOwnKeys:r}={})=>(ya(t,(o,i)=>{n&&ko(o)?e[i]=rw(o,n):e[i]=o},{allOwnKeys:r}),e),QN=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),eL=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},tL=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&ld(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},nL=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},rL=e=>{if(!e)return null;if(ei(e))return e;let t=e.length;if(!aw(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},oL=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ld(Uint8Array)),iL=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},aL=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},sL=Sr("HTMLFormElement"),lL=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),uw=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),cL=Sr("RegExp"),fw=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ya(n,(o,i)=>{t(o,i,e)!==!1&&(r[i]=o)}),Object.defineProperties(e,r)},Y={isArray:ei,isArrayBuffer:iw,isBuffer:BN,isFormData:ZN,isArrayBufferView:UN,isString:zN,isNumber:aw,isBoolean:HN,isObject:ud,isPlainObject:ol,isUndefined:va,isDate:qN,isFile:WN,isBlob:VN,isRegExp:cL,isFunction:ko,isStream:GN,isURLSearchParams:YN,isTypedArray:oL,isFileList:KN,forEach:ya,merge:fd,extend:XN,trim:JN,stripBOM:QN,inherits:eL,toFlatObject:tL,kindOf:cd,kindOfTest:Sr,endsWith:nL,toArray:rL,forEachEntry:iL,matchAll:aL,isHTMLForm:sL,hasOwnProperty:uw,hasOwnProp:uw,reduceDescriptors:fw,freezeMethods:e=>{fw(e,(t,n)=>{if(ko(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(ko(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet:(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return ei(e)?r(e):r(String(e).split(t)),n},toCamelCase:lL,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:sw,global:lw,isContextDefined:cw,toJSONObject:e=>{const t=new Array(10),n=(r,o)=>{if(ud(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=ei(r)?[]:{};return ya(r,(a,s)=>{const l=n(a,o+1);!va(l)&&(i[s]=l)}),t[o]=void 0,i}}return r};return n(e,0)}};function Ve(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}Y.inherits(Ve,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Y.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const dw=Ve.prototype,pw={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{pw[e]={value:e}}),Object.defineProperties(Ve,pw),Object.defineProperty(dw,"isAxiosError",{value:!0}),Ve.from=(e,t,n,r,o,i)=>{const a=Object.create(dw);return Y.toFlatObject(e,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),Ve.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var uL=typeof self=="object"?self.FormData:window.FormData;const fL=Le(uL);function dd(e){return Y.isPlainObject(e)||Y.isArray(e)}function hw(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function mw(e,t,n){return e?e.concat(t).map(function(o,i){return o=hw(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function dL(e){return Y.isArray(e)&&!e.some(dd)}const pL=Y.toFlatObject(Y,{},null,function(t){return/^is[A-Z]/.test(t)});function hL(e){return e&&Y.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function il(e,t,n){if(!Y.isObject(e))throw new TypeError("target must be an object");t=t||new(fL||FormData),n=Y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!Y.isUndefined(y[m])});const r=n.metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&hL(t);if(!Y.isFunction(o))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(Y.isDate(h))return h.toISOString();if(!l&&Y.isBlob(h))throw new Ve("Blob is not supported. Use a Buffer instead.");return Y.isArrayBuffer(h)||Y.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,m,y){let v=h;if(h&&!y&&typeof h=="object"){if(Y.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(Y.isArray(h)&&dL(h)||Y.isFileList(h)||Y.endsWith(m,"[]")&&(v=Y.toArray(h)))return m=hw(m),v.forEach(function(b,k){!(Y.isUndefined(b)||b===null)&&t.append(a===!0?mw([m],k,i):a===null?m:m+"[]",c(b))}),!1}return dd(h)?!0:(t.append(mw(y,m,i),c(h)),!1)}const f=[],p=Object.assign(pL,{defaultVisitor:u,convertValue:c,isVisitable:dd});function d(h,m){if(!Y.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(h),Y.forEach(h,function(v,g){(!(Y.isUndefined(v)||v===null)&&o.call(t,v,Y.isString(g)?g.trim():g,m,p))===!0&&d(v,m?m.concat(g):[g])}),f.pop()}}if(!Y.isObject(e))throw new TypeError("data must be an object");return d(e),t}function vw(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function pd(e,t){this._pairs=[],e&&il(e,this,t)}const yw=pd.prototype;yw.append=function(t,n){this._pairs.push([t,n])},yw.toString=function(t){const n=t?function(r){return t.call(this,r,vw)}:vw;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function mL(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function gw(e,t,n){if(!t)return e;const r=n&&n.encode||mL,o=n&&n.serialize;let i;if(o?i=o(t,n):i=Y.isURLSearchParams(t)?t.toString():new pd(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class vL{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Y.forEach(this.handlers,function(r){r!==null&&t(r)})}}const bw=vL,ww={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yL=typeof URLSearchParams<"u"?URLSearchParams:pd,gL=FormData,bL=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),wL=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),tr={isBrowser:!0,classes:{URLSearchParams:yL,FormData:gL,Blob},isStandardBrowserEnv:bL,isStandardBrowserWebWorkerEnv:wL,protocols:["http","https","file","blob","url","data"]};function xL(e,t){return il(e,new tr.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return tr.isNode&&Y.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function SL(e){return Y.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function EL(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function xw(e){function t(n,r,o,i){let a=n[i++];const s=Number.isFinite(+a),l=i>=n.length;return a=!a&&Y.isArray(o)?o.length:a,l?(Y.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!Y.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&Y.isArray(o[a])&&(o[a]=EL(o[a])),!s)}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const n={};return Y.forEachEntry(e,(r,o)=>{t(SL(r),o,n,0)}),n}return null}const $L={"Content-Type":void 0};function OL(e,t,n){if(Y.isString(e))try{return(t||JSON.parse)(e),Y.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const al={transitional:ww,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=Y.isObject(t);if(i&&Y.isHTMLForm(t)&&(t=new FormData(t)),Y.isFormData(t))return o&&o?JSON.stringify(xw(t)):t;if(Y.isArrayBuffer(t)||Y.isBuffer(t)||Y.isStream(t)||Y.isFile(t)||Y.isBlob(t))return t;if(Y.isArrayBufferView(t))return t.buffer;if(Y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return xL(t,this.formSerializer).toString();if((s=Y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return il(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),OL(t)):t}],transformResponse:[function(t){const n=this.transitional||al.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(t&&Y.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?Ve.from(s,Ve.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:tr.classes.FormData,Blob:tr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Y.forEach(["delete","get","head"],function(t){al.headers[t]={}}),Y.forEach(["post","put","patch"],function(t){al.headers[t]=Y.merge($L)});const hd=al,kL=Y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_L=e=>{const t={};let n,r,o;return e&&e.split(`
55
+ `).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&kL[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Sw=Symbol("internals");function ga(e){return e&&String(e).trim().toLowerCase()}function sl(e){return e===!1||e==null?e:Y.isArray(e)?e.map(sl):String(e)}function TL(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function CL(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function Ew(e,t,n,r){if(Y.isFunction(r))return r.call(this,t,n);if(Y.isString(t)){if(Y.isString(r))return t.indexOf(r)!==-1;if(Y.isRegExp(r))return r.test(t)}}function IL(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function AL(e,t){const n=Y.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}class ll{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,l,c){const u=ga(l);if(!u)throw new Error("header name must be a non-empty string");const f=Y.findKey(o,u);(!f||o[f]===void 0||c===!0||c===void 0&&o[f]!==!1)&&(o[f||l]=sl(s))}const a=(s,l)=>Y.forEach(s,(c,u)=>i(c,u,l));return Y.isPlainObject(t)||t instanceof this.constructor?a(t,n):Y.isString(t)&&(t=t.trim())&&!CL(t)?a(_L(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=ga(t),t){const r=Y.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return TL(o);if(Y.isFunction(n))return n.call(this,o,r);if(Y.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ga(t),t){const r=Y.findKey(this,t);return!!(r&&(!n||Ew(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=ga(a),a){const s=Y.findKey(r,a);s&&(!n||Ew(r,r[s],s,n))&&(delete r[s],o=!0)}}return Y.isArray(t)?t.forEach(i):i(t),o}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(t){const n=this,r={};return Y.forEach(this,(o,i)=>{const a=Y.findKey(r,i);if(a){n[a]=sl(o),delete n[i];return}const s=t?IL(i):String(i).trim();s!==i&&delete n[i],n[s]=sl(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Y.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&Y.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
56
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Sw]=this[Sw]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=ga(a);r[s]||(AL(o,a),r[s]=!0)}return Y.isArray(t)?t.forEach(i):i(t),this}}ll.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),Y.freezeMethods(ll.prototype),Y.freezeMethods(ll);const Er=ll;function md(e,t){const n=this||hd,r=t||n,o=Er.from(r.headers);let i=r.data;return Y.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function $w(e){return!!(e&&e.__CANCEL__)}function ba(e,t,n){Ve.call(this,e??"canceled",Ve.ERR_CANCELED,t,n),this.name="CanceledError"}Y.inherits(ba,Ve,{__CANCEL__:!0});const PL=null;function RL(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ve("Request failed with status code "+n.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const ML=tr.isStandardBrowserEnv?function(){return{write:function(n,r,o,i,a,s){const l=[];l.push(n+"="+encodeURIComponent(r)),Y.isNumber(o)&&l.push("expires="+new Date(o).toGMTString()),Y.isString(i)&&l.push("path="+i),Y.isString(a)&&l.push("domain="+a),s===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function DL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function jL(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Ow(e,t){return e&&!DL(t)?jL(e,t):t}const NL=tr.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let a=i;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const s=Y.isString(a)?o(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function LL(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function FL(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[i];a||(a=c),n[o]=l,r[o]=c;let f=i,p=0;for(;f!==o;)p+=n[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-a<t)return;const d=u&&c-u;return d?Math.round(p*1e3/d):void 0}}function kw(e,t){let n=0;const r=FL(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-n,l=r(s),c=i<=a;n=i;const u={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&c?(a-i)/l:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}const cl={http:PL,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let o=e.data;const i=Er.from(e.headers).normalize(),a=e.responseType;let s;function l(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}Y.isFormData(o)&&(tr.isStandardBrowserEnv||tr.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let c=new XMLHttpRequest;if(e.auth){const d=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(d+":"+h))}const u=Ow(e.baseURL,e.url);c.open(e.method.toUpperCase(),gw(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function f(){if(!c)return;const d=Er.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),m={data:!a||a==="text"||a==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:d,config:e,request:c};RL(function(v){n(v),l()},function(v){r(v),l()},m),c=null}if("onloadend"in c?c.onloadend=f:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(f)},c.onabort=function(){c&&(r(new Ve("Request aborted",Ve.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new Ve("Network Error",Ve.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let h=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||ww;e.timeoutErrorMessage&&(h=e.timeoutErrorMessage),r(new Ve(h,m.clarifyTimeoutError?Ve.ETIMEDOUT:Ve.ECONNABORTED,e,c)),c=null},tr.isStandardBrowserEnv){const d=(e.withCredentials||NL(u))&&e.xsrfCookieName&&ML.read(e.xsrfCookieName);d&&i.set(e.xsrfHeaderName,d)}o===void 0&&i.setContentType(null),"setRequestHeader"in c&&Y.forEach(i.toJSON(),function(h,m){c.setRequestHeader(m,h)}),Y.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&a!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",kw(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",kw(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=d=>{c&&(r(!d||d.type?new ba(null,e,c):d),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=LL(u);if(p&&tr.protocols.indexOf(p)===-1){r(new Ve("Unsupported protocol "+p+":",Ve.ERR_BAD_REQUEST,e));return}c.send(o||null)})}};Y.forEach(cl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const BL={getAdapter:e=>{e=Y.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;o<t&&(n=e[o],!(r=Y.isString(n)?cl[n.toLowerCase()]:n));o++);if(!r)throw r===!1?new Ve(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(Y.hasOwnProp(cl,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!Y.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:cl};function vd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ba(null,e)}function _w(e){return vd(e),e.headers=Er.from(e.headers),e.data=md.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),BL.getAdapter(e.adapter||hd.adapter)(e).then(function(r){return vd(e),r.data=md.call(e,e.transformResponse,r),r.headers=Er.from(r.headers),r},function(r){return $w(r)||(vd(e),r&&r.response&&(r.response.data=md.call(e,e.transformResponse,r.response),r.response.headers=Er.from(r.response.headers))),Promise.reject(r)})}const Tw=e=>e instanceof Er?e.toJSON():e;function ti(e,t){t=t||{};const n={};function r(c,u,f){return Y.isPlainObject(c)&&Y.isPlainObject(u)?Y.merge.call({caseless:f},c,u):Y.isPlainObject(u)?Y.merge({},u):Y.isArray(u)?u.slice():u}function o(c,u,f){if(Y.isUndefined(u)){if(!Y.isUndefined(c))return r(void 0,c,f)}else return r(c,u,f)}function i(c,u){if(!Y.isUndefined(u))return r(void 0,u)}function a(c,u){if(Y.isUndefined(u)){if(!Y.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,f){if(f in t)return r(c,u);if(f in e)return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,u)=>o(Tw(c),Tw(u),!0)};return Y.forEach(Object.keys(e).concat(Object.keys(t)),function(u){const f=l[u]||o,p=f(e[u],t[u],u);Y.isUndefined(p)&&f!==s||(n[u]=p)}),n}const Cw="1.2.5",yd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{yd[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Iw={};yd.transitional=function(t,n,r){function o(i,a){return"[Axios v"+Cw+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(t===!1)throw new Ve(o(a," has been removed"+(n?" in "+n:"")),Ve.ERR_DEPRECATED);return n&&!Iw[a]&&(Iw[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,s):!0}};function UL(e,t,n){if(typeof e!="object")throw new Ve("options must be an object",Ve.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const s=e[i],l=s===void 0||a(s,i,e);if(l!==!0)throw new Ve("option "+i+" must be "+l,Ve.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ve("Unknown option "+i,Ve.ERR_BAD_OPTION)}}const gd={assertOptions:UL,validators:yd},Zr=gd.validators;class ul{constructor(t){this.defaults=t,this.interceptors={request:new bw,response:new bw}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ti(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&gd.assertOptions(r,{silentJSONParsing:Zr.transitional(Zr.boolean),forcedJSONParsing:Zr.transitional(Zr.boolean),clarifyTimeoutError:Zr.transitional(Zr.boolean)},!1),o!==void 0&&gd.assertOptions(o,{encode:Zr.function,serialize:Zr.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a;a=i&&Y.merge(i.common,i[n.method]),a&&Y.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=Er.concat(a,i);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,f=0,p;if(!l){const h=[_w.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,c),p=h.length,u=Promise.resolve(n);f<p;)u=u.then(h[f++],h[f++]);return u}p=s.length;let d=n;for(f=0;f<p;){const h=s[f++],m=s[f++];try{d=h(d)}catch(y){m.call(this,y);break}}try{u=_w.call(this,d)}catch(h){return Promise.reject(h)}for(f=0,p=c.length;f<p;)u=u.then(c[f++],c[f++]);return u}getUri(t){t=ti(this.defaults,t);const n=Ow(t.baseURL,t.url);return gw(n,t.params,t.paramsSerializer)}}Y.forEach(["delete","get","head","options"],function(t){ul.prototype[t]=function(n,r){return this.request(ti(r||{},{method:t,url:n,data:(r||{}).data}))}}),Y.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,s){return this.request(ti(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}ul.prototype[t]=n(),ul.prototype[t+"Form"]=n(!0)});const fl=ul;class bd{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,s){r.reason||(r.reason=new ba(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new bd(function(o){t=o}),cancel:t}}}const zL=bd;function HL(e){return function(n){return e.apply(null,n)}}function qL(e){return Y.isObject(e)&&e.isAxiosError===!0}const wd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(wd).forEach(([e,t])=>{wd[t]=e});const WL=wd;function Aw(e){const t=new fl(e),n=rw(fl.prototype.request,t);return Y.extend(n,fl.prototype,t,{allOwnKeys:!0}),Y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Aw(ti(e,o))},n}const _t=Aw(hd);_t.Axios=fl,_t.CanceledError=ba,_t.CancelToken=zL,_t.isCancel=$w,_t.VERSION=Cw,_t.toFormData=il,_t.AxiosError=Ve,_t.Cancel=_t.CanceledError,_t.all=function(t){return Promise.all(t)},_t.spread=HL,_t.isAxiosError=qL,_t.mergeConfig=ti,_t.AxiosHeaders=Er,_t.formToJSON=e=>xw(Y.isHTMLForm(e)?new FormData(e):e),_t.HttpStatusCode=WL,_t.default=_t;const Pw=_t,Rw={},VL=Object.freeze(Object.defineProperty({__proto__:null,default:Rw},Symbol.toStringTag,{value:"Module"})),KL={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))};let xd=typeof window<"u"&&typeof window.document<"u"?window.crypto:Rw;xd.getRandomValues||(xd=KL);class lt extends Error{constructor(n,r,o,i,a,s){super(i);we(this,"isApiError",!0);this.code=n,this.description=r,this.type=o,this.message=i,this.error=a,this.id=s,this.id||(this.id=lt.generateId())}format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){const n=this.getPrefix(),r=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],o=4,i=Array.from(xd.getRandomValues(new Uint8Array(o))).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase();return`${n}_${r}x${i}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}}const GL=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,Sd=e=>e instanceof lt||GL(e)&&e.isApiError===!0;class wa extends lt{constructor(t,n,r){super(500,"An unknown error occurred","Unknown",t,n,r)}}class ZL extends lt{constructor(t,n,r){super(500,"An internal error occurred","Internal",t,n,r)}}class YL extends lt{constructor(t,n,r){super(401,"The request requires to be authenticated.","Unauthorized",t,n,r)}}class JL extends lt{constructor(t,n,r){super(403,"The requested action can't be peform by this resource.","Forbidden",t,n,r)}}class XL extends lt{constructor(t,n,r){super(413,"The request payload is too large.","PayloadTooLarge",t,n,r)}}class QL extends lt{constructor(t,n,r){super(400,"The request payload is invalid.","InvalidPayload",t,n,r)}}class e5 extends lt{constructor(t,n,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,n,r)}}class t5 extends lt{constructor(t,n,r){super(405,"The requested method does not exist.","MethodNotFound",t,n,r)}}class n5 extends lt{constructor(t,n,r){super(404,"The requested resource does not exist.","ResourceNotFound",t,n,r)}}class r5 extends lt{constructor(t,n,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,n,r)}}class o5 extends lt{constructor(t,n,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,n,r)}}class i5 extends lt{constructor(t,n,r){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",t,n,r)}}class a5 extends lt{constructor(t,n,r){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",t,n,r)}}class s5 extends lt{constructor(t,n,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,n,r)}}class l5 extends lt{constructor(t,n,r){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",t,n,r)}}class c5 extends lt{constructor(t,n,r){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",t,n,r)}}class u5 extends lt{constructor(t,n,r){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,n,r)}}class f5 extends lt{constructor(t,n,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,n,r)}}class d5 extends lt{constructor(t,n,r){super(409,"The record attempted to be created already exists.","AlreadyExists",t,n,r)}}class p5 extends lt{constructor(t,n,r){super(429,"The request has been rate limited.","RateLimited",t,n,r)}}class h5 extends lt{constructor(t,n,r){super(402,"A payment is required to perform this request.","PaymentRequired",t,n,r)}}class m5 extends lt{constructor(t,n,r){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,n,r)}}class v5 extends lt{constructor(t,n,r){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,n,r)}}class y5 extends lt{constructor(t,n,r){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,n,r)}}const g5={Unknown:wa,Internal:ZL,Unauthorized:YL,Forbidden:JL,PayloadTooLarge:XL,InvalidPayload:QL,UnsupportedMediaType:e5,MethodNotFound:t5,ResourceNotFound:n5,InvalidJsonSchema:r5,InvalidDataFormat:o5,InvalidIdentifier:i5,RelationConflict:a5,ReferenceConstraint:s5,ResourceLockedConflict:l5,ReferenceNotFound:c5,InvalidQuery:u5,Runtime:f5,AlreadyExists:d5,RateLimited:p5,PaymentRequired:h5,QuotaExceeded:m5,LimitExceeded:v5,BreakingChanges:y5},Mw=e=>Sd(e)?e:e instanceof Error?new wa(e.message,e):typeof e=="string"?new wa(e):b5(e);function b5(e){if(typeof e=="object"&&"code"in e&&"type"in e&&"id"in e&&"message"in e&&typeof e.type=="string"&&typeof e.message=="string"){const t=g5[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new wa(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new wa("An invalid error occurred: "+JSON.stringify(e))}var w5=Error,x5=EvalError,S5=RangeError,E5=ReferenceError,Dw=SyntaxError,_o=TypeError,$5=URIError,dl=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,n);if(a.value!==o||a.enumerable!==!0)return!1}return!0},jw=typeof Symbol<"u"&&Symbol,O5=dl,Ed=function(){return typeof jw!="function"||typeof Symbol!="function"||typeof jw("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:O5()},$d={__proto__:null,foo:{}},k5=Object,_5=function(){return{__proto__:$d}.foo===$d.foo&&!($d instanceof k5)},T5="Function.prototype.bind called on incompatible ",C5=Object.prototype.toString,I5=Math.max,A5="[object Function]",Nw=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var i=0;i<n.length;i+=1)r[i+t.length]=n[i];return r},P5=function(t,n){for(var r=[],o=n||0,i=0;o<t.length;o+=1,i+=1)r[i]=t[o];return r},R5=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},M5=function(t){var n=this;if(typeof n!="function"||C5.apply(n)!==A5)throw new TypeError(T5+n);for(var r=P5(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,Nw(r,arguments));return Object(u)===u?u:this}return n.apply(t,Nw(r,arguments))},a=I5(0,n.length-r.length),s=[],l=0;l<a;l++)s[l]="$"+l;if(o=Function("binder","return function ("+R5(s,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},D5=M5,Od=Function.prototype.bind||D5,j5=Function.prototype.call,N5=Object.prototype.hasOwnProperty,L5=Od,Lw=L5.call(j5,N5),Ue,F5=w5,B5=x5,U5=S5,z5=E5,ni=Dw,ri=_o,H5=$5,Fw=Function,kd=function(e){try{return Fw('"use strict"; return ('+e+").constructor;")()}catch{}},To=Object.getOwnPropertyDescriptor;if(To)try{To({},"")}catch{To=null}var _d=function(){throw new ri},q5=To?function(){try{return arguments.callee,_d}catch{try{return To(arguments,"callee").get}catch{return _d}}}():_d,oi=Ed(),W5=_5(),jt=Object.getPrototypeOf||(W5?function(e){return e.__proto__}:null),ii={},V5=typeof Uint8Array>"u"||!jt?Ue:jt(Uint8Array),Co={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ue:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ue:ArrayBuffer,"%ArrayIteratorPrototype%":oi&&jt?jt([][Symbol.iterator]()):Ue,"%AsyncFromSyncIteratorPrototype%":Ue,"%AsyncFunction%":ii,"%AsyncGenerator%":ii,"%AsyncGeneratorFunction%":ii,"%AsyncIteratorPrototype%":ii,"%Atomics%":typeof Atomics>"u"?Ue:Atomics,"%BigInt%":typeof BigInt>"u"?Ue:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ue:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ue:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ue:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":F5,"%eval%":eval,"%EvalError%":B5,"%Float32Array%":typeof Float32Array>"u"?Ue:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ue:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ue:FinalizationRegistry,"%Function%":Fw,"%GeneratorFunction%":ii,"%Int8Array%":typeof Int8Array>"u"?Ue:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ue:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ue:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":oi&&jt?jt(jt([][Symbol.iterator]())):Ue,"%JSON%":typeof JSON=="object"?JSON:Ue,"%Map%":typeof Map>"u"?Ue:Map,"%MapIteratorPrototype%":typeof Map>"u"||!oi||!jt?Ue:jt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ue:Promise,"%Proxy%":typeof Proxy>"u"?Ue:Proxy,"%RangeError%":U5,"%ReferenceError%":z5,"%Reflect%":typeof Reflect>"u"?Ue:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ue:Set,"%SetIteratorPrototype%":typeof Set>"u"||!oi||!jt?Ue:jt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ue:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":oi&&jt?jt(""[Symbol.iterator]()):Ue,"%Symbol%":oi?Symbol:Ue,"%SyntaxError%":ni,"%ThrowTypeError%":q5,"%TypedArray%":V5,"%TypeError%":ri,"%Uint8Array%":typeof Uint8Array>"u"?Ue:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ue:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ue:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ue:Uint32Array,"%URIError%":H5,"%WeakMap%":typeof WeakMap>"u"?Ue:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ue:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ue:WeakSet};if(jt)try{null.error}catch(e){var K5=jt(jt(e));Co["%Error.prototype%"]=K5}var G5=function e(t){var n;if(t==="%AsyncFunction%")n=kd("async function () {}");else if(t==="%GeneratorFunction%")n=kd("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=kd("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&jt&&(n=jt(o.prototype))}return Co[t]=n,n},Bw={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},xa=Od,pl=Lw,Z5=xa.call(Function.call,Array.prototype.concat),Y5=xa.call(Function.apply,Array.prototype.splice),Uw=xa.call(Function.call,String.prototype.replace),hl=xa.call(Function.call,String.prototype.slice),J5=xa.call(Function.call,RegExp.prototype.exec),X5=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Q5=/\\(\\)?/g,eF=function(t){var n=hl(t,0,1),r=hl(t,-1);if(n==="%"&&r!=="%")throw new ni("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new ni("invalid intrinsic syntax, expected opening `%`");var o=[];return Uw(t,X5,function(i,a,s,l){o[o.length]=s?Uw(l,Q5,"$1"):a||i}),o},tF=function(t,n){var r=t,o;if(pl(Bw,r)&&(o=Bw[r],r="%"+o[0]+"%"),pl(Co,r)){var i=Co[r];if(i===ii&&(i=G5(r)),typeof i>"u"&&!n)throw new ri("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new ni("intrinsic "+t+" does not exist!")},nr=function(t,n){if(typeof t!="string"||t.length===0)throw new ri("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new ri('"allowMissing" argument must be a boolean');if(J5(/^%?[^%]*%?$/,t)===null)throw new ni("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=eF(t),o=r.length>0?r[0]:"",i=tF("%"+o+"%",n),a=i.name,s=i.value,l=!1,c=i.alias;c&&(o=c[0],Y5(r,Z5([0,1],c)));for(var u=1,f=!0;u<r.length;u+=1){var p=r[u],d=hl(p,0,1),h=hl(p,-1);if((d==='"'||d==="'"||d==="`"||h==='"'||h==="'"||h==="`")&&d!==h)throw new ni("property names with quotes must have matching quotes");if((p==="constructor"||!f)&&(l=!0),o+="."+p,a="%"+o+"%",pl(Co,a))s=Co[a];else if(s!=null){if(!(p in s)){if(!n)throw new ri("base intrinsic for "+t+" exists, but the property is not available.");return}if(To&&u+1>=r.length){var m=To(s,p);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[p]}else f=pl(s,p),s=s[p];f&&!l&&(Co[a]=s)}}return s},zw={exports:{}},nF=nr,ml=nF("%Object.defineProperty%",!0)||!1;if(ml)try{ml({},"a",{value:1})}catch{ml=!1}var Td=ml,rF=nr,vl=rF("%Object.getOwnPropertyDescriptor%",!0);if(vl)try{vl([],"length")}catch{vl=null}var Cd=vl,Hw=Td,oF=Dw,ai=_o,qw=Cd,Id=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new ai("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new ai("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new ai("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new ai("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new ai("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new ai("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!qw&&qw(t,n);if(Hw)Hw(t,n,{configurable:a===null&&l?l.configurable:!a,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:i===null&&l?l.writable:!i});else if(s||!o&&!i&&!a)t[n]=r;else throw new oF("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Ad=Td,Ww=function(){return!!Ad};Ww.hasArrayLengthDefineBug=function(){if(!Ad)return null;try{return Ad([],"length",{value:1}).length!==1}catch{return!0}};var Pd=Ww,iF=nr,Vw=Id,aF=Pd(),Kw=Cd,Gw=_o,sF=iF("%Math.floor%"),lF=function(t,n){if(typeof t!="function")throw new Gw("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||sF(n)!==n)throw new Gw("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in t&&Kw){var a=Kw(t,"length");a&&!a.configurable&&(o=!1),a&&!a.writable&&(i=!1)}return(o||i||!r)&&(aF?Vw(t,"length",n,!0,!0):Vw(t,"length",n)),t};(function(e){var t=Od,n=nr,r=lF,o=_o,i=n("%Function.prototype.apply%"),a=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||t.call(a,i),l=Td,c=n("%Math.max%");e.exports=function(p){if(typeof p!="function")throw new o("a function is required");var d=s(t,a,arguments);return r(d,1+c(0,p.length-(arguments.length-1)),!0)};var u=function(){return s(t,i,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(zw);var si=zw.exports,Zw=nr,Yw=si,cF=Yw(Zw("String.prototype.indexOf")),_n=function(t,n){var r=Zw(t,!!n);return typeof r=="function"&&cF(t,".prototype.")>-1?Yw(r):r};const uF=EA(VL);var Rd=typeof Map=="function"&&Map.prototype,Md=Object.getOwnPropertyDescriptor&&Rd?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,yl=Rd&&Md&&typeof Md.get=="function"?Md.get:null,Jw=Rd&&Map.prototype.forEach,Dd=typeof Set=="function"&&Set.prototype,jd=Object.getOwnPropertyDescriptor&&Dd?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,gl=Dd&&jd&&typeof jd.get=="function"?jd.get:null,Xw=Dd&&Set.prototype.forEach,fF=typeof WeakMap=="function"&&WeakMap.prototype,Sa=fF?WeakMap.prototype.has:null,dF=typeof WeakSet=="function"&&WeakSet.prototype,Ea=dF?WeakSet.prototype.has:null,pF=typeof WeakRef=="function"&&WeakRef.prototype,Qw=pF?WeakRef.prototype.deref:null,hF=Boolean.prototype.valueOf,mF=Object.prototype.toString,vF=Function.prototype.toString,yF=String.prototype.match,Nd=String.prototype.slice,Yr=String.prototype.replace,gF=String.prototype.toUpperCase,ex=String.prototype.toLowerCase,tx=RegExp.prototype.test,nx=Array.prototype.concat,rr=Array.prototype.join,bF=Array.prototype.slice,rx=Math.floor,Ld=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Fd=Object.getOwnPropertySymbols,Bd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,li=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Gt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===li||"symbol")?Symbol.toStringTag:null,ox=Object.prototype.propertyIsEnumerable,ix=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function ax(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||tx.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-rx(-e):rx(e);if(r!==e){var o=String(r),i=Nd.call(t,o.length+1);return Yr.call(o,n,"$&_")+"."+Yr.call(Yr.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Yr.call(t,n,"$&_")}var Ud=uF,sx=Ud.custom,lx=fx(sx)?sx:null,wF=function e(t,n,r,o){var i=n||{};if(Jr(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Jr(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Jr(i,"customInspect")?i.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Jr(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Jr(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=i.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return px(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return s?ax(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return s?ax(t,c):c}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return zd(t)?"[Array]":"[Object]";var f=LF(i,r);if(typeof o>"u")o=[];else if(dx(o,t)>=0)return"[Circular]";function p(B,A,D){if(A&&(o=bF.call(o),o.push(A)),D){var N={depth:i.depth};return Jr(i,"quoteStyle")&&(N.quoteStyle=i.quoteStyle),e(B,N,r+1,o)}return e(B,i,r+1,o)}if(typeof t=="function"&&!ux(t)){var d=CF(t),h=bl(t,p);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(h.length>0?" { "+rr.call(h,", ")+" }":"")}if(fx(t)){var m=li?Yr.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Bd.call(t);return typeof t=="object"&&!li?$a(m):m}if(DF(t)){for(var y="<"+ex.call(String(t.nodeName)),v=t.attributes||[],g=0;g<v.length;g++)y+=" "+v[g].name+"="+cx(xF(v[g].value),"double",i);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+ex.call(String(t.nodeName))+">",y}if(zd(t)){if(t.length===0)return"[]";var b=bl(t,p);return f&&!NF(b)?"["+qd(b,f)+"]":"[ "+rr.call(b,", ")+" ]"}if(EF(t)){var k=bl(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!ox.call(t,"cause")?"{ ["+String(t)+"] "+rr.call(nx.call("[cause]: "+p(t.cause),k),", ")+" }":k.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+rr.call(k,", ")+" }"}if(typeof t=="object"&&a){if(lx&&typeof t[lx]=="function"&&Ud)return Ud(t,{depth:u-r});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(IF(t)){var S=[];return Jw&&Jw.call(t,function(B,A){S.push(p(A,t,!0)+" => "+p(B,t))}),hx("Map",yl.call(t),S,f)}if(RF(t)){var $=[];return Xw&&Xw.call(t,function(B){$.push(p(B,t))}),hx("Set",gl.call(t),$,f)}if(AF(t))return Hd("WeakMap");if(MF(t))return Hd("WeakSet");if(PF(t))return Hd("WeakRef");if(OF(t))return $a(p(Number(t)));if(_F(t))return $a(p(Ld.call(t)));if(kF(t))return $a(hF.call(t));if($F(t))return $a(p(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Xe<"u"&&t===Xe)return"{ [object globalThis] }";if(!SF(t)&&!ux(t)){var C=bl(t,p),P=ix?ix(t)===Object.prototype:t instanceof Object||t.constructor===Object,F=t instanceof Object?"":"null prototype",T=!P&&Gt&&Object(t)===t&&Gt in t?Nd.call(Xr(t),8,-1):F?"Object":"",M=P||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",q=M+(T||F?"["+rr.call(nx.call([],T||[],F||[]),": ")+"] ":"");return C.length===0?q+"{}":f?q+"{"+qd(C,f)+"}":q+"{ "+rr.call(C,", ")+" }"}return String(t)};function cx(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function xF(e){return Yr.call(String(e),/"/g,"&quot;")}function zd(e){return Xr(e)==="[object Array]"&&(!Gt||!(typeof e=="object"&&Gt in e))}function SF(e){return Xr(e)==="[object Date]"&&(!Gt||!(typeof e=="object"&&Gt in e))}function ux(e){return Xr(e)==="[object RegExp]"&&(!Gt||!(typeof e=="object"&&Gt in e))}function EF(e){return Xr(e)==="[object Error]"&&(!Gt||!(typeof e=="object"&&Gt in e))}function $F(e){return Xr(e)==="[object String]"&&(!Gt||!(typeof e=="object"&&Gt in e))}function OF(e){return Xr(e)==="[object Number]"&&(!Gt||!(typeof e=="object"&&Gt in e))}function kF(e){return Xr(e)==="[object Boolean]"&&(!Gt||!(typeof e=="object"&&Gt in e))}function fx(e){if(li)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Bd)return!1;try{return Bd.call(e),!0}catch{}return!1}function _F(e){if(!e||typeof e!="object"||!Ld)return!1;try{return Ld.call(e),!0}catch{}return!1}var TF=Object.prototype.hasOwnProperty||function(e){return e in this};function Jr(e,t){return TF.call(e,t)}function Xr(e){return mF.call(e)}function CF(e){if(e.name)return e.name;var t=yF.call(vF.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function dx(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function IF(e){if(!yl||!e||typeof e!="object")return!1;try{yl.call(e);try{gl.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function AF(e){if(!Sa||!e||typeof e!="object")return!1;try{Sa.call(e,Sa);try{Ea.call(e,Ea)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function PF(e){if(!Qw||!e||typeof e!="object")return!1;try{return Qw.call(e),!0}catch{}return!1}function RF(e){if(!gl||!e||typeof e!="object")return!1;try{gl.call(e);try{yl.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function MF(e){if(!Ea||!e||typeof e!="object")return!1;try{Ea.call(e,Ea);try{Sa.call(e,Sa)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function DF(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function px(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return px(Nd.call(e,0,t.maxStringLength),t)+r}var o=Yr.call(Yr.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,jF);return cx(o,"single",t)}function jF(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+gF.call(t.toString(16))}function $a(e){return"Object("+e+")"}function Hd(e){return e+" { ? }"}function hx(e,t,n,r){var o=r?qd(n,r):rr.call(n,", ");return e+" ("+t+") {"+o+"}"}function NF(e){for(var t=0;t<e.length;t++)if(dx(e[t],`
57
+ `)>=0)return!1;return!0}function LF(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=rr.call(Array(e.indent+1)," ");else return null;return{base:n,prev:rr.call(Array(t+1),n)}}function qd(e,t){if(e.length===0)return"";var n=`
58
+ `+t.prev+t.base;return n+rr.call(e,","+n)+`
59
+ `+t.prev}function bl(e,t){var n=zd(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Jr(e,o)?t(e[o],e):""}var i=typeof Fd=="function"?Fd(e):[],a;if(li){a={};for(var s=0;s<i.length;s++)a["$"+i[s]]=i[s]}for(var l in e)Jr(e,l)&&(n&&String(Number(l))===l&&l<e.length||li&&a["$"+l]instanceof Symbol||(tx.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof Fd=="function")for(var c=0;c<i.length;c++)ox.call(e,i[c])&&r.push("["+t(i[c])+"]: "+t(e[i[c]],e));return r}var Wd=nr,ci=_n,FF=wF,BF=Wd("%TypeError%"),wl=Wd("%WeakMap%",!0),xl=Wd("%Map%",!0),UF=ci("WeakMap.prototype.get",!0),zF=ci("WeakMap.prototype.set",!0),HF=ci("WeakMap.prototype.has",!0),qF=ci("Map.prototype.get",!0),WF=ci("Map.prototype.set",!0),VF=ci("Map.prototype.has",!0),Vd=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},KF=function(e,t){var n=Vd(e,t);return n&&n.value},GF=function(e,t,n){var r=Vd(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},ZF=function(e,t){return!!Vd(e,t)},Kd=function(){var t,n,r,o={assert:function(i){if(!o.has(i))throw new BF("Side channel does not contain "+FF(i))},get:function(i){if(wl&&i&&(typeof i=="object"||typeof i=="function")){if(t)return UF(t,i)}else if(xl){if(n)return qF(n,i)}else if(r)return KF(r,i)},has:function(i){if(wl&&i&&(typeof i=="object"||typeof i=="function")){if(t)return HF(t,i)}else if(xl){if(n)return VF(n,i)}else if(r)return ZF(r,i);return!1},set:function(i,a){wl&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new wl),zF(t,i,a)):xl?(n||(n=new xl),WF(n,i,a)):(r||(r={key:{},next:null}),GF(r,i,a))}};return o},YF=String.prototype.replace,JF=/%20/g,Gd={RFC1738:"RFC1738",RFC3986:"RFC3986"},Zd={default:Gd.RFC3986,formatters:{RFC1738:function(e){return YF.call(e,JF,"+")},RFC3986:function(e){return String(e)}},RFC1738:Gd.RFC1738,RFC3986:Gd.RFC3986},XF=Zd,Yd=Object.prototype.hasOwnProperty,Io=Array.isArray,or=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),QF=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Io(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},mx=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},e3=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Io(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Yd.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return Io(t)&&!Io(n)&&(o=mx(t,r)),Io(t)&&Io(n)?(n.forEach(function(i,a){if(Yd.call(t,a)){var s=t[a];s&&typeof s=="object"&&i&&typeof i=="object"?t[a]=e(s,i,r):t.push(i)}else t[a]=i}),t):Object.keys(n).reduce(function(i,a){var s=n[a];return Yd.call(i,a)?i[a]=e(i[a],s,r):i[a]=s,i},o)},t3=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},n3=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},r3=function(t,n,r,o,i){if(t.length===0)return t;var a=t;if(typeof t=="symbol"?a=Symbol.prototype.toString.call(t):typeof t!="string"&&(a=String(t)),r==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var s="",l=0;l<a.length;++l){var c=a.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===XF.RFC1738&&(c===40||c===41)){s+=a.charAt(l);continue}if(c<128){s=s+or[c];continue}if(c<2048){s=s+(or[192|c>>6]+or[128|c&63]);continue}if(c<55296||c>=57344){s=s+(or[224|c>>12]+or[128|c>>6&63]+or[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|a.charCodeAt(l)&1023),s+=or[240|c>>18]+or[128|c>>12&63]+or[128|c>>6&63]+or[128|c&63]}return s},o3=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],a=i.obj[i.prop],s=Object.keys(a),l=0;l<s.length;++l){var c=s[l],u=a[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:a,prop:c}),r.push(u))}return QF(n),t},i3=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},a3=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},s3=function(t,n){return[].concat(t,n)},l3=function(t,n){if(Io(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},vx={arrayToObject:mx,assign:t3,combine:s3,compact:o3,decode:n3,encode:r3,isBuffer:a3,isRegExp:i3,maybeMap:l3,merge:e3},yx=Kd,Sl=vx,Oa=Zd,c3=Object.prototype.hasOwnProperty,gx={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},$r=Array.isArray,u3=Array.prototype.push,bx=function(e,t){u3.apply(e,$r(t)?t:[t])},f3=Date.prototype.toISOString,wx=Oa.default,Zt={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Sl.encode,encodeValuesOnly:!1,format:wx,formatter:Oa.formatters[wx],indices:!1,serializeDate:function(t){return f3.call(t)},skipNulls:!1,strictNullHandling:!1},d3=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Jd={},p3=function e(t,n,r,o,i,a,s,l,c,u,f,p,d,h,m,y){for(var v=t,g=y,b=0,k=!1;(g=g.get(Jd))!==void 0&&!k;){var S=g.get(t);if(b+=1,typeof S<"u"){if(S===b)throw new RangeError("Cyclic object value");k=!0}typeof g.get(Jd)>"u"&&(b=0)}if(typeof l=="function"?v=l(n,v):v instanceof Date?v=f(v):r==="comma"&&$r(v)&&(v=Sl.maybeMap(v,function(N){return N instanceof Date?f(N):N})),v===null){if(i)return s&&!h?s(n,Zt.encoder,m,"key",p):n;v=""}if(d3(v)||Sl.isBuffer(v)){if(s){var $=h?n:s(n,Zt.encoder,m,"key",p);return[d($)+"="+d(s(v,Zt.encoder,m,"value",p))]}return[d(n)+"="+d(String(v))]}var C=[];if(typeof v>"u")return C;var P;if(r==="comma"&&$r(v))h&&s&&(v=Sl.maybeMap(v,s)),P=[{value:v.length>0?v.join(",")||null:void 0}];else if($r(l))P=l;else{var F=Object.keys(v);P=c?F.sort(c):F}for(var T=o&&$r(v)&&v.length===1?n+"[]":n,M=0;M<P.length;++M){var q=P[M],B=typeof q=="object"&&typeof q.value<"u"?q.value:v[q];if(!(a&&B===null)){var A=$r(v)?typeof r=="function"?r(T,q):T:T+(u?"."+q:"["+q+"]");y.set(t,b);var D=yx();D.set(Jd,y),bx(C,e(B,A,r,o,i,a,r==="comma"&&h&&$r(v)?null:s,l,c,u,f,p,d,h,m,D))}}return C},h3=function(t){if(!t)return Zt;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||Zt.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Oa.default;if(typeof t.format<"u"){if(!c3.call(Oa.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Oa.formatters[r],i=Zt.filter;return(typeof t.filter=="function"||$r(t.filter))&&(i=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Zt.addQueryPrefix,allowDots:typeof t.allowDots>"u"?Zt.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Zt.charsetSentinel,delimiter:typeof t.delimiter>"u"?Zt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Zt.encode,encoder:typeof t.encoder=="function"?t.encoder:Zt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Zt.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Zt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Zt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Zt.strictNullHandling}},m3=function(e,t){var n=e,r=h3(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):$r(r.filter)&&(i=r.filter,o=i);var a=[];if(typeof n!="object"||n===null)return"";var s;t&&t.arrayFormat in gx?s=t.arrayFormat:t&&"indices"in t?s=t.indices?"indices":"repeat":s="indices";var l=gx[s];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=l==="comma"&&t&&t.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var u=yx(),f=0;f<o.length;++f){var p=o[f];r.skipNulls&&n[p]===null||bx(a,p3(n[p],p,l,c,r.strictNullHandling,r.skipNulls,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,u))}var d=a.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),d.length>0?h+d:""},ui=vx,Xd=Object.prototype.hasOwnProperty,v3=Array.isArray,Nt={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:ui.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},y3=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},xx=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},g3="utf8=%26%2310003%3B",b3="utf8=%E2%9C%93",w3=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,i=n.parameterLimit===1/0?void 0:n.parameterLimit,a=o.split(n.delimiter,i),s=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<a.length;++l)a[l].indexOf("utf8=")===0&&(a[l]===b3?c="utf-8":a[l]===g3&&(c="iso-8859-1"),s=l,l=a.length);for(l=0;l<a.length;++l)if(l!==s){var u=a[l],f=u.indexOf("]="),p=f===-1?u.indexOf("="):f+1,d,h;p===-1?(d=n.decoder(u,Nt.decoder,c,"key"),h=n.strictNullHandling?null:""):(d=n.decoder(u.slice(0,p),Nt.decoder,c,"key"),h=ui.maybeMap(xx(u.slice(p+1),n),function(m){return n.decoder(m,Nt.decoder,c,"value")})),h&&n.interpretNumericEntities&&c==="iso-8859-1"&&(h=y3(h)),u.indexOf("[]=")>-1&&(h=v3(h)?[h]:h),Xd.call(r,d)?r[d]=ui.combine(r[d],h):r[d]=h}return r},x3=function(e,t,n,r){for(var o=r?t:xx(t,n),i=e.length-1;i>=0;--i){var a,s=e[i];if(s==="[]"&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var l=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,c=parseInt(l,10);!n.parseArrays&&l===""?a={0:o}:!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(a=[],a[c]=o):l!=="__proto__"&&(a[l]=o)}o=a}return o},S3=function(t,n,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,l=r.depth>0&&a.exec(i),c=l?i.slice(0,l.index):i,u=[];if(c){if(!r.plainObjects&&Xd.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var f=0;r.depth>0&&(l=s.exec(i))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&Xd.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+i.slice(l.index)+"]"),x3(u,n,r,o)}},E3=function(t){if(!t)return Nt;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?Nt.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Nt.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Nt.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Nt.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Nt.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Nt.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Nt.comma,decoder:typeof t.decoder=="function"?t.decoder:Nt.decoder,delimiter:typeof t.delimiter=="string"||ui.isRegExp(t.delimiter)?t.delimiter:Nt.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Nt.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Nt.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Nt.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Nt.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Nt.strictNullHandling}},$3=function(e,t){var n=E3(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?w3(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),a=0;a<i.length;++a){var s=i[a],l=S3(s,r[s],n,typeof e=="string");o=ui.merge(o,l,n)}return n.allowSparse===!0?o:ui.compact(o)},O3=m3,k3=$3,_3=Zd,T3={formats:_3,parse:k3,stringify:O3};const C3=Le(T3),I3=e=>e[1]!==void 0,St=e=>{const{method:t,path:n,query:r,headers:o,body:i}=e,a=Object.entries(o).filter(I3),s=Object.fromEntries(a),l=C3.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),c=l?[n,l].join("?"):n;return{method:t,url:c,headers:s,data:i}},A3=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),P3=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),R3=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),M3=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),D3=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),j3=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),N3=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),L3=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),F3=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),B3=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),U3=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),z3=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),H3=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),q3=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),W3=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),V3=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),K3=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),G3=e=>({path:"/events",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),Z3=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Y3=e=>({path:"/files",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{key:e.key,size:e.size,accessPolicies:e.accessPolicies,index:e.index,contentType:e.contentType,tags:e.tags}});let J3=class{constructor(t,n={}){we(this,"addParticipant",async t=>{const{path:n,headers:r,query:o,body:i}=A3(t),s=(this.props.toAxiosRequest??St)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Et(l)})});we(this,"createConversation",async t=>{const{path:n,headers:r,query:o,body:i}=P3(t),s=(this.props.toAxiosRequest??St)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Et(l)})});we(this,"deleteConversation",async t=>{const{path:n,headers:r,query:o,body:i}=R3(t),s=(this.props.toAxiosRequest??St)({method:"delete",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Et(l)})});we(this,"getConversation",async t=>{const{path:n,headers:r,query:o,body:i}=M3(t),s=(this.props.toAxiosRequest??St)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Et(l)})});we(this,"getParticipant",async t=>{const{path:n,headers:r,query:o,body:i}=D3(t),s=(this.props.toAxiosRequest??St)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Et(l)})});we(this,"listConversationMessages",async t=>{const{path:n,headers:r,query:o,body:i}=j3(t),s=(this.props.toAxiosRequest??St)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Et(l)})});we(this,"listConversations",async t=>{const{path:n,headers:r,query:o,body:i}=N3(t),s=(this.props.toAxiosRequest??St)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Et(l)})});we(this,"listParticipants",async t=>{const{path:n,headers:r,query:o,body:i}=L3(t),s=(this.props.toAxiosRequest??St)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Et(l)})});we(this,"listenConversation",async t=>{const{path:n,headers:r,query:o,body:i}=F3(t),s=(this.props.toAxiosRequest??St)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Et(l)})});we(this,"removeParticipant",async t=>{const{path:n,headers:r,query:o,body:i}=B3(t),s=(this.props.toAxiosRequest??St)({method:"delete",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Et(l)})});we(this,"createMessage",async t=>{const{path:n,headers:r,query:o,body:i}=U3(t),s=(this.props.toAxiosRequest??St)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Et(l)})});we(this,"deleteMessage",async t=>{const{path:n,headers:r,query:o,body:i}=z3(t),s=(this.props.toAxiosRequest??St)({method:"delete",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Et(l)})});we(this,"getMessage",async t=>{const{path:n,headers:r,query:o,body:i}=H3(t),s=(this.props.toAxiosRequest??St)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Et(l)})});we(this,"createUser",async t=>{const{path:n,headers:r,query:o,body:i}=q3(t),s=(this.props.toAxiosRequest??St)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Et(l)})});we(this,"deleteUser",async t=>{const{path:n,headers:r,query:o,body:i}=W3(t),s=(this.props.toAxiosRequest??St)({method:"delete",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Et(l)})});we(this,"getUser",async t=>{const{path:n,headers:r,query:o,body:i}=V3(t),s=(this.props.toAxiosRequest??St)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Et(l)})});we(this,"updateUser",async t=>{const{path:n,headers:r,query:o,body:i}=K3(t),s=(this.props.toAxiosRequest??St)({method:"put",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Et(l)})});we(this,"createEvent",async t=>{const{path:n,headers:r,query:o,body:i}=G3(t),s=(this.props.toAxiosRequest??St)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Et(l)})});we(this,"getEvent",async t=>{const{path:n,headers:r,query:o,body:i}=Z3(t),s=(this.props.toAxiosRequest??St)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Et(l)})});we(this,"createFile",async t=>{const{path:n,headers:r,query:o,body:i}=Y3(t),s=(this.props.toAxiosRequest??St)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Et(l)})});this.axiosInstance=t,this.props=n}};function Et(e){var t;return Pw.isAxiosError(e)&&((t=e.response)!=null&&t.data)?Mw(e.response.data):Mw(e)}class Sx{constructor(){we(this,"listeners",{})}emit(t,n){const r=this.listeners[t];if(r)for(const o of[...r])o(n)}onceOrMore(t,n){const r=o=>{n(o)==="stop-listening"&&this.off(t,r)};this.on(t,r)}once(t,n){const r=o=>{this.off(t,r),n(o)};this.on(t,r)}on(t,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(n)}off(t,n){const r=this.listeners[t];if(!r)return;const o=r.indexOf(n);o!==-1&&r.splice(o,1)}cleanup(){this.listeners={}}}var Qd={exports:{}};/** @license
60
60
  * eventsource.js
61
61
  * Available under MIT License (MIT)
62
62
  * https://github.com/Yaffle/EventSource/
63
- */(function(e,t){(function(n){var r=n.setTimeout,o=n.clearTimeout,i=n.XMLHttpRequest,a=n.XDomainRequest,s=n.ActiveXObject,c=n.EventSource,l=n.document,u=n.Promise,f=n.fetch,p=n.Response,d=n.TextDecoder,h=n.TextEncoder,m=n.AbortController;if(typeof window<"u"&&typeof l<"u"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(I){l.readyState="complete"},!1)),i==null&&s!=null&&(i=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(I){function X(){}return X.prototype=I,new X}),Date.now||(Date.now=function(){return new Date().getTime()}),m==null){var v=f;f=function(I,X){var oe=X.signal;return v(I,{headers:X.headers,credentials:X.credentials,cache:X.cache}).then(function(ee){var Se=ee.body.getReader();return oe._reader=Se,oe._aborted&&oe._reader.cancel(),{status:ee.status,statusText:ee.statusText,headers:ee.headers,body:{getReader:function(){return Se}}}})},m=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function y(){this.bitsNeeded=0,this.codePoint=0}y.prototype.decode=function(I){function X(U,Z,q){if(q===1)return U>=128>>Z&&U<<Z<=2047;if(q===2)return U>=2048>>Z&&U<<Z<=55295||U>=57344>>Z&&U<<Z<=65535;if(q===3)return U>=65536>>Z&&U<<Z<=1114111;throw new Error}function oe(U,Z){if(U===6*1)return Z>>6>15?3:Z>31?2:1;if(U===6*2)return Z>15?3:2;if(U===6*3)return 3;throw new Error}for(var ee=65533,Se="",xe=this.bitsNeeded,ke=this.codePoint,Fe=0;Fe<I.length;Fe+=1){var Te=I[Fe];xe!==0&&(Te<128||Te>191||!X(ke<<6|Te&63,xe-6,oe(xe,ke)))&&(xe=0,ke=ee,Se+=String.fromCharCode(ke)),xe===0?(Te>=0&&Te<=127?(xe=0,ke=Te):Te>=192&&Te<=223?(xe=6*1,ke=Te&31):Te>=224&&Te<=239?(xe=6*2,ke=Te&15):Te>=240&&Te<=247?(xe=6*3,ke=Te&7):(xe=0,ke=ee),xe!==0&&!X(ke,xe,oe(xe,ke))&&(xe=0,ke=ee)):(xe-=6,ke=ke<<6|Te&63),xe===0&&(ke<=65535?Se+=String.fromCharCode(ke):(Se+=String.fromCharCode(55296+(ke-65535-1>>10)),Se+=String.fromCharCode(56320+(ke-65535-1&1023))))}return this.bitsNeeded=xe,this.codePoint=ke,Se};var g=function(){try{return new d().decode(new h().encode("test"),{stream:!0})==="test"}catch(I){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+I)}return!1};(d==null||h==null||!g())&&(d=y);var b=function(){};function k(I){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=b,this.onload=b,this.onerror=b,this.onreadystatechange=b,this._contentType="",this._xhr=I,this._sendTimeout=0,this._abort=b}k.prototype.open=function(I,X){this._abort(!0);var oe=this,ee=this._xhr,Se=1,xe=0;this._abort=function(q){oe._sendTimeout!==0&&(o(oe._sendTimeout),oe._sendTimeout=0),(Se===1||Se===2||Se===3)&&(Se=4,ee.onload=b,ee.onerror=b,ee.onabort=b,ee.onprogress=b,ee.onreadystatechange=b,ee.abort(),xe!==0&&(o(xe),xe=0),q||(oe.readyState=4,oe.onabort(null),oe.onreadystatechange())),Se=0};var ke=function(){if(Se===1){var q=0,te="",de=void 0;if("contentType"in ee)q=200,te="OK",de=ee.contentType;else try{q=ee.status,te=ee.statusText,de=ee.getResponseHeader("Content-Type")}catch{q=0,te="",de=void 0}q!==0&&(Se=2,oe.readyState=2,oe.status=q,oe.statusText=te,oe._contentType=de,oe.onreadystatechange())}},Fe=function(){if(ke(),Se===2||Se===3){Se=3;var q="";try{q=ee.responseText}catch{}oe.readyState=3,oe.responseText=q,oe.onprogress()}},Te=function(q,te){if((te==null||te.preventDefault==null)&&(te={preventDefault:b}),Fe(),Se===1||Se===2||Se===3){if(Se=4,xe!==0&&(o(xe),xe=0),oe.readyState=4,q==="load")oe.onload(te);else if(q==="error")oe.onerror(te);else if(q==="abort")oe.onabort(te);else throw new TypeError;oe.onreadystatechange()}},U=function(q){ee!=null&&(ee.readyState===4?(!("onload"in ee)||!("onerror"in ee)||!("onabort"in ee))&&Te(ee.responseText===""?"error":"load",q):ee.readyState===3?"onprogress"in ee||Fe():ee.readyState===2&&ke())},Z=function(){xe=r(function(){Z()},500),ee.readyState===3&&Fe()};"onload"in ee&&(ee.onload=function(q){Te("load",q)}),"onerror"in ee&&(ee.onerror=function(q){Te("error",q)}),"onabort"in ee&&(ee.onabort=function(q){Te("abort",q)}),"onprogress"in ee&&(ee.onprogress=Fe),"onreadystatechange"in ee&&(ee.onreadystatechange=function(q){U(q)}),("contentType"in ee||!("ontimeout"in i.prototype))&&(X+=(X.indexOf("?")===-1?"?":"&")+"padding=true"),ee.open(I,X,!0),"readyState"in ee&&(xe=r(function(){Z()},0))},k.prototype.abort=function(){this._abort(!1)},k.prototype.getResponseHeader=function(I){return this._contentType},k.prototype.setRequestHeader=function(I,X){var oe=this._xhr;"setRequestHeader"in oe&&oe.setRequestHeader(I,X)},k.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},k.prototype.send=function(){if((!("ontimeout"in i.prototype)||!("sendAsBinary"in i.prototype)&&!("mozAnon"in i.prototype))&&l!=null&&l.readyState!=null&&l.readyState!=="complete"){var I=this;I._sendTimeout=r(function(){I._sendTimeout=0,I.send()},4);return}var X=this._xhr;"withCredentials"in X&&(X.withCredentials=this.withCredentials);try{X.send(void 0)}catch(oe){throw oe}};function S(I){return I.replace(/[A-Z]/g,function(X){return String.fromCharCode(X.charCodeAt(0)+32)})}function $(I){for(var X=Object.create(null),oe=I.split(`\r
64
- `),ee=0;ee<oe.length;ee+=1){var Se=oe[ee],xe=Se.split(": "),ke=xe.shift(),Fe=xe.join(": ");X[S(ke)]=Fe}this._map=X}$.prototype.get=function(I){return this._map[S(I)]},i!=null&&i.HEADERS_RECEIVED==null&&(i.HEADERS_RECEIVED=2);function T(){}T.prototype.open=function(I,X,oe,ee,Se,xe,ke){I.open("GET",Se);var Fe=0;I.onprogress=function(){var U=I.responseText,Z=U.slice(Fe);Fe+=Z.length,oe(Z)},I.onerror=function(U){U.preventDefault(),ee(new Error("NetworkError"))},I.onload=function(){ee(null)},I.onabort=function(){ee(null)},I.onreadystatechange=function(){if(I.readyState===i.HEADERS_RECEIVED){var U=I.status,Z=I.statusText,q=I.getResponseHeader("Content-Type"),te=I.getAllResponseHeaders();X(U,Z,q,new $(te))}},I.withCredentials=xe;for(var Te in ke)Object.prototype.hasOwnProperty.call(ke,Te)&&I.setRequestHeader(Te,ke[Te]);return I.send(),I};function R(I){this._headers=I}R.prototype.get=function(I){return this._headers.get(I)};function B(){}B.prototype.open=function(I,X,oe,ee,Se,xe,ke){var Fe=null,Te=new m,U=Te.signal,Z=new d;return f(Se,{headers:ke,credentials:xe?"include":"same-origin",signal:U,cache:"no-store"}).then(function(q){return Fe=q.body.getReader(),X(q.status,q.statusText,q.headers.get("Content-Type"),new R(q.headers)),new u(function(te,de){var Ie=function(){Fe.read().then(function(Ce){if(Ce.done)te(void 0);else{var Be=Z.decode(Ce.value,{stream:!0});oe(Be),Ie()}}).catch(function(Ce){de(Ce)})};Ie()})}).catch(function(q){if(q.name!=="AbortError")return q}).then(function(q){ee(q)}),{abort:function(){Fe!=null&&Fe.cancel(),Te.abort()}}};function O(){this._listeners=Object.create(null)}function M(I){r(function(){throw I},0)}O.prototype.dispatchEvent=function(I){I.target=this;var X=this._listeners[I.type];if(X!=null)for(var oe=X.length,ee=0;ee<oe;ee+=1){var Se=X[ee];try{typeof Se.handleEvent=="function"?Se.handleEvent(I):Se.call(this,I)}catch(xe){M(xe)}}},O.prototype.addEventListener=function(I,X){I=String(I);var oe=this._listeners,ee=oe[I];ee==null&&(ee=[],oe[I]=ee);for(var Se=!1,xe=0;xe<ee.length;xe+=1)ee[xe]===X&&(Se=!0);Se||ee.push(X)},O.prototype.removeEventListener=function(I,X){I=String(I);var oe=this._listeners,ee=oe[I];if(ee!=null){for(var Se=[],xe=0;xe<ee.length;xe+=1)ee[xe]!==X&&Se.push(ee[xe]);Se.length===0?delete oe[I]:oe[I]=Se}};function H(I){this.type=I,this.target=void 0}function L(I,X){H.call(this,I),this.data=X.data,this.lastEventId=X.lastEventId}L.prototype=Object.create(H.prototype);function P(I,X){H.call(this,I),this.status=X.status,this.statusText=X.statusText,this.headers=X.headers}P.prototype=Object.create(H.prototype);function N(I,X){H.call(this,I),this.error=X.error}N.prototype=Object.create(H.prototype);var j=-1,W=0,V=1,D=2,w=-1,z=0,K=1,_=2,J=3,ae=/^text\/event\-stream(;.*)?$/i,re=1e3,le=18e6,pe=function(I,X){var oe=I==null?X:parseInt(I,10);return oe!==oe&&(oe=X),me(oe)},me=function(I){return Math.min(Math.max(I,re),le)},ce=function(I,X,oe){try{typeof X=="function"&&X.call(I,oe)}catch(ee){M(ee)}};function Q(I,X){O.call(this),X=X||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,ve(this,I,X)}function G(){return i!=null&&"withCredentials"in i.prototype||a==null?new i:new a}var fe=f!=null&&p!=null&&"body"in p.prototype;function ve(I,X,oe){X=String(X);var ee=!!oe.withCredentials,Se=oe.lastEventIdQueryParameterName||"lastEventId",xe=me(1e3),ke=pe(oe.heartbeatTimeout,45e3),Fe="",Te=xe,U=!1,Z=0,q=oe.headers||{},te=oe.Transport,de=fe&&te==null?void 0:new k(te!=null?new te:G()),Ie=te!=null&&typeof te!="string"?new te:de==null?new B:new T,Ce=void 0,Be=0,ut=j,Nt="",ot="",nt="",pt="",ht=z,wn=0,Pn=0,er=function(it,mt,Dt,jt){if(ut===W)if(it===200&&Dt!=null&&ae.test(Dt)){ut=V,U=Date.now(),Te=xe,I.readyState=V;var Zt=new P("open",{status:it,statusText:mt,headers:jt});I.dispatchEvent(Zt),ce(I,I.onopen,Zt)}else{var Ft="";it!==200?(mt&&(mt=mt.replace(/\s+/g," ")),Ft="EventSource's response has a status "+it+" "+mt+" that is not 200. Aborting the connection."):Ft="EventSource's response has a Content-Type specifying an unsupported type: "+(Dt==null?"-":Dt.replace(/\s+/g," "))+". Aborting the connection.",tr();var Zt=new P("error",{status:it,statusText:mt,headers:jt});I.dispatchEvent(Zt),ce(I,I.onerror,Zt),console.error(Ft)}},Gr=function(it){if(ut===V){for(var mt=-1,Dt=0;Dt<it.length;Dt+=1){var jt=it.charCodeAt(Dt);(jt===`
65
- `.charCodeAt(0)||jt==="\r".charCodeAt(0))&&(mt=Dt)}var Zt=(mt!==-1?pt:"")+it.slice(0,mt+1);pt=(mt===-1?pt:"")+it.slice(mt+1),it!==""&&(U=Date.now(),Z+=it.length);for(var Ft=0;Ft<Zt.length;Ft+=1){var jt=Zt.charCodeAt(Ft);if(ht===w&&jt===`
66
- `.charCodeAt(0))ht=z;else if(ht===w&&(ht=z),jt==="\r".charCodeAt(0)||jt===`
67
- `.charCodeAt(0)){if(ht!==z){ht===K&&(Pn=Ft+1);var Fn=Zt.slice(wn,Pn-1),nr=Zt.slice(Pn+(Pn<Ft&&Zt.charCodeAt(Pn)===" ".charCodeAt(0)?1:0),Ft);Fn==="data"?(Nt+=`
68
- `,Nt+=nr):Fn==="id"?ot=nr:Fn==="event"?nt=nr:Fn==="retry"?(xe=pe(nr,xe),Te=xe):Fn==="heartbeatTimeout"&&(ke=pe(nr,ke),Be!==0&&(o(Be),Be=r(function(){Zr()},ke)))}if(ht===z){if(Nt!==""){Fe=ot,nt===""&&(nt="message");var To=new L(nt,{data:Nt.slice(1),lastEventId:ot});if(I.dispatchEvent(To),nt==="open"?ce(I,I.onopen,To):nt==="message"?ce(I,I.onmessage,To):nt==="error"&&ce(I,I.onerror,To),ut===D)return}Nt="",nt=""}ht=jt==="\r".charCodeAt(0)?w:z}else ht===z&&(wn=Ft,ht=K),ht===K?jt===":".charCodeAt(0)&&(Pn=Ft+1,ht=_):ht===_&&(ht=J)}}},Or=function(it){if(ut===V||ut===W){ut=j,Be!==0&&(o(Be),Be=0),Be=r(function(){Zr()},Te),Te=me(Math.min(xe*16,Te*2)),I.readyState=W;var mt=new N("error",{error:it});I.dispatchEvent(mt),ce(I,I.onerror,mt),it!=null&&console.error(it)}},tr=function(){ut=D,Ce!=null&&(Ce.abort(),Ce=void 0),Be!==0&&(o(Be),Be=0),I.readyState=D},Zr=function(){if(Be=0,ut!==j){if(!U&&Ce!=null)Or(new Error("No activity within "+ke+" milliseconds. "+(ut===W?"No response received.":Z+" chars received.")+" Reconnecting.")),Ce!=null&&(Ce.abort(),Ce=void 0);else{var it=Math.max((U||Date.now())+ke-Date.now(),1);U=!1,Be=r(function(){Zr()},it)}return}U=!1,Z=0,Be=r(function(){Zr()},ke),ut=W,Nt="",nt="",ot=Fe,pt="",wn=0,Pn=0,ht=z;var mt=X;if(X.slice(0,5)!=="data:"&&X.slice(0,5)!=="blob:"&&Fe!==""){var Dt=X.indexOf("?");mt=Dt===-1?X:X.slice(0,Dt+1)+X.slice(Dt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(nr,To){return To===Se?"":nr}),mt+=(X.indexOf("?")===-1?"?":"&")+Se+"="+encodeURIComponent(Fe)}var jt=I.withCredentials,Zt={};Zt.Accept="text/event-stream";var Ft=I.headers;if(Ft!=null)for(var Fn in Ft)Object.prototype.hasOwnProperty.call(Ft,Fn)&&(Zt[Fn]=Ft[Fn]);try{Ce=Ie.open(de,er,Gr,Or,mt,jt,Zt)}catch(nr){throw tr(),nr}};I.url=X,I.readyState=W,I.withCredentials=ee,I.headers=q,I._close=tr,Zr()}Q.prototype=Object.create(O.prototype),Q.prototype.CONNECTING=W,Q.prototype.OPEN=V,Q.prototype.CLOSED=D,Q.prototype.close=function(){this._close()},Q.CONNECTING=W,Q.OPEN=V,Q.CLOSED=D,Q.prototype.withCredentials=void 0;var _e=c;i!=null&&(c==null||!("withCredentials"in c.prototype))&&(_e=Q),function(I){{var X=I(t);X!==void 0&&(e.exports=X)}}(function(I){I.EventSourcePolyfill=Q,I.NativeEventSource=c,I.EventSource=_e})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:be:globalThis)})(Cp,Cp.exports);var sB=Cp.exports;const cB=Ue(sB),lB=(e,t={})=>{const n=new cB.EventSourcePolyfill(e,{headers:t.headers}),r=new ix;return n.onopen=o=>r.emit("open",o),n.onmessage=o=>r.emit("message",o),n.onerror=o=>r.emit("error",o),{emitter:r,source:n}},uB=async(e,t={})=>{const{emitter:n,source:r}=lB(e,t);return await new Promise((o,i)=>{n.on("open",()=>{o()}),n.on("error",a=>{i(a)})}).finally(()=>n.cleanup()),{on:n.on.bind(n),close:()=>{n.cleanup(),r.close()}}},fB=x.object({type:x.literal("message_created"),data:x.object({id:x.string().describe("Id of the [Message](#schema_message)"),createdAt:x.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:x.union([x.object({audioUrl:x.string().min(1),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("audio")}),x.object({title:x.string().min(1),subtitle:x.string().optional(),imageUrl:x.string().optional(),actions:x.array(x.object({action:x.enum(["postback","url","say"]),label:x.string().min(1),value:x.string().min(1)})),type:x.literal("card"),className:x.string().describe("CSS className to apply to the message").optional()}),x.object({items:x.array(x.object({title:x.string().min(1),subtitle:x.string().optional(),imageUrl:x.string().optional(),actions:x.array(x.object({action:x.enum(["postback","url","say"]),label:x.string().min(1),value:x.string().min(1)})),className:x.string().describe("CSS className to apply to the message").optional()})),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("carousel")}),x.object({text:x.string(),options:x.array(x.object({label:x.string().min(1),value:x.string().min(1)})),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("choice"),disableFreeText:x.boolean().optional()}),x.object({text:x.string(),options:x.array(x.object({label:x.string().min(1),value:x.string().min(1)})),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("dropdown")}),x.object({fileUrl:x.string().min(1),title:x.string().min(1).optional(),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("file")}),x.object({imageUrl:x.string().min(1),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("image")}),x.object({latitude:x.number(),longitude:x.number(),address:x.string().optional(),title:x.string().optional(),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("location")}),x.object({markdown:x.string().min(1),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("markdown")}),x.object({text:x.string().min(1),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("text")}),x.object({videoUrl:x.string().min(1),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("video")})]).describe("Payload is the content type of the message."),userId:x.string().describe("ID of the [User](#schema_user)"),conversationId:x.string().describe("ID of the [Conversation](#schema_conversation)")}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),dB=x.object({type:x.literal("webchat_visibility"),data:x.object({visibility:x.union([x.literal("show"),x.literal("hide"),x.literal("toggle")])})}),pB=x.object({type:x.literal("webchat_config"),data:x.object({config:x.record(x.union([x.any(),x.null()]))})}),hB=x.object({type:x.literal("custom"),data:x.object({event:x.record(x.union([x.any(),x.null()]))})}),mB=x.object({type:x.literal("typing_started"),data:x.object({timeout:x.number().optional()})}),yB=x.object({type:x.literal("typing_stopped"),data:x.record(x.never())}),vB={messageCreated:fB,webchatVisibility:dB,webchatConfig:pB,custom:hB,typingStarted:mB,typingStopped:yB},ax="unknown error",of=class of extends ix{constructor(n){super();he(this,"_state",{status:"disconnected"});he(this,"connect",async()=>{if(this._state.status==="connected")return;if(this._state.status==="connecting"){await this._state.connectionPromise;return}const n=this._connect();this._state={status:"connecting",connectionPromise:n},await n});he(this,"disconnect",async()=>{if(this._state.status==="disconnected")return;let n;this._state.status==="connecting"?n=await this._state.connectionPromise:n=this._state.source,this._disconnectSync(n)});he(this,"_connect",async()=>{const n=await uB(`${this._props.url}/conversations/${this._props.conversationId}/listen`,{headers:{"x-user-key":this._props.userKey}});return n.on("message",this._handleMessage),n.on("error",this._handleError(n)),this._state={status:"connected",source:n},n});he(this,"_disconnectSync",n=>{n.close(),this._state={status:"disconnected"}});he(this,"_handleMessage",n=>{const r=this._parseSignal(n.data);this.emit(r.type,r.data)});he(this,"_handleError",n=>r=>{this._disconnectSync(n);const o=this._toError(r);this.emit("error",o)});he(this,"_parseSignal",n=>{for(const r of Object.values(vB)){const o=this._safeJsonParse(n),i=r.safeParse(o);if(i.success)return i.data}return{type:"unknown",data:n}});he(this,"_safeJsonParse",n=>{try{return JSON.parse(n)}catch{return n}});he(this,"_toError",n=>{if(n instanceof Error)return n;if(typeof n=="string")return new Error(n);if(n===null)return new Error(ax);if(typeof n=="object"&&"message"in n)return this._toError(n.message);try{const r=JSON.stringify(n);return new Error(r)}catch{return new Error(ax)}});this._props=n}get status(){return this._state.status}};he(of,"listen",async n=>{const r=new of(n);return await r.connect(),r});let Op=of;const sx=100*1024*1024,gB=sx,bB=sx,wB=6e4;class xB{constructor(t){he(this,"_auto");he(this,"createConversation",t=>this._auto.createConversation(t));he(this,"getConversation",t=>this._auto.getConversation(t));he(this,"deleteConversation",t=>this._auto.deleteConversation(t));he(this,"listConversations",t=>this._auto.listConversations(t));he(this,"listConversationMessages",t=>this._auto.listConversationMessages(t));he(this,"addParticipant",t=>this._auto.addParticipant(t));he(this,"removeParticipant",t=>this._auto.removeParticipant(t));he(this,"getParticipant",t=>this._auto.getParticipant(t));he(this,"listParticipants",t=>this._auto.listParticipants(t));he(this,"createMessage",t=>this._auto.createMessage(t));he(this,"getMessage",t=>this._auto.getMessage(t));he(this,"deleteMessage",t=>this._auto.deleteMessage(t));he(this,"createFile",t=>this._auto.createFile(t));he(this,"createUser",t=>this._auto.createUser(t));he(this,"getUser",t=>this._auto.getUser(t));he(this,"updateUser",t=>this._auto.updateUser(t));he(this,"deleteUser",t=>this._auto.deleteUser(t));he(this,"createEvent",t=>this._auto.createEvent(t));he(this,"getEvent",t=>this._auto.getEvent(t));he(this,"listenConversation",async({id:t,"x-user-key":n})=>await Op.listen({url:this.props.apiUrl,conversationId:t,userKey:n}));this.props=t;const{apiUrl:n}=t,r={...t.headers},o=t.timeout??wB,i=v1.create({baseURL:n,headers:r,withCredentials:!0,timeout:o,maxBodyLength:gB,maxContentLength:bB});this._auto=new aB(i)}}const ml={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},mn=(e,t)=>e.status===t,yr=(e,t)=>ml[e.status]<ml[t],cx=(e,t)=>ml[e.status]>=ml[t];class vr extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const lx=["audio","file","image","video"],ux=e=>lx.includes(e);class SB extends Lf{constructor(n){super();he(this,"_client");he(this,"_webhookId");he(this,"_apiUrl");he(this,"_state",{status:"disconnected"});he(this,"mode","pushpin");he(this,"_initialConnect",async({data:n,name:r,pictureUrl:o})=>{if(cx(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(mn(this._state,"user_creating"))return;this._state={status:"user_creating"};const{user:{id:i},key:a}=await this._client.createUser({name:r,pictureUrl:o,userData:n});return this._state={status:"user_created",userId:i,userKey:a},{userId:i,userToken:a}});he(this,"_reConnect",async(n,{data:r,name:o,pictureUrl:i})=>{if(cx(this._state,"user_created")){if(this._state.userId!==n.userId)throw new Error("Client is already connected. Please disconnect first.");return n}return mn(this._state,"user_creating")||(this._state={status:"user_created",userId:n.userId,userKey:n.userToken},await this._client.updateUser({"x-user-key":n.userToken,name:o,pictureUrl:i,userData:r})),n});he(this,"_mapMessage",n=>{const{payload:r,disableInput:o}=Eg(n.payload);return{id:n.id,conversationId:n.conversationId,authorId:n.userId,sentOn:new Date(n.createdAt),payload:r,disableInput:o}});const r=`${n.apiUrl}/${n.clientId}`;this._webhookId=n.clientId,this._apiUrl=r,this._client=new xB({apiUrl:r})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!yr(this._state,"user_created"))return this._state.userId}async getUser(){if(yr(this._state,"user_created"))throw new vr(this._state);const{user:n}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:n.data}}async updateUser(n){if(yr(this._state,"user_created"))throw new vr(this._state);const{user:r}=await this._client.updateUser({"x-user-key":this._state.userKey,name:n.name,pictureUrl:n.pictureUrl,userData:n.data});return r}get conversationId(){if(!yr(this._state,"conversation_created"))return this._state.conversationId}async connect(n,r,o={}){const i={data:r,...o};return n?await this.userExists(n)?this._reConnect(n,i):this._initialConnect(i):this._initialConnect(i)}async disconnect(){mn(this._state,"conversation_created")?this._state.signalEmitter.cleanup():mn(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(n){if(yr(this._state,"user_created"))throw new vr(this._state);if(mn(this._state,"conversation_creating"))throw new vr(this._state);let r;mn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state));const{size:o,name:i}=n,s=await(h=>new Promise((m,v)=>{const y=new FileReader;y.onload=g=>{var b;return m((b=g.target)==null?void 0:b.result)},y.onerror=g=>{var b;return v((b=g.target)==null?void 0:b.error)},y.readAsArrayBuffer(h)}))(n),{file:{uploadUrl:c,contentType:l,url:u}}=await this._client.createFile({"x-user-key":r.userKey,size:o,key:i,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"}});await fetch(c,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:s});const f=l.split("/").shift()??"",p=ux(f)?f:"file",d=p==="image"?{type:p,imageUrl:u}:p==="audio"?{type:p,audioUrl:u}:p==="video"?{type:p,videoUrl:u}:{type:p,fileUrl:u};return await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:d}),this.emit("messageSent",u),{fileUrl:u,name:i,type:p}}async sendMessage(n){if(yr(this._state,"user_created"))throw new vr(this._state);if(mn(this._state,"conversation_creating"))throw new vr(this._state);let r;mn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"text",text:n}}),this.emit("messageSent",n)}async sendEvent(n){if(yr(this._state,"user_created"))throw new vr(this._state);if(mn(this._state,"conversation_creating"))throw new vr(this._state);let r;mn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createEvent({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"custom",data:n}})}async switchConversation(n){if(yr(this._state,"user_created"))throw new vr(this._state);mn(this._state,"conversation_created")&&this._state.conversationId===n||mn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._connectConversation(this._state,n))}async conversationExists(n){if(yr(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:n}),!0}catch(r){if(np(r)&&r.code===404)return!1;throw r}}async userExists({userToken:n}){try{return await this._client.getUser({"x-user-key":n}),!0}catch(r){const o=i=>i.code===404||i.code===401;if(np(r)&&o(r))return!1;throw r}}async newConversation(){if(yr(this._state,"user_created"))throw new vr(this._state);mn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._createNewConversation(this._state))}async _createNewConversation(n){const{conversation:{id:r}}=await this._client.createConversation({"x-user-key":n.userKey}),o=await this._connectConversation(n,r);return await this._client.createEvent({"x-user-key":n.userKey,conversationId:r,payload:{type:"conversation_started",data:{}}}),o}async listMessages(){if(!mn(this._state,"conversation_created"))return[];const{conversationId:n,userKey:r}=this._state,o=[];let i;do{const a=await this._client.listConversationMessages({id:n,"x-user-key":r,nextToken:i});o.push(...a.messages),i=a.meta.nextToken}while(i);return o.map(this._mapMessage)}async _connectConversation(n,r){const o=await this._client.listenConversation({id:r,"x-user-key":n.userKey});return o.on("unknown",i=>{typeof i=="string"&&i==="ping"||console.debug("unknown event",i)}),o.on("message_created",i=>{i.userId!==n.userId&&this.emit("message",this._mapMessage(i))}),o.on("error",()=>{this._state={status:"user_created",userId:n.userId,userKey:n.userKey},this.emit("error",new Error("Connection to conversation lost"))}),o.on("webchat_visibility",i=>{this.emit("webchatVisibility",i.visibility)}),o.on("webchat_config",i=>{this.emit("webchatConfig",i.config)}),o.on("typing_started",i=>{this.emit("isTyping",{isTyping:!0,timeout:i.timeout??5e3})}),o.on("typing_stopped",()=>{this.emit("isTyping",{isTyping:!1,timeout:0})}),o.on("custom",i=>{this.emit("customEvent",i.event)}),this.emit("conversation",r),this._state={status:"conversation_created",userId:n.userId,userKey:n.userKey,conversationId:r,signalEmitter:o},this._state}}const fx=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:n="pushpin"})=>n==="messaging"?new MF({url:t,clientId:e}):new SB({apiUrl:t,clientId:e}),EB=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:n="pushpin"})=>{const[r]=E.useState(fx({clientId:e,apiUrl:t,mode:n}));return r},_B=(e,t={})=>new Promise((n,r)=>{if(typeof window>"u")return r("Window is not defined");if(!e)return r("Url is not defined");let o=null;const i=new Image;i.addEventListener("load",()=>{o&&clearTimeout(o),n({width:i.naturalWidth,height:i.naturalHeight})}),i.addEventListener("error",a=>{o&&clearTimeout(o),r(`${a.type}: ${a.message}`)}),i.src=e,t.timeout&&(o=setTimeout(()=>r("Timeout"),t.timeout))});let $B={data:""},kB=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||$B,CB=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,OB=/\/\*[^]*?\*\/| +/g,dx=/\n+/g,po=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];i[0]=="@"?i[1]=="i"?n=i+" "+a+";":r+=i[1]=="f"?po(a,i):i+"{"+po(a,i[1]=="k"?"":t)+"}":typeof a=="object"?r+=po(a,t?t.replace(/([^,])+/g,s=>i.replace(/(^:.*)|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,s):s?s+" "+c:c)):i):a!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=po.p?po.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},Dr={},px=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+px(e[n]);return t}return e},TB=(e,t,n,r,o)=>{let i=px(e),a=Dr[i]||(Dr[i]=(c=>{let l=0,u=11;for(;l<c.length;)u=101*u+c.charCodeAt(l++)>>>0;return"go"+u})(i));if(!Dr[a]){let c=i!==e?e:(l=>{let u,f,p=[{}];for(;u=CB.exec(l.replace(OB,""));)u[4]?p.shift():u[3]?(f=u[3].replace(dx," ").trim(),p.unshift(p[0][f]=p[0][f]||{})):p[0][u[1]]=u[2].replace(dx," ").trim();return p[0]})(e);Dr[a]=po(o?{["@keyframes "+a]:c}:c,n?"":"."+a)}let s=n&&Dr.g?Dr.g:null;return n&&(Dr.g=Dr[a]),((c,l,u,f)=>{f?l.data=l.data.replace(f,c):l.data.indexOf(c)===-1&&(l.data=u?c+l.data:l.data+c)})(Dr[a],t,r,s),a},AB=(e,t,n)=>e.reduce((r,o,i)=>{let a=t[i];if(a&&a.call){let s=a(n),c=s&&s.props&&s.props.className||/^go/.test(s)&&s;a=c?"."+c:s&&typeof s=="object"?s.props?"":po(s,""):s===!1?"":s}return r+o+(a??"")},"");function yl(e){let t=this||{},n=e.call?e(t.p):e;return TB(n.unshift?n.raw?AB(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,kB(t.target),t.g,t.o,t.k)}let hx,Tp,Ap;yl.bind({g:1});let jr=yl.bind({k:1});function PB(e,t,n,r){po.p=t,hx=e,Tp=n,Ap=r}function ho(e,t){let n=this||{};return function(){let r=arguments;function o(i,a){let s=Object.assign({},i),c=s.className||o.className;n.p=Object.assign({theme:Tp&&Tp()},s),n.o=/ *go\d+/.test(c),s.className=yl.apply(n,r)+(c?" "+c:""),t&&(s.ref=a);let l=e;return e[0]&&(l=s.as||e,delete s.as),Ap&&l[0]&&Ap(s),hx(l,s)}return t?t(o):o}}var IB=e=>typeof e=="function",vl=(e,t)=>IB(e)?e(t):e,RB=(()=>{let e=0;return()=>(++e).toString()})(),mx=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),MB=20,gl=new Map,NB=1e3,yx=e=>{if(gl.has(e))return;let t=setTimeout(()=>{gl.delete(e),Yo({type:4,toastId:e})},NB);gl.set(e,t)},DB=e=>{let t=gl.get(e);t&&clearTimeout(t)},Pp=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,MB)};case 1:return t.toast.id&&DB(t.toast.id),{...e,toasts:e.toasts.map(i=>i.id===t.toast.id?{...i,...t.toast}:i)};case 2:let{toast:n}=t;return e.toasts.find(i=>i.id===n.id)?Pp(e,{type:1,toast:n}):Pp(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?yx(r):e.toasts.forEach(i=>{yx(i.id)}),{...e,toasts:e.toasts.map(i=>i.id===r||r===void 0?{...i,visible:!1}:i)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(i=>i.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(i=>({...i,pauseDuration:i.pauseDuration+o}))}}},bl=[],wl={toasts:[],pausedAt:void 0},Yo=e=>{wl=Pp(wl,e),bl.forEach(t=>{t(wl)})},jB={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},FB=(e={})=>{let[t,n]=E.useState(wl);E.useEffect(()=>(bl.push(n),()=>{let o=bl.indexOf(n);o>-1&&bl.splice(o,1)}),[t]);let r=t.toasts.map(o=>{var i,a;return{...e,...e[o.type],...o,duration:o.duration||((i=e[o.type])==null?void 0:i.duration)||(e==null?void 0:e.duration)||jB[o.type],style:{...e.style,...(a=e[o.type])==null?void 0:a.style,...o.style}}});return{...t,toasts:r}},LB=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||RB()}),is=e=>(t,n)=>{let r=LB(t,e,n);return Yo({type:2,toast:r}),r.id},Dn=(e,t)=>is("blank")(e,t);Dn.error=is("error"),Dn.success=is("success"),Dn.loading=is("loading"),Dn.custom=is("custom"),Dn.dismiss=e=>{Yo({type:3,toastId:e})},Dn.remove=e=>Yo({type:4,toastId:e}),Dn.promise=(e,t,n)=>{let r=Dn.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(o=>(Dn.success(vl(t.success,o),{id:r,...n,...n==null?void 0:n.success}),o)).catch(o=>{Dn.error(vl(t.error,o),{id:r,...n,...n==null?void 0:n.error})}),e};var BB=(e,t)=>{Yo({type:1,toast:{id:e,height:t}})},UB=()=>{Yo({type:5,time:Date.now()})},zB=e=>{let{toasts:t,pausedAt:n}=FB(e);E.useEffect(()=>{if(n)return;let i=Date.now(),a=t.map(s=>{if(s.duration===1/0)return;let c=(s.duration||0)+s.pauseDuration-(i-s.createdAt);if(c<0){s.visible&&Dn.dismiss(s.id);return}return setTimeout(()=>Dn.dismiss(s.id),c)});return()=>{a.forEach(s=>s&&clearTimeout(s))}},[t,n]);let r=E.useCallback(()=>{n&&Yo({type:6,time:Date.now()})},[n]),o=E.useCallback((i,a)=>{let{reverseOrder:s=!1,gutter:c=8,defaultPosition:l}=a||{},u=t.filter(d=>(d.position||l)===(i.position||l)&&d.height),f=u.findIndex(d=>d.id===i.id),p=u.filter((d,h)=>h<f&&d.visible).length;return u.filter(d=>d.visible).slice(...s?[p+1]:[0,p]).reduce((d,h)=>d+(h.height||0)+c,0)},[t]);return{toasts:t,handlers:{updateHeight:BB,startPause:UB,endPause:r,calculateOffset:o}}},qB=jr`
63
+ */(function(e,t){(function(n){var r=n.setTimeout,o=n.clearTimeout,i=n.XMLHttpRequest,a=n.XDomainRequest,s=n.ActiveXObject,l=n.EventSource,c=n.document,u=n.Promise,f=n.fetch,p=n.Response,d=n.TextDecoder,h=n.TextEncoder,m=n.AbortController;if(typeof window<"u"&&typeof c<"u"&&!("readyState"in c)&&c.body==null&&(c.readyState="loading",window.addEventListener("load",function(R){c.readyState="complete"},!1)),i==null&&s!=null&&(i=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(R){function X(){}return X.prototype=R,new X}),Date.now||(Date.now=function(){return new Date().getTime()}),m==null){var y=f;f=function(R,X){var oe=X.signal;return y(R,{headers:X.headers,credentials:X.credentials,cache:X.cache}).then(function(ee){var xe=ee.body.getReader();return oe._reader=xe,oe._aborted&&oe._reader.cancel(),{status:ee.status,statusText:ee.statusText,headers:ee.headers,body:{getReader:function(){return xe}}}})},m=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function v(){this.bitsNeeded=0,this.codePoint=0}v.prototype.decode=function(R){function X(U,Z,H){if(H===1)return U>=128>>Z&&U<<Z<=2047;if(H===2)return U>=2048>>Z&&U<<Z<=55295||U>=57344>>Z&&U<<Z<=65535;if(H===3)return U>=65536>>Z&&U<<Z<=1114111;throw new Error}function oe(U,Z){if(U===6*1)return Z>>6>15?3:Z>31?2:1;if(U===6*2)return Z>15?3:2;if(U===6*3)return 3;throw new Error}for(var ee=65533,xe="",be=this.bitsNeeded,Oe=this.codePoint,Ne=0;Ne<R.length;Ne+=1){var _e=R[Ne];be!==0&&(_e<128||_e>191||!X(Oe<<6|_e&63,be-6,oe(be,Oe)))&&(be=0,Oe=ee,xe+=String.fromCharCode(Oe)),be===0?(_e>=0&&_e<=127?(be=0,Oe=_e):_e>=192&&_e<=223?(be=6*1,Oe=_e&31):_e>=224&&_e<=239?(be=6*2,Oe=_e&15):_e>=240&&_e<=247?(be=6*3,Oe=_e&7):(be=0,Oe=ee),be!==0&&!X(Oe,be,oe(be,Oe))&&(be=0,Oe=ee)):(be-=6,Oe=Oe<<6|_e&63),be===0&&(Oe<=65535?xe+=String.fromCharCode(Oe):(xe+=String.fromCharCode(55296+(Oe-65535-1>>10)),xe+=String.fromCharCode(56320+(Oe-65535-1&1023))))}return this.bitsNeeded=be,this.codePoint=Oe,xe};var g=function(){try{return new d().decode(new h().encode("test"),{stream:!0})==="test"}catch(R){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+R)}return!1};(d==null||h==null||!g())&&(d=v);var b=function(){};function k(R){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=b,this.onload=b,this.onerror=b,this.onreadystatechange=b,this._contentType="",this._xhr=R,this._sendTimeout=0,this._abort=b}k.prototype.open=function(R,X){this._abort(!0);var oe=this,ee=this._xhr,xe=1,be=0;this._abort=function(H){oe._sendTimeout!==0&&(o(oe._sendTimeout),oe._sendTimeout=0),(xe===1||xe===2||xe===3)&&(xe=4,ee.onload=b,ee.onerror=b,ee.onabort=b,ee.onprogress=b,ee.onreadystatechange=b,ee.abort(),be!==0&&(o(be),be=0),H||(oe.readyState=4,oe.onabort(null),oe.onreadystatechange())),xe=0};var Oe=function(){if(xe===1){var H=0,te="",de=void 0;if("contentType"in ee)H=200,te="OK",de=ee.contentType;else try{H=ee.status,te=ee.statusText,de=ee.getResponseHeader("Content-Type")}catch{H=0,te="",de=void 0}H!==0&&(xe=2,oe.readyState=2,oe.status=H,oe.statusText=te,oe._contentType=de,oe.onreadystatechange())}},Ne=function(){if(Oe(),xe===2||xe===3){xe=3;var H="";try{H=ee.responseText}catch{}oe.readyState=3,oe.responseText=H,oe.onprogress()}},_e=function(H,te){if((te==null||te.preventDefault==null)&&(te={preventDefault:b}),Ne(),xe===1||xe===2||xe===3){if(xe=4,be!==0&&(o(be),be=0),oe.readyState=4,H==="load")oe.onload(te);else if(H==="error")oe.onerror(te);else if(H==="abort")oe.onabort(te);else throw new TypeError;oe.onreadystatechange()}},U=function(H){ee!=null&&(ee.readyState===4?(!("onload"in ee)||!("onerror"in ee)||!("onabort"in ee))&&_e(ee.responseText===""?"error":"load",H):ee.readyState===3?"onprogress"in ee||Ne():ee.readyState===2&&Oe())},Z=function(){be=r(function(){Z()},500),ee.readyState===3&&Ne()};"onload"in ee&&(ee.onload=function(H){_e("load",H)}),"onerror"in ee&&(ee.onerror=function(H){_e("error",H)}),"onabort"in ee&&(ee.onabort=function(H){_e("abort",H)}),"onprogress"in ee&&(ee.onprogress=Ne),"onreadystatechange"in ee&&(ee.onreadystatechange=function(H){U(H)}),("contentType"in ee||!("ontimeout"in i.prototype))&&(X+=(X.indexOf("?")===-1?"?":"&")+"padding=true"),ee.open(R,X,!0),"readyState"in ee&&(be=r(function(){Z()},0))},k.prototype.abort=function(){this._abort(!1)},k.prototype.getResponseHeader=function(R){return this._contentType},k.prototype.setRequestHeader=function(R,X){var oe=this._xhr;"setRequestHeader"in oe&&oe.setRequestHeader(R,X)},k.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},k.prototype.send=function(){if((!("ontimeout"in i.prototype)||!("sendAsBinary"in i.prototype)&&!("mozAnon"in i.prototype))&&c!=null&&c.readyState!=null&&c.readyState!=="complete"){var R=this;R._sendTimeout=r(function(){R._sendTimeout=0,R.send()},4);return}var X=this._xhr;"withCredentials"in X&&(X.withCredentials=this.withCredentials);try{X.send(void 0)}catch(oe){throw oe}};function S(R){return R.replace(/[A-Z]/g,function(X){return String.fromCharCode(X.charCodeAt(0)+32)})}function $(R){for(var X=Object.create(null),oe=R.split(`\r
64
+ `),ee=0;ee<oe.length;ee+=1){var xe=oe[ee],be=xe.split(": "),Oe=be.shift(),Ne=be.join(": ");X[S(Oe)]=Ne}this._map=X}$.prototype.get=function(R){return this._map[S(R)]},i!=null&&i.HEADERS_RECEIVED==null&&(i.HEADERS_RECEIVED=2);function C(){}C.prototype.open=function(R,X,oe,ee,xe,be,Oe){R.open("GET",xe);var Ne=0;R.onprogress=function(){var U=R.responseText,Z=U.slice(Ne);Ne+=Z.length,oe(Z)},R.onerror=function(U){U.preventDefault(),ee(new Error("NetworkError"))},R.onload=function(){ee(null)},R.onabort=function(){ee(null)},R.onreadystatechange=function(){if(R.readyState===i.HEADERS_RECEIVED){var U=R.status,Z=R.statusText,H=R.getResponseHeader("Content-Type"),te=R.getAllResponseHeaders();X(U,Z,H,new $(te))}},R.withCredentials=be;for(var _e in Oe)Object.prototype.hasOwnProperty.call(Oe,_e)&&R.setRequestHeader(_e,Oe[_e]);return R.send(),R};function P(R){this._headers=R}P.prototype.get=function(R){return this._headers.get(R)};function F(){}F.prototype.open=function(R,X,oe,ee,xe,be,Oe){var Ne=null,_e=new m,U=_e.signal,Z=new d;return f(xe,{headers:Oe,credentials:be?"include":"same-origin",signal:U,cache:"no-store"}).then(function(H){return Ne=H.body.getReader(),X(H.status,H.statusText,H.headers.get("Content-Type"),new P(H.headers)),new u(function(te,de){var Ae=function(){Ne.read().then(function(ke){if(ke.done)te(void 0);else{var Be=Z.decode(ke.value,{stream:!0});oe(Be),Ae()}}).catch(function(ke){de(ke)})};Ae()})}).catch(function(H){if(H.name!=="AbortError")return H}).then(function(H){ee(H)}),{abort:function(){Ne!=null&&Ne.cancel(),_e.abort()}}};function T(){this._listeners=Object.create(null)}function M(R){r(function(){throw R},0)}T.prototype.dispatchEvent=function(R){R.target=this;var X=this._listeners[R.type];if(X!=null)for(var oe=X.length,ee=0;ee<oe;ee+=1){var xe=X[ee];try{typeof xe.handleEvent=="function"?xe.handleEvent(R):xe.call(this,R)}catch(be){M(be)}}},T.prototype.addEventListener=function(R,X){R=String(R);var oe=this._listeners,ee=oe[R];ee==null&&(ee=[],oe[R]=ee);for(var xe=!1,be=0;be<ee.length;be+=1)ee[be]===X&&(xe=!0);xe||ee.push(X)},T.prototype.removeEventListener=function(R,X){R=String(R);var oe=this._listeners,ee=oe[R];if(ee!=null){for(var xe=[],be=0;be<ee.length;be+=1)ee[be]!==X&&xe.push(ee[be]);xe.length===0?delete oe[R]:oe[R]=xe}};function q(R){this.type=R,this.target=void 0}function B(R,X){q.call(this,R),this.data=X.data,this.lastEventId=X.lastEventId}B.prototype=Object.create(q.prototype);function A(R,X){q.call(this,R),this.status=X.status,this.statusText=X.statusText,this.headers=X.headers}A.prototype=Object.create(q.prototype);function D(R,X){q.call(this,R),this.error=X.error}D.prototype=Object.create(q.prototype);var N=-1,V=0,W=1,j=2,x=-1,z=0,K=1,O=2,J=3,ae=/^text\/event\-stream(;.*)?$/i,re=1e3,ce=18e6,pe=function(R,X){var oe=R==null?X:parseInt(R,10);return oe!==oe&&(oe=X),he(oe)},he=function(R){return Math.min(Math.max(R,re),ce)},le=function(R,X,oe){try{typeof X=="function"&&X.call(R,oe)}catch(ee){M(ee)}};function Q(R,X){T.call(this),X=X||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,ve(this,R,X)}function G(){return i!=null&&"withCredentials"in i.prototype||a==null?new i:new a}var fe=f!=null&&p!=null&&"body"in p.prototype;function ve(R,X,oe){X=String(X);var ee=!!oe.withCredentials,xe=oe.lastEventIdQueryParameterName||"lastEventId",be=he(1e3),Oe=pe(oe.heartbeatTimeout,45e3),Ne="",_e=be,U=!1,Z=0,H=oe.headers||{},te=oe.Transport,de=fe&&te==null?void 0:new k(te!=null?new te:G()),Ae=te!=null&&typeof te!="string"?new te:de==null?new F:new C,ke=void 0,Be=0,ct=N,Pt="",rt="",tt="",dt="",pt=z,dn=0,Sn=0,Vn=function(ot,ht,Rt,Mt){if(ct===V)if(ot===200&&Rt!=null&&ae.test(Rt)){ct=W,U=Date.now(),_e=be,R.readyState=W;var qt=new A("open",{status:ot,statusText:ht,headers:Mt});R.dispatchEvent(qt),le(R,R.onopen,qt)}else{var Dt="";ot!==200?(ht&&(ht=ht.replace(/\s+/g," ")),Dt="EventSource's response has a status "+ot+" "+ht+" that is not 200. Aborting the connection."):Dt="EventSource's response has a Content-Type specifying an unsupported type: "+(Rt==null?"-":Rt.replace(/\s+/g," "))+". Aborting the connection.",Kn();var qt=new A("error",{status:ot,statusText:ht,headers:Mt});R.dispatchEvent(qt),le(R,R.onerror,qt),console.error(Dt)}},Lr=function(ot){if(ct===W){for(var ht=-1,Rt=0;Rt<ot.length;Rt+=1){var Mt=ot.charCodeAt(Rt);(Mt===`
65
+ `.charCodeAt(0)||Mt==="\r".charCodeAt(0))&&(ht=Rt)}var qt=(ht!==-1?dt:"")+ot.slice(0,ht+1);dt=(ht===-1?dt:"")+ot.slice(ht+1),ot!==""&&(U=Date.now(),Z+=ot.length);for(var Dt=0;Dt<qt.length;Dt+=1){var Mt=qt.charCodeAt(Dt);if(pt===x&&Mt===`
66
+ `.charCodeAt(0))pt=z;else if(pt===x&&(pt=z),Mt==="\r".charCodeAt(0)||Mt===`
67
+ `.charCodeAt(0)){if(pt!==z){pt===K&&(Sn=Dt+1);var In=qt.slice(dn,Sn-1),Gn=qt.slice(Sn+(Sn<Dt&&qt.charCodeAt(Sn)===" ".charCodeAt(0)?1:0),Dt);In==="data"?(Pt+=`
68
+ `,Pt+=Gn):In==="id"?rt=Gn:In==="event"?tt=Gn:In==="retry"?(be=pe(Gn,be),_e=be):In==="heartbeatTimeout"&&(Oe=pe(Gn,Oe),Be!==0&&(o(Be),Be=r(function(){Fr()},Oe)))}if(pt===z){if(Pt!==""){Ne=rt,tt===""&&(tt="message");var vo=new B(tt,{data:Pt.slice(1),lastEventId:rt});if(R.dispatchEvent(vo),tt==="open"?le(R,R.onopen,vo):tt==="message"?le(R,R.onmessage,vo):tt==="error"&&le(R,R.onerror,vo),ct===j)return}Pt="",tt=""}pt=Mt==="\r".charCodeAt(0)?x:z}else pt===z&&(dn=Dt,pt=K),pt===K?Mt===":".charCodeAt(0)&&(Sn=Dt+1,pt=O):pt===O&&(pt=J)}}},gr=function(ot){if(ct===W||ct===V){ct=N,Be!==0&&(o(Be),Be=0),Be=r(function(){Fr()},_e),_e=he(Math.min(be*16,_e*2)),R.readyState=V;var ht=new D("error",{error:ot});R.dispatchEvent(ht),le(R,R.onerror,ht),ot!=null&&console.error(ot)}},Kn=function(){ct=j,ke!=null&&(ke.abort(),ke=void 0),Be!==0&&(o(Be),Be=0),R.readyState=j},Fr=function(){if(Be=0,ct!==N){if(!U&&ke!=null)gr(new Error("No activity within "+Oe+" milliseconds. "+(ct===V?"No response received.":Z+" chars received.")+" Reconnecting.")),ke!=null&&(ke.abort(),ke=void 0);else{var ot=Math.max((U||Date.now())+Oe-Date.now(),1);U=!1,Be=r(function(){Fr()},ot)}return}U=!1,Z=0,Be=r(function(){Fr()},Oe),ct=V,Pt="",tt="",rt=Ne,dt="",dn=0,Sn=0,pt=z;var ht=X;if(X.slice(0,5)!=="data:"&&X.slice(0,5)!=="blob:"&&Ne!==""){var Rt=X.indexOf("?");ht=Rt===-1?X:X.slice(0,Rt+1)+X.slice(Rt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Gn,vo){return vo===xe?"":Gn}),ht+=(X.indexOf("?")===-1?"?":"&")+xe+"="+encodeURIComponent(Ne)}var Mt=R.withCredentials,qt={};qt.Accept="text/event-stream";var Dt=R.headers;if(Dt!=null)for(var In in Dt)Object.prototype.hasOwnProperty.call(Dt,In)&&(qt[In]=Dt[In]);try{ke=Ae.open(de,Vn,Lr,gr,ht,Mt,qt)}catch(Gn){throw Kn(),Gn}};R.url=X,R.readyState=V,R.withCredentials=ee,R.headers=H,R._close=Kn,Fr()}Q.prototype=Object.create(T.prototype),Q.prototype.CONNECTING=V,Q.prototype.OPEN=W,Q.prototype.CLOSED=j,Q.prototype.close=function(){this._close()},Q.CONNECTING=V,Q.OPEN=W,Q.CLOSED=j,Q.prototype.withCredentials=void 0;var Ee=l;i!=null&&(l==null||!("withCredentials"in l.prototype))&&(Ee=Q),function(R){{var X=R(t);X!==void 0&&(e.exports=X)}}(function(R){R.EventSourcePolyfill=Q,R.NativeEventSource=l,R.EventSource=Ee})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:Xe:globalThis)})(Qd,Qd.exports);var X3=Qd.exports;const Q3=Le(X3),e4=(e,t={})=>{const n=new Q3.EventSourcePolyfill(e,{headers:t.headers}),r=new Sx;return n.onopen=o=>r.emit("open",o),n.onmessage=o=>r.emit("message",o),n.onerror=o=>r.emit("error",o),{emitter:r,source:n}},t4=async(e,t={})=>{const{emitter:n,source:r}=e4(e,t);return await new Promise((o,i)=>{n.on("open",()=>{o()}),n.on("error",a=>{i(a)})}).finally(()=>n.cleanup()),{on:n.on.bind(n),close:()=>{n.cleanup(),r.close()}}},n4=w.object({type:w.literal("message_created"),data:w.object({id:w.string().describe("Id of the [Message](#schema_message)"),createdAt:w.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:w.union([w.object({audioUrl:w.string().min(1),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("audio")}),w.object({title:w.string().min(1),subtitle:w.string().optional(),imageUrl:w.string().optional(),actions:w.array(w.object({action:w.enum(["postback","url","say"]),label:w.string().min(1),value:w.string().min(1)})),type:w.literal("card"),className:w.string().describe("CSS className to apply to the message").optional()}),w.object({items:w.array(w.object({title:w.string().min(1),subtitle:w.string().optional(),imageUrl:w.string().optional(),actions:w.array(w.object({action:w.enum(["postback","url","say"]),label:w.string().min(1),value:w.string().min(1)})),className:w.string().describe("CSS className to apply to the message").optional()})),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("carousel")}),w.object({text:w.string(),options:w.array(w.object({label:w.string().min(1),value:w.string().min(1)})),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("choice"),disableFreeText:w.boolean().optional()}),w.object({text:w.string(),options:w.array(w.object({label:w.string().min(1),value:w.string().min(1)})),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("dropdown")}),w.object({fileUrl:w.string().min(1),title:w.string().min(1).optional(),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("file")}),w.object({imageUrl:w.string().min(1),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("image")}),w.object({latitude:w.number(),longitude:w.number(),address:w.string().optional(),title:w.string().optional(),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("location")}),w.object({markdown:w.string().min(1),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("markdown")}),w.object({text:w.string().min(1),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("text")}),w.object({videoUrl:w.string().min(1),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("video")}),w.object({items:w.array(w.union([w.object({type:w.literal("text"),payload:w.object({text:w.string().min(1)})}),w.object({type:w.literal("markdown"),payload:w.object({markdown:w.string().min(1)})}),w.object({type:w.literal("image"),payload:w.object({imageUrl:w.string().min(1)})}),w.object({type:w.literal("audio"),payload:w.object({audioUrl:w.string().min(1)})}),w.object({type:w.literal("video"),payload:w.object({videoUrl:w.string().min(1)})}),w.object({type:w.literal("file"),payload:w.object({fileUrl:w.string().min(1),title:w.string().min(1).optional()})}),w.object({type:w.literal("location"),payload:w.object({latitude:w.number(),longitude:w.number(),address:w.string().optional(),title:w.string().optional()})})])),className:w.string().describe("CSS className to apply to the message").optional(),type:w.literal("bloc")})]).describe("Payload is the content type of the message."),userId:w.string().describe("ID of the [User](#schema_user)"),conversationId:w.string().describe("ID of the [Conversation](#schema_conversation)")}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),r4=w.object({type:w.literal("webchat_visibility"),data:w.object({visibility:w.union([w.literal("show"),w.literal("hide"),w.literal("toggle")])})}),o4=w.object({type:w.literal("webchat_config"),data:w.object({config:w.record(w.union([w.any(),w.null()]))})}),i4=w.object({type:w.literal("custom"),data:w.object({event:w.record(w.union([w.any(),w.null()]))})}),a4=w.object({type:w.literal("typing_started"),data:w.object({timeout:w.number().optional()})}),s4=w.object({type:w.literal("typing_stopped"),data:w.record(w.never())}),l4={messageCreated:n4,webchatVisibility:r4,webchatConfig:o4,custom:i4,typingStarted:a4,typingStopped:s4},Ex="unknown error",Iu=class Iu extends Sx{constructor(n){super();we(this,"_state",{status:"disconnected"});we(this,"connect",async()=>{if(this._state.status==="connected")return;if(this._state.status==="connecting"){await this._state.connectionPromise;return}const n=this._connect();this._state={status:"connecting",connectionPromise:n},await n});we(this,"disconnect",async()=>{if(this._state.status==="disconnected")return;let n;this._state.status==="connecting"?n=await this._state.connectionPromise:n=this._state.source,this._disconnectSync(n)});we(this,"_connect",async()=>{const n=await t4(`${this._props.url}/conversations/${this._props.conversationId}/listen`,{headers:{"x-user-key":this._props.userKey}});return n.on("message",this._handleMessage),n.on("error",this._handleError(n)),this._state={status:"connected",source:n},n});we(this,"_disconnectSync",n=>{n.close(),this._state={status:"disconnected"}});we(this,"_handleMessage",n=>{const r=this._parseSignal(n.data);this.emit(r.type,r.data)});we(this,"_handleError",n=>r=>{this._disconnectSync(n);const o=this._toError(r);this.emit("error",o)});we(this,"_parseSignal",n=>{for(const r of Object.values(l4)){const o=this._safeJsonParse(n),i=r.safeParse(o);if(i.success)return i.data}return{type:"unknown",data:n}});we(this,"_safeJsonParse",n=>{try{return JSON.parse(n)}catch{return n}});we(this,"_toError",n=>{if(n instanceof Error)return n;if(typeof n=="string")return new Error(n);if(n===null)return new Error(Ex);if(typeof n=="object"&&"message"in n)return this._toError(n.message);try{const r=JSON.stringify(n);return new Error(r)}catch{return new Error(Ex)}});this._props=n}get status(){return this._state.status}};we(Iu,"listen",async n=>{const r=new Iu(n);return await r.connect(),r});let ep=Iu;const $x=100*1024*1024,c4=$x,u4=$x,f4=6e4;class d4{constructor(t){we(this,"_auto");we(this,"createConversation",t=>this._auto.createConversation(t));we(this,"getConversation",t=>this._auto.getConversation(t));we(this,"deleteConversation",t=>this._auto.deleteConversation(t));we(this,"listConversations",t=>this._auto.listConversations(t));we(this,"listConversationMessages",t=>this._auto.listConversationMessages(t));we(this,"addParticipant",t=>this._auto.addParticipant(t));we(this,"removeParticipant",t=>this._auto.removeParticipant(t));we(this,"getParticipant",t=>this._auto.getParticipant(t));we(this,"listParticipants",t=>this._auto.listParticipants(t));we(this,"createMessage",t=>this._auto.createMessage(t));we(this,"getMessage",t=>this._auto.getMessage(t));we(this,"deleteMessage",t=>this._auto.deleteMessage(t));we(this,"createFile",t=>this._auto.createFile(t));we(this,"createUser",t=>this._auto.createUser(t));we(this,"getUser",t=>this._auto.getUser(t));we(this,"updateUser",t=>this._auto.updateUser(t));we(this,"deleteUser",t=>this._auto.deleteUser(t));we(this,"createEvent",t=>this._auto.createEvent(t));we(this,"getEvent",t=>this._auto.getEvent(t));we(this,"listenConversation",async({id:t,"x-user-key":n})=>await ep.listen({url:this.props.apiUrl,conversationId:t,userKey:n}));this.props=t;const{apiUrl:n}=t,r={...t.headers},o=t.timeout??f4,i=Pw.create({baseURL:n,headers:r,withCredentials:!0,timeout:o,maxBodyLength:c4,maxContentLength:u4});this._auto=new J3(i)}}const El={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},sn=(e,t)=>e.status===t,ir=(e,t)=>El[e.status]<El[t],Ox=(e,t)=>El[e.status]>=El[t];class ar extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const kx=["audio","file","image","video"],_x=e=>kx.includes(e);class p4 extends Lg{constructor(n){super();we(this,"_client");we(this,"_webhookId");we(this,"_apiUrl");we(this,"_state",{status:"disconnected"});we(this,"mode","pushpin");we(this,"_initialConnect",async({data:n,name:r,pictureUrl:o})=>{if(Ox(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(sn(this._state,"user_creating"))return;this._state={status:"user_creating"};const{user:{id:i},key:a}=await this._client.createUser({name:r,pictureUrl:o,userData:n});return this._state={status:"user_created",userId:i,userKey:a},{userId:i,userToken:a}});we(this,"_reConnect",async(n,{data:r,name:o,pictureUrl:i})=>{if(Ox(this._state,"user_created")){if(this._state.userId!==n.userId)throw new Error("Client is already connected. Please disconnect first.");return n}return sn(this._state,"user_creating")||(this._state={status:"user_created",userId:n.userId,userKey:n.userToken},await this._client.updateUser({"x-user-key":n.userToken,name:o,pictureUrl:i,userData:r})),n});we(this,"_mapMessage",n=>{const{payload:r,disableInput:o}=ra(n.payload);return{id:n.id,conversationId:n.conversationId,authorId:n.userId,sentOn:new Date(n.createdAt),payload:r,disableInput:o}});const r=`${n.apiUrl}/${n.clientId}`;this._webhookId=n.clientId,this._apiUrl=r,this._client=new d4({apiUrl:r})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!ir(this._state,"user_created"))return this._state.userId}async getUser(){if(ir(this._state,"user_created"))throw new ar(this._state);const{user:n}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:n.data}}async updateUser(n){if(ir(this._state,"user_created"))throw new ar(this._state);const{user:r}=await this._client.updateUser({"x-user-key":this._state.userKey,name:n.name,pictureUrl:n.pictureUrl,userData:n.data});return r}get conversationId(){if(!ir(this._state,"conversation_created"))return this._state.conversationId}async connect(n,r,o={}){const i={data:r,...o};return n?await this.userExists(n)?this._reConnect(n,i):this._initialConnect(i):this._initialConnect(i)}async disconnect(){sn(this._state,"conversation_created")?this._state.signalEmitter.cleanup():sn(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(n){if(ir(this._state,"user_created"))throw new ar(this._state);if(sn(this._state,"conversation_creating"))throw new ar(this._state);let r;sn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state));const{size:o,name:i}=n,s=await(h=>new Promise((m,y)=>{const v=new FileReader;v.onload=g=>{var b;return m((b=g.target)==null?void 0:b.result)},v.onerror=g=>{var b;return y((b=g.target)==null?void 0:b.error)},v.readAsArrayBuffer(h)}))(n),{file:{uploadUrl:l,contentType:c,url:u}}=await this._client.createFile({"x-user-key":r.userKey,size:o,key:i,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"}});await fetch(l,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:s});const f=c.split("/").shift()??"",p=_x(f)?f:"file",d=p==="image"?{type:p,imageUrl:u}:p==="audio"?{type:p,audioUrl:u}:p==="video"?{type:p,videoUrl:u}:{type:p,fileUrl:u};return await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:d}),this.emit("messageSent",d),{fileUrl:u,name:i,type:p}}async sendMessage(n){if(ir(this._state,"user_created"))throw new ar(this._state);if(sn(this._state,"conversation_creating"))throw new ar(this._state);let r;sn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:n}),this.emit("messageSent",n)}async sendEvent(n){if(ir(this._state,"user_created"))throw new ar(this._state);if(sn(this._state,"conversation_creating"))throw new ar(this._state);let r;sn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createEvent({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"custom",data:n}})}async switchConversation(n){if(ir(this._state,"user_created"))throw new ar(this._state);sn(this._state,"conversation_created")&&this._state.conversationId===n||sn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._connectConversation(this._state,n))}async conversationExists(n){if(ir(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:n}),!0}catch(r){if(Sd(r)&&r.code===404)return!1;throw r}}async userExists({userToken:n}){try{return await this._client.getUser({"x-user-key":n}),!0}catch(r){const o=i=>i.code===404||i.code===401;if(Sd(r)&&o(r))return!1;throw r}}async newConversation(){if(ir(this._state,"user_created"))throw new ar(this._state);sn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._createNewConversation(this._state))}async _createNewConversation(n){const{conversation:{id:r}}=await this._client.createConversation({"x-user-key":n.userKey}),o=await this._connectConversation(n,r);return await this._client.createEvent({"x-user-key":n.userKey,conversationId:r,payload:{type:"conversation_started",data:{}}}),o}async listMessages(){if(!sn(this._state,"conversation_created"))return[];const{conversationId:n,userKey:r}=this._state,o=[];let i;do{const a=await this._client.listConversationMessages({id:n,"x-user-key":r,nextToken:i});o.push(...a.messages),i=a.meta.nextToken}while(i);return o.map(this._mapMessage)}async _connectConversation(n,r){const o=await this._client.listenConversation({id:r,"x-user-key":n.userKey});return o.on("unknown",i=>{typeof i=="string"&&i==="ping"||console.debug("unknown event",i)}),o.on("message_created",i=>{i.userId!==n.userId&&this.emit("message",this._mapMessage(i))}),o.on("error",()=>{this._state={status:"user_created",userId:n.userId,userKey:n.userKey},this.emit("error",new Error("Connection to conversation lost"))}),o.on("webchat_visibility",i=>{this.emit("webchatVisibility",i.visibility)}),o.on("webchat_config",i=>{this.emit("webchatConfig",i.config)}),o.on("typing_started",i=>{this.emit("isTyping",{isTyping:!0,timeout:i.timeout??5e3})}),o.on("typing_stopped",()=>{this.emit("isTyping",{isTyping:!1,timeout:0})}),o.on("custom",i=>{this.emit("customEvent",i.event)}),this.emit("conversation",r),this._state={status:"conversation_created",userId:n.userId,userKey:n.userKey,conversationId:r,signalEmitter:o},this._state}}const Tx=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>new p4({apiUrl:t,clientId:e}),h4=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>{const[n]=E.useState(Tx({clientId:e,apiUrl:t}));return n},m4=(e,t={})=>new Promise((n,r)=>{if(typeof window>"u")return r("Window is not defined");if(!e)return r("Url is not defined");let o=null;const i=new Image;i.addEventListener("load",()=>{o&&clearTimeout(o),n({width:i.naturalWidth,height:i.naturalHeight})}),i.addEventListener("error",a=>{o&&clearTimeout(o),r(`${a.type}: ${a.message}`)}),i.src=e,t.timeout&&(o=setTimeout(()=>r("Timeout"),t.timeout))});let v4={data:""},y4=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||v4,g4=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,b4=/\/\*[^]*?\*\/| +/g,Cx=/\n+/g,Qr=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];i[0]=="@"?i[1]=="i"?n=i+" "+a+";":r+=i[1]=="f"?Qr(a,i):i+"{"+Qr(a,i[1]=="k"?"":t)+"}":typeof a=="object"?r+=Qr(a,t?t.replace(/([^,])+/g,s=>i.replace(/(^:.*)|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,s):s?s+" "+l:l)):i):a!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=Qr.p?Qr.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},Or={},Ix=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Ix(e[n]);return t}return e},w4=(e,t,n,r,o)=>{let i=Ix(e),a=Or[i]||(Or[i]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(i));if(!Or[a]){let l=i!==e?e:(c=>{let u,f,p=[{}];for(;u=g4.exec(c.replace(b4,""));)u[4]?p.shift():u[3]?(f=u[3].replace(Cx," ").trim(),p.unshift(p[0][f]=p[0][f]||{})):p[0][u[1]]=u[2].replace(Cx," ").trim();return p[0]})(e);Or[a]=Qr(o?{["@keyframes "+a]:l}:l,n?"":"."+a)}let s=n&&Or.g?Or.g:null;return n&&(Or.g=Or[a]),((l,c,u,f)=>{f?c.data=c.data.replace(f,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(Or[a],t,r,s),a},x4=(e,t,n)=>e.reduce((r,o,i)=>{let a=t[i];if(a&&a.call){let s=a(n),l=s&&s.props&&s.props.className||/^go/.test(s)&&s;a=l?"."+l:s&&typeof s=="object"?s.props?"":Qr(s,""):s===!1?"":s}return r+o+(a??"")},"");function $l(e){let t=this||{},n=e.call?e(t.p):e;return w4(n.unshift?n.raw?x4(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,y4(t.target),t.g,t.o,t.k)}let Ax,tp,np;$l.bind({g:1});let kr=$l.bind({k:1});function S4(e,t,n,r){Qr.p=t,Ax=e,tp=n,np=r}function eo(e,t){let n=this||{};return function(){let r=arguments;function o(i,a){let s=Object.assign({},i),l=s.className||o.className;n.p=Object.assign({theme:tp&&tp()},s),n.o=/ *go\d+/.test(l),s.className=$l.apply(n,r)+(l?" "+l:""),t&&(s.ref=a);let c=e;return e[0]&&(c=s.as||e,delete s.as),np&&c[0]&&np(s),Ax(c,s)}return t?t(o):o}}var E4=e=>typeof e=="function",Ol=(e,t)=>E4(e)?e(t):e,$4=(()=>{let e=0;return()=>(++e).toString()})(),Px=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),O4=20,kl=new Map,k4=1e3,Rx=e=>{if(kl.has(e))return;let t=setTimeout(()=>{kl.delete(e),Ao({type:4,toastId:e})},k4);kl.set(e,t)},_4=e=>{let t=kl.get(e);t&&clearTimeout(t)},rp=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,O4)};case 1:return t.toast.id&&_4(t.toast.id),{...e,toasts:e.toasts.map(i=>i.id===t.toast.id?{...i,...t.toast}:i)};case 2:let{toast:n}=t;return e.toasts.find(i=>i.id===n.id)?rp(e,{type:1,toast:n}):rp(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?Rx(r):e.toasts.forEach(i=>{Rx(i.id)}),{...e,toasts:e.toasts.map(i=>i.id===r||r===void 0?{...i,visible:!1}:i)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(i=>i.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(i=>({...i,pauseDuration:i.pauseDuration+o}))}}},_l=[],Tl={toasts:[],pausedAt:void 0},Ao=e=>{Tl=rp(Tl,e),_l.forEach(t=>{t(Tl)})},T4={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},C4=(e={})=>{let[t,n]=E.useState(Tl);E.useEffect(()=>(_l.push(n),()=>{let o=_l.indexOf(n);o>-1&&_l.splice(o,1)}),[t]);let r=t.toasts.map(o=>{var i,a;return{...e,...e[o.type],...o,duration:o.duration||((i=e[o.type])==null?void 0:i.duration)||(e==null?void 0:e.duration)||T4[o.type],style:{...e.style,...(a=e[o.type])==null?void 0:a.style,...o.style}}});return{...t,toasts:r}},I4=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||$4()}),ka=e=>(t,n)=>{let r=I4(t,e,n);return Ao({type:2,toast:r}),r.id},Tn=(e,t)=>ka("blank")(e,t);Tn.error=ka("error"),Tn.success=ka("success"),Tn.loading=ka("loading"),Tn.custom=ka("custom"),Tn.dismiss=e=>{Ao({type:3,toastId:e})},Tn.remove=e=>Ao({type:4,toastId:e}),Tn.promise=(e,t,n)=>{let r=Tn.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(o=>(Tn.success(Ol(t.success,o),{id:r,...n,...n==null?void 0:n.success}),o)).catch(o=>{Tn.error(Ol(t.error,o),{id:r,...n,...n==null?void 0:n.error})}),e};var A4=(e,t)=>{Ao({type:1,toast:{id:e,height:t}})},P4=()=>{Ao({type:5,time:Date.now()})},R4=e=>{let{toasts:t,pausedAt:n}=C4(e);E.useEffect(()=>{if(n)return;let i=Date.now(),a=t.map(s=>{if(s.duration===1/0)return;let l=(s.duration||0)+s.pauseDuration-(i-s.createdAt);if(l<0){s.visible&&Tn.dismiss(s.id);return}return setTimeout(()=>Tn.dismiss(s.id),l)});return()=>{a.forEach(s=>s&&clearTimeout(s))}},[t,n]);let r=E.useCallback(()=>{n&&Ao({type:6,time:Date.now()})},[n]),o=E.useCallback((i,a)=>{let{reverseOrder:s=!1,gutter:l=8,defaultPosition:c}=a||{},u=t.filter(d=>(d.position||c)===(i.position||c)&&d.height),f=u.findIndex(d=>d.id===i.id),p=u.filter((d,h)=>h<f&&d.visible).length;return u.filter(d=>d.visible).slice(...s?[p+1]:[0,p]).reduce((d,h)=>d+(h.height||0)+l,0)},[t]);return{toasts:t,handlers:{updateHeight:A4,startPause:P4,endPause:r,calculateOffset:o}}},M4=kr`
69
69
  from {
70
70
  transform: scale(0) rotate(45deg);
71
71
  opacity: 0;
@@ -73,7 +73,7 @@ from {
73
73
  to {
74
74
  transform: scale(1) rotate(45deg);
75
75
  opacity: 1;
76
- }`,HB=jr`
76
+ }`,D4=kr`
77
77
  from {
78
78
  transform: scale(0);
79
79
  opacity: 0;
@@ -81,7 +81,7 @@ from {
81
81
  to {
82
82
  transform: scale(1);
83
83
  opacity: 1;
84
- }`,VB=jr`
84
+ }`,j4=kr`
85
85
  from {
86
86
  transform: scale(0) rotate(90deg);
87
87
  opacity: 0;
@@ -89,7 +89,7 @@ from {
89
89
  to {
90
90
  transform: scale(1) rotate(90deg);
91
91
  opacity: 1;
92
- }`,WB=ho("div")`
92
+ }`,N4=eo("div")`
93
93
  width: 20px;
94
94
  opacity: 0;
95
95
  height: 20px;
@@ -98,14 +98,14 @@ to {
98
98
  position: relative;
99
99
  transform: rotate(45deg);
100
100
 
101
- animation: ${qB} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
101
+ animation: ${M4} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
102
102
  forwards;
103
103
  animation-delay: 100ms;
104
104
 
105
105
  &:after,
106
106
  &:before {
107
107
  content: '';
108
- animation: ${HB} 0.15s ease-out forwards;
108
+ animation: ${D4} 0.15s ease-out forwards;
109
109
  animation-delay: 150ms;
110
110
  position: absolute;
111
111
  border-radius: 3px;
@@ -118,18 +118,18 @@ to {
118
118
  }
119
119
 
120
120
  &:before {
121
- animation: ${VB} 0.15s ease-out forwards;
121
+ animation: ${j4} 0.15s ease-out forwards;
122
122
  animation-delay: 180ms;
123
123
  transform: rotate(90deg);
124
124
  }
125
- `,KB=jr`
125
+ `,L4=kr`
126
126
  from {
127
127
  transform: rotate(0deg);
128
128
  }
129
129
  to {
130
130
  transform: rotate(360deg);
131
131
  }
132
- `,GB=ho("div")`
132
+ `,F4=eo("div")`
133
133
  width: 12px;
134
134
  height: 12px;
135
135
  box-sizing: border-box;
@@ -137,8 +137,8 @@ to {
137
137
  border-radius: 100%;
138
138
  border-color: ${e=>e.secondary||"#e0e0e0"};
139
139
  border-right-color: ${e=>e.primary||"#616161"};
140
- animation: ${KB} 1s linear infinite;
141
- `,ZB=jr`
140
+ animation: ${L4} 1s linear infinite;
141
+ `,B4=kr`
142
142
  from {
143
143
  transform: scale(0) rotate(45deg);
144
144
  opacity: 0;
@@ -146,7 +146,7 @@ from {
146
146
  to {
147
147
  transform: scale(1) rotate(45deg);
148
148
  opacity: 1;
149
- }`,YB=jr`
149
+ }`,U4=kr`
150
150
  0% {
151
151
  height: 0;
152
152
  width: 0;
@@ -160,7 +160,7 @@ to {
160
160
  100% {
161
161
  opacity: 1;
162
162
  height: 10px;
163
- }`,JB=ho("div")`
163
+ }`,z4=eo("div")`
164
164
  width: 20px;
165
165
  opacity: 0;
166
166
  height: 20px;
@@ -169,13 +169,13 @@ to {
169
169
  position: relative;
170
170
  transform: rotate(45deg);
171
171
 
172
- animation: ${ZB} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
172
+ animation: ${B4} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
173
173
  forwards;
174
174
  animation-delay: 100ms;
175
175
  &:after {
176
176
  content: '';
177
177
  box-sizing: border-box;
178
- animation: ${YB} 0.2s ease-out forwards;
178
+ animation: ${U4} 0.2s ease-out forwards;
179
179
  opacity: 0;
180
180
  animation-delay: 200ms;
181
181
  position: absolute;
@@ -187,16 +187,16 @@ to {
187
187
  height: 10px;
188
188
  width: 6px;
189
189
  }
190
- `,XB=ho("div")`
190
+ `,H4=eo("div")`
191
191
  position: absolute;
192
- `,QB=ho("div")`
192
+ `,q4=eo("div")`
193
193
  position: relative;
194
194
  display: flex;
195
195
  justify-content: center;
196
196
  align-items: center;
197
197
  min-width: 20px;
198
198
  min-height: 20px;
199
- `,e6=jr`
199
+ `,W4=kr`
200
200
  from {
201
201
  transform: scale(0.6);
202
202
  opacity: 0.4;
@@ -204,20 +204,20 @@ from {
204
204
  to {
205
205
  transform: scale(1);
206
206
  opacity: 1;
207
- }`,t6=ho("div")`
207
+ }`,V4=eo("div")`
208
208
  position: relative;
209
209
  transform: scale(0.6);
210
210
  opacity: 0.4;
211
211
  min-width: 20px;
212
- animation: ${e6} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
212
+ animation: ${W4} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
213
213
  forwards;
214
- `,n6=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?C.createElement(t6,null,t):t:n==="blank"?null:C.createElement(QB,null,C.createElement(GB,{...r}),n!=="loading"&&C.createElement(XB,null,n==="error"?C.createElement(WB,{...r}):C.createElement(JB,{...r})))},r6=e=>`
214
+ `,K4=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?_.createElement(V4,null,t):t:n==="blank"?null:_.createElement(q4,null,_.createElement(F4,{...r}),n!=="loading"&&_.createElement(H4,null,n==="error"?_.createElement(N4,{...r}):_.createElement(z4,{...r})))},G4=e=>`
215
215
  0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
216
216
  100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
217
- `,o6=e=>`
217
+ `,Z4=e=>`
218
218
  0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
219
219
  100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
220
- `,i6="0%{opacity:0;} 100%{opacity:1;}",a6="0%{opacity:1;} 100%{opacity:0;}",s6=ho("div")`
220
+ `,Y4="0%{opacity:0;} 100%{opacity:1;}",J4="0%{opacity:1;} 100%{opacity:0;}",X4=eo("div")`
221
221
  display: flex;
222
222
  align-items: center;
223
223
  background: #fff;
@@ -229,19 +229,19 @@ to {
229
229
  pointer-events: auto;
230
230
  padding: 8px 10px;
231
231
  border-radius: 8px;
232
- `,c6=ho("div")`
232
+ `,Q4=eo("div")`
233
233
  display: flex;
234
234
  justify-content: center;
235
235
  margin: 4px 10px;
236
236
  color: inherit;
237
237
  flex: 1 1 auto;
238
238
  white-space: pre-line;
239
- `,l6=(e,t)=>{let n=e.includes("top")?1:-1,[r,o]=mx()?[i6,a6]:[r6(n),o6(n)];return{animation:t?`${jr(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${jr(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},u6=C.memo(({toast:e,position:t,style:n,children:r})=>{let o=e.height?l6(e.position||t||"top-center",e.visible):{opacity:0},i=C.createElement(n6,{toast:e}),a=C.createElement(c6,{...e.ariaProps},vl(e.message,e));return C.createElement(s6,{className:e.className,style:{...o,...n,...e.style}},typeof r=="function"?r({icon:i,message:a}):C.createElement(C.Fragment,null,i,a))});PB(C.createElement);var f6=({id:e,className:t,style:n,onHeightUpdate:r,children:o})=>{let i=C.useCallback(a=>{if(a){let s=()=>{let c=a.getBoundingClientRect().height;r(e,c)};s(),new MutationObserver(s).observe(a,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return C.createElement("div",{ref:i,className:t,style:n},o)},d6=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:mx()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...o}},p6=yl`
239
+ `,eB=(e,t)=>{let n=e.includes("top")?1:-1,[r,o]=Px()?[Y4,J4]:[G4(n),Z4(n)];return{animation:t?`${kr(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${kr(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},tB=_.memo(({toast:e,position:t,style:n,children:r})=>{let o=e.height?eB(e.position||t||"top-center",e.visible):{opacity:0},i=_.createElement(K4,{toast:e}),a=_.createElement(Q4,{...e.ariaProps},Ol(e.message,e));return _.createElement(X4,{className:e.className,style:{...o,...n,...e.style}},typeof r=="function"?r({icon:i,message:a}):_.createElement(_.Fragment,null,i,a))});S4(_.createElement);var nB=({id:e,className:t,style:n,onHeightUpdate:r,children:o})=>{let i=_.useCallback(a=>{if(a){let s=()=>{let l=a.getBoundingClientRect().height;r(e,l)};s(),new MutationObserver(s).observe(a,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return _.createElement("div",{ref:i,className:t,style:n},o)},rB=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Px()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...o}},oB=$l`
240
240
  z-index: 9999;
241
241
  > * {
242
242
  pointer-events: auto;
243
243
  }
244
- `,xl=16,h6=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,containerStyle:i,containerClassName:a})=>{let{toasts:s,handlers:c}=zB(n);return C.createElement("div",{style:{position:"fixed",zIndex:9999,top:xl,left:xl,right:xl,bottom:xl,pointerEvents:"none",...i},className:a,onMouseEnter:c.startPause,onMouseLeave:c.endPause},s.map(l=>{let u=l.position||t,f=c.calculateOffset(l,{reverseOrder:e,gutter:r,defaultPosition:t}),p=d6(u,f);return C.createElement(f6,{id:l.id,key:l.id,onHeightUpdate:c.updateHeight,className:l.visible?p6:"",style:p},l.type==="custom"?vl(l.message,l):o?o(l):C.createElement(u6,{toast:l,position:u}))}))},Sl=function(){return Sl=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Sl.apply(this,arguments)};typeof SuppressedError=="function"&&SuppressedError;function m6(){var e=E.useRef(!1),t=E.useCallback(function(){return e.current},[]);return E.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function y6(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=E.useRef(0),o=m6(),i=E.useState(n),a=i[0],s=i[1],c=E.useCallback(function(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];var f=++r.current;return a.loading||s(function(p){return Sl(Sl({},p),{loading:!0})}),e.apply(void 0,l).then(function(p){return o()&&f===r.current&&s({value:p,loading:!1}),p},function(p){return o()&&f===r.current&&s({error:p,loading:!1}),p})},t);return[a,c]}function vx(e,t){t===void 0&&(t=[]);var n=y6(e,t,{loading:!0}),r=n[0],o=n[1];return E.useEffect(function(){o()},[o]),r}function v6(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function g6(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var b6=function(e){E.useEffect(e,[])};const w6=b6;var x6=function(e){var t=E.useRef(e);t.current=e,w6(function(){return function(){return t.current()}})};const S6=x6;var E6=function(e){var t=E.useRef(0),n=E.useState(e),r=n[0],o=n[1],i=E.useCallback(function(a){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(a)})},[]);return S6(function(){cancelAnimationFrame(t.current)}),[r,i]};const _6=E6;var $6=function(e){process.env.NODE_ENV==="development"&&(typeof e!="object"||typeof e.current>"u")&&console.error("`useScroll` expects a single ref argument.");var t=_6({x:0,y:0}),n=t[0],r=t[1];return E.useEffect(function(){var o=function(){e.current&&r({x:e.current.scrollLeft,y:e.current.scrollTop})};return e.current&&v6(e.current,"scroll",o,{capture:!1,passive:!0}),function(){e.current&&g6(e.current,"scroll",o)}},[e]),n};const k6=$6,gx=e=>{let t;const n=new Set,r=(c,l)=>{const u=typeof c=="function"?c(t):c;if(!Object.is(u,t)){const f=t;t=l??typeof u!="object"?u:Object.assign({},t,u),n.forEach(p=>p(t,f))}},o=()=>t,s={setState:r,getState:o,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{n.clear()}};return t=e(r,o,s),s},bx=e=>e?gx(e):gx;var Ip={exports:{}},Rp={},El={exports:{}},Mp={};/**
244
+ `,Cl=16,iB=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,containerStyle:i,containerClassName:a})=>{let{toasts:s,handlers:l}=R4(n);return _.createElement("div",{style:{position:"fixed",zIndex:9999,top:Cl,left:Cl,right:Cl,bottom:Cl,pointerEvents:"none",...i},className:a,onMouseEnter:l.startPause,onMouseLeave:l.endPause},s.map(c=>{let u=c.position||t,f=l.calculateOffset(c,{reverseOrder:e,gutter:r,defaultPosition:t}),p=rB(u,f);return _.createElement(nB,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?oB:"",style:p},c.type==="custom"?Ol(c.message,c):o?o(c):_.createElement(tB,{toast:c,position:u}))}))},Il=function(){return Il=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Il.apply(this,arguments)};typeof SuppressedError=="function"&&SuppressedError;function aB(){var e=E.useRef(!1),t=E.useCallback(function(){return e.current},[]);return E.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function sB(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=E.useRef(0),o=aB(),i=E.useState(n),a=i[0],s=i[1],l=E.useCallback(function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];var f=++r.current;return a.loading||s(function(p){return Il(Il({},p),{loading:!0})}),e.apply(void 0,c).then(function(p){return o()&&f===r.current&&s({value:p,loading:!1}),p},function(p){return o()&&f===r.current&&s({error:p,loading:!1}),p})},t);return[a,l]}function Mx(e,t){t===void 0&&(t=[]);var n=sB(e,t,{loading:!0}),r=n[0],o=n[1];return E.useEffect(function(){o()},[o]),r}function lB(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function cB(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var uB=function(e){E.useEffect(e,[])};const fB=uB;var dB=function(e){var t=E.useRef(e);t.current=e,fB(function(){return function(){return t.current()}})};const pB=dB;var hB=function(e){var t=E.useRef(0),n=E.useState(e),r=n[0],o=n[1],i=E.useCallback(function(a){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(a)})},[]);return pB(function(){cancelAnimationFrame(t.current)}),[r,i]};const mB=hB;var vB=function(e){process.env.NODE_ENV==="development"&&(typeof e!="object"||typeof e.current>"u")&&console.error("`useScroll` expects a single ref argument.");var t=mB({x:0,y:0}),n=t[0],r=t[1];return E.useEffect(function(){var o=function(){e.current&&r({x:e.current.scrollLeft,y:e.current.scrollTop})};return e.current&&lB(e.current,"scroll",o,{capture:!1,passive:!0}),function(){e.current&&cB(e.current,"scroll",o)}},[e]),n};const yB=vB,Dx=e=>{let t;const n=new Set,r=(l,c)=>{const u=typeof l=="function"?l(t):l;if(!Object.is(u,t)){const f=t;t=c??typeof u!="object"?u:Object.assign({},t,u),n.forEach(p=>p(t,f))}},o=()=>t,s={setState:r,getState:o,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{n.clear()}};return t=e(r,o,s),s},jx=e=>e?Dx(e):Dx;var op={exports:{}},ip={},Al={exports:{}},ap={};/**
245
245
  * @license React
246
246
  * use-sync-external-store-shim.production.min.js
247
247
  *
@@ -249,7 +249,7 @@ to {
249
249
  *
250
250
  * This source code is licensed under the MIT license found in the
251
251
  * LICENSE file in the root directory of this source tree.
252
- */var wx;function C6(){if(wx)return Mp;wx=1;var e=E;function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(f,p){var d=p(),h=r({inst:{value:d,getSnapshot:p}}),m=h[0].inst,v=h[1];return i(function(){m.value=d,m.getSnapshot=p,c(m)&&v({inst:m})},[f,d,p]),o(function(){return c(m)&&v({inst:m}),f(function(){c(m)&&v({inst:m})})},[f]),a(d),d}function c(f){var p=f.getSnapshot;f=f.value;try{var d=p();return!n(f,d)}catch{return!0}}function l(f,p){return p()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:s;return Mp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Mp}var Np={};/**
252
+ */var Nx;function gB(){if(Nx)return ap;Nx=1;var e=E;function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(f,p){var d=p(),h=r({inst:{value:d,getSnapshot:p}}),m=h[0].inst,y=h[1];return i(function(){m.value=d,m.getSnapshot=p,l(m)&&y({inst:m})},[f,d,p]),o(function(){return l(m)&&y({inst:m}),f(function(){l(m)&&y({inst:m})})},[f]),a(d),d}function l(f){var p=f.getSnapshot;f=f.value;try{var d=p();return!n(f,d)}catch{return!0}}function c(f,p){return p()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return ap.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,ap}var sp={};/**
253
253
  * @license React
254
254
  * use-sync-external-store-shim.development.js
255
255
  *
@@ -257,7 +257,7 @@ to {
257
257
  *
258
258
  * This source code is licensed under the MIT license found in the
259
259
  * LICENSE file in the root directory of this source tree.
260
- */var xx;function O6(){return xx||(xx=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=E,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(b){{for(var k=arguments.length,S=new Array(k>1?k-1:0),$=1;$<k;$++)S[$-1]=arguments[$];r("error",b,S)}}function r(b,k,S){{var $=t.ReactDebugCurrentFrame,T=$.getStackAddendum();T!==""&&(k+="%s",S=S.concat([T]));var R=S.map(function(B){return String(B)});R.unshift("Warning: "+k),Function.prototype.apply.call(console[b],console,R)}}function o(b,k){return b===k&&(b!==0||1/b===1/k)||b!==b&&k!==k}var i=typeof Object.is=="function"?Object.is:o,a=e.useState,s=e.useEffect,c=e.useLayoutEffect,l=e.useDebugValue,u=!1,f=!1;function p(b,k,S){u||e.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var $=k();if(!f){var T=k();i($,T)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var R=a({inst:{value:$,getSnapshot:k}}),B=R[0].inst,O=R[1];return c(function(){B.value=$,B.getSnapshot=k,d(B)&&O({inst:B})},[b,$,k]),s(function(){d(B)&&O({inst:B});var M=function(){d(B)&&O({inst:B})};return b(M)},[b]),l($),$}function d(b){var k=b.getSnapshot,S=b.value;try{var $=k();return!i(S,$)}catch{return!0}}function h(b,k,S){return k()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",v=!m,y=v?h:p,g=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y;Np.useSyncExternalStore=g,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Np}var Sx;function Ex(){return Sx||(Sx=1,process.env.NODE_ENV==="production"?El.exports=C6():El.exports=O6()),El.exports}/**
260
+ */var Lx;function bB(){return Lx||(Lx=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=E,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(b){{for(var k=arguments.length,S=new Array(k>1?k-1:0),$=1;$<k;$++)S[$-1]=arguments[$];r("error",b,S)}}function r(b,k,S){{var $=t.ReactDebugCurrentFrame,C=$.getStackAddendum();C!==""&&(k+="%s",S=S.concat([C]));var P=S.map(function(F){return String(F)});P.unshift("Warning: "+k),Function.prototype.apply.call(console[b],console,P)}}function o(b,k){return b===k&&(b!==0||1/b===1/k)||b!==b&&k!==k}var i=typeof Object.is=="function"?Object.is:o,a=e.useState,s=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,f=!1;function p(b,k,S){u||e.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var $=k();if(!f){var C=k();i($,C)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var P=a({inst:{value:$,getSnapshot:k}}),F=P[0].inst,T=P[1];return l(function(){F.value=$,F.getSnapshot=k,d(F)&&T({inst:F})},[b,$,k]),s(function(){d(F)&&T({inst:F});var M=function(){d(F)&&T({inst:F})};return b(M)},[b]),c($),$}function d(b){var k=b.getSnapshot,S=b.value;try{var $=k();return!i(S,$)}catch{return!0}}function h(b,k,S){return k()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!m,v=y?h:p,g=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v;sp.useSyncExternalStore=g,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),sp}var Fx;function Bx(){return Fx||(Fx=1,process.env.NODE_ENV==="production"?Al.exports=gB():Al.exports=bB()),Al.exports}/**
261
261
  * @license React
262
262
  * use-sync-external-store-shim/with-selector.production.min.js
263
263
  *
@@ -265,7 +265,7 @@ to {
265
265
  *
266
266
  * This source code is licensed under the MIT license found in the
267
267
  * LICENSE file in the root directory of this source tree.
268
- */var _x;function T6(){if(_x)return Rp;_x=1;var e=E,t=Ex();function n(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,c=e.useDebugValue;return Rp.useSyncExternalStoreWithSelector=function(l,u,f,p,d){var h=i(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=s(function(){function y($){if(!g){if(g=!0,b=$,$=p($),d!==void 0&&m.hasValue){var T=m.value;if(d(T,$))return k=T}return k=$}if(T=k,r(b,$))return T;var R=p($);return d!==void 0&&d(T,R)?T:(b=$,k=R)}var g=!1,b,k,S=f===void 0?null:f;return[function(){return y(u())},S===null?void 0:function(){return y(S())}]},[u,f,p,d]);var v=o(l,h[0],h[1]);return a(function(){m.hasValue=!0,m.value=v},[v]),c(v),v},Rp}var Dp={};/**
268
+ */var Ux;function wB(){if(Ux)return ip;Ux=1;var e=E,t=Bx();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return ip.useSyncExternalStoreWithSelector=function(c,u,f,p,d){var h=i(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=s(function(){function v($){if(!g){if(g=!0,b=$,$=p($),d!==void 0&&m.hasValue){var C=m.value;if(d(C,$))return k=C}return k=$}if(C=k,r(b,$))return C;var P=p($);return d!==void 0&&d(C,P)?C:(b=$,k=P)}var g=!1,b,k,S=f===void 0?null:f;return[function(){return v(u())},S===null?void 0:function(){return v(S())}]},[u,f,p,d]);var y=o(c,h[0],h[1]);return a(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},ip}var lp={};/**
269
269
  * @license React
270
270
  * use-sync-external-store-shim/with-selector.development.js
271
271
  *
@@ -273,16 +273,16 @@ to {
273
273
  *
274
274
  * This source code is licensed under the MIT license found in the
275
275
  * LICENSE file in the root directory of this source tree.
276
- */var $x;function A6(){return $x||($x=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=E,t=Ex();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,c=e.useDebugValue;function l(u,f,p,d,h){var m=i(null),v;m.current===null?(v={hasValue:!1,value:null},m.current=v):v=m.current;var y=s(function(){var S=!1,$,T,R=function(H){if(!S){S=!0,$=H;var L=d(H);if(h!==void 0&&v.hasValue){var P=v.value;if(h(P,L))return T=P,P}return T=L,L}var N=$,j=T;if(r(N,H))return j;var W=d(H);return h!==void 0&&h(j,W)?j:($=H,T=W,W)},B=p===void 0?null:p,O=function(){return R(f())},M=B===null?void 0:function(){return R(B())};return[O,M]},[f,p,d,h]),g=y[0],b=y[1],k=o(u,g,b);return a(function(){v.hasValue=!0,v.value=k},[k]),c(k),k}Dp.useSyncExternalStoreWithSelector=l,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Dp}process.env.NODE_ENV==="production"?Ip.exports=T6():Ip.exports=A6();var P6=Ip.exports;const I6=Ue(P6),{useSyncExternalStoreWithSelector:R6}=I6;let Lle=!1;function kx(e,t=e.getState,n){const r=R6(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return E.useDebugValue(r),r}const Cx=e=>{const t=typeof e=="function"?bx(e):e,n=(r,o)=>kx(t,r,o);return Object.assign(n,t),n},M6=e=>e?Cx(e):Cx,jp=new Map,_l=e=>{const t=jp.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},N6=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=jp.get(n.name);if(r)return{type:"tracked",store:e,...r};const o={connection:t.connect(n),stores:{}};return jp.set(n.name,o),{type:"tracked",store:e,...o}},Ox=(e,t={})=>(n,r,o)=>{const{enabled:i,anonymousActionType:a,store:s,...c}=t;let l;try{l=(i??!1)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return e(n,r,o);const{connection:u,...f}=N6(s,l,c);let p=!0;o.setState=(m,v,y)=>{const g=n(m,v);if(!p)return g;const b=y===void 0?{type:a||"anonymous"}:typeof y=="string"?{type:y}:y;return s===void 0?(u==null||u.send(b,r()),g):(u==null||u.send({...b,type:`${s}/${b.type}`},{..._l(c.name),[s]:o.getState()}),g)};const d=(...m)=>{const v=p;p=!1,n(...m),p=v},h=e(o.setState,r,o);if(f.type==="untracked"?u==null||u.init(h):(f.stores[f.store]=o,u==null||u.init(Object.fromEntries(Object.entries(f.stores).map(([m,v])=>[m,m===f.store?h:v.getState()])))),o.dispatchFromDevtools&&typeof o.dispatch=="function"){let m=!1;const v=o.dispatch;o.dispatch=(...y)=>{v(...y)}}return u.subscribe(m=>{var v;switch(m.type){case"ACTION":if(typeof m.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Fp(m.payload,y=>{if(y.type==="__setState"){if(s===void 0){d(y.state);return}Object.keys(y.state).length!==1&&console.error(`
276
+ */var zx;function xB(){return zx||(zx=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=E,t=Bx();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function c(u,f,p,d,h){var m=i(null),y;m.current===null?(y={hasValue:!1,value:null},m.current=y):y=m.current;var v=s(function(){var S=!1,$,C,P=function(q){if(!S){S=!0,$=q;var B=d(q);if(h!==void 0&&y.hasValue){var A=y.value;if(h(A,B))return C=A,A}return C=B,B}var D=$,N=C;if(r(D,q))return N;var V=d(q);return h!==void 0&&h(N,V)?N:($=q,C=V,V)},F=p===void 0?null:p,T=function(){return P(f())},M=F===null?void 0:function(){return P(F())};return[T,M]},[f,p,d,h]),g=v[0],b=v[1],k=o(u,g,b);return a(function(){y.hasValue=!0,y.value=k},[k]),l(k),k}lp.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),lp}process.env.NODE_ENV==="production"?op.exports=wB():op.exports=xB();var SB=op.exports;const EB=Le(SB),{useSyncExternalStoreWithSelector:$B}=EB;let Lfe=!1;function Hx(e,t=e.getState,n){const r=$B(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return E.useDebugValue(r),r}const qx=e=>{const t=typeof e=="function"?jx(e):e,n=(r,o)=>Hx(t,r,o);return Object.assign(n,t),n},OB=e=>e?qx(e):qx,cp=new Map,Pl=e=>{const t=cp.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},kB=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=cp.get(n.name);if(r)return{type:"tracked",store:e,...r};const o={connection:t.connect(n),stores:{}};return cp.set(n.name,o),{type:"tracked",store:e,...o}},Wx=(e,t={})=>(n,r,o)=>{const{enabled:i,anonymousActionType:a,store:s,...l}=t;let c;try{c=(i??!1)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return e(n,r,o);const{connection:u,...f}=kB(s,c,l);let p=!0;o.setState=(m,y,v)=>{const g=n(m,y);if(!p)return g;const b=v===void 0?{type:a||"anonymous"}:typeof v=="string"?{type:v}:v;return s===void 0?(u==null||u.send(b,r()),g):(u==null||u.send({...b,type:`${s}/${b.type}`},{...Pl(l.name),[s]:o.getState()}),g)};const d=(...m)=>{const y=p;p=!1,n(...m),p=y},h=e(o.setState,r,o);if(f.type==="untracked"?u==null||u.init(h):(f.stores[f.store]=o,u==null||u.init(Object.fromEntries(Object.entries(f.stores).map(([m,y])=>[m,m===f.store?h:y.getState()])))),o.dispatchFromDevtools&&typeof o.dispatch=="function"){let m=!1;const y=o.dispatch;o.dispatch=(...v)=>{y(...v)}}return u.subscribe(m=>{var y;switch(m.type){case"ACTION":if(typeof m.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return up(m.payload,v=>{if(v.type==="__setState"){if(s===void 0){d(v.state);return}Object.keys(v.state).length!==1&&console.error(`
277
277
  [zustand devtools middleware] Unsupported __setState action format.
278
278
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
279
279
  and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
280
- `);const g=y.state[s];if(g==null)return;JSON.stringify(o.getState())!==JSON.stringify(g)&&d(g);return}o.dispatchFromDevtools&&typeof o.dispatch=="function"&&o.dispatch(y)});case"DISPATCH":switch(m.payload.type){case"RESET":return d(h),s===void 0?u==null?void 0:u.init(o.getState()):u==null?void 0:u.init(_l(c.name));case"COMMIT":if(s===void 0){u==null||u.init(o.getState());return}return u==null?void 0:u.init(_l(c.name));case"ROLLBACK":return Fp(m.state,y=>{if(s===void 0){d(y),u==null||u.init(o.getState());return}d(y[s]),u==null||u.init(_l(c.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Fp(m.state,y=>{if(s===void 0){d(y);return}JSON.stringify(o.getState())!==JSON.stringify(y[s])&&d(y[s])});case"IMPORT_STATE":{const{nextLiftedState:y}=m.payload,g=(v=y.computedStates.slice(-1)[0])==null?void 0:v.state;if(!g)return;d(s===void 0?g:g[s]),u==null||u.send(null,y);return}case"PAUSE_RECORDING":return p=!p}return}}),h},Fp=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function D6(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var i;const a=c=>c===null?null:JSON.parse(c,t==null?void 0:t.reviver),s=(i=n.getItem(o))!=null?i:null;return s instanceof Promise?s.then(a):a(s)},setItem:(o,i)=>n.setItem(o,JSON.stringify(i,t==null?void 0:t.replacer)),removeItem:o=>n.removeItem(o)}}const as=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return as(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return as(r)(n)}}}},j6=(e,t)=>(n,r,o)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:v=>v,version:0,merge:(v,y)=>({...y,...v}),...t},a=!1;const s=new Set,c=new Set;let l;try{l=i.getStorage()}catch{}if(!l)return e((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...v)},r,o);const u=as(i.serialize),f=()=>{const v=i.partialize({...r()});let y;const g=u({state:v,version:i.version}).then(b=>l.setItem(i.name,b)).catch(b=>{y=b});if(y)throw y;return g},p=o.setState;o.setState=(v,y)=>{p(v,y),f()};const d=e((...v)=>{n(...v),f()},r,o);let h;const m=()=>{var v;if(!l)return;a=!1,s.forEach(g=>g(r()));const y=((v=i.onRehydrateStorage)==null?void 0:v.call(i,r()))||void 0;return as(l.getItem.bind(l))(i.name).then(g=>{if(g)return i.deserialize(g)}).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==i.version){if(i.migrate)return i.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var b;return h=i.merge(g,(b=r())!=null?b:d),n(h,!0),f()}).then(()=>{y==null||y(h,void 0),a=!0,c.forEach(g=>g(h))}).catch(g=>{y==null||y(void 0,g)})};return o.persist={setOptions:v=>{i={...i,...v},v.getStorage&&(l=v.getStorage())},clearStorage:()=>{l==null||l.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>m(),hasHydrated:()=>a,onHydrate:v=>(s.add(v),()=>{s.delete(v)}),onFinishHydration:v=>(c.add(v),()=>{c.delete(v)})},m(),h||d},F6=(e,t)=>(n,r,o)=>{let i={storage:D6(()=>localStorage),partialize:m=>m,version:0,merge:(m,v)=>({...v,...m}),...t},a=!1;const s=new Set,c=new Set;let l=i.storage;if(!l)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...m)},r,o);const u=()=>{const m=i.partialize({...r()});return l.setItem(i.name,{state:m,version:i.version})},f=o.setState;o.setState=(m,v)=>{f(m,v),u()};const p=e((...m)=>{n(...m),u()},r,o);let d;const h=()=>{var m,v;if(!l)return;a=!1,s.forEach(g=>{var b;return g((b=r())!=null?b:p)});const y=((v=i.onRehydrateStorage)==null?void 0:v.call(i,(m=r())!=null?m:p))||void 0;return as(l.getItem.bind(l))(i.name).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==i.version){if(i.migrate)return i.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var b;return d=i.merge(g,(b=r())!=null?b:p),n(d,!0),u()}).then(()=>{y==null||y(d,void 0),d=r(),a=!0,c.forEach(g=>g(d))}).catch(g=>{y==null||y(void 0,g)})};return o.persist={setOptions:m=>{i={...i,...m},m.storage&&(l=m.storage)},clearStorage:()=>{l==null||l.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:m=>(s.add(m),()=>{s.delete(m)}),onFinishHydration:m=>(c.add(m),()=>{c.delete(m)})},i.skipHydration||h(),d||p},L6=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?j6(e,t):F6(e,t),_n=M6()(Ox(L6((e,t)=>({messageHistory:{},addMessageToHistory:({userId:n,message:r})=>e(o=>({...o,messageHistory:{...o.messageHistory,[n]:[r,...(o.messageHistory[n]??[]).slice(0,100)]}})),clientMode:"",setClientMode:n=>{const{clearAll:r,clientMode:o}=t();o!==n&&r(),e(i=>({...i,clientMode:n}))},setUser:n=>e(r=>({...r,user:n})),setConversationId:n=>e(r=>({...r,conversationId:n})),clearAll:()=>{e(n=>({...n,messageHistory:{},user:void 0,conversationId:void 0}))}}),{name:"botpress-webchat"}))),Tx=E.createContext(null),B6=e=>{const t={configuration:{},messages:{},connected:!0,disableComposer:!1,renderers:{},isReadOnly:!1,userData:{},userName:void 0,userPictureUrl:void 0,closeWindow:void 0,messageContainerRef:{current:null},isTyping:!1,lastTypingHeartbeat:null,allowFileUpload:!1,conversationId:void 0,disableRestartConversation:!1},n=e==null?void 0:e.client,r=e==null?void 0:e.conversationId,o=_n.getState().setClientMode,i=_n.getState().setConversationId;return n&&o(n.mode),E.useEffect(()=>{r&&i(r)},[r]),bx()(Ox((a,s)=>{const c=f=>{const p=_n.getState().conversationId;if(p)return a(d=>{const h=d.messages[p]??[];return{...d,messages:{...d.messages,[p]:[...h.filter(m=>m.id!==f.id),{id:dc(),...f}]}}})},l=f=>{const p=_n.getState().conversationId;if(p)return a(d=>({...d,messages:{...d.messages,[p]:f}}))},u=_n.getState().addMessageToHistory;return{...t,...e,eventEmitter:QA,client:n,sendFile:f=>s().client.sendFile(f),sendTextMessage:async f=>{const p=s().client;c({id:dc(),direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:"bubble",block:{type:"text",text:f}}}),p&&await p.sendMessage(f),p!=null&&p.userId&&u({message:f,userId:p.userId})},on:(f,p)=>{const d=s().client;return d?d.on(f,p):()=>{}},getClientId:()=>{var f;return(f=s().client)==null?void 0:f.clientId},setHeaderMessage:f=>a({headerMessage:f}),setDisableComposer:f=>a({disableComposer:f}),setState:f=>a(p=>({...p,...f})),setMessages:l,getMessages:()=>s().messages[_n.getState().conversationId??""]??[],setIsTyping:(f,p)=>{a(d=>({...d,isTyping:f})),f&&(a(d=>({...d,lastTypingHeartbeat:new Date})),p&&setTimeout(()=>{const d=s().lastTypingHeartbeat;d&&new Date().getTime()-d.getTime()>p&&a(h=>({...h,isTyping:!1}))},p+100))},setLastTypingHeartbeat:f=>a(p=>({...p,lastTypingHeartbeat:f})),addMessage:c,setConnected:f=>a(p=>({...p,connected:f})),restartConversation:async()=>{const f=s().client,p=s().setMessages;f&&(await f.newConversation(),p([]))}}},{name:"webchatStore"}))};function Pe(e){const t=E.useContext(Tx);if(!t)throw new Error("Missing WebchatContext.Provider in the tree");return kx(t,e)}const U6=({text:e,buttonValue:t,type:n,variant:r,groupId:o,reusable:i,...a})=>{const s=Pe(g=>g.eventEmitter),c=Pe(g=>g.sendTextMessage),l=Pe(g=>g.isReadOnly),[u,f]=E.useState(!1),[p,d]=E.useState(!1),[h,m]=E.useState(!1),{message:{blocks:{button:v}}}=ct;E.useEffect(()=>{if(o)return s.on(`button-group-${o}-click`,()=>{d(!0),i||m(!0)})},[s,o,i]);function y(){o&&s.emit(`button-group-${o}-click`),f(!0),i||m(!0),r!=="link"&&c(t)}return F.jsx(z6,{...a,variant:r,onClick:y,disabled:h||l,"data-activated":u?"":void 0,"data-group-activated":p?"":void 0,"data-type":r,value:t,...v,children:e})},z6=e=>{if(e.variant==="link"){const{value:r,variant:o,...i}=e;return F.jsx("a",{...i,href:r,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...n}=e;return F.jsx("button",{type:"button",...n})},q6=E.forwardRef(({block:e,type:t,...n},r)=>{const{message:{blocks:{bubble:o}}}=ct;return F.jsx("div",{...n,...o,ref:r,children:F.jsx(Wi,{block:e})})}),Ax=E.createContext(null);function H6(){const e=E.useContext(Ax);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const Px=E.createContext(null);function Ix(){const e=E.useContext(Px);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}const Rx=E.createContext(null);function Mx(){const e=E.useContext(Rx);if(!e)throw new Error("useWebchatConfig must be used within a WebchatConfigProvider");return e}const V6=E.forwardRef(({url:e,type:t,orientation:n="auto",...r},o)=>{const i=E.useId(),{setIsLoading:a}=H6(),[s,c]=E.useState(n),[l,u]=E.useState(!1),{message:{blocks:{image:f}}}=ct;return E.useLayoutEffect(()=>{a(p=>[...p,i])},[]),E.useEffect(()=>{e&&s==="auto"&&_B(e).then(({width:p,height:d})=>{c(W6(p,d)),a(h=>h.filter(m=>m!==i))})},[e]),F.jsxs(F.Fragment,{children:[l?null:F.jsx("div",{"data-orientation":s,...f.placeholder}),F.jsx("img",{"data-orientation":s,"data-loaded":l,...r,...f.image,src:e,alt:"",ref:o,loading:"lazy",onLoad:()=>{u(!0)}})]})});function W6(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((i,a)=>Math.abs(n[a]-r)<Math.abs(n[i]-r)?a:i)}const K6=E.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{video:o}}}=ct;return F.jsx("div",{children:F.jsx("video",{...n,controls:!0,src:e,...o,ref:r})})}),G6=E.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{audio:o}}}=ct;return F.jsx("div",{children:F.jsx("audio",{...n,controls:!0,src:e,...o,ref:r})})});function Z6({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 0 1 .75.75v10.638l3.96-4.158a.75.75 0 1 1 1.08 1.04l-5.25 5.5a.75.75 0 0 1-1.08 0l-5.25-5.5a.75.75 0 1 1 1.08-1.04l3.96 4.158V3.75A.75.75 0 0 1 10 3Z",clipRule:"evenodd"}))}const Y6=C.forwardRef(Z6);function J6({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 0 1-9.201 2.466l-.312-.311h2.433a.75.75 0 0 0 0-1.5H3.989a.75.75 0 0 0-.75.75v4.242a.75.75 0 0 0 1.5 0v-2.43l.31.31a7 7 0 0 0 11.712-3.138.75.75 0 0 0-1.449-.39Zm1.23-3.723a.75.75 0 0 0 .219-.53V2.929a.75.75 0 0 0-1.5 0V5.36l-.31-.31A7 7 0 0 0 3.239 8.188a.75.75 0 1 0 1.448.389A5.5 5.5 0 0 1 13.89 6.11l.311.31h-2.432a.75.75 0 0 0 0 1.5h4.243a.75.75 0 0 0 .53-.219Z",clipRule:"evenodd"}))}const X6=C.forwardRef(J6);function Q6({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const e7=C.forwardRef(Q6);function t7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5V7.621a1.5 1.5 0 0 0-.44-1.06l-4.12-4.122A1.5 1.5 0 0 0 11.378 2H4.5Zm4.75 6.75a.75.75 0 0 1 1.5 0v2.546l.943-1.048a.75.75 0 0 1 1.114 1.004l-2.25 2.5a.75.75 0 0 1-1.114 0l-2.25-2.5a.75.75 0 1 1 1.114-1.004l.943 1.048V8.75Z",clipRule:"evenodd"}))}const n7=C.forwardRef(t7);function r7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"m9.69 18.933.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 0 0 .281-.14c.186-.096.446-.24.757-.433.62-.384 1.445-.966 2.274-1.765C15.302 14.988 17 12.493 17 9A7 7 0 1 0 3 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 0 0 2.273 1.765 11.842 11.842 0 0 0 .976.544l.062.029.018.008.006.003ZM10 11.25a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5Z",clipRule:"evenodd"}))}const o7=C.forwardRef(r7),i7=E.forwardRef(({type:e,latitude:t,longitude:n,title:r,...o},i)=>{const a=`https://www.google.com/maps/search/?api=1&query=${t},${n}`,{message:{blocks:{location:s}}}=ct;return F.jsxs("a",{...o,...s.container,href:a,type:"_blank",rel:"noopener",ref:i,children:[F.jsx("p",{...s.title,children:r}),F.jsx(o7,{...s.icon})]})}),a7=E.forwardRef(({blocks:e,type:t,horizontalAlignment:n,verticalAlignment:r,...o},i)=>{const{message:{blocks:{column:a}}}=ct;return F.jsx("div",{"data-horizontal":n,"data-vertical":r,...o,...a,ref:i,children:e.map((s,c)=>F.jsx(Wi,{block:s},c))})}),s7=E.forwardRef(({blocks:e,type:t,horizontalAlignment:n,verticalAlignment:r,...o},i)=>{const{message:{blocks:{row:a}}}=ct;return F.jsx("div",{"data-horizontal":n,"data-vertical":r,...o,...a,ref:i,children:e.map((s,c)=>F.jsx(Wi,{block:s},c))})});function c7(e){return Object.prototype.toString.call(e)==="[object Object]"}function Nx(e){return c7(e)||Array.isArray(e)}function l7(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Lp(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const o=JSON.stringify(Object.keys(e.breakpoints||{})),i=JSON.stringify(Object.keys(t.breakpoints||{}));return o!==i?!1:n.every(a=>{const s=e[a],c=t[a];return typeof s=="function"?`${s}`==`${c}`:!Nx(s)||!Nx(c)?s===c:Lp(s,c)})}function Dx(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function u7(e,t){if(e.length!==t.length)return!1;const n=Dx(e),r=Dx(t);return n.every((o,i)=>{const a=r[i];return Lp(o,a)})}function Bp(e){return typeof e=="number"}function jx(e){return typeof e=="string"}function Up(e){return typeof e=="boolean"}function Fx(e){return Object.prototype.toString.call(e)==="[object Object]"}function wt(e){return Math.abs(e)}function zp(e){return Math.sign(e)}function $l(e,t){return wt(e-t)}function f7(e,t){if(e===0||t===0||wt(e)<=wt(t))return 0;const n=$l(wt(e),wt(t));return wt(n/e)}function ss(e){return Cl(e).map(Number)}function Fr(e){return e[kl(e)]}function kl(e){return Math.max(0,e.length-1)}function Cl(e){return Object.keys(e)}function Lx(e,t){return[e,t].reduce((n,r)=>(Cl(r).forEach(o=>{const i=n[o],a=r[o],s=Fx(i)&&Fx(a);n[o]=s?Lx(i,a):a}),n),{})}function Bx(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function d7(e,t){const n={start:r,center:o,end:i};function r(){return 0}function o(l){return i(l)/2}function i(l){return t-l}function a(){return t*Number(e)}function s(l){return Bp(e)?a():n[e](l)}return{measure:s}}function p7(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",o=s(),i=c();function a(u){const{width:f,height:p}=u;return n==="x"?f:p}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function c(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:o,endEdge:i,measureSize:a}}function mo(e,t){const n=wt(e-t);function r(l){return l<e}function o(l){return l>t}function i(l){return r(l)||o(l)}function a(l){return i(l)?r(l)?e:t:l}function s(l){return n?l-n*Math.ceil((l-t)/n):l}return{length:n,max:t,min:e,constrain:a,reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:s}}function Ux(e,t,n){const{constrain:r}=mo(0,e),o=e+1;let i=a(t);function a(p){return n?wt((o+p)%o):r(p)}function s(){return i}function c(p){return i=a(p),f}function l(p){return u().set(s()+p)}function u(){return Ux(e,s(),n)}const f={get:s,set:c,add:l,clone:u};return f}function h7(e){const t=e==="rtl"?-1:1;function n(o){return o*t}return{apply:n}}function cs(){let e=[];function t(o,i,a,s={passive:!0}){return o.addEventListener(i,a,s),e.push(()=>o.removeEventListener(i,a,s)),r}function n(){e=e.filter(o=>o())}const r={add:t,clear:n};return r}function m7(e,t,n,r,o,i,a,s,c,l,u,f,p,d,h,m,v,y,g){const{cross:b}=e,k=["INPUT","SELECT","TEXTAREA"],S={passive:!1},$=cs(),T=cs(),R=mo(50,225).constrain(h.measure(20)),B={mouse:300,touch:400},O={mouse:500,touch:600},M=m?43:25;let H=!1,L=0,P=0,N=!1,j=!1,W=!1,V=!1;function D(Q,G){if(!G)return;function fe(_e){(Up(G)||G(Q,_e))&&ae(_e)}const ve=n;$.add(ve,"dragstart",_e=>_e.preventDefault(),S).add(ve,"touchmove",()=>{},S).add(ve,"touchend",()=>{}).add(ve,"touchstart",fe).add(ve,"mousedown",fe).add(ve,"touchcancel",le).add(ve,"contextmenu",le).add(ve,"click",pe,!0)}function w(){$.clear(),T.clear()}function z(){const Q=V?r:n;T.add(Q,"touchmove",re,S).add(Q,"touchend",le).add(Q,"mousemove",re,S).add(Q,"mouseup",le)}function K(Q){const G=Q.nodeName||"";return k.includes(G)}function _(){return(m?O:B)[V?"mouse":"touch"]}function J(Q,G){const fe=p.add(zp(Q)*-1),ve=f.byDistance(Q,!m).distance;return m||wt(Q)<R?ve:y&&G?ve*.5:f.byIndex(fe.get(),0).distance}function ae(Q){const G=Bx(Q,o);V=G,!(G&&Q.button!==0)&&(K(Q.target)||(W=m&&G&&!Q.buttons&&H,H=$l(i.get(),s.get())>=2,N=!0,a.pointerDown(Q),u.useFriction(0).useDuration(0),i.set(s),z(),L=a.readPoint(Q),P=a.readPoint(Q,b),d.emit("pointerDown")))}function re(Q){const G=a.readPoint(Q),fe=a.readPoint(Q,b),ve=$l(G,L),_e=$l(fe,P);if(!j&&!V&&(!Q.cancelable||(j=ve>_e,!j)))return le(Q);const I=a.pointerMove(Q);ve>v&&(W=!0),u.useFriction(.3).useDuration(1),c.start(),i.add(t.apply(I)),Q.preventDefault()}function le(Q){const fe=f.byDistance(0,!1).index!==p.get(),ve=a.pointerUp(Q)*_(),_e=J(t.apply(ve),fe),I=f7(ve,_e),X=M-10*I,oe=g+I/50;j=!1,N=!1,T.clear(),u.useDuration(X).useFriction(oe),l.distance(_e,!m),V=!1,d.emit("pointerUp")}function pe(Q){W&&(Q.stopPropagation(),Q.preventDefault())}function me(){return N}return{init:D,pointerDown:me,destroy:w}}function y7(e,t){let r,o;function i(f){return f.timeStamp}function a(f,p){const h=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(Bx(f,t)?f:f.touches[0])[h]}function s(f){return r=f,o=f,a(f)}function c(f){const p=a(f)-a(o),d=i(f)-i(r)>170;return o=f,d&&(r=f),p}function l(f){if(!r||!o)return 0;const p=a(o)-a(r),d=i(f)-i(r),h=i(f)-i(o)>170,m=p/d;return d&&!h&&wt(m)>.1?m:0}return{pointerDown:s,pointerMove:c,pointerUp:l,readPoint:a}}function v7(e){function t(r){return e*(r/100)}return{measure:t}}function g7(e,t,n,r,o){let i,a,s=[],c=!1;function l(d){return o.measureSize(d.getBoundingClientRect())}function u(d,h){if(!h)return;a=l(e),s=r.map(l);function m(y){for(const g of y){const b=g.target===e,k=r.indexOf(g.target),S=b?a:s[k],$=l(b?e:r[k]);if(S!==$){n.requestAnimationFrame(()=>{d.reInit(),t.emit("resize")});break}}}i=new ResizeObserver(y=>{c||(Up(h)||h(d,y))&&m(y)}),[e].concat(r).forEach(y=>i.observe(y))}function f(){i&&i.disconnect(),c=!0}return{init:u,destroy:f}}function b7(e,t,n,r){let o=!0,i=0,a=0,s=n,c=r,l=e.get(),u=0;function f(){const S=t.get()-e.get(),$=!s;let T=0;return $?(i=0,e.set(t),T=S):(i+=S/s,i*=c,l+=i,e.add(i),T=l-u),a=zp(T),u=l,o=wt(S)<.001,k}function p(){return o}function d(){return s}function h(){return a}function m(){return i}function v(){return g(n)}function y(){return b(r)}function g(S){return s=S,k}function b(S){return c=S,k}const k={direction:h,duration:d,velocity:m,seek:f,settled:p,useBaseFriction:y,useBaseDuration:v,useFriction:b,useDuration:g};return k}function w7(e,t,n,r,o){const i=o.measure(10),a=o.measure(50),s=mo(.1,.99);let c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(d){if(!l())return;const h=e.reachedMin(t.get())?"min":"max",m=wt(e[h]-t.get()),v=n.get()-t.get(),y=s.constrain(m/a);n.subtract(v*y),!d&&wt(v)<i&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(d){c=!d}return{constrain:u,toggleActive:f}}function x7(e,t,n,r){const o=mo(-t+e,n[0]),i=c(),a=l();function s(){const f=i[0],p=Fr(i),d=i.lastIndexOf(f),h=i.indexOf(p)+1;return mo(d,h)}function c(){return n.map(o.constrain).map(f=>parseFloat(f.toFixed(3)))}function l(){if(t<=e)return[o.max];if(r==="keepSnaps")return i;const{min:f,max:p}=s();return i.slice(f,p)}return{snapsContained:a}}function S7(e,t,n){const r=t[0],o=n?r-e:Fr(t);return{limit:mo(o,r)}}function E7(e,t,n,r){const i=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:c}=mo(i,a);function l(p){return p===1?c(n.get()):p===-1?s(n.get()):!1}function u(p){if(!l(p))return;const d=e*(p*-1);r.forEach(h=>h.add(d))}return{loop:u}}function _7(e){const{max:t,length:n}=e;function r(i){return(i-t)/-n}return{get:r}}function $7(e,t,n,r,o,i,a){const{startEdge:s,endEdge:c}=e,{groupSlides:l}=i,u=d().map(t.measure),f=h(),p=m();function d(){return l(r).map(y=>Fr(y)[c]-y[0][s]).map(wt)}function h(){return r.map(y=>n[s]-y[s]).map(y=>-wt(y))}function m(){const g=Fr(f)-Fr(o);return l(f).map(b=>b[0]).map((b,k,S)=>{const $=!k,T=k===kl(S);return a&&$?0:a&&T?g:b+u[k]})}return{snaps:f,snapsAligned:p}}function k7(e,t,n,r,o){const{reachedAny:i,removeOffset:a,constrain:s}=r;function c(h){return h.concat().sort((m,v)=>wt(m)-wt(v))[0]}function l(h){const m=e?a(h):s(h),v=t.map(g=>g-m).map(g=>u(g,0)).map((g,b)=>({diff:g,index:b})).sort((g,b)=>wt(g.diff)-wt(b.diff)),{index:y}=v[0];return{index:y,distance:m}}function u(h,m){const v=[h,h+n,h-n];if(!e)return v[0];if(!m)return c(v);const y=v.filter(g=>zp(g)===m);return c(y)}function f(h,m){const v=t[h]-o.get(),y=u(v,m);return{index:h,distance:y}}function p(h,m){const v=o.get()+h,{index:y,distance:g}=l(v),b=!e&&i(v);if(!m||b)return{index:y,distance:h};const k=t[y]-g,S=h+u(k,0);return{index:y,distance:S}}return{byDistance:p,byIndex:f,shortcut:u}}function C7(e,t,n,r,o,i,a){function s(f){const p=f.distance,d=f.index!==t.get();i.add(p),p&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),d&&(n.set(t.get()),t.set(f.index),a.emit("select"))}function c(f,p){const d=r.byDistance(f,p);s(d)}function l(f,p){const d=t.clone().set(f),h=r.byIndex(d.get(),p);s(h)}return{distance:c,index:l}}function Ol(e){let t=e;function n(){return t}function r(c){t=a(c)}function o(c){t+=a(c)}function i(c){t-=a(c)}function a(c){return Bp(c)?c:c.get()}return{get:n,set:r,add:o,subtract:i}}function zx(e,t,n){const r=e.scroll==="x"?a:s,o=n.style;let i=!1;function a(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function c(p){i||(o.transform=r(t.apply(p)))}function l(p){i=!p}function u(){i||(o.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:u,to:c,toggleActive:l}}function O7(e,t,n,r,o,i,a,s,c){const l=ss(o),u=ss(o).reverse(),f=m().concat(v());function p(S,$){return S.reduce((T,R)=>T-o[R],$)}function d(S,$){return S.reduce((T,R)=>p(T,$)>0?T.concat([R]):T,[])}function h(S,$){const T=$==="start",R=T?-r:r,B=a.findSlideBounds([R]);return S.map(O=>{const M=T?0:-r,H=T?r:0,P=B.filter(N=>N.index===O)[0][T?"end":"start"];return{index:O,slideLocation:Ol(-1),translate:zx(e,t,c[O]),target:()=>s.get()>P?M:H}})}function m(){const S=i[0]-1,$=d(u,S);return h($,"end")}function v(){const S=n-i[0]-1,$=d(l,S);return h($,"start")}function y(){return f.every(({index:S})=>{const $=l.filter(T=>T!==S);return p($,n)<=.1})}function g(){f.forEach(S=>{const{target:$,translate:T,slideLocation:R}=S,B=$();B!==R.get()&&(T.to(B),R.set(B))})}function b(){f.forEach(S=>S.translate.clear())}return{canLoop:y,clear:b,loop:g,loopPoints:f}}function T7(e,t){let n,r=!1;function o(s,c){if(!c)return;function l(u){for(const f of u)if(f.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(u=>{r||(Up(c)||c(s,u))&&l(u)}),n.observe(e,{childList:!0})}function i(){n&&n.disconnect(),r=!0}return{init:o,destroy:i}}function A7(e,t,n,r,o,i,a){const{removeOffset:s,constrain:c}=o,l=.5,u=i?[0,t,-t]:[0],f=d(u,a);function p(v){const y=v||0;return n.map(g=>mo(l,g-l).constrain(g*y))}function d(v,y){const g=v||u,b=p(y);return g.reduce((k,S)=>{const $=r.map((T,R)=>({start:T-n[R]+b[R]+S,end:T+e-b[R]+S,index:R}));return k.concat($)},[])}function h(v,y){const g=i?s(v):c(v);return(y||f).reduce((k,S)=>{const{index:$,start:T,end:R}=S,B=k.includes($),O=T<g&&R>g;return!B&&O?k.concat([$]):k},[])}return{check:h,findSlideBounds:d}}function P7(e,t,n,r,o,i){const{measureSize:a,startEdge:s,endEdge:c}=e,l=n[0]&&o,u=h(),f=m(),p=n.map(a),d=v();function h(){if(!l)return 0;const g=n[0];return wt(t[s]-g[s])}function m(){if(!l)return 0;const g=i.getComputedStyle(Fr(r));return parseFloat(g.getPropertyValue(`margin-${c}`))}function v(){return n.map((g,b,k)=>{const S=!b,$=b===kl(k);return S?p[b]+u:$?p[b]+f:k[b+1][s]-g[s]}).map(wt)}return{slideSizes:p,slideSizesWithGaps:d}}function I7(e,t,n){const r=Bp(n);function o(c,l){return ss(c).filter(u=>u%l===0).map(u=>c.slice(u,u+l))}function i(c){return ss(c).reduce((l,u)=>{const p=t.slice(Fr(l),u+1).reduce((d,h)=>d+h,0);return!u||p>e?l.concat(u):l},[]).map((l,u,f)=>c.slice(l,f[u+1]))}function a(c){return r?o(c,n):i(c)}return{groupSlides:a}}function R7(e,t,n,r,o,i,a,s){const{align:c,axis:l,direction:u,startIndex:f,inViewThreshold:p,loop:d,duration:h,dragFree:m,dragThreshold:v,slidesToScroll:y,skipSnaps:g,containScroll:b}=i,k=t.getBoundingClientRect(),S=n.map(oe=>oe.getBoundingClientRect()),$=h7(u),T=p7(l,u),R=T.measureSize(k),B=v7(R),O=d7(c,R),M=!d&&!!b,H=d||!!b,{slideSizes:L,slideSizesWithGaps:P}=P7(T,k,S,n,H,o),N=I7(R,P,y),{snaps:j,snapsAligned:W}=$7(T,O,k,S,P,N,M),V=-Fr(j)+Fr(P),{snapsContained:D}=x7(R,V,W,b),w=M?D:W,{limit:z}=S7(V,w,d),K=Ux(kl(w),f,d),_=K.clone(),J=ss(n),ae=({dragHandler:oe,scrollBody:ee,scrollBounds:Se,eventHandler:xe,animation:ke,options:{loop:Fe}})=>{const Te=oe.pointerDown();Fe||Se.constrain(Te);const U=ee.seek().settled();U&&!Te&&(ke.stop(),xe.emit("settle")),U||xe.emit("scroll")},re=({scrollBody:oe,translate:ee,location:Se,offsetLocation:xe,scrollLooper:ke,slideLooper:Fe,options:{loop:Te}},U)=>{const Z=oe.velocity();xe.set(Se.get()-Z+Z*U),Te&&(ke.loop(oe.direction()),Fe.loop()),ee.to(xe.get())},le={start:()=>s.start(X),stop:()=>s.stop(X),update:()=>ae(X),render:oe=>re(X,oe)},pe=.68,me=w[K.get()],ce=Ol(me),Q=Ol(me),G=Ol(me),fe=b7(ce,G,h,pe),ve=k7(d,w,V,z,G),_e=C7(le,K,_,ve,fe,G,a),I=A7(R,V,L,j,z,d,p),X={ownerDocument:r,ownerWindow:o,eventHandler:a,containerRect:k,slideRects:S,animation:le,axis:T,direction:$,dragHandler:m7(T,$,e,r,o,G,y7(T,o),ce,le,_e,fe,ve,K,a,B,m,v,g,pe),eventStore:cs(),percentOfView:B,index:K,indexPrevious:_,limit:z,location:ce,offsetLocation:Q,options:i,resizeHandler:g7(t,a,o,n,T),scrollBody:fe,scrollBounds:w7(z,ce,G,fe,B),scrollLooper:E7(V,z,Q,[ce,Q,G]),scrollProgress:_7(z),scrollSnaps:w,scrollTarget:ve,scrollTo:_e,slideLooper:O7(T,$,R,V,P,w,I,Q,n),slidesHandler:T7(t,a),slidesInView:I,slideIndexes:J,slidesToScroll:N,target:G,translate:zx(T,$,t)};return X}function M7(e){const t=16.666666666666668;let n=[],r=null,o=0,i=0;function a(f){r||(r=f);const p=f-r;for(r=f,o+=p;o>=t;)n.forEach(({animation:h})=>h.update()),o-=t;const d=wt(o/t);n.forEach(({animation:h})=>h.render(d)),i&&e.requestAnimationFrame(a)}function s(f){n.includes(f)||n.push(f),!i&&(i=e.requestAnimationFrame(a))}function c(f){n=n.filter(p=>p!==f),!n.length&&(e.cancelAnimationFrame(i),r=null,o=0,i=0)}function l(){r=null,o=0}return{start:s,stop:c,reset:l,window:e}}function N7(){const e={};let t;function n(c){t=c}function r(c){return e[c]||[]}function o(c){return r(c).forEach(l=>l(t,c)),s}function i(c,l){return e[c]=r(c).concat([l]),s}function a(c,l){return e[c]=r(c).filter(u=>u!==l),s}const s={init:n,emit:o,off:a,on:i};return s}const D7={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,breakpoints:{},dragFree:!1,dragThreshold:10,inViewThreshold:0,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function j7(e){function t(i,a){return Lx(i,a||{})}function n(i){const a=i.breakpoints||{},s=Cl(a).filter(c=>e.matchMedia(c).matches).map(c=>a[c]).reduce((c,l)=>t(c,l),{});return t(i,s)}function r(i){return i.map(a=>Cl(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function F7(e){let t=[];function n(i,a){return t=i.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),i.reduce((s,c)=>Object.assign(s,{[c.name]:c}),{})}function r(){t=t.filter(i=>i.destroy())}return{init:n,destroy:r}}function Li(e,t,n){const r=e.ownerDocument,o=r.defaultView,i=j7(o),a=F7(i),s=cs(),c=cs(),l=N7(),{animationRealms:u}=Li,{mergeOptions:f,optionsAtMedia:p,optionsMediaQueries:d}=i,{on:h,off:m,emit:v}=l,y=L;let g=!1,b,k=f(D7,Li.globalOptions),S=f(k),$=[],T,R,B;function O(){const{container:fe,slides:ve}=S;R=(jx(fe)?e.querySelector(fe):fe)||e.children[0];const I=jx(ve)?R.querySelectorAll(ve):ve;B=[].slice.call(I||R.children)}function M(fe,ve){const _e=R7(e,R,B,r,o,fe,l,ve);if(fe.loop&&!_e.slideLooper.canLoop()){const I=Object.assign({},fe,{loop:!1});return M(I,ve)}return _e}function H(fe,ve){if(g)return;const _e=u.find(X=>X.window===o),I=_e||M7(o);_e||u.push(I),k=f(k,fe),S=p(k),$=ve||$,O(),b=M(S,I),d([k,...$.map(({options:X})=>X)]).forEach(X=>s.add(X,"change",L)),S.active&&(b.translate.to(b.location.get()),b.eventHandler.init(G),b.resizeHandler.init(G,S.watchResize),b.slidesHandler.init(G,S.watchSlides),c.add(r,"visibilitychange",()=>{r.hidden&&I.reset()}),b.options.loop&&b.slideLooper.loop(),R.offsetParent&&B.length&&b.dragHandler.init(G,S.watchDrag),T=a.init($,G))}function L(fe,ve){const _e=ae();P(),H(f({startIndex:_e},fe),ve),l.emit("reInit")}function P(){b.dragHandler.destroy(),b.animation.stop(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),a.destroy(),s.clear(),c.clear()}function N(){g||(g=!0,s.clear(),P(),l.emit("destroy"))}function j(fe){const ve=b[fe?"target":"location"].get(),_e=S.loop?"removeOffset":"constrain";return b.slidesInView.check(b.limit[_e](ve))}function W(fe){const ve=j(fe);return b.slideIndexes.filter(_e=>!ve.includes(_e))}function V(fe,ve,_e){!S.active||g||(b.scrollBody.useBaseFriction().useDuration(ve?0:S.duration),b.scrollTo.index(fe,_e||0))}function D(fe){const ve=b.index.add(1).get();V(ve,fe===!0,-1)}function w(fe){const ve=b.index.add(-1).get();V(ve,fe===!0,1)}function z(){return b.index.add(1).get()!==ae()}function K(){return b.index.add(-1).get()!==ae()}function _(){return b.scrollSnaps.map(b.scrollProgress.get)}function J(){return b.scrollProgress.get(b.location.get())}function ae(){return b.index.get()}function re(){return b.indexPrevious.get()}function le(){return T}function pe(){return b}function me(){return e}function ce(){return R}function Q(){return B}const G={canScrollNext:z,canScrollPrev:K,containerNode:ce,internalEngine:pe,destroy:N,off:m,on:h,emit:v,plugins:le,previousScrollSnap:re,reInit:y,rootNode:me,scrollNext:D,scrollPrev:w,scrollProgress:J,scrollSnapList:_,scrollTo:V,selectedScrollSnap:ae,slideNodes:Q,slidesInView:j,slidesNotInView:W};return H(t,n),setTimeout(()=>l.emit("init"),0),G}Li.animationRealms=[],Li.globalOptions=void 0;function qp(e={},t=[]){const n=E.useRef(e),r=E.useRef(t),[o,i]=E.useState(),[a,s]=E.useState(),c=E.useCallback(()=>{o&&o.reInit(n.current,r.current)},[o]);return E.useEffect(()=>{if(l7()&&a){Li.globalOptions=qp.globalOptions;const l=Li(a,n.current,r.current);return i(l),()=>l.destroy()}else i(void 0)},[a,i]),E.useEffect(()=>{Lp(n.current,e)||(n.current=e,c())},[e,c]),E.useEffect(()=>{u7(r.current,t)||(r.current=t,c())},[t,c]),[s,o]}qp.globalOptions=void 0;function L7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const B7=C.forwardRef(L7);function U7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const z7=C.forwardRef(U7);function q7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625ZM7.5 15a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 7.5 15Zm.75 2.25a.75.75 0 0 0 0 1.5H12a.75.75 0 0 0 0-1.5H8.25Z",clipRule:"evenodd"}),C.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"}))}const H7=C.forwardRef(q7);function V7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M1.5 8.67v8.58a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V8.67l-8.928 5.493a3 3 0 0 1-3.144 0L1.5 8.67Z"}),C.createElement("path",{d:"M22.5 6.908V6.75a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3v.158l9.714 5.978a1.5 1.5 0 0 0 1.572 0L22.5 6.908Z"}))}const W7=C.forwardRef(V7);function K7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M21.721 12.752a9.711 9.711 0 0 0-.945-5.003 12.754 12.754 0 0 1-4.339 2.708 18.991 18.991 0 0 1-.214 4.772 17.165 17.165 0 0 0 5.498-2.477ZM14.634 15.55a17.324 17.324 0 0 0 .332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 0 0 .332 4.647 17.385 17.385 0 0 0 5.268 0ZM9.772 17.119a18.963 18.963 0 0 0 4.456 0A17.182 17.182 0 0 1 12 21.724a17.18 17.18 0 0 1-2.228-4.605ZM7.777 15.23a18.87 18.87 0 0 1-.214-4.774 12.753 12.753 0 0 1-4.34-2.708 9.711 9.711 0 0 0-.944 5.004 17.165 17.165 0 0 0 5.498 2.477ZM21.356 14.752a9.765 9.765 0 0 1-7.478 6.817 18.64 18.64 0 0 0 1.988-4.718 18.627 18.627 0 0 0 5.49-2.098ZM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 0 0 1.988 4.718 9.765 9.765 0 0 1-7.478-6.816ZM13.878 2.43a9.755 9.755 0 0 1 6.116 3.986 11.267 11.267 0 0 1-3.746 2.504 18.63 18.63 0 0 0-2.37-6.49ZM12 2.276a17.152 17.152 0 0 1 2.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0 1 12 2.276ZM10.122 2.43a18.629 18.629 0 0 0-2.37 6.49 11.266 11.266 0 0 1-3.746-2.504 9.754 9.754 0 0 1 6.116-3.985Z"}))}const G7=C.forwardRef(K7);function Z7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M12 1.5a5.25 5.25 0 0 0-5.25 5.25v3a3 3 0 0 0-3 3v6.75a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3v-6.75a3 3 0 0 0-3-3v-3c0-2.9-2.35-5.25-5.25-5.25Zm3.75 8.25v-3a3.75 3.75 0 1 0-7.5 0v3h7.5Z",clipRule:"evenodd"}))}const Y7=C.forwardRef(Z7);function J7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M1.5 4.5a3 3 0 0 1 3-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 0 1-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 0 0 6.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 0 1 1.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 0 1-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5Z",clipRule:"evenodd"}))}const X7=C.forwardRef(J7),Q7=E.forwardRef(({blocks:e},t)=>{const[n,r]=qp({skipSnaps:!0}),[o,i]=E.useState(!0),[a,s]=E.useState(!0),c=E.useCallback(()=>r==null?void 0:r.scrollPrev(),[r]),l=E.useCallback(()=>r==null?void 0:r.scrollNext(),[r]),{message:{blocks:{carousel:u}}}=ct,f=E.useCallback(p=>{i(!p.canScrollPrev()),s(!p.canScrollNext())},[]);return E.useEffect(()=>{r&&(f(r),r.on("reInit",f),r.on("select",f))},[r,f]),F.jsxs("div",{...u==null?void 0:u.container,"data-container":"carousel",ref:n,children:[F.jsx("div",{ref:t,...u==null?void 0:u.slidesContainer,children:e.map((p,d)=>F.jsx(Wi,{block:p},d))}),F.jsx(B7,{...u==null?void 0:u.backButton,"data-disabled":o?"":void 0,onClick:c}),F.jsx(z7,{...u==null?void 0:u.nextButton,"data-disabled":a?"":void 0,onClick:l})]})}),Bi=Math.min,$n=Math.max,Tl=Math.round,Ui=Math.floor,yo=e=>({x:e,y:e});function qx(e,t,n){return $n(e,Bi(t,n))}function Al(e,t){return typeof e=="function"?e(t):e}function ls(e){return e.split("-")[0]}function Hp(e){return e.split("-")[1]}function Hx(e){return e==="x"?"y":"x"}function eU(e){return e==="y"?"height":"width"}function us(e){return["top","bottom"].includes(ls(e))?"y":"x"}function tU(e){return Hx(us(e))}function nU(e){return{top:0,right:0,bottom:0,left:0,...e}}function rU(e){return typeof e!="number"?nU(e):{top:e,right:e,bottom:e,left:e}}function Pl(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function vo(e){return Vx(e)?(e.nodeName||"").toLowerCase():"#document"}function kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lr(e){var t;return(t=(Vx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vx(e){return e instanceof Node||e instanceof kn(e).Node}function xt(e){return e instanceof Element||e instanceof kn(e).Element}function tn(e){return e instanceof HTMLElement||e instanceof kn(e).HTMLElement}function Vp(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kn(e).ShadowRoot}function fs(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Cn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function oU(e){return["table","td","th"].includes(vo(e))}function Wp(e){const t=Kp(),n=Cn(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function iU(e){let t=Jo(e);for(;tn(t)&&!ds(t);){if(Wp(t))return t;t=Jo(t)}return null}function Kp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ds(e){return["html","body","#document"].includes(vo(e))}function Cn(e){return kn(e).getComputedStyle(e)}function Il(e){return xt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Jo(e){if(vo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vp(e)&&e.host||Lr(e);return Vp(t)?t.host:t}function Wx(e){const t=Jo(e);return ds(t)?e.ownerDocument?e.ownerDocument.body:e.body:tn(t)&&fs(t)?t:Wx(t)}function go(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Wx(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=kn(o);return i?t.concat(a,a.visualViewport||[],fs(o)?o:[],a.frameElement&&n?go(a.frameElement):[]):t.concat(o,go(o,[],n))}function bo(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function yn(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Vp(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Kx(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function aU(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function Gx(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(Kx())||t.test(aU()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Zx(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function Yx(){return/apple/i.test(navigator.vendor)}function sU(){return Kx().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Jx(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function cU(e){return"nativeEvent"in e}function lU(e){return e.matches("html,body")}function Gn(e){return(e==null?void 0:e.ownerDocument)||document}function Gp(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Xx(e){return"composedPath"in e?e.composedPath()[0]:e.target}const uU="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Qx(e){return tn(e)&&e.matches(uU)}function Wt(e){e.preventDefault(),e.stopPropagation()}function eS(e,t,n){let{reference:r,floating:o}=e;const i=us(t),a=tU(t),s=eU(a),c=ls(t),l=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let d;switch(c){case"top":d={x:u,y:r.y-o.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(Hp(t)){case"start":d[a]-=p*(n&&l?-1:1);break;case"end":d[a]+=p*(n&&l?-1:1);break}return d}const fU=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=eS(l,r,c),p=r,d={},h=0;for(let m=0;m<s.length;m++){const{name:v,fn:y}=s[m],{x:g,y:b,data:k,reset:S}=await y({x:u,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:d,rects:l,platform:a,elements:{reference:e,floating:t}});if(u=g??u,f=b??f,d={...d,[v]:{...d[v],...k}},S&&h<=50){h++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(l=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:f}=eS(l,p,c)),m=-1;continue}}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}};async function tS(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=Al(t,e),h=rU(d),v=s[p?f==="floating"?"reference":"floating":f],y=Pl(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),g=f==="floating"?{...a.floating,x:r,y:o}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),k=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},S=Pl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:g,offsetParent:b,strategy:c}):g);return{top:(y.top-S.top+h.top)/k.y,bottom:(S.bottom-y.bottom+h.bottom)/k.y,left:(y.left-S.left+h.left)/k.x,right:(S.right-y.right+h.right)/k.x}}async function dU(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=ls(n),s=Hp(n),c=us(n)==="y",l=["left","top"].includes(a)?-1:1,u=i&&c?-1:1,f=Al(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof h=="number"&&(d=s==="end"?h*-1:h),c?{x:d*u,y:p*l}:{x:p*l,y:d*u}}const pU=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await dU(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},hU=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:v=>{let{x:y,y:g}=v;return{x:y,y:g}}},...c}=Al(e,t),l={x:n,y:r},u=await tS(t,c),f=us(ls(o)),p=Hx(f);let d=l[p],h=l[f];if(i){const v=p==="y"?"top":"left",y=p==="y"?"bottom":"right",g=d+u[v],b=d-u[y];d=qx(g,d,b)}if(a){const v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",g=h+u[v],b=h-u[y];h=qx(g,h,b)}const m=s.fn({...t,[p]:d,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},mU=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Al(e,t),c=await tS(t,s),l=ls(n),u=Hp(n),f=us(n)==="y",{width:p,height:d}=r.floating;let h,m;l==="top"||l==="bottom"?(h=l,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=l,h=u==="end"?"top":"bottom");const v=d-c[h],y=p-c[m],g=!t.middlewareData.shift;let b=v,k=y;if(f){const $=p-c.left-c.right;k=u||g?Bi(y,$):$}else{const $=d-c.top-c.bottom;b=u||g?Bi(v,$):$}if(g&&!u){const $=$n(c.left,0),T=$n(c.right,0),R=$n(c.top,0),B=$n(c.bottom,0);f?k=p-2*($!==0||T!==0?$+T:$n(c.left,c.right)):b=d-2*(R!==0||B!==0?R+B:$n(c.top,c.bottom))}await a({...t,availableWidth:k,availableHeight:b});const S=await o.getDimensions(i.floating);return p!==S.width||d!==S.height?{reset:{rects:!0}}:{}}}};function nS(e){const t=Cn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=tn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Tl(n)!==i||Tl(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Zp(e){return xt(e)?e:e.contextElement}function zi(e){const t=Zp(e);if(!tn(t))return yo(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=nS(t);let a=(i?Tl(n.width):n.width)/r,s=(i?Tl(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const yU=yo(0);function rS(e){const t=kn(e);return!Kp()||!t.visualViewport?yU:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vU(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==kn(e)?!1:t}function Xo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Zp(e);let a=yo(1);t&&(r?xt(r)&&(a=zi(r)):a=zi(e));const s=vU(i,n,r)?rS(i):yo(0);let c=(o.left+s.x)/a.x,l=(o.top+s.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){const p=kn(i),d=r&&xt(r)?kn(r):r;let h=p.frameElement;for(;h&&r&&d!==p;){const m=zi(h),v=h.getBoundingClientRect(),y=Cn(h),g=v.left+(h.clientLeft+parseFloat(y.paddingLeft))*m.x,b=v.top+(h.clientTop+parseFloat(y.paddingTop))*m.y;c*=m.x,l*=m.y,u*=m.x,f*=m.y,c+=g,l+=b,h=kn(h).frameElement}}return Pl({width:u,height:f,x:c,y:l})}function gU(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=tn(n),i=Lr(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s=yo(1);const c=yo(0);if((o||!o&&r!=="fixed")&&((vo(n)!=="body"||fs(i))&&(a=Il(n)),tn(n))){const l=Xo(n);s=zi(n),c.x=l.x+n.clientLeft,c.y=l.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+c.x,y:t.y*s.y-a.scrollTop*s.y+c.y}}function bU(e){return Array.from(e.getClientRects())}function oS(e){return Xo(Lr(e)).left+Il(e).scrollLeft}function wU(e){const t=Lr(e),n=Il(e),r=e.ownerDocument.body,o=$n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=$n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+oS(e);const s=-n.scrollTop;return Cn(r).direction==="rtl"&&(a+=$n(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function xU(e,t){const n=kn(e),r=Lr(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const l=Kp();(!l||l&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function SU(e,t){const n=Xo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=tn(e)?zi(e):yo(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,l=r*i.y;return{width:a,height:s,x:c,y:l}}function iS(e,t,n){let r;if(t==="viewport")r=xU(e,n);else if(t==="document")r=wU(Lr(e));else if(xt(t))r=SU(t,n);else{const o=rS(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Pl(r)}function aS(e,t){const n=Jo(e);return n===t||!xt(n)||ds(n)?!1:Cn(n).position==="fixed"||aS(n,t)}function EU(e,t){const n=t.get(e);if(n)return n;let r=go(e,[],!1).filter(s=>xt(s)&&vo(s)!=="body"),o=null;const i=Cn(e).position==="fixed";let a=i?Jo(e):e;for(;xt(a)&&!ds(a);){const s=Cn(a),c=Wp(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||fs(a)&&!c&&aS(e,a))?r=r.filter(u=>u!==a):o=s,a=Jo(a)}return t.set(e,r),r}function _U(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?EU(t,this._c):[].concat(n),r],s=a[0],c=a.reduce((l,u)=>{const f=iS(t,u,o);return l.top=$n(f.top,l.top),l.right=Bi(f.right,l.right),l.bottom=Bi(f.bottom,l.bottom),l.left=$n(f.left,l.left),l},iS(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function $U(e){return nS(e)}function kU(e,t,n){const r=tn(t),o=Lr(t),i=n==="fixed",a=Xo(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=yo(0);if(r||!r&&!i)if((vo(t)!=="body"||fs(o))&&(s=Il(t)),r){const l=Xo(t,!0,i,t);c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}else o&&(c.x=oS(o));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function sS(e,t){return!tn(e)||Cn(e).position==="fixed"?null:t?t(e):e.offsetParent}function cS(e,t){const n=kn(e);if(!tn(e))return n;let r=sS(e,t);for(;r&&oU(r)&&Cn(r).position==="static";)r=sS(r,t);return r&&(vo(r)==="html"||vo(r)==="body"&&Cn(r).position==="static"&&!Wp(r))?n:r||iU(e)||n}const CU=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||cS,i=this.getDimensions;return{reference:kU(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function OU(e){return Cn(e).direction==="rtl"}const TU={convertOffsetParentRelativeRectToViewportRelativeRect:gU,getDocumentElement:Lr,getClippingRect:_U,getOffsetParent:cS,getElementRects:CU,getClientRects:bU,getDimensions:$U,getScale:zi,isElement:xt,isRTL:OU};function AU(e,t){let n=null,r;const o=Lr(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:f,height:p}=e.getBoundingClientRect();if(s||t(),!f||!p)return;const d=Ui(u),h=Ui(o.clientWidth-(l+f)),m=Ui(o.clientHeight-(u+p)),v=Ui(l),g={rootMargin:-d+"px "+-h+"px "+-m+"px "+-v+"px",threshold:$n(0,Bi(1,c))||1};let b=!0;function k(S){const $=S[0].intersectionRatio;if($!==c){if(!b)return a();$?a(!1,$):r=setTimeout(()=>{a(!1,1e-7)},100)}b=!1}try{n=new IntersectionObserver(k,{...g,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,g)}n.observe(e)}return a(!0),i}function PU(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Zp(e),u=o||i?[...l?go(l):[],...go(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const f=l&&s?AU(l,n):null;let p=-1,d=null;a&&(d=new ResizeObserver(y=>{let[g]=y;g&&g.target===l&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{d&&d.observe(t)})),n()}),l&&!c&&d.observe(l),d.observe(t));let h,m=c?Xo(e):null;c&&v();function v(){const y=Xo(e);m&&(y.x!==m.x||y.y!==m.y||y.width!==m.width||y.height!==m.height)&&n(),m=y,h=requestAnimationFrame(v)}return n(),()=>{u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f&&f(),d&&d.disconnect(),d=null,c&&cancelAnimationFrame(h)}}const IU=(e,t,n)=>{const r=new Map,o={platform:TU,...n},i={...o.platform,_c:r};return fU(e,t,{...o,platform:i})};var Rl=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ml(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Ml(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ml(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function lS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function uS(e,t){const n=lS(e);return Math.round(t*n)/n}function fS(e){const t=C.useRef(e);return Rl(()=>{t.current=e}),t}function RU(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,f]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=C.useState(r);Ml(p,r)||d(r);const[h,m]=C.useState(null),[v,y]=C.useState(null),g=C.useCallback(j=>{j!=$.current&&($.current=j,m(j))},[m]),b=C.useCallback(j=>{j!==T.current&&(T.current=j,y(j))},[y]),k=i||h,S=a||v,$=C.useRef(null),T=C.useRef(null),R=C.useRef(u),B=fS(c),O=fS(o),M=C.useCallback(()=>{if(!$.current||!T.current)return;const j={placement:t,strategy:n,middleware:p};O.current&&(j.platform=O.current),IU($.current,T.current,j).then(W=>{const V={...W,isPositioned:!0};H.current&&!Ml(R.current,V)&&(R.current=V,GO.flushSync(()=>{f(V)}))})},[p,t,n,O]);Rl(()=>{l===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(j=>({...j,isPositioned:!1})))},[l]);const H=C.useRef(!1);Rl(()=>(H.current=!0,()=>{H.current=!1}),[]),Rl(()=>{if(k&&($.current=k),S&&(T.current=S),k&&S){if(B.current)return B.current(k,S,M);M()}},[k,S,M,B]);const L=C.useMemo(()=>({reference:$,floating:T,setReference:g,setFloating:b}),[g,b]),P=C.useMemo(()=>({reference:k,floating:S}),[k,S]),N=C.useMemo(()=>{const j={position:n,left:0,top:0};if(!P.floating)return j;const W=uS(P.floating,u.x),V=uS(P.floating,u.y);return s?{...j,transform:"translate("+W+"px, "+V+"px)",...lS(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:V}},[n,s,P.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:M,refs:L,elements:P,floatingStyles:N}),[u,M,L,P,N])}/*!
280
+ `);const g=v.state[s];if(g==null)return;JSON.stringify(o.getState())!==JSON.stringify(g)&&d(g);return}o.dispatchFromDevtools&&typeof o.dispatch=="function"&&o.dispatch(v)});case"DISPATCH":switch(m.payload.type){case"RESET":return d(h),s===void 0?u==null?void 0:u.init(o.getState()):u==null?void 0:u.init(Pl(l.name));case"COMMIT":if(s===void 0){u==null||u.init(o.getState());return}return u==null?void 0:u.init(Pl(l.name));case"ROLLBACK":return up(m.state,v=>{if(s===void 0){d(v),u==null||u.init(o.getState());return}d(v[s]),u==null||u.init(Pl(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return up(m.state,v=>{if(s===void 0){d(v);return}JSON.stringify(o.getState())!==JSON.stringify(v[s])&&d(v[s])});case"IMPORT_STATE":{const{nextLiftedState:v}=m.payload,g=(y=v.computedStates.slice(-1)[0])==null?void 0:y.state;if(!g)return;d(s===void 0?g:g[s]),u==null||u.send(null,v);return}case"PAUSE_RECORDING":return p=!p}return}}),h},up=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function _B(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var i;const a=l=>l===null?null:JSON.parse(l,t==null?void 0:t.reviver),s=(i=n.getItem(o))!=null?i:null;return s instanceof Promise?s.then(a):a(s)},setItem:(o,i)=>n.setItem(o,JSON.stringify(i,t==null?void 0:t.replacer)),removeItem:o=>n.removeItem(o)}}const _a=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return _a(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return _a(r)(n)}}}},TB=(e,t)=>(n,r,o)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:y=>y,version:0,merge:(y,v)=>({...v,...y}),...t},a=!1;const s=new Set,l=new Set;let c;try{c=i.getStorage()}catch{}if(!c)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...y)},r,o);const u=_a(i.serialize),f=()=>{const y=i.partialize({...r()});let v;const g=u({state:y,version:i.version}).then(b=>c.setItem(i.name,b)).catch(b=>{v=b});if(v)throw v;return g},p=o.setState;o.setState=(y,v)=>{p(y,v),f()};const d=e((...y)=>{n(...y),f()},r,o);let h;const m=()=>{var y;if(!c)return;a=!1,s.forEach(g=>g(r()));const v=((y=i.onRehydrateStorage)==null?void 0:y.call(i,r()))||void 0;return _a(c.getItem.bind(c))(i.name).then(g=>{if(g)return i.deserialize(g)}).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==i.version){if(i.migrate)return i.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var b;return h=i.merge(g,(b=r())!=null?b:d),n(h,!0),f()}).then(()=>{v==null||v(h,void 0),a=!0,l.forEach(g=>g(h))}).catch(g=>{v==null||v(void 0,g)})};return o.persist={setOptions:y=>{i={...i,...y},y.getStorage&&(c=y.getStorage())},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>m(),hasHydrated:()=>a,onHydrate:y=>(s.add(y),()=>{s.delete(y)}),onFinishHydration:y=>(l.add(y),()=>{l.delete(y)})},m(),h||d},CB=(e,t)=>(n,r,o)=>{let i={storage:_B(()=>localStorage),partialize:m=>m,version:0,merge:(m,y)=>({...y,...m}),...t},a=!1;const s=new Set,l=new Set;let c=i.storage;if(!c)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...m)},r,o);const u=()=>{const m=i.partialize({...r()});return c.setItem(i.name,{state:m,version:i.version})},f=o.setState;o.setState=(m,y)=>{f(m,y),u()};const p=e((...m)=>{n(...m),u()},r,o);let d;const h=()=>{var m,y;if(!c)return;a=!1,s.forEach(g=>{var b;return g((b=r())!=null?b:p)});const v=((y=i.onRehydrateStorage)==null?void 0:y.call(i,(m=r())!=null?m:p))||void 0;return _a(c.getItem.bind(c))(i.name).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==i.version){if(i.migrate)return i.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var b;return d=i.merge(g,(b=r())!=null?b:p),n(d,!0),u()}).then(()=>{v==null||v(d,void 0),d=r(),a=!0,l.forEach(g=>g(d))}).catch(g=>{v==null||v(void 0,g)})};return o.persist={setOptions:m=>{i={...i,...m},m.storage&&(c=m.storage)},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:m=>(s.add(m),()=>{s.delete(m)}),onFinishHydration:m=>(l.add(m),()=>{l.delete(m)})},i.skipHydration||h(),d||p},IB=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?TB(e,t):CB(e,t),mn=OB()(Wx(IB((e,t)=>({messageHistory:{},addMessageToHistory:({userId:n,message:r})=>e(o=>({...o,messageHistory:{...o.messageHistory,[n]:[r,...(o.messageHistory[n]??[]).slice(0,100)]}})),clientMode:"",setClientMode:n=>{const{clearAll:r,clientMode:o}=t();o!==n&&r(),e(i=>({...i,clientMode:n}))},setUser:n=>e(r=>({...r,user:n})),setConversationId:n=>e(r=>({...r,conversationId:n})),clearAll:()=>{e(n=>({...n,messageHistory:{},user:void 0,conversationId:void 0}))}}),{name:"botpress-webchat"}))),Vx=E.createContext(null),AB=e=>{const t={configuration:{},messages:{},connected:!0,disableComposer:!1,renderers:{},isReadOnly:!1,userData:{},userName:void 0,userPictureUrl:void 0,closeWindow:void 0,messageContainerRef:{current:null},isTyping:!1,lastTypingHeartbeat:null,allowFileUpload:!1,conversationId:void 0,disableRestartConversation:!1},n=e==null?void 0:e.client,r=e==null?void 0:e.conversationId,o=mn.getState().setClientMode,i=mn.getState().setConversationId;return n&&o(n.mode),E.useEffect(()=>{r&&i(r)},[r]),jx()(Wx((a,s)=>{const l=f=>{const p=mn.getState().conversationId;if(p)return a(d=>{const h=d.messages[p]??[];return{...d,messages:{...d.messages,[p]:[...h.filter(m=>m.id!==f.id),{id:na(),...f}]}}})},c=f=>{const p=mn.getState().conversationId;if(p)return a(d=>({...d,messages:{...d.messages,[p]:f}}))},u=mn.getState().addMessageToHistory;return{...t,...e,eventEmitter:eP,client:n,sendFile:f=>s().client.sendFile(f),sendTextMessage:async f=>{const p=s().client;l({id:na(),direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:"bubble",block:{type:"text",text:f}}}),p&&await p.sendMessage({type:"text",text:f}),p!=null&&p.userId&&u({message:f,userId:p.userId})},sendMessage:async f=>{const p=s().client;l({id:na(),direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:ra(f).payload}),p&&await p.sendMessage(f),p!=null&&p.userId&&f.type==="text"&&u({message:f.text,userId:p.userId})},on:(f,p)=>{const d=s().client;return d?d.on(f,p):()=>{}},getClientId:()=>{var f;return(f=s().client)==null?void 0:f.clientId},setHeaderMessage:f=>a({headerMessage:f}),setDisableComposer:f=>a({disableComposer:f}),setState:f=>a(p=>({...p,...f})),setMessages:c,getMessages:()=>s().messages[mn.getState().conversationId??""]??[],setIsTyping:(f,p)=>{a(d=>({...d,isTyping:f})),f&&(a(d=>({...d,lastTypingHeartbeat:new Date})),p&&setTimeout(()=>{const d=s().lastTypingHeartbeat;d&&new Date().getTime()-d.getTime()>p&&a(h=>({...h,isTyping:!1}))},p+100))},setLastTypingHeartbeat:f=>a(p=>({...p,lastTypingHeartbeat:f})),addMessage:l,setConnected:f=>a(p=>({...p,connected:f})),restartConversation:async()=>{const f=s().client,p=s().setMessages;f&&(await f.newConversation(),p([]))}}},{name:"webchatStore"}))};function Ie(e){const t=E.useContext(Vx);if(!t)throw new Error("Missing WebchatContext.Provider in the tree");return Hx(t,e)}const PB=({text:e,buttonValue:t,type:n,variant:r,groupId:o,reusable:i,...a})=>{const s=Ie(g=>g.eventEmitter),l=Ie(g=>g.sendTextMessage),c=Ie(g=>g.isReadOnly),[u,f]=E.useState(!1),[p,d]=E.useState(!1),[h,m]=E.useState(!1),{message:{blocks:{button:y}}}=st;E.useEffect(()=>{if(o)return s.on(`button-group-${o}-click`,()=>{d(!0),i||m(!0)})},[s,o,i]);function v(){o&&s.emit(`button-group-${o}-click`),f(!0),i||m(!0),r!=="link"&&l(t)}return L.jsx(RB,{...a,variant:r,onClick:v,disabled:h||c,"data-activated":u?"":void 0,"data-group-activated":p?"":void 0,"data-type":r,value:t,...y,children:e})},RB=e=>{if(e.variant==="link"){const{value:r,variant:o,...i}=e;return L.jsx("a",{...i,href:r,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...n}=e;return L.jsx("button",{type:"button",...n})},MB=E.forwardRef(({block:e,type:t,direction:n,timestamp:r,sender:o,...i},a)=>{const{message:{blocks:{bubble:s}}}=st;return L.jsx("div",{...i,...s,ref:a,children:L.jsx(gi,{direction:n,timestamp:r,sender:o,block:e})})}),Kx=E.createContext(null);function DB(){const e=E.useContext(Kx);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const Gx=E.createContext(null);function Zx(){const e=E.useContext(Gx);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}const Yx=E.createContext(null);function Jx(){const e=E.useContext(Yx);if(!e)throw new Error("useWebchatConfig must be used within a WebchatConfigProvider");return e}const jB=E.forwardRef(({url:e,type:t,orientation:n="auto",...r},o)=>{const i=E.useId(),{setIsLoading:a}=DB(),[s,l]=E.useState(n),[c,u]=E.useState(!1),{message:{blocks:{image:f}}}=st;return E.useLayoutEffect(()=>{a(p=>[...p,i])},[]),E.useEffect(()=>{e&&s==="auto"&&m4(e).then(({width:p,height:d})=>{l(NB(p,d)),a(h=>h.filter(m=>m!==i))})},[e]),L.jsxs(L.Fragment,{children:[c?null:L.jsx("div",{"data-orientation":s,...f.placeholder}),L.jsx("img",{"data-orientation":s,"data-loaded":c,...r,...f.image,src:e,alt:"",ref:o,loading:"lazy",onLoad:()=>{u(!0)}})]})});function NB(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((i,a)=>Math.abs(n[a]-r)<Math.abs(n[i]-r)?a:i)}const LB=E.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{video:o}}}=st;return L.jsx("div",{children:L.jsx("video",{...n,controls:!0,src:e,...o,ref:r})})}),FB=E.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{audio:o}}}=st;return L.jsx("div",{children:L.jsx("audio",{...n,controls:!0,src:e,...o,ref:r})})});function BB({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 0 1 .75.75v10.638l3.96-4.158a.75.75 0 1 1 1.08 1.04l-5.25 5.5a.75.75 0 0 1-1.08 0l-5.25-5.5a.75.75 0 1 1 1.08-1.04l3.96 4.158V3.75A.75.75 0 0 1 10 3Z",clipRule:"evenodd"}))}const UB=_.forwardRef(BB);function zB({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 0 1-9.201 2.466l-.312-.311h2.433a.75.75 0 0 0 0-1.5H3.989a.75.75 0 0 0-.75.75v4.242a.75.75 0 0 0 1.5 0v-2.43l.31.31a7 7 0 0 0 11.712-3.138.75.75 0 0 0-1.449-.39Zm1.23-3.723a.75.75 0 0 0 .219-.53V2.929a.75.75 0 0 0-1.5 0V5.36l-.31-.31A7 7 0 0 0 3.239 8.188a.75.75 0 1 0 1.448.389A5.5 5.5 0 0 1 13.89 6.11l.311.31h-2.432a.75.75 0 0 0 0 1.5h4.243a.75.75 0 0 0 .53-.219Z",clipRule:"evenodd"}))}const HB=_.forwardRef(zB);function qB({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const WB=_.forwardRef(qB);function VB({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{fillRule:"evenodd",d:"M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5V7.621a1.5 1.5 0 0 0-.44-1.06l-4.12-4.122A1.5 1.5 0 0 0 11.378 2H4.5Zm4.75 6.75a.75.75 0 0 1 1.5 0v2.546l.943-1.048a.75.75 0 0 1 1.114 1.004l-2.25 2.5a.75.75 0 0 1-1.114 0l-2.25-2.5a.75.75 0 1 1 1.114-1.004l.943 1.048V8.75Z",clipRule:"evenodd"}))}const KB=_.forwardRef(VB);function GB({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{fillRule:"evenodd",d:"m9.69 18.933.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 0 0 .281-.14c.186-.096.446-.24.757-.433.62-.384 1.445-.966 2.274-1.765C15.302 14.988 17 12.493 17 9A7 7 0 1 0 3 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 0 0 2.273 1.765 11.842 11.842 0 0 0 .976.544l.062.029.018.008.006.003ZM10 11.25a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5Z",clipRule:"evenodd"}))}const ZB=_.forwardRef(GB),YB=E.forwardRef(({type:e,latitude:t,longitude:n,title:r,...o},i)=>{const a=`https://www.google.com/maps/search/?api=1&query=${t},${n}`,{message:{blocks:{location:s}}}=st;return L.jsxs("a",{...o,...s.container,href:a,type:"_blank",rel:"noopener",ref:i,children:[L.jsx("p",{...s.title,children:r}),L.jsx(ZB,{...s.icon})]})}),JB=E.forwardRef(({blocks:e,type:t,horizontalAlignment:n,verticalAlignment:r,direction:o,sender:i,timestamp:a,...s},l)=>{const{message:{blocks:{column:c}}}=st;return L.jsx("div",{"data-horizontal":n,"data-vertical":r,...s,...c,ref:l,children:e.map((u,f)=>L.jsx(gi,{block:u,direction:o,sender:i,timestamp:a},f))})}),XB=E.forwardRef(({blocks:e,type:t,horizontalAlignment:n,verticalAlignment:r,direction:o,sender:i,timestamp:a,...s},l)=>{const{message:{blocks:{row:c}}}=st;return L.jsx("div",{"data-horizontal":n,"data-vertical":r,...s,...c,ref:l,children:e.map((u,f)=>L.jsx(gi,{block:u,direction:o,sender:i,timestamp:a},f))})});function QB(e){return Object.prototype.toString.call(e)==="[object Object]"}function Xx(e){return QB(e)||Array.isArray(e)}function e6(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function fp(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const o=JSON.stringify(Object.keys(e.breakpoints||{})),i=JSON.stringify(Object.keys(t.breakpoints||{}));return o!==i?!1:n.every(a=>{const s=e[a],l=t[a];return typeof s=="function"?`${s}`==`${l}`:!Xx(s)||!Xx(l)?s===l:fp(s,l)})}function Qx(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function t6(e,t){if(e.length!==t.length)return!1;const n=Qx(e),r=Qx(t);return n.every((o,i)=>{const a=r[i];return fp(o,a)})}function dp(e){return typeof e=="number"}function e1(e){return typeof e=="string"}function pp(e){return typeof e=="boolean"}function t1(e){return Object.prototype.toString.call(e)==="[object Object]"}function gt(e){return Math.abs(e)}function hp(e){return Math.sign(e)}function Rl(e,t){return gt(e-t)}function n6(e,t){if(e===0||t===0||gt(e)<=gt(t))return 0;const n=Rl(gt(e),gt(t));return gt(n/e)}function Ta(e){return Dl(e).map(Number)}function _r(e){return e[Ml(e)]}function Ml(e){return Math.max(0,e.length-1)}function Dl(e){return Object.keys(e)}function n1(e,t){return[e,t].reduce((n,r)=>(Dl(r).forEach(o=>{const i=n[o],a=r[o],s=t1(i)&&t1(a);n[o]=s?n1(i,a):a}),n),{})}function r1(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function r6(e,t){const n={start:r,center:o,end:i};function r(){return 0}function o(c){return i(c)/2}function i(c){return t-c}function a(){return t*Number(e)}function s(c){return dp(e)?a():n[e](c)}return{measure:s}}function o6(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",o=s(),i=l();function a(u){const{width:f,height:p}=u;return n==="x"?f:p}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function l(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:o,endEdge:i,measureSize:a}}function to(e,t){const n=gt(e-t);function r(c){return c<e}function o(c){return c>t}function i(c){return r(c)||o(c)}function a(c){return i(c)?r(c)?e:t:c}function s(c){return n?c-n*Math.ceil((c-t)/n):c}return{length:n,max:t,min:e,constrain:a,reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:s}}function o1(e,t,n){const{constrain:r}=to(0,e),o=e+1;let i=a(t);function a(p){return n?gt((o+p)%o):r(p)}function s(){return i}function l(p){return i=a(p),f}function c(p){return u().set(s()+p)}function u(){return o1(e,s(),n)}const f={get:s,set:l,add:c,clone:u};return f}function i6(e){const t=e==="rtl"?-1:1;function n(o){return o*t}return{apply:n}}function Ca(){let e=[];function t(o,i,a,s={passive:!0}){return o.addEventListener(i,a,s),e.push(()=>o.removeEventListener(i,a,s)),r}function n(){e=e.filter(o=>o())}const r={add:t,clear:n};return r}function a6(e,t,n,r,o,i,a,s,l,c,u,f,p,d,h,m,y,v,g){const{cross:b}=e,k=["INPUT","SELECT","TEXTAREA"],S={passive:!1},$=Ca(),C=Ca(),P=to(50,225).constrain(h.measure(20)),F={mouse:300,touch:400},T={mouse:500,touch:600},M=m?43:25;let q=!1,B=0,A=0,D=!1,N=!1,V=!1,W=!1;function j(Q,G){if(!G)return;function fe(Ee){(pp(G)||G(Q,Ee))&&ae(Ee)}const ve=n;$.add(ve,"dragstart",Ee=>Ee.preventDefault(),S).add(ve,"touchmove",()=>{},S).add(ve,"touchend",()=>{}).add(ve,"touchstart",fe).add(ve,"mousedown",fe).add(ve,"touchcancel",ce).add(ve,"contextmenu",ce).add(ve,"click",pe,!0)}function x(){$.clear(),C.clear()}function z(){const Q=W?r:n;C.add(Q,"touchmove",re,S).add(Q,"touchend",ce).add(Q,"mousemove",re,S).add(Q,"mouseup",ce)}function K(Q){const G=Q.nodeName||"";return k.includes(G)}function O(){return(m?T:F)[W?"mouse":"touch"]}function J(Q,G){const fe=p.add(hp(Q)*-1),ve=f.byDistance(Q,!m).distance;return m||gt(Q)<P?ve:v&&G?ve*.5:f.byIndex(fe.get(),0).distance}function ae(Q){const G=r1(Q,o);W=G,!(G&&Q.button!==0)&&(K(Q.target)||(V=m&&G&&!Q.buttons&&q,q=Rl(i.get(),s.get())>=2,D=!0,a.pointerDown(Q),u.useFriction(0).useDuration(0),i.set(s),z(),B=a.readPoint(Q),A=a.readPoint(Q,b),d.emit("pointerDown")))}function re(Q){const G=a.readPoint(Q),fe=a.readPoint(Q,b),ve=Rl(G,B),Ee=Rl(fe,A);if(!N&&!W&&(!Q.cancelable||(N=ve>Ee,!N)))return ce(Q);const R=a.pointerMove(Q);ve>y&&(V=!0),u.useFriction(.3).useDuration(1),l.start(),i.add(t.apply(R)),Q.preventDefault()}function ce(Q){const fe=f.byDistance(0,!1).index!==p.get(),ve=a.pointerUp(Q)*O(),Ee=J(t.apply(ve),fe),R=n6(ve,Ee),X=M-10*R,oe=g+R/50;N=!1,D=!1,C.clear(),u.useDuration(X).useFriction(oe),c.distance(Ee,!m),W=!1,d.emit("pointerUp")}function pe(Q){V&&(Q.stopPropagation(),Q.preventDefault())}function he(){return D}return{init:j,pointerDown:he,destroy:x}}function s6(e,t){let r,o;function i(f){return f.timeStamp}function a(f,p){const h=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(r1(f,t)?f:f.touches[0])[h]}function s(f){return r=f,o=f,a(f)}function l(f){const p=a(f)-a(o),d=i(f)-i(r)>170;return o=f,d&&(r=f),p}function c(f){if(!r||!o)return 0;const p=a(o)-a(r),d=i(f)-i(r),h=i(f)-i(o)>170,m=p/d;return d&&!h&&gt(m)>.1?m:0}return{pointerDown:s,pointerMove:l,pointerUp:c,readPoint:a}}function l6(e){function t(r){return e*(r/100)}return{measure:t}}function c6(e,t,n,r,o){let i,a,s=[],l=!1;function c(d){return o.measureSize(d.getBoundingClientRect())}function u(d,h){if(!h)return;a=c(e),s=r.map(c);function m(v){for(const g of v){const b=g.target===e,k=r.indexOf(g.target),S=b?a:s[k],$=c(b?e:r[k]);if(S!==$){n.requestAnimationFrame(()=>{d.reInit(),t.emit("resize")});break}}}i=new ResizeObserver(v=>{l||(pp(h)||h(d,v))&&m(v)}),[e].concat(r).forEach(v=>i.observe(v))}function f(){i&&i.disconnect(),l=!0}return{init:u,destroy:f}}function u6(e,t,n,r){let o=!0,i=0,a=0,s=n,l=r,c=e.get(),u=0;function f(){const S=t.get()-e.get(),$=!s;let C=0;return $?(i=0,e.set(t),C=S):(i+=S/s,i*=l,c+=i,e.add(i),C=c-u),a=hp(C),u=c,o=gt(S)<.001,k}function p(){return o}function d(){return s}function h(){return a}function m(){return i}function y(){return g(n)}function v(){return b(r)}function g(S){return s=S,k}function b(S){return l=S,k}const k={direction:h,duration:d,velocity:m,seek:f,settled:p,useBaseFriction:v,useBaseDuration:y,useFriction:b,useDuration:g};return k}function f6(e,t,n,r,o){const i=o.measure(10),a=o.measure(50),s=to(.1,.99);let l=!1;function c(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(d){if(!c())return;const h=e.reachedMin(t.get())?"min":"max",m=gt(e[h]-t.get()),y=n.get()-t.get(),v=s.constrain(m/a);n.subtract(y*v),!d&&gt(y)<i&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(d){l=!d}return{constrain:u,toggleActive:f}}function d6(e,t,n,r){const o=to(-t+e,n[0]),i=l(),a=c();function s(){const f=i[0],p=_r(i),d=i.lastIndexOf(f),h=i.indexOf(p)+1;return to(d,h)}function l(){return n.map(o.constrain).map(f=>parseFloat(f.toFixed(3)))}function c(){if(t<=e)return[o.max];if(r==="keepSnaps")return i;const{min:f,max:p}=s();return i.slice(f,p)}return{snapsContained:a}}function p6(e,t,n){const r=t[0],o=n?r-e:_r(t);return{limit:to(o,r)}}function h6(e,t,n,r){const i=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:l}=to(i,a);function c(p){return p===1?l(n.get()):p===-1?s(n.get()):!1}function u(p){if(!c(p))return;const d=e*(p*-1);r.forEach(h=>h.add(d))}return{loop:u}}function m6(e){const{max:t,length:n}=e;function r(i){return(i-t)/-n}return{get:r}}function v6(e,t,n,r,o,i,a){const{startEdge:s,endEdge:l}=e,{groupSlides:c}=i,u=d().map(t.measure),f=h(),p=m();function d(){return c(r).map(v=>_r(v)[l]-v[0][s]).map(gt)}function h(){return r.map(v=>n[s]-v[s]).map(v=>-gt(v))}function m(){const g=_r(f)-_r(o);return c(f).map(b=>b[0]).map((b,k,S)=>{const $=!k,C=k===Ml(S);return a&&$?0:a&&C?g:b+u[k]})}return{snaps:f,snapsAligned:p}}function y6(e,t,n,r,o){const{reachedAny:i,removeOffset:a,constrain:s}=r;function l(h){return h.concat().sort((m,y)=>gt(m)-gt(y))[0]}function c(h){const m=e?a(h):s(h),y=t.map(g=>g-m).map(g=>u(g,0)).map((g,b)=>({diff:g,index:b})).sort((g,b)=>gt(g.diff)-gt(b.diff)),{index:v}=y[0];return{index:v,distance:m}}function u(h,m){const y=[h,h+n,h-n];if(!e)return y[0];if(!m)return l(y);const v=y.filter(g=>hp(g)===m);return l(v)}function f(h,m){const y=t[h]-o.get(),v=u(y,m);return{index:h,distance:v}}function p(h,m){const y=o.get()+h,{index:v,distance:g}=c(y),b=!e&&i(y);if(!m||b)return{index:v,distance:h};const k=t[v]-g,S=h+u(k,0);return{index:v,distance:S}}return{byDistance:p,byIndex:f,shortcut:u}}function g6(e,t,n,r,o,i,a){function s(f){const p=f.distance,d=f.index!==t.get();i.add(p),p&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),d&&(n.set(t.get()),t.set(f.index),a.emit("select"))}function l(f,p){const d=r.byDistance(f,p);s(d)}function c(f,p){const d=t.clone().set(f),h=r.byIndex(d.get(),p);s(h)}return{distance:l,index:c}}function jl(e){let t=e;function n(){return t}function r(l){t=a(l)}function o(l){t+=a(l)}function i(l){t-=a(l)}function a(l){return dp(l)?l:l.get()}return{get:n,set:r,add:o,subtract:i}}function i1(e,t,n){const r=e.scroll==="x"?a:s,o=n.style;let i=!1;function a(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function l(p){i||(o.transform=r(t.apply(p)))}function c(p){i=!p}function u(){i||(o.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:u,to:l,toggleActive:c}}function b6(e,t,n,r,o,i,a,s,l){const c=Ta(o),u=Ta(o).reverse(),f=m().concat(y());function p(S,$){return S.reduce((C,P)=>C-o[P],$)}function d(S,$){return S.reduce((C,P)=>p(C,$)>0?C.concat([P]):C,[])}function h(S,$){const C=$==="start",P=C?-r:r,F=a.findSlideBounds([P]);return S.map(T=>{const M=C?0:-r,q=C?r:0,A=F.filter(D=>D.index===T)[0][C?"end":"start"];return{index:T,slideLocation:jl(-1),translate:i1(e,t,l[T]),target:()=>s.get()>A?M:q}})}function m(){const S=i[0]-1,$=d(u,S);return h($,"end")}function y(){const S=n-i[0]-1,$=d(c,S);return h($,"start")}function v(){return f.every(({index:S})=>{const $=c.filter(C=>C!==S);return p($,n)<=.1})}function g(){f.forEach(S=>{const{target:$,translate:C,slideLocation:P}=S,F=$();F!==P.get()&&(C.to(F),P.set(F))})}function b(){f.forEach(S=>S.translate.clear())}return{canLoop:v,clear:b,loop:g,loopPoints:f}}function w6(e,t){let n,r=!1;function o(s,l){if(!l)return;function c(u){for(const f of u)if(f.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(u=>{r||(pp(l)||l(s,u))&&c(u)}),n.observe(e,{childList:!0})}function i(){n&&n.disconnect(),r=!0}return{init:o,destroy:i}}function x6(e,t,n,r,o,i,a){const{removeOffset:s,constrain:l}=o,c=.5,u=i?[0,t,-t]:[0],f=d(u,a);function p(y){const v=y||0;return n.map(g=>to(c,g-c).constrain(g*v))}function d(y,v){const g=y||u,b=p(v);return g.reduce((k,S)=>{const $=r.map((C,P)=>({start:C-n[P]+b[P]+S,end:C+e-b[P]+S,index:P}));return k.concat($)},[])}function h(y,v){const g=i?s(y):l(y);return(v||f).reduce((k,S)=>{const{index:$,start:C,end:P}=S,F=k.includes($),T=C<g&&P>g;return!F&&T?k.concat([$]):k},[])}return{check:h,findSlideBounds:d}}function S6(e,t,n,r,o,i){const{measureSize:a,startEdge:s,endEdge:l}=e,c=n[0]&&o,u=h(),f=m(),p=n.map(a),d=y();function h(){if(!c)return 0;const g=n[0];return gt(t[s]-g[s])}function m(){if(!c)return 0;const g=i.getComputedStyle(_r(r));return parseFloat(g.getPropertyValue(`margin-${l}`))}function y(){return n.map((g,b,k)=>{const S=!b,$=b===Ml(k);return S?p[b]+u:$?p[b]+f:k[b+1][s]-g[s]}).map(gt)}return{slideSizes:p,slideSizesWithGaps:d}}function E6(e,t,n){const r=dp(n);function o(l,c){return Ta(l).filter(u=>u%c===0).map(u=>l.slice(u,u+c))}function i(l){return Ta(l).reduce((c,u)=>{const p=t.slice(_r(c),u+1).reduce((d,h)=>d+h,0);return!u||p>e?c.concat(u):c},[]).map((c,u,f)=>l.slice(c,f[u+1]))}function a(l){return r?o(l,n):i(l)}return{groupSlides:a}}function $6(e,t,n,r,o,i,a,s){const{align:l,axis:c,direction:u,startIndex:f,inViewThreshold:p,loop:d,duration:h,dragFree:m,dragThreshold:y,slidesToScroll:v,skipSnaps:g,containScroll:b}=i,k=t.getBoundingClientRect(),S=n.map(oe=>oe.getBoundingClientRect()),$=i6(u),C=o6(c,u),P=C.measureSize(k),F=l6(P),T=r6(l,P),M=!d&&!!b,q=d||!!b,{slideSizes:B,slideSizesWithGaps:A}=S6(C,k,S,n,q,o),D=E6(P,A,v),{snaps:N,snapsAligned:V}=v6(C,T,k,S,A,D,M),W=-_r(N)+_r(A),{snapsContained:j}=d6(P,W,V,b),x=M?j:V,{limit:z}=p6(W,x,d),K=o1(Ml(x),f,d),O=K.clone(),J=Ta(n),ae=({dragHandler:oe,scrollBody:ee,scrollBounds:xe,eventHandler:be,animation:Oe,options:{loop:Ne}})=>{const _e=oe.pointerDown();Ne||xe.constrain(_e);const U=ee.seek().settled();U&&!_e&&(Oe.stop(),be.emit("settle")),U||be.emit("scroll")},re=({scrollBody:oe,translate:ee,location:xe,offsetLocation:be,scrollLooper:Oe,slideLooper:Ne,options:{loop:_e}},U)=>{const Z=oe.velocity();be.set(xe.get()-Z+Z*U),_e&&(Oe.loop(oe.direction()),Ne.loop()),ee.to(be.get())},ce={start:()=>s.start(X),stop:()=>s.stop(X),update:()=>ae(X),render:oe=>re(X,oe)},pe=.68,he=x[K.get()],le=jl(he),Q=jl(he),G=jl(he),fe=u6(le,G,h,pe),ve=y6(d,x,W,z,G),Ee=g6(ce,K,O,ve,fe,G,a),R=x6(P,W,B,N,z,d,p),X={ownerDocument:r,ownerWindow:o,eventHandler:a,containerRect:k,slideRects:S,animation:ce,axis:C,direction:$,dragHandler:a6(C,$,e,r,o,G,s6(C,o),le,ce,Ee,fe,ve,K,a,F,m,y,g,pe),eventStore:Ca(),percentOfView:F,index:K,indexPrevious:O,limit:z,location:le,offsetLocation:Q,options:i,resizeHandler:c6(t,a,o,n,C),scrollBody:fe,scrollBounds:f6(z,le,G,fe,F),scrollLooper:h6(W,z,Q,[le,Q,G]),scrollProgress:m6(z),scrollSnaps:x,scrollTarget:ve,scrollTo:Ee,slideLooper:b6(C,$,P,W,A,x,R,Q,n),slidesHandler:w6(t,a),slidesInView:R,slideIndexes:J,slidesToScroll:D,target:G,translate:i1(C,$,t)};return X}function O6(e){const t=16.666666666666668;let n=[],r=null,o=0,i=0;function a(f){r||(r=f);const p=f-r;for(r=f,o+=p;o>=t;)n.forEach(({animation:h})=>h.update()),o-=t;const d=gt(o/t);n.forEach(({animation:h})=>h.render(d)),i&&e.requestAnimationFrame(a)}function s(f){n.includes(f)||n.push(f),!i&&(i=e.requestAnimationFrame(a))}function l(f){n=n.filter(p=>p!==f),!n.length&&(e.cancelAnimationFrame(i),r=null,o=0,i=0)}function c(){r=null,o=0}return{start:s,stop:l,reset:c,window:e}}function k6(){const e={};let t;function n(l){t=l}function r(l){return e[l]||[]}function o(l){return r(l).forEach(c=>c(t,l)),s}function i(l,c){return e[l]=r(l).concat([c]),s}function a(l,c){return e[l]=r(l).filter(u=>u!==c),s}const s={init:n,emit:o,off:a,on:i};return s}const _6={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,breakpoints:{},dragFree:!1,dragThreshold:10,inViewThreshold:0,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function T6(e){function t(i,a){return n1(i,a||{})}function n(i){const a=i.breakpoints||{},s=Dl(a).filter(l=>e.matchMedia(l).matches).map(l=>a[l]).reduce((l,c)=>t(l,c),{});return t(i,s)}function r(i){return i.map(a=>Dl(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function C6(e){let t=[];function n(i,a){return t=i.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),i.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function r(){t=t.filter(i=>i.destroy())}return{init:n,destroy:r}}function fi(e,t,n){const r=e.ownerDocument,o=r.defaultView,i=T6(o),a=C6(i),s=Ca(),l=Ca(),c=k6(),{animationRealms:u}=fi,{mergeOptions:f,optionsAtMedia:p,optionsMediaQueries:d}=i,{on:h,off:m,emit:y}=c,v=B;let g=!1,b,k=f(_6,fi.globalOptions),S=f(k),$=[],C,P,F;function T(){const{container:fe,slides:ve}=S;P=(e1(fe)?e.querySelector(fe):fe)||e.children[0];const R=e1(ve)?P.querySelectorAll(ve):ve;F=[].slice.call(R||P.children)}function M(fe,ve){const Ee=$6(e,P,F,r,o,fe,c,ve);if(fe.loop&&!Ee.slideLooper.canLoop()){const R=Object.assign({},fe,{loop:!1});return M(R,ve)}return Ee}function q(fe,ve){if(g)return;const Ee=u.find(X=>X.window===o),R=Ee||O6(o);Ee||u.push(R),k=f(k,fe),S=p(k),$=ve||$,T(),b=M(S,R),d([k,...$.map(({options:X})=>X)]).forEach(X=>s.add(X,"change",B)),S.active&&(b.translate.to(b.location.get()),b.eventHandler.init(G),b.resizeHandler.init(G,S.watchResize),b.slidesHandler.init(G,S.watchSlides),l.add(r,"visibilitychange",()=>{r.hidden&&R.reset()}),b.options.loop&&b.slideLooper.loop(),P.offsetParent&&F.length&&b.dragHandler.init(G,S.watchDrag),C=a.init($,G))}function B(fe,ve){const Ee=ae();A(),q(f({startIndex:Ee},fe),ve),c.emit("reInit")}function A(){b.dragHandler.destroy(),b.animation.stop(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),a.destroy(),s.clear(),l.clear()}function D(){g||(g=!0,s.clear(),A(),c.emit("destroy"))}function N(fe){const ve=b[fe?"target":"location"].get(),Ee=S.loop?"removeOffset":"constrain";return b.slidesInView.check(b.limit[Ee](ve))}function V(fe){const ve=N(fe);return b.slideIndexes.filter(Ee=>!ve.includes(Ee))}function W(fe,ve,Ee){!S.active||g||(b.scrollBody.useBaseFriction().useDuration(ve?0:S.duration),b.scrollTo.index(fe,Ee||0))}function j(fe){const ve=b.index.add(1).get();W(ve,fe===!0,-1)}function x(fe){const ve=b.index.add(-1).get();W(ve,fe===!0,1)}function z(){return b.index.add(1).get()!==ae()}function K(){return b.index.add(-1).get()!==ae()}function O(){return b.scrollSnaps.map(b.scrollProgress.get)}function J(){return b.scrollProgress.get(b.location.get())}function ae(){return b.index.get()}function re(){return b.indexPrevious.get()}function ce(){return C}function pe(){return b}function he(){return e}function le(){return P}function Q(){return F}const G={canScrollNext:z,canScrollPrev:K,containerNode:le,internalEngine:pe,destroy:D,off:m,on:h,emit:y,plugins:ce,previousScrollSnap:re,reInit:v,rootNode:he,scrollNext:j,scrollPrev:x,scrollProgress:J,scrollSnapList:O,scrollTo:W,selectedScrollSnap:ae,slideNodes:Q,slidesInView:N,slidesNotInView:V};return q(t,n),setTimeout(()=>c.emit("init"),0),G}fi.animationRealms=[],fi.globalOptions=void 0;function mp(e={},t=[]){const n=E.useRef(e),r=E.useRef(t),[o,i]=E.useState(),[a,s]=E.useState(),l=E.useCallback(()=>{o&&o.reInit(n.current,r.current)},[o]);return E.useEffect(()=>{if(e6()&&a){fi.globalOptions=mp.globalOptions;const c=fi(a,n.current,r.current);return i(c),()=>c.destroy()}else i(void 0)},[a,i]),E.useEffect(()=>{fp(n.current,e)||(n.current=e,l())},[e,l]),E.useEffect(()=>{t6(r.current,t)||(r.current=t,l())},[t,l]),[s,o]}mp.globalOptions=void 0;function I6({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const A6=_.forwardRef(I6);function P6({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const R6=_.forwardRef(P6);function M6({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{fillRule:"evenodd",d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625ZM7.5 15a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 7.5 15Zm.75 2.25a.75.75 0 0 0 0 1.5H12a.75.75 0 0 0 0-1.5H8.25Z",clipRule:"evenodd"}),_.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"}))}const D6=_.forwardRef(M6);function j6({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M1.5 8.67v8.58a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V8.67l-8.928 5.493a3 3 0 0 1-3.144 0L1.5 8.67Z"}),_.createElement("path",{d:"M22.5 6.908V6.75a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3v.158l9.714 5.978a1.5 1.5 0 0 0 1.572 0L22.5 6.908Z"}))}const N6=_.forwardRef(j6);function L6({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M21.721 12.752a9.711 9.711 0 0 0-.945-5.003 12.754 12.754 0 0 1-4.339 2.708 18.991 18.991 0 0 1-.214 4.772 17.165 17.165 0 0 0 5.498-2.477ZM14.634 15.55a17.324 17.324 0 0 0 .332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 0 0 .332 4.647 17.385 17.385 0 0 0 5.268 0ZM9.772 17.119a18.963 18.963 0 0 0 4.456 0A17.182 17.182 0 0 1 12 21.724a17.18 17.18 0 0 1-2.228-4.605ZM7.777 15.23a18.87 18.87 0 0 1-.214-4.774 12.753 12.753 0 0 1-4.34-2.708 9.711 9.711 0 0 0-.944 5.004 17.165 17.165 0 0 0 5.498 2.477ZM21.356 14.752a9.765 9.765 0 0 1-7.478 6.817 18.64 18.64 0 0 0 1.988-4.718 18.627 18.627 0 0 0 5.49-2.098ZM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 0 0 1.988 4.718 9.765 9.765 0 0 1-7.478-6.816ZM13.878 2.43a9.755 9.755 0 0 1 6.116 3.986 11.267 11.267 0 0 1-3.746 2.504 18.63 18.63 0 0 0-2.37-6.49ZM12 2.276a17.152 17.152 0 0 1 2.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0 1 12 2.276ZM10.122 2.43a18.629 18.629 0 0 0-2.37 6.49 11.266 11.266 0 0 1-3.746-2.504 9.754 9.754 0 0 1 6.116-3.985Z"}))}const F6=_.forwardRef(L6);function B6({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{fillRule:"evenodd",d:"M12 1.5a5.25 5.25 0 0 0-5.25 5.25v3a3 3 0 0 0-3 3v6.75a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3v-6.75a3 3 0 0 0-3-3v-3c0-2.9-2.35-5.25-5.25-5.25Zm3.75 8.25v-3a3.75 3.75 0 1 0-7.5 0v3h7.5Z",clipRule:"evenodd"}))}const U6=_.forwardRef(B6);function z6({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{fillRule:"evenodd",d:"M1.5 4.5a3 3 0 0 1 3-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 0 1-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 0 0 6.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 0 1 1.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 0 1-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5Z",clipRule:"evenodd"}))}const H6=_.forwardRef(z6),q6=E.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r},o)=>{const[i,a]=mp({skipSnaps:!0}),[s,l]=E.useState(!0),[c,u]=E.useState(!0),f=E.useCallback(()=>a==null?void 0:a.scrollPrev(),[a]),p=E.useCallback(()=>a==null?void 0:a.scrollNext(),[a]),{message:{blocks:{carousel:d}}}=st,h=E.useCallback(m=>{l(!m.canScrollPrev()),u(!m.canScrollNext())},[]);return E.useEffect(()=>{a&&(h(a),a.on("reInit",h),a.on("select",h))},[a,h]),L.jsxs("div",{...d==null?void 0:d.container,"data-container":"carousel",ref:i,children:[L.jsx("div",{ref:o,...d==null?void 0:d.slidesContainer,children:e.map((m,y)=>L.jsx(gi,{block:m,direction:t,sender:n,timestamp:r},y))}),L.jsx(A6,{...d==null?void 0:d.backButton,"data-disabled":s?"":void 0,onClick:f}),L.jsx(R6,{...d==null?void 0:d.nextButton,"data-disabled":c?"":void 0,onClick:p})]})}),di=Math.min,vn=Math.max,Nl=Math.round,pi=Math.floor,no=e=>({x:e,y:e});function a1(e,t,n){return vn(e,di(t,n))}function Ll(e,t){return typeof e=="function"?e(t):e}function Ia(e){return e.split("-")[0]}function vp(e){return e.split("-")[1]}function s1(e){return e==="x"?"y":"x"}function W6(e){return e==="y"?"height":"width"}function Aa(e){return["top","bottom"].includes(Ia(e))?"y":"x"}function V6(e){return s1(Aa(e))}function K6(e){return{top:0,right:0,bottom:0,left:0,...e}}function G6(e){return typeof e!="number"?K6(e):{top:e,right:e,bottom:e,left:e}}function Fl(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function ro(e){return l1(e)?(e.nodeName||"").toLowerCase():"#document"}function yn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Tr(e){var t;return(t=(l1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function l1(e){return e instanceof Node||e instanceof yn(e).Node}function bt(e){return e instanceof Element||e instanceof yn(e).Element}function Yt(e){return e instanceof HTMLElement||e instanceof yn(e).HTMLElement}function yp(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof yn(e).ShadowRoot}function Pa(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=gn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Z6(e){return["table","td","th"].includes(ro(e))}function gp(e){const t=bp(),n=gn(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Y6(e){let t=Po(e);for(;Yt(t)&&!Ra(t);){if(gp(t))return t;t=Po(t)}return null}function bp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ra(e){return["html","body","#document"].includes(ro(e))}function gn(e){return yn(e).getComputedStyle(e)}function Bl(e){return bt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Po(e){if(ro(e)==="html")return e;const t=e.assignedSlot||e.parentNode||yp(e)&&e.host||Tr(e);return yp(t)?t.host:t}function c1(e){const t=Po(e);return Ra(t)?e.ownerDocument?e.ownerDocument.body:e.body:Yt(t)&&Pa(t)?t:c1(t)}function oo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=c1(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=yn(o);return i?t.concat(a,a.visualViewport||[],Pa(o)?o:[],a.frameElement&&n?oo(a.frameElement):[]):t.concat(o,oo(o,[],n))}function io(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function ln(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&yp(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function u1(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function J6(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function f1(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(u1())||t.test(J6()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function d1(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function p1(){return/apple/i.test(navigator.vendor)}function X6(){return u1().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function h1(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Q6(e){return"nativeEvent"in e}function e7(e){return e.matches("html,body")}function Ln(e){return(e==null?void 0:e.ownerDocument)||document}function wp(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function m1(e){return"composedPath"in e?e.composedPath()[0]:e.target}const t7="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function v1(e){return Yt(e)&&e.matches(t7)}function Ut(e){e.preventDefault(),e.stopPropagation()}function y1(e,t,n){let{reference:r,floating:o}=e;const i=Aa(t),a=V6(t),s=W6(a),l=Ia(t),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let d;switch(l){case"top":d={x:u,y:r.y-o.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(vp(t)){case"start":d[a]-=p*(n&&c?-1:1);break;case"end":d[a]+=p*(n&&c?-1:1);break}return d}const n7=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=y1(c,r,l),p=r,d={},h=0;for(let m=0;m<s.length;m++){const{name:y,fn:v}=s[m],{x:g,y:b,data:k,reset:S}=await v({x:u,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:d,rects:c,platform:a,elements:{reference:e,floating:t}});if(u=g??u,f=b??f,d={...d,[y]:{...d[y],...k}},S&&h<=50){h++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(c=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:f}=y1(c,p,l)),m=-1;continue}}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}};async function g1(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=Ll(t,e),h=G6(d),y=s[p?f==="floating"?"reference":"floating":f],v=Fl(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),g=f==="floating"?{...a.floating,x:r,y:o}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),k=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},S=Fl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:g,offsetParent:b,strategy:l}):g);return{top:(v.top-S.top+h.top)/k.y,bottom:(S.bottom-v.bottom+h.bottom)/k.y,left:(v.left-S.left+h.left)/k.x,right:(S.right-v.right+h.right)/k.x}}async function r7(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Ia(n),s=vp(n),l=Aa(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,f=Ll(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof h=="number"&&(d=s==="end"?h*-1:h),l?{x:d*u,y:p*c}:{x:p*c,y:d*u}}const o7=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await r7(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},i7=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:v,y:g}=y;return{x:v,y:g}}},...l}=Ll(e,t),c={x:n,y:r},u=await g1(t,l),f=Aa(Ia(o)),p=s1(f);let d=c[p],h=c[f];if(i){const y=p==="y"?"top":"left",v=p==="y"?"bottom":"right",g=d+u[y],b=d-u[v];d=a1(g,d,b)}if(a){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",g=h+u[y],b=h-u[v];h=a1(g,h,b)}const m=s.fn({...t,[p]:d,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},a7=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Ll(e,t),l=await g1(t,s),c=Ia(n),u=vp(n),f=Aa(n)==="y",{width:p,height:d}=r.floating;let h,m;c==="top"||c==="bottom"?(h=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=c,h=u==="end"?"top":"bottom");const y=d-l[h],v=p-l[m],g=!t.middlewareData.shift;let b=y,k=v;if(f){const $=p-l.left-l.right;k=u||g?di(v,$):$}else{const $=d-l.top-l.bottom;b=u||g?di(y,$):$}if(g&&!u){const $=vn(l.left,0),C=vn(l.right,0),P=vn(l.top,0),F=vn(l.bottom,0);f?k=p-2*($!==0||C!==0?$+C:vn(l.left,l.right)):b=d-2*(P!==0||F!==0?P+F:vn(l.top,l.bottom))}await a({...t,availableWidth:k,availableHeight:b});const S=await o.getDimensions(i.floating);return p!==S.width||d!==S.height?{reset:{rects:!0}}:{}}}};function b1(e){const t=gn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Yt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Nl(n)!==i||Nl(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function xp(e){return bt(e)?e:e.contextElement}function hi(e){const t=xp(e);if(!Yt(t))return no(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=b1(t);let a=(i?Nl(n.width):n.width)/r,s=(i?Nl(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const s7=no(0);function w1(e){const t=yn(e);return!bp()||!t.visualViewport?s7:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function l7(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==yn(e)?!1:t}function Ro(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=xp(e);let a=no(1);t&&(r?bt(r)&&(a=hi(r)):a=hi(e));const s=l7(i,n,r)?w1(i):no(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){const p=yn(i),d=r&&bt(r)?yn(r):r;let h=p.frameElement;for(;h&&r&&d!==p;){const m=hi(h),y=h.getBoundingClientRect(),v=gn(h),g=y.left+(h.clientLeft+parseFloat(v.paddingLeft))*m.x,b=y.top+(h.clientTop+parseFloat(v.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,f*=m.y,l+=g,c+=b,h=yn(h).frameElement}}return Fl({width:u,height:f,x:l,y:c})}function c7(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Yt(n),i=Tr(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s=no(1);const l=no(0);if((o||!o&&r!=="fixed")&&((ro(n)!=="body"||Pa(i))&&(a=Bl(n)),Yt(n))){const c=Ro(n);s=hi(n),l.x=c.x+n.clientLeft,l.y=c.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}}function u7(e){return Array.from(e.getClientRects())}function x1(e){return Ro(Tr(e)).left+Bl(e).scrollLeft}function f7(e){const t=Tr(e),n=Bl(e),r=e.ownerDocument.body,o=vn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=vn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+x1(e);const s=-n.scrollTop;return gn(r).direction==="rtl"&&(a+=vn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function d7(e,t){const n=yn(e),r=Tr(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=bp();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function p7(e,t){const n=Ro(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Yt(e)?hi(e):no(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:a,height:s,x:l,y:c}}function S1(e,t,n){let r;if(t==="viewport")r=d7(e,n);else if(t==="document")r=f7(Tr(e));else if(bt(t))r=p7(t,n);else{const o=w1(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Fl(r)}function E1(e,t){const n=Po(e);return n===t||!bt(n)||Ra(n)?!1:gn(n).position==="fixed"||E1(n,t)}function h7(e,t){const n=t.get(e);if(n)return n;let r=oo(e,[],!1).filter(s=>bt(s)&&ro(s)!=="body"),o=null;const i=gn(e).position==="fixed";let a=i?Po(e):e;for(;bt(a)&&!Ra(a);){const s=gn(a),l=gp(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Pa(a)&&!l&&E1(e,a))?r=r.filter(u=>u!==a):o=s,a=Po(a)}return t.set(e,r),r}function m7(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?h7(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const f=S1(t,u,o);return c.top=vn(f.top,c.top),c.right=di(f.right,c.right),c.bottom=di(f.bottom,c.bottom),c.left=vn(f.left,c.left),c},S1(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function v7(e){return b1(e)}function y7(e,t,n){const r=Yt(t),o=Tr(t),i=n==="fixed",a=Ro(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=no(0);if(r||!r&&!i)if((ro(t)!=="body"||Pa(o))&&(s=Bl(t)),r){const c=Ro(t,!0,i,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else o&&(l.x=x1(o));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function $1(e,t){return!Yt(e)||gn(e).position==="fixed"?null:t?t(e):e.offsetParent}function O1(e,t){const n=yn(e);if(!Yt(e))return n;let r=$1(e,t);for(;r&&Z6(r)&&gn(r).position==="static";)r=$1(r,t);return r&&(ro(r)==="html"||ro(r)==="body"&&gn(r).position==="static"&&!gp(r))?n:r||Y6(e)||n}const g7=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||O1,i=this.getDimensions;return{reference:y7(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function b7(e){return gn(e).direction==="rtl"}const w7={convertOffsetParentRelativeRectToViewportRelativeRect:c7,getDocumentElement:Tr,getClippingRect:m7,getOffsetParent:O1,getElementRects:g7,getClientRects:u7,getDimensions:v7,getScale:hi,isElement:bt,isRTL:b7};function x7(e,t){let n=null,r;const o=Tr(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:f,height:p}=e.getBoundingClientRect();if(s||t(),!f||!p)return;const d=pi(u),h=pi(o.clientWidth-(c+f)),m=pi(o.clientHeight-(u+p)),y=pi(c),g={rootMargin:-d+"px "+-h+"px "+-m+"px "+-y+"px",threshold:vn(0,di(1,l))||1};let b=!0;function k(S){const $=S[0].intersectionRatio;if($!==l){if(!b)return a();$?a(!1,$):r=setTimeout(()=>{a(!1,1e-7)},100)}b=!1}try{n=new IntersectionObserver(k,{...g,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,g)}n.observe(e)}return a(!0),i}function S7(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=xp(e),u=o||i?[...c?oo(c):[],...oo(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const f=c&&s?x7(c,n):null;let p=-1,d=null;a&&(d=new ResizeObserver(v=>{let[g]=v;g&&g.target===c&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{d&&d.observe(t)})),n()}),c&&!l&&d.observe(c),d.observe(t));let h,m=l?Ro(e):null;l&&y();function y(){const v=Ro(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,h=requestAnimationFrame(y)}return n(),()=>{u.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),f&&f(),d&&d.disconnect(),d=null,l&&cancelAnimationFrame(h)}}const E7=(e,t,n)=>{const r=new Map,o={platform:w7,...n},i={...o.platform,_c:r};return n7(e,t,{...o,platform:i})};var Ul=typeof document<"u"?E.useLayoutEffect:E.useEffect;function zl(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!zl(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!zl(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function k1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _1(e,t){const n=k1(e);return Math.round(t*n)/n}function T1(e){const t=_.useRef(e);return Ul(()=>{t.current=e}),t}function $7(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,f]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=_.useState(r);zl(p,r)||d(r);const[h,m]=_.useState(null),[y,v]=_.useState(null),g=_.useCallback(N=>{N!=$.current&&($.current=N,m(N))},[m]),b=_.useCallback(N=>{N!==C.current&&(C.current=N,v(N))},[v]),k=i||h,S=a||y,$=_.useRef(null),C=_.useRef(null),P=_.useRef(u),F=T1(l),T=T1(o),M=_.useCallback(()=>{if(!$.current||!C.current)return;const N={placement:t,strategy:n,middleware:p};T.current&&(N.platform=T.current),E7($.current,C.current,N).then(V=>{const W={...V,isPositioned:!0};q.current&&!zl(P.current,W)&&(P.current=W,GC.flushSync(()=>{f(W)}))})},[p,t,n,T]);Ul(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(N=>({...N,isPositioned:!1})))},[c]);const q=_.useRef(!1);Ul(()=>(q.current=!0,()=>{q.current=!1}),[]),Ul(()=>{if(k&&($.current=k),S&&(C.current=S),k&&S){if(F.current)return F.current(k,S,M);M()}},[k,S,M,F]);const B=_.useMemo(()=>({reference:$,floating:C,setReference:g,setFloating:b}),[g,b]),A=_.useMemo(()=>({reference:k,floating:S}),[k,S]),D=_.useMemo(()=>{const N={position:n,left:0,top:0};if(!A.floating)return N;const V=_1(A.floating,u.x),W=_1(A.floating,u.y);return s?{...N,transform:"translate("+V+"px, "+W+"px)",...k1(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:W}},[n,s,A.floating,u.x,u.y]);return _.useMemo(()=>({...u,update:M,refs:B,elements:A,floatingStyles:D}),[u,M,B,A,D])}/*!
281
281
  * tabbable 6.2.0
282
282
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
283
- */var MU=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Yp=MU.join(","),dS=typeof Element>"u",ps=dS?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Nl=!dS&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Dl=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},NU=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},DU=function(t,n,r){if(Dl(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Yp));return n&&ps.call(t,Yp)&&o.unshift(t),o=o.filter(r),o},jU=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Dl(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),c=s.length?s:a.children,l=e(c,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:a,candidates:l})}else{var u=ps.call(a,Yp);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Dl(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&p){var d=e(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:a,candidates:d})}else i.unshift.apply(i,a.children)}}return o},pS=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},hS=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||NU(t))&&!pS(t)?0:t.tabIndex},FU=function(t,n){var r=hS(t);return r<0&&n&&!pS(t)?0:r},LU=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},mS=function(t){return t.tagName==="INPUT"},BU=function(t){return mS(t)&&t.type==="hidden"},UU=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},zU=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},qU=function(t){if(!t.name)return!0;var n=t.form||Nl(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=zU(o,t.form);return!i||i===t},HU=function(t){return mS(t)&&t.type==="radio"},VU=function(t){return HU(t)&&!qU(t)},WU=function(t){var n,r=t&&Nl(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,c;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&o;){var l,u,f;r=Nl(o),o=(l=r)===null||l===void 0?void 0:l.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},yS=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},KU=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=ps.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(ps.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var c=t.parentElement,l=Nl(t);if(c&&!c.shadowRoot&&o(c)===!0)return yS(t);t.assignedSlot?t=t.assignedSlot:!c&&l!==t.ownerDocument?t=l.host:t=c}t=s}if(WU(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return yS(t);return!1},GU=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return ps.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},ZU=function(t,n){return!(n.disabled||Dl(n)||BU(n)||KU(n,t)||UU(n)||GU(n))},vS=function(t,n){return!(VU(n)||hS(n)<0||!ZU(t,n))},YU=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},JU=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,c=FU(s,a),l=a?e(o.candidates):s;c===0?a?n.push.apply(n,l):n.push(s):r.push({documentOrder:i,tabIndex:c,item:o,isScope:a,content:l})}),r.sort(LU).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Jp=function(t,n){n=n||{};var r;return n.getShadowRoot?r=jU([t],n.includeContainer,{filter:vS.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:YU}):r=DU(t,n.includeContainer,vS.bind(null,n)),JU(r)};const Xp="ArrowUp",jl="ArrowDown",qi="ArrowLeft",hs="ArrowRight";function Fl(e,t,n){return Math.floor(e/t)!==n}function ms(e,t){return t<0||t>=e.current.length}function Qp(e,t){return nn(e,{disabledIndices:t})}function gS(e,t){return nn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function nn(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do{var c,l;s=s+(r?-i:i)}while(s>=0&&s<=a.length-1&&(o?o.includes(s):a[s]==null||(c=a[s])!=null&&c.hasAttribute("disabled")||((l=a[s])==null?void 0:l.getAttribute("aria-disabled"))==="true"));return s}function XU(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:c,prevIndex:l,stopEvent:u=!1}=t,f=l;if(n.key===Xp){if(u&&Wt(n),l===-1)f=c;else if(f=nn(e,{startingIndex:f,amount:i,decrement:!0,disabledIndices:a}),o&&(l-i<s||f<0)){const p=l%i,d=c%i,h=c-(d-p);d===p?f=c:f=d>p?h:h-i}ms(e,f)&&(f=l)}if(n.key===jl&&(u&&Wt(n),l===-1?f=s:(f=nn(e,{startingIndex:l,amount:i,disabledIndices:a}),o&&l+i>c&&(f=nn(e,{startingIndex:l%i-i,amount:i,disabledIndices:a}))),ms(e,f)&&(f=l)),r==="both"){const p=Ui(l/i);n.key===hs&&(u&&Wt(n),l%i!==i-1?(f=nn(e,{startingIndex:l,disabledIndices:a}),o&&Fl(f,i,p)&&(f=nn(e,{startingIndex:l-l%i-1,disabledIndices:a}))):o&&(f=nn(e,{startingIndex:l-l%i-1,disabledIndices:a})),Fl(f,i,p)&&(f=l)),n.key===qi&&(u&&Wt(n),l%i!==0?(f=nn(e,{startingIndex:l,disabledIndices:a,decrement:!0}),o&&Fl(f,i,p)&&(f=nn(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:a}))):o&&(f=nn(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:a})),Fl(f,i,p)&&(f=l));const d=Ui(c/i)===p;ms(e,f)&&(o&&d?f=n.key===qi?c:nn(e,{startingIndex:l-l%i-1,disabledIndices:a}):f=l)}return f}let bS=0;function Br(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(bS);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():bS=requestAnimationFrame(i)}var Pt=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ll(){return Ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ll.apply(this,arguments)}let eh=!1,QU=0;const wS=()=>"floating-ui-"+QU++;function e9(){const[e,t]=C.useState(()=>eh?wS():void 0);return Pt(()=>{e==null&&t(wS())},[]),C.useEffect(()=>{eh||(eh=!0)},[]),e}const th=C["useId".toString()]||e9;function t9(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const n9=C.createContext(null),r9=C.createContext(null),xS=()=>{var e;return((e=C.useContext(n9))==null?void 0:e.id)||null},Bl=()=>C.useContext(r9);function ys(e){return"data-floating-ui-"+e}function wo(e){const t=E.useRef(e);return Pt(()=>{t.current=e}),t}function o9(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function Hi(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function i9(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Hi(e,i).forEach(c=>{o(c.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let Vi=new WeakMap,Ul=new WeakSet,zl={},nh=0;const a9=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,SS=e=>e&&(e.host||SS(e.parentNode)),s9=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=SS(n);return e.contains(r)?r:null}).filter(n=>n!=null);function c9(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=s9(t,e),s=new Set,c=new Set(a),l=[];zl[o]||(zl[o]=new WeakMap);const u=zl[o];a.forEach(f),p(t),s.clear();function f(d){!d||s.has(d)||(s.add(d),d.parentNode&&f(d.parentNode))}function p(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,h=>{if(s.has(h))p(h);else{const m=i?h.getAttribute(i):null,v=m!==null&&m!=="false",y=(Vi.get(h)||0)+1,g=(u.get(h)||0)+1;Vi.set(h,y),u.set(h,g),l.push(h),y===1&&v&&Ul.add(h),g===1&&h.setAttribute(o,""),!v&&i&&h.setAttribute(i,"true")}})}return nh++,()=>{l.forEach(d=>{const h=(Vi.get(d)||0)-1,m=(u.get(d)||0)-1;Vi.set(d,h),u.set(d,m),h||(!Ul.has(d)&&i&&d.removeAttribute(i),Ul.delete(d)),m||d.removeAttribute(o)}),nh--,nh||(Vi=new WeakMap,Vi=new WeakMap,Ul=new WeakSet,zl={})}}function ES(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Gn(e[0]).body;return c9(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const rh=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function _S(e,t){const n=Jp(e,rh());t==="prev"&&n.reverse();const r=n.indexOf(bo(Gn(e)));return n.slice(r+1)[0]}function $S(){return _S(document.body,"next")}function kS(){return _S(document.body,"prev")}function vs(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!yn(n,r)}function l9(e){Jp(e,rh()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function u9(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const oh={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let f9;function CS(e){e.key==="Tab"&&(e.target,clearTimeout(f9))}const ql=C.forwardRef(function(t,n){const[r,o]=C.useState();Pt(()=>(Yx()&&o("button"),document.addEventListener("keydown",CS),()=>{document.removeEventListener("keydown",CS)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[ys("focus-guard")]:"",style:oh};return C.createElement("span",Ll({},t,i))}),OS=C.createContext(null);function d9(e){let{id:t,root:n}=e===void 0?{}:e;const[r,o]=C.useState(null),i=th(),a=TS(),s=C.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:i}),[t,n,a,i]),c=C.useRef();return Pt(()=>()=>{r==null||r.remove()},[r,s]),Pt(()=>{if(c.current===s)return;c.current=s;const{id:l,root:u,portalContext:f,uniqueId:p}=s,d=l?document.getElementById(l):null,h=ys("portal");if(d){const m=document.createElement("div");m.id=p,m.setAttribute(h,""),d.appendChild(m),o(m)}else{let m=u||(f==null?void 0:f.portalNode);m&&!xt(m)&&(m=m.current),m=m||document.body;let v=null;l&&(v=document.createElement("div"),v.id=l,m.appendChild(v));const y=document.createElement("div");y.id=p,y.setAttribute(h,""),m=v||m,m.appendChild(y),o(y)}},[s]),r}function p9(e){let{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e;const i=d9({id:n,root:r}),[a,s]=C.useState(null),c=C.useRef(null),l=C.useRef(null),u=C.useRef(null),f=C.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return C.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function d(h){i&&vs(h)&&(h.type==="focusin"?u9:l9)(i)}return i.addEventListener("focusin",d,!0),i.addEventListener("focusout",d,!0),()=>{i.removeEventListener("focusin",d,!0),i.removeEventListener("focusout",d,!0)}},[i,o,a==null?void 0:a.modal]),C.createElement(OS.Provider,{value:C.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&C.createElement(ql,{"data-type":"outside",ref:c,onFocus:d=>{if(vs(d,i)){var h;(h=u.current)==null||h.focus()}else{const m=kS()||(a==null?void 0:a.refs.domReference.current);m==null||m.focus()}}}),p&&i&&C.createElement("span",{"aria-owns":i.id,style:oh}),i&&rr.createPortal(t,i),p&&i&&C.createElement(ql,{"data-type":"outside",ref:l,onFocus:d=>{if(vs(d,i)){var h;(h=f.current)==null||h.focus()}else{const m=$S()||(a==null?void 0:a.refs.domReference.current);m==null||m.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,d.nativeEvent))}}}))}const TS=()=>C.useContext(OS),h9=C.forwardRef(function(t,n){return C.createElement("button",Ll({},t,{type:"button",ref:n,tabIndex:-1,style:oh}))});function m9(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,modal:c=!0,visuallyHiddenDismiss:l=!1,closeOnFocusOut:u=!0}=e,{open:f,refs:p,nodeId:d,onOpenChange:h,events:m,dataRef:v,elements:{domReference:y,floating:g}}=t,b=a9()?i:!0,k=wo(o),S=wo(a),$=wo(s),T=Bl(),R=TS(),B=typeof a=="number"&&a<0,O=C.useRef(null),M=C.useRef(null),H=C.useRef(!1),L=C.useRef(null),P=C.useRef(!1),N=R!=null,j=y&&y.getAttribute("role")==="combobox"&&Qx(y)&&B,W=C.useCallback(function(z){return z===void 0&&(z=g),z?Jp(z,rh()):[]},[g]),V=C.useCallback(z=>{const K=W(z);return k.current.map(_=>y&&_==="reference"?y:g&&_==="floating"?g:K).filter(Boolean).flat()},[y,g,k,W]);C.useEffect(()=>{if(r||!c)return;function z(_){if(_.key==="Tab"){yn(g,bo(Gn(g)))&&W().length===0&&!j&&Wt(_);const J=V(),ae=Xx(_);k.current[0]==="reference"&&ae===y&&(Wt(_),_.shiftKey?Br(J[J.length-1]):Br(J[1])),k.current[1]==="floating"&&ae===g&&_.shiftKey&&(Wt(_),Br(J[0]))}}const K=Gn(g);return K.addEventListener("keydown",z),()=>{K.removeEventListener("keydown",z)}},[r,y,g,c,k,p,j,W,V]),C.useEffect(()=>{if(r||!u)return;function z(){P.current=!0,setTimeout(()=>{P.current=!1})}function K(_){const J=_.relatedTarget;queueMicrotask(()=>{const ae=!(yn(y,J)||yn(g,J)||yn(J,g)||yn(R==null?void 0:R.portalNode,J)||J!=null&&J.hasAttribute(ys("focus-guard"))||T&&(Hi(T.nodesRef.current,d).find(re=>{var le,pe;return yn((le=re.context)==null?void 0:le.elements.floating,J)||yn((pe=re.context)==null?void 0:pe.elements.domReference,J)})||o9(T.nodesRef.current,d).find(re=>{var le,pe;return((le=re.context)==null?void 0:le.elements.floating)===J||((pe=re.context)==null?void 0:pe.elements.domReference)===J})));J&&ae&&!P.current&&J!==L.current&&(H.current=!0,h(!1,_))})}if(g&&tn(y))return y.addEventListener("focusout",K),y.addEventListener("pointerdown",z),!c&&g.addEventListener("focusout",K),()=>{y.removeEventListener("focusout",K),y.removeEventListener("pointerdown",z),!c&&g.removeEventListener("focusout",K)}},[r,y,g,c,d,T,R,h,u]),C.useEffect(()=>{var z;if(r)return;const K=Array.from((R==null||(z=R.portalNode)==null?void 0:z.querySelectorAll("["+ys("portal")+"]"))||[]);if(g){const _=[g,...K,O.current,M.current,k.current.includes("reference")||j?y:null].filter(ae=>ae!=null),J=c?ES(_,b,!b):ES(_);return()=>{J()}}},[r,y,g,c,k,R,j,b]),Pt(()=>{if(r||!g)return;const z=Gn(g),K=bo(z);queueMicrotask(()=>{const _=V(g),J=S.current,ae=(typeof J=="number"?_[J]:J.current)||g,re=yn(g,K);!B&&!re&&f&&Br(ae,{preventScroll:ae===g})})},[r,f,g,B,V,S]),Pt(()=>{if(r||!g)return;let z=!1;const K=Gn(g),_=bo(K),J=v.current;L.current=_;function ae(re){if(re.type==="escapeKey"&&p.domReference.current&&(L.current=p.domReference.current),["referencePress","escapeKey"].includes(re.type))return;const le=re.data.returnFocus;typeof le=="object"?(H.current=!1,z=le.preventScroll):H.current=!le}return m.on("dismiss",ae),()=>{m.off("dismiss",ae);const re=bo(K);(yn(g,re)||T&&Hi(T.nodesRef.current,d).some(pe=>{var me;return yn((me=pe.context)==null?void 0:me.elements.floating,re)})||J.openEvent&&["click","mousedown"].includes(J.openEvent.type))&&p.domReference.current&&(L.current=p.domReference.current),$.current&&tn(L.current)&&!H.current&&Br(L.current,{cancelPrevious:!1,preventScroll:z})}},[r,g,$,v,p,m,T,d]),Pt(()=>{if(!(r||!R))return R.setFocusManagerState({modal:c,closeOnFocusOut:u,open:f,onOpenChange:h,refs:p}),()=>{R.setFocusManagerState(null)}},[r,R,c,f,h,p,u]),Pt(()=>{if(!r&&g&&typeof MutationObserver=="function"&&!B){const z=()=>{const _=g.getAttribute("tabindex");k.current.includes("floating")||bo(Gn(g))!==p.domReference.current&&W().length===0?_!=="0"&&g.setAttribute("tabindex","0"):_!=="-1"&&g.setAttribute("tabindex","-1")};z();const K=new MutationObserver(z);return K.observe(g,{childList:!0,subtree:!0,attributes:!0}),()=>{K.disconnect()}}},[r,g,p,k,W,B]);function D(z){return r||!l||!c?null:C.createElement(h9,{ref:z==="start"?O:M,onClick:K=>h(!1,K.nativeEvent)},typeof l=="string"?l:"Dismiss")}const w=!r&&b&&!j&&(N||c);return C.createElement(C.Fragment,null,w&&C.createElement(ql,{"data-type":"inside",ref:R==null?void 0:R.beforeInsideRef,onFocus:z=>{if(c){const _=V();Br(o[0]==="reference"?_[0]:_[_.length-1])}else if(R!=null&&R.preserveTabOrder&&R.portalNode)if(H.current=!1,vs(z,R.portalNode)){const _=$S()||y;_==null||_.focus()}else{var K;(K=R.beforeOutsideRef.current)==null||K.focus()}}}),!j&&D("start"),n,D("end"),w&&C.createElement(ql,{"data-type":"inside",ref:R==null?void 0:R.afterInsideRef,onFocus:z=>{if(c)Br(V()[0]);else if(R!=null&&R.preserveTabOrder&&R.portalNode)if(u&&(H.current=!0),vs(z,R.portalNode)){const _=kS()||y;_==null||_.focus()}else{var K;(K=R.afterOutsideRef.current)==null||K.focus()}}}))}function AS(e){return tn(e.target)&&e.target.tagName==="BUTTON"}function PS(e){return Qx(e)}function y9(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:c=!0,ignoreMouse:l=!1,keyboardHandlers:u=!0}=t,f=C.useRef(),p=C.useRef(!1);return C.useMemo(()=>a?{reference:{onPointerDown(d){f.current=d.pointerType},onMouseDown(d){d.button===0&&(Jx(f.current,!0)&&l||s!=="click"&&(n&&c&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,d.nativeEvent):(d.preventDefault(),r(!0,d.nativeEvent))))},onClick(d){if(s==="mousedown"&&f.current){f.current=void 0;return}Jx(f.current,!0)&&l||(n&&c&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,d.nativeEvent):r(!0,d.nativeEvent))},onKeyDown(d){f.current=void 0,!(d.defaultPrevented||!u||AS(d))&&(d.key===" "&&!PS(i)&&(d.preventDefault(),p.current=!0),d.key==="Enter"&&r(!(n&&c),d.nativeEvent))},onKeyUp(d){d.defaultPrevented||!u||AS(d)||PS(i)||d.key===" "&&p.current&&(p.current=!1,r(!(n&&c),d.nativeEvent))}}}:{},[a,o,s,l,u,i,c,n,r])}const v9=C["useInsertionEffect".toString()]||(e=>e());function xo(e){const t=C.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return v9(()=>{t.current=e}),C.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const g9={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},b9={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},w9=e=>{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function x9(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,nodeId:i,elements:{reference:a,domReference:s,floating:c},dataRef:l}=e,{enabled:u=!0,escapeKey:f=!0,outsidePress:p=!0,outsidePressEvent:d="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:v=!1,bubbles:y}=t,g=Bl(),b=xS()!=null,k=xo(typeof p=="function"?p:()=>!1),S=typeof p=="function"?k:p,$=C.useRef(!1),{escapeKeyBubbles:T,outsidePressBubbles:R}=w9(y),B=xo(M=>{if(!n||!u||!f||M.key!=="Escape")return;const H=g?Hi(g.nodesRef.current,i):[];if(!T&&(M.stopPropagation(),H.length>0)){let L=!0;if(H.forEach(P=>{var N;if((N=P.context)!=null&&N.open&&!P.context.dataRef.current.__escapeKeyBubbles){L=!1;return}}),!L)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,cU(M)?M.nativeEvent:M)}),O=xo(M=>{const H=$.current;if($.current=!1,H||typeof S=="function"&&!S(M))return;const L=Xx(M),P="["+ys("inert")+"]",N=Gn(c).querySelectorAll(P);let j=xt(L)?L:null;for(;j&&!ds(j);){const D=Jo(j);if(D===Gn(c).body||!xt(D))break;j=D}if(N.length&&xt(L)&&!lU(L)&&!yn(L,c)&&Array.from(N).every(D=>!yn(j,D)))return;if(tn(L)&&c){const D=L.clientWidth>0&&L.scrollWidth>L.clientWidth,w=L.clientHeight>0&&L.scrollHeight>L.clientHeight;let z=w&&M.offsetX>L.clientWidth;if(w&&Cn(L).direction==="rtl"&&(z=M.offsetX<=L.offsetWidth-L.clientWidth),z||D&&M.offsetY>L.clientHeight)return}const W=g&&Hi(g.nodesRef.current,i).some(D=>{var w;return Gp(M,(w=D.context)==null?void 0:w.elements.floating)});if(Gp(M,c)||Gp(M,s)||W)return;const V=g?Hi(g.nodesRef.current,i):[];if(V.length>0){let D=!0;if(V.forEach(w=>{var z;if((z=w.context)!=null&&z.open&&!w.context.dataRef.current.__outsidePressBubbles){D=!1;return}}),!D)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:Gx(M)||Zx(M)}}),r(!1,M)});return C.useEffect(()=>{if(!n||!u)return;l.current.__escapeKeyBubbles=T,l.current.__outsidePressBubbles=R;function M(P){r(!1,P)}const H=Gn(c);f&&H.addEventListener("keydown",B),S&&H.addEventListener(d,O);let L=[];return v&&(xt(s)&&(L=go(s)),xt(c)&&(L=L.concat(go(c))),!xt(a)&&a&&a.contextElement&&(L=L.concat(go(a.contextElement)))),L=L.filter(P=>{var N;return P!==((N=H.defaultView)==null?void 0:N.visualViewport)}),L.forEach(P=>{P.addEventListener("scroll",M,{passive:!0})}),()=>{f&&H.removeEventListener("keydown",B),S&&H.removeEventListener(d,O),L.forEach(P=>{P.removeEventListener("scroll",M)})}},[l,c,s,a,f,S,d,n,r,v,u,T,R,B,O]),C.useEffect(()=>{$.current=!1},[S,d]),C.useMemo(()=>u?{reference:{onKeyDown:B,[g9[m]]:M=>{h&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,M.nativeEvent))}},floating:{onKeyDown:B,[b9[d]]:()=>{$.current=!0}}}:{},[u,o,h,d,m,r,B])}let ih;process.env.NODE_ENV!=="production"&&(ih=new Set);function S9(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:o}=e;if(process.env.NODE_ENV!=="production"){var i;const T="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((i=e.elements)!=null&&i.reference&&!xt(e.elements.reference)){var a;if(!((a=ih)!=null&&a.has(T))){var s;(s=ih)==null||s.add(T),console.error(T)}}}const[c,l]=C.useState(null),u=((t=e.elements)==null?void 0:t.reference)||c,f=RU(e),p=Bl(),d=xo((T,R)=>{T&&(m.current.openEvent=R),r==null||r(T,R)}),h=C.useRef(null),m=C.useRef({}),v=C.useState(()=>t9())[0],y=th(),g=C.useCallback(T=>{const R=xt(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),contextElement:T}:T;f.refs.setReference(R)},[f.refs]),b=C.useCallback(T=>{(xt(T)||T===null)&&(h.current=T,l(T)),(xt(f.refs.reference.current)||f.refs.reference.current===null||T!==null&&!xt(T))&&f.refs.setReference(T)},[f.refs]),k=C.useMemo(()=>({...f.refs,setReference:b,setPositionReference:g,domReference:h}),[f.refs,b,g]),S=C.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),$=C.useMemo(()=>({...f,refs:k,elements:S,dataRef:m,nodeId:o,floatingId:y,events:v,open:n,onOpenChange:d}),[f,o,y,v,n,d,k,S]);return Pt(()=>{const T=p==null?void 0:p.nodesRef.current.find(R=>R.id===o);T&&(T.context=$)}),C.useMemo(()=>({...f,context:$,refs:k,elements:S}),[f,k,S,$])}function ah(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[n]:null).concat(e).reduce((o,i)=>(i&&Object.entries(i).forEach(a=>{let[s,c]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof c=="function"){var l;(l=r.get(s))==null||l.push(c),o[s]=function(){for(var u,f=arguments.length,p=new Array(f),d=0;d<f;d++)p[d]=arguments[d];return(u=r.get(s))==null?void 0:u.map(h=>h(...p)).find(h=>h!==void 0)}}}else o[s]=c}),o),{})}}function E9(e){e===void 0&&(e=[]);const t=e,n=C.useCallback(i=>ah(i,e,"reference"),t),r=C.useCallback(i=>ah(i,e,"floating"),t),o=C.useCallback(i=>ah(i,e,"item"),e.map(i=>i==null?void 0:i.item));return C.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])}let IS=!1;function Hl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function RS(e,t){return Hl(t,e===Xp||e===jl,e===qi||e===hs)}function sh(e,t,n){return Hl(t,e===jl,n?e===qi:e===hs)||e==="Enter"||e==" "||e===""}function _9(e,t,n){return Hl(t,n?e===qi:e===hs,e===jl)}function MS(e,t,n){return Hl(t,n?e===hs:e===qi,e===Xp)}function $9(e,t){const{open:n,onOpenChange:r,refs:o,elements:{domReference:i,floating:a}}=e,{listRef:s,activeIndex:c,onNavigate:l=()=>{},enabled:u=!0,selectedIndex:f=null,allowEscape:p=!1,loop:d=!1,nested:h=!1,rtl:m=!1,virtual:v=!1,focusItemOnOpen:y="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:b=!0,disabledIndices:k=void 0,orientation:S="vertical",cols:$=1,scrollItemIntoView:T=!0,virtualItemRef:R}=t;process.env.NODE_ENV!=="production"&&(p&&(d||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),v||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),S==="vertical"&&$>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const B=xS(),O=Bl(),M=xo(l),H=C.useRef(y),L=C.useRef(f??-1),P=C.useRef(null),N=C.useRef(!0),j=C.useRef(M),W=C.useRef(!!a),V=C.useRef(!1),D=C.useRef(!1),w=wo(k),z=wo(n),K=wo(T),[_,J]=C.useState(),[ae,re]=C.useState(),le=xo(function(ce,Q,G){G===void 0&&(G=!1);const fe=ce.current[Q.current];fe&&(v?(J(fe.id),O==null||O.events.emit("virtualfocus",fe),R&&(R.current=fe)):Br(fe,{preventScroll:!0,sync:sU()&&Yx()?IS||V.current:!1}),requestAnimationFrame(()=>{const ve=K.current;ve&&fe&&(G||!N.current)&&(fe.scrollIntoView==null||fe.scrollIntoView(typeof ve=="boolean"?{block:"nearest",inline:"nearest"}:ve))}))});Pt(()=>{document.createElement("div").focus({get preventScroll(){return IS=!0,!1}})},[]),Pt(()=>{u&&(n&&a?H.current&&f!=null&&(D.current=!0,M(f)):W.current&&(L.current=-1,j.current(null)))},[u,n,a,f,M]),Pt(()=>{if(u&&n&&a)if(c==null){if(V.current=!1,f!=null)return;if(W.current&&(L.current=-1,le(s,L)),!W.current&&H.current&&(P.current!=null||H.current===!0&&P.current==null)){let ce=0;const Q=()=>{s.current[0]==null?(ce<2&&(ce?requestAnimationFrame:queueMicrotask)(Q),ce++):(L.current=P.current==null||sh(P.current,S,m)||h?Qp(s,w.current):gS(s,w.current),P.current=null,M(L.current))};Q()}}else ms(s,c)||(L.current=c,le(s,L,D.current),D.current=!1)},[u,n,a,c,f,h,s,S,m,M,le,w]),Pt(()=>{var ce,Q;if(!u||a||!O||v||!W.current)return;const G=O.nodesRef.current,fe=(ce=G.find(I=>I.id===B))==null||(Q=ce.context)==null?void 0:Q.elements.floating,ve=bo(Gn(a)),_e=G.some(I=>I.context&&yn(I.context.elements.floating,ve));fe&&!_e&&N.current&&fe.focus({preventScroll:!0})},[u,a,O,B,v]),Pt(()=>{if(!u||!O||!v||B)return;function ce(Q){re(Q.id),R&&(R.current=Q)}return O.events.on("virtualfocus",ce),()=>{O.events.off("virtualfocus",ce)}},[u,O,v,B,R]),Pt(()=>{j.current=M,W.current=!!a}),Pt(()=>{n||(P.current=null)},[n]);const pe=c!=null,me=C.useMemo(()=>{function ce(G){if(!n)return;const fe=s.current.indexOf(G);fe!==-1&&M(fe)}return{onFocus(G){let{currentTarget:fe}=G;ce(fe)},onClick:G=>{let{currentTarget:fe}=G;return fe.focus({preventScroll:!0})},...g&&{onMouseMove(G){let{currentTarget:fe}=G;ce(fe)},onPointerLeave(G){let{pointerType:fe}=G;!N.current||fe==="touch"||(L.current=-1,le(s,L),M(null),v||Br(o.floating.current,{preventScroll:!0}))}}}},[n,o,le,g,s,M,v]);return C.useMemo(()=>{if(!u)return{};const ce=w.current;function Q(I){if(N.current=!1,V.current=!0,!z.current&&I.currentTarget===o.floating.current)return;if(h&&MS(I.key,S,m)){Wt(I),r(!1,I.nativeEvent),tn(i)&&!v&&i.focus();return}const X=L.current,oe=Qp(s,ce),ee=gS(s,ce);if(I.key==="Home"&&(Wt(I),L.current=oe,M(L.current)),I.key==="End"&&(Wt(I),L.current=ee,M(L.current)),!($>1&&(L.current=XU(s,{event:I,orientation:S,loop:d,cols:$,disabledIndices:ce,minIndex:oe,maxIndex:ee,prevIndex:L.current,stopEvent:!0}),M(L.current),S==="both"))&&RS(I.key,S)){if(Wt(I),n&&!v&&bo(I.currentTarget.ownerDocument)===I.currentTarget){L.current=sh(I.key,S,m)?oe:ee,M(L.current);return}sh(I.key,S,m)?d?L.current=X>=ee?p&&X!==s.current.length?-1:oe:nn(s,{startingIndex:X,disabledIndices:ce}):L.current=Math.min(ee,nn(s,{startingIndex:X,disabledIndices:ce})):d?L.current=X<=oe?p&&X!==-1?s.current.length:ee:nn(s,{startingIndex:X,decrement:!0,disabledIndices:ce}):L.current=Math.max(oe,nn(s,{startingIndex:X,decrement:!0,disabledIndices:ce})),ms(s,L.current)?M(null):M(L.current)}}function G(I){y==="auto"&&Gx(I.nativeEvent)&&(H.current=!0)}function fe(I){H.current=y,y==="auto"&&Zx(I.nativeEvent)&&(H.current=!0)}const ve=v&&n&&pe&&{"aria-activedescendant":ae||_},_e=s.current.find(I=>(I==null?void 0:I.id)===_);return{reference:{...ve,onKeyDown(I){N.current=!1;const X=I.key.indexOf("Arrow")===0,oe=_9(I.key,S,m),ee=MS(I.key,S,m),Se=RS(I.key,S),xe=(h?oe:Se)||I.key==="Enter"||I.key.trim()==="";if(v&&n){const U=O==null?void 0:O.nodesRef.current.find(q=>q.parentId==null),Z=O&&U?i9(O.nodesRef.current,U.id):null;if(X&&Z&&R){const q=new KeyboardEvent("keydown",{key:I.key,bubbles:!0});if(oe||ee){var ke,Fe;const te=((ke=Z.context)==null?void 0:ke.elements.domReference)===I.currentTarget,de=ee&&!te?(Fe=Z.context)==null?void 0:Fe.elements.domReference:oe?_e:null;de&&(Wt(I),de.dispatchEvent(q),re(void 0))}if(Se&&Z.context&&Z.context.open&&Z.parentId&&I.currentTarget!==Z.context.elements.domReference){var Te;Wt(I),(Te=Z.context.elements.domReference)==null||Te.dispatchEvent(q);return}}return Q(I)}if(!(!n&&!b&&X)){if(xe&&(P.current=h&&Se?null:I.key),h){oe&&(Wt(I),n?(L.current=Qp(s,ce),M(L.current)):r(!0,I.nativeEvent));return}Se&&(f!=null&&(L.current=f),Wt(I),!n&&b?r(!0,I.nativeEvent):Q(I),n&&M(L.current))}},onFocus(){n&&M(null)},onPointerDown:fe,onMouseDown:G,onClick:G},floating:{"aria-orientation":S==="both"?void 0:S,...ve,onKeyDown:Q,onPointerMove(){N.current=!0}},item:me}},[i,o,_,ae,w,z,s,u,S,m,v,n,pe,h,f,b,p,$,d,y,M,r,me,O,R])}function k9(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:o=!0,role:i="dialog"}=t,a=th();return C.useMemo(()=>{const s={id:r,role:i};return o?i==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":n?r:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:a}},floating:{...s,...i==="menu"&&{"aria-labelledby":a}}}:{}},[o,i,n,r,a])}function C9(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:c,enabled:l=!0,findMatch:u=null,resetMs:f=750,ignoreKeys:p=[],selectedIndex:d=null}=t,h=C.useRef(),m=C.useRef(""),v=C.useRef((n=d??a)!=null?n:-1),y=C.useRef(null),g=xo(s),b=xo(c),k=wo(u),S=wo(p);return Pt(()=>{r&&(clearTimeout(h.current),y.current=null,m.current="")},[r]),Pt(()=>{if(r&&m.current===""){var $;v.current=($=d??a)!=null?$:-1}},[r,d,a]),C.useMemo(()=>{if(!l)return{};function $(B){B?o.current.typing||(o.current.typing=B,b(B)):o.current.typing&&(o.current.typing=B,b(B))}function T(B,O,M){const H=k.current?k.current(O,M):O.find(L=>(L==null?void 0:L.toLocaleLowerCase().indexOf(M.toLocaleLowerCase()))===0);return H?B.indexOf(H):-1}function R(B){const O=i.current;if(m.current.length>0&&m.current[0]!==" "&&(T(O,O,m.current)===-1?$(!1):B.key===" "&&Wt(B)),O==null||S.current.includes(B.key)||B.key.length!==1||B.ctrlKey||B.metaKey||B.altKey)return;r&&B.key!==" "&&(Wt(B),$(!0)),O.every(P=>{var N,j;return P?((N=P[0])==null?void 0:N.toLocaleLowerCase())!==((j=P[1])==null?void 0:j.toLocaleLowerCase()):!0})&&m.current===B.key&&(m.current="",v.current=y.current),m.current+=B.key,clearTimeout(h.current),h.current=setTimeout(()=>{m.current="",v.current=y.current,$(!1)},f);const H=v.current,L=T(O,[...O.slice((H||0)+1),...O.slice(0,(H||0)+1)],m.current);L!==-1?(g(L),y.current=L):B.key!==" "&&(m.current="",$(!1))}return{reference:{onKeyDown:R},floating:{onKeyDown:R,onKeyUp(B){B.key===" "&&$(!1)}}}},[l,r,o,i,f,S,k,g,b])}const O9=({options:e,label:t,reusable:n})=>{var j,W,V,D,w;const r=Pe(z=>z.sendTextMessage),o=Pe(z=>z.messageContainerRef),i=Pe(z=>z.isReadOnly),[a,s]=C.useState(!1),[c,l]=C.useState(null),[u,f]=C.useState(null),{message:{blocks:{dropdown:p}}}=ct,d=e.reduce((z,K)=>(z[K.label]=K.value,z),{}),h=d?Object.keys(d):[],m=z=>{s(u!==null&&!n?!1:z)},{refs:v,floatingStyles:y,context:g}=S9({placement:"bottom-start",open:a,onOpenChange:m,whileElementsMounted:PU,middleware:[pU(5),hU({padding:10,boundary:(o==null?void 0:o.current)??void 0,crossAxis:!0}),mU({apply({rects:z,elements:K,availableHeight:_}){Object.assign(K.floating.style,{maxHeight:`${_}px`,minWidth:`${z.reference.width}px`})},padding:10})]}),b=C.useRef([]),k=C.useRef(h),S=C.useRef(!1),$=y9(g,{event:"mousedown"}),T=x9(g),R=k9(g,{role:"listbox"}),B=$9(g,{listRef:b,activeIndex:c,selectedIndex:u,onNavigate:l,loop:!0}),O=C9(g,{listRef:k,activeIndex:c,selectedIndex:u,onMatch:a?l:f,onTypingChange(z){S.current=z}}),{getReferenceProps:M,getFloatingProps:H,getItemProps:L}=E9([T,R,B,O,$]),P=z=>{f(z),r(d[h[z]]),s(!1)},N=u!==null?h[u]:void 0;return F.jsxs(F.Fragment,{children:[F.jsxs("div",{tabIndex:0,ref:v.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":u!==null&&!n?"":void 0,...(j=p.button)==null?void 0:j.container,...M(),children:[F.jsx("span",{...(W=p.button)==null?void 0:W.text,children:N||t||"Select..."}),F.jsx(e7,{...(V=p.button)==null?void 0:V.icon})]}),a&&F.jsx(p9,{children:F.jsx(m9,{context:g,modal:!1,children:F.jsx("div",{ref:v.setFloating,className:(w=(D=p.content)==null?void 0:D.container)==null?void 0:w.className,style:{...y},...H(),children:h.map((z,K)=>{var _;return F.jsx("div",{ref:J=>{b.current[K]=J},role:"option",tabIndex:K===c?0:-1,"aria-selected":K===u&&K===c,"data-active":K===c?"":void 0,...(_=p.content)==null?void 0:_.item,...L({onClick(){i||P(K)},onKeyDown(J){i||(J.key==="Enter"&&(J.preventDefault(),P(K)),J.key===" "&&!S.current&&(J.preventDefault(),P(K)))}}),children:z},z)})})})})]})},T9=E.forwardRef(({type:e,title:t,url:n,...r},o)=>{const{message:{blocks:{file:i}}}=ct;return F.jsxs("a",{...r,...i.container,href:n,download:!0,ref:o,target:"_blank",rel:"noreferrer",children:[F.jsx("p",{...i.title,children:t||n}),F.jsx(n7,{...i.icon})]})}),NS={audio:G6,bubble:q6,button:U6,carousel:Q7,column:a7,dropdown:O9,file:T9,image:V6,location:i7,row:s7,text:FD,video:K6},Wi=({block:e,...t})=>{const r=Pe(i=>i.renderers)[e.type]??NS[e.type],o={...t,...e};return F.jsx(r,{...o})};function A9({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M8 14a.75.75 0 0 1-.75-.75V4.56L4.03 7.78a.75.75 0 0 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06L8.75 4.56v8.69A.75.75 0 0 1 8 14Z",clipRule:"evenodd"}))}const P9=C.forwardRef(A9);function I9({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M8 1a2 2 0 0 0-2 2v4a2 2 0 1 0 4 0V3a2 2 0 0 0-2-2Z"}),C.createElement("path",{d:"M4.5 7A.75.75 0 0 0 3 7a5.001 5.001 0 0 0 4.25 4.944V13.5h-1.5a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-1.5v-1.556A5.001 5.001 0 0 0 13 7a.75.75 0 0 0-1.5 0 3.5 3.5 0 1 1-7 0Z"}))}const R9=C.forwardRef(I9);function M9({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"}))}const N9=C.forwardRef(M9);function D9(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var j9=E.useLayoutEffect,F9=function(t){var n=C.useRef(t);return j9(function(){n.current=t}),n},DS=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},L9=function(t,n){var r=E.useRef();return E.useCallback(function(o){t.current=o,r.current&&DS(r.current,null),r.current=n,n&&DS(n,o)},[n])},jS={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},B9=function(t){Object.keys(jS).forEach(function(n){t.style.setProperty(n,jS[n],"important")})},FS=B9,un=null,LS=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function U9(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),un||(un=document.createElement("textarea"),un.setAttribute("tabindex","-1"),un.setAttribute("aria-hidden","true"),FS(un)),un.parentNode===null&&document.body.appendChild(un);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(p){var d=p;un.style[d]=a[d]}),FS(un),un.value=t;var c=LS(un,e);un.value=t,c=LS(un,e),un.value="x";var l=un.scrollHeight-o,u=l*n;s==="border-box"&&(u=u+o+i),c=Math.max(u,c);var f=l*r;return s==="border-box"&&(f=f+o+i),c=Math.min(f,c),[c,l]}var BS=function(){},z9=function(t,n){return t.reduce(function(r,o){return r[o]=n[o],r},{})},q9=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],H9=!!document.documentElement.currentStyle,V9=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=z9(q9,n),o=r.boxSizing;if(o==="")return null;H9&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),a=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:a}},W9=V9;function US(e,t,n){var r=F9(n);C.useLayoutEffect(function(){var o=function(a){return r.current(a)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var K9=function(t){US(window,"resize",t)},G9=function(t){US(document.fonts,"loadingdone",t)},Z9=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],Y9=function(t,n){var r=t.cacheMeasurements,o=t.maxRows,i=t.minRows,a=t.onChange,s=a===void 0?BS:a,c=t.onHeightChange,l=c===void 0?BS:c,u=D9(t,Z9),f=u.value!==void 0,p=C.useRef(null),d=L9(p,n),h=C.useRef(0),m=C.useRef(),v=function(){var b=p.current,k=r&&m.current?m.current:W9(b);if(k){m.current=k;var S=U9(k,b.value||b.placeholder||"x",i,o),$=S[0],T=S[1];h.current!==$&&(h.current=$,b.style.setProperty("height",$+"px","important"),l($,{rowHeight:T}))}},y=function(b){f||v(),s(b)};return C.useLayoutEffect(v),K9(v),G9(v),C.createElement("textarea",no({},u,{onChange:y,ref:d}))},J9=C.forwardRef(Y9);const zS=E.memo(E.forwardRef(({children:e,...t},n)=>{const{composer:r}=ct,o=Pe(P=>P.disableComposer),i=Pe(P=>P.setIsTyping),a=Pe(P=>P.isReadOnly),s=Pe(P=>P.sendFile),c=Pe(P=>P.addMessage),l=Pe(P=>P.sendTextMessage),u=Pe(P=>P.allowFileUpload),f=Pe(P=>P.connected),{composerPlaceholder:p,showPoweredBy:d}=Mx(),[h,m]=E.useState(""),[v,y]=E.useState(-1),[g,b]=E.useState(!1),k=E.useRef(null),S=E.useRef(null),$=_n(P=>P.user),T=_n(P=>P.messageHistory);if(a)return null;const R=()=>{var P;k.current&&((P=k.current)==null||P.click())},B=o||a||!f,O=async P=>{var j;const N=(j=P.target.files)==null?void 0:j[0];if(N)try{const{fileUrl:W,type:V}=await s(N)??"";c({direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:V,url:W}})}catch(W){console.error("Error sending file:",W)}},M=window.SpeechRecognition||window.webkitSpeechRecognition,H=()=>{S.current||(S.current=new M);const P=S.current;P&&(P.continuous=!0,P.onresult=N=>{const j=N.results[0][0].transcript;m(j),P.stop(),b(!1)},g?(P.stop(),b(!1)):(P.start(),b(!0)))},L=()=>{h&&(l(h),setTimeout(()=>i(!0,9e3),500),m(""),y(-1))};return F.jsxs(F.Fragment,{children:[F.jsxs("div",{"data-disabled":B,...t,...r.container,ref:n,children:[u&&F.jsxs(F.Fragment,{children:[F.jsx("button",{type:"button",disabled:B,...r.uploadButton.container,onClick:R,children:F.jsx(N9,{...r.uploadButton.icon})}),F.jsx("input",{type:"file",ref:k,style:{display:"none"},onChange:O})]}),F.jsx(J9,{...r==null?void 0:r.input,placeholder:p??"Type your message...",disabled:B,value:h,"data-has-value":!!h,onChange:P=>m(P.target.value),maxRows:5,onKeyDown:P=>{if(!B){if(P.key==="Enter"&&P.shiftKey?(P.preventDefault(),m(`${h}
284
- `)):P.key==="Enter"&&(P.preventDefault(),L()),P.key==="ArrowUp"){P.preventDefault();const N=T[($==null?void 0:$.userId)??""]??[];v<N.length-1&&m(N[v+1]),y(()=>Math.min(v+1,N.length-1))}if(P.key==="ArrowDown"){P.preventDefault();const N=T[($==null?void 0:$.userId)??""]??[];m(v===0?"":N[v-1]),y(()=>Math.max(v-1,-1))}}}}),h&&F.jsx("button",{type:"button","aria-label":"Send message",...r.button.container,disabled:!h||B,onClick:L,children:F.jsx(P9,{...r.button.icon})}),!h&&M&&F.jsx("button",{type:"button","aria-label":"Activate voice input",...r.voiceButton.container,disabled:!!h,onClick:H,"data-listens":!!g,children:F.jsx(R9,{...r.voiceButton.icon})})]}),F.jsx("a",{...r.poweredBy,"data-hidden":d===!1,hidden:d===!1,href:"https://botpress.com/?from=webchat",target:"_blank",rel:"noopener noreferrer",children:"⚡ by Botpress"})]})})),qS=({children:e})=>{const[t,n]=E.useState(!1),[r,o]=E.useState(""),[i,a]=E.useState(null),s=({title:l,content:u})=>{o(l),a(u),n(!0)},c=()=>{n(!1)};return F.jsxs(Px.Provider,{value:{hideModal:c,showModal:s,title:r,content:i,open:t},children:[F.jsx(Eo,{open:t,onOpenChange:n,children:F.jsx(Eo.Content,{title:r,children:i})}),e]})},iue="";var HS={},ch={},Vl=be&&be.__assign||function(){return Vl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Vl.apply(this,arguments)};Object.defineProperty(ch,"__esModule",{value:!0});var X9={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function Q9(e){var t=Vl(Vl({},X9),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}ch.getSanitizedOptions=Q9;var lh={},uh={},Wl={},fh={},dh={};Object.defineProperty(dh,"__esModule",{value:!0});function e8(e){var t=Math.random()*e;return Math.round(t)}dh.fullJitter=e8;var ph={};Object.defineProperty(ph,"__esModule",{value:!0});function t8(e){return e}ph.noJitter=t8,Object.defineProperty(fh,"__esModule",{value:!0});var n8=dh,r8=ph;function o8(e){switch(e.jitter){case"full":return n8.fullJitter;case"none":default:return r8.noJitter}}fh.JitterFactory=o8,Object.defineProperty(Wl,"__esModule",{value:!0});var i8=fh,a8=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(n){return setTimeout(n,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=i8.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,n=this.options.timeMultiple,r=this.numOfDelayedAttempts,o=t*Math.pow(n,r);return Math.min(o,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();Wl.Delay=a8;var s8=be&&be.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),c8=be&&be.__awaiter||function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{l(r.next(u))}catch(f){a(f)}}function c(u){try{l(r.throw(u))}catch(f){a(f)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})},l8=be&&be.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1],i=l;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(l);break}i[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(u){l=[6,u],o=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(uh,"__esModule",{value:!0});var u8=Wl,f8=function(e){s8(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return c8(this,void 0,void 0,function(){return l8(this,function(n){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(u8.Delay);uh.SkipFirstDelay=f8;var hh={},d8=be&&be.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(hh,"__esModule",{value:!0});var p8=Wl,h8=function(e){d8(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(p8.Delay);hh.AlwaysDelay=h8,Object.defineProperty(lh,"__esModule",{value:!0});var m8=uh,y8=hh;function v8(e,t){var n=g8(e);return n.setAttemptNumber(t),n}lh.DelayFactory=v8;function g8(e){return e.delayFirstAttempt?new y8.AlwaysDelay(e):new m8.SkipFirstDelay(e)}var mh=be&&be.__awaiter||function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{l(r.next(u))}catch(f){a(f)}}function c(u){try{l(r.throw(u))}catch(f){a(f)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})},yh=be&&be.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1],i=l;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(l);break}i[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(u){l=[6,u],o=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(HS,"__esModule",{value:!0});var b8=ch,w8=lh;function x8(e,t){return t===void 0&&(t={}),mh(this,void 0,void 0,function(){var n,r;return yh(this,function(o){switch(o.label){case 0:return n=b8.getSanitizedOptions(t),r=new E8(e,n),[4,r.execute()];case 1:return[2,o.sent()]}})})}var S8=HS.backOff=x8,E8=function(){function e(t,n){this.request=t,this.options=n,this.attemptNumber=0}return e.prototype.execute=function(){return mh(this,void 0,void 0,function(){var t,n;return yh(this,function(r){switch(r.label){case 0:if(this.attemptLimitReached)return[3,7];r.label=1;case 1:return r.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return r.sent(),[4,this.request()];case 3:return[2,r.sent()];case 4:return t=r.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(n=r.sent(),!n||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return mh(this,void 0,void 0,function(){var t;return yh(this,function(n){switch(n.label){case 0:return t=w8.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return n.sent(),[2]}})})},e}();const _8=({children:e,...t})=>{const n=E.useRef(),r=E.useRef(null),o=B6({...t,messageContainerRef:r});return n.current||(n.current=o),F.jsx(Rx.Provider,{value:{...t.configuration},children:F.jsx(Tx.Provider,{value:n.current,children:F.jsx($8,{children:e})})})},$8=({children:e})=>{const t=Pe(b=>b.client),n=Pe(b=>b.addMessage),r=Pe(b=>b.setMessages),o=Pe(b=>b.configuration),i=Pe(b=>b.setConnected),a=Pe(b=>b.userData),s=Pe(b=>b.userName),c=Pe(b=>b.userPictureUrl),l=Pe(b=>b.setIsTyping),u=Pe(b=>b.getMessages),f=Pe(b=>b.setHeaderMessage),p=Pe(b=>b.setDisableComposer),d=_n(b=>b.setConversationId),h=_n(b=>b.user),m=_n(b=>b.conversationId),v=_n(b=>b.setUser),[y,g]=E.useState(0);return E.useEffect(()=>{if(t)return t.on("messageSent",b=>{const k=u(),S=k[k.length-1];(k.length===0||S.block.type==="bubble"&&S.block.block.type==="text"&&S.block.block.text!==b)&&n({direction:"outgoing",sender:{name:"You"},timestamp:new Date,block:{type:"bubble",block:{type:"text",text:b}},disableInput:!1})})},[m]),E.useEffect(()=>{if(t)return t.on("message",b=>{try{const{payload:k,disableInput:S,id:$,conversationId:T}=b;if(m!==T)return;l(!1,0),n({id:$,direction:"incoming",sender:{name:o.botName??"Bot",avatar:o.botAvatar},timestamp:new Date(b.sentOn),block:k,disableInput:S})}catch{console.error("Invalid message payload")}})},[m]),E.useEffect(()=>{if(t)return t.on("conversation",b=>{d(b)})},[]),vx(async()=>{if(t)return t.on("error",()=>{g(b=>b+1)})}),vx(async()=>{if(!t||m&&t.conversationId===m)return;let b;try{f("Connecting..."),p(!0),b=await S8(()=>t.connect(h,a,{name:s,pictureUrl:c}),{maxDelay:1e4,numOfAttempts:1/0}),f(void 0),p(!1),i(!0)}catch(S){console.error(S),f("Connection failed. Please try again later."),i(!1);return}v(b),m&&await t.conversationExists(m)?await t.switchConversation(m):await t.newConversation();const k=[];for(const S of await t.listMessages())try{const{payload:$,authorId:T,sentOn:R,disableInput:B,id:O}=S,M=T===t.userId?"outgoing":"incoming";k.push({id:O,direction:M,sender:M==="outgoing"?{name:"You"}:{name:o.botName??"Bot",avatar:o.botAvatar},timestamp:new Date(R),block:$,disableInput:B})}catch{console.error("Invalid message payload")}return r(k.reverse()),()=>{t.disconnect()}},[y,m]),F.jsx(F.Fragment,{children:e})};function Ur(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}const k8=C["useId".toString()]||(()=>{});let C8=0;function Kl(e){const[t,n]=C.useState(k8());return Pa(()=>{e||n(r=>r??String(C8++))},[e]),e||(t?`radix-${t}`:"")}function VS({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=O8({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=to(n),c=E.useCallback(l=>{if(i){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else o(l)},[i,e,o,s]);return[a,c]}function O8({defaultProp:e,onChange:t}){const n=E.useState(e),[r]=n,o=E.useRef(r),i=to(t);return E.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function T8(e,t=globalThis==null?void 0:globalThis.document){const n=to(e);E.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const vh="dismissableLayer.update",A8="dismissableLayer.pointerDownOutside",P8="dismissableLayer.focusOutside";let WS;const I8=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),R8=E.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...l}=e,u=E.useContext(I8),[f,p]=E.useState(null),d=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=E.useState({}),m=Mo(t,R=>p(R)),v=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=v.indexOf(y),b=f?v.indexOf(f):-1,k=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=g,$=M8(R=>{const B=R.target,O=[...u.branches].some(M=>M.contains(B));!S||O||(i==null||i(R),s==null||s(R),R.defaultPrevented||c==null||c())},d),T=N8(R=>{const B=R.target;[...u.branches].some(M=>M.contains(B))||(a==null||a(R),s==null||s(R),R.defaultPrevented||c==null||c())},d);return T8(R=>{b===u.layers.size-1&&(o==null||o(R),!R.defaultPrevented&&c&&(R.preventDefault(),c()))},d),E.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(WS=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),KS(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=WS)}},[f,d,r,u]),E.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),KS())},[f,u]),E.useEffect(()=>{const R=()=>h({});return document.addEventListener(vh,R),()=>document.removeEventListener(vh,R)},[]),E.createElement(In.div,no({},l,{ref:m,style:{pointerEvents:k?S?"auto":"none":void 0,...e.style},onFocusCapture:Ur(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Ur(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Ur(e.onPointerDownCapture,$.onPointerDownCapture)}))});function M8(e,t=globalThis==null?void 0:globalThis.document){const n=to(e),r=E.useRef(!1),o=E.useRef(()=>{});return E.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){GS(A8,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function N8(e,t=globalThis==null?void 0:globalThis.document){const n=to(e),r=E.useRef(!1);return E.useEffect(()=>{const o=i=>{i.target&&!r.current&&GS(P8,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function KS(){const e=new CustomEvent(vh);document.dispatchEvent(e)}function GS(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?AA(o,i):o.dispatchEvent(i)}const gh="focusScope.autoFocusOnMount",bh="focusScope.autoFocusOnUnmount",ZS={bubbles:!1,cancelable:!0},D8=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,c]=E.useState(null),l=to(o),u=to(i),f=E.useRef(null),p=Mo(t,m=>c(m)),d=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let m=function(b){if(d.paused||!s)return;const k=b.target;s.contains(k)?f.current=k:So(f.current,{select:!0})},v=function(b){if(d.paused||!s)return;const k=b.relatedTarget;k!==null&&(s.contains(k)||So(f.current,{select:!0}))},y=function(b){const k=document.activeElement;for(const S of b)S.removedNodes.length>0&&(s!=null&&s.contains(k)||So(s))};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const g=new MutationObserver(y);return s&&g.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),g.disconnect()}}},[r,s,d.paused]),E.useEffect(()=>{if(s){XS.add(d);const m=document.activeElement;if(!s.contains(m)){const y=new CustomEvent(gh,ZS);s.addEventListener(gh,l),s.dispatchEvent(y),y.defaultPrevented||(j8(z8(YS(s)),{select:!0}),document.activeElement===m&&So(s))}return()=>{s.removeEventListener(gh,l),setTimeout(()=>{const y=new CustomEvent(bh,ZS);s.addEventListener(bh,u),s.dispatchEvent(y),y.defaultPrevented||So(m??document.body,{select:!0}),s.removeEventListener(bh,u),XS.remove(d)},0)}}},[s,l,u,d]);const h=E.useCallback(m=>{if(!n&&!r||d.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(v&&y){const g=m.currentTarget,[b,k]=F8(g);b&&k?!m.shiftKey&&y===k?(m.preventDefault(),n&&So(b,{select:!0})):m.shiftKey&&y===b&&(m.preventDefault(),n&&So(k,{select:!0})):y===g&&m.preventDefault()}},[n,r,d.paused]);return E.createElement(In.div,no({tabIndex:-1},a,{ref:p,onKeyDown:h}))});function j8(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(So(r,{select:t}),document.activeElement!==n)return}function F8(e){const t=YS(e),n=JS(t,e),r=JS(t.reverse(),e);return[n,r]}function YS(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function JS(e,t){for(const n of e)if(!L8(n,{upTo:t}))return n}function L8(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function B8(e){return e instanceof HTMLInputElement&&"select"in e}function So(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&B8(e)&&t&&e.select()}}const XS=U8();function U8(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=QS(e,t),e.unshift(t)},remove(t){var n;e=QS(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function QS(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function z8(e){return e.filter(t=>t.tagName!=="A")}function q8(e,t){return E.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Gl=e=>{const{present:t,children:n}=e,r=H8(t),o=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),i=Mo(r.ref,o.ref);return typeof n=="function"||r.isPresent?E.cloneElement(o,{ref:i}):null};Gl.displayName="Presence";function H8(e){const[t,n]=E.useState(),r=E.useRef({}),o=E.useRef(e),i=E.useRef("none"),a=e?"mounted":"unmounted",[s,c]=q8(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const l=Zl(r.current);i.current=s==="mounted"?l:"none"},[s]),Pa(()=>{const l=r.current,u=o.current;if(u!==e){const p=i.current,d=Zl(l);e?c("MOUNT"):d==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&p!==d?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Pa(()=>{if(t){const l=f=>{const d=Zl(r.current).includes(f.animationName);f.target===t&&d&&rr.flushSync(()=>c("ANIMATION_END"))},u=f=>{f.target===t&&(i.current=Zl(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:E.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Zl(e){return(e==null?void 0:e.animationName)||"none"}let wh=0;function V8(){E.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:eE()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:eE()),wh++,()=>{wh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),wh--}},[])}function eE(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var gr=function(){return gr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},gr.apply(this,arguments)};function tE(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function W8(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Yl="right-scroll-bar-position",Jl="width-before-scroll-bar",K8="with-scroll-bars-hidden",G8="--removed-body-scroll-bar-size";function Z8(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Y8(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function J8(e,t){return Y8(t||null,function(n){return e.forEach(function(r){return Z8(r,n)})})}function X8(e){return e}function Q8(e,t){t===void 0&&(t=X8);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var c=function(){var u=a;a=[],u.forEach(i)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),n}}}};return o}function ez(e){e===void 0&&(e={});var t=Q8(null);return t.options=gr({async:!0,ssr:!1},e),t}var nE=function(e){var t=e.sideCar,n=tE(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return C.createElement(r,gr({},n))};nE.isSideCarExport=!0;function tz(e,t){return e.useMedium(t),nE}var rE=ez(),xh=function(){},Xl=C.forwardRef(function(e,t){var n=C.useRef(null),r=C.useState({onScrollCapture:xh,onWheelCapture:xh,onTouchMoveCapture:xh}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,f=e.shards,p=e.sideCar,d=e.noIsolation,h=e.inert,m=e.allowPinchZoom,v=e.as,y=v===void 0?"div":v,g=tE(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),b=p,k=J8([n,t]),S=gr(gr({},g),o);return C.createElement(C.Fragment,null,u&&C.createElement(b,{sideCar:rE,removeScrollBar:l,shards:f,noIsolation:d,inert:h,setCallbacks:i,allowPinchZoom:!!m,lockRef:n}),a?C.cloneElement(C.Children.only(s),gr(gr({},S),{ref:k})):C.createElement(y,gr({},S,{className:c,ref:k}),s))});Xl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Xl.classNames={fullWidth:Jl,zeroRight:Yl};var oE,nz=function(){if(oE)return oE;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function rz(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=nz();return t&&e.setAttribute("nonce",t),e}function oz(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function iz(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var az=function(){var e=0,t=null;return{add:function(n){e==0&&(t=rz())&&(oz(t,n),iz(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},sz=function(){var e=az();return function(t,n){C.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},iE=function(){var e=sz(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},cz={left:0,top:0,right:0,gap:0},Sh=function(e){return parseInt(e||"",10)||0},lz=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Sh(n),Sh(r),Sh(o)]},uz=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return cz;var t=lz(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},fz=iE(),dz=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
285
- .`.concat(K8,` {
283
+ */var O7=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Sp=O7.join(","),C1=typeof Element>"u",Ma=C1?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Hl=!C1&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},ql=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},k7=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},_7=function(t,n,r){if(ql(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Sp));return n&&Ma.call(t,Sp)&&o.unshift(t),o=o.filter(r),o},T7=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!ql(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=Ma.call(a,Sp);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!ql(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&p){var d=e(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:a,candidates:d})}else i.unshift.apply(i,a.children)}}return o},I1=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},A1=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||k7(t))&&!I1(t)?0:t.tabIndex},C7=function(t,n){var r=A1(t);return r<0&&n&&!I1(t)?0:r},I7=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},P1=function(t){return t.tagName==="INPUT"},A7=function(t){return P1(t)&&t.type==="hidden"},P7=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},R7=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},M7=function(t){if(!t.name)return!0;var n=t.form||Hl(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=R7(o,t.form);return!i||i===t},D7=function(t){return P1(t)&&t.type==="radio"},j7=function(t){return D7(t)&&!M7(t)},N7=function(t){var n,r=t&&Hl(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,f;r=Hl(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},R1=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},L7=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Ma.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Ma.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=Hl(t);if(l&&!l.shadowRoot&&o(l)===!0)return R1(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(N7(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return R1(t);return!1},F7=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Ma.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},B7=function(t,n){return!(n.disabled||ql(n)||A7(n)||L7(n,t)||P7(n)||F7(n))},M1=function(t,n){return!(j7(n)||A1(n)<0||!B7(t,n))},U7=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},z7=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=C7(s,a),c=a?e(o.candidates):s;l===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:i,tabIndex:l,item:o,isScope:a,content:c})}),r.sort(I7).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Ep=function(t,n){n=n||{};var r;return n.getShadowRoot?r=T7([t],n.includeContainer,{filter:M1.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:U7}):r=_7(t,n.includeContainer,M1.bind(null,n)),z7(r)};const $p="ArrowUp",Wl="ArrowDown",mi="ArrowLeft",Da="ArrowRight";function Vl(e,t,n){return Math.floor(e/t)!==n}function ja(e,t){return t<0||t>=e.current.length}function Op(e,t){return Jt(e,{disabledIndices:t})}function D1(e,t){return Jt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Jt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do{var l,c;s=s+(r?-i:i)}while(s>=0&&s<=a.length-1&&(o?o.includes(s):a[s]==null||(l=a[s])!=null&&l.hasAttribute("disabled")||((c=a[s])==null?void 0:c.getAttribute("aria-disabled"))==="true"));return s}function H7(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,f=c;if(n.key===$p){if(u&&Ut(n),c===-1)f=l;else if(f=Jt(e,{startingIndex:f,amount:i,decrement:!0,disabledIndices:a}),o&&(c-i<s||f<0)){const p=c%i,d=l%i,h=l-(d-p);d===p?f=l:f=d>p?h:h-i}ja(e,f)&&(f=c)}if(n.key===Wl&&(u&&Ut(n),c===-1?f=s:(f=Jt(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(f=Jt(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),ja(e,f)&&(f=c)),r==="both"){const p=pi(c/i);n.key===Da&&(u&&Ut(n),c%i!==i-1?(f=Jt(e,{startingIndex:c,disabledIndices:a}),o&&Vl(f,i,p)&&(f=Jt(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(f=Jt(e,{startingIndex:c-c%i-1,disabledIndices:a})),Vl(f,i,p)&&(f=c)),n.key===mi&&(u&&Ut(n),c%i!==0?(f=Jt(e,{startingIndex:c,disabledIndices:a,decrement:!0}),o&&Vl(f,i,p)&&(f=Jt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(f=Jt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),Vl(f,i,p)&&(f=c));const d=pi(l/i)===p;ja(e,f)&&(o&&d?f=n.key===mi?l:Jt(e,{startingIndex:c-c%i-1,disabledIndices:a}):f=c)}return f}let j1=0;function Cr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(j1);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():j1=requestAnimationFrame(i)}var Tt=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Kl(){return Kl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kl.apply(this,arguments)}let kp=!1,q7=0;const N1=()=>"floating-ui-"+q7++;function W7(){const[e,t]=_.useState(()=>kp?N1():void 0);return Tt(()=>{e==null&&t(N1())},[]),_.useEffect(()=>{kp||(kp=!0)},[]),e}const _p=_["useId".toString()]||W7;function V7(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const K7=_.createContext(null),G7=_.createContext(null),L1=()=>{var e;return((e=_.useContext(K7))==null?void 0:e.id)||null},Gl=()=>_.useContext(G7);function Na(e){return"data-floating-ui-"+e}function ao(e){const t=E.useRef(e);return Tt(()=>{t.current=e}),t}function Z7(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function vi(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function Y7(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),vi(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let yi=new WeakMap,Zl=new WeakSet,Yl={},Tp=0;const J7=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,F1=e=>e&&(e.host||F1(e.parentNode)),X7=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=F1(n);return e.contains(r)?r:null}).filter(n=>n!=null);function Q7(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=X7(t,e),s=new Set,l=new Set(a),c=[];Yl[o]||(Yl[o]=new WeakMap);const u=Yl[o];a.forEach(f),p(t),s.clear();function f(d){!d||s.has(d)||(s.add(d),d.parentNode&&f(d.parentNode))}function p(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,h=>{if(s.has(h))p(h);else{const m=i?h.getAttribute(i):null,y=m!==null&&m!=="false",v=(yi.get(h)||0)+1,g=(u.get(h)||0)+1;yi.set(h,v),u.set(h,g),c.push(h),v===1&&y&&Zl.add(h),g===1&&h.setAttribute(o,""),!y&&i&&h.setAttribute(i,"true")}})}return Tp++,()=>{c.forEach(d=>{const h=(yi.get(d)||0)-1,m=(u.get(d)||0)-1;yi.set(d,h),u.set(d,m),h||(!Zl.has(d)&&i&&d.removeAttribute(i),Zl.delete(d)),m||d.removeAttribute(o)}),Tp--,Tp||(yi=new WeakMap,yi=new WeakMap,Zl=new WeakSet,Yl={})}}function B1(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Ln(e[0]).body;return Q7(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Cp=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function U1(e,t){const n=Ep(e,Cp());t==="prev"&&n.reverse();const r=n.indexOf(io(Ln(e)));return n.slice(r+1)[0]}function z1(){return U1(document.body,"next")}function H1(){return U1(document.body,"prev")}function La(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ln(n,r)}function eU(e){Ep(e,Cp()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function tU(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Ip={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let nU;function q1(e){e.key==="Tab"&&(e.target,clearTimeout(nU))}const Jl=_.forwardRef(function(t,n){const[r,o]=_.useState();Tt(()=>(p1()&&o("button"),document.addEventListener("keydown",q1),()=>{document.removeEventListener("keydown",q1)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Na("focus-guard")]:"",style:Ip};return _.createElement("span",Kl({},t,i))}),W1=_.createContext(null);function rU(e){let{id:t,root:n}=e===void 0?{}:e;const[r,o]=_.useState(null),i=_p(),a=V1(),s=_.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:i}),[t,n,a,i]),l=_.useRef();return Tt(()=>()=>{r==null||r.remove()},[r,s]),Tt(()=>{if(l.current===s)return;l.current=s;const{id:c,root:u,portalContext:f,uniqueId:p}=s,d=c?document.getElementById(c):null,h=Na("portal");if(d){const m=document.createElement("div");m.id=p,m.setAttribute(h,""),d.appendChild(m),o(m)}else{let m=u||(f==null?void 0:f.portalNode);m&&!bt(m)&&(m=m.current),m=m||document.body;let y=null;c&&(y=document.createElement("div"),y.id=c,m.appendChild(y));const v=document.createElement("div");v.id=p,v.setAttribute(h,""),m=y||m,m.appendChild(v),o(v)}},[s]),r}function oU(e){let{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e;const i=rU({id:n,root:r}),[a,s]=_.useState(null),l=_.useRef(null),c=_.useRef(null),u=_.useRef(null),f=_.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return _.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function d(h){i&&La(h)&&(h.type==="focusin"?tU:eU)(i)}return i.addEventListener("focusin",d,!0),i.addEventListener("focusout",d,!0),()=>{i.removeEventListener("focusin",d,!0),i.removeEventListener("focusout",d,!0)}},[i,o,a==null?void 0:a.modal]),_.createElement(W1.Provider,{value:_.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&_.createElement(Jl,{"data-type":"outside",ref:l,onFocus:d=>{if(La(d,i)){var h;(h=u.current)==null||h.focus()}else{const m=H1()||(a==null?void 0:a.refs.domReference.current);m==null||m.focus()}}}),p&&i&&_.createElement("span",{"aria-owns":i.id,style:Ip}),i&&Zn.createPortal(t,i),p&&i&&_.createElement(Jl,{"data-type":"outside",ref:c,onFocus:d=>{if(La(d,i)){var h;(h=f.current)==null||h.focus()}else{const m=z1()||(a==null?void 0:a.refs.domReference.current);m==null||m.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,d.nativeEvent))}}}))}const V1=()=>_.useContext(W1),iU=_.forwardRef(function(t,n){return _.createElement("button",Kl({},t,{type:"button",ref:n,tabIndex:-1,style:Ip}))});function aU(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:u=!0}=e,{open:f,refs:p,nodeId:d,onOpenChange:h,events:m,dataRef:y,elements:{domReference:v,floating:g}}=t,b=J7()?i:!0,k=ao(o),S=ao(a),$=ao(s),C=Gl(),P=V1(),F=typeof a=="number"&&a<0,T=_.useRef(null),M=_.useRef(null),q=_.useRef(!1),B=_.useRef(null),A=_.useRef(!1),D=P!=null,N=v&&v.getAttribute("role")==="combobox"&&v1(v)&&F,V=_.useCallback(function(z){return z===void 0&&(z=g),z?Ep(z,Cp()):[]},[g]),W=_.useCallback(z=>{const K=V(z);return k.current.map(O=>v&&O==="reference"?v:g&&O==="floating"?g:K).filter(Boolean).flat()},[v,g,k,V]);_.useEffect(()=>{if(r||!l)return;function z(O){if(O.key==="Tab"){ln(g,io(Ln(g)))&&V().length===0&&!N&&Ut(O);const J=W(),ae=m1(O);k.current[0]==="reference"&&ae===v&&(Ut(O),O.shiftKey?Cr(J[J.length-1]):Cr(J[1])),k.current[1]==="floating"&&ae===g&&O.shiftKey&&(Ut(O),Cr(J[0]))}}const K=Ln(g);return K.addEventListener("keydown",z),()=>{K.removeEventListener("keydown",z)}},[r,v,g,l,k,p,N,V,W]),_.useEffect(()=>{if(r||!u)return;function z(){A.current=!0,setTimeout(()=>{A.current=!1})}function K(O){const J=O.relatedTarget;queueMicrotask(()=>{const ae=!(ln(v,J)||ln(g,J)||ln(J,g)||ln(P==null?void 0:P.portalNode,J)||J!=null&&J.hasAttribute(Na("focus-guard"))||C&&(vi(C.nodesRef.current,d).find(re=>{var ce,pe;return ln((ce=re.context)==null?void 0:ce.elements.floating,J)||ln((pe=re.context)==null?void 0:pe.elements.domReference,J)})||Z7(C.nodesRef.current,d).find(re=>{var ce,pe;return((ce=re.context)==null?void 0:ce.elements.floating)===J||((pe=re.context)==null?void 0:pe.elements.domReference)===J})));J&&ae&&!A.current&&J!==B.current&&(q.current=!0,h(!1,O))})}if(g&&Yt(v))return v.addEventListener("focusout",K),v.addEventListener("pointerdown",z),!l&&g.addEventListener("focusout",K),()=>{v.removeEventListener("focusout",K),v.removeEventListener("pointerdown",z),!l&&g.removeEventListener("focusout",K)}},[r,v,g,l,d,C,P,h,u]),_.useEffect(()=>{var z;if(r)return;const K=Array.from((P==null||(z=P.portalNode)==null?void 0:z.querySelectorAll("["+Na("portal")+"]"))||[]);if(g){const O=[g,...K,T.current,M.current,k.current.includes("reference")||N?v:null].filter(ae=>ae!=null),J=l?B1(O,b,!b):B1(O);return()=>{J()}}},[r,v,g,l,k,P,N,b]),Tt(()=>{if(r||!g)return;const z=Ln(g),K=io(z);queueMicrotask(()=>{const O=W(g),J=S.current,ae=(typeof J=="number"?O[J]:J.current)||g,re=ln(g,K);!F&&!re&&f&&Cr(ae,{preventScroll:ae===g})})},[r,f,g,F,W,S]),Tt(()=>{if(r||!g)return;let z=!1;const K=Ln(g),O=io(K),J=y.current;B.current=O;function ae(re){if(re.type==="escapeKey"&&p.domReference.current&&(B.current=p.domReference.current),["referencePress","escapeKey"].includes(re.type))return;const ce=re.data.returnFocus;typeof ce=="object"?(q.current=!1,z=ce.preventScroll):q.current=!ce}return m.on("dismiss",ae),()=>{m.off("dismiss",ae);const re=io(K);(ln(g,re)||C&&vi(C.nodesRef.current,d).some(pe=>{var he;return ln((he=pe.context)==null?void 0:he.elements.floating,re)})||J.openEvent&&["click","mousedown"].includes(J.openEvent.type))&&p.domReference.current&&(B.current=p.domReference.current),$.current&&Yt(B.current)&&!q.current&&Cr(B.current,{cancelPrevious:!1,preventScroll:z})}},[r,g,$,y,p,m,C,d]),Tt(()=>{if(!(r||!P))return P.setFocusManagerState({modal:l,closeOnFocusOut:u,open:f,onOpenChange:h,refs:p}),()=>{P.setFocusManagerState(null)}},[r,P,l,f,h,p,u]),Tt(()=>{if(!r&&g&&typeof MutationObserver=="function"&&!F){const z=()=>{const O=g.getAttribute("tabindex");k.current.includes("floating")||io(Ln(g))!==p.domReference.current&&V().length===0?O!=="0"&&g.setAttribute("tabindex","0"):O!=="-1"&&g.setAttribute("tabindex","-1")};z();const K=new MutationObserver(z);return K.observe(g,{childList:!0,subtree:!0,attributes:!0}),()=>{K.disconnect()}}},[r,g,p,k,V,F]);function j(z){return r||!c||!l?null:_.createElement(iU,{ref:z==="start"?T:M,onClick:K=>h(!1,K.nativeEvent)},typeof c=="string"?c:"Dismiss")}const x=!r&&b&&!N&&(D||l);return _.createElement(_.Fragment,null,x&&_.createElement(Jl,{"data-type":"inside",ref:P==null?void 0:P.beforeInsideRef,onFocus:z=>{if(l){const O=W();Cr(o[0]==="reference"?O[0]:O[O.length-1])}else if(P!=null&&P.preserveTabOrder&&P.portalNode)if(q.current=!1,La(z,P.portalNode)){const O=z1()||v;O==null||O.focus()}else{var K;(K=P.beforeOutsideRef.current)==null||K.focus()}}}),!N&&j("start"),n,j("end"),x&&_.createElement(Jl,{"data-type":"inside",ref:P==null?void 0:P.afterInsideRef,onFocus:z=>{if(l)Cr(W()[0]);else if(P!=null&&P.preserveTabOrder&&P.portalNode)if(u&&(q.current=!0),La(z,P.portalNode)){const O=H1()||v;O==null||O.focus()}else{var K;(K=P.afterOutsideRef.current)==null||K.focus()}}}))}function K1(e){return Yt(e.target)&&e.target.tagName==="BUTTON"}function G1(e){return v1(e)}function sU(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,f=_.useRef(),p=_.useRef(!1);return _.useMemo(()=>a?{reference:{onPointerDown(d){f.current=d.pointerType},onMouseDown(d){d.button===0&&(h1(f.current,!0)&&c||s!=="click"&&(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,d.nativeEvent):(d.preventDefault(),r(!0,d.nativeEvent))))},onClick(d){if(s==="mousedown"&&f.current){f.current=void 0;return}h1(f.current,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,d.nativeEvent):r(!0,d.nativeEvent))},onKeyDown(d){f.current=void 0,!(d.defaultPrevented||!u||K1(d))&&(d.key===" "&&!G1(i)&&(d.preventDefault(),p.current=!0),d.key==="Enter"&&r(!(n&&l),d.nativeEvent))},onKeyUp(d){d.defaultPrevented||!u||K1(d)||G1(i)||d.key===" "&&p.current&&(p.current=!1,r(!(n&&l),d.nativeEvent))}}}:{},[a,o,s,c,u,i,l,n,r])}const lU=_["useInsertionEffect".toString()]||(e=>e());function so(e){const t=_.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return lU(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const cU={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},uU={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},fU=e=>{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function dU(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,nodeId:i,elements:{reference:a,domReference:s,floating:l},dataRef:c}=e,{enabled:u=!0,escapeKey:f=!0,outsidePress:p=!0,outsidePressEvent:d="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:y=!1,bubbles:v}=t,g=Gl(),b=L1()!=null,k=so(typeof p=="function"?p:()=>!1),S=typeof p=="function"?k:p,$=_.useRef(!1),{escapeKeyBubbles:C,outsidePressBubbles:P}=fU(v),F=so(M=>{if(!n||!u||!f||M.key!=="Escape")return;const q=g?vi(g.nodesRef.current,i):[];if(!C&&(M.stopPropagation(),q.length>0)){let B=!0;if(q.forEach(A=>{var D;if((D=A.context)!=null&&D.open&&!A.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,Q6(M)?M.nativeEvent:M)}),T=so(M=>{const q=$.current;if($.current=!1,q||typeof S=="function"&&!S(M))return;const B=m1(M),A="["+Na("inert")+"]",D=Ln(l).querySelectorAll(A);let N=bt(B)?B:null;for(;N&&!Ra(N);){const j=Po(N);if(j===Ln(l).body||!bt(j))break;N=j}if(D.length&&bt(B)&&!e7(B)&&!ln(B,l)&&Array.from(D).every(j=>!ln(N,j)))return;if(Yt(B)&&l){const j=B.clientWidth>0&&B.scrollWidth>B.clientWidth,x=B.clientHeight>0&&B.scrollHeight>B.clientHeight;let z=x&&M.offsetX>B.clientWidth;if(x&&gn(B).direction==="rtl"&&(z=M.offsetX<=B.offsetWidth-B.clientWidth),z||j&&M.offsetY>B.clientHeight)return}const V=g&&vi(g.nodesRef.current,i).some(j=>{var x;return wp(M,(x=j.context)==null?void 0:x.elements.floating)});if(wp(M,l)||wp(M,s)||V)return;const W=g?vi(g.nodesRef.current,i):[];if(W.length>0){let j=!0;if(W.forEach(x=>{var z;if((z=x.context)!=null&&z.open&&!x.context.dataRef.current.__outsidePressBubbles){j=!1;return}}),!j)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:f1(M)||d1(M)}}),r(!1,M)});return _.useEffect(()=>{if(!n||!u)return;c.current.__escapeKeyBubbles=C,c.current.__outsidePressBubbles=P;function M(A){r(!1,A)}const q=Ln(l);f&&q.addEventListener("keydown",F),S&&q.addEventListener(d,T);let B=[];return y&&(bt(s)&&(B=oo(s)),bt(l)&&(B=B.concat(oo(l))),!bt(a)&&a&&a.contextElement&&(B=B.concat(oo(a.contextElement)))),B=B.filter(A=>{var D;return A!==((D=q.defaultView)==null?void 0:D.visualViewport)}),B.forEach(A=>{A.addEventListener("scroll",M,{passive:!0})}),()=>{f&&q.removeEventListener("keydown",F),S&&q.removeEventListener(d,T),B.forEach(A=>{A.removeEventListener("scroll",M)})}},[c,l,s,a,f,S,d,n,r,y,u,C,P,F,T]),_.useEffect(()=>{$.current=!1},[S,d]),_.useMemo(()=>u?{reference:{onKeyDown:F,[cU[m]]:M=>{h&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,M.nativeEvent))}},floating:{onKeyDown:F,[uU[d]]:()=>{$.current=!0}}}:{},[u,o,h,d,m,r,F])}let Ap;process.env.NODE_ENV!=="production"&&(Ap=new Set);function pU(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:o}=e;if(process.env.NODE_ENV!=="production"){var i;const C="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((i=e.elements)!=null&&i.reference&&!bt(e.elements.reference)){var a;if(!((a=Ap)!=null&&a.has(C))){var s;(s=Ap)==null||s.add(C),console.error(C)}}}const[l,c]=_.useState(null),u=((t=e.elements)==null?void 0:t.reference)||l,f=$7(e),p=Gl(),d=so((C,P)=>{C&&(m.current.openEvent=P),r==null||r(C,P)}),h=_.useRef(null),m=_.useRef({}),y=_.useState(()=>V7())[0],v=_p(),g=_.useCallback(C=>{const P=bt(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),contextElement:C}:C;f.refs.setReference(P)},[f.refs]),b=_.useCallback(C=>{(bt(C)||C===null)&&(h.current=C,c(C)),(bt(f.refs.reference.current)||f.refs.reference.current===null||C!==null&&!bt(C))&&f.refs.setReference(C)},[f.refs]),k=_.useMemo(()=>({...f.refs,setReference:b,setPositionReference:g,domReference:h}),[f.refs,b,g]),S=_.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),$=_.useMemo(()=>({...f,refs:k,elements:S,dataRef:m,nodeId:o,floatingId:v,events:y,open:n,onOpenChange:d}),[f,o,v,y,n,d,k,S]);return Tt(()=>{const C=p==null?void 0:p.nodesRef.current.find(P=>P.id===o);C&&(C.context=$)}),_.useMemo(()=>({...f,context:$,refs:k,elements:S}),[f,k,S,$])}function Pp(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[n]:null).concat(e).reduce((o,i)=>(i&&Object.entries(i).forEach(a=>{let[s,l]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof l=="function"){var c;(c=r.get(s))==null||c.push(l),o[s]=function(){for(var u,f=arguments.length,p=new Array(f),d=0;d<f;d++)p[d]=arguments[d];return(u=r.get(s))==null?void 0:u.map(h=>h(...p)).find(h=>h!==void 0)}}}else o[s]=l}),o),{})}}function hU(e){e===void 0&&(e=[]);const t=e,n=_.useCallback(i=>Pp(i,e,"reference"),t),r=_.useCallback(i=>Pp(i,e,"floating"),t),o=_.useCallback(i=>Pp(i,e,"item"),e.map(i=>i==null?void 0:i.item));return _.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])}let Z1=!1;function Xl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Y1(e,t){return Xl(t,e===$p||e===Wl,e===mi||e===Da)}function Rp(e,t,n){return Xl(t,e===Wl,n?e===mi:e===Da)||e==="Enter"||e==" "||e===""}function mU(e,t,n){return Xl(t,n?e===mi:e===Da,e===Wl)}function J1(e,t,n){return Xl(t,n?e===Da:e===mi,e===$p)}function vU(e,t){const{open:n,onOpenChange:r,refs:o,elements:{domReference:i,floating:a}}=e,{listRef:s,activeIndex:l,onNavigate:c=()=>{},enabled:u=!0,selectedIndex:f=null,allowEscape:p=!1,loop:d=!1,nested:h=!1,rtl:m=!1,virtual:y=!1,focusItemOnOpen:v="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:b=!0,disabledIndices:k=void 0,orientation:S="vertical",cols:$=1,scrollItemIntoView:C=!0,virtualItemRef:P}=t;process.env.NODE_ENV!=="production"&&(p&&(d||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),y||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),S==="vertical"&&$>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const F=L1(),T=Gl(),M=so(c),q=_.useRef(v),B=_.useRef(f??-1),A=_.useRef(null),D=_.useRef(!0),N=_.useRef(M),V=_.useRef(!!a),W=_.useRef(!1),j=_.useRef(!1),x=ao(k),z=ao(n),K=ao(C),[O,J]=_.useState(),[ae,re]=_.useState(),ce=so(function(le,Q,G){G===void 0&&(G=!1);const fe=le.current[Q.current];fe&&(y?(J(fe.id),T==null||T.events.emit("virtualfocus",fe),P&&(P.current=fe)):Cr(fe,{preventScroll:!0,sync:X6()&&p1()?Z1||W.current:!1}),requestAnimationFrame(()=>{const ve=K.current;ve&&fe&&(G||!D.current)&&(fe.scrollIntoView==null||fe.scrollIntoView(typeof ve=="boolean"?{block:"nearest",inline:"nearest"}:ve))}))});Tt(()=>{document.createElement("div").focus({get preventScroll(){return Z1=!0,!1}})},[]),Tt(()=>{u&&(n&&a?q.current&&f!=null&&(j.current=!0,M(f)):V.current&&(B.current=-1,N.current(null)))},[u,n,a,f,M]),Tt(()=>{if(u&&n&&a)if(l==null){if(W.current=!1,f!=null)return;if(V.current&&(B.current=-1,ce(s,B)),!V.current&&q.current&&(A.current!=null||q.current===!0&&A.current==null)){let le=0;const Q=()=>{s.current[0]==null?(le<2&&(le?requestAnimationFrame:queueMicrotask)(Q),le++):(B.current=A.current==null||Rp(A.current,S,m)||h?Op(s,x.current):D1(s,x.current),A.current=null,M(B.current))};Q()}}else ja(s,l)||(B.current=l,ce(s,B,j.current),j.current=!1)},[u,n,a,l,f,h,s,S,m,M,ce,x]),Tt(()=>{var le,Q;if(!u||a||!T||y||!V.current)return;const G=T.nodesRef.current,fe=(le=G.find(R=>R.id===F))==null||(Q=le.context)==null?void 0:Q.elements.floating,ve=io(Ln(a)),Ee=G.some(R=>R.context&&ln(R.context.elements.floating,ve));fe&&!Ee&&D.current&&fe.focus({preventScroll:!0})},[u,a,T,F,y]),Tt(()=>{if(!u||!T||!y||F)return;function le(Q){re(Q.id),P&&(P.current=Q)}return T.events.on("virtualfocus",le),()=>{T.events.off("virtualfocus",le)}},[u,T,y,F,P]),Tt(()=>{N.current=M,V.current=!!a}),Tt(()=>{n||(A.current=null)},[n]);const pe=l!=null,he=_.useMemo(()=>{function le(G){if(!n)return;const fe=s.current.indexOf(G);fe!==-1&&M(fe)}return{onFocus(G){let{currentTarget:fe}=G;le(fe)},onClick:G=>{let{currentTarget:fe}=G;return fe.focus({preventScroll:!0})},...g&&{onMouseMove(G){let{currentTarget:fe}=G;le(fe)},onPointerLeave(G){let{pointerType:fe}=G;!D.current||fe==="touch"||(B.current=-1,ce(s,B),M(null),y||Cr(o.floating.current,{preventScroll:!0}))}}}},[n,o,ce,g,s,M,y]);return _.useMemo(()=>{if(!u)return{};const le=x.current;function Q(R){if(D.current=!1,W.current=!0,!z.current&&R.currentTarget===o.floating.current)return;if(h&&J1(R.key,S,m)){Ut(R),r(!1,R.nativeEvent),Yt(i)&&!y&&i.focus();return}const X=B.current,oe=Op(s,le),ee=D1(s,le);if(R.key==="Home"&&(Ut(R),B.current=oe,M(B.current)),R.key==="End"&&(Ut(R),B.current=ee,M(B.current)),!($>1&&(B.current=H7(s,{event:R,orientation:S,loop:d,cols:$,disabledIndices:le,minIndex:oe,maxIndex:ee,prevIndex:B.current,stopEvent:!0}),M(B.current),S==="both"))&&Y1(R.key,S)){if(Ut(R),n&&!y&&io(R.currentTarget.ownerDocument)===R.currentTarget){B.current=Rp(R.key,S,m)?oe:ee,M(B.current);return}Rp(R.key,S,m)?d?B.current=X>=ee?p&&X!==s.current.length?-1:oe:Jt(s,{startingIndex:X,disabledIndices:le}):B.current=Math.min(ee,Jt(s,{startingIndex:X,disabledIndices:le})):d?B.current=X<=oe?p&&X!==-1?s.current.length:ee:Jt(s,{startingIndex:X,decrement:!0,disabledIndices:le}):B.current=Math.max(oe,Jt(s,{startingIndex:X,decrement:!0,disabledIndices:le})),ja(s,B.current)?M(null):M(B.current)}}function G(R){v==="auto"&&f1(R.nativeEvent)&&(q.current=!0)}function fe(R){q.current=v,v==="auto"&&d1(R.nativeEvent)&&(q.current=!0)}const ve=y&&n&&pe&&{"aria-activedescendant":ae||O},Ee=s.current.find(R=>(R==null?void 0:R.id)===O);return{reference:{...ve,onKeyDown(R){D.current=!1;const X=R.key.indexOf("Arrow")===0,oe=mU(R.key,S,m),ee=J1(R.key,S,m),xe=Y1(R.key,S),be=(h?oe:xe)||R.key==="Enter"||R.key.trim()==="";if(y&&n){const U=T==null?void 0:T.nodesRef.current.find(H=>H.parentId==null),Z=T&&U?Y7(T.nodesRef.current,U.id):null;if(X&&Z&&P){const H=new KeyboardEvent("keydown",{key:R.key,bubbles:!0});if(oe||ee){var Oe,Ne;const te=((Oe=Z.context)==null?void 0:Oe.elements.domReference)===R.currentTarget,de=ee&&!te?(Ne=Z.context)==null?void 0:Ne.elements.domReference:oe?Ee:null;de&&(Ut(R),de.dispatchEvent(H),re(void 0))}if(xe&&Z.context&&Z.context.open&&Z.parentId&&R.currentTarget!==Z.context.elements.domReference){var _e;Ut(R),(_e=Z.context.elements.domReference)==null||_e.dispatchEvent(H);return}}return Q(R)}if(!(!n&&!b&&X)){if(be&&(A.current=h&&xe?null:R.key),h){oe&&(Ut(R),n?(B.current=Op(s,le),M(B.current)):r(!0,R.nativeEvent));return}xe&&(f!=null&&(B.current=f),Ut(R),!n&&b?r(!0,R.nativeEvent):Q(R),n&&M(B.current))}},onFocus(){n&&M(null)},onPointerDown:fe,onMouseDown:G,onClick:G},floating:{"aria-orientation":S==="both"?void 0:S,...ve,onKeyDown:Q,onPointerMove(){D.current=!0}},item:he}},[i,o,O,ae,x,z,s,u,S,m,y,n,pe,h,f,b,p,$,d,v,M,r,he,T,P])}function yU(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:o=!0,role:i="dialog"}=t,a=_p();return _.useMemo(()=>{const s={id:r,role:i};return o?i==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":n?r:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:a}},floating:{...s,...i==="menu"&&{"aria-labelledby":a}}}:{}},[o,i,n,r,a])}function gU(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:f=750,ignoreKeys:p=[],selectedIndex:d=null}=t,h=_.useRef(),m=_.useRef(""),y=_.useRef((n=d??a)!=null?n:-1),v=_.useRef(null),g=so(s),b=so(l),k=ao(u),S=ao(p);return Tt(()=>{r&&(clearTimeout(h.current),v.current=null,m.current="")},[r]),Tt(()=>{if(r&&m.current===""){var $;y.current=($=d??a)!=null?$:-1}},[r,d,a]),_.useMemo(()=>{if(!c)return{};function $(F){F?o.current.typing||(o.current.typing=F,b(F)):o.current.typing&&(o.current.typing=F,b(F))}function C(F,T,M){const q=k.current?k.current(T,M):T.find(B=>(B==null?void 0:B.toLocaleLowerCase().indexOf(M.toLocaleLowerCase()))===0);return q?F.indexOf(q):-1}function P(F){const T=i.current;if(m.current.length>0&&m.current[0]!==" "&&(C(T,T,m.current)===-1?$(!1):F.key===" "&&Ut(F)),T==null||S.current.includes(F.key)||F.key.length!==1||F.ctrlKey||F.metaKey||F.altKey)return;r&&F.key!==" "&&(Ut(F),$(!0)),T.every(A=>{var D,N;return A?((D=A[0])==null?void 0:D.toLocaleLowerCase())!==((N=A[1])==null?void 0:N.toLocaleLowerCase()):!0})&&m.current===F.key&&(m.current="",y.current=v.current),m.current+=F.key,clearTimeout(h.current),h.current=setTimeout(()=>{m.current="",y.current=v.current,$(!1)},f);const q=y.current,B=C(T,[...T.slice((q||0)+1),...T.slice(0,(q||0)+1)],m.current);B!==-1?(g(B),v.current=B):F.key!==" "&&(m.current="",$(!1))}return{reference:{onKeyDown:P},floating:{onKeyDown:P,onKeyUp(F){F.key===" "&&$(!1)}}}},[c,r,o,i,f,S,k,g,b])}const bU=({options:e,label:t,reusable:n})=>{var N,V,W,j,x;const r=Ie(z=>z.sendTextMessage),o=Ie(z=>z.messageContainerRef),i=Ie(z=>z.isReadOnly),[a,s]=_.useState(!1),[l,c]=_.useState(null),[u,f]=_.useState(null),{message:{blocks:{dropdown:p}}}=st,d=e.reduce((z,K)=>(z[K.label]=K.value,z),{}),h=d?Object.keys(d):[],m=z=>{s(u!==null&&!n?!1:z)},{refs:y,floatingStyles:v,context:g}=pU({placement:"bottom-start",open:a,onOpenChange:m,whileElementsMounted:S7,middleware:[o7(5),i7({padding:10,boundary:(o==null?void 0:o.current)??void 0,crossAxis:!0}),a7({apply({rects:z,elements:K,availableHeight:O}){Object.assign(K.floating.style,{maxHeight:`${O}px`,minWidth:`${z.reference.width}px`})},padding:10})]}),b=_.useRef([]),k=_.useRef(h),S=_.useRef(!1),$=sU(g,{event:"mousedown"}),C=dU(g),P=yU(g,{role:"listbox"}),F=vU(g,{listRef:b,activeIndex:l,selectedIndex:u,onNavigate:c,loop:!0}),T=gU(g,{listRef:k,activeIndex:l,selectedIndex:u,onMatch:a?c:f,onTypingChange(z){S.current=z}}),{getReferenceProps:M,getFloatingProps:q,getItemProps:B}=hU([C,P,F,T,$]),A=z=>{f(z),r(d[h[z]]),s(!1)},D=u!==null?h[u]:void 0;return L.jsxs(L.Fragment,{children:[L.jsxs("div",{tabIndex:0,ref:y.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":u!==null&&!n?"":void 0,...(N=p.button)==null?void 0:N.container,...M(),children:[L.jsx("span",{...(V=p.button)==null?void 0:V.text,children:D||t||"Select..."}),L.jsx(WB,{...(W=p.button)==null?void 0:W.icon})]}),a&&L.jsx(oU,{children:L.jsx(aU,{context:g,modal:!1,children:L.jsx("div",{ref:y.setFloating,className:(x=(j=p.content)==null?void 0:j.container)==null?void 0:x.className,style:{...v},...q(),children:h.map((z,K)=>{var O;return L.jsx("div",{ref:J=>{b.current[K]=J},role:"option",tabIndex:K===l?0:-1,"aria-selected":K===u&&K===l,"data-active":K===l?"":void 0,...(O=p.content)==null?void 0:O.item,...B({onClick(){i||A(K)},onKeyDown(J){i||(J.key==="Enter"&&(J.preventDefault(),A(K)),J.key===" "&&!S.current&&(J.preventDefault(),A(K)))}}),children:z},z)})})})})]})},wU=E.forwardRef(({type:e,title:t,url:n,...r},o)=>{const{message:{blocks:{file:i}}}=st;return L.jsxs("a",{...r,...i.container,href:n,download:!0,ref:o,target:"_blank",rel:"noreferrer",children:[L.jsx("p",{...i.title,children:t||n}),L.jsx(KB,{...i.icon})]})}),X1={audio:FB,bubble:MB,button:PB,carousel:q6,column:JB,dropdown:bU,file:wU,image:jB,location:YB,row:XB,text:FN,video:LB},gi=({block:e,...t})=>{const r=Ie(i=>i.renderers)[e.type]??X1[e.type],o={...t,...e};return L.jsx(r,{...o})};function xU({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{fillRule:"evenodd",d:"M8 14a.75.75 0 0 1-.75-.75V4.56L4.03 7.78a.75.75 0 0 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06L8.75 4.56v8.69A.75.75 0 0 1 8 14Z",clipRule:"evenodd"}))}const SU=_.forwardRef(xU);function EU({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M8 1a2 2 0 0 0-2 2v4a2 2 0 1 0 4 0V3a2 2 0 0 0-2-2Z"}),_.createElement("path",{d:"M4.5 7A.75.75 0 0 0 3 7a5.001 5.001 0 0 0 4.25 4.944V13.5h-1.5a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-1.5v-1.556A5.001 5.001 0 0 0 13 7a.75.75 0 0 0-1.5 0 3.5 3.5 0 1 1-7 0Z"}))}const $U=_.forwardRef(EU);function OU({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"}))}const kU=_.forwardRef(OU);function _U(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var TU=E.useLayoutEffect,CU=function(t){var n=_.useRef(t);return TU(function(){n.current=t}),n},Q1=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},IU=function(t,n){var r=E.useRef();return E.useCallback(function(o){t.current=o,r.current&&Q1(r.current,null),r.current=n,n&&Q1(n,o)},[n])},eS={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},AU=function(t){Object.keys(eS).forEach(function(n){t.style.setProperty(n,eS[n],"important")})},tS=AU,rn=null,nS=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function PU(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),rn||(rn=document.createElement("textarea"),rn.setAttribute("tabindex","-1"),rn.setAttribute("aria-hidden","true"),tS(rn)),rn.parentNode===null&&document.body.appendChild(rn);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(p){var d=p;rn.style[d]=a[d]}),tS(rn),rn.value=t;var l=nS(rn,e);rn.value=t,l=nS(rn,e),rn.value="x";var c=rn.scrollHeight-o,u=c*n;s==="border-box"&&(u=u+o+i),l=Math.max(u,l);var f=c*r;return s==="border-box"&&(f=f+o+i),l=Math.min(f,l),[l,c]}var rS=function(){},RU=function(t,n){return t.reduce(function(r,o){return r[o]=n[o],r},{})},MU=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],DU=!!document.documentElement.currentStyle,jU=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=RU(MU,n),o=r.boxSizing;if(o==="")return null;DU&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),a=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:a}},NU=jU;function oS(e,t,n){var r=CU(n);_.useLayoutEffect(function(){var o=function(a){return r.current(a)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var LU=function(t){oS(window,"resize",t)},FU=function(t){oS(document.fonts,"loadingdone",t)},BU=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],UU=function(t,n){var r=t.cacheMeasurements,o=t.maxRows,i=t.minRows,a=t.onChange,s=a===void 0?rS:a,l=t.onHeightChange,c=l===void 0?rS:l,u=_U(t,BU),f=u.value!==void 0,p=_.useRef(null),d=IU(p,n),h=_.useRef(0),m=_.useRef(),y=function(){var b=p.current,k=r&&m.current?m.current:NU(b);if(k){m.current=k;var S=PU(k,b.value||b.placeholder||"x",i,o),$=S[0],C=S[1];h.current!==$&&(h.current=$,b.style.setProperty("height",$+"px","important"),c($,{rowHeight:C}))}},v=function(b){f||y(),s(b)};return _.useLayoutEffect(y),LU(y),FU(y),_.createElement("textarea",Vr({},u,{onChange:v,ref:d}))},zU=_.forwardRef(UU);const iS=E.memo(E.forwardRef(({children:e,...t},n)=>{const{composer:r}=st,o=Ie(A=>A.disableComposer),i=Ie(A=>A.setIsTyping),a=Ie(A=>A.isReadOnly),s=Ie(A=>A.sendFile),l=Ie(A=>A.addMessage),c=Ie(A=>A.sendTextMessage),u=Ie(A=>A.allowFileUpload),f=Ie(A=>A.connected),{composerPlaceholder:p,showPoweredBy:d}=Jx(),[h,m]=E.useState(""),[y,v]=E.useState(-1),[g,b]=E.useState(!1),k=E.useRef(null),S=E.useRef(null),$=mn(A=>A.user),C=mn(A=>A.messageHistory);if(a)return null;const P=()=>{var A;k.current&&((A=k.current)==null||A.click())},F=o||a||!f,T=async A=>{var N;const D=(N=A.target.files)==null?void 0:N[0];if(D)try{const{fileUrl:V,type:W}=await s(D)??"";l({direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:W,url:V}})}catch(V){console.error("Error sending file:",V)}},M=window.SpeechRecognition||window.webkitSpeechRecognition,q=()=>{S.current||(S.current=new M);const A=S.current;A&&(A.continuous=!0,A.onresult=D=>{const N=D.results[0][0].transcript;m(N),A.stop(),b(!1)},g?(A.stop(),b(!1)):(A.start(),b(!0)))},B=()=>{h&&(c(h),setTimeout(()=>i(!0,9e3),500),m(""),v(-1))};return L.jsxs(L.Fragment,{children:[L.jsxs("div",{"data-disabled":F,...t,...r.container,ref:n,children:[u&&L.jsxs(L.Fragment,{children:[L.jsx("button",{type:"button",disabled:F,...r.uploadButton.container,onClick:P,children:L.jsx(kU,{...r.uploadButton.icon})}),L.jsx("input",{type:"file",ref:k,style:{display:"none"},onChange:T})]}),L.jsx(zU,{...r==null?void 0:r.input,placeholder:p??"Type your message...",disabled:F,value:h,"data-has-value":!!h,onChange:A=>m(A.target.value),maxRows:5,onKeyDown:A=>{if(!F){if(A.key==="Enter"&&A.shiftKey?(A.preventDefault(),m(`${h}
284
+ `)):A.key==="Enter"&&(A.preventDefault(),B()),A.key==="ArrowUp"){A.preventDefault();const D=C[($==null?void 0:$.userId)??""]??[];y<D.length-1&&m(D[y+1]),v(()=>Math.min(y+1,D.length-1))}if(A.key==="ArrowDown"){A.preventDefault();const D=C[($==null?void 0:$.userId)??""]??[];m(y===0?"":D[y-1]),v(()=>Math.max(y-1,-1))}}}}),h&&L.jsx("button",{type:"button","aria-label":"Send message",...r.button.container,disabled:!h||F,onClick:B,children:L.jsx(SU,{...r.button.icon})}),!h&&M&&L.jsx("button",{type:"button","aria-label":"Activate voice input",...r.voiceButton.container,disabled:!!h,onClick:q,"data-listens":!!g,children:L.jsx($U,{...r.voiceButton.icon})})]}),L.jsx("a",{...r.poweredBy,"data-hidden":d===!1,hidden:d===!1,href:"https://botpress.com/?from=webchat",target:"_blank",rel:"noopener noreferrer",children:"⚡ by Botpress"})]})})),aS=({children:e})=>{const[t,n]=E.useState(!1),[r,o]=E.useState(""),[i,a]=E.useState(null),s=({title:c,content:u})=>{o(c),a(u),n(!0)},l=()=>{n(!1)};return L.jsxs(Gx.Provider,{value:{hideModal:l,showModal:s,title:r,content:i,open:t},children:[L.jsx(co,{open:t,onOpenChange:n,children:L.jsx(co.Content,{title:r,children:i})}),e]})},ode="";var sS={},Mp={},Ql=Xe&&Xe.__assign||function(){return Ql=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Ql.apply(this,arguments)};Object.defineProperty(Mp,"__esModule",{value:!0});var HU={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function qU(e){var t=Ql(Ql({},HU),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Mp.getSanitizedOptions=qU;var Dp={},jp={},ec={},Np={},Lp={};Object.defineProperty(Lp,"__esModule",{value:!0});function WU(e){var t=Math.random()*e;return Math.round(t)}Lp.fullJitter=WU;var Fp={};Object.defineProperty(Fp,"__esModule",{value:!0});function VU(e){return e}Fp.noJitter=VU,Object.defineProperty(Np,"__esModule",{value:!0});var KU=Lp,GU=Fp;function ZU(e){switch(e.jitter){case"full":return KU.fullJitter;case"none":default:return GU.noJitter}}Np.JitterFactory=ZU,Object.defineProperty(ec,"__esModule",{value:!0});var YU=Np,JU=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(n){return setTimeout(n,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=YU.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,n=this.options.timeMultiple,r=this.numOfDelayedAttempts,o=t*Math.pow(n,r);return Math.min(o,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();ec.Delay=JU;var XU=Xe&&Xe.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),QU=Xe&&Xe.__awaiter||function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(f){a(f)}}function l(u){try{c(r.throw(u))}catch(f){a(f)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},e9=Xe&&Xe.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(jp,"__esModule",{value:!0});var t9=ec,n9=function(e){XU(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return QU(this,void 0,void 0,function(){return e9(this,function(n){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(t9.Delay);jp.SkipFirstDelay=n9;var Bp={},r9=Xe&&Xe.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(Bp,"__esModule",{value:!0});var o9=ec,i9=function(e){r9(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(o9.Delay);Bp.AlwaysDelay=i9,Object.defineProperty(Dp,"__esModule",{value:!0});var a9=jp,s9=Bp;function l9(e,t){var n=c9(e);return n.setAttemptNumber(t),n}Dp.DelayFactory=l9;function c9(e){return e.delayFirstAttempt?new s9.AlwaysDelay(e):new a9.SkipFirstDelay(e)}var Up=Xe&&Xe.__awaiter||function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(f){a(f)}}function l(u){try{c(r.throw(u))}catch(f){a(f)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},zp=Xe&&Xe.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(sS,"__esModule",{value:!0});var u9=Mp,f9=Dp;function d9(e,t){return t===void 0&&(t={}),Up(this,void 0,void 0,function(){var n,r;return zp(this,function(o){switch(o.label){case 0:return n=u9.getSanitizedOptions(t),r=new h9(e,n),[4,r.execute()];case 1:return[2,o.sent()]}})})}var p9=sS.backOff=d9,h9=function(){function e(t,n){this.request=t,this.options=n,this.attemptNumber=0}return e.prototype.execute=function(){return Up(this,void 0,void 0,function(){var t,n;return zp(this,function(r){switch(r.label){case 0:if(this.attemptLimitReached)return[3,7];r.label=1;case 1:return r.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return r.sent(),[4,this.request()];case 3:return[2,r.sent()];case 4:return t=r.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(n=r.sent(),!n||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return Up(this,void 0,void 0,function(){var t;return zp(this,function(n){switch(n.label){case 0:return t=f9.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return n.sent(),[2]}})})},e}(),lS=Object.prototype.toString,cS=function(t){var n=lS.call(t),r=n==="[object Arguments]";return r||(r=n!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&lS.call(t.callee)==="[object Function]"),r},Hp,uS;function m9(){if(uS)return Hp;uS=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=cS,o=Object.prototype.propertyIsEnumerable,i=!o.call({toString:null},"toString"),a=o.call(function(){},"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(p){var d=p.constructor;return d&&d.prototype===p},c={$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},u=function(){if(typeof window>"u")return!1;for(var p in window)try{if(!c["$"+p]&&t.call(window,p)&&window[p]!==null&&typeof window[p]=="object")try{l(window[p])}catch{return!0}}catch{return!0}return!1}(),f=function(p){if(typeof window>"u"||!u)return l(p);try{return l(p)}catch{return!1}};e=function(d){var h=d!==null&&typeof d=="object",m=n.call(d)==="[object Function]",y=r(d),v=h&&n.call(d)==="[object String]",g=[];if(!h&&!m&&!y)throw new TypeError("Object.keys called on a non-object");var b=a&&m;if(v&&d.length>0&&!t.call(d,0))for(var k=0;k<d.length;++k)g.push(String(k));if(y&&d.length>0)for(var S=0;S<d.length;++S)g.push(String(S));else for(var $ in d)!(b&&$==="prototype")&&t.call(d,$)&&g.push(String($));if(i)for(var C=f(d),P=0;P<s.length;++P)!(C&&s[P]==="constructor")&&t.call(d,s[P])&&g.push(s[P]);return g}}return Hp=e,Hp}var v9=Array.prototype.slice,y9=cS,fS=Object.keys,tc=fS?function(t){return fS(t)}:m9(),dS=Object.keys;tc.shim=function(){if(Object.keys){var t=function(){var n=Object.keys(arguments);return n&&n.length===arguments.length}(1,2);t||(Object.keys=function(r){return y9(r)?dS(v9.call(r)):dS(r)})}else Object.keys=tc;return Object.keys||tc};var qp=tc,g9=qp,b9=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",w9=Object.prototype.toString,x9=Array.prototype.concat,pS=Id,S9=function(e){return typeof e=="function"&&w9.call(e)==="[object Function]"},hS=Pd(),E9=function(e,t,n,r){if(t in e){if(r===!0){if(e[t]===n)return}else if(!S9(r)||!r())return}hS?pS(e,t,n,!0):pS(e,t,n)},mS=function(e,t){var n=arguments.length>2?arguments[2]:{},r=g9(t);b9&&(r=x9.call(r,Object.getOwnPropertySymbols(t)));for(var o=0;o<r.length;o+=1)E9(e,r[o],t[r[o]],n[r[o]])};mS.supportsDescriptors=!!hS;var Mo=mS,$9=qp,vS=dl(),yS=_n,gS=Object,O9=yS("Array.prototype.push"),bS=yS("Object.prototype.propertyIsEnumerable"),k9=vS?Object.getOwnPropertySymbols:null,wS=function(t,n){if(t==null)throw new TypeError("target must be an object");var r=gS(t);if(arguments.length===1)return r;for(var o=1;o<arguments.length;++o){var i=gS(arguments[o]),a=$9(i),s=vS&&(Object.getOwnPropertySymbols||k9);if(s)for(var l=s(i),c=0;c<l.length;++c){var u=l[c];bS(i,u)&&O9(a,u)}for(var f=0;f<a.length;++f){var p=a[f];if(bS(i,p)){var d=i[p];r[p]=d}}}return r},Wp=wS,_9=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),n={},r=0;r<t.length;++r)n[t[r]]=t[r];var o=Object.assign({},n),i="";for(var a in o)i+=a;return e!==i},T9=function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch{return e[1]==="y"}return!1},xS=function(){return!Object.assign||_9()||T9()?Wp:Object.assign},C9=Mo,I9=xS,A9=function(){var t=I9();return C9(Object,{assign:t},{assign:function(){return Object.assign!==t}}),t},P9=Mo,R9=si,M9=wS,SS=xS,D9=A9,j9=R9.apply(SS()),ES=function(t,n){return j9(Object,arguments)};P9(ES,{getPolyfill:SS,implementation:M9,shim:D9});var N9=ES,Fa=function(){return typeof(function(){}).name=="string"},Ba=Object.getOwnPropertyDescriptor;if(Ba)try{Ba([],"length")}catch{Ba=null}Fa.functionsHaveConfigurableNames=function(){if(!Fa()||!Ba)return!1;var t=Ba(function(){},"name");return!!t&&!!t.configurable};var L9=Function.prototype.bind;Fa.boundFunctionsHaveNames=function(){return Fa()&&typeof L9=="function"&&(function(){}).bind().name!==""};var F9=Fa,$S=Id,B9=Pd(),U9=F9.functionsHaveConfigurableNames(),z9=_o,H9=function(t,n){if(typeof t!="function")throw new z9("`fn` is not a function");var r=arguments.length>2&&!!arguments[2];return(!r||U9)&&(B9?$S(t,"name",n,!0,!0):$S(t,"name",n)),t},q9=H9,W9=_o,V9=Object,OS=q9(function(){if(this==null||this!==V9(this))throw new W9("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0),K9=OS,G9=Mo.supportsDescriptors,Z9=Object.getOwnPropertyDescriptor,kS=function(){if(G9&&/a/mig.flags==="gim"){var t=Z9(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&"dotAll"in RegExp.prototype&&"hasIndices"in RegExp.prototype){var n="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){n+="d"}}),Object.defineProperty(r,"sticky",{get:function(){n+="y"}}),t.get.call(r),n==="dy")return t.get}}return K9},Y9=Mo.supportsDescriptors,J9=kS,X9=Object.getOwnPropertyDescriptor,Q9=Object.defineProperty,e8=TypeError,_S=Object.getPrototypeOf,t8=/a/,n8=function(){if(!Y9||!_S)throw new e8("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=J9(),n=_S(t8),r=X9(n,"flags");return(!r||r.get!==t)&&Q9(n,"flags",{configurable:!0,enumerable:!1,get:t}),t},r8=Mo,o8=si,i8=OS,TS=kS,a8=n8,CS=o8(TS());r8(CS,{getPolyfill:TS,implementation:i8,shim:a8});var s8=CS,nc={exports:{}},l8=dl,Do=function(){return l8()&&!!Symbol.toStringTag},c8=Do(),u8=_n,Vp=u8("Object.prototype.toString"),rc=function(t){return c8&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:Vp(t)==="[object Arguments]"},IS=function(t){return rc(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Vp(t)!=="[object Array]"&&Vp(t.callee)==="[object Function]"},f8=function(){return rc(arguments)}();rc.isLegacyArguments=IS;var AS=f8?rc:IS,d8=Lw,Ua=Kd(),Ir=_o,Kp={assert:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Ir("`O` is not an object");if(typeof t!="string")throw new Ir("`slot` must be a string");if(Ua.assert(e),!Kp.has(e,t))throw new Ir("`"+t+"` is not present on `O`")},get:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Ir("`O` is not an object");if(typeof t!="string")throw new Ir("`slot` must be a string");var n=Ua.get(e);return n&&n["$"+t]},has:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Ir("`O` is not an object");if(typeof t!="string")throw new Ir("`slot` must be a string");var n=Ua.get(e);return!!n&&d8(n,"$"+t)},set:function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new Ir("`O` is not an object");if(typeof t!="string")throw new Ir("`slot` must be a string");var r=Ua.get(e);r||(r={},Ua.set(e,r)),r["$"+t]=n}};Object.freeze&&Object.freeze(Kp);var p8=Kp,za=p8,h8=SyntaxError,PS=typeof StopIteration=="object"?StopIteration:null,m8=function(t){if(!PS)throw new h8("this environment lacks StopIteration");za.set(t,"[[Done]]",!1);var n={next:function(){var o=za.get(this,"[[Iterator]]"),i=za.get(o,"[[Done]]");try{return{done:i,value:i?void 0:o.next()}}catch(a){if(za.set(o,"[[Done]]",!0),a!==PS)throw a;return{done:!0,value:void 0}}}};return za.set(n,"[[Iterator]]",t),n},v8={}.toString,RS=Array.isArray||function(e){return v8.call(e)=="[object Array]"},y8=String.prototype.valueOf,g8=function(t){try{return y8.call(t),!0}catch{return!1}},b8=Object.prototype.toString,w8="[object String]",x8=Do(),MS=function(t){return typeof t=="string"?!0:typeof t!="object"?!1:x8?g8(t):b8.call(t)===w8},Gp=typeof Map=="function"&&Map.prototype?Map:null,S8=typeof Set=="function"&&Set.prototype?Set:null,oc;Gp||(oc=function(t){return!1});var DS=Gp?Map.prototype.has:null,jS=S8?Set.prototype.has:null;!oc&&!DS&&(oc=function(t){return!1});var NS=oc||function(t){if(!t||typeof t!="object")return!1;try{if(DS.call(t),jS)try{jS.call(t)}catch{return!0}return t instanceof Gp}catch{}return!1},E8=typeof Map=="function"&&Map.prototype?Map:null,Zp=typeof Set=="function"&&Set.prototype?Set:null,ic;Zp||(ic=function(t){return!1});var LS=E8?Map.prototype.has:null,FS=Zp?Set.prototype.has:null;!ic&&!FS&&(ic=function(t){return!1});var BS=ic||function(t){if(!t||typeof t!="object")return!1;try{if(FS.call(t),LS)try{LS.call(t)}catch{return!0}return t instanceof Zp}catch{}return!1},US=AS,zS=m8;if(Ed()||dl()){var Yp=Symbol.iterator;nc.exports=function(t){if(t!=null&&typeof t[Yp]<"u")return t[Yp]();if(US(t))return Array.prototype[Yp].call(t)}}else{var $8=RS,O8=MS,HS=nr,k8=HS("%Map%",!0),_8=HS("%Set%",!0),Fn=_n,qS=Fn("Array.prototype.push"),WS=Fn("String.prototype.charCodeAt"),T8=Fn("String.prototype.slice"),C8=function(t,n){var r=t.length;if(n+1>=r)return n+1;var o=WS(t,n);if(o<55296||o>56319)return n+1;var i=WS(t,n+1);return i<56320||i>57343?n+1:n+2},Jp=function(t){var n=0;return{next:function(){var o=n>=t.length,i;return o||(i=t[n],n+=1),{done:o,value:i}}}},VS=function(t,n){if($8(t)||US(t))return Jp(t);if(O8(t)){var r=0;return{next:function(){var i=C8(t,r),a=T8(t,r,i);return r=i,{done:i>t.length,value:a}}}}if(n&&typeof t["_es6-shim iterator_"]<"u")return t["_es6-shim iterator_"]()};if(!k8&&!_8)nc.exports=function(t){if(t!=null)return VS(t,!0)};else{var I8=NS,A8=BS,KS=Fn("Map.prototype.forEach",!0),GS=Fn("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var ZS=Fn("Map.prototype.iterator",!0),YS=Fn("Set.prototype.iterator",!0);var JS=Fn("Map.prototype.@@iterator",!0)||Fn("Map.prototype._es6-shim iterator_",!0),XS=Fn("Set.prototype.@@iterator",!0)||Fn("Set.prototype._es6-shim iterator_",!0),P8=function(t){if(I8(t)){if(ZS)return zS(ZS(t));if(JS)return JS(t);if(KS){var n=[];return KS(t,function(o,i){qS(n,[i,o])}),Jp(n)}}if(A8(t)){if(YS)return zS(YS(t));if(XS)return XS(t);if(GS){var r=[];return GS(t,function(o){qS(r,o)}),Jp(r)}}};nc.exports=function(t){return P8(t)||VS(t)}}}var R8=nc.exports,QS=function(e){return e!==e},eE=function(t,n){return t===0&&n===0?1/t===1/n:!!(t===n||QS(t)&&QS(n))},M8=eE,tE=function(){return typeof Object.is=="function"?Object.is:M8},D8=tE,j8=Mo,N8=function(){var t=D8();return j8(Object,{is:t},{is:function(){return Object.is!==t}}),t},L8=Mo,F8=si,B8=eE,nE=tE,U8=N8,rE=F8(nE(),Object);L8(rE,{getPolyfill:nE,implementation:B8,shim:U8});var z8=rE,H8=si,oE=_n,q8=nr,Xp=q8("%ArrayBuffer%",!0),ac=oE("ArrayBuffer.prototype.byteLength",!0),W8=oE("Object.prototype.toString"),iE=!!Xp&&!ac&&new Xp(0).slice,aE=!!iE&&H8(iE),sE=ac||aE?function(t){if(!t||typeof t!="object")return!1;try{return ac?ac(t):aE(t,0),!0}catch{return!1}}:Xp?function(t){return W8(t)==="[object ArrayBuffer]"}:function(t){return!1},V8=Date.prototype.getDay,K8=function(t){try{return V8.call(t),!0}catch{return!1}},G8=Object.prototype.toString,Z8="[object Date]",Y8=Do(),J8=function(t){return typeof t!="object"||t===null?!1:Y8?K8(t):G8.call(t)===Z8},Qp=_n,lE=Do(),cE,uE,eh,th;if(lE){cE=Qp("Object.prototype.hasOwnProperty"),uE=Qp("RegExp.prototype.exec"),eh={};var nh=function(){throw eh};th={toString:nh,valueOf:nh},typeof Symbol.toPrimitive=="symbol"&&(th[Symbol.toPrimitive]=nh)}var X8=Qp("Object.prototype.toString"),Q8=Object.getOwnPropertyDescriptor,ez="[object RegExp]",tz=lE?function(t){if(!t||typeof t!="object")return!1;var n=Q8(t,"lastIndex"),r=n&&cE(n,"value");if(!r)return!1;try{uE(t,th)}catch(o){return o===eh}}:function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:X8(t)===ez},nz=_n,fE=nz("SharedArrayBuffer.prototype.byteLength",!0),rz=fE?function(t){if(!t||typeof t!="object")return!1;try{return fE(t),!0}catch{return!1}}:function(t){return!1},oz=Number.prototype.toString,iz=function(t){try{return oz.call(t),!0}catch{return!1}},az=Object.prototype.toString,sz="[object Number]",lz=Do(),cz=function(t){return typeof t=="number"?!0:typeof t!="object"?!1:lz?iz(t):az.call(t)===sz},dE=_n,uz=dE("Boolean.prototype.toString"),fz=dE("Object.prototype.toString"),dz=function(t){try{return uz(t),!0}catch{return!1}},pz="[object Boolean]",hz=Do(),mz=function(t){return typeof t=="boolean"?!0:t===null||typeof t!="object"?!1:hz&&Symbol.toStringTag in t?dz(t):fz(t)===pz},rh={exports:{}},vz=Object.prototype.toString,yz=Ed();if(yz){var gz=Symbol.prototype.toString,bz=/^Symbol\(.*\)$/,wz=function(t){return typeof t.valueOf()!="symbol"?!1:bz.test(gz.call(t))};rh.exports=function(t){if(typeof t=="symbol")return!0;if(vz.call(t)!=="[object Symbol]")return!1;try{return wz(t)}catch{return!1}}}else rh.exports=function(t){return!1};var xz=rh.exports,oh={exports:{}},pE=typeof BigInt<"u"&&BigInt,Sz=function(){return typeof pE=="function"&&typeof BigInt=="function"&&typeof pE(42)=="bigint"&&typeof BigInt(42)=="bigint"},Ez=Sz();if(Ez){var $z=BigInt.prototype.valueOf,Oz=function(t){try{return $z.call(t),!0}catch{}return!1};oh.exports=function(t){return t===null||typeof t>"u"||typeof t=="boolean"||typeof t=="string"||typeof t=="number"||typeof t=="symbol"||typeof t=="function"?!1:typeof t=="bigint"?!0:Oz(t)}}else oh.exports=function(t){return!1};var kz=oh.exports,_z=MS,Tz=cz,Cz=mz,Iz=xz,Az=kz,Pz=function(t){if(t==null||typeof t!="object"&&typeof t!="function")return null;if(_z(t))return"String";if(Tz(t))return"Number";if(Cz(t))return"Boolean";if(Iz(t))return"Symbol";if(Az(t))return"BigInt"},sc=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,hE=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,lc;sc||(lc=function(t){return!1});var ih=sc?sc.prototype.has:null,ah=hE?hE.prototype.has:null;!lc&&!ih&&(lc=function(t){return!1});var Rz=lc||function(t){if(!t||typeof t!="object")return!1;try{if(ih.call(t,ih),ah)try{ah.call(t,ah)}catch{return!0}return t instanceof sc}catch{}return!1},sh={exports:{}},Mz=nr,mE=_n,Dz=Mz("%WeakSet%",!0),lh=mE("WeakSet.prototype.has",!0);if(lh){var ch=mE("WeakMap.prototype.has",!0);sh.exports=function(t){if(!t||typeof t!="object")return!1;try{if(lh(t,lh),ch)try{ch(t,ch)}catch{return!0}return t instanceof Dz}catch{}return!1}}else sh.exports=function(t){return!1};var jz=sh.exports,Nz=NS,Lz=BS,Fz=Rz,Bz=jz,Uz=function(t){if(t&&typeof t=="object"){if(Nz(t))return"Map";if(Lz(t))return"Set";if(Fz(t))return"WeakMap";if(Bz(t))return"WeakSet"}return!1},vE=Function.prototype.toString,bi=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,uh,cc;if(typeof bi=="function"&&typeof Object.defineProperty=="function")try{uh=Object.defineProperty({},"length",{get:function(){throw cc}}),cc={},bi(function(){throw 42},null,uh)}catch(e){e!==cc&&(bi=null)}else bi=null;var zz=/^\s*class\b/,fh=function(t){try{var n=vE.call(t);return zz.test(n)}catch{return!1}},dh=function(t){try{return fh(t)?!1:(vE.call(t),!0)}catch{return!1}},uc=Object.prototype.toString,Hz="[object Object]",qz="[object Function]",Wz="[object GeneratorFunction]",Vz="[object HTMLAllCollection]",Kz="[object HTML document.all class]",Gz="[object HTMLCollection]",Zz=typeof Symbol=="function"&&!!Symbol.toStringTag,Yz=!(0 in[,]),ph=function(){return!1};if(typeof document=="object"){var Jz=document.all;uc.call(Jz)===uc.call(document.all)&&(ph=function(t){if((Yz||!t)&&(typeof t>"u"||typeof t=="object"))try{var n=uc.call(t);return(n===Vz||n===Kz||n===Gz||n===Hz)&&t("")==null}catch{}return!1})}var Xz=bi?function(t){if(ph(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{bi(t,null,uh)}catch(n){if(n!==cc)return!1}return!fh(t)&&dh(t)}:function(t){if(ph(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(Zz)return dh(t);if(fh(t))return!1;var n=uc.call(t);return n!==qz&&n!==Wz&&!/^\[object HTML/.test(n)?!1:dh(t)},Qz=Xz,eH=Object.prototype.toString,yE=Object.prototype.hasOwnProperty,tH=function(t,n,r){for(var o=0,i=t.length;o<i;o++)yE.call(t,o)&&(r==null?n(t[o],o,t):n.call(r,t[o],o,t))},nH=function(t,n,r){for(var o=0,i=t.length;o<i;o++)r==null?n(t.charAt(o),o,t):n.call(r,t.charAt(o),o,t)},rH=function(t,n,r){for(var o in t)yE.call(t,o)&&(r==null?n(t[o],o,t):n.call(r,t[o],o,t))},oH=function(t,n,r){if(!Qz(n))throw new TypeError("iterator must be a function");var o;arguments.length>=3&&(o=r),eH.call(t)==="[object Array]"?tH(t,n,o):typeof t=="string"?nH(t,n,o):rH(t,n,o)},iH=oH,aH=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],hh=aH,sH=typeof globalThis>"u"?Xe:globalThis,lH=function(){for(var t=[],n=0;n<hh.length;n++)typeof sH[hh[n]]=="function"&&(t[t.length]=hh[n]);return t},fc=iH,cH=lH,gE=si,mh=_n,dc=Cd,uH=mh("Object.prototype.toString"),bE=Do(),wE=typeof globalThis>"u"?Xe:globalThis,vh=cH(),yh=mh("String.prototype.slice"),gh=Object.getPrototypeOf,fH=mh("Array.prototype.indexOf",!0)||function(t,n){for(var r=0;r<t.length;r+=1)if(t[r]===n)return r;return-1},pc={__proto__:null};bE&&dc&&gh?fc(vh,function(e){var t=new wE[e];if(Symbol.toStringTag in t){var n=gh(t),r=dc(n,Symbol.toStringTag);if(!r){var o=gh(n);r=dc(o,Symbol.toStringTag)}pc["$"+e]=gE(r.get)}}):fc(vh,function(e){var t=new wE[e],n=t.slice||t.set;n&&(pc["$"+e]=gE(n))});var dH=function(t){var n=!1;return fc(pc,function(r,o){if(!n)try{"$"+r(t)===o&&(n=yh(o,1))}catch{}}),n},pH=function(t){var n=!1;return fc(pc,function(r,o){if(!n)try{r(t),n=yh(o,1)}catch{}}),n},hH=function(t){if(!t||typeof t!="object")return!1;if(!bE){var n=yh(uH(t),8,-1);return fH(vh,n)>-1?n:n!=="Object"?!1:pH(t)}return dc?dH(t):null},mH=_n,xE=mH("ArrayBuffer.prototype.byteLength",!0),vH=sE,yH=function(t){return vH(t)?xE?xE(t):t.byteLength:NaN},SE=N9,sr=_n,EE=s8,gH=nr,wi=R8,bH=Kd,$E=z8,OE=AS,kE=RS,_E=sE,TE=J8,CE=tz,IE=rz,AE=qp,PE=Pz,RE=Uz,ME=hH,DE=yH,jE=sr("SharedArrayBuffer.prototype.byteLength",!0),NE=sr("Date.prototype.getTime"),bh=Object.getPrototypeOf,LE=sr("Object.prototype.toString"),hc=gH("%Set%",!0),wh=sr("Map.prototype.has",!0),mc=sr("Map.prototype.get",!0),FE=sr("Map.prototype.size",!0),vc=sr("Set.prototype.add",!0),BE=sr("Set.prototype.delete",!0),yc=sr("Set.prototype.has",!0),gc=sr("Set.prototype.size",!0);function UE(e,t,n,r){for(var o=wi(e),i;(i=o.next())&&!i.done;)if(Bn(t,i.value,n,r))return BE(e,i.value),!0;return!1}function zE(e){if(typeof e>"u")return null;if(typeof e!="object")return typeof e=="symbol"?!1:typeof e=="string"||typeof e=="number"?+e==+e:!0}function wH(e,t,n,r,o,i){var a=zE(n);if(a!=null)return a;var s=mc(t,a),l=SE({},o,{strict:!1});return typeof s>"u"&&!wh(t,a)||!Bn(r,s,l,i)?!1:!wh(e,a)&&Bn(r,s,l,i)}function xH(e,t,n){var r=zE(n);return r??(yc(t,r)&&!yc(e,r))}function HE(e,t,n,r,o,i){for(var a=wi(e),s,l;(s=a.next())&&!s.done;)if(l=s.value,Bn(n,l,o,i)&&Bn(r,mc(t,l),o,i))return BE(e,l),!0;return!1}function Bn(e,t,n,r){var o=n||{};if(o.strict?$E(e,t):e===t)return!0;var i=PE(e),a=PE(t);if(i!==a)return!1;if(!e||!t||typeof e!="object"&&typeof t!="object")return o.strict?$E(e,t):e==t;var s=r.has(e),l=r.has(t),c;if(s&&l){if(r.get(e)===r.get(t))return!0}else c={};return s||r.set(e,c),l||r.set(t,c),$H(e,t,o,r)}function qE(e){return!e||typeof e!="object"||typeof e.length!="number"||typeof e.copy!="function"||typeof e.slice!="function"||e.length>0&&typeof e[0]!="number"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}function SH(e,t,n,r){if(gc(e)!==gc(t))return!1;for(var o=wi(e),i=wi(t),a,s,l;(a=o.next())&&!a.done;)if(a.value&&typeof a.value=="object")l||(l=new hc),vc(l,a.value);else if(!yc(t,a.value)){if(n.strict||!xH(e,t,a.value))return!1;l||(l=new hc),vc(l,a.value)}if(l){for(;(s=i.next())&&!s.done;)if(s.value&&typeof s.value=="object"){if(!UE(l,s.value,n.strict,r))return!1}else if(!n.strict&&!yc(e,s.value)&&!UE(l,s.value,n.strict,r))return!1;return gc(l)===0}return!0}function EH(e,t,n,r){if(FE(e)!==FE(t))return!1;for(var o=wi(e),i=wi(t),a,s,l,c,u,f;(a=o.next())&&!a.done;)if(c=a.value[0],u=a.value[1],c&&typeof c=="object")l||(l=new hc),vc(l,c);else if(f=mc(t,c),typeof f>"u"&&!wh(t,c)||!Bn(u,f,n,r)){if(n.strict||!wH(e,t,c,u,n,r))return!1;l||(l=new hc),vc(l,c)}if(l){for(;(s=i.next())&&!s.done;)if(c=s.value[0],f=s.value[1],c&&typeof c=="object"){if(!HE(l,e,c,f,n,r))return!1}else if(!n.strict&&(!e.has(c)||!Bn(mc(e,c),f,n,r))&&!HE(l,e,c,f,SE({},n,{strict:!1}),r))return!1;return gc(l)===0}return!0}function $H(e,t,n,r){var o,i;if(typeof e!=typeof t||e==null||t==null||LE(e)!==LE(t)||OE(e)!==OE(t))return!1;var a=kE(e),s=kE(t);if(a!==s)return!1;var l=e instanceof Error,c=t instanceof Error;if(l!==c||(l||c)&&(e.name!==t.name||e.message!==t.message))return!1;var u=CE(e),f=CE(t);if(u!==f||(u||f)&&(e.source!==t.source||EE(e)!==EE(t)))return!1;var p=TE(e),d=TE(t);if(p!==d||(p||d)&&NE(e)!==NE(t)||n.strict&&bh&&bh(e)!==bh(t))return!1;var h=ME(e),m=ME(t);if(h!==m)return!1;if(h||m){if(e.length!==t.length)return!1;for(o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}var y=qE(e),v=qE(t);if(y!==v)return!1;if(y||v){if(e.length!==t.length)return!1;for(o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}var g=_E(e),b=_E(t);if(g!==b)return!1;if(g||b)return DE(e)!==DE(t)?!1:typeof Uint8Array=="function"&&Bn(new Uint8Array(e),new Uint8Array(t),n,r);var k=IE(e),S=IE(t);if(k!==S)return!1;if(k||S)return jE(e)!==jE(t)?!1:typeof Uint8Array=="function"&&Bn(new Uint8Array(e),new Uint8Array(t),n,r);if(typeof e!=typeof t)return!1;var $=AE(e),C=AE(t);if($.length!==C.length)return!1;for($.sort(),C.sort(),o=$.length-1;o>=0;o--)if($[o]!=C[o])return!1;for(o=$.length-1;o>=0;o--)if(i=$[o],!Bn(e[i],t[i],n,r))return!1;var P=RE(e),F=RE(t);return P!==F?!1:P==="Set"||F==="Set"?SH(e,t,n,r):P==="Map"?EH(e,t,n,r):!0}var OH=function(t,n,r){return Bn(t,n,r,bH())};const kH=Le(OH),_H=({children:e,...t})=>{const n=E.useRef(),r=E.useRef(null),o=AB({...t,messageContainerRef:r});return n.current||(n.current=o),L.jsx(Yx.Provider,{value:{...t.configuration},children:L.jsx(Vx.Provider,{value:n.current,children:L.jsx(TH,{children:e})})})},TH=({children:e})=>{const t=Ie(b=>b.client),n=Ie(b=>b.addMessage),r=Ie(b=>b.setMessages),o=Ie(b=>b.configuration),i=Ie(b=>b.setConnected),a=Ie(b=>b.userData),s=Ie(b=>b.userName),l=Ie(b=>b.userPictureUrl),c=Ie(b=>b.setIsTyping),u=Ie(b=>b.getMessages),f=Ie(b=>b.setHeaderMessage),p=Ie(b=>b.setDisableComposer),d=mn(b=>b.setConversationId),h=mn(b=>b.user),m=mn(b=>b.conversationId),y=mn(b=>b.setUser),[v,g]=E.useState(0);return E.useEffect(()=>{if(t)return t.on("messageSent",b=>{const k=u(),S=k[k.length-1];(k.length===0||!kH(S.block,ra(b).payload))&&n({direction:"outgoing",sender:{name:"You"},timestamp:new Date,block:ra(b).payload,disableInput:!1})})},[m]),E.useEffect(()=>{if(t)return t.on("message",b=>{try{const{payload:k,disableInput:S,id:$,conversationId:C}=b;if(m!==C)return;c(!1,0),n({id:$,direction:"incoming",sender:{name:o.botName??"Bot",avatar:o.botAvatar},timestamp:new Date(b.sentOn),block:k,disableInput:S})}catch{console.error("Invalid message payload")}})},[m]),E.useEffect(()=>{if(t)return t.on("conversation",b=>{d(b)})},[]),Mx(async()=>{if(t)return t.on("error",()=>{g(b=>b+1)})}),Mx(async()=>{if(!t||m&&t.conversationId===m)return;let b;try{f("Connecting..."),p(!0),b=await p9(()=>t.connect(h,a,{name:s,pictureUrl:l}),{maxDelay:1e4,numOfAttempts:1/0}),f(void 0),p(!1),i(!0)}catch(S){console.error(S),f("Connection failed. Please try again later."),i(!1);return}y(b),m&&await t.conversationExists(m)?await t.switchConversation(m):await t.newConversation();const k=[];for(const S of await t.listMessages())try{const{payload:$,authorId:C,sentOn:P,disableInput:F,id:T}=S,M=C===t.userId?"outgoing":"incoming";k.push({id:T,direction:M,sender:M==="outgoing"?{name:"You"}:{name:o.botName??"Bot",avatar:o.botAvatar},timestamp:new Date(P),block:$,disableInput:F})}catch{console.error("Invalid message payload")}return r(k.reverse()),()=>{t.disconnect()}},[v,m]),L.jsx(L.Fragment,{children:e})};function Ar(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}const CH=_["useId".toString()]||(()=>{});let IH=0;function bc(e){const[t,n]=_.useState(CH());return aa(()=>{e||n(r=>r??String(IH++))},[e]),e||(t?`radix-${t}`:"")}function WE({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=AH({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Wr(n),l=E.useCallback(c=>{if(i){const f=typeof c=="function"?c(e):c;f!==e&&s(f)}else o(c)},[i,e,o,s]);return[a,l]}function AH({defaultProp:e,onChange:t}){const n=E.useState(e),[r]=n,o=E.useRef(r),i=Wr(t);return E.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function PH(e,t=globalThis==null?void 0:globalThis.document){const n=Wr(e);E.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const xh="dismissableLayer.update",RH="dismissableLayer.pointerDownOutside",MH="dismissableLayer.focusOutside";let VE;const DH=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jH=E.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=e,u=E.useContext(DH),[f,p]=E.useState(null),d=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=E.useState({}),m=xo(t,P=>p(P)),y=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=y.indexOf(v),b=f?y.indexOf(f):-1,k=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=g,$=NH(P=>{const F=P.target,T=[...u.branches].some(M=>M.contains(F));!S||T||(i==null||i(P),s==null||s(P),P.defaultPrevented||l==null||l())},d),C=LH(P=>{const F=P.target;[...u.branches].some(M=>M.contains(F))||(a==null||a(P),s==null||s(P),P.defaultPrevented||l==null||l())},d);return PH(P=>{b===u.layers.size-1&&(o==null||o(P),!P.defaultPrevented&&l&&(P.preventDefault(),l()))},d),E.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(VE=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),KE(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=VE)}},[f,d,r,u]),E.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),KE())},[f,u]),E.useEffect(()=>{const P=()=>h({});return document.addEventListener(xh,P),()=>document.removeEventListener(xh,P)},[]),E.createElement($n.div,Vr({},c,{ref:m,style:{pointerEvents:k?S?"auto":"none":void 0,...e.style},onFocusCapture:Ar(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Ar(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Ar(e.onPointerDownCapture,$.onPointerDownCapture)}))});function NH(e,t=globalThis==null?void 0:globalThis.document){const n=Wr(e),r=E.useRef(!1),o=E.useRef(()=>{});return E.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let c=function(){GE(RH,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function LH(e,t=globalThis==null?void 0:globalThis.document){const n=Wr(e),r=E.useRef(!1);return E.useEffect(()=>{const o=i=>{i.target&&!r.current&&GE(MH,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function KE(){const e=new CustomEvent(xh);document.dispatchEvent(e)}function GE(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?AA(o,i):o.dispatchEvent(i)}const Sh="focusScope.autoFocusOnMount",Eh="focusScope.autoFocusOnUnmount",ZE={bubbles:!1,cancelable:!0},FH=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=E.useState(null),c=Wr(o),u=Wr(i),f=E.useRef(null),p=xo(t,m=>l(m)),d=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let m=function(b){if(d.paused||!s)return;const k=b.target;s.contains(k)?f.current=k:lo(f.current,{select:!0})},y=function(b){if(d.paused||!s)return;const k=b.relatedTarget;k!==null&&(s.contains(k)||lo(f.current,{select:!0}))},v=function(b){const k=document.activeElement;for(const S of b)S.removedNodes.length>0&&(s!=null&&s.contains(k)||lo(s))};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const g=new MutationObserver(v);return s&&g.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),g.disconnect()}}},[r,s,d.paused]),E.useEffect(()=>{if(s){XE.add(d);const m=document.activeElement;if(!s.contains(m)){const v=new CustomEvent(Sh,ZE);s.addEventListener(Sh,c),s.dispatchEvent(v),v.defaultPrevented||(BH(WH(YE(s)),{select:!0}),document.activeElement===m&&lo(s))}return()=>{s.removeEventListener(Sh,c),setTimeout(()=>{const v=new CustomEvent(Eh,ZE);s.addEventListener(Eh,u),s.dispatchEvent(v),v.defaultPrevented||lo(m??document.body,{select:!0}),s.removeEventListener(Eh,u),XE.remove(d)},0)}}},[s,c,u,d]);const h=E.useCallback(m=>{if(!n&&!r||d.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(y&&v){const g=m.currentTarget,[b,k]=UH(g);b&&k?!m.shiftKey&&v===k?(m.preventDefault(),n&&lo(b,{select:!0})):m.shiftKey&&v===b&&(m.preventDefault(),n&&lo(k,{select:!0})):v===g&&m.preventDefault()}},[n,r,d.paused]);return E.createElement($n.div,Vr({tabIndex:-1},a,{ref:p,onKeyDown:h}))});function BH(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(lo(r,{select:t}),document.activeElement!==n)return}function UH(e){const t=YE(e),n=JE(t,e),r=JE(t.reverse(),e);return[n,r]}function YE(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function JE(e,t){for(const n of e)if(!zH(n,{upTo:t}))return n}function zH(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function HH(e){return e instanceof HTMLInputElement&&"select"in e}function lo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&HH(e)&&t&&e.select()}}const XE=qH();function qH(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=QE(e,t),e.unshift(t)},remove(t){var n;e=QE(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function QE(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function WH(e){return e.filter(t=>t.tagName!=="A")}function VH(e,t){return E.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const wc=e=>{const{present:t,children:n}=e,r=KH(t),o=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),i=xo(r.ref,o.ref);return typeof n=="function"||r.isPresent?E.cloneElement(o,{ref:i}):null};wc.displayName="Presence";function KH(e){const[t,n]=E.useState(),r=E.useRef({}),o=E.useRef(e),i=E.useRef("none"),a=e?"mounted":"unmounted",[s,l]=VH(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const c=xc(r.current);i.current=s==="mounted"?c:"none"},[s]),aa(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,d=xc(c);e?l("MOUNT"):d==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==d?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),aa(()=>{if(t){const c=f=>{const d=xc(r.current).includes(f.animationName);f.target===t&&d&&Zn.flushSync(()=>l("ANIMATION_END"))},u=f=>{f.target===t&&(i.current=xc(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:E.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function xc(e){return(e==null?void 0:e.animationName)||"none"}let $h=0;function GH(){E.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:e$()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:e$()),$h++,()=>{$h===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),$h--}},[])}function e$(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var lr=function(){return lr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},lr.apply(this,arguments)};function t$(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function ZH(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Sc="right-scroll-bar-position",Ec="width-before-scroll-bar",YH="with-scroll-bars-hidden",JH="--removed-body-scroll-bar-size";function XH(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function QH(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function eq(e,t){return QH(t||null,function(n){return e.forEach(function(r){return XH(r,n)})})}function tq(e){return e}function nq(e,t){t===void 0&&(t=tq);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var l=function(){var u=a;a=[],u.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){a.push(u),c()},filter:function(u){return a=a.filter(u),n}}}};return o}function rq(e){e===void 0&&(e={});var t=nq(null);return t.options=lr({async:!0,ssr:!1},e),t}var n$=function(e){var t=e.sideCar,n=t$(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return _.createElement(r,lr({},n))};n$.isSideCarExport=!0;function oq(e,t){return e.useMedium(t),n$}var r$=rq(),Oh=function(){},$c=_.forwardRef(function(e,t){var n=_.useRef(null),r=_.useState({onScrollCapture:Oh,onWheelCapture:Oh,onTouchMoveCapture:Oh}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,f=e.shards,p=e.sideCar,d=e.noIsolation,h=e.inert,m=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,g=t$(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),b=p,k=eq([n,t]),S=lr(lr({},g),o);return _.createElement(_.Fragment,null,u&&_.createElement(b,{sideCar:r$,removeScrollBar:c,shards:f,noIsolation:d,inert:h,setCallbacks:i,allowPinchZoom:!!m,lockRef:n}),a?_.cloneElement(_.Children.only(s),lr(lr({},S),{ref:k})):_.createElement(v,lr({},S,{className:l,ref:k}),s))});$c.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},$c.classNames={fullWidth:Ec,zeroRight:Sc};var o$,iq=function(){if(o$)return o$;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function aq(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=iq();return t&&e.setAttribute("nonce",t),e}function sq(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function lq(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var cq=function(){var e=0,t=null;return{add:function(n){e==0&&(t=aq())&&(sq(t,n),lq(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},uq=function(){var e=cq();return function(t,n){_.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},i$=function(){var e=uq(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},fq={left:0,top:0,right:0,gap:0},kh=function(e){return parseInt(e||"",10)||0},dq=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[kh(n),kh(r),kh(o)]},pq=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return fq;var t=dq(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},hq=i$(),mq=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
285
+ .`.concat(YH,` {
286
286
  overflow: hidden `).concat(r,`;
287
287
  padding-right: `).concat(s,"px ").concat(r,`;
288
288
  }
@@ -299,53 +299,53 @@ to {
299
299
  `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
300
300
  }
301
301
 
302
- .`).concat(Yl,` {
302
+ .`).concat(Sc,` {
303
303
  right: `).concat(s,"px ").concat(r,`;
304
304
  }
305
305
 
306
- .`).concat(Jl,` {
306
+ .`).concat(Ec,` {
307
307
  margin-right: `).concat(s,"px ").concat(r,`;
308
308
  }
309
309
 
310
- .`).concat(Yl," .").concat(Yl,` {
310
+ .`).concat(Sc," .").concat(Sc,` {
311
311
  right: 0 `).concat(r,`;
312
312
  }
313
313
 
314
- .`).concat(Jl," .").concat(Jl,` {
314
+ .`).concat(Ec," .").concat(Ec,` {
315
315
  margin-right: 0 `).concat(r,`;
316
316
  }
317
317
 
318
318
  body {
319
- `).concat(G8,": ").concat(s,`px;
319
+ `).concat(JH,": ").concat(s,`px;
320
320
  }
321
- `)},pz=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=C.useMemo(function(){return uz(o)},[o]);return C.createElement(fz,{styles:dz(i,!t,o,n?"":"!important")})},Eh=!1;if(typeof window<"u")try{var Ql=Object.defineProperty({},"passive",{get:function(){return Eh=!0,!0}});window.addEventListener("test",Ql,Ql),window.removeEventListener("test",Ql,Ql)}catch{Eh=!1}var Ki=Eh?{passive:!1}:!1,hz=function(e){return e.tagName==="TEXTAREA"},aE=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!hz(e)&&n[t]==="visible")},mz=function(e){return aE(e,"overflowY")},yz=function(e){return aE(e,"overflowX")},sE=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=cE(e,n);if(r){var o=lE(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},vz=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},gz=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},cE=function(e,t){return e==="v"?mz(t):yz(t)},lE=function(e,t){return e==="v"?vz(t):gz(t)},bz=function(e,t){return e==="h"&&t==="rtl"?-1:1},wz=function(e,t,n,r,o){var i=bz(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,c=t.contains(s),l=!1,u=a>0,f=0,p=0;do{var d=lE(e,s),h=d[0],m=d[1],v=d[2],y=m-v-i*h;(h||y)&&cE(e,s)&&(f+=y,p+=h),s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(o&&f===0||!o&&a>f)||!u&&(o&&p===0||!o&&-a>p))&&(l=!0),l},eu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},uE=function(e){return[e.deltaX,e.deltaY]},fE=function(e){return e&&"current"in e?e.current:e},xz=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Sz=function(e){return`
321
+ `)},vq=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=_.useMemo(function(){return pq(o)},[o]);return _.createElement(hq,{styles:mq(i,!t,o,n?"":"!important")})},_h=!1;if(typeof window<"u")try{var Oc=Object.defineProperty({},"passive",{get:function(){return _h=!0,!0}});window.addEventListener("test",Oc,Oc),window.removeEventListener("test",Oc,Oc)}catch{_h=!1}var xi=_h?{passive:!1}:!1,yq=function(e){return e.tagName==="TEXTAREA"},a$=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!yq(e)&&n[t]==="visible")},gq=function(e){return a$(e,"overflowY")},bq=function(e){return a$(e,"overflowX")},s$=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=l$(e,n);if(r){var o=c$(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},wq=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},xq=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},l$=function(e,t){return e==="v"?gq(t):bq(t)},c$=function(e,t){return e==="v"?wq(t):xq(t)},Sq=function(e,t){return e==="h"&&t==="rtl"?-1:1},Eq=function(e,t,n,r,o){var i=Sq(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),c=!1,u=a>0,f=0,p=0;do{var d=c$(e,s),h=d[0],m=d[1],y=d[2],v=m-y-i*h;(h||v)&&l$(e,s)&&(f+=v,p+=h),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(o&&f===0||!o&&a>f)||!u&&(o&&p===0||!o&&-a>p))&&(c=!0),c},kc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},u$=function(e){return[e.deltaX,e.deltaY]},f$=function(e){return e&&"current"in e?e.current:e},$q=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Oq=function(e){return`
322
322
  .block-interactivity-`.concat(e,` {pointer-events: none;}
323
323
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
324
- `)},Ez=0,Gi=[];function _z(e){var t=C.useRef([]),n=C.useRef([0,0]),r=C.useRef(),o=C.useState(Ez++)[0],i=C.useState(function(){return iE()})[0],a=C.useRef(e);C.useEffect(function(){a.current=e},[e]),C.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=W8([e.lockRef.current],(e.shards||[]).map(fE),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.useCallback(function(m,v){if("touches"in m&&m.touches.length===2)return!a.current.allowPinchZoom;var y=eu(m),g=n.current,b="deltaX"in m?m.deltaX:g[0]-y[0],k="deltaY"in m?m.deltaY:g[1]-y[1],S,$=m.target,T=Math.abs(b)>Math.abs(k)?"h":"v";if("touches"in m&&T==="h"&&$.type==="range")return!1;var R=sE(T,$);if(!R)return!0;if(R?S=T:(S=T==="v"?"h":"v",R=sE(T,$)),!R)return!1;if(!r.current&&"changedTouches"in m&&(b||k)&&(r.current=S),!S)return!0;var B=r.current||S;return wz(B,v,m,B==="h"?b:k,!0)},[]),c=C.useCallback(function(m){var v=m;if(!(!Gi.length||Gi[Gi.length-1]!==i)){var y="deltaY"in v?uE(v):eu(v),g=t.current.filter(function(S){return S.name===v.type&&S.target===v.target&&xz(S.delta,y)})[0];if(g&&g.should){v.cancelable&&v.preventDefault();return}if(!g){var b=(a.current.shards||[]).map(fE).filter(Boolean).filter(function(S){return S.contains(v.target)}),k=b.length>0?s(v,b[0]):!a.current.noIsolation;k&&v.cancelable&&v.preventDefault()}}},[]),l=C.useCallback(function(m,v,y,g){var b={name:m,delta:v,target:y,should:g};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(k){return k!==b})},1)},[]),u=C.useCallback(function(m){n.current=eu(m),r.current=void 0},[]),f=C.useCallback(function(m){l(m.type,uE(m),m.target,s(m,e.lockRef.current))},[]),p=C.useCallback(function(m){l(m.type,eu(m),m.target,s(m,e.lockRef.current))},[]);C.useEffect(function(){return Gi.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Ki),document.addEventListener("touchmove",c,Ki),document.addEventListener("touchstart",u,Ki),function(){Gi=Gi.filter(function(m){return m!==i}),document.removeEventListener("wheel",c,Ki),document.removeEventListener("touchmove",c,Ki),document.removeEventListener("touchstart",u,Ki)}},[]);var d=e.removeScrollBar,h=e.inert;return C.createElement(C.Fragment,null,h?C.createElement(i,{styles:Sz(o)}):null,d?C.createElement(pz,{gapMode:"margin"}):null)}const $z=tz(rE,_z);var dE=C.forwardRef(function(e,t){return C.createElement(Xl,gr({},e,{ref:t,sideCar:$z}))});dE.classNames=Xl.classNames;const kz=dE;var Cz=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Zi=new WeakMap,tu=new WeakMap,nu={},_h=0,pE=function(e){return e&&(e.host||pE(e.parentNode))},Oz=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=pE(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Tz=function(e,t,n,r){var o=Oz(t,Array.isArray(e)?e:[e]);nu[n]||(nu[n]=new WeakMap);var i=nu[n],a=[],s=new Set,c=new Set(o),l=function(f){!f||s.has(f)||(s.add(f),l(f.parentNode))};o.forEach(l);var u=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))u(p);else{var d=p.getAttribute(r),h=d!==null&&d!=="false",m=(Zi.get(p)||0)+1,v=(i.get(p)||0)+1;Zi.set(p,m),i.set(p,v),a.push(p),m===1&&h&&tu.set(p,!0),v===1&&p.setAttribute(n,"true"),h||p.setAttribute(r,"true")}})};return u(t),s.clear(),_h++,function(){a.forEach(function(f){var p=Zi.get(f)-1,d=i.get(f)-1;Zi.set(f,p),i.set(f,d),p||(tu.has(f)||f.removeAttribute(r),tu.delete(f)),d||f.removeAttribute(n)}),_h--,_h||(Zi=new WeakMap,Zi=new WeakMap,tu=new WeakMap,nu={})}},Az=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||Cz(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Tz(r,o,n,"aria-hidden")):function(){return null}};const hE="Dialog",[mE,aue]=Nf(hE),[Pz,zr]=mE(hE),Iz=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=E.useRef(null),c=E.useRef(null),[l=!1,u]=VS({prop:r,defaultProp:o,onChange:i});return E.createElement(Pz,{scope:t,triggerRef:s,contentRef:c,contentId:Kl(),titleId:Kl(),descriptionId:Kl(),open:l,onOpenChange:u,onOpenToggle:E.useCallback(()=>u(f=>!f),[u]),modal:a},n)},Rz="DialogTrigger",Mz=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(Rz,n),i=Mo(t,o.triggerRef);return E.createElement(In.button,Ot({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":kh(o.open)},r,{ref:i,onClick:Ur(e.onClick,o.onOpenToggle)}))}),Nz="DialogPortal",[sue,yE]=mE(Nz,{forceMount:void 0}),$h="DialogOverlay",Dz=E.forwardRef((e,t)=>{const n=yE($h,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=zr($h,e.__scopeDialog);return i.modal?E.createElement(Gl,{present:r||i.open},E.createElement(jz,Ot({},o,{ref:t}))):null}),jz=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr($h,n);return E.createElement(kz,{as:Df,allowPinchZoom:!0,shards:[o.contentRef]},E.createElement(In.div,Ot({"data-state":kh(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),gs="DialogContent",Fz=E.forwardRef((e,t)=>{const n=yE(gs,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=zr(gs,e.__scopeDialog);return E.createElement(Gl,{present:r||i.open},i.modal?E.createElement(Lz,Ot({},o,{ref:t})):E.createElement(Bz,Ot({},o,{ref:t})))}),Lz=E.forwardRef((e,t)=>{const n=zr(gs,e.__scopeDialog),r=E.useRef(null),o=Mo(t,n.contentRef,r);return E.useEffect(()=>{const i=r.current;if(i)return Az(i)},[]),E.createElement(vE,Ot({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ur(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ur(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ur(e.onFocusOutside,i=>i.preventDefault())}))}),Bz=E.forwardRef((e,t)=>{const n=zr(gs,e.__scopeDialog),r=E.useRef(!1),o=E.useRef(!1);return E.createElement(vE,Ot({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),vE=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=zr(gs,n),c=E.useRef(null),l=Mo(t,c);return V8(),E.createElement(E.Fragment,null,E.createElement(D8,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},E.createElement(R8,Ot({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":kh(s.open)},a,{ref:l,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),Uz="DialogTitle",zz=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(Uz,n);return E.createElement(In.h2,Ot({id:o.titleId},r,{ref:t}))}),qz="DialogClose",Hz=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(qz,n);return E.createElement(In.button,Ot({type:"button"},r,{ref:t,onClick:Ur(e.onClick,()=>o.onOpenChange(!1))}))});function kh(e){return e?"open":"closed"}const Vz=Iz,Wz=Mz,Kz=Dz,Gz=Fz,Zz=zz,gE=Hz;function Yz({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const bE=C.forwardRef(Yz);function Eo({open:e,onOpenChange:t,children:n}){return F.jsx(Vz,{open:e,onOpenChange:t,children:n})}function Jz({title:e,children:t}){var r,o,i,a,s,c,l,u;const{modal:n}=ct;return F.jsxs(F.Fragment,{children:[F.jsx(Kz,{...n==null?void 0:n.overlay}),F.jsx("div",{...n==null?void 0:n.container,children:F.jsxs(Gz,{...(r=n==null?void 0:n.dialog)==null?void 0:r.container,children:[F.jsxs("div",{...(i=(o=n==null?void 0:n.dialog)==null?void 0:o.title)==null?void 0:i.container,children:[F.jsx(Zz,{...(s=(a=n==null?void 0:n.dialog)==null?void 0:a.title)==null?void 0:s.text,children:e}),F.jsx(gE,{children:F.jsx(bE,{role:"button",tabIndex:0,...(l=(c=n==null?void 0:n.dialog)==null?void 0:c.title)==null?void 0:l.closeIcon})})]}),F.jsx("div",{...(u=n==null?void 0:n.dialog)==null?void 0:u.content,children:t})]})})]})}Eo.Button=Wz,Eo.Close=gE,Eo.Content=Jz;const wE=E.forwardRef(({children:e,...t},n)=>{const{container:r}=ct;return F.jsxs("div",{...t,...r,ref:n,children:[F.jsx(h6,{}),F.jsxs(qS,{children:[F.jsx(Xz,{}),e]})]})}),Xz=()=>{const{modal:e}=ct,t=Pe(r=>r.connected),{showModal:n}=Ix();return E.useEffect(()=>{var r,o,i,a;t||n({title:"Connection Error",content:F.jsxs(F.Fragment,{children:[F.jsx("p",{...(o=(r=e==null?void 0:e.dialog)==null?void 0:r.newConversation)==null?void 0:o.text,children:"There was an error connecting to the server. Please check your internet connection and try again."}),F.jsx(Eo.Close,{asChild:!0,children:F.jsx("button",{type:"button",...(a=(i=e==null?void 0:e.dialog)==null?void 0:i.newConversation)==null?void 0:a.button,onClick:()=>window.location.reload(),children:"Restart"})})]})})},[t]),F.jsx(F.Fragment,{})},Qz=E.forwardRef(({children:e,onClick:t,...n},r)=>{const{fab:o}=ct,{container:i,icon:a}=o??{};return F.jsx("div",{...n,...i,ref:r,onClick:t,children:F.jsx("div",{...a})})}),xE="Collapsible",[eq,lue]=Nf(xE),[tq,Ch]=eq(xE),nq=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[c=!1,l]=VS({prop:r,defaultProp:o,onChange:a});return E.createElement(tq,{scope:n,disabled:i,contentId:Kl(),open:c,onOpenToggle:E.useCallback(()=>l(u=>!u),[l])},E.createElement(In.div,Ot({"data-state":Oh(c),"data-disabled":i?"":void 0},s,{ref:t})))}),rq="CollapsibleTrigger",oq=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Ch(rq,n);return E.createElement(In.button,Ot({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Oh(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:Ur(e.onClick,o.onOpenToggle)}))}),SE="CollapsibleContent",iq=E.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Ch(SE,e.__scopeCollapsible);return E.createElement(Gl,{present:n||o.open},({present:i})=>E.createElement(aq,Ot({},r,{ref:t,present:i})))}),aq=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=Ch(SE,n),[s,c]=E.useState(r),l=E.useRef(null),u=Mo(t,l),f=E.useRef(0),p=f.current,d=E.useRef(0),h=d.current,m=a.open||s,v=E.useRef(m),y=E.useRef();return E.useEffect(()=>{const g=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(g)},[]),Pa(()=>{const g=l.current;if(g){y.current=y.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";const b=g.getBoundingClientRect();f.current=b.height,d.current=b.width,v.current||(g.style.transitionDuration=y.current.transitionDuration,g.style.animationName=y.current.animationName),c(r)}},[a.open,r]),E.createElement(In.div,Ot({"data-state":Oh(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m},i,{ref:u,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style}}),m&&o)});function Oh(e){return e?"open":"closed"}const sq=nq,cq=iq,lq=e=>C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e},C.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M15.5 5.5v-5m0 0h-5m5 0L8.833 7.167m-2.5-5H4.5c-1.4 0-2.1 0-2.635.272A2.5 2.5 0 0 0 .772 3.532C.5 4.066.5 4.767.5 6.167V11.5c0 1.4 0 2.1.272 2.635a2.5 2.5 0 0 0 1.093 1.092C2.4 15.5 3.1 15.5 4.5 15.5h5.333c1.4 0 2.1 0 2.635-.273a2.5 2.5 0 0 0 1.093-1.092c.272-.535.272-1.235.272-2.635V9.667"})),EE=({...e})=>{var a,s;const{header:t,modal:n}=ct,r=Pe(c=>c.restartConversation),{showModal:o}=Ix(),i=c=>{var l,u,f,p;c.stopPropagation(),o({title:"Restart Conversation",content:F.jsxs(F.Fragment,{children:[F.jsx("p",{...(u=(l=n==null?void 0:n.dialog)==null?void 0:l.newConversation)==null?void 0:u.text,children:"Are you sure you want to restart a new conversation?"}),F.jsx(Eo.Close,{asChild:!0,children:F.jsx("button",{type:"button",...(p=(f=n==null?void 0:n.dialog)==null?void 0:f.newConversation)==null?void 0:p.button,onClick:r,children:"Restart"})})]})})};return F.jsx(X6,{...e,...(s=(a=t==null?void 0:t.content)==null?void 0:a.actions)==null?void 0:s.icons,role:"button",tabIndex:0,onClick:i,onKeyDown:c=>{c.key==="Enter"&&i(c)}})},uq=({...e})=>{const{header:t}=ct,n=Pe(o=>o.closeWindow),r=o=>{o.stopPropagation(),n==null||n()};return F.jsx(bE,{...e,...t.content.actions.icons,role:"button",tabIndex:0,onClick:r,onKeyDown:o=>{o.key==="Enter"&&r(o)}})},bs=({icon:e,title:t,link:n,...r})=>{var a,s,c,l,u,f,p,d,h,m,v,y;const{header:o}=ct,i=e??lq;return t?n?F.jsxs("a",{...r,...(s=(a=o.expandedContent)==null?void 0:a.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[F.jsx(i,{...(l=(c=o.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:l.icon}),F.jsx("p",{...(f=(u=o.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:f.link,children:t})]}):F.jsxs("div",{...r,...(d=(p=o.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:d.container,children:[F.jsx(i,{...(m=(h=o.expandedContent)==null?void 0:h.descriptionItems)==null?void 0:m.icon}),F.jsx("p",{...(y=(v=o.expandedContent)==null?void 0:v.descriptionItems)==null?void 0:y.text,children:t})]}):null},_E=({defaultOpen:e,disabled:t,onOpenChange:n,...r})=>{var p,d,h,m,v,y,g,b,k,S,$,T,R,B,O,M,H,L,P,N,j,W;const{header:o}=ct,i=Pe(V=>V.configuration),a=Pe(V=>V.closeWindow),s=Pe(V=>V.getClientId)(),c=Pe(V=>!V.disableRestartConversation),[l,u]=E.useState(!!e),f=!!((p=i.email)!=null&&p.title)||!!((d=i.phone)!=null&&d.title)||!!((h=i.website)!=null&&h.title)||!!((m=i.termsOfService)!=null&&m.link)||!!((v=i.privacyPolicy)!=null&&v.link);return F.jsxs(sq,{open:f?l:!1,onOpenChange:u,"data-disabled":f?void 0:"",...o.container,...r,children:[F.jsxs(oq,{...o.content.container,children:[F.jsx(Uf,{...r,userId:s,src:i.botAvatar,...o.content.avatar,children:i.botName||"Bot"}),F.jsx("h2",{...o.content.title,children:i.botName||"Bot"}),i.botDescription&&F.jsx("p",{...o.content.description,children:i.botDescription}),F.jsxs("div",{...o.content.actions.container,children:[c&&F.jsx(EE,{}),a&&F.jsx(uq,{})]})]}),F.jsxs(cq,{...o.expandedContent.container,children:[F.jsxs("div",{"data-links":"",...o.expandedContent.group,children:[F.jsx(bs,{"data-email":"",icon:W7,title:(y=i.email)==null?void 0:y.title,link:(b=(g=i.email)==null?void 0:g.link)!=null&&b.startsWith("mailto:")?(k=i.email)==null?void 0:k.link:`mailto:${(S=i.email)==null?void 0:S.link}`}),F.jsx(bs,{"data-phone":"",icon:X7,title:($=i.phone)==null?void 0:$.title,link:(R=(T=i.phone)==null?void 0:T.link)!=null&&R.startsWith("tel:")?(B=i.phone)==null?void 0:B.link:`tel:${(O=i.phone)==null?void 0:O.link}`}),F.jsx(bs,{"data-website":"",link:(M=i.website)==null?void 0:M.link,icon:G7,title:(H=i.website)==null?void 0:H.title})]}),F.jsxs("div",{"data-legal":"",...(L=o.expandedContent)==null?void 0:L.group,children:[F.jsx(bs,{"data-terms":"",link:(P=i.termsOfService)==null?void 0:P.link,icon:H7,title:(N=i.termsOfService)==null?void 0:N.title}),F.jsx(bs,{"data-privacy":"",link:(j=i.privacyPolicy)==null?void 0:j.link,icon:Y7,title:(W=i.privacyPolicy)==null?void 0:W.title})]})]})]})},$E=E.memo(({...e})=>{const{typingIndicator:t}=ct;return F.jsx("div",{...e,...t==null?void 0:t.container,children:F.jsx("div",{...t==null?void 0:t.loader})})}),Th=E.memo(E.forwardRef(({direction:e,block:t,scroll:n,disableInput:r,children:o,sender:i,...a},s)=>{var m,v,y,g;const[c,l]=E.useState([]),{message:u}=ct,{botAvatar:f,botName:p}=Pe(b=>b.configuration),d=Pe(b=>b.getClientId)(),h=Ug(d??"",15);return F.jsx(Ax.Provider,{value:{isLoading:c,setIsLoading:l},children:F.jsxs("div",{...a,...u==null?void 0:u.container,"data-loaded":c.length===0,"data-disable-input":!!r,"data-direction":e,ref:s,children:[F.jsxs(Ag,{"data-color":h,...(m=u==null?void 0:u.avatar)==null?void 0:m.container,children:[F.jsx(Pg,{...(v=u==null?void 0:u.avatar)==null?void 0:v.image,src:(i==null?void 0:i.avatar)??f}),F.jsx(Ig,{...(y=u==null?void 0:u.avatar)==null?void 0:y.fallback,children:(i==null?void 0:i.name[0])??((g=p??"Bot")==null?void 0:g[0])})]}),t&&F.jsx(Wi,{block:t}),o]})})}));function fq(){const e=Pe(r=>r.getClientId)(),t=Pe(r=>r.configuration),{messageList:{marquee:n}}=ct;return F.jsxs("li",{...n.container,children:[F.jsx(Uf,{userId:e,src:t.botAvatar,...n.avatar,children:(t.botName||"Bot").slice(0,1)}),F.jsxs("div",{...n.content,children:[F.jsx("h1",{...n.title,children:t.botName||"Bot"}),F.jsx("p",{...n.description,children:t.botDescription})]})]})}function dq(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var o=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");o.setAttribute("name",e),o.setAttribute("content",t),r.head.appendChild(o)}}catch{}}function pq(){dq("react-scroll-to-bottom:version","4.2.0")}var ws=function(e){return e&&e.Math===Math&&e},It=ws(typeof globalThis=="object"&&globalThis)||ws(typeof window=="object"&&window)||ws(typeof self=="object"&&self)||ws(typeof be=="object"&&be)||ws(typeof be=="object"&&be)||function(){return this}()||Function("return this")(),Rt=function(e){try{return!!e()}catch{return!0}},hq=Rt,ru=!hq(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),mq=ru,kE=Function.prototype,CE=kE.apply,OE=kE.call,Ah=typeof Reflect=="object"&&Reflect.apply||(mq?OE.bind(CE):function(){return OE.apply(CE,arguments)}),TE=ru,AE=Function.prototype,Ph=AE.call,yq=TE&&AE.bind.bind(Ph,Ph),Mt=TE?yq:function(e){return function(){return Ph.apply(e,arguments)}},PE=Mt,vq=PE({}.toString),gq=PE("".slice),Qo=function(e){return gq(vq(e),8,-1)},bq=Qo,wq=Mt,Ih=function(e){if(bq(e)==="Function")return wq(e)},Rh=typeof document=="object"&&document.all,rn=typeof Rh>"u"&&Rh!==void 0?function(e){return typeof e=="function"||e===Rh}:function(e){return typeof e=="function"},xs={},xq=Rt,vn=!xq(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Sq=ru,ou=Function.prototype.call,br=Sq?ou.bind(ou):function(){return ou.apply(ou,arguments)},Mh={},IE={}.propertyIsEnumerable,RE=Object.getOwnPropertyDescriptor,Eq=RE&&!IE.call({1:2},1);Mh.f=Eq?function(t){var n=RE(this,t);return!!n&&n.enumerable}:IE;var Ss=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},_q=Mt,$q=Rt,kq=Qo,Nh=Object,Cq=_q("".split),ME=$q(function(){return!Nh("z").propertyIsEnumerable(0)})?function(e){return kq(e)==="String"?Cq(e,""):Nh(e)}:Nh,Dh=function(e){return e==null},Oq=Dh,Tq=TypeError,jh=function(e){if(Oq(e))throw new Tq("Can't call method on "+e);return e},Aq=ME,Pq=jh,wr=function(e){return Aq(Pq(e))},Iq=rn,qr=function(e){return typeof e=="object"?e!==null:Iq(e)},Kt={},Fh=Kt,Lh=It,Rq=rn,NE=function(e){return Rq(e)?e:void 0},xr=function(e,t){return arguments.length<2?NE(Fh[e])||NE(Lh[e]):Fh[e]&&Fh[e][t]||Lh[e]&&Lh[e][t]},Mq=Mt,Hr=Mq({}.isPrototypeOf),Nq=It,DE=Nq.navigator,jE=DE&&DE.userAgent,Bh=jE?String(jE):"",FE=It,Uh=Bh,LE=FE.process,BE=FE.Deno,UE=LE&&LE.versions||BE&&BE.version,zE=UE&&UE.v8,Zn,iu;zE&&(Zn=zE.split("."),iu=Zn[0]>0&&Zn[0]<4?1:+(Zn[0]+Zn[1])),!iu&&Uh&&(Zn=Uh.match(/Edge\/(\d+)/),(!Zn||Zn[1]>=74)&&(Zn=Uh.match(/Chrome\/(\d+)/),Zn&&(iu=+Zn[1])));var zh=iu,qE=zh,Dq=Rt,jq=It,Fq=jq.String,Yi=!!Object.getOwnPropertySymbols&&!Dq(function(){var e=Symbol("symbol detection");return!Fq(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&qE&&qE<41}),Lq=Yi,HE=Lq&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Bq=xr,Uq=rn,zq=Hr,qq=HE,Hq=Object,Es=qq?function(e){return typeof e=="symbol"}:function(e){var t=Bq("Symbol");return Uq(t)&&zq(t.prototype,Hq(e))},Vq=String,au=function(e){try{return Vq(e)}catch{return"Object"}},Wq=rn,Kq=au,Gq=TypeError,qh=function(e){if(Wq(e))return e;throw new Gq(Kq(e)+" is not a function")},Zq=qh,Yq=Dh,Hh=function(e,t){var n=e[t];return Yq(n)?void 0:Zq(n)},Vh=br,Wh=rn,Kh=qr,Jq=TypeError,Xq=function(e,t){var n,r;if(t==="string"&&Wh(n=e.toString)&&!Kh(r=Vh(n,e))||Wh(n=e.valueOf)&&!Kh(r=Vh(n,e))||t!=="string"&&Wh(n=e.toString)&&!Kh(r=Vh(n,e)))return r;throw new Jq("Can't convert object to primitive value")},VE={exports:{}},WE=It,Qq=Object.defineProperty,eH=function(e,t){try{Qq(WE,e,{value:t,configurable:!0,writable:!0})}catch{WE[e]=t}return t},tH=It,nH=eH,KE="__core-js_shared__",GE=VE.exports=tH[KE]||nH(KE,{});(GE.versions||(GE.versions=[])).push({version:"3.38.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Gh=VE.exports,ZE=Gh,Ji=function(e,t){return ZE[e]||(ZE[e]=t||{})},rH=jh,oH=Object,Vr=function(e){return oH(rH(e))},iH=Mt,aH=Vr,sH=iH({}.hasOwnProperty),On=Object.hasOwn||function(t,n){return sH(aH(t),n)},cH=Mt,lH=0,uH=Math.random(),fH=cH(1 .toString),Zh=function(e){return"Symbol("+(e===void 0?"":e)+")_"+fH(++lH+uH,36)},dH=It,pH=Ji,YE=On,hH=Zh,mH=Yi,yH=HE,Xi=dH.Symbol,Yh=pH("wks"),vH=yH?Xi.for||Xi:Xi&&Xi.withoutSetter||hH,zt=function(e){return YE(Yh,e)||(Yh[e]=mH&&YE(Xi,e)?Xi[e]:vH("Symbol."+e)),Yh[e]},gH=br,JE=qr,XE=Es,bH=Hh,wH=Xq,xH=zt,SH=TypeError,EH=xH("toPrimitive"),_H=function(e,t){if(!JE(e)||XE(e))return e;var n=bH(e,EH),r;if(n){if(t===void 0&&(t="default"),r=gH(n,e,t),!JE(r)||XE(r))return r;throw new SH("Can't convert object to primitive value")}return t===void 0&&(t="number"),wH(e,t)},$H=_H,kH=Es,Jh=function(e){var t=$H(e,"string");return kH(t)?t:t+""},CH=It,QE=qr,Xh=CH.document,OH=QE(Xh)&&QE(Xh.createElement),e_=function(e){return OH?Xh.createElement(e):{}},TH=vn,AH=Rt,PH=e_,t_=!TH&&!AH(function(){return Object.defineProperty(PH("div"),"a",{get:function(){return 7}}).a!==7}),IH=vn,RH=br,MH=Mh,NH=Ss,DH=wr,jH=Jh,FH=On,LH=t_,n_=Object.getOwnPropertyDescriptor;xs.f=IH?n_:function(t,n){if(t=DH(t),n=jH(n),LH)try{return n_(t,n)}catch{}if(FH(t,n))return NH(!RH(MH.f,t,n),t[n])};var BH=Rt,UH=rn,zH=/#|\.prototype\./,_s=function(e,t){var n=HH[qH(e)];return n===WH?!0:n===VH?!1:UH(t)?BH(t):!!t},qH=_s.normalize=function(e){return String(e).replace(zH,".").toLowerCase()},HH=_s.data={},VH=_s.NATIVE="N",WH=_s.POLYFILL="P",KH=_s,r_=Ih,GH=qh,ZH=ru,YH=r_(r_.bind),Qh=function(e,t){return GH(e),t===void 0?e:ZH?YH(e,t):function(){return e.apply(t,arguments)}},Yn={},JH=vn,XH=Rt,o_=JH&&XH(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),QH=qr,eV=String,tV=TypeError,_o=function(e){if(QH(e))return e;throw new tV(eV(e)+" is not an object")},nV=vn,rV=t_,oV=o_,su=_o,i_=Jh,iV=TypeError,em=Object.defineProperty,aV=Object.getOwnPropertyDescriptor,tm="enumerable",nm="configurable",rm="writable";Yn.f=nV?oV?function(t,n,r){if(su(t),n=i_(n),su(r),typeof t=="function"&&n==="prototype"&&"value"in r&&rm in r&&!r[rm]){var o=aV(t,n);o&&o[rm]&&(t[n]=r.value,r={configurable:nm in r?r[nm]:o[nm],enumerable:tm in r?r[tm]:o[tm],writable:!1})}return em(t,n,r)}:em:function(t,n,r){if(su(t),n=i_(n),su(r),rV)try{return em(t,n,r)}catch{}if("get"in r||"set"in r)throw new iV("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var sV=vn,cV=Yn,lV=Ss,cu=sV?function(e,t,n){return cV.f(e,t,lV(1,n))}:function(e,t,n){return e[t]=n,e},$s=It,uV=Ah,fV=Ih,dV=rn,pV=xs.f,hV=KH,Qi=Kt,mV=Qh,ea=cu,a_=On,yV=function(e){var t=function(n,r,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,o)}return uV(e,this,arguments)};return t.prototype=e.prototype,t},at=function(e,t){var n=e.target,r=e.global,o=e.stat,i=e.proto,a=r?$s:o?$s[n]:$s[n]&&$s[n].prototype,s=r?Qi:Qi[n]||ea(Qi,n,{})[n],c=s.prototype,l,u,f,p,d,h,m,v,y;for(p in t)l=hV(r?p:n+(o?".":"#")+p,e.forced),u=!l&&a&&a_(a,p),h=s[p],u&&(e.dontCallGetSet?(y=pV(a,p),m=y&&y.value):m=a[p]),d=u&&m?m:t[p],!(!l&&!i&&typeof h==typeof d)&&(e.bind&&u?v=mV(d,$s):e.wrap&&u?v=yV(d):i&&dV(d)?v=fV(d):v=d,(e.sham||d&&d.sham||h&&h.sham)&&ea(v,"sham",!0),ea(s,p,v),i&&(f=n+"Prototype",a_(Qi,f)||ea(Qi,f,{}),ea(Qi[f],p,d),e.real&&c&&(l||!c[p])&&ea(c,p,d)))},vV=Qo,ta=Array.isArray||function(t){return vV(t)==="Array"},gV=at,bV=ta;gV({target:"Array",stat:!0},{isArray:bV});var wV=Kt,xV=wV.Array.isArray,SV=xV,s_=SV,EV=s_,_V=EV,$V=_V,kV=$V,CV=kV;const c_=Ue(CV);function OV(e){if(c_(e))return e}var TV=Math.ceil,AV=Math.floor,PV=Math.trunc||function(t){var n=+t;return(n>0?AV:TV)(n)},IV=PV,lu=function(e){var t=+e;return t!==t||t===0?0:IV(t)},RV=lu,MV=Math.min,NV=function(e){var t=RV(e);return t>0?MV(t,9007199254740991):0},DV=NV,ei=function(e){return DV(e.length)},jV=TypeError,FV=9007199254740991,om=function(e){if(e>FV)throw jV("Maximum allowed index exceeded");return e},LV=vn,BV=Yn,UV=Ss,ks=function(e,t,n){LV?BV.f(e,t,UV(0,n)):e[t]=n},zV=zt,qV=zV("toStringTag"),l_={};l_[qV]="z";var im=String(l_)==="[object z]",HV=im,VV=rn,uu=Qo,WV=zt,KV=WV("toStringTag"),GV=Object,ZV=uu(function(){return arguments}())==="Arguments",YV=function(e,t){try{return e[t]}catch{}},Cs=HV?uu:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=YV(t=GV(e),KV))=="string"?n:ZV?uu(t):(r=uu(t))==="Object"&&VV(t.callee)?"Arguments":r},JV=Mt,XV=rn,am=Gh,QV=JV(Function.toString);XV(am.inspectSource)||(am.inspectSource=function(e){return QV(e)});var eW=am.inspectSource,tW=Mt,nW=Rt,u_=rn,rW=Cs,oW=xr,iW=eW,f_=function(){},d_=oW("Reflect","construct"),sm=/^\s*(?:class|function)\b/,aW=tW(sm.exec),sW=!sm.test(f_),Os=function(t){if(!u_(t))return!1;try{return d_(f_,[],t),!0}catch{return!1}},p_=function(t){if(!u_(t))return!1;switch(rW(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return sW||!!aW(sm,iW(t))}catch{return!0}};p_.sham=!0;var cm=!d_||nW(function(){var e;return Os(Os.call)||!Os(Object)||!Os(function(){e=!0})||e})?p_:Os,h_=ta,cW=cm,lW=qr,uW=zt,fW=uW("species"),m_=Array,dW=function(e){var t;return h_(e)&&(t=e.constructor,cW(t)&&(t===m_||h_(t.prototype))?t=void 0:lW(t)&&(t=t[fW],t===null&&(t=void 0))),t===void 0?m_:t},pW=dW,lm=function(e,t){return new(pW(e))(t===0?0:t)},hW=Rt,mW=zt,yW=zh,vW=mW("species"),fu=function(e){return yW>=51||!hW(function(){var t=[],n=t.constructor={};return n[vW]=function(){return{foo:1}},t[e](Boolean).foo!==1})},gW=at,bW=Rt,wW=ta,xW=qr,SW=Vr,EW=ei,y_=om,v_=ks,_W=lm,$W=fu,kW=zt,CW=zh,g_=kW("isConcatSpreadable"),OW=CW>=51||!bW(function(){var e=[];return e[g_]=!1,e.concat()[0]!==e}),TW=function(e){if(!xW(e))return!1;var t=e[g_];return t!==void 0?!!t:wW(e)},AW=!OW||!$W("concat");gW({target:"Array",proto:!0,arity:1,forced:AW},{concat:function(t){var n=SW(this),r=_W(n,0),o=0,i,a,s,c,l;for(i=-1,s=arguments.length;i<s;i++)if(l=i===-1?n:arguments[i],TW(l))for(c=EW(l),y_(o+c),a=0;a<c;a++,o++)a in l&&v_(r,o,l[a]);else y_(o+1),v_(r,o++,l);return r.length=o,r}});var PW=Cs,IW=String,Ts=function(e){if(PW(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return IW(e)},du={},RW=lu,MW=Math.max,NW=Math.min,um=function(e,t){var n=RW(e);return n<0?MW(n+t,0):NW(n,t)},DW=wr,jW=um,FW=ei,b_=function(e){return function(t,n,r){var o=DW(t),i=FW(o);if(i===0)return!e&&-1;var a=jW(r,i),s;if(e&&n!==n){for(;i>a;)if(s=o[a++],s!==s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===n)return e||a||0;return!e&&-1}},w_={includes:b_(!0),indexOf:b_(!1)},pu={},LW=Mt,fm=On,BW=wr,UW=w_.indexOf,zW=pu,x_=LW([].push),S_=function(e,t){var n=BW(e),r=0,o=[],i;for(i in n)!fm(zW,i)&&fm(n,i)&&x_(o,i);for(;t.length>r;)fm(n,i=t[r++])&&(~UW(o,i)||x_(o,i));return o},dm=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],qW=S_,HW=dm,pm=Object.keys||function(t){return qW(t,HW)},VW=vn,WW=o_,KW=Yn,GW=_o,ZW=wr,YW=pm;du.f=VW&&!WW?Object.defineProperties:function(t,n){GW(t);for(var r=ZW(n),o=YW(n),i=o.length,a=0,s;i>a;)KW.f(t,s=o[a++],r[s]);return t};var JW=xr,XW=JW("document","documentElement"),QW=Ji,eK=Zh,E_=QW("keys"),hu=function(e){return E_[e]||(E_[e]=eK(e))},tK=_o,nK=du,__=dm,rK=pu,oK=XW,iK=e_,aK=hu,$_=">",k_="<",hm="prototype",mm="script",C_=aK("IE_PROTO"),ym=function(){},O_=function(e){return k_+mm+$_+e+k_+"/"+mm+$_},T_=function(e){e.write(O_("")),e.close();var t=e.parentWindow.Object;return e=null,t},sK=function(){var e=iK("iframe"),t="java"+mm+":",n;return e.style.display="none",oK.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(O_("document.F=Object")),n.close(),n.F},mu,yu=function(){try{mu=new ActiveXObject("htmlfile")}catch{}yu=typeof document<"u"?document.domain&&mu?T_(mu):sK():T_(mu);for(var e=__.length;e--;)delete yu[hm][__[e]];return yu()};rK[C_]=!0;var vm=Object.create||function(t,n){var r;return t!==null?(ym[hm]=tK(t),r=new ym,ym[hm]=null,r[C_]=t):r=yu(),n===void 0?r:nK.f(r,n)},vu={},cK=S_,lK=dm,uK=lK.concat("length","prototype");vu.f=Object.getOwnPropertyNames||function(t){return cK(t,uK)};var A_={},fK=Mt,gu=fK([].slice),dK=Qo,pK=wr,P_=vu.f,hK=gu,I_=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],mK=function(e){try{return P_(e)}catch{return hK(I_)}};A_.f=function(t){return I_&&dK(t)==="Window"?mK(t):P_(pK(t))};var bu={};bu.f=Object.getOwnPropertySymbols;var yK=cu,wu=function(e,t,n,r){return r&&r.enumerable?e[t]=n:yK(e,t,n),e},vK=Yn,gK=function(e,t,n){return vK.f(e,t,n)},As={},bK=zt;As.f=bK;var R_=Kt,wK=On,xK=As,SK=Yn.f,gt=function(e){var t=R_.Symbol||(R_.Symbol={});wK(t,e)||SK(t,e,{value:xK.f(e)})},EK=br,_K=xr,$K=zt,kK=wu,M_=function(){var e=_K("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=$K("toPrimitive");t&&!t[r]&&kK(t,r,function(o){return EK(n,this)},{arity:1})},CK=im,OK=Cs,TK=CK?{}.toString:function(){return"[object "+OK(this)+"]"},AK=im,PK=Yn.f,IK=cu,RK=On,MK=TK,NK=zt,N_=NK("toStringTag"),na=function(e,t,n,r){var o=n?e:e&&e.prototype;o&&(RK(o,N_)||PK(o,N_,{configurable:!0,value:t}),r&&!AK&&IK(o,"toString",MK))},DK=It,jK=rn,D_=DK.WeakMap,FK=jK(D_)&&/native code/.test(String(D_)),LK=FK,j_=It,BK=qr,UK=cu,gm=On,bm=Gh,zK=hu,qK=pu,F_="Object already initialized",wm=j_.TypeError,HK=j_.WeakMap,xu,Ps,Su,VK=function(e){return Su(e)?Ps(e):xu(e,{})},WK=function(e){return function(t){var n;if(!BK(t)||(n=Ps(t)).type!==e)throw new wm("Incompatible receiver, "+e+" required");return n}};if(LK||bm.state){var Sr=bm.state||(bm.state=new HK);Sr.get=Sr.get,Sr.has=Sr.has,Sr.set=Sr.set,xu=function(e,t){if(Sr.has(e))throw new wm(F_);return t.facade=e,Sr.set(e,t),t},Ps=function(e){return Sr.get(e)||{}},Su=function(e){return Sr.has(e)}}else{var ra=zK("state");qK[ra]=!0,xu=function(e,t){if(gm(e,ra))throw new wm(F_);return t.facade=e,UK(e,ra,t),t},Ps=function(e){return gm(e,ra)?e[ra]:{}},Su=function(e){return gm(e,ra)}}var xm={set:xu,get:Ps,has:Su,enforce:VK,getterFor:WK},KK=Qh,GK=Mt,ZK=ME,YK=Vr,JK=ei,XK=lm,L_=GK([].push),$o=function(e){var t=e===1,n=e===2,r=e===3,o=e===4,i=e===6,a=e===7,s=e===5||i;return function(c,l,u,f){for(var p=YK(c),d=ZK(p),h=JK(d),m=KK(l,u),v=0,y=f||XK,g=t?y(c,h):n||a?y(c,0):void 0,b,k;h>v;v++)if((s||v in d)&&(b=d[v],k=m(b,v,p),e))if(t)g[v]=k;else if(k)switch(e){case 3:return!0;case 5:return b;case 6:return v;case 2:L_(g,b)}else switch(e){case 4:return!1;case 7:L_(g,b)}return i?-1:r||o?o:g}},Sm={forEach:$o(0),map:$o(1),filter:$o(2),some:$o(3),every:$o(4),find:$o(5),findIndex:$o(6),filterReject:$o(7)},Eu=at,Is=It,Em=br,QK=Mt,oa=vn,ia=Yi,eG=Rt,qt=On,tG=Hr,_m=_o,_u=wr,$m=Jh,nG=Ts,km=Ss,aa=vm,B_=pm,rG=vu,U_=A_,oG=bu,z_=xs,q_=Yn,iG=du,H_=Mh,V_=wu,aG=gK,Cm=Ji,sG=hu,W_=pu,K_=Zh,cG=zt,lG=As,uG=gt,fG=M_,dG=na,G_=xm,$u=Sm.forEach,gn=sG("hidden"),ku="Symbol",Rs="prototype",pG=G_.set,Z_=G_.getterFor(ku),Jn=Object[Rs],ti=Is.Symbol,Ms=ti&&ti[Rs],hG=Is.RangeError,mG=Is.TypeError,Om=Is.QObject,Y_=z_.f,ni=q_.f,J_=U_.f,yG=H_.f,X_=QK([].push),Wr=Cm("symbols"),Ns=Cm("op-symbols"),vG=Cm("wks"),Tm=!Om||!Om[Rs]||!Om[Rs].findChild,Q_=function(e,t,n){var r=Y_(Jn,t);r&&delete Jn[t],ni(e,t,n),r&&e!==Jn&&ni(Jn,t,r)},Am=oa&&eG(function(){return aa(ni({},"a",{get:function(){return ni(this,"a",{value:7}).a}})).a!==7})?Q_:ni,Pm=function(e,t){var n=Wr[e]=aa(Ms);return pG(n,{type:ku,tag:e,description:t}),oa||(n.description=t),n},Cu=function(t,n,r){t===Jn&&Cu(Ns,n,r),_m(t);var o=$m(n);return _m(r),qt(Wr,o)?(r.enumerable?(qt(t,gn)&&t[gn][o]&&(t[gn][o]=!1),r=aa(r,{enumerable:km(0,!1)})):(qt(t,gn)||ni(t,gn,km(1,aa(null))),t[gn][o]=!0),Am(t,o,r)):ni(t,o,r)},Im=function(t,n){_m(t);var r=_u(n),o=B_(r).concat(r$(r));return $u(o,function(i){(!oa||Em(e$,r,i))&&Cu(t,i,r[i])}),t},gG=function(t,n){return n===void 0?aa(t):Im(aa(t),n)},e$=function(t){var n=$m(t),r=Em(yG,this,n);return this===Jn&&qt(Wr,n)&&!qt(Ns,n)?!1:r||!qt(this,n)||!qt(Wr,n)||qt(this,gn)&&this[gn][n]?r:!0},t$=function(t,n){var r=_u(t),o=$m(n);if(!(r===Jn&&qt(Wr,o)&&!qt(Ns,o))){var i=Y_(r,o);return i&&qt(Wr,o)&&!(qt(r,gn)&&r[gn][o])&&(i.enumerable=!0),i}},n$=function(t){var n=J_(_u(t)),r=[];return $u(n,function(o){!qt(Wr,o)&&!qt(W_,o)&&X_(r,o)}),r},r$=function(e){var t=e===Jn,n=J_(t?Ns:_u(e)),r=[];return $u(n,function(o){qt(Wr,o)&&(!t||qt(Jn,o))&&X_(r,Wr[o])}),r};ia||(ti=function(){if(tG(Ms,this))throw new mG("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:nG(arguments[0]),n=K_(t),r=function(o){var i=this===void 0?Is:this;i===Jn&&Em(r,Ns,o),qt(i,gn)&&qt(i[gn],n)&&(i[gn][n]=!1);var a=km(1,o);try{Am(i,n,a)}catch(s){if(!(s instanceof hG))throw s;Q_(i,n,a)}};return oa&&Tm&&Am(Jn,n,{configurable:!0,set:r}),Pm(n,t)},Ms=ti[Rs],V_(Ms,"toString",function(){return Z_(this).tag}),V_(ti,"withoutSetter",function(e){return Pm(K_(e),e)}),H_.f=e$,q_.f=Cu,iG.f=Im,z_.f=t$,rG.f=U_.f=n$,oG.f=r$,lG.f=function(e){return Pm(cG(e),e)},oa&&aG(Ms,"description",{configurable:!0,get:function(){return Z_(this).description}})),Eu({global:!0,constructor:!0,wrap:!0,forced:!ia,sham:!ia},{Symbol:ti}),$u(B_(vG),function(e){uG(e)}),Eu({target:ku,stat:!0,forced:!ia},{useSetter:function(){Tm=!0},useSimple:function(){Tm=!1}}),Eu({target:"Object",stat:!0,forced:!ia,sham:!oa},{create:gG,defineProperty:Cu,defineProperties:Im,getOwnPropertyDescriptor:t$}),Eu({target:"Object",stat:!0,forced:!ia},{getOwnPropertyNames:n$}),fG(),dG(ti,ku),W_[gn]=!0;var bG=Yi,o$=bG&&!!Symbol.for&&!!Symbol.keyFor,wG=at,xG=xr,SG=On,EG=Ts,i$=Ji,_G=o$,Rm=i$("string-to-symbol-registry"),$G=i$("symbol-to-string-registry");wG({target:"Symbol",stat:!0,forced:!_G},{for:function(e){var t=EG(e);if(SG(Rm,t))return Rm[t];var n=xG("Symbol")(t);return Rm[t]=n,$G[n]=t,n}});var kG=at,CG=On,OG=Es,TG=au,AG=Ji,PG=o$,a$=AG("symbol-to-string-registry");kG({target:"Symbol",stat:!0,forced:!PG},{keyFor:function(t){if(!OG(t))throw new TypeError(TG(t)+" is not a symbol");if(CG(a$,t))return a$[t]}});var IG=Mt,s$=ta,RG=rn,c$=Qo,MG=Ts,l$=IG([].push),NG=function(e){if(RG(e))return e;if(s$(e)){for(var t=e.length,n=[],r=0;r<t;r++){var o=e[r];typeof o=="string"?l$(n,o):(typeof o=="number"||c$(o)==="Number"||c$(o)==="String")&&l$(n,MG(o))}var i=n.length,a=!0;return function(s,c){if(a)return a=!1,c;if(s$(this))return c;for(var l=0;l<i;l++)if(n[l]===s)return c}}},DG=at,u$=xr,f$=Ah,jG=br,Ds=Mt,d$=Rt,p$=rn,h$=Es,m$=gu,FG=NG,LG=Yi,BG=String,ko=u$("JSON","stringify"),Ou=Ds(/./.exec),y$=Ds("".charAt),UG=Ds("".charCodeAt),zG=Ds("".replace),qG=Ds(1 .toString),HG=/[\uD800-\uDFFF]/g,v$=/^[\uD800-\uDBFF]$/,g$=/^[\uDC00-\uDFFF]$/,b$=!LG||d$(function(){var e=u$("Symbol")("stringify detection");return ko([e])!=="[null]"||ko({a:e})!=="{}"||ko(Object(e))!=="{}"}),w$=d$(function(){return ko("\uDF06\uD834")!=='"\\udf06\\ud834"'||ko("\uDEAD")!=='"\\udead"'}),VG=function(e,t){var n=m$(arguments),r=FG(t);if(!(!p$(r)&&(e===void 0||h$(e))))return n[1]=function(o,i){if(p$(r)&&(i=jG(r,this,BG(o),i)),!h$(i))return i},f$(ko,null,n)},WG=function(e,t,n){var r=y$(n,t-1),o=y$(n,t+1);return Ou(v$,e)&&!Ou(g$,o)||Ou(g$,e)&&!Ou(v$,r)?"\\u"+qG(UG(e,0),16):e};ko&&DG({target:"JSON",stat:!0,arity:3,forced:b$||w$},{stringify:function(t,n,r){var o=m$(arguments),i=f$(b$?VG:ko,null,o);return w$&&typeof i=="string"?zG(i,HG,WG):i}});var KG=at,GG=Yi,ZG=Rt,x$=bu,YG=Vr,JG=!GG||ZG(function(){x$.f(1)});KG({target:"Object",stat:!0,forced:JG},{getOwnPropertySymbols:function(t){var n=x$.f;return n?n(YG(t)):[]}});var XG=gt;XG("asyncIterator");var QG=gt;QG("hasInstance");var eZ=gt;eZ("isConcatSpreadable");var tZ=gt;tZ("iterator");var nZ=gt;nZ("match");var rZ=gt;rZ("matchAll");var oZ=gt;oZ("replace");var iZ=gt;iZ("search");var aZ=gt;aZ("species");var sZ=gt;sZ("split");var cZ=gt,lZ=M_;cZ("toPrimitive"),lZ();var uZ=xr,fZ=gt,dZ=na;fZ("toStringTag"),dZ(uZ("Symbol"),"Symbol");var pZ=gt;pZ("unscopables");var hZ=It,mZ=na;mZ(hZ.JSON,"JSON",!0);var yZ=Kt,vZ=yZ.Symbol,sa={},Mm=vn,gZ=On,S$=Function.prototype,bZ=Mm&&Object.getOwnPropertyDescriptor,Nm=gZ(S$,"name"),wZ=Nm&&(function(){}).name==="something",xZ=Nm&&(!Mm||Mm&&bZ(S$,"name").configurable),SZ={EXISTS:Nm,PROPER:wZ,CONFIGURABLE:xZ},EZ=Rt,_Z=!EZ(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),$Z=On,kZ=rn,CZ=Vr,OZ=hu,TZ=_Z,E$=OZ("IE_PROTO"),Dm=Object,AZ=Dm.prototype,_$=TZ?Dm.getPrototypeOf:function(e){var t=CZ(e);if($Z(t,E$))return t[E$];var n=t.constructor;return kZ(n)&&t instanceof n?n.prototype:t instanceof Dm?AZ:null},PZ=Rt,IZ=rn,RZ=qr,MZ=vm,$$=_$,NZ=wu,DZ=zt,jm=DZ("iterator"),k$=!1,Kr,Fm,Lm;[].keys&&(Lm=[].keys(),"next"in Lm?(Fm=$$($$(Lm)),Fm!==Object.prototype&&(Kr=Fm)):k$=!0);var jZ=!RZ(Kr)||PZ(function(){var e={};return Kr[jm].call(e)!==e});jZ?Kr={}:Kr=MZ(Kr),IZ(Kr[jm])||NZ(Kr,jm,function(){return this});var C$={IteratorPrototype:Kr,BUGGY_SAFARI_ITERATORS:k$},FZ=C$.IteratorPrototype,LZ=vm,BZ=Ss,UZ=na,zZ=sa,qZ=function(){return this},HZ=function(e,t,n,r){var o=t+" Iterator";return e.prototype=LZ(FZ,{next:BZ(+!r,n)}),UZ(e,o,!1,!0),zZ[o]=qZ,e},VZ=at,WZ=br,O$=SZ,KZ=HZ,GZ=_$,ZZ=na,T$=wu,YZ=zt,A$=sa,P$=C$,JZ=O$.PROPER;O$.CONFIGURABLE,P$.IteratorPrototype;var Tu=P$.BUGGY_SAFARI_ITERATORS,Bm=YZ("iterator"),I$="keys",Au="values",R$="entries",XZ=function(){return this},M$=function(e,t,n,r,o,i,a){KZ(n,t,r);var s=function(y){if(y===o&&p)return p;if(!Tu&&y&&y in u)return u[y];switch(y){case I$:return function(){return new n(this,y)};case Au:return function(){return new n(this,y)};case R$:return function(){return new n(this,y)}}return function(){return new n(this)}},c=t+" Iterator",l=!1,u=e.prototype,f=u[Bm]||u["@@iterator"]||o&&u[o],p=!Tu&&f||s(o),d=t==="Array"&&u.entries||f,h,m,v;if(d&&(h=GZ(d.call(new e)),h!==Object.prototype&&h.next&&(ZZ(h,c,!0,!0),A$[c]=XZ)),JZ&&o===Au&&f&&f.name!==Au&&(l=!0,p=function(){return WZ(f,this)}),o)if(m={values:s(Au),keys:i?p:s(I$),entries:s(R$)},a)for(v in m)(Tu||l||!(v in u))&&T$(u,v,m[v]);else VZ({target:t,proto:!0,forced:Tu||l},m);return a&&u[Bm]!==p&&T$(u,Bm,p,{name:o}),A$[t]=p,m},N$=function(e,t){return{value:e,done:t}},QZ=wr,D$=sa,j$=xm;Yn.f;var eY=M$,Pu=N$,F$="Array Iterator",tY=j$.set,nY=j$.getterFor(F$);eY(Array,"Array",function(e,t){tY(this,{type:F$,target:QZ(e),index:0,kind:t})},function(){var e=nY(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Pu(void 0,!0);switch(e.kind){case"keys":return Pu(n,!1);case"values":return Pu(t[n],!1)}return Pu([n,t[n]],!1)},"values"),D$.Arguments=D$.Array;var rY={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},oY=rY,iY=It,aY=na,L$=sa;for(var Um in oY)aY(iY[Um],Um),L$[Um]=L$.Array;var sY=vZ,cY=sY,lY=zt,uY=Yn.f,B$=lY("metadata"),U$=Function.prototype;U$[B$]===void 0&&uY(U$,B$,{value:null});var fY=gt;fY("asyncDispose");var dY=gt;dY("dispose");var pY=gt;pY("metadata");var hY=cY,mY=hY,yY=xr,vY=Mt,zm=yY("Symbol"),gY=zm.keyFor,bY=vY(zm.prototype.valueOf),z$=zm.isRegisteredSymbol||function(t){try{return gY(bY(t))!==void 0}catch{return!1}},wY=at,xY=z$;wY({target:"Symbol",stat:!0},{isRegisteredSymbol:xY});for(var SY=Ji,q$=xr,EY=Mt,_Y=Es,$Y=zt,Iu=q$("Symbol"),H$=Iu.isWellKnownSymbol,V$=q$("Object","getOwnPropertyNames"),kY=EY(Iu.prototype.valueOf),W$=SY("wks"),qm=0,K$=V$(Iu),CY=K$.length;qm<CY;qm++)try{var G$=K$[qm];_Y(Iu[G$])&&$Y(G$)}catch{}var Z$=function(t){if(H$&&H$(t))return!0;try{for(var n=kY(t),r=0,o=V$(W$),i=o.length;r<i;r++)if(W$[o[r]]==n)return!0}catch{}return!1},OY=at,TY=Z$;OY({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:TY});var AY=gt;AY("customMatcher");var PY=gt;PY("observable");var IY=at,RY=z$;IY({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:RY});var MY=at,NY=Z$;MY({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:NY});var DY=gt;DY("matcher");var jY=gt;jY("metadataKey");var FY=gt;FY("patternMatch");var LY=gt;LY("replaceAll");var BY=mY,UY=BY,zY=UY;const ca=Ue(zY);var Hm=Mt,qY=lu,HY=Ts,VY=jh,WY=Hm("".charAt),Y$=Hm("".charCodeAt),KY=Hm("".slice),J$=function(e){return function(t,n){var r=HY(VY(t)),o=qY(n),i=r.length,a,s;return o<0||o>=i?e?"":void 0:(a=Y$(r,o),a<55296||a>56319||o+1===i||(s=Y$(r,o+1))<56320||s>57343?e?WY(r,o):a:e?KY(r,o,o+2):(a-55296<<10)+(s-56320)+65536)}},GY={codeAt:J$(!1),charAt:J$(!0)},ZY=GY.charAt,YY=Ts,X$=xm,JY=M$,Q$=N$,ek="String Iterator",XY=X$.set,QY=X$.getterFor(ek);JY(String,"String",function(e){XY(this,{type:ek,string:YY(e),index:0})},function(){var t=QY(this),n=t.string,r=t.index,o;return r>=n.length?Q$(void 0,!0):(o=ZY(n,r),t.index+=o.length,Q$(o,!1))});var eJ=Cs,tk=Hh,tJ=Dh,nJ=sa,rJ=zt,oJ=rJ("iterator"),Vm=function(e){if(!tJ(e))return tk(e,oJ)||tk(e,"@@iterator")||nJ[eJ(e)]},iJ=Vm,aJ=iJ,sJ=aJ,cJ=sJ,lJ=cJ,uJ=lJ,fJ=uJ,dJ=fJ,pJ=dJ;const nk=Ue(pJ);var hJ=vn,mJ=ta,yJ=TypeError,vJ=Object.getOwnPropertyDescriptor,gJ=hJ&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),rk=gJ?function(e,t){if(mJ(e)&&!vJ(e,"length").writable)throw new yJ("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},bJ=at,wJ=Vr,xJ=ei,SJ=rk,EJ=om,_J=Rt,$J=_J(function(){return[].push.call({length:4294967296},1)!==4294967297}),kJ=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},CJ=$J||!kJ();bJ({target:"Array",proto:!0,arity:1,forced:CJ},{push:function(t){var n=wJ(this),r=xJ(n),o=arguments.length;EJ(r+o);for(var i=0;i<o;i++)n[r]=arguments[i],r++;return SJ(n,r),r}});var OJ=It,TJ=Kt,ri=function(e,t){var n=TJ[e+"Prototype"],r=n&&n[t];if(r)return r;var o=OJ[e],i=o&&o.prototype;return i&&i[t]},AJ=ri,PJ=AJ("Array","push"),IJ=Hr,RJ=PJ,Wm=Array.prototype,MJ=function(e){var t=e.push;return e===Wm||IJ(Wm,e)&&t===Wm.push?RJ:t},NJ=MJ,DJ=NJ,jJ=DJ,FJ=jJ,LJ=FJ,BJ=LJ,UJ=BJ;const zJ=Ue(UJ);function qJ(e,t){var n=e==null?null:typeof ca<"u"&&nk(e)||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(zJ(s).call(s,r.value),s.length!==t);c=!0);}catch(u){l=!0,o=u}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}var HJ=at,ok=ta,VJ=cm,WJ=qr,ik=um,KJ=ei,GJ=wr,ZJ=ks,YJ=zt,JJ=fu,XJ=gu,QJ=JJ("slice"),eX=YJ("species"),Km=Array,tX=Math.max;HJ({target:"Array",proto:!0,forced:!QJ},{slice:function(t,n){var r=GJ(this),o=KJ(r),i=ik(t,o),a=ik(n===void 0?o:n,o),s,c,l;if(ok(r)&&(s=r.constructor,VJ(s)&&(s===Km||ok(s.prototype))?s=void 0:WJ(s)&&(s=s[eX],s===null&&(s=void 0)),s===Km||s===void 0))return XJ(r,i,a);for(c=new(s===void 0?Km:s)(tX(a-i,0)),l=0;i<a;i++,l++)i in r&&ZJ(c,l,r[i]);return c.length=l,c}});var nX=ri,rX=nX("Array","slice"),oX=Hr,iX=rX,Gm=Array.prototype,aX=function(e){var t=e.slice;return e===Gm||oX(Gm,e)&&t===Gm.slice?iX:t},sX=aX,cX=sX,lX=cX,uX=lX,fX=uX,dX=fX,pX=dX;const hX=Ue(pX);var mX=br,ak=_o,yX=Hh,vX=function(e,t,n){var r,o;ak(e);try{if(r=yX(e,"return"),!r){if(t==="throw")throw n;return n}r=mX(r,e)}catch(i){o=!0,r=i}if(t==="throw")throw n;if(o)throw r;return ak(r),n},gX=_o,bX=vX,wX=function(e,t,n,r){try{return r?t(gX(n)[0],n[1]):t(n)}catch(o){bX(e,"throw",o)}},xX=zt,SX=sa,EX=xX("iterator"),_X=Array.prototype,$X=function(e){return e!==void 0&&(SX.Array===e||_X[EX]===e)},kX=br,CX=qh,OX=_o,TX=au,AX=Vm,PX=TypeError,IX=function(e,t){var n=arguments.length<2?AX(e):t;if(CX(n))return OX(kX(n,e));throw new PX(TX(e)+" is not iterable")},RX=Qh,MX=br,NX=Vr,DX=wX,jX=$X,FX=cm,LX=ei,sk=ks,BX=IX,UX=Vm,ck=Array,zX=function(t){var n=NX(t),r=FX(this),o=arguments.length,i=o>1?arguments[1]:void 0,a=i!==void 0;a&&(i=RX(i,o>2?arguments[2]:void 0));var s=UX(n),c=0,l,u,f,p,d,h;if(s&&!(this===ck&&jX(s)))for(u=r?new this:[],p=BX(n,s),d=p.next;!(f=MX(d,p)).done;c++)h=a?DX(p,i,[f.value,c],!0):f.value,sk(u,c,h);else for(l=LX(n),u=r?new this(l):ck(l);l>c;c++)h=a?i(n[c],c):n[c],sk(u,c,h);return u.length=c,u},qX=zt,lk=qX("iterator"),uk=!1;try{var HX=0,fk={next:function(){return{done:!!HX++}},return:function(){uk=!0}};fk[lk]=function(){return this},Array.from(fk,function(){throw 2})}catch{}var VX=function(e,t){try{if(!t&&!uk)return!1}catch{return!1}var n=!1;try{var r={};r[lk]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},WX=at,KX=zX,GX=VX,ZX=!GX(function(e){Array.from(e)});WX({target:"Array",stat:!0,forced:ZX},{from:KX});var YX=Kt,JX=YX.Array.from,XX=JX,QX=XX,eQ=QX,tQ=eQ,nQ=tQ,rQ=nQ,oQ=rQ;const dk=Ue(oQ);function Zm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pk(e,t){if(e){var n;if(typeof e=="string")return Zm(e,t);var r=hX(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?dk(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Zm(e,t):void 0}}function iQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
325
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Er(e,t){return OV(e)||qJ(e,t)||pk(e,t)||iQ()}var hk={exports:{}};/*!
324
+ `)},kq=0,Si=[];function _q(e){var t=_.useRef([]),n=_.useRef([0,0]),r=_.useRef(),o=_.useState(kq++)[0],i=_.useState(function(){return i$()})[0],a=_.useRef(e);_.useEffect(function(){a.current=e},[e]),_.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=ZH([e.lockRef.current],(e.shards||[]).map(f$),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=_.useCallback(function(m,y){if("touches"in m&&m.touches.length===2)return!a.current.allowPinchZoom;var v=kc(m),g=n.current,b="deltaX"in m?m.deltaX:g[0]-v[0],k="deltaY"in m?m.deltaY:g[1]-v[1],S,$=m.target,C=Math.abs(b)>Math.abs(k)?"h":"v";if("touches"in m&&C==="h"&&$.type==="range")return!1;var P=s$(C,$);if(!P)return!0;if(P?S=C:(S=C==="v"?"h":"v",P=s$(C,$)),!P)return!1;if(!r.current&&"changedTouches"in m&&(b||k)&&(r.current=S),!S)return!0;var F=r.current||S;return Eq(F,y,m,F==="h"?b:k,!0)},[]),l=_.useCallback(function(m){var y=m;if(!(!Si.length||Si[Si.length-1]!==i)){var v="deltaY"in y?u$(y):kc(y),g=t.current.filter(function(S){return S.name===y.type&&S.target===y.target&&$q(S.delta,v)})[0];if(g&&g.should){y.cancelable&&y.preventDefault();return}if(!g){var b=(a.current.shards||[]).map(f$).filter(Boolean).filter(function(S){return S.contains(y.target)}),k=b.length>0?s(y,b[0]):!a.current.noIsolation;k&&y.cancelable&&y.preventDefault()}}},[]),c=_.useCallback(function(m,y,v,g){var b={name:m,delta:y,target:v,should:g};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(k){return k!==b})},1)},[]),u=_.useCallback(function(m){n.current=kc(m),r.current=void 0},[]),f=_.useCallback(function(m){c(m.type,u$(m),m.target,s(m,e.lockRef.current))},[]),p=_.useCallback(function(m){c(m.type,kc(m),m.target,s(m,e.lockRef.current))},[]);_.useEffect(function(){return Si.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,xi),document.addEventListener("touchmove",l,xi),document.addEventListener("touchstart",u,xi),function(){Si=Si.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,xi),document.removeEventListener("touchmove",l,xi),document.removeEventListener("touchstart",u,xi)}},[]);var d=e.removeScrollBar,h=e.inert;return _.createElement(_.Fragment,null,h?_.createElement(i,{styles:Oq(o)}):null,d?_.createElement(vq,{gapMode:"margin"}):null)}const Tq=oq(r$,_q);var d$=_.forwardRef(function(e,t){return _.createElement($c,lr({},e,{ref:t,sideCar:Tq}))});d$.classNames=$c.classNames;const Cq=d$;var Iq=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ei=new WeakMap,_c=new WeakMap,Tc={},Th=0,p$=function(e){return e&&(e.host||p$(e.parentNode))},Aq=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=p$(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Pq=function(e,t,n,r){var o=Aq(t,Array.isArray(e)?e:[e]);Tc[n]||(Tc[n]=new WeakMap);var i=Tc[n],a=[],s=new Set,l=new Set(o),c=function(f){!f||s.has(f)||(s.add(f),c(f.parentNode))};o.forEach(c);var u=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))u(p);else{var d=p.getAttribute(r),h=d!==null&&d!=="false",m=(Ei.get(p)||0)+1,y=(i.get(p)||0)+1;Ei.set(p,m),i.set(p,y),a.push(p),m===1&&h&&_c.set(p,!0),y===1&&p.setAttribute(n,"true"),h||p.setAttribute(r,"true")}})};return u(t),s.clear(),Th++,function(){a.forEach(function(f){var p=Ei.get(f)-1,d=i.get(f)-1;Ei.set(f,p),i.set(f,d),p||(_c.has(f)||f.removeAttribute(r),_c.delete(f)),d||f.removeAttribute(n)}),Th--,Th||(Ei=new WeakMap,Ei=new WeakMap,_c=new WeakMap,Tc={})}},Rq=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||Iq(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Pq(r,o,n,"aria-hidden")):function(){return null}};const h$="Dialog",[m$,ide]=pf(h$),[Mq,Pr]=m$(h$),Dq=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=E.useRef(null),l=E.useRef(null),[c=!1,u]=WE({prop:r,defaultProp:o,onChange:i});return E.createElement(Mq,{scope:t,triggerRef:s,contentRef:l,contentId:bc(),titleId:bc(),descriptionId:bc(),open:c,onOpenChange:u,onOpenToggle:E.useCallback(()=>u(f=>!f),[u]),modal:a},n)},jq="DialogTrigger",Nq=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Pr(jq,n),i=xo(t,o.triggerRef);return E.createElement($n.button,kt({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ih(o.open)},r,{ref:i,onClick:Ar(e.onClick,o.onOpenToggle)}))}),Lq="DialogPortal",[ade,v$]=m$(Lq,{forceMount:void 0}),Ch="DialogOverlay",Fq=E.forwardRef((e,t)=>{const n=v$(Ch,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Pr(Ch,e.__scopeDialog);return i.modal?E.createElement(wc,{present:r||i.open},E.createElement(Bq,kt({},o,{ref:t}))):null}),Bq=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Pr(Ch,n);return E.createElement(Cq,{as:hf,allowPinchZoom:!0,shards:[o.contentRef]},E.createElement($n.div,kt({"data-state":Ih(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Ha="DialogContent",Uq=E.forwardRef((e,t)=>{const n=v$(Ha,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Pr(Ha,e.__scopeDialog);return E.createElement(wc,{present:r||i.open},i.modal?E.createElement(zq,kt({},o,{ref:t})):E.createElement(Hq,kt({},o,{ref:t})))}),zq=E.forwardRef((e,t)=>{const n=Pr(Ha,e.__scopeDialog),r=E.useRef(null),o=xo(t,n.contentRef,r);return E.useEffect(()=>{const i=r.current;if(i)return Rq(i)},[]),E.createElement(y$,kt({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ar(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ar(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ar(e.onFocusOutside,i=>i.preventDefault())}))}),Hq=E.forwardRef((e,t)=>{const n=Pr(Ha,e.__scopeDialog),r=E.useRef(!1),o=E.useRef(!1);return E.createElement(y$,kt({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=i.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),y$=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=Pr(Ha,n),l=E.useRef(null),c=xo(t,l);return GH(),E.createElement(E.Fragment,null,E.createElement(FH,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},E.createElement(jH,kt({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Ih(s.open)},a,{ref:c,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),qq="DialogTitle",Wq=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Pr(qq,n);return E.createElement($n.h2,kt({id:o.titleId},r,{ref:t}))}),Vq="DialogClose",Kq=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Pr(Vq,n);return E.createElement($n.button,kt({type:"button"},r,{ref:t,onClick:Ar(e.onClick,()=>o.onOpenChange(!1))}))});function Ih(e){return e?"open":"closed"}const Gq=Dq,Zq=Nq,Yq=Fq,Jq=Uq,Xq=Wq,g$=Kq;function Qq({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const b$=_.forwardRef(Qq);function co({open:e,onOpenChange:t,children:n}){return L.jsx(Gq,{open:e,onOpenChange:t,children:n})}function eW({title:e,children:t}){var r,o,i,a,s,l,c,u;const{modal:n}=st;return L.jsxs(L.Fragment,{children:[L.jsx(Yq,{...n==null?void 0:n.overlay}),L.jsx("div",{...n==null?void 0:n.container,children:L.jsxs(Jq,{...(r=n==null?void 0:n.dialog)==null?void 0:r.container,children:[L.jsxs("div",{...(i=(o=n==null?void 0:n.dialog)==null?void 0:o.title)==null?void 0:i.container,children:[L.jsx(Xq,{...(s=(a=n==null?void 0:n.dialog)==null?void 0:a.title)==null?void 0:s.text,children:e}),L.jsx(g$,{children:L.jsx(b$,{role:"button",tabIndex:0,...(c=(l=n==null?void 0:n.dialog)==null?void 0:l.title)==null?void 0:c.closeIcon})})]}),L.jsx("div",{...(u=n==null?void 0:n.dialog)==null?void 0:u.content,children:t})]})})]})}co.Button=Zq,co.Close=g$,co.Content=eW;const w$=E.forwardRef(({children:e,...t},n)=>{const{container:r}=st;return L.jsxs("div",{...t,...r,ref:n,children:[L.jsx(iB,{}),L.jsxs(aS,{children:[L.jsx(tW,{}),e]})]})}),tW=()=>{const{modal:e}=st,t=Ie(r=>r.connected),{showModal:n}=Zx();return E.useEffect(()=>{var r,o,i,a;t||n({title:"Connection Error",content:L.jsxs(L.Fragment,{children:[L.jsx("p",{...(o=(r=e==null?void 0:e.dialog)==null?void 0:r.newConversation)==null?void 0:o.text,children:"There was an error connecting to the server. Please check your internet connection and try again."}),L.jsx(co.Close,{asChild:!0,children:L.jsx("button",{type:"button",...(a=(i=e==null?void 0:e.dialog)==null?void 0:i.newConversation)==null?void 0:a.button,onClick:()=>window.location.reload(),children:"Restart"})})]})})},[t]),L.jsx(L.Fragment,{})},nW=E.forwardRef(({children:e,onClick:t,...n},r)=>{const{fab:o}=st,{container:i,icon:a}=o??{};return L.jsx("div",{...n,...i,ref:r,onClick:t,children:L.jsx("div",{...a})})}),x$="Collapsible",[rW,lde]=pf(x$),[oW,Ah]=rW(x$),iW=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[l=!1,c]=WE({prop:r,defaultProp:o,onChange:a});return E.createElement(oW,{scope:n,disabled:i,contentId:bc(),open:l,onOpenToggle:E.useCallback(()=>c(u=>!u),[c])},E.createElement($n.div,kt({"data-state":Ph(l),"data-disabled":i?"":void 0},s,{ref:t})))}),aW="CollapsibleTrigger",sW=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Ah(aW,n);return E.createElement($n.button,kt({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Ph(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:Ar(e.onClick,o.onOpenToggle)}))}),S$="CollapsibleContent",lW=E.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Ah(S$,e.__scopeCollapsible);return E.createElement(wc,{present:n||o.open},({present:i})=>E.createElement(cW,kt({},r,{ref:t,present:i})))}),cW=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=Ah(S$,n),[s,l]=E.useState(r),c=E.useRef(null),u=xo(t,c),f=E.useRef(0),p=f.current,d=E.useRef(0),h=d.current,m=a.open||s,y=E.useRef(m),v=E.useRef();return E.useEffect(()=>{const g=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(g)},[]),aa(()=>{const g=c.current;if(g){v.current=v.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";const b=g.getBoundingClientRect();f.current=b.height,d.current=b.width,y.current||(g.style.transitionDuration=v.current.transitionDuration,g.style.animationName=v.current.animationName),l(r)}},[a.open,r]),E.createElement($n.div,kt({"data-state":Ph(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m},i,{ref:u,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style}}),m&&o)});function Ph(e){return e?"open":"closed"}const uW=iW,fW=lW,dW=e=>_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e},_.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M15.5 5.5v-5m0 0h-5m5 0L8.833 7.167m-2.5-5H4.5c-1.4 0-2.1 0-2.635.272A2.5 2.5 0 0 0 .772 3.532C.5 4.066.5 4.767.5 6.167V11.5c0 1.4 0 2.1.272 2.635a2.5 2.5 0 0 0 1.093 1.092C2.4 15.5 3.1 15.5 4.5 15.5h5.333c1.4 0 2.1 0 2.635-.273a2.5 2.5 0 0 0 1.093-1.092c.272-.535.272-1.235.272-2.635V9.667"})),E$=({...e})=>{var a,s;const{header:t,modal:n}=st,r=Ie(l=>l.restartConversation),{showModal:o}=Zx(),i=l=>{var c,u,f,p;l.stopPropagation(),o({title:"Restart Conversation",content:L.jsxs(L.Fragment,{children:[L.jsx("p",{...(u=(c=n==null?void 0:n.dialog)==null?void 0:c.newConversation)==null?void 0:u.text,children:"Are you sure you want to restart a new conversation?"}),L.jsx(co.Close,{asChild:!0,children:L.jsx("button",{type:"button",...(p=(f=n==null?void 0:n.dialog)==null?void 0:f.newConversation)==null?void 0:p.button,onClick:r,children:"Restart"})})]})})};return L.jsx(HB,{...e,...(s=(a=t==null?void 0:t.content)==null?void 0:a.actions)==null?void 0:s.icons,role:"button",tabIndex:0,onClick:i,onKeyDown:l=>{l.key==="Enter"&&i(l)}})},pW=({...e})=>{const{header:t}=st,n=Ie(o=>o.closeWindow),r=o=>{o.stopPropagation(),n==null||n()};return L.jsx(b$,{...e,...t.content.actions.icons,role:"button",tabIndex:0,onClick:r,onKeyDown:o=>{o.key==="Enter"&&r(o)}})},qa=({icon:e,title:t,link:n,...r})=>{var a,s,l,c,u,f,p,d,h,m,y,v;const{header:o}=st,i=e??dW;return t?n?L.jsxs("a",{...r,...(s=(a=o.expandedContent)==null?void 0:a.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[L.jsx(i,{...(c=(l=o.expandedContent)==null?void 0:l.descriptionItems)==null?void 0:c.icon}),L.jsx("p",{...(f=(u=o.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:f.link,children:t})]}):L.jsxs("div",{...r,...(d=(p=o.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:d.container,children:[L.jsx(i,{...(m=(h=o.expandedContent)==null?void 0:h.descriptionItems)==null?void 0:m.icon}),L.jsx("p",{...(v=(y=o.expandedContent)==null?void 0:y.descriptionItems)==null?void 0:v.text,children:t})]}):null},$$=({defaultOpen:e,disabled:t,onOpenChange:n,...r})=>{var p,d,h,m,y,v,g,b,k,S,$,C,P,F,T,M,q,B,A,D,N,V;const{header:o}=st,i=Ie(W=>W.configuration),a=Ie(W=>W.closeWindow),s=Ie(W=>W.getClientId)(),l=Ie(W=>!W.disableRestartConversation),[c,u]=E.useState(!!e),f=!!((p=i.email)!=null&&p.title)||!!((d=i.phone)!=null&&d.title)||!!((h=i.website)!=null&&h.title)||!!((m=i.termsOfService)!=null&&m.link)||!!((y=i.privacyPolicy)!=null&&y.link);return L.jsxs(uW,{open:f?c:!1,onOpenChange:u,"data-disabled":f?void 0:"",...o.container,...r,children:[L.jsxs(sW,{...o.content.container,children:[L.jsx(gf,{...r,userId:s,src:i.botAvatar,...o.content.avatar,children:i.botName||"Bot"}),L.jsx("h2",{...o.content.title,children:i.botName||"Bot"}),i.botDescription&&L.jsx("p",{...o.content.description,children:i.botDescription}),L.jsxs("div",{...o.content.actions.container,children:[l&&L.jsx(E$,{}),a&&L.jsx(pW,{})]})]}),L.jsxs(fW,{...o.expandedContent.container,children:[L.jsxs("div",{"data-links":"",...o.expandedContent.group,children:[L.jsx(qa,{"data-email":"",icon:N6,title:(v=i.email)==null?void 0:v.title,link:(b=(g=i.email)==null?void 0:g.link)!=null&&b.startsWith("mailto:")?(k=i.email)==null?void 0:k.link:`mailto:${(S=i.email)==null?void 0:S.link}`}),L.jsx(qa,{"data-phone":"",icon:H6,title:($=i.phone)==null?void 0:$.title,link:(P=(C=i.phone)==null?void 0:C.link)!=null&&P.startsWith("tel:")?(F=i.phone)==null?void 0:F.link:`tel:${(T=i.phone)==null?void 0:T.link}`}),L.jsx(qa,{"data-website":"",link:(M=i.website)==null?void 0:M.link,icon:F6,title:(q=i.website)==null?void 0:q.title})]}),L.jsxs("div",{"data-legal":"",...(B=o.expandedContent)==null?void 0:B.group,children:[L.jsx(qa,{"data-terms":"",link:(A=i.termsOfService)==null?void 0:A.link,icon:D6,title:(D=i.termsOfService)==null?void 0:D.title}),L.jsx(qa,{"data-privacy":"",link:(N=i.privacyPolicy)==null?void 0:N.link,icon:U6,title:(V=i.privacyPolicy)==null?void 0:V.title})]})]})]})},O$=E.memo(({...e})=>{const{typingIndicator:t}=st;return L.jsx("div",{...e,...t==null?void 0:t.container,children:L.jsx("div",{...t==null?void 0:t.loader})})}),Rh=E.memo(E.forwardRef(({direction:e,block:t,scroll:n,disableInput:r,children:o,sender:i,id:a,...s},l)=>{var y,v,g,b;const[c,u]=E.useState([]),{message:f}=st,{botAvatar:p,botName:d}=Ie(k=>k.configuration),h=Ie(k=>k.getClientId)(),m=Bg(h??"",15);return L.jsx(Kx.Provider,{value:{isLoading:c,setIsLoading:u},children:L.jsxs("div",{...s,...f==null?void 0:f.container,"data-loaded":c.length===0,"data-disable-input":!!r,"data-direction":e,ref:l,children:[L.jsxs(Tg,{"data-color":m,...(y=f==null?void 0:f.avatar)==null?void 0:y.container,children:[L.jsx(Cg,{...(v=f==null?void 0:f.avatar)==null?void 0:v.image,src:(i==null?void 0:i.avatar)??p}),L.jsx(Ig,{...(g=f==null?void 0:f.avatar)==null?void 0:g.fallback,children:(i==null?void 0:i.name[0])??((b=d??"Bot")==null?void 0:b[0])})]}),t&&L.jsx(gi,{block:t,direction:e,sender:i,timestamp:s.timestamp,messageId:a}),o]})})}));function hW(){const e=Ie(r=>r.getClientId)(),t=Ie(r=>r.configuration),{messageList:{marquee:n}}=st;return L.jsxs("li",{...n.container,children:[L.jsx(gf,{userId:e,src:t.botAvatar,...n.avatar,children:(t.botName||"Bot").slice(0,1)}),L.jsxs("div",{...n.content,children:[L.jsx("h1",{...n.title,children:t.botName||"Bot"}),L.jsx("p",{...n.description,children:t.botDescription})]})]})}function mW(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var o=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");o.setAttribute("name",e),o.setAttribute("content",t),r.head.appendChild(o)}}catch{}}function vW(){mW("react-scroll-to-bottom:version","4.2.0")}var Wa=function(e){return e&&e.Math===Math&&e},Ct=Wa(typeof globalThis=="object"&&globalThis)||Wa(typeof window=="object"&&window)||Wa(typeof self=="object"&&self)||Wa(typeof Xe=="object"&&Xe)||Wa(typeof Xe=="object"&&Xe)||function(){return this}()||Function("return this")(),It=function(e){try{return!!e()}catch{return!0}},yW=It,Cc=!yW(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),gW=Cc,k$=Function.prototype,_$=k$.apply,T$=k$.call,Mh=typeof Reflect=="object"&&Reflect.apply||(gW?T$.bind(_$):function(){return T$.apply(_$,arguments)}),C$=Cc,I$=Function.prototype,Dh=I$.call,bW=C$&&I$.bind.bind(Dh,Dh),At=C$?bW:function(e){return function(){return Dh.apply(e,arguments)}},A$=At,wW=A$({}.toString),xW=A$("".slice),jo=function(e){return xW(wW(e),8,-1)},SW=jo,EW=At,jh=function(e){if(SW(e)==="Function")return EW(e)},Nh=typeof document=="object"&&document.all,Xt=typeof Nh>"u"&&Nh!==void 0?function(e){return typeof e=="function"||e===Nh}:function(e){return typeof e=="function"},Va={},$W=It,cn=!$W(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),OW=Cc,Ic=Function.prototype.call,cr=OW?Ic.bind(Ic):function(){return Ic.apply(Ic,arguments)},Lh={},P$={}.propertyIsEnumerable,R$=Object.getOwnPropertyDescriptor,kW=R$&&!P$.call({1:2},1);Lh.f=kW?function(t){var n=R$(this,t);return!!n&&n.enumerable}:P$;var Ka=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},_W=At,TW=It,CW=jo,Fh=Object,IW=_W("".split),M$=TW(function(){return!Fh("z").propertyIsEnumerable(0)})?function(e){return CW(e)==="String"?IW(e,""):Fh(e)}:Fh,Bh=function(e){return e==null},AW=Bh,PW=TypeError,Uh=function(e){if(AW(e))throw new PW("Can't call method on "+e);return e},RW=M$,MW=Uh,ur=function(e){return RW(MW(e))},DW=Xt,Rr=function(e){return typeof e=="object"?e!==null:DW(e)},zt={},zh=zt,Hh=Ct,jW=Xt,D$=function(e){return jW(e)?e:void 0},fr=function(e,t){return arguments.length<2?D$(zh[e])||D$(Hh[e]):zh[e]&&zh[e][t]||Hh[e]&&Hh[e][t]},NW=At,Mr=NW({}.isPrototypeOf),LW=Ct,j$=LW.navigator,N$=j$&&j$.userAgent,qh=N$?String(N$):"",L$=Ct,Wh=qh,F$=L$.process,B$=L$.Deno,U$=F$&&F$.versions||B$&&B$.version,z$=U$&&U$.v8,Un,Ac;z$&&(Un=z$.split("."),Ac=Un[0]>0&&Un[0]<4?1:+(Un[0]+Un[1])),!Ac&&Wh&&(Un=Wh.match(/Edge\/(\d+)/),(!Un||Un[1]>=74)&&(Un=Wh.match(/Chrome\/(\d+)/),Un&&(Ac=+Un[1])));var Vh=Ac,H$=Vh,FW=It,BW=Ct,UW=BW.String,$i=!!Object.getOwnPropertySymbols&&!FW(function(){var e=Symbol("symbol detection");return!UW(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&H$&&H$<41}),zW=$i,q$=zW&&!Symbol.sham&&typeof Symbol.iterator=="symbol",HW=fr,qW=Xt,WW=Mr,VW=q$,KW=Object,Ga=VW?function(e){return typeof e=="symbol"}:function(e){var t=HW("Symbol");return qW(t)&&WW(t.prototype,KW(e))},GW=String,Pc=function(e){try{return GW(e)}catch{return"Object"}},ZW=Xt,YW=Pc,JW=TypeError,Kh=function(e){if(ZW(e))return e;throw new JW(YW(e)+" is not a function")},XW=Kh,QW=Bh,Gh=function(e,t){var n=e[t];return QW(n)?void 0:XW(n)},Zh=cr,Yh=Xt,Jh=Rr,eV=TypeError,tV=function(e,t){var n,r;if(t==="string"&&Yh(n=e.toString)&&!Jh(r=Zh(n,e))||Yh(n=e.valueOf)&&!Jh(r=Zh(n,e))||t!=="string"&&Yh(n=e.toString)&&!Jh(r=Zh(n,e)))return r;throw new eV("Can't convert object to primitive value")},W$={exports:{}},V$=Ct,nV=Object.defineProperty,rV=function(e,t){try{nV(V$,e,{value:t,configurable:!0,writable:!0})}catch{V$[e]=t}return t},oV=Ct,iV=rV,K$="__core-js_shared__",G$=W$.exports=oV[K$]||iV(K$,{});(G$.versions||(G$.versions=[])).push({version:"3.38.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Xh=W$.exports,Z$=Xh,Oi=function(e,t){return Z$[e]||(Z$[e]=t||{})},aV=Uh,sV=Object,Dr=function(e){return sV(aV(e))},lV=At,cV=Dr,uV=lV({}.hasOwnProperty),bn=Object.hasOwn||function(t,n){return uV(cV(t),n)},fV=At,dV=0,pV=Math.random(),hV=fV(1 .toString),Qh=function(e){return"Symbol("+(e===void 0?"":e)+")_"+hV(++dV+pV,36)},mV=Ct,vV=Oi,Y$=bn,yV=Qh,gV=$i,bV=q$,ki=mV.Symbol,em=vV("wks"),wV=bV?ki.for||ki:ki&&ki.withoutSetter||yV,Lt=function(e){return Y$(em,e)||(em[e]=gV&&Y$(ki,e)?ki[e]:wV("Symbol."+e)),em[e]},xV=cr,J$=Rr,X$=Ga,SV=Gh,EV=tV,$V=Lt,OV=TypeError,kV=$V("toPrimitive"),_V=function(e,t){if(!J$(e)||X$(e))return e;var n=SV(e,kV),r;if(n){if(t===void 0&&(t="default"),r=xV(n,e,t),!J$(r)||X$(r))return r;throw new OV("Can't convert object to primitive value")}return t===void 0&&(t="number"),EV(e,t)},TV=_V,CV=Ga,tm=function(e){var t=TV(e,"string");return CV(t)?t:t+""},IV=Ct,Q$=Rr,nm=IV.document,AV=Q$(nm)&&Q$(nm.createElement),eO=function(e){return AV?nm.createElement(e):{}},PV=cn,RV=It,MV=eO,tO=!PV&&!RV(function(){return Object.defineProperty(MV("div"),"a",{get:function(){return 7}}).a!==7}),DV=cn,jV=cr,NV=Lh,LV=Ka,FV=ur,BV=tm,UV=bn,zV=tO,nO=Object.getOwnPropertyDescriptor;Va.f=DV?nO:function(t,n){if(t=FV(t),n=BV(n),zV)try{return nO(t,n)}catch{}if(UV(t,n))return LV(!jV(NV.f,t,n),t[n])};var HV=It,qV=Xt,WV=/#|\.prototype\./,Za=function(e,t){var n=KV[VV(e)];return n===ZV?!0:n===GV?!1:qV(t)?HV(t):!!t},VV=Za.normalize=function(e){return String(e).replace(WV,".").toLowerCase()},KV=Za.data={},GV=Za.NATIVE="N",ZV=Za.POLYFILL="P",YV=Za,rO=jh,JV=Kh,XV=Cc,QV=rO(rO.bind),rm=function(e,t){return JV(e),t===void 0?e:XV?QV(e,t):function(){return e.apply(t,arguments)}},zn={},eK=cn,tK=It,oO=eK&&tK(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),nK=Rr,rK=String,oK=TypeError,uo=function(e){if(nK(e))return e;throw new oK(rK(e)+" is not an object")},iK=cn,aK=tO,sK=oO,Rc=uo,iO=tm,lK=TypeError,om=Object.defineProperty,cK=Object.getOwnPropertyDescriptor,im="enumerable",am="configurable",sm="writable";zn.f=iK?sK?function(t,n,r){if(Rc(t),n=iO(n),Rc(r),typeof t=="function"&&n==="prototype"&&"value"in r&&sm in r&&!r[sm]){var o=cK(t,n);o&&o[sm]&&(t[n]=r.value,r={configurable:am in r?r[am]:o[am],enumerable:im in r?r[im]:o[im],writable:!1})}return om(t,n,r)}:om:function(t,n,r){if(Rc(t),n=iO(n),Rc(r),aK)try{return om(t,n,r)}catch{}if("get"in r||"set"in r)throw new lK("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var uK=cn,fK=zn,dK=Ka,Mc=uK?function(e,t,n){return fK.f(e,t,dK(1,n))}:function(e,t,n){return e[t]=n,e},Ya=Ct,pK=Mh,hK=jh,mK=Xt,vK=Va.f,yK=YV,_i=zt,gK=rm,Ti=Mc,aO=bn,bK=function(e){var t=function(n,r,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,o)}return pK(e,this,arguments)};return t.prototype=e.prototype,t},it=function(e,t){var n=e.target,r=e.global,o=e.stat,i=e.proto,a=r?Ya:o?Ya[n]:Ya[n]&&Ya[n].prototype,s=r?_i:_i[n]||Ti(_i,n,{})[n],l=s.prototype,c,u,f,p,d,h,m,y,v;for(p in t)c=yK(r?p:n+(o?".":"#")+p,e.forced),u=!c&&a&&aO(a,p),h=s[p],u&&(e.dontCallGetSet?(v=vK(a,p),m=v&&v.value):m=a[p]),d=u&&m?m:t[p],!(!c&&!i&&typeof h==typeof d)&&(e.bind&&u?y=gK(d,Ya):e.wrap&&u?y=bK(d):i&&mK(d)?y=hK(d):y=d,(e.sham||d&&d.sham||h&&h.sham)&&Ti(y,"sham",!0),Ti(s,p,y),i&&(f=n+"Prototype",aO(_i,f)||Ti(_i,f,{}),Ti(_i[f],p,d),e.real&&l&&(c||!l[p])&&Ti(l,p,d)))},wK=jo,Ci=Array.isArray||function(t){return wK(t)==="Array"},xK=it,SK=Ci;xK({target:"Array",stat:!0},{isArray:SK});var EK=zt,$K=EK.Array.isArray,OK=$K,sO=OK,kK=sO,_K=kK,TK=_K,CK=TK,IK=CK;const lO=Le(IK);function AK(e){if(lO(e))return e}var PK=Math.ceil,RK=Math.floor,MK=Math.trunc||function(t){var n=+t;return(n>0?RK:PK)(n)},DK=MK,Dc=function(e){var t=+e;return t!==t||t===0?0:DK(t)},jK=Dc,NK=Math.min,LK=function(e){var t=jK(e);return t>0?NK(t,9007199254740991):0},FK=LK,No=function(e){return FK(e.length)},BK=TypeError,UK=9007199254740991,lm=function(e){if(e>UK)throw BK("Maximum allowed index exceeded");return e},zK=cn,HK=zn,qK=Ka,Ja=function(e,t,n){zK?HK.f(e,t,qK(0,n)):e[t]=n},WK=Lt,VK=WK("toStringTag"),cO={};cO[VK]="z";var cm=String(cO)==="[object z]",KK=cm,GK=Xt,jc=jo,ZK=Lt,YK=ZK("toStringTag"),JK=Object,XK=jc(function(){return arguments}())==="Arguments",QK=function(e,t){try{return e[t]}catch{}},Xa=KK?jc:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=QK(t=JK(e),YK))=="string"?n:XK?jc(t):(r=jc(t))==="Object"&&GK(t.callee)?"Arguments":r},eG=At,tG=Xt,um=Xh,nG=eG(Function.toString);tG(um.inspectSource)||(um.inspectSource=function(e){return nG(e)});var rG=um.inspectSource,oG=At,iG=It,uO=Xt,aG=Xa,sG=fr,lG=rG,fO=function(){},dO=sG("Reflect","construct"),fm=/^\s*(?:class|function)\b/,cG=oG(fm.exec),uG=!fm.test(fO),Qa=function(t){if(!uO(t))return!1;try{return dO(fO,[],t),!0}catch{return!1}},pO=function(t){if(!uO(t))return!1;switch(aG(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return uG||!!cG(fm,lG(t))}catch{return!0}};pO.sham=!0;var dm=!dO||iG(function(){var e;return Qa(Qa.call)||!Qa(Object)||!Qa(function(){e=!0})||e})?pO:Qa,hO=Ci,fG=dm,dG=Rr,pG=Lt,hG=pG("species"),mO=Array,mG=function(e){var t;return hO(e)&&(t=e.constructor,fG(t)&&(t===mO||hO(t.prototype))?t=void 0:dG(t)&&(t=t[hG],t===null&&(t=void 0))),t===void 0?mO:t},vG=mG,pm=function(e,t){return new(vG(e))(t===0?0:t)},yG=It,gG=Lt,bG=Vh,wG=gG("species"),Nc=function(e){return bG>=51||!yG(function(){var t=[],n=t.constructor={};return n[wG]=function(){return{foo:1}},t[e](Boolean).foo!==1})},xG=it,SG=It,EG=Ci,$G=Rr,OG=Dr,kG=No,vO=lm,yO=Ja,_G=pm,TG=Nc,CG=Lt,IG=Vh,gO=CG("isConcatSpreadable"),AG=IG>=51||!SG(function(){var e=[];return e[gO]=!1,e.concat()[0]!==e}),PG=function(e){if(!$G(e))return!1;var t=e[gO];return t!==void 0?!!t:EG(e)},RG=!AG||!TG("concat");xG({target:"Array",proto:!0,arity:1,forced:RG},{concat:function(t){var n=OG(this),r=_G(n,0),o=0,i,a,s,l,c;for(i=-1,s=arguments.length;i<s;i++)if(c=i===-1?n:arguments[i],PG(c))for(l=kG(c),vO(o+l),a=0;a<l;a++,o++)a in c&&yO(r,o,c[a]);else vO(o+1),yO(r,o++,c);return r.length=o,r}});var MG=Xa,DG=String,es=function(e){if(MG(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return DG(e)},Lc={},jG=Dc,NG=Math.max,LG=Math.min,hm=function(e,t){var n=jG(e);return n<0?NG(n+t,0):LG(n,t)},FG=ur,BG=hm,UG=No,bO=function(e){return function(t,n,r){var o=FG(t),i=UG(o);if(i===0)return!e&&-1;var a=BG(r,i),s;if(e&&n!==n){for(;i>a;)if(s=o[a++],s!==s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===n)return e||a||0;return!e&&-1}},wO={includes:bO(!0),indexOf:bO(!1)},Fc={},zG=At,mm=bn,HG=ur,qG=wO.indexOf,WG=Fc,xO=zG([].push),SO=function(e,t){var n=HG(e),r=0,o=[],i;for(i in n)!mm(WG,i)&&mm(n,i)&&xO(o,i);for(;t.length>r;)mm(n,i=t[r++])&&(~qG(o,i)||xO(o,i));return o},vm=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],VG=SO,KG=vm,ym=Object.keys||function(t){return VG(t,KG)},GG=cn,ZG=oO,YG=zn,JG=uo,XG=ur,QG=ym;Lc.f=GG&&!ZG?Object.defineProperties:function(t,n){JG(t);for(var r=XG(n),o=QG(n),i=o.length,a=0,s;i>a;)YG.f(t,s=o[a++],r[s]);return t};var eZ=fr,tZ=eZ("document","documentElement"),nZ=Oi,rZ=Qh,EO=nZ("keys"),Bc=function(e){return EO[e]||(EO[e]=rZ(e))},oZ=uo,iZ=Lc,$O=vm,aZ=Fc,sZ=tZ,lZ=eO,cZ=Bc,OO=">",kO="<",gm="prototype",bm="script",_O=cZ("IE_PROTO"),wm=function(){},TO=function(e){return kO+bm+OO+e+kO+"/"+bm+OO},CO=function(e){e.write(TO("")),e.close();var t=e.parentWindow.Object;return e=null,t},uZ=function(){var e=lZ("iframe"),t="java"+bm+":",n;return e.style.display="none",sZ.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(TO("document.F=Object")),n.close(),n.F},Uc,zc=function(){try{Uc=new ActiveXObject("htmlfile")}catch{}zc=typeof document<"u"?document.domain&&Uc?CO(Uc):uZ():CO(Uc);for(var e=$O.length;e--;)delete zc[gm][$O[e]];return zc()};aZ[_O]=!0;var xm=Object.create||function(t,n){var r;return t!==null?(wm[gm]=oZ(t),r=new wm,wm[gm]=null,r[_O]=t):r=zc(),n===void 0?r:iZ.f(r,n)},Hc={},fZ=SO,dZ=vm,pZ=dZ.concat("length","prototype");Hc.f=Object.getOwnPropertyNames||function(t){return fZ(t,pZ)};var IO={},hZ=At,qc=hZ([].slice),mZ=jo,vZ=ur,AO=Hc.f,yZ=qc,PO=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],gZ=function(e){try{return AO(e)}catch{return yZ(PO)}};IO.f=function(t){return PO&&mZ(t)==="Window"?gZ(t):AO(vZ(t))};var Wc={};Wc.f=Object.getOwnPropertySymbols;var bZ=Mc,Vc=function(e,t,n,r){return r&&r.enumerable?e[t]=n:bZ(e,t,n),e},wZ=zn,xZ=function(e,t,n){return wZ.f(e,t,n)},ts={},SZ=Lt;ts.f=SZ;var RO=zt,EZ=bn,$Z=ts,OZ=zn.f,vt=function(e){var t=RO.Symbol||(RO.Symbol={});EZ(t,e)||OZ(t,e,{value:$Z.f(e)})},kZ=cr,_Z=fr,TZ=Lt,CZ=Vc,MO=function(){var e=_Z("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=TZ("toPrimitive");t&&!t[r]&&CZ(t,r,function(o){return kZ(n,this)},{arity:1})},IZ=cm,AZ=Xa,PZ=IZ?{}.toString:function(){return"[object "+AZ(this)+"]"},RZ=cm,MZ=zn.f,DZ=Mc,jZ=bn,NZ=PZ,LZ=Lt,DO=LZ("toStringTag"),Ii=function(e,t,n,r){var o=n?e:e&&e.prototype;o&&(jZ(o,DO)||MZ(o,DO,{configurable:!0,value:t}),r&&!RZ&&DZ(o,"toString",NZ))},FZ=Ct,BZ=Xt,jO=FZ.WeakMap,UZ=BZ(jO)&&/native code/.test(String(jO)),zZ=UZ,NO=Ct,HZ=Rr,qZ=Mc,Sm=bn,Em=Xh,WZ=Bc,VZ=Fc,LO="Object already initialized",$m=NO.TypeError,KZ=NO.WeakMap,Kc,ns,Gc,GZ=function(e){return Gc(e)?ns(e):Kc(e,{})},ZZ=function(e){return function(t){var n;if(!HZ(t)||(n=ns(t)).type!==e)throw new $m("Incompatible receiver, "+e+" required");return n}};if(zZ||Em.state){var dr=Em.state||(Em.state=new KZ);dr.get=dr.get,dr.has=dr.has,dr.set=dr.set,Kc=function(e,t){if(dr.has(e))throw new $m(LO);return t.facade=e,dr.set(e,t),t},ns=function(e){return dr.get(e)||{}},Gc=function(e){return dr.has(e)}}else{var Ai=WZ("state");VZ[Ai]=!0,Kc=function(e,t){if(Sm(e,Ai))throw new $m(LO);return t.facade=e,qZ(e,Ai,t),t},ns=function(e){return Sm(e,Ai)?e[Ai]:{}},Gc=function(e){return Sm(e,Ai)}}var Om={set:Kc,get:ns,has:Gc,enforce:GZ,getterFor:ZZ},YZ=rm,JZ=At,XZ=M$,QZ=Dr,eY=No,tY=pm,FO=JZ([].push),fo=function(e){var t=e===1,n=e===2,r=e===3,o=e===4,i=e===6,a=e===7,s=e===5||i;return function(l,c,u,f){for(var p=QZ(l),d=XZ(p),h=eY(d),m=YZ(c,u),y=0,v=f||tY,g=t?v(l,h):n||a?v(l,0):void 0,b,k;h>y;y++)if((s||y in d)&&(b=d[y],k=m(b,y,p),e))if(t)g[y]=k;else if(k)switch(e){case 3:return!0;case 5:return b;case 6:return y;case 2:FO(g,b)}else switch(e){case 4:return!1;case 7:FO(g,b)}return i?-1:r||o?o:g}},km={forEach:fo(0),map:fo(1),filter:fo(2),some:fo(3),every:fo(4),find:fo(5),findIndex:fo(6),filterReject:fo(7)},Zc=it,rs=Ct,_m=cr,nY=At,Pi=cn,Ri=$i,rY=It,Ft=bn,oY=Mr,Tm=uo,Yc=ur,Cm=tm,iY=es,Im=Ka,Mi=xm,BO=ym,aY=Hc,UO=IO,sY=Wc,zO=Va,HO=zn,lY=Lc,qO=Lh,WO=Vc,cY=xZ,Am=Oi,uY=Bc,VO=Fc,KO=Qh,fY=Lt,dY=ts,pY=vt,hY=MO,mY=Ii,GO=Om,Jc=km.forEach,un=uY("hidden"),Xc="Symbol",os="prototype",vY=GO.set,ZO=GO.getterFor(Xc),Hn=Object[os],Lo=rs.Symbol,is=Lo&&Lo[os],yY=rs.RangeError,gY=rs.TypeError,Pm=rs.QObject,YO=zO.f,Fo=HO.f,JO=UO.f,bY=qO.f,XO=nY([].push),jr=Am("symbols"),as=Am("op-symbols"),wY=Am("wks"),Rm=!Pm||!Pm[os]||!Pm[os].findChild,QO=function(e,t,n){var r=YO(Hn,t);r&&delete Hn[t],Fo(e,t,n),r&&e!==Hn&&Fo(Hn,t,r)},Mm=Pi&&rY(function(){return Mi(Fo({},"a",{get:function(){return Fo(this,"a",{value:7}).a}})).a!==7})?QO:Fo,Dm=function(e,t){var n=jr[e]=Mi(is);return vY(n,{type:Xc,tag:e,description:t}),Pi||(n.description=t),n},Qc=function(t,n,r){t===Hn&&Qc(as,n,r),Tm(t);var o=Cm(n);return Tm(r),Ft(jr,o)?(r.enumerable?(Ft(t,un)&&t[un][o]&&(t[un][o]=!1),r=Mi(r,{enumerable:Im(0,!1)})):(Ft(t,un)||Fo(t,un,Im(1,Mi(null))),t[un][o]=!0),Mm(t,o,r)):Fo(t,o,r)},jm=function(t,n){Tm(t);var r=Yc(n),o=BO(r).concat(rk(r));return Jc(o,function(i){(!Pi||_m(ek,r,i))&&Qc(t,i,r[i])}),t},xY=function(t,n){return n===void 0?Mi(t):jm(Mi(t),n)},ek=function(t){var n=Cm(t),r=_m(bY,this,n);return this===Hn&&Ft(jr,n)&&!Ft(as,n)?!1:r||!Ft(this,n)||!Ft(jr,n)||Ft(this,un)&&this[un][n]?r:!0},tk=function(t,n){var r=Yc(t),o=Cm(n);if(!(r===Hn&&Ft(jr,o)&&!Ft(as,o))){var i=YO(r,o);return i&&Ft(jr,o)&&!(Ft(r,un)&&r[un][o])&&(i.enumerable=!0),i}},nk=function(t){var n=JO(Yc(t)),r=[];return Jc(n,function(o){!Ft(jr,o)&&!Ft(VO,o)&&XO(r,o)}),r},rk=function(e){var t=e===Hn,n=JO(t?as:Yc(e)),r=[];return Jc(n,function(o){Ft(jr,o)&&(!t||Ft(Hn,o))&&XO(r,jr[o])}),r};Ri||(Lo=function(){if(oY(is,this))throw new gY("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:iY(arguments[0]),n=KO(t),r=function(o){var i=this===void 0?rs:this;i===Hn&&_m(r,as,o),Ft(i,un)&&Ft(i[un],n)&&(i[un][n]=!1);var a=Im(1,o);try{Mm(i,n,a)}catch(s){if(!(s instanceof yY))throw s;QO(i,n,a)}};return Pi&&Rm&&Mm(Hn,n,{configurable:!0,set:r}),Dm(n,t)},is=Lo[os],WO(is,"toString",function(){return ZO(this).tag}),WO(Lo,"withoutSetter",function(e){return Dm(KO(e),e)}),qO.f=ek,HO.f=Qc,lY.f=jm,zO.f=tk,aY.f=UO.f=nk,sY.f=rk,dY.f=function(e){return Dm(fY(e),e)},Pi&&cY(is,"description",{configurable:!0,get:function(){return ZO(this).description}})),Zc({global:!0,constructor:!0,wrap:!0,forced:!Ri,sham:!Ri},{Symbol:Lo}),Jc(BO(wY),function(e){pY(e)}),Zc({target:Xc,stat:!0,forced:!Ri},{useSetter:function(){Rm=!0},useSimple:function(){Rm=!1}}),Zc({target:"Object",stat:!0,forced:!Ri,sham:!Pi},{create:xY,defineProperty:Qc,defineProperties:jm,getOwnPropertyDescriptor:tk}),Zc({target:"Object",stat:!0,forced:!Ri},{getOwnPropertyNames:nk}),hY(),mY(Lo,Xc),VO[un]=!0;var SY=$i,ok=SY&&!!Symbol.for&&!!Symbol.keyFor,EY=it,$Y=fr,OY=bn,kY=es,ik=Oi,_Y=ok,Nm=ik("string-to-symbol-registry"),TY=ik("symbol-to-string-registry");EY({target:"Symbol",stat:!0,forced:!_Y},{for:function(e){var t=kY(e);if(OY(Nm,t))return Nm[t];var n=$Y("Symbol")(t);return Nm[t]=n,TY[n]=t,n}});var CY=it,IY=bn,AY=Ga,PY=Pc,RY=Oi,MY=ok,ak=RY("symbol-to-string-registry");CY({target:"Symbol",stat:!0,forced:!MY},{keyFor:function(t){if(!AY(t))throw new TypeError(PY(t)+" is not a symbol");if(IY(ak,t))return ak[t]}});var DY=At,sk=Ci,jY=Xt,lk=jo,NY=es,ck=DY([].push),LY=function(e){if(jY(e))return e;if(sk(e)){for(var t=e.length,n=[],r=0;r<t;r++){var o=e[r];typeof o=="string"?ck(n,o):(typeof o=="number"||lk(o)==="Number"||lk(o)==="String")&&ck(n,NY(o))}var i=n.length,a=!0;return function(s,l){if(a)return a=!1,l;if(sk(this))return l;for(var c=0;c<i;c++)if(n[c]===s)return l}}},FY=it,uk=fr,fk=Mh,BY=cr,ss=At,dk=It,pk=Xt,hk=Ga,mk=qc,UY=LY,zY=$i,HY=String,po=uk("JSON","stringify"),eu=ss(/./.exec),vk=ss("".charAt),qY=ss("".charCodeAt),WY=ss("".replace),VY=ss(1 .toString),KY=/[\uD800-\uDFFF]/g,yk=/^[\uD800-\uDBFF]$/,gk=/^[\uDC00-\uDFFF]$/,bk=!zY||dk(function(){var e=uk("Symbol")("stringify detection");return po([e])!=="[null]"||po({a:e})!=="{}"||po(Object(e))!=="{}"}),wk=dk(function(){return po("\uDF06\uD834")!=='"\\udf06\\ud834"'||po("\uDEAD")!=='"\\udead"'}),GY=function(e,t){var n=mk(arguments),r=UY(t);if(!(!pk(r)&&(e===void 0||hk(e))))return n[1]=function(o,i){if(pk(r)&&(i=BY(r,this,HY(o),i)),!hk(i))return i},fk(po,null,n)},ZY=function(e,t,n){var r=vk(n,t-1),o=vk(n,t+1);return eu(yk,e)&&!eu(gk,o)||eu(gk,e)&&!eu(yk,r)?"\\u"+VY(qY(e,0),16):e};po&&FY({target:"JSON",stat:!0,arity:3,forced:bk||wk},{stringify:function(t,n,r){var o=mk(arguments),i=fk(bk?GY:po,null,o);return wk&&typeof i=="string"?WY(i,KY,ZY):i}});var YY=it,JY=$i,XY=It,xk=Wc,QY=Dr,eJ=!JY||XY(function(){xk.f(1)});YY({target:"Object",stat:!0,forced:eJ},{getOwnPropertySymbols:function(t){var n=xk.f;return n?n(QY(t)):[]}});var tJ=vt;tJ("asyncIterator");var nJ=vt;nJ("hasInstance");var rJ=vt;rJ("isConcatSpreadable");var oJ=vt;oJ("iterator");var iJ=vt;iJ("match");var aJ=vt;aJ("matchAll");var sJ=vt;sJ("replace");var lJ=vt;lJ("search");var cJ=vt;cJ("species");var uJ=vt;uJ("split");var fJ=vt,dJ=MO;fJ("toPrimitive"),dJ();var pJ=fr,hJ=vt,mJ=Ii;hJ("toStringTag"),mJ(pJ("Symbol"),"Symbol");var vJ=vt;vJ("unscopables");var yJ=Ct,gJ=Ii;gJ(yJ.JSON,"JSON",!0);var bJ=zt,wJ=bJ.Symbol,Di={},Lm=cn,xJ=bn,Sk=Function.prototype,SJ=Lm&&Object.getOwnPropertyDescriptor,Fm=xJ(Sk,"name"),EJ=Fm&&(function(){}).name==="something",$J=Fm&&(!Lm||Lm&&SJ(Sk,"name").configurable),OJ={EXISTS:Fm,PROPER:EJ,CONFIGURABLE:$J},kJ=It,_J=!kJ(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),TJ=bn,CJ=Xt,IJ=Dr,AJ=Bc,PJ=_J,Ek=AJ("IE_PROTO"),Bm=Object,RJ=Bm.prototype,$k=PJ?Bm.getPrototypeOf:function(e){var t=IJ(e);if(TJ(t,Ek))return t[Ek];var n=t.constructor;return CJ(n)&&t instanceof n?n.prototype:t instanceof Bm?RJ:null},MJ=It,DJ=Xt,jJ=Rr,NJ=xm,Ok=$k,LJ=Vc,FJ=Lt,Um=FJ("iterator"),kk=!1,Nr,zm,Hm;[].keys&&(Hm=[].keys(),"next"in Hm?(zm=Ok(Ok(Hm)),zm!==Object.prototype&&(Nr=zm)):kk=!0);var BJ=!jJ(Nr)||MJ(function(){var e={};return Nr[Um].call(e)!==e});BJ?Nr={}:Nr=NJ(Nr),DJ(Nr[Um])||LJ(Nr,Um,function(){return this});var _k={IteratorPrototype:Nr,BUGGY_SAFARI_ITERATORS:kk},UJ=_k.IteratorPrototype,zJ=xm,HJ=Ka,qJ=Ii,WJ=Di,VJ=function(){return this},KJ=function(e,t,n,r){var o=t+" Iterator";return e.prototype=zJ(UJ,{next:HJ(+!r,n)}),qJ(e,o,!1,!0),WJ[o]=VJ,e},GJ=it,ZJ=cr,Tk=OJ,YJ=KJ,JJ=$k,XJ=Ii,Ck=Vc,QJ=Lt,Ik=Di,Ak=_k,eX=Tk.PROPER;Tk.CONFIGURABLE,Ak.IteratorPrototype;var tu=Ak.BUGGY_SAFARI_ITERATORS,qm=QJ("iterator"),Pk="keys",nu="values",Rk="entries",tX=function(){return this},Mk=function(e,t,n,r,o,i,a){YJ(n,t,r);var s=function(v){if(v===o&&p)return p;if(!tu&&v&&v in u)return u[v];switch(v){case Pk:return function(){return new n(this,v)};case nu:return function(){return new n(this,v)};case Rk:return function(){return new n(this,v)}}return function(){return new n(this)}},l=t+" Iterator",c=!1,u=e.prototype,f=u[qm]||u["@@iterator"]||o&&u[o],p=!tu&&f||s(o),d=t==="Array"&&u.entries||f,h,m,y;if(d&&(h=JJ(d.call(new e)),h!==Object.prototype&&h.next&&(XJ(h,l,!0,!0),Ik[l]=tX)),eX&&o===nu&&f&&f.name!==nu&&(c=!0,p=function(){return ZJ(f,this)}),o)if(m={values:s(nu),keys:i?p:s(Pk),entries:s(Rk)},a)for(y in m)(tu||c||!(y in u))&&Ck(u,y,m[y]);else GJ({target:t,proto:!0,forced:tu||c},m);return a&&u[qm]!==p&&Ck(u,qm,p,{name:o}),Ik[t]=p,m},Dk=function(e,t){return{value:e,done:t}},nX=ur,jk=Di,Nk=Om;zn.f;var rX=Mk,ru=Dk,Lk="Array Iterator",oX=Nk.set,iX=Nk.getterFor(Lk);rX(Array,"Array",function(e,t){oX(this,{type:Lk,target:nX(e),index:0,kind:t})},function(){var e=iX(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,ru(void 0,!0);switch(e.kind){case"keys":return ru(n,!1);case"values":return ru(t[n],!1)}return ru([n,t[n]],!1)},"values"),jk.Arguments=jk.Array;var aX={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},sX=aX,lX=Ct,cX=Ii,Fk=Di;for(var Wm in sX)cX(lX[Wm],Wm),Fk[Wm]=Fk.Array;var uX=wJ,fX=uX,dX=Lt,pX=zn.f,Bk=dX("metadata"),Uk=Function.prototype;Uk[Bk]===void 0&&pX(Uk,Bk,{value:null});var hX=vt;hX("asyncDispose");var mX=vt;mX("dispose");var vX=vt;vX("metadata");var yX=fX,gX=yX,bX=fr,wX=At,Vm=bX("Symbol"),xX=Vm.keyFor,SX=wX(Vm.prototype.valueOf),zk=Vm.isRegisteredSymbol||function(t){try{return xX(SX(t))!==void 0}catch{return!1}},EX=it,$X=zk;EX({target:"Symbol",stat:!0},{isRegisteredSymbol:$X});for(var OX=Oi,Hk=fr,kX=At,_X=Ga,TX=Lt,ou=Hk("Symbol"),qk=ou.isWellKnownSymbol,Wk=Hk("Object","getOwnPropertyNames"),CX=kX(ou.prototype.valueOf),Vk=OX("wks"),Km=0,Kk=Wk(ou),IX=Kk.length;Km<IX;Km++)try{var Gk=Kk[Km];_X(ou[Gk])&&TX(Gk)}catch{}var Zk=function(t){if(qk&&qk(t))return!0;try{for(var n=CX(t),r=0,o=Wk(Vk),i=o.length;r<i;r++)if(Vk[o[r]]==n)return!0}catch{}return!1},AX=it,PX=Zk;AX({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:PX});var RX=vt;RX("customMatcher");var MX=vt;MX("observable");var DX=it,jX=zk;DX({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:jX});var NX=it,LX=Zk;NX({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:LX});var FX=vt;FX("matcher");var BX=vt;BX("metadataKey");var UX=vt;UX("patternMatch");var zX=vt;zX("replaceAll");var HX=gX,qX=HX,WX=qX;const ji=Le(WX);var Gm=At,VX=Dc,KX=es,GX=Uh,ZX=Gm("".charAt),Yk=Gm("".charCodeAt),YX=Gm("".slice),Jk=function(e){return function(t,n){var r=KX(GX(t)),o=VX(n),i=r.length,a,s;return o<0||o>=i?e?"":void 0:(a=Yk(r,o),a<55296||a>56319||o+1===i||(s=Yk(r,o+1))<56320||s>57343?e?ZX(r,o):a:e?YX(r,o,o+2):(a-55296<<10)+(s-56320)+65536)}},JX={codeAt:Jk(!1),charAt:Jk(!0)},XX=JX.charAt,QX=es,Xk=Om,eQ=Mk,Qk=Dk,e_="String Iterator",tQ=Xk.set,nQ=Xk.getterFor(e_);eQ(String,"String",function(e){tQ(this,{type:e_,string:QX(e),index:0})},function(){var t=nQ(this),n=t.string,r=t.index,o;return r>=n.length?Qk(void 0,!0):(o=XX(n,r),t.index+=o.length,Qk(o,!1))});var rQ=Xa,t_=Gh,oQ=Bh,iQ=Di,aQ=Lt,sQ=aQ("iterator"),Zm=function(e){if(!oQ(e))return t_(e,sQ)||t_(e,"@@iterator")||iQ[rQ(e)]},lQ=Zm,cQ=lQ,uQ=cQ,fQ=uQ,dQ=fQ,pQ=dQ,hQ=pQ,mQ=hQ,vQ=mQ;const n_=Le(vQ);var yQ=cn,gQ=Ci,bQ=TypeError,wQ=Object.getOwnPropertyDescriptor,xQ=yQ&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),r_=xQ?function(e,t){if(gQ(e)&&!wQ(e,"length").writable)throw new bQ("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},SQ=it,EQ=Dr,$Q=No,OQ=r_,kQ=lm,_Q=It,TQ=_Q(function(){return[].push.call({length:4294967296},1)!==4294967297}),CQ=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},IQ=TQ||!CQ();SQ({target:"Array",proto:!0,arity:1,forced:IQ},{push:function(t){var n=EQ(this),r=$Q(n),o=arguments.length;kQ(r+o);for(var i=0;i<o;i++)n[r]=arguments[i],r++;return OQ(n,r),r}});var AQ=Ct,PQ=zt,Bo=function(e,t){var n=PQ[e+"Prototype"],r=n&&n[t];if(r)return r;var o=AQ[e],i=o&&o.prototype;return i&&i[t]},RQ=Bo,MQ=RQ("Array","push"),DQ=Mr,jQ=MQ,Ym=Array.prototype,NQ=function(e){var t=e.push;return e===Ym||DQ(Ym,e)&&t===Ym.push?jQ:t},LQ=NQ,FQ=LQ,BQ=FQ,UQ=BQ,zQ=UQ,HQ=zQ,qQ=HQ;const WQ=Le(qQ);function VQ(e,t){var n=e==null?null:typeof ji<"u"&&n_(e)||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(WQ(s).call(s,r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}var KQ=it,o_=Ci,GQ=dm,ZQ=Rr,i_=hm,YQ=No,JQ=ur,XQ=Ja,QQ=Lt,eee=Nc,tee=qc,nee=eee("slice"),ree=QQ("species"),Jm=Array,oee=Math.max;KQ({target:"Array",proto:!0,forced:!nee},{slice:function(t,n){var r=JQ(this),o=YQ(r),i=i_(t,o),a=i_(n===void 0?o:n,o),s,l,c;if(o_(r)&&(s=r.constructor,GQ(s)&&(s===Jm||o_(s.prototype))?s=void 0:ZQ(s)&&(s=s[ree],s===null&&(s=void 0)),s===Jm||s===void 0))return tee(r,i,a);for(l=new(s===void 0?Jm:s)(oee(a-i,0)),c=0;i<a;i++,c++)i in r&&XQ(l,c,r[i]);return l.length=c,l}});var iee=Bo,aee=iee("Array","slice"),see=Mr,lee=aee,Xm=Array.prototype,cee=function(e){var t=e.slice;return e===Xm||see(Xm,e)&&t===Xm.slice?lee:t},uee=cee,fee=uee,dee=fee,pee=dee,hee=pee,mee=hee,vee=mee;const yee=Le(vee);var gee=cr,a_=uo,bee=Gh,wee=function(e,t,n){var r,o;a_(e);try{if(r=bee(e,"return"),!r){if(t==="throw")throw n;return n}r=gee(r,e)}catch(i){o=!0,r=i}if(t==="throw")throw n;if(o)throw r;return a_(r),n},xee=uo,See=wee,Eee=function(e,t,n,r){try{return r?t(xee(n)[0],n[1]):t(n)}catch(o){See(e,"throw",o)}},$ee=Lt,Oee=Di,kee=$ee("iterator"),_ee=Array.prototype,Tee=function(e){return e!==void 0&&(Oee.Array===e||_ee[kee]===e)},Cee=cr,Iee=Kh,Aee=uo,Pee=Pc,Ree=Zm,Mee=TypeError,Dee=function(e,t){var n=arguments.length<2?Ree(e):t;if(Iee(n))return Aee(Cee(n,e));throw new Mee(Pee(e)+" is not iterable")},jee=rm,Nee=cr,Lee=Dr,Fee=Eee,Bee=Tee,Uee=dm,zee=No,s_=Ja,Hee=Dee,qee=Zm,l_=Array,Wee=function(t){var n=Lee(t),r=Uee(this),o=arguments.length,i=o>1?arguments[1]:void 0,a=i!==void 0;a&&(i=jee(i,o>2?arguments[2]:void 0));var s=qee(n),l=0,c,u,f,p,d,h;if(s&&!(this===l_&&Bee(s)))for(u=r?new this:[],p=Hee(n,s),d=p.next;!(f=Nee(d,p)).done;l++)h=a?Fee(p,i,[f.value,l],!0):f.value,s_(u,l,h);else for(c=zee(n),u=r?new this(c):l_(c);c>l;l++)h=a?i(n[l],l):n[l],s_(u,l,h);return u.length=l,u},Vee=Lt,c_=Vee("iterator"),u_=!1;try{var Kee=0,f_={next:function(){return{done:!!Kee++}},return:function(){u_=!0}};f_[c_]=function(){return this},Array.from(f_,function(){throw 2})}catch{}var Gee=function(e,t){try{if(!t&&!u_)return!1}catch{return!1}var n=!1;try{var r={};r[c_]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},Zee=it,Yee=Wee,Jee=Gee,Xee=!Jee(function(e){Array.from(e)});Zee({target:"Array",stat:!0,forced:Xee},{from:Yee});var Qee=zt,ete=Qee.Array.from,tte=ete,nte=tte,rte=nte,ote=rte,ite=ote,ate=ite,ste=ate;const d_=Le(ste);function Qm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p_(e,t){if(e){var n;if(typeof e=="string")return Qm(e,t);var r=yee(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?d_(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Qm(e,t):void 0}}function lte(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
325
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pr(e,t){return AK(e)||VQ(e,t)||p_(e,t)||lte()}var h_={exports:{}};/*!
326
326
  Copyright (c) 2018 Jed Watson.
327
327
  Licensed under the MIT License (MIT), see
328
328
  http://jedwatson.github.io/classnames
329
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var a=typeof i;if(a==="string"||a==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var s=n.apply(null,i);s&&r.push(s)}}else if(a==="object")if(i.toString===Object.prototype.toString)for(var c in i)t.call(i,c)&&i[c]&&r.push(c);else r.push(i.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(hk);var aQ=hk.exports;const Ym=Ue(aQ);var Jm={exports:{}},Ru={exports:{}},et={};/** @license React v16.13.1
329
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var a=typeof i;if(a==="string"||a==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var s=n.apply(null,i);s&&r.push(s)}}else if(a==="object")if(i.toString===Object.prototype.toString)for(var l in i)t.call(i,l)&&i[l]&&r.push(l);else r.push(i.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(h_);var cte=h_.exports;const ev=Le(cte);var tv={exports:{}},iu={exports:{}},Qe={};/** @license React v16.13.1
330
330
  * react-is.production.min.js
331
331
  *
332
332
  * Copyright (c) Facebook, Inc. and its affiliates.
333
333
  *
334
334
  * This source code is licensed under the MIT license found in the
335
335
  * LICENSE file in the root directory of this source tree.
336
- */var mk;function sQ(){if(mk)return et;mk=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b(S){if(typeof S=="object"&&S!==null){var $=S.$$typeof;switch($){case t:switch(S=S.type,S){case c:case l:case r:case i:case o:case f:return S;default:switch(S=S&&S.$$typeof,S){case s:case u:case h:case d:case a:return S;default:return $}}case n:return $}}}function k(S){return b(S)===l}return et.AsyncMode=c,et.ConcurrentMode=l,et.ContextConsumer=s,et.ContextProvider=a,et.Element=t,et.ForwardRef=u,et.Fragment=r,et.Lazy=h,et.Memo=d,et.Portal=n,et.Profiler=i,et.StrictMode=o,et.Suspense=f,et.isAsyncMode=function(S){return k(S)||b(S)===c},et.isConcurrentMode=k,et.isContextConsumer=function(S){return b(S)===s},et.isContextProvider=function(S){return b(S)===a},et.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},et.isForwardRef=function(S){return b(S)===u},et.isFragment=function(S){return b(S)===r},et.isLazy=function(S){return b(S)===h},et.isMemo=function(S){return b(S)===d},et.isPortal=function(S){return b(S)===n},et.isProfiler=function(S){return b(S)===i},et.isStrictMode=function(S){return b(S)===o},et.isSuspense=function(S){return b(S)===f},et.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===l||S===i||S===o||S===f||S===p||typeof S=="object"&&S!==null&&(S.$$typeof===h||S.$$typeof===d||S.$$typeof===a||S.$$typeof===s||S.$$typeof===u||S.$$typeof===v||S.$$typeof===y||S.$$typeof===g||S.$$typeof===m)},et.typeOf=b,et}var tt={};/** @license React v16.13.1
336
+ */var m_;function ute(){if(m_)return Qe;m_=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b(S){if(typeof S=="object"&&S!==null){var $=S.$$typeof;switch($){case t:switch(S=S.type,S){case l:case c:case r:case i:case o:case f:return S;default:switch(S=S&&S.$$typeof,S){case s:case u:case h:case d:case a:return S;default:return $}}case n:return $}}}function k(S){return b(S)===c}return Qe.AsyncMode=l,Qe.ConcurrentMode=c,Qe.ContextConsumer=s,Qe.ContextProvider=a,Qe.Element=t,Qe.ForwardRef=u,Qe.Fragment=r,Qe.Lazy=h,Qe.Memo=d,Qe.Portal=n,Qe.Profiler=i,Qe.StrictMode=o,Qe.Suspense=f,Qe.isAsyncMode=function(S){return k(S)||b(S)===l},Qe.isConcurrentMode=k,Qe.isContextConsumer=function(S){return b(S)===s},Qe.isContextProvider=function(S){return b(S)===a},Qe.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},Qe.isForwardRef=function(S){return b(S)===u},Qe.isFragment=function(S){return b(S)===r},Qe.isLazy=function(S){return b(S)===h},Qe.isMemo=function(S){return b(S)===d},Qe.isPortal=function(S){return b(S)===n},Qe.isProfiler=function(S){return b(S)===i},Qe.isStrictMode=function(S){return b(S)===o},Qe.isSuspense=function(S){return b(S)===f},Qe.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===c||S===i||S===o||S===f||S===p||typeof S=="object"&&S!==null&&(S.$$typeof===h||S.$$typeof===d||S.$$typeof===a||S.$$typeof===s||S.$$typeof===u||S.$$typeof===y||S.$$typeof===v||S.$$typeof===g||S.$$typeof===m)},Qe.typeOf=b,Qe}var et={};/** @license React v16.13.1
337
337
  * react-is.development.js
338
338
  *
339
339
  * Copyright (c) Facebook, Inc. and its affiliates.
340
340
  *
341
341
  * This source code is licensed under the MIT license found in the
342
342
  * LICENSE file in the root directory of this source tree.
343
- */var yk;function cQ(){return yk||(yk=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b(G){return typeof G=="string"||typeof G=="function"||G===r||G===l||G===i||G===o||G===f||G===p||typeof G=="object"&&G!==null&&(G.$$typeof===h||G.$$typeof===d||G.$$typeof===a||G.$$typeof===s||G.$$typeof===u||G.$$typeof===v||G.$$typeof===y||G.$$typeof===g||G.$$typeof===m)}function k(G){if(typeof G=="object"&&G!==null){var fe=G.$$typeof;switch(fe){case t:var ve=G.type;switch(ve){case c:case l:case r:case i:case o:case f:return ve;default:var _e=ve&&ve.$$typeof;switch(_e){case s:case u:case h:case d:case a:return _e;default:return fe}}case n:return fe}}}var S=c,$=l,T=s,R=a,B=t,O=u,M=r,H=h,L=d,P=n,N=i,j=o,W=f,V=!1;function D(G){return V||(V=!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.")),w(G)||k(G)===c}function w(G){return k(G)===l}function z(G){return k(G)===s}function K(G){return k(G)===a}function _(G){return typeof G=="object"&&G!==null&&G.$$typeof===t}function J(G){return k(G)===u}function ae(G){return k(G)===r}function re(G){return k(G)===h}function le(G){return k(G)===d}function pe(G){return k(G)===n}function me(G){return k(G)===i}function ce(G){return k(G)===o}function Q(G){return k(G)===f}tt.AsyncMode=S,tt.ConcurrentMode=$,tt.ContextConsumer=T,tt.ContextProvider=R,tt.Element=B,tt.ForwardRef=O,tt.Fragment=M,tt.Lazy=H,tt.Memo=L,tt.Portal=P,tt.Profiler=N,tt.StrictMode=j,tt.Suspense=W,tt.isAsyncMode=D,tt.isConcurrentMode=w,tt.isContextConsumer=z,tt.isContextProvider=K,tt.isElement=_,tt.isForwardRef=J,tt.isFragment=ae,tt.isLazy=re,tt.isMemo=le,tt.isPortal=pe,tt.isProfiler=me,tt.isStrictMode=ce,tt.isSuspense=Q,tt.isValidElementType=b,tt.typeOf=k}()),tt}var vk;function gk(){return vk||(vk=1,process.env.NODE_ENV==="production"?Ru.exports=sQ():Ru.exports=cQ()),Ru.exports}/*
343
+ */var v_;function fte(){return v_||(v_=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b(G){return typeof G=="string"||typeof G=="function"||G===r||G===c||G===i||G===o||G===f||G===p||typeof G=="object"&&G!==null&&(G.$$typeof===h||G.$$typeof===d||G.$$typeof===a||G.$$typeof===s||G.$$typeof===u||G.$$typeof===y||G.$$typeof===v||G.$$typeof===g||G.$$typeof===m)}function k(G){if(typeof G=="object"&&G!==null){var fe=G.$$typeof;switch(fe){case t:var ve=G.type;switch(ve){case l:case c:case r:case i:case o:case f:return ve;default:var Ee=ve&&ve.$$typeof;switch(Ee){case s:case u:case h:case d:case a:return Ee;default:return fe}}case n:return fe}}}var S=l,$=c,C=s,P=a,F=t,T=u,M=r,q=h,B=d,A=n,D=i,N=o,V=f,W=!1;function j(G){return W||(W=!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.")),x(G)||k(G)===l}function x(G){return k(G)===c}function z(G){return k(G)===s}function K(G){return k(G)===a}function O(G){return typeof G=="object"&&G!==null&&G.$$typeof===t}function J(G){return k(G)===u}function ae(G){return k(G)===r}function re(G){return k(G)===h}function ce(G){return k(G)===d}function pe(G){return k(G)===n}function he(G){return k(G)===i}function le(G){return k(G)===o}function Q(G){return k(G)===f}et.AsyncMode=S,et.ConcurrentMode=$,et.ContextConsumer=C,et.ContextProvider=P,et.Element=F,et.ForwardRef=T,et.Fragment=M,et.Lazy=q,et.Memo=B,et.Portal=A,et.Profiler=D,et.StrictMode=N,et.Suspense=V,et.isAsyncMode=j,et.isConcurrentMode=x,et.isContextConsumer=z,et.isContextProvider=K,et.isElement=O,et.isForwardRef=J,et.isFragment=ae,et.isLazy=re,et.isMemo=ce,et.isPortal=pe,et.isProfiler=he,et.isStrictMode=le,et.isSuspense=Q,et.isValidElementType=b,et.typeOf=k}()),et}var y_;function g_(){return y_||(y_=1,process.env.NODE_ENV==="production"?iu.exports=ute():iu.exports=fte()),iu.exports}/*
344
344
  object-assign
345
345
  (c) Sindre Sorhus
346
346
  @license MIT
347
- */var Xm,bk;function lQ(){if(bk)return Xm;bk=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(u){l[u]=u}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Xm=o()?Object.assign:function(i,a){for(var s,c=r(i),l,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var f in s)t.call(s,f)&&(c[f]=s[f]);if(e){l=e(s);for(var p=0;p<l.length;p++)n.call(s,l[p])&&(c[l[p]]=s[l[p]])}}return c},Xm}var Qm,wk;function ey(){if(wk)return Qm;wk=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Qm=e,Qm}var ty,xk;function uQ(){if(xk)return ty;xk=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ey(),n={},r=Function.call.bind(Object.prototype.hasOwnProperty);e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,c,l){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var f;try{if(typeof i[u]!="function"){var p=Error((c||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.");throw p.name="Invariant Violation",p}f=i[u](a,u,c,s,null,t)}catch(h){f=h}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var d=l?l():"";e("Failed "+s+" type: "+f.message+(d??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},ty=o,ty}var ny,Sk;function fQ(){if(Sk)return ny;Sk=1;var e=gk(),t=lQ(),n=ey(),r=uQ(),o=Function.call.bind(Object.prototype.hasOwnProperty),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return ny=function(s,c){var l=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(D){var w=D&&(l&&D[l]||D[u]);if(typeof w=="function")return w}var p="<<anonymous>>",d={array:y("array"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:g(),arrayOf:b,element:k(),elementType:S(),instanceOf:$,node:O(),objectOf:R,oneOf:T,oneOfType:B,shape:M,exact:H};function h(D,w){return D===w?D!==0||1/D===1/w:D!==D&&w!==w}function m(D){this.message=D,this.stack=""}m.prototype=Error.prototype;function v(D){if(process.env.NODE_ENV!=="production")var w={},z=0;function K(J,ae,re,le,pe,me,ce){if(le=le||p,me=me||re,ce!==n){if(c){var Q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Q.name="Invariant Violation",Q}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var G=le+":"+re;!w[G]&&z<3&&(i("You are manually calling a React.PropTypes validation function for the `"+me+"` prop on `"+le+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),w[G]=!0,z++)}}return ae[re]==null?J?ae[re]===null?new m("The "+pe+" `"+me+"` is marked as required "+("in `"+le+"`, but its value is `null`.")):new m("The "+pe+" `"+me+"` is marked as required in "+("`"+le+"`, but its value is `undefined`.")):null:D(ae,re,le,pe,me)}var _=K.bind(null,!1);return _.isRequired=K.bind(null,!0),_}function y(D){function w(z,K,_,J,ae,re){var le=z[K],pe=N(le);if(pe!==D){var me=j(le);return new m("Invalid "+J+" `"+ae+"` of type "+("`"+me+"` supplied to `"+_+"`, expected ")+("`"+D+"`."))}return null}return v(w)}function g(){return v(a)}function b(D){function w(z,K,_,J,ae){if(typeof D!="function")return new m("Property `"+ae+"` of component `"+_+"` has invalid PropType notation inside arrayOf.");var re=z[K];if(!Array.isArray(re)){var le=N(re);return new m("Invalid "+J+" `"+ae+"` of type "+("`"+le+"` supplied to `"+_+"`, expected an array."))}for(var pe=0;pe<re.length;pe++){var me=D(re,pe,_,J,ae+"["+pe+"]",n);if(me instanceof Error)return me}return null}return v(w)}function k(){function D(w,z,K,_,J){var ae=w[z];if(!s(ae)){var re=N(ae);return new m("Invalid "+_+" `"+J+"` of type "+("`"+re+"` supplied to `"+K+"`, expected a single ReactElement."))}return null}return v(D)}function S(){function D(w,z,K,_,J){var ae=w[z];if(!e.isValidElementType(ae)){var re=N(ae);return new m("Invalid "+_+" `"+J+"` of type "+("`"+re+"` supplied to `"+K+"`, expected a single ReactElement type."))}return null}return v(D)}function $(D){function w(z,K,_,J,ae){if(!(z[K]instanceof D)){var re=D.name||p,le=V(z[K]);return new m("Invalid "+J+" `"+ae+"` of type "+("`"+le+"` supplied to `"+_+"`, expected ")+("instance of `"+re+"`."))}return null}return v(w)}function T(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function w(z,K,_,J,ae){for(var re=z[K],le=0;le<D.length;le++)if(h(re,D[le]))return null;var pe=JSON.stringify(D,function(ce,Q){var G=j(Q);return G==="symbol"?String(Q):Q});return new m("Invalid "+J+" `"+ae+"` of value `"+String(re)+"` "+("supplied to `"+_+"`, expected one of "+pe+"."))}return v(w)}function R(D){function w(z,K,_,J,ae){if(typeof D!="function")return new m("Property `"+ae+"` of component `"+_+"` has invalid PropType notation inside objectOf.");var re=z[K],le=N(re);if(le!=="object")return new m("Invalid "+J+" `"+ae+"` of type "+("`"+le+"` supplied to `"+_+"`, expected an object."));for(var pe in re)if(o(re,pe)){var me=D(re,pe,_,J,ae+"."+pe,n);if(me instanceof Error)return me}return null}return v(w)}function B(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var w=0;w<D.length;w++){var z=D[w];if(typeof z!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+W(z)+" at index "+w+"."),a}function K(_,J,ae,re,le){for(var pe=0;pe<D.length;pe++){var me=D[pe];if(me(_,J,ae,re,le,n)==null)return null}return new m("Invalid "+re+" `"+le+"` supplied to "+("`"+ae+"`."))}return v(K)}function O(){function D(w,z,K,_,J){return L(w[z])?null:new m("Invalid "+_+" `"+J+"` supplied to "+("`"+K+"`, expected a ReactNode."))}return v(D)}function M(D){function w(z,K,_,J,ae){var re=z[K],le=N(re);if(le!=="object")return new m("Invalid "+J+" `"+ae+"` of type `"+le+"` "+("supplied to `"+_+"`, expected `object`."));for(var pe in D){var me=D[pe];if(me){var ce=me(re,pe,_,J,ae+"."+pe,n);if(ce)return ce}}return null}return v(w)}function H(D){function w(z,K,_,J,ae){var re=z[K],le=N(re);if(le!=="object")return new m("Invalid "+J+" `"+ae+"` of type `"+le+"` "+("supplied to `"+_+"`, expected `object`."));var pe=t({},z[K],D);for(var me in pe){var ce=D[me];if(!ce)return new m("Invalid "+J+" `"+ae+"` key `"+me+"` supplied to `"+_+"`.\nBad object: "+JSON.stringify(z[K],null," ")+`
348
- Valid keys: `+JSON.stringify(Object.keys(D),null," "));var Q=ce(re,me,_,J,ae+"."+me,n);if(Q)return Q}return null}return v(w)}function L(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(L);if(D===null||s(D))return!0;var w=f(D);if(w){var z=w.call(D),K;if(w!==D.entries){for(;!(K=z.next()).done;)if(!L(K.value))return!1}else for(;!(K=z.next()).done;){var _=K.value;if(_&&!L(_[1]))return!1}}else return!1;return!0;default:return!1}}function P(D,w){return D==="symbol"?!0:w?w["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&w instanceof Symbol:!1}function N(D){var w=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":P(w,D)?"symbol":w}function j(D){if(typeof D>"u"||D===null)return""+D;var w=N(D);if(w==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return w}function W(D){var w=j(D);switch(w){case"array":case"object":return"an "+w;case"boolean":case"date":case"regexp":return"a "+w;default:return w}}function V(D){return!D.constructor||!D.constructor.name?p:D.constructor.name}return d.checkPropTypes=r,d.resetWarningCache=r.resetWarningCache,d.PropTypes=d,d},ny}var ry,Ek;function dQ(){if(Ek)return ry;Ek=1;var e=ey();function t(){}function n(){}return n.resetWarningCache=t,ry=function(){function r(a,s,c,l,u,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function o(){return r}var i={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},ry}if(process.env.NODE_ENV!=="production"){var pQ=gk(),hQ=!0;Jm.exports=fQ()(pQ.isElement,hQ)}else Jm.exports=dQ()();var mQ=Jm.exports;const Ze=Ue(mQ);var oy=E.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});oy.displayName="ScrollToBottomFunctionContext";function _k(){return E.useContext(oy)}function yQ(){var e=_k(),t=e.scrollToEnd;return t}var iy=E.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});iy.displayName="ScrollToBottomState1Context";var ay=E.createContext({animating:!1,animatingToEnd:!1,sticky:!0});ay.displayName="ScrollToBottomState2Context";var sy=E.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});sy.displayName="ScrollToBottomStateContext";var $k=[sy,iy,ay];function vQ(e){return E.useContext($k[e]||$k[0])}function kk(){var e=vQ(2),t=e.sticky;return[t]}var Mu=E.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});Mu.displayName="ScrollToBottomInternalContext";function gQ(){return E.useContext(Mu)}function cy(){var e=gQ(),t=e.styleToClassName;return t}var bQ={backgroundColor:"rgba(0, 0, 0, .2)",borderRadius:10,borderWidth:0,bottom:5,cursor:"pointer",height:20,outline:0,position:"absolute",right:20,width:20,"&:hover":{backgroundColor:"rgba(0, 0, 0, .4)"},"&:active":{backgroundColor:"rgba(0, 0, 0, .6)"}},ly=function(t){var n=t.children,r=t.className,o=kk(),i=Er(o,1),a=i[0],s=cy()(bQ),c=yQ();return!a&&E.createElement("button",{className:Ym(s,(r||"")+""),onClick:c,type:"button"},n)};ly.defaultProps={children:void 0,className:""},ly.propTypes={children:Ze.any,className:Ze.string};var Ck={exports:{}},wQ=at,xQ=vn,Ok=Yn.f;wQ({target:"Object",stat:!0,forced:Object.defineProperty!==Ok,sham:!xQ},{defineProperty:Ok});var SQ=Kt,Tk=SQ.Object,EQ=Ck.exports=function(t,n,r){return Tk.defineProperty(t,n,r)};Tk.defineProperty.sham&&(EQ.sham=!0);var _Q=Ck.exports,$Q=_Q,Ak=$Q,kQ=Ak,CQ=kQ,OQ=CQ,TQ=OQ,AQ=TQ;const PQ=Ue(AQ);var IQ=As,RQ=IQ.f("iterator"),MQ=RQ,NQ=MQ,DQ=NQ,jQ=DQ,FQ=jQ,LQ=FQ,BQ=LQ;const UQ=Ue(BQ);function js(e){"@babel/helpers - typeof";return js=typeof ca=="function"&&typeof UQ=="symbol"?function(t){return typeof t}:function(t){return t&&typeof ca=="function"&&t.constructor===ca&&t!==ca.prototype?"symbol":typeof t},js(e)}var zQ=As,qQ=zQ.f("toPrimitive"),HQ=qQ,VQ=HQ,WQ=VQ,KQ=WQ,GQ=KQ,ZQ=GQ,YQ=ZQ;const JQ=Ue(YQ);function XQ(e,t){if(js(e)!="object"||!e)return e;var n=e[JQ];if(n!==void 0){var r=n.call(e,t||"default");if(js(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QQ(e){var t=XQ(e,"string");return js(t)=="symbol"?t:t+""}function eee(e,t,n){return(t=QQ(t))in e?PQ(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tee(e){if(c_(e))return Zm(e)}function nee(e){if(typeof ca<"u"&&nk(e)!=null||e["@@iterator"]!=null)return dk(e)}function ree(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
349
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function We(e){return tee(e)||nee(e)||pk(e)||ree()}var Nu=function(e){return e&&e.Math==Math&&e},Tn=Nu(typeof globalThis=="object"&&globalThis)||Nu(typeof window=="object"&&window)||Nu(typeof self=="object"&&self)||Nu(typeof be=="object"&&be)||function(){return this}()||Function("return this")(),uy={},Xn=function(e){try{return!!e()}catch{return!0}},oee=Xn,oi=!oee(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Pk={},Ik={}.propertyIsEnumerable,Rk=Object.getOwnPropertyDescriptor,iee=Rk&&!Ik.call({1:2},1);Pk.f=iee?function(t){var n=Rk(this,t);return!!n&&n.enumerable}:Ik;var Mk=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},aee={}.toString,fy=function(e){return aee.call(e).slice(8,-1)},see=Xn,cee=fy,lee="".split,uee=see(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return cee(e)=="String"?lee.call(e,""):Object(e)}:Object,Du=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},fee=uee,dee=Du,dy=function(e){return fee(dee(e))},jn=function(e){return typeof e=="function"},pee=jn,Fs=function(e){return typeof e=="object"?e!==null:pee(e)},py=Tn,hee=jn,mee=function(e){return hee(e)?e:void 0},ju=function(e,t){return arguments.length<2?mee(py[e]):py[e]&&py[e][t]},yee=ju,vee=yee("navigator","userAgent")||"",Nk=Tn,hy=vee,Dk=Nk.process,jk=Nk.Deno,Fk=Dk&&Dk.versions||jk&&jk.version,Lk=Fk&&Fk.v8,_r,Fu;Lk?(_r=Lk.split("."),Fu=_r[0]<4?1:_r[0]+_r[1]):hy&&(_r=hy.match(/Edge\/(\d+)/),(!_r||_r[1]>=74)&&(_r=hy.match(/Chrome\/(\d+)/),_r&&(Fu=_r[1])));var gee=Fu&&+Fu,Bk=gee,bee=Xn,Uk=!!Object.getOwnPropertySymbols&&!bee(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Bk&&Bk<41}),wee=Uk,zk=wee&&!Symbol.sham&&typeof Symbol.iterator=="symbol",xee=jn,See=ju,Eee=zk,qk=Eee?function(e){return typeof e=="symbol"}:function(e){var t=See("Symbol");return xee(t)&&Object(e)instanceof t},_ee=function(e){try{return String(e)}catch{return"Object"}},$ee=jn,kee=_ee,Cee=function(e){if($ee(e))return e;throw TypeError(kee(e)+" is not a function")},Oee=Cee,Hk=function(e,t){var n=e[t];return n==null?void 0:Oee(n)},my=jn,yy=Fs,Tee=function(e,t){var n,r;if(t==="string"&&my(n=e.toString)&&!yy(r=n.call(e))||my(n=e.valueOf)&&!yy(r=n.call(e))||t!=="string"&&my(n=e.toString)&&!yy(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},Vk={exports:{}},Wk=Tn,vy=function(e,t){try{Object.defineProperty(Wk,e,{value:t,configurable:!0,writable:!0})}catch{Wk[e]=t}return t},Aee=Tn,Pee=vy,Kk="__core-js_shared__",Iee=Aee[Kk]||Pee(Kk,{}),gy=Iee,Gk=gy;(Vk.exports=function(e,t){return Gk[e]||(Gk[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var by=Vk.exports,Ree=Du,Zk=function(e){return Object(Ree(e))},Mee=Zk,Nee={}.hasOwnProperty,ii=Object.hasOwn||function(t,n){return Nee.call(Mee(t),n)},Dee=0,jee=Math.random(),Yk=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++Dee+jee).toString(36)},Fee=Tn,Lee=by,Jk=ii,Bee=Yk,Xk=Uk,Uee=zk,Ls=Lee("wks"),Bs=Fee.Symbol,zee=Uee?Bs:Bs&&Bs.withoutSetter||Bee,Us=function(e){return(!Jk(Ls,e)||!(Xk||typeof Ls[e]=="string"))&&(Xk&&Jk(Bs,e)?Ls[e]=Bs[e]:Ls[e]=zee("Symbol."+e)),Ls[e]},Qk=Fs,eC=qk,qee=Hk,Hee=Tee,Vee=Us,Wee=Vee("toPrimitive"),Kee=function(e,t){if(!Qk(e)||eC(e))return e;var n=qee(e,Wee),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!Qk(r)||eC(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),Hee(e,t)},Gee=Kee,Zee=qk,tC=function(e){var t=Gee(e,"string");return Zee(t)?t:String(t)},Yee=Tn,nC=Fs,wy=Yee.document,Jee=nC(wy)&&nC(wy.createElement),rC=function(e){return Jee?wy.createElement(e):{}},Xee=oi,Qee=Xn,ete=rC,oC=!Xee&&!Qee(function(){return Object.defineProperty(ete("div"),"a",{get:function(){return 7}}).a!=7}),tte=oi,nte=Pk,rte=Mk,ote=dy,ite=tC,ate=ii,ste=oC,iC=Object.getOwnPropertyDescriptor;uy.f=tte?iC:function(t,n){if(t=ote(t),n=ite(n),ste)try{return iC(t,n)}catch{}if(ate(t,n))return rte(!nte.f.call(t,n),t[n])};var zs={},cte=Fs,Co=function(e){if(cte(e))return e;throw TypeError(String(e)+" is not an object")},lte=oi,ute=oC,aC=Co,fte=tC,sC=Object.defineProperty;zs.f=lte?sC:function(t,n,r){if(aC(t),n=fte(n),aC(r),ute)try{return sC(t,n,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var dte=oi,pte=zs,hte=Mk,Lu=dte?function(e,t,n){return pte.f(e,t,hte(1,n))}:function(e,t,n){return e[t]=n,e},cC={exports:{}},mte=jn,xy=gy,yte=Function.toString;mte(xy.inspectSource)||(xy.inspectSource=function(e){return yte.call(e)});var lC=xy.inspectSource,vte=Tn,gte=jn,bte=lC,uC=vte.WeakMap,wte=gte(uC)&&/native code/.test(bte(uC)),xte=by,Ste=Yk,fC=xte("keys"),dC=function(e){return fC[e]||(fC[e]=Ste(e))},Sy={},Ete=wte,_te=Tn,$te=Fs,kte=Lu,Ey=ii,_y=gy,Cte=dC,Ote=Sy,pC="Object already initialized",Tte=_te.WeakMap,Bu,qs,Uu,Ate=function(e){return Uu(e)?qs(e):Bu(e,{})},Pte=function(e){return function(t){var n;if(!$te(t)||(n=qs(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(Ete||_y.state){var ai=_y.state||(_y.state=new Tte),Ite=ai.get,hC=ai.has,Rte=ai.set;Bu=function(e,t){if(hC.call(ai,e))throw new TypeError(pC);return t.facade=e,Rte.call(ai,e,t),t},qs=function(e){return Ite.call(ai,e)||{}},Uu=function(e){return hC.call(ai,e)}}else{var la=Cte("state");Ote[la]=!0,Bu=function(e,t){if(Ey(e,la))throw new TypeError(pC);return t.facade=e,kte(e,la,t),t},qs=function(e){return Ey(e,la)?e[la]:{}},Uu=function(e){return Ey(e,la)}}var mC={set:Bu,get:qs,has:Uu,enforce:Ate,getterFor:Pte},$y=oi,Mte=ii,yC=Function.prototype,Nte=$y&&Object.getOwnPropertyDescriptor,ky=Mte(yC,"name"),Dte=ky&&(function(){}).name==="something",jte=ky&&(!$y||$y&&Nte(yC,"name").configurable),Cy={EXISTS:ky,PROPER:Dte,CONFIGURABLE:jte},Fte=Tn,vC=jn,Lte=ii,gC=Lu,Bte=vy,Ute=lC,bC=mC,zte=Cy.CONFIGURABLE,qte=bC.get,Hte=bC.enforce,Vte=String(String).split("String");(cC.exports=function(e,t,n,r){var o=r?!!r.unsafe:!1,i=r?!!r.enumerable:!1,a=r?!!r.noTargetGet:!1,s=r&&r.name!==void 0?r.name:t,c;if(vC(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Lte(n,"name")||zte&&n.name!==s)&&gC(n,"name",s),c=Hte(n),c.source||(c.source=Vte.join(typeof s=="string"?s:""))),e===Fte){i?e[t]=n:Bte(t,n);return}else o?!a&&e[t]&&(i=!0):delete e[t];i?e[t]=n:gC(e,t,n)})(Function.prototype,"toString",function(){return vC(this)&&qte(this).source||Ute(this)});var Hs=cC.exports,wC={},Wte=Math.ceil,Kte=Math.floor,zu=function(e){var t=+e;return t!==t||t===0?0:(t>0?Kte:Wte)(t)},Gte=zu,Zte=Math.max,Yte=Math.min,Jte=function(e,t){var n=Gte(e);return n<0?Zte(n+t,0):Yte(n,t)},Xte=zu,Qte=Math.min,xC=function(e){return e>0?Qte(Xte(e),9007199254740991):0},ene=xC,tne=function(e){return ene(e.length)},nne=dy,rne=Jte,one=tne,SC=function(e){return function(t,n,r){var o=nne(t),i=one(o),a=rne(r,i),s;if(e&&n!=n){for(;i>a;)if(s=o[a++],s!=s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===n)return e||a||0;return!e&&-1}},ine={includes:SC(!0),indexOf:SC(!1)},Oy=ii,ane=dy,sne=ine.indexOf,cne=Sy,EC=function(e,t){var n=ane(e),r=0,o=[],i;for(i in n)!Oy(cne,i)&&Oy(n,i)&&o.push(i);for(;t.length>r;)Oy(n,i=t[r++])&&(~sne(o,i)||o.push(i));return o},Ty=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],lne=EC,une=Ty,fne=une.concat("length","prototype");wC.f=Object.getOwnPropertyNames||function(t){return lne(t,fne)};var _C={};_C.f=Object.getOwnPropertySymbols;var dne=ju,pne=wC,hne=_C,mne=Co,yne=dne("Reflect","ownKeys")||function(t){var n=pne.f(mne(t)),r=hne.f;return r?n.concat(r(t)):n},vne=ii,gne=yne,bne=uy,wne=zs,xne=function(e,t){for(var n=gne(t),r=wne.f,o=bne.f,i=0;i<n.length;i++){var a=n[i];vne(e,a)||r(e,a,o(t,a))}},Sne=Xn,Ene=jn,_ne=/#|\.prototype\./,Vs=function(e,t){var n=kne[$ne(e)];return n==One?!0:n==Cne?!1:Ene(t)?Sne(t):!!t},$ne=Vs.normalize=function(e){return String(e).replace(_ne,".").toLowerCase()},kne=Vs.data={},Cne=Vs.NATIVE="N",One=Vs.POLYFILL="P",Tne=Vs,Ay=Tn,Ane=uy.f,Pne=Lu,Ine=Hs,Rne=vy,Mne=xne,Nne=Tne,Dne=function(e,t){var n=e.target,r=e.global,o=e.stat,i,a,s,c,l,u;if(r?a=Ay:o?a=Ay[n]||Rne(n,{}):a=(Ay[n]||{}).prototype,a)for(s in t){if(l=t[s],e.noTargetGet?(u=Ane(a,s),c=u&&u.value):c=a[s],i=Nne(r?s:n+(o?".":"#")+s,e.forced),!i&&c!==void 0){if(typeof l==typeof c)continue;Mne(l,c)}(e.sham||c&&c.sham)&&Pne(l,"sham",!0),Ine(a,s,l,e)}},jne=Us,Fne=jne("toStringTag"),$C={};$C[Fne]="z";var Py=String($C)==="[object z]",Lne=Py,Bne=jn,qu=fy,Une=Us,zne=Une("toStringTag"),qne=qu(function(){return arguments}())=="Arguments",Hne=function(e,t){try{return e[t]}catch{}},kC=Lne?qu:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=Hne(t=Object(e),zne))=="string"?n:qne?qu(t):(r=qu(t))=="Object"&&Bne(t.callee)?"Arguments":r},Vne=kC,Hu=function(e){if(Vne(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},Wne=Co,CC=function(){var e=Wne(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Iy={},OC=Xn,Kne=Tn,TC=Kne.RegExp;Iy.UNSUPPORTED_Y=OC(function(){var e=TC("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),Iy.BROKEN_CARET=OC(function(){var e=TC("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var Gne=EC,Zne=Ty,Yne=Object.keys||function(t){return Gne(t,Zne)},Jne=oi,Xne=zs,Qne=Co,ere=Yne,tre=Jne?Object.defineProperties:function(t,n){Qne(t);for(var r=ere(n),o=r.length,i=0,a;o>i;)Xne.f(t,a=r[i++],n[a]);return t},nre=ju,rre=nre("document","documentElement"),ore=Co,ire=tre,AC=Ty,are=Sy,sre=rre,cre=rC,lre=dC,PC=">",IC="<",Ry="prototype",My="script",RC=lre("IE_PROTO"),Ny=function(){},MC=function(e){return IC+My+PC+e+IC+"/"+My+PC},NC=function(e){e.write(MC("")),e.close();var t=e.parentWindow.Object;return e=null,t},ure=function(){var e=cre("iframe"),t="java"+My+":",n;return e.style.display="none",sre.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(MC("document.F=Object")),n.close(),n.F},Vu,Wu=function(){try{Vu=new ActiveXObject("htmlfile")}catch{}Wu=typeof document<"u"?document.domain&&Vu?NC(Vu):ure():NC(Vu);for(var e=AC.length;e--;)delete Wu[Ry][AC[e]];return Wu()};are[RC]=!0;var fre=Object.create||function(t,n){var r;return t!==null?(Ny[Ry]=ore(t),r=new Ny,Ny[Ry]=null,r[RC]=t):r=Wu(),n===void 0?r:ire(r,n)},dre=Xn,pre=Tn,hre=pre.RegExp,mre=dre(function(){var e=hre(".","s");return!(e.dotAll&&e.exec(`
350
- `)&&e.flags==="s")}),yre=Xn,vre=Tn,gre=vre.RegExp,bre=yre(function(){var e=gre("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),wre=Hu,xre=CC,DC=Iy,Sre=by,Ere=fre,_re=mC.get,$re=mre,kre=bre,Ku=RegExp.prototype.exec,Cre=Sre("native-string-replace",String.prototype.replace),Dy=Ku,jy=function(){var e=/a/,t=/b*/g;return Ku.call(e,"a"),Ku.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),jC=DC.UNSUPPORTED_Y||DC.BROKEN_CARET,Fy=/()??/.exec("")[1]!==void 0,Ore=jy||Fy||jC||$re||kre;Ore&&(Dy=function(t){var n=this,r=_re(n),o=wre(t),i=r.raw,a,s,c,l,u,f,p;if(i)return i.lastIndex=n.lastIndex,a=Dy.call(i,o),n.lastIndex=i.lastIndex,a;var d=r.groups,h=jC&&n.sticky,m=xre.call(n),v=n.source,y=0,g=o;if(h&&(m=m.replace("y",""),m.indexOf("g")===-1&&(m+="g"),g=o.slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&o.charAt(n.lastIndex-1)!==`
351
- `)&&(v="(?: "+v+")",g=" "+g,y++),s=new RegExp("^(?:"+v+")",m)),Fy&&(s=new RegExp("^"+v+"$(?!\\s)",m)),jy&&(c=n.lastIndex),l=Ku.call(h?s:n,g),h?l?(l.input=l.input.slice(y),l[0]=l[0].slice(y),l.index=n.lastIndex,n.lastIndex+=l[0].length):n.lastIndex=0:jy&&l&&(n.lastIndex=n.global?l.index+l[0].length:c),Fy&&l&&l.length>1&&Cre.call(l[0],s,function(){for(u=1;u<arguments.length-2;u++)arguments[u]===void 0&&(l[u]=void 0)}),l&&d)for(l.groups=f=Ere(null),u=0;u<d.length;u++)p=d[u],f[p[0]]=l[p[1]];return l});var Ly=Dy,Tre=Dne,FC=Ly;Tre({target:"RegExp",proto:!0,forced:/./.exec!==FC},{exec:FC});var LC=Hs,Are=Ly,BC=Xn,UC=Us,Pre=Lu,Ire=UC("species"),By=RegExp.prototype,Rre=function(e,t,n,r){var o=UC(e),i=!BC(function(){var l={};return l[o]=function(){return 7},""[e](l)!=7}),a=i&&!BC(function(){var l=!1,u=/a/;return e==="split"&&(u={},u.constructor={},u.constructor[Ire]=function(){return u},u.flags="",u[o]=/./[o]),u.exec=function(){return l=!0,null},u[o](""),!l});if(!i||!a||n){var s=/./[o],c=t(o,""[e],function(l,u,f,p,d){var h=u.exec;return h===Are||h===By.exec?i&&!d?{done:!0,value:s.call(u,f,p)}:{done:!0,value:l.call(f,u,p)}:{done:!1}});LC(String.prototype,e,c[0]),LC(By,o,c[1])}r&&Pre(By[o],"sham",!0)},Mre=zu,Nre=Hu,Dre=Du,zC=function(e){return function(t,n){var r=Nre(Dre(t)),o=Mre(n),i=r.length,a,s;return o<0||o>=i?e?"":void 0:(a=r.charCodeAt(o),a<55296||a>56319||o+1===i||(s=r.charCodeAt(o+1))<56320||s>57343?e?r.charAt(o):a:e?r.slice(o,o+2):(a-55296<<10)+(s-56320)+65536)}},jre={codeAt:zC(!1),charAt:zC(!0)},Fre=jre.charAt,Lre=function(e,t,n){return t+(n?Fre(e,t).length:1)},Bre=Zk,Ure=Math.floor,zre="".replace,qre=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Hre=/\$([$&'`]|\d{1,2})/g,Vre=function(e,t,n,r,o,i){var a=n+e.length,s=r.length,c=Hre;return o!==void 0&&(o=Bre(o),c=qre),zre.call(i,c,function(l,u){var f;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(a);case"<":f=o[u.slice(1,-1)];break;default:var p=+u;if(p===0)return l;if(p>s){var d=Ure(p/10);return d===0?l:d<=s?r[d-1]===void 0?u.charAt(1):r[d-1]+u.charAt(1):l}f=r[p-1]}return f===void 0?"":f})},Wre=Co,Kre=jn,Gre=fy,Zre=Ly,Yre=function(e,t){var n=e.exec;if(Kre(n)){var r=n.call(e,t);return r!==null&&Wre(r),r}if(Gre(e)==="RegExp")return Zre.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},Jre=Rre,Xre=Xn,Qre=Co,eoe=jn,toe=zu,noe=xC,ua=Hu,roe=Du,ooe=Lre,ioe=Hk,aoe=Vre,soe=Yre,coe=Us,Uy=coe("replace"),loe=Math.max,uoe=Math.min,foe=function(e){return e===void 0?e:String(e)},doe=function(){return"a".replace(/./,"$0")==="$0"}(),qC=function(){return/./[Uy]?/./[Uy]("a","$0")==="":!1}(),poe=!Xre(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});Jre("replace",function(e,t,n){var r=qC?"$":"$0";return[function(i,a){var s=roe(this),c=i==null?void 0:ioe(i,Uy);return c?c.call(i,s,a):t.call(ua(s),i,a)},function(o,i){var a=Qre(this),s=ua(o);if(typeof i=="string"&&i.indexOf(r)===-1&&i.indexOf("$<")===-1){var c=n(t,a,s,i);if(c.done)return c.value}var l=eoe(i);l||(i=ua(i));var u=a.global;if(u){var f=a.unicode;a.lastIndex=0}for(var p=[];;){var d=soe(a,s);if(d===null||(p.push(d),!u))break;var h=ua(d[0]);h===""&&(a.lastIndex=ooe(s,noe(a.lastIndex),f))}for(var m="",v=0,y=0;y<p.length;y++){d=p[y];for(var g=ua(d[0]),b=loe(uoe(toe(d.index),s.length),0),k=[],S=1;S<d.length;S++)k.push(foe(d[S]));var $=d.groups;if(l){var T=[g].concat(k,b,s);$!==void 0&&T.push($);var R=ua(i.apply(void 0,T))}else R=aoe(g,s,b,k,$,i);b>=v&&(m+=s.slice(v,b)+R,v=b+g.length)}return m+s.slice(v)}]},!poe||!doe||qC);var Ws=It,hoe=Bh,moe=Qo,Gu=function(e){return hoe.slice(0,e.length)===e},yoe=function(){return Gu("Bun/")?"BUN":Gu("Cloudflare-Workers")?"CLOUDFLARE":Gu("Deno/")?"DENO":Gu("Node.js/")?"NODE":Ws.Bun&&typeof Bun.version=="string"?"BUN":Ws.Deno&&typeof Deno.version=="object"?"DENO":moe(Ws.process)==="process"?"NODE":Ws.window&&Ws.document?"BROWSER":"REST"}(),voe=TypeError,goe=function(e,t){if(e<t)throw new voe("Not enough arguments");return e},HC=It,boe=Ah,woe=rn,xoe=yoe,Soe=Bh,Eoe=gu,_oe=goe,$oe=HC.Function,koe=/MSIE .\./.test(Soe)||xoe==="BUN"&&function(){var e=HC.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),VC=function(e,t){var n=t?2:1;return koe?function(r,o){var i=_oe(arguments.length,1)>n,a=woe(r)?r:$oe(r),s=i?Eoe(arguments,n):[],c=i?function(){boe(a,this,s)}:a;return t?e(c,o):e(c)}:e},Coe=at,WC=It,Ooe=VC,KC=Ooe(WC.setInterval,!0);Coe({global:!0,bind:!0,forced:WC.setInterval!==KC},{setInterval:KC});var Toe=at,GC=It,Aoe=VC,ZC=Aoe(GC.setTimeout,!0);Toe({global:!0,bind:!0,forced:GC.setTimeout!==ZC},{setTimeout:ZC});var Poe=Kt,Ioe=Poe.setInterval,Roe=Ioe;const Moe=Ue(Roe);var Noe=Rt,YC=function(e,t){var n=[][e];return!!n&&Noe(function(){n.call(null,t||function(){return 1},1)})},Doe=at,joe=Ih,Foe=w_.indexOf,Loe=YC,zy=joe([].indexOf),JC=!!zy&&1/zy([1],1,-0)<0,Boe=JC||!Loe("indexOf");Doe({target:"Array",proto:!0,forced:Boe},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return JC?zy(this,t,n)||0:Foe(this,t,n)}});var Uoe=ri,zoe=Uoe("Array","indexOf"),qoe=Hr,Hoe=zoe,qy=Array.prototype,Voe=function(e){var t=e.indexOf;return e===qy||qoe(qy,e)&&t===qy.indexOf?Hoe:t},Woe=Voe,Koe=Woe,Goe=Koe;const Zoe=Ue(Goe);var XC=au,Yoe=TypeError,Joe=function(e,t){if(!delete e[t])throw new Yoe("Cannot delete property "+XC(t)+" of "+XC(e))},Xoe=at,Qoe=Vr,eie=um,tie=lu,nie=ei,rie=rk,oie=om,iie=lm,aie=ks,Hy=Joe,sie=fu,cie=sie("splice"),lie=Math.max,uie=Math.min;Xoe({target:"Array",proto:!0,forced:!cie},{splice:function(t,n){var r=Qoe(this),o=nie(r),i=eie(t,o),a=arguments.length,s,c,l,u,f,p;for(a===0?s=c=0:a===1?(s=0,c=o-i):(s=a-2,c=uie(lie(tie(n),0),o-i)),oie(o+s-c),l=iie(r,c),u=0;u<c;u++)f=i+u,f in r&&aie(l,u,r[f]);if(l.length=c,s<c){for(u=i;u<o-c;u++)f=u+c,p=u+s,f in r?r[p]=r[f]:Hy(r,p);for(u=o;u>o-c+s;u--)Hy(r,u-1)}else if(s>c)for(u=o-c;u>i;u--)f=u+c-1,p=u+s-1,f in r?r[p]=r[f]:Hy(r,p);for(u=0;u<s;u++)r[u+i]=arguments[u+2];return rie(r,o-c+s),l}});var fie=ri,die=fie("Array","splice"),pie=Hr,hie=die,Vy=Array.prototype,mie=function(e){var t=e.splice;return e===Vy||pie(Vy,e)&&t===Vy.splice?hie:t},yie=mie,vie=yie,gie=vie;const bie=Ue(gie);var wie=ri,xie=wie("Array","concat"),Sie=Hr,Eie=xie,Wy=Array.prototype,_ie=function(e){var t=e.concat;return e===Wy||Sie(Wy,e)&&t===Wy.concat?Eie:t},$ie=_ie,kie=$ie,Cie=kie;const bt=Ue(Cie);var Oie=at,Tie=Mt,QC=Date,Aie=Tie(QC.prototype.getTime);Oie({target:"Date",stat:!0},{now:function(){return Aie(new QC)}});var Pie=Kt,Iie=Pie.Date.now,Rie=Iie,Mie=Rie,Nie=Mie;const Oo=Ue(Nie);var Die=Sm.forEach,jie=YC,Fie=jie("forEach"),Lie=Fie?[].forEach:function(t){return Die(this,t,arguments.length>1?arguments[1]:void 0)},Bie=at,eO=Lie;Bie({target:"Array",proto:!0,forced:[].forEach!==eO},{forEach:eO});var Uie=ri,zie=Uie("Array","forEach"),qie=zie,Hie=qie,Vie=Cs,Wie=On,Kie=Hr,Gie=Hie,Ky=Array.prototype,Zie={DOMTokenList:!0,NodeList:!0},Yie=function(e){var t=e.forEach;return e===Ky||Kie(Ky,e)&&t===Ky.forEach||Wie(Zie,Vie(e))?Gie:t},Jie=Yie;const Zu=Ue(Jie);var Xie=at,Qie=Vr,tO=pm,eae=Rt,tae=eae(function(){tO(1)});Xie({target:"Object",stat:!0,forced:tae},{keys:function(t){return tO(Qie(t))}});var nae=Kt,rae=nae.Object.keys,oae=rae,iae=oae,aae=iae;const sae=Ue(aae);var cae=Kt,lae=cae.Object.getOwnPropertySymbols,uae=lae,fae=uae,dae=fae;const nO=Ue(dae);var pae=at,hae=Sm.filter,mae=fu,yae=mae("filter");pae({target:"Array",proto:!0,forced:!yae},{filter:function(t){return hae(this,t,arguments.length>1?arguments[1]:void 0)}});var vae=ri,gae=vae("Array","filter"),bae=Hr,wae=gae,Gy=Array.prototype,xae=function(e){var t=e.filter;return e===Gy||bae(Gy,e)&&t===Gy.filter?wae:t},Sae=xae,Eae=Sae,_ae=Eae;const $ae=Ue(_ae);var rO={exports:{}},kae=at,Cae=Rt,Oae=wr,oO=xs.f,iO=vn,Tae=!iO||Cae(function(){oO(1)});kae({target:"Object",stat:!0,forced:Tae,sham:!iO},{getOwnPropertyDescriptor:function(t,n){return oO(Oae(t),n)}});var Aae=Kt,aO=Aae.Object,Pae=rO.exports=function(t,n){return aO.getOwnPropertyDescriptor(t,n)};aO.getOwnPropertyDescriptor.sham&&(Pae.sham=!0);var Iae=rO.exports,Rae=Iae,Mae=Rae,Nae=Mae;const sO=Ue(Nae);var Dae=xr,jae=Mt,Fae=vu,Lae=bu,Bae=_o,Uae=jae([].concat),zae=Dae("Reflect","ownKeys")||function(t){var n=Fae.f(Bae(t)),r=Lae.f;return r?Uae(n,r(t)):n},qae=at,Hae=vn,Vae=zae,Wae=wr,Kae=xs,Gae=ks;qae({target:"Object",stat:!0,sham:!Hae},{getOwnPropertyDescriptors:function(t){for(var n=Wae(t),r=Kae.f,o=Vae(n),i={},a=0,s,c;o.length>a;)c=r(n,s=o[a++]),c!==void 0&&Gae(i,s,c);return i}});var Zae=Kt,Yae=Zae.Object.getOwnPropertyDescriptors,Jae=Yae,Xae=Jae,Qae=Xae;const cO=Ue(Qae);var lO={exports:{}},ese=at,tse=vn,uO=du.f;ese({target:"Object",stat:!0,forced:Object.defineProperties!==uO,sham:!tse},{defineProperties:uO});var nse=Kt,fO=nse.Object,rse=lO.exports=function(t,n){return fO.defineProperties(t,n)};fO.defineProperties.sham&&(rse.sham=!0);var ose=lO.exports,ise=ose,ase=ise,sse=ase;const cse=Ue(sse);var lse=Ak;const use=Ue(lse);var fse=!1;function dse(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function pse(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var hse=function(){function e(n){var r=this;this._insertTag=function(o){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,i),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!fse:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(pse(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=dse(o);try{i.insertRule(r,i.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e}(),on="-ms-",Yu="-moz-",Je="-webkit-",dO="comm",Zy="rule",Yy="decl",mse="@import",pO="@keyframes",yse="@layer",vse=Math.abs,Ju=String.fromCharCode,gse=Object.assign;function bse(e,t){return Gt(e,0)^45?(((t<<2^Gt(e,0))<<2^Gt(e,1))<<2^Gt(e,2))<<2^Gt(e,3):0}function hO(e){return e.trim()}function wse(e,t){return(e=t.exec(e))?e[0]:e}function Xe(e,t,n){return e.replace(t,n)}function Jy(e,t){return e.indexOf(t)}function Gt(e,t){return e.charCodeAt(t)|0}function Ks(e,t,n){return e.slice(t,n)}function $r(e){return e.length}function Xy(e){return e.length}function Xu(e,t){return t.push(e),e}function xse(e,t){return e.map(t).join("")}var Qu=1,fa=1,mO=0,bn=0,kt=0,da="";function ef(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Qu,column:fa,length:a,return:""}}function Gs(e,t){return gse(ef("",null,null,"",null,null,0),e,{length:-e.length},t)}function Sse(){return kt}function Ese(){return kt=bn>0?Gt(da,--bn):0,fa--,kt===10&&(fa=1,Qu--),kt}function An(){return kt=bn<mO?Gt(da,bn++):0,fa++,kt===10&&(fa=1,Qu++),kt}function kr(){return Gt(da,bn)}function tf(){return bn}function Zs(e,t){return Ks(da,e,t)}function Ys(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function yO(e){return Qu=fa=1,mO=$r(da=e),bn=0,[]}function vO(e){return da="",e}function nf(e){return hO(Zs(bn-1,Qy(e===91?e+2:e===40?e+1:e)))}function _se(e){for(;(kt=kr())&&kt<33;)An();return Ys(e)>2||Ys(kt)>3?"":" "}function $se(e,t){for(;--t&&An()&&!(kt<48||kt>102||kt>57&&kt<65||kt>70&&kt<97););return Zs(e,tf()+(t<6&&kr()==32&&An()==32))}function Qy(e){for(;An();)switch(kt){case e:return bn;case 34:case 39:e!==34&&e!==39&&Qy(kt);break;case 40:e===41&&Qy(e);break;case 92:An();break}return bn}function kse(e,t){for(;An()&&e+kt!==47+10;)if(e+kt===42+42&&kr()===47)break;return"/*"+Zs(t,bn-1)+"*"+Ju(e===47?e:An())}function Cse(e){for(;!Ys(kr());)An();return Zs(e,bn)}function Ose(e){return vO(rf("",null,null,null,[""],e=yO(e),0,[0],e))}function rf(e,t,n,r,o,i,a,s,c){for(var l=0,u=0,f=a,p=0,d=0,h=0,m=1,v=1,y=1,g=0,b="",k=o,S=i,$=r,T=b;v;)switch(h=g,g=An()){case 40:if(h!=108&&Gt(T,f-1)==58){Jy(T+=Xe(nf(g),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:T+=nf(g);break;case 9:case 10:case 13:case 32:T+=_se(h);break;case 92:T+=$se(tf()-1,7);continue;case 47:switch(kr()){case 42:case 47:Xu(Tse(kse(An(),tf()),t,n),c);break;default:T+="/"}break;case 123*m:s[l++]=$r(T)*y;case 125*m:case 59:case 0:switch(g){case 0:case 125:v=0;case 59+u:y==-1&&(T=Xe(T,/\f/g,"")),d>0&&$r(T)-f&&Xu(d>32?bO(T+";",r,n,f-1):bO(Xe(T," ","")+";",r,n,f-2),c);break;case 59:T+=";";default:if(Xu($=gO(T,t,n,l,u,o,s,b,k=[],S=[],f),i),g===123)if(u===0)rf(T,t,$,$,k,i,f,s,S);else switch(p===99&&Gt(T,3)===110?100:p){case 100:case 108:case 109:case 115:rf(e,$,$,r&&Xu(gO(e,$,$,0,0,o,s,b,o,k=[],f),S),o,S,f,s,r?k:S);break;default:rf(T,$,$,$,[""],S,0,s,S)}}l=u=d=0,m=y=1,b=T="",f=a;break;case 58:f=1+$r(T),d=h;default:if(m<1){if(g==123)--m;else if(g==125&&m++==0&&Ese()==125)continue}switch(T+=Ju(g),g*m){case 38:y=u>0?1:(T+="\f",-1);break;case 44:s[l++]=($r(T)-1)*y,y=1;break;case 64:kr()===45&&(T+=nf(An())),p=kr(),u=f=$r(b=T+=Cse(tf())),g++;break;case 45:h===45&&$r(T)==2&&(m=0)}}return i}function gO(e,t,n,r,o,i,a,s,c,l,u){for(var f=o-1,p=o===0?i:[""],d=Xy(p),h=0,m=0,v=0;h<r;++h)for(var y=0,g=Ks(e,f+1,f=vse(m=a[h])),b=e;y<d;++y)(b=hO(m>0?p[y]+" "+g:Xe(g,/&\f/g,p[y])))&&(c[v++]=b);return ef(e,t,n,o===0?Zy:s,c,l,u)}function Tse(e,t,n){return ef(e,t,n,dO,Ju(Sse()),Ks(e,2,-2),0)}function bO(e,t,n,r){return ef(e,t,n,Yy,Ks(e,0,r),Ks(e,r+1,-1),r)}function pa(e,t){for(var n="",r=Xy(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Ase(e,t,n,r){switch(e.type){case yse:if(e.children.length)break;case mse:case Yy:return e.return=e.return||e.value;case dO:return"";case pO:return e.return=e.value+"{"+pa(e.children,r)+"}";case Zy:e.value=e.props.join(",")}return $r(n=pa(e.children,r))?e.return=e.value+"{"+n+"}":""}function Pse(e){var t=Xy(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}function Ise(e){return function(t){t.root||(t=t.return)&&e(t)}}function Rse(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Mse=function(t,n,r){for(var o=0,i=0;o=i,i=kr(),o===38&&i===12&&(n[r]=1),!Ys(i);)An();return Zs(t,bn)},Nse=function(t,n){var r=-1,o=44;do switch(Ys(o)){case 0:o===38&&kr()===12&&(n[r]=1),t[r]+=Mse(bn-1,n,r);break;case 2:t[r]+=nf(o);break;case 4:if(o===44){t[++r]=kr()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Ju(o)}while(o=An());return t},Dse=function(t,n){return vO(Nse(yO(t),n))},wO=new WeakMap,jse=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!wO.get(r))&&!o){wO.set(t,!0);for(var i=[],a=Dse(n,i),s=r.props,c=0,l=0;c<a.length;c++)for(var u=0;u<s.length;u++,l++)t.props[l]=i[c]?a[c].replace(/&\f/g,s[u]):s[u]+" "+a[c]}}},Fse=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function xO(e,t){switch(bse(e,t)){case 5103:return Je+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Je+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Je+e+Yu+e+on+e+e;case 6828:case 4268:return Je+e+on+e+e;case 6165:return Je+e+on+"flex-"+e+e;case 5187:return Je+e+Xe(e,/(\w+).+(:[^]+)/,Je+"box-$1$2"+on+"flex-$1$2")+e;case 5443:return Je+e+on+"flex-item-"+Xe(e,/flex-|-self/,"")+e;case 4675:return Je+e+on+"flex-line-pack"+Xe(e,/align-content|flex-|-self/,"")+e;case 5548:return Je+e+on+Xe(e,"shrink","negative")+e;case 5292:return Je+e+on+Xe(e,"basis","preferred-size")+e;case 6060:return Je+"box-"+Xe(e,"-grow","")+Je+e+on+Xe(e,"grow","positive")+e;case 4554:return Je+Xe(e,/([^-])(transform)/g,"$1"+Je+"$2")+e;case 6187:return Xe(Xe(Xe(e,/(zoom-|grab)/,Je+"$1"),/(image-set)/,Je+"$1"),e,"")+e;case 5495:case 3959:return Xe(e,/(image-set\([^]*)/,Je+"$1$`$1");case 4968:return Xe(Xe(e,/(.+:)(flex-)?(.*)/,Je+"box-pack:$3"+on+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Je+e+e;case 4095:case 3583:case 4068:case 2532:return Xe(e,/(.+)-inline(.+)/,Je+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if($r(e)-1-t>6)switch(Gt(e,t+1)){case 109:if(Gt(e,t+4)!==45)break;case 102:return Xe(e,/(.+:)(.+)-([^]+)/,"$1"+Je+"$2-$3$1"+Yu+(Gt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Jy(e,"stretch")?xO(Xe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Gt(e,t+1)!==115)break;case 6444:switch(Gt(e,$r(e)-3-(~Jy(e,"!important")&&10))){case 107:return Xe(e,":",":"+Je)+e;case 101:return Xe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Je+(Gt(e,14)===45?"inline-":"")+"box$3$1"+Je+"$2$3$1"+on+"$2box$3")+e}break;case 5936:switch(Gt(e,t+11)){case 114:return Je+e+on+Xe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Je+e+on+Xe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Je+e+on+Xe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Je+e+on+e+e}return e}var Lse=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case Yy:t.return=xO(t.value,t.length);break;case pO:return pa([Gs(t,{value:Xe(t.value,"@","@"+Je)})],o);case Zy:if(t.length)return xse(t.props,function(i){switch(wse(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return pa([Gs(t,{props:[Xe(i,/:(read-\w+)/,":"+Yu+"$1")]})],o);case"::placeholder":return pa([Gs(t,{props:[Xe(i,/:(plac\w+)/,":"+Je+"input-$1")]}),Gs(t,{props:[Xe(i,/:(plac\w+)/,":"+Yu+"$1")]}),Gs(t,{props:[Xe(i,/:(plac\w+)/,on+"input-$1")]})],o)}return""})}},Bse=[Lse],Use=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var v=m.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var o=t.stylisPlugins||Bse,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var v=m.getAttribute("data-emotion").split(" "),y=1;y<v.length;y++)i[v[y]]=!0;s.push(m)});var c,l=[jse,Fse];{var u,f=[Ase,Ise(function(m){u.insert(m)})],p=Pse(l.concat(o,f)),d=function(v){return pa(Ose(v),p)};c=function(v,y,g,b){u=g,d(v?v+"{"+y.styles+"}":y.styles),b&&(h.inserted[y.name]=!0)}}var h={key:n,sheet:new hse({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:c};return h.sheet.hydrate(s),h};function zse(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var qse={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Hse=!1,Vse=/[A-Z]|^ms/g,Wse=/_EMO_([^_]+?)_([^]*?)_EMO_/g,SO=function(t){return t.charCodeAt(1)===45},EO=function(t){return t!=null&&typeof t!="boolean"},ev=Rse(function(e){return SO(e)?e:e.replace(Vse,"-$&").toLowerCase()}),_O=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Wse,function(r,o,i){return Cr={name:o,styles:i,next:Cr},o})}return qse[t]!==1&&!SO(t)&&typeof n=="number"&&n!==0?n+"px":n},Kse="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Js(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return Cr={name:o.name,styles:o.styles,next:Cr},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Cr={name:a.name,styles:a.styles,next:Cr},a=a.next;var s=i.styles+";";return s}return Gse(e,t,n)}case"function":{if(e!==void 0){var c=Cr,l=n(e);return Cr=c,Js(e,t,l)}break}}var u=n;if(t==null)return u;var f=t[u];return f!==void 0?f:u}function Gse(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Js(e,t,n[o])+";";else for(var i in n){var a=n[i];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?r+=i+"{"+t[s]+"}":EO(s)&&(r+=ev(i)+":"+_O(i,s)+";")}else{if(i==="NO_COMPONENT_SELECTOR"&&Hse)throw new Error(Kse);if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var c=0;c<a.length;c++)EO(a[c])&&(r+=ev(i)+":"+_O(i,a[c])+";");else{var l=Js(e,t,a);switch(i){case"animation":case"animationName":{r+=ev(i)+":"+l+";";break}default:r+=i+"{"+l+"}"}}}}return r}var $O=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Cr;function tv(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";Cr=void 0;var i=e[0];if(i==null||i.raw===void 0)r=!1,o+=Js(n,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=Js(n,t,e[s]),r){var c=i;o+=c[s]}$O.lastIndex=0;for(var l="",u;(u=$O.exec(o))!==null;)l+="-"+u[1];var f=zse(o)+l;return{name:f,styles:o,next:Cr}}var Zse=!0;function kO(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var Yse=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||Zse===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},Jse=function(t,n,r){Yse(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function CO(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function OO(e,t,n){var r=[],o=kO(e,r,n);return r.length<2?n:o+t(r)}var Xse=function(t){var n=Use(t);n.sheet.speedy=function(s){if(process.env.NODE_ENV!=="production"&&this.ctr!==0)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=s},n.compat=!0;var r=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var f=tv(l,n.registered,void 0);return Jse(n,f,!1),n.key+"-"+f.name},o=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var f=tv(l,n.registered),p="animation-"+f.name;return CO(n,{name:f.name,styles:"@keyframes "+p+"{"+f.styles+"}"}),p},i=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var f=tv(l,n.registered);CO(n,f)},a=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];return OO(n.registered,r,Qse(l))};return{css:r,cx:a,injectGlobal:i,keyframes:o,hydrate:function(c){c.forEach(function(l){n.inserted[l]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:kO.bind(null,n.registered),merge:OO.bind(null,n.registered,r)}},Qse=function e(t){for(var n="",r=0;r<t.length;r++){var o=t[r];if(o!=null){var i=void 0;switch(typeof o){case"boolean":break;case"object":{if(Array.isArray(o))i=e(o);else{i="";for(var a in o)o[a]&&a&&(i&&(i+=" "),i+=a)}break}default:i=o}i&&(n&&(n+=" "),n+=i)}}return n},ece=Hs,nv=Date.prototype,TO="Invalid Date",AO="toString",tce=nv[AO],nce=nv.getTime;String(new Date(NaN))!=TO&&ece(nv,AO,function(){var t=nce.call(this);return t===t?tce.call(this):TO});var rce=Py,oce=kC,ice=rce?{}.toString:function(){return"[object "+oce(this)+"]"},ace=Py,sce=Hs,cce=ice;ace||sce(Object.prototype,"toString",cce,{unsafe:!0});var lce=Cy.PROPER,uce=Hs,fce=Co,PO=Hu,dce=Xn,pce=CC,rv="toString",IO=RegExp.prototype,RO=IO[rv],hce=dce(function(){return RO.call({source:"a",flags:"b"})!="/a/b"}),mce=lce&&RO.name!=rv;(hce||mce)&&uce(RegExp.prototype,rv,function(){var t=fce(this),n=PO(t.source),r=t.flags,o=PO(r===void 0&&t instanceof RegExp&&!("flags"in IO)?pce.call(t):r);return"/"+n+"/"+o},{unsafe:!0});var MO=typeof window<"u"?window:self,yce=MO.crypto||MO.msCrypto,vce=function(e){if(!e)return Math.random;var t=Math.pow(2,32),n=new Uint32Array(1);return function(){return e.getRandomValues(n)[0]/t}}(yce);const gce=Ue(vce);function bce(){return gce().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var wce=s_;const NO=Ue(wce);function rt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",n="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(n+=" color: ".concat(t,";")),[n,""]}function DO(e,t){for(var n,r,o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];return bt(n=[bt(r="%c".concat(e,"%c ")).call(r,t)]).call(n,We(rt("green","white")),i)}function xce(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.force,r=n===void 0?!1:n;return r?function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];if(i.length){var s=i,c=Er(s,1),l=c[0];typeof l=="function"&&(i=l());var u=NO(i[0])?i:[i],f=u.length===1;Zu(u).call(u,function(p,d){if(f){var h,m;(h=console).log.apply(h,We(DO.apply(void 0,bt(m=[e]).call(m,We(p)))))}else if(d){var v;(v=console).log.apply(v,We(NO(p)?p:[p]))}else{var y,g;(y=console).groupCollapsed.apply(y,We(DO.apply(void 0,bt(g=[e]).call(g,We(p)))))}}),f||console.groupEnd()}}:function(){return 0}}var Sce=oi,Ece=Cy.EXISTS,_ce=zs.f,jO=Function.prototype,$ce=jO.toString,kce=/^\s*function ([^ (]*)/,Cce="name";Sce&&!Ece&&_ce(jO,Cce,{configurable:!0,get:function(){try{return $ce.call(this).match(kce)[1]}catch{return""}}});var Oce=Kt,Tce=Oce.setTimeout,Ace=Tce;const Pce=Ue(Ace);function Ice(e,t){if(!t)return e;var n=0,r=null;return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=Oo();s-n>t?(e.apply(void 0,i),n=s):(clearTimeout(r),r=Pce(function(){e.apply(void 0,i),n=Oo()},Math.max(0,t-s+n)))}}var FO=function(t){var n=t.debounce,r=t.name,o=t.onEvent,i=t.target,a=E.useRef();a.current=o;var s=E.useMemo(function(){return Ice(function(l){var u=a.current;u&&u(l)},n)},[n,a]),c=E.useCallback(function(l){l.timeStampLow=Oo(),s(l)},[s]);return E.useLayoutEffect(function(){return i.addEventListener(r,c,{passive:!0}),c({target:i,type:r}),function(){return i.removeEventListener(r,c)}},[r,c,i]),!1};FO.defaultProps={debounce:200};var Rce=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},Mce=at,Nce=Rce;Mce({target:"Math",stat:!0},{sign:Nce});var Dce=Kt,jce=Dce.Math.sign,Fce=jce,Lce=Fce,Bce=Lce;const Uce=Ue(Bce);function zce(e,t){var n=Uce(t-e),r=Math.sqrt(Math.abs(t-e)),o=e+r*n;return n>0?Math.min(t,o):Math.max(t,o)}function qce(e,t,n,r){for(var o=e,i=0;i<r;i++)o=n(o,t);return o}var LO=function(t){var n=t.name,r=t.onEnd,o=t.target,i=t.value,a=E.useRef(),s=E.useCallback(function(l,u,f,p){var d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Oo();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(a.current),a.current=requestAnimationFrame(function(){if(o){var h=f==="100%"?o.scrollHeight-o.offsetHeight:f,m=qce(u,h,zce,(Oo()-d)/5);Math.abs(h-m)<1.5&&(m=h),o[l]=m,h===m?r&&r(!0):s(l,u,f,p+1,d)}}))},[a,r,o]),c=E.useCallback(function(){cancelAnimationFrame(a.current),r&&r(!1)},[r]);return E.useLayoutEffect(function(){return s(n,o[n],i,1),o?(o.addEventListener("pointerdown",c,{passive:!0}),o.addEventListener("wheel",c,{passive:!0}),function(){o.removeEventListener("pointerdown",c),o.removeEventListener("wheel",c),cancelAnimationFrame(a.current)}):function(){return cancelAnimationFrame(a.current)}},[s,a,c,n,o,i]),!1};LO.propTypes={name:Ze.string.isRequired,onEnd:Ze.func,target:Ze.any.isRequired,value:Ze.oneOfType([Ze.number,Ze.oneOf(["100%"])]).isRequired};function ov(e){var t=E.useState(e),n=Er(t,2),r=n[0],o=n[1],i=E.useRef(),a=E.useCallback(function(s){typeof s=="function"?a(function(c){return s=s(c),i.current=s,s}):(i.current=s,a(s))},[i]);return i.current=r,[r,o,i]}function BO(e,t){var n=sae(e);if(nO){var r=nO(e);t&&(r=$ae(r).call(r,function(o){return sO(e,o).enumerable})),n.push.apply(n,r)}return n}function UO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;Zu(r=BO(Object(n),!0)).call(r,function(i){eee(e,i,n[i])})}else if(cO)cse(e,cO(n));else{var o;Zu(o=BO(Object(n))).call(o,function(i){use(e,i,sO(n,i))})}}return e}var Hce=function(){return 1/0},zO=17,Vce="bottom",Qn="top",qO=1,Wce=34,HO={};function Kce(e,t){return e(),Moe(e,t)}function VO(e){var t=e.mode,n=e.target,r=n.offsetHeight,o=n.scrollHeight,i=n.scrollTop,a=o-i-r<qO,s=i<qO,c=t===Qn?s:a,l=t!==Qn?s:a;return{atBottom:a,atEnd:c,atStart:l,atTop:s}}function Xs(e,t){return e===(t===Qn?0:"100%")}var iv=function(t){var n=t.checkInterval,r=t.children,o=t.debounce,i=t.debug,a=t.initialScrollBehavior,s=t.mode,c=t.nonce,l=t.scroller,u=E.useMemo(function(){return xce("<ScrollToBottom>",{force:i})},[i]);s=s===Qn?Qn:Vce;var f=E.useRef(0),p=E.useRef(a),d=ov(s===Qn?0:"100%"),h=Er(d,3),m=h[0],v=h[1],y=h[2],g=ov(null),b=Er(g,3),k=b[0],S=b[1],$=b[2],T=E.useRef(0),R=E.useRef(0),B=E.useRef(0),O=E.useState(!0),M=Er(O,2),H=M[0],L=M[1],P=E.useState(!0),N=Er(P,2),j=N[0],W=N[1],V=E.useState(!0),D=Er(V,2),w=D[0],z=D[1],K=E.useState(!1),_=Er(K,2),J=_[0],ae=_[1],re=ov(!0),le=Er(re,3),pe=le[0],me=le[1],ce=le[2],Q=E.useRef([]),G=E.useCallback(function(q){var te=$.current;return Q.current.push(q),te&&q({scrollTop:te.scrollTop}),function(){var de=Q.current,Ie=Zoe(de).call(de,q);~Ie&&bie(de).call(de,Ie,1)}},[Q,$]),fe=E.useCallback(function(){var q=y.current;u(function(){var te;return bt(te=["%cSpineTo%c: %conEnd%c is fired."]).call(te,We(rt("magenta")),We(rt("orange")),[{animateTo:q}])}),f.current=Oo(),Xs(q,s)||me(!1),v(null)},[y,u,f,s,v,me]),ve=E.useCallback(function(q){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},de=te.behavior,Ie=$.current;if(typeof q!="number"&&q!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');u(function(){var Ce;return[bt(Ce=["%cscrollTo%c: Will scroll to %c".concat(typeof q=="number"?q+"px":q.replace(/%/g,"%%"),"%c")]).call(Ce,We(rt("lime","")),We(rt("purple"))),{behavior:de,nextAnimateTo:q,target:Ie}]}),de==="auto"?(fe(),Ie&&(Ie.scrollTop=q==="100%"?Ie.scrollHeight-Ie.offsetHeight:q)):(de!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollTo". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),v(q)),Xs(q,s)&&(u(function(){var Ce;return[bt(Ce=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(Ce,We(rt("lime","")),We(rt("purple"))),[{mode:s,nextAnimateTo:q}]]}),me(!0))},[u,fe,s,v,me,$]),_e=E.useCallback(function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=q.behavior;u(function(){var de;return bt(de=["%cscrollToBottom%c: Called"]).call(de,We(rt("yellow","")))}),te!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToBottom". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ve("100%",{behavior:te||"smooth"})},[u,ve]),I=E.useCallback(function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=q.behavior;u(function(){var de;return bt(de=["%cscrollToTop%c: Called"]).call(de,We(rt("yellow","")))}),te!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToTop". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ve(0,{behavior:te||"smooth"})},[u,ve]),X=E.useCallback(function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=q.behavior;u(function(){var Ie;return bt(Ie=["%cscrollToEnd%c: Called"]).call(Ie,We(rt("yellow","")))}),te!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToEnd". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var de={behavior:te||"smooth"};s===Qn?I(de):_e(de)},[u,s,_e,I]),oe=E.useCallback(function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=q.behavior;u(function(){var Ie;return bt(Ie=["%cscrollToStart%c: Called"]).call(Ie,We(rt("yellow","")))}),te!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToStart". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var de={behavior:te||"smooth"};s===Qn?_e(de):I(de)},[u,s,_e,I]),ee=E.useCallback(function(){var q=$.current;if(q){if(p.current==="auto"){u(function(){var pt;return bt(pt=["%ctarget changed%c: Initial scroll"]).call(pt,We(rt("blue")))}),q.scrollTop=s===Qn?0:q.scrollHeight-q.offsetHeight,p.current=!1;return}var te=T.current,de=q.offsetHeight,Ie=q.scrollHeight,Ce=q.scrollTop,Be=s===Qn?0:Math.max(0,Ie-de-Ce),ut=Math.max(0,te-Ce),Nt=l({maxValue:Be,minValue:ut,offsetHeight:de,scrollHeight:Ie,scrollTop:Ce}),ot=Math.max(0,Math.min(Be,Nt)),nt;s===Qn||ot!==Be?nt=Ce+ot:nt="100%",u(function(){var pt,ht,wn;return[bt(pt=[bt(ht=bt(wn="%cscrollToSticky%c: Will animate from %c".concat(te,"px%c to %c")).call(wn,typeof nt=="number"?nt+"px":nt.replace(/%/g,"%%"),"%c (%c")).call(ht,(nt==="100%"?Be:nt)+te,"px%c)")]).call(pt,We(rt("orange")),We(rt("purple")),We(rt("purple")),We(rt("purple"))),{animateFrom:te,maxValue:Be,minValue:ut,nextAnimateTo:nt,nextValue:ot,offsetHeight:de,rawNextValue:Nt,scrollHeight:Ie,scrollTop:Ce}]}),ve(nt,{behavior:"smooth"})}},[T,u,s,l,ve,$]),Se=E.useCallback(function(q){var te,de=q.timeStampLow,Ie=y.current,Ce=$.current,Be=Ie!==null;if(!(de<=f.current||!Ce)){var ut=VO({mode:s,target:Ce}),Nt=ut.atBottom,ot=ut.atEnd,nt=ut.atStart,pt=ut.atTop;L(Nt),W(ot),ae(nt),z(pt);var ht=Ce.offsetHeight,wn=Ce.scrollHeight,Pn=R.current,er=B.current,Gr=ht!==Pn,Or=wn!==er;if(Gr&&(R.current=ht),Or&&(B.current=wn),!Gr&&!Or){var tr=Be&&Xs(Ie,s)||ot;ce.current!==tr&&(u(function(){var it,mt,Dt,jt;return[bt(it=["%conScroll%c: %csetSticky%c(%c".concat(tr,"%c)")]).call(it,We(rt("red")),We(rt("red")),We(rt("purple"))),bt(mt=[bt(Dt=bt(jt="(animating = %c".concat(Be,"%c && isEnd = %c")).call(jt,Xs(Ie,s),"%c) || atEnd = %c")).call(Dt,ot,"%c")]).call(mt,We(rt("purple")),We(rt("purple")),We(rt("purple")),[{animating:Be,animateTo:Ie,atEnd:ot,mode:s,offsetHeight:Ce.offsetHeight,scrollHeight:Ce.scrollHeight,sticky:ce.current,nextSticky:tr}])]}),me(tr))}else ce.current&&(u(function(){var it;return[bt(it=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(it,We(rt("red")),We(rt("orange")),[{offsetHeightChanged:Gr,scrollHeightChanged:Or}]),{nextOffsetHeight:ht,prevOffsetHeight:Pn,nextScrollHeight:wn,prevScrollHeight:er}]}),ee());var Zr=Ce.scrollTop;Zu(te=Q.current).call(te,function(it){return it({scrollTop:Zr})})}},[y,u,f,s,R,B,Q,ee,L,W,ae,z,me,ce,$]);E.useEffect(function(){if(k){var q=!1,te=Kce(function(){var de=$.current,Ie=y.current!==null;ce.current?VO({mode:s,target:de}).atEnd?q=!1:q?Oo()-q>Wce&&(Ie||(T.current=de.scrollTop,u(function(){var Ce;return bt(Ce=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(Ce,We(rt("navy")),We(rt("orange")))}),ee()),q=!1):q=Oo():de.scrollHeight<=de.offsetHeight&&!ce.current&&(u(function(){var Ce;return[bt(Ce=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(Ce,We(rt("navy")),We(rt("purple"))),[{offsetHeight:de.offsetHeight,scrollHeight:de.scrollHeight,sticky:ce.current}]]}),me(!0))},Math.max(zO,n)||zO);return function(){return clearInterval(te)}}},[y,n,u,s,ee,me,ce,k,$]);var xe=E.useMemo(function(){var q=HO[c]||(HO[c]=Xse({key:"react-scroll-to-bottom--css-"+bce(),nonce:c}));return function(te){return q.css(te)+""}},[c]),ke=E.useMemo(function(){return{observeScrollPosition:G,setTarget:S,styleToClassName:xe}},[G,S,xe]),Fe=E.useMemo(function(){return{atBottom:H,atEnd:j,atStart:J,atTop:w,mode:s}},[H,j,J,w,s]),Te=E.useMemo(function(){var q=m!==null;return{animating:q,animatingToEnd:q&&Xs(m,s),sticky:pe}},[m,s,pe]),U=E.useMemo(function(){return UO(UO({},Fe),Te)},[Fe,Te]),Z=E.useMemo(function(){return{scrollTo:ve,scrollToBottom:_e,scrollToEnd:X,scrollToStart:oe,scrollToTop:I}},[ve,_e,X,oe,I]);return E.useEffect(function(){if(k){var q=function(){B.current=k.scrollHeight};return k.addEventListener("focus",q,{capture:!0,passive:!0}),function(){return k.removeEventListener("focus",q)}}},[k]),u(function(){var q;return[bt(q=["%cRender%c: Render"]).call(q,We(rt("cyan",""))),{animateTo:m,animating:m!==null,sticky:pe,target:k}]}),E.createElement(Mu.Provider,{value:ke},E.createElement(oy.Provider,{value:Z},E.createElement(sy.Provider,{value:U},E.createElement(iy.Provider,{value:Fe},E.createElement(ay.Provider,{value:Te},r,k&&E.createElement(FO,{debounce:o,name:"scroll",onEvent:Se,target:k}),k&&m!==null&&E.createElement(LO,{name:"scrollTop",onEnd:fe,target:k,value:m}))))))};iv.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:Hce},iv.propTypes={checkInterval:Ze.number,children:Ze.any,debounce:Ze.number,debug:Ze.bool,initialScrollBehavior:Ze.oneOf(["auto","smooth"]),mode:Ze.oneOf(["bottom","top"]),nonce:Ze.string,scroller:Ze.func};var Gce={height:"100%",overflowY:"auto",width:"100%"},av=function(t){var n=t.children,r=t.className,o=E.useContext(Mu),i=o.setTarget,a=cy()(Gce);return E.createElement("div",{className:Ym(a,(r||"")+""),ref:i},n)};av.defaultProps={children:void 0,className:void 0},av.propTypes={children:Ze.any,className:Ze.string};var Zce={position:"relative"},sv=function(t){var n=t.children,r=t.className,o=t.followButtonClassName,i=t.scrollViewClassName,a=cy()(Zce);return E.createElement("div",{className:Ym(a,(r||"")+"")},E.createElement(av,{className:(i||"")+""},n),E.createElement(ly,{className:(o||"")+""}))};sv.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},sv.propTypes={children:Ze.any,className:Ze.string,followButtonClassName:Ze.string,scrollViewClassName:Ze.string};var cv=function(t){var n=t.checkInterval,r=t.children,o=t.className,i=t.debounce,a=t.debug,s=t.followButtonClassName,c=t.initialScrollBehavior,l=t.mode,u=t.nonce,f=t.scroller,p=t.scrollViewClassName;return E.createElement(iv,{checkInterval:n,debounce:i,debug:a,initialScrollBehavior:c,mode:l,nonce:u,scroller:f},E.createElement(sv,{className:o,followButtonClassName:s,scrollViewClassName:p},r))};cv.defaultProps={checkInterval:void 0,children:void 0,className:void 0,debounce:void 0,debug:void 0,followButtonClassName:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:void 0,scrollViewClassName:void 0},cv.propTypes={checkInterval:Ze.number,children:Ze.any,className:Ze.string,debounce:Ze.number,debug:Ze.bool,followButtonClassName:Ze.string,initialScrollBehavior:Ze.oneOf(["auto","smooth"]),mode:Ze.oneOf(["bottom","top"]),nonce:Ze.string,scroller:Ze.func,scrollViewClassName:Ze.string};function Yce(){var e=_k(),t=e.scrollToBottom;return t}pq();const WO=E.memo(({scrollDownButton:e,...t})=>{const{messageList:n}=ct,r=_n(y=>y.conversationId),o=Pe(y=>y.messages)[r??""]??[],i=Pe(y=>y.setState),a=Pe(y=>y.client),s=Pe(y=>y.messageContainerRef),c=Pe(y=>y.isTyping),l=Pe(y=>y.setIsTyping),u=Pe(y=>y.headerMessage),f=E.useMemo(()=>iP(o),[o]),[p,d]=E.useState(!0),{y:h}=k6(s),m=E.useCallback(()=>{if(!s.current)return;const{scrollHeight:y}=s.current;p&&s.current.scrollTo({top:y})},[]);E.useEffect(()=>a==null?void 0:a.on("isTyping",({isTyping:y,timeout:g})=>{l(y,g)}),[]),E.useEffect(()=>{const y=o[o.length-1];i({disableComposer:!!(y!=null&&y.disableInput)})},[o.length]),E.useEffect(()=>{if(!s.current)return;const{offsetHeight:y,scrollHeight:g,scrollTop:b}=s.current;d(g<=b+y+100)},[h]);const v=e!=null&&e.icon?e==null?void 0:e.icon:Y6;return F.jsx(F.Fragment,{children:F.jsxs(cv,{...t,...n.container,followButtonClassName:"bpHidden",scrollViewClassName:n.viewPort.className,children:[u&&F.jsx("span",{...n.headerMessage,children:u}),F.jsx(fq,{}),f.map(y=>F.jsx(Th,{scroll:m,...y},y.id)),c&&F.jsx(Th,{scroll:m,direction:"incoming",children:F.jsx($E,{})}),F.jsx("li",{"data-is-at-bottom":p,...n.scrollDownButton.container,children:F.jsxs(Jce,{children:[(e==null?void 0:e.text)??"Back"," ",F.jsx(v,{...n.scrollDownButton.icon})]})})]})})}),Jce=e=>{const[t]=kk(),n=Yce(),{messageList:{scrollDownButton:r}}=ct;return!t&&F.jsx("button",{type:"button",...r.button,onClick:()=>n(),...e})},Xce=()=>{const{color:e,fontFamily:t,radius:n,themeMode:r,variant:o}=Mx(),i=E.useMemo(()=>nb({color:e,fontFamily:t,radius:n,themeMode:r,variant:o}),[e,t,n,r,o]);return F.jsxs(F.Fragment,{children:[F.jsxs(wE,{children:[F.jsx(_E,{}),F.jsx(WO,{}),F.jsx(zS,{})]}),F.jsx("style",{children:i})]})};Oe.Avatar=Uf,Oe.Block=Wi,Oe.Composer=zS,Oe.Container=wE,Oe.Fab=Qz,Oe.Header=_E,Oe.Message=Th,Oe.MessageList=WO,Oe.Modal=Eo,Oe.ModalProvider=qS,Oe.RestartConversation=EE,Oe.TypingIndicator=$E,Oe.Webchat=Xce,Oe.WebchatProvider=_8,Oe.WebchatThemeSchema=Bf,Oe.__adapters=SA,Oe.avatarThemeSchema=vc,Oe.blockThemeSchema=Yg,Oe.clientModePropsSchema=eb,Oe.configPropsSchema=tb,Oe.configurationSchema=Kg,Oe.cssStyleSchema=Zg,Oe.descriptionItemSchema=fi,Oe.fileTypes=lx,Oe.generateThemeStylesheet=nb,Oe.getClient=fx,Oe.initPropsSchema=dP,Oe.isFileType=ux,Oe.markdownTypeSchema=Gg,Oe.renderers=NS,Oe.statePropsSchema=Xg,Oe.styleOptionSchema=ue,Oe.themeSchema=Jg,Oe.useClient=EB,Oe.useWebchatStore=Pe,Oe.userPropsSchema=Qg,Oe.webchatClasses=ct,Object.defineProperty(Oe,Symbol.toStringTag,{value:"Module"})});
347
+ */var nv,b_;function dte(){if(b_)return nv;b_=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return nv=o()?Object.assign:function(i,a){for(var s,l=r(i),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var f in s)t.call(s,f)&&(l[f]=s[f]);if(e){c=e(s);for(var p=0;p<c.length;p++)n.call(s,c[p])&&(l[c[p]]=s[c[p]])}}return l},nv}var rv,w_;function ov(){if(w_)return rv;w_=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return rv=e,rv}var iv,x_;function pte(){if(x_)return iv;x_=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ov(),n={},r=Function.call.bind(Object.prototype.hasOwnProperty);e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var f;try{if(typeof i[u]!="function"){var p=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.");throw p.name="Invariant Violation",p}f=i[u](a,u,l,s,null,t)}catch(h){f=h}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var d=c?c():"";e("Failed "+s+" type: "+f.message+(d??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},iv=o,iv}var av,S_;function hte(){if(S_)return av;S_=1;var e=g_(),t=dte(),n=ov(),r=pte(),o=Function.call.bind(Object.prototype.hasOwnProperty),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return av=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(j){var x=j&&(c&&j[c]||j[u]);if(typeof x=="function")return x}var p="<<anonymous>>",d={array:v("array"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:g(),arrayOf:b,element:k(),elementType:S(),instanceOf:$,node:T(),objectOf:P,oneOf:C,oneOfType:F,shape:M,exact:q};function h(j,x){return j===x?j!==0||1/j===1/x:j!==j&&x!==x}function m(j){this.message=j,this.stack=""}m.prototype=Error.prototype;function y(j){if(process.env.NODE_ENV!=="production")var x={},z=0;function K(J,ae,re,ce,pe,he,le){if(ce=ce||p,he=he||re,le!==n){if(l){var Q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Q.name="Invariant Violation",Q}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var G=ce+":"+re;!x[G]&&z<3&&(i("You are manually calling a React.PropTypes validation function for the `"+he+"` prop on `"+ce+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),x[G]=!0,z++)}}return ae[re]==null?J?ae[re]===null?new m("The "+pe+" `"+he+"` is marked as required "+("in `"+ce+"`, but its value is `null`.")):new m("The "+pe+" `"+he+"` is marked as required in "+("`"+ce+"`, but its value is `undefined`.")):null:j(ae,re,ce,pe,he)}var O=K.bind(null,!1);return O.isRequired=K.bind(null,!0),O}function v(j){function x(z,K,O,J,ae,re){var ce=z[K],pe=D(ce);if(pe!==j){var he=N(ce);return new m("Invalid "+J+" `"+ae+"` of type "+("`"+he+"` supplied to `"+O+"`, expected ")+("`"+j+"`."))}return null}return y(x)}function g(){return y(a)}function b(j){function x(z,K,O,J,ae){if(typeof j!="function")return new m("Property `"+ae+"` of component `"+O+"` has invalid PropType notation inside arrayOf.");var re=z[K];if(!Array.isArray(re)){var ce=D(re);return new m("Invalid "+J+" `"+ae+"` of type "+("`"+ce+"` supplied to `"+O+"`, expected an array."))}for(var pe=0;pe<re.length;pe++){var he=j(re,pe,O,J,ae+"["+pe+"]",n);if(he instanceof Error)return he}return null}return y(x)}function k(){function j(x,z,K,O,J){var ae=x[z];if(!s(ae)){var re=D(ae);return new m("Invalid "+O+" `"+J+"` of type "+("`"+re+"` supplied to `"+K+"`, expected a single ReactElement."))}return null}return y(j)}function S(){function j(x,z,K,O,J){var ae=x[z];if(!e.isValidElementType(ae)){var re=D(ae);return new m("Invalid "+O+" `"+J+"` of type "+("`"+re+"` supplied to `"+K+"`, expected a single ReactElement type."))}return null}return y(j)}function $(j){function x(z,K,O,J,ae){if(!(z[K]instanceof j)){var re=j.name||p,ce=W(z[K]);return new m("Invalid "+J+" `"+ae+"` of type "+("`"+ce+"` supplied to `"+O+"`, expected ")+("instance of `"+re+"`."))}return null}return y(x)}function C(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function x(z,K,O,J,ae){for(var re=z[K],ce=0;ce<j.length;ce++)if(h(re,j[ce]))return null;var pe=JSON.stringify(j,function(le,Q){var G=N(Q);return G==="symbol"?String(Q):Q});return new m("Invalid "+J+" `"+ae+"` of value `"+String(re)+"` "+("supplied to `"+O+"`, expected one of "+pe+"."))}return y(x)}function P(j){function x(z,K,O,J,ae){if(typeof j!="function")return new m("Property `"+ae+"` of component `"+O+"` has invalid PropType notation inside objectOf.");var re=z[K],ce=D(re);if(ce!=="object")return new m("Invalid "+J+" `"+ae+"` of type "+("`"+ce+"` supplied to `"+O+"`, expected an object."));for(var pe in re)if(o(re,pe)){var he=j(re,pe,O,J,ae+"."+pe,n);if(he instanceof Error)return he}return null}return y(x)}function F(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var x=0;x<j.length;x++){var z=j[x];if(typeof z!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+V(z)+" at index "+x+"."),a}function K(O,J,ae,re,ce){for(var pe=0;pe<j.length;pe++){var he=j[pe];if(he(O,J,ae,re,ce,n)==null)return null}return new m("Invalid "+re+" `"+ce+"` supplied to "+("`"+ae+"`."))}return y(K)}function T(){function j(x,z,K,O,J){return B(x[z])?null:new m("Invalid "+O+" `"+J+"` supplied to "+("`"+K+"`, expected a ReactNode."))}return y(j)}function M(j){function x(z,K,O,J,ae){var re=z[K],ce=D(re);if(ce!=="object")return new m("Invalid "+J+" `"+ae+"` of type `"+ce+"` "+("supplied to `"+O+"`, expected `object`."));for(var pe in j){var he=j[pe];if(he){var le=he(re,pe,O,J,ae+"."+pe,n);if(le)return le}}return null}return y(x)}function q(j){function x(z,K,O,J,ae){var re=z[K],ce=D(re);if(ce!=="object")return new m("Invalid "+J+" `"+ae+"` of type `"+ce+"` "+("supplied to `"+O+"`, expected `object`."));var pe=t({},z[K],j);for(var he in pe){var le=j[he];if(!le)return new m("Invalid "+J+" `"+ae+"` key `"+he+"` supplied to `"+O+"`.\nBad object: "+JSON.stringify(z[K],null," ")+`
348
+ Valid keys: `+JSON.stringify(Object.keys(j),null," "));var Q=le(re,he,O,J,ae+"."+he,n);if(Q)return Q}return null}return y(x)}function B(j){switch(typeof j){case"number":case"string":case"undefined":return!0;case"boolean":return!j;case"object":if(Array.isArray(j))return j.every(B);if(j===null||s(j))return!0;var x=f(j);if(x){var z=x.call(j),K;if(x!==j.entries){for(;!(K=z.next()).done;)if(!B(K.value))return!1}else for(;!(K=z.next()).done;){var O=K.value;if(O&&!B(O[1]))return!1}}else return!1;return!0;default:return!1}}function A(j,x){return j==="symbol"?!0:x?x["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&x instanceof Symbol:!1}function D(j){var x=typeof j;return Array.isArray(j)?"array":j instanceof RegExp?"object":A(x,j)?"symbol":x}function N(j){if(typeof j>"u"||j===null)return""+j;var x=D(j);if(x==="object"){if(j instanceof Date)return"date";if(j instanceof RegExp)return"regexp"}return x}function V(j){var x=N(j);switch(x){case"array":case"object":return"an "+x;case"boolean":case"date":case"regexp":return"a "+x;default:return x}}function W(j){return!j.constructor||!j.constructor.name?p:j.constructor.name}return d.checkPropTypes=r,d.resetWarningCache=r.resetWarningCache,d.PropTypes=d,d},av}var sv,E_;function mte(){if(E_)return sv;E_=1;var e=ov();function t(){}function n(){}return n.resetWarningCache=t,sv=function(){function r(a,s,l,c,u,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function o(){return r}var i={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},sv}if(process.env.NODE_ENV!=="production"){var vte=g_(),yte=!0;tv.exports=hte()(vte.isElement,yte)}else tv.exports=mte()();var gte=tv.exports;const Ke=Le(gte);var lv=E.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});lv.displayName="ScrollToBottomFunctionContext";function $_(){return E.useContext(lv)}function bte(){var e=$_(),t=e.scrollToEnd;return t}var cv=E.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});cv.displayName="ScrollToBottomState1Context";var uv=E.createContext({animating:!1,animatingToEnd:!1,sticky:!0});uv.displayName="ScrollToBottomState2Context";var fv=E.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});fv.displayName="ScrollToBottomStateContext";var O_=[fv,cv,uv];function wte(e){return E.useContext(O_[e]||O_[0])}function k_(){var e=wte(2),t=e.sticky;return[t]}var au=E.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});au.displayName="ScrollToBottomInternalContext";function xte(){return E.useContext(au)}function dv(){var e=xte(),t=e.styleToClassName;return t}var Ste={backgroundColor:"rgba(0, 0, 0, .2)",borderRadius:10,borderWidth:0,bottom:5,cursor:"pointer",height:20,outline:0,position:"absolute",right:20,width:20,"&:hover":{backgroundColor:"rgba(0, 0, 0, .4)"},"&:active":{backgroundColor:"rgba(0, 0, 0, .6)"}},pv=function(t){var n=t.children,r=t.className,o=k_(),i=pr(o,1),a=i[0],s=dv()(Ste),l=bte();return!a&&E.createElement("button",{className:ev(s,(r||"")+""),onClick:l,type:"button"},n)};pv.defaultProps={children:void 0,className:""},pv.propTypes={children:Ke.any,className:Ke.string};var __={exports:{}},Ete=it,$te=cn,T_=zn.f;Ete({target:"Object",stat:!0,forced:Object.defineProperty!==T_,sham:!$te},{defineProperty:T_});var Ote=zt,C_=Ote.Object,kte=__.exports=function(t,n,r){return C_.defineProperty(t,n,r)};C_.defineProperty.sham&&(kte.sham=!0);var _te=__.exports,Tte=_te,I_=Tte,Cte=I_,Ite=Cte,Ate=Ite,Pte=Ate,Rte=Pte;const Mte=Le(Rte);var Dte=ts,jte=Dte.f("iterator"),Nte=jte,Lte=Nte,Fte=Lte,Bte=Fte,Ute=Bte,zte=Ute,Hte=zte;const qte=Le(Hte);function ls(e){"@babel/helpers - typeof";return ls=typeof ji=="function"&&typeof qte=="symbol"?function(t){return typeof t}:function(t){return t&&typeof ji=="function"&&t.constructor===ji&&t!==ji.prototype?"symbol":typeof t},ls(e)}var Wte=ts,Vte=Wte.f("toPrimitive"),Kte=Vte,Gte=Kte,Zte=Gte,Yte=Zte,Jte=Yte,Xte=Jte,Qte=Xte;const ene=Le(Qte);function tne(e,t){if(ls(e)!="object"||!e)return e;var n=e[ene];if(n!==void 0){var r=n.call(e,t||"default");if(ls(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nne(e){var t=tne(e,"string");return ls(t)=="symbol"?t:t+""}function rne(e,t,n){return(t=nne(t))in e?Mte(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function one(e){if(lO(e))return Qm(e)}function ine(e){if(typeof ji<"u"&&n_(e)!=null||e["@@iterator"]!=null)return d_(e)}function ane(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
349
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qe(e){return one(e)||ine(e)||p_(e)||ane()}var su=function(e){return e&&e.Math==Math&&e},wn=su(typeof globalThis=="object"&&globalThis)||su(typeof window=="object"&&window)||su(typeof self=="object"&&self)||su(typeof Xe=="object"&&Xe)||function(){return this}()||Function("return this")(),hv={},qn=function(e){try{return!!e()}catch{return!0}},sne=qn,Uo=!sne(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),A_={},P_={}.propertyIsEnumerable,R_=Object.getOwnPropertyDescriptor,lne=R_&&!P_.call({1:2},1);A_.f=lne?function(t){var n=R_(this,t);return!!n&&n.enumerable}:P_;var M_=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},cne={}.toString,mv=function(e){return cne.call(e).slice(8,-1)},une=qn,fne=mv,dne="".split,pne=une(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return fne(e)=="String"?dne.call(e,""):Object(e)}:Object,lu=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},hne=pne,mne=lu,vv=function(e){return hne(mne(e))},Cn=function(e){return typeof e=="function"},vne=Cn,cs=function(e){return typeof e=="object"?e!==null:vne(e)},yv=wn,yne=Cn,gne=function(e){return yne(e)?e:void 0},cu=function(e,t){return arguments.length<2?gne(yv[e]):yv[e]&&yv[e][t]},bne=cu,wne=bne("navigator","userAgent")||"",D_=wn,gv=wne,j_=D_.process,N_=D_.Deno,L_=j_&&j_.versions||N_&&N_.version,F_=L_&&L_.v8,hr,uu;F_?(hr=F_.split("."),uu=hr[0]<4?1:hr[0]+hr[1]):gv&&(hr=gv.match(/Edge\/(\d+)/),(!hr||hr[1]>=74)&&(hr=gv.match(/Chrome\/(\d+)/),hr&&(uu=hr[1])));var xne=uu&&+uu,B_=xne,Sne=qn,U_=!!Object.getOwnPropertySymbols&&!Sne(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&B_&&B_<41}),Ene=U_,z_=Ene&&!Symbol.sham&&typeof Symbol.iterator=="symbol",$ne=Cn,One=cu,kne=z_,H_=kne?function(e){return typeof e=="symbol"}:function(e){var t=One("Symbol");return $ne(t)&&Object(e)instanceof t},_ne=function(e){try{return String(e)}catch{return"Object"}},Tne=Cn,Cne=_ne,Ine=function(e){if(Tne(e))return e;throw TypeError(Cne(e)+" is not a function")},Ane=Ine,q_=function(e,t){var n=e[t];return n==null?void 0:Ane(n)},bv=Cn,wv=cs,Pne=function(e,t){var n,r;if(t==="string"&&bv(n=e.toString)&&!wv(r=n.call(e))||bv(n=e.valueOf)&&!wv(r=n.call(e))||t!=="string"&&bv(n=e.toString)&&!wv(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},W_={exports:{}},V_=wn,xv=function(e,t){try{Object.defineProperty(V_,e,{value:t,configurable:!0,writable:!0})}catch{V_[e]=t}return t},Rne=wn,Mne=xv,K_="__core-js_shared__",Dne=Rne[K_]||Mne(K_,{}),Sv=Dne,G_=Sv;(W_.exports=function(e,t){return G_[e]||(G_[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var Ev=W_.exports,jne=lu,Z_=function(e){return Object(jne(e))},Nne=Z_,Lne={}.hasOwnProperty,zo=Object.hasOwn||function(t,n){return Lne.call(Nne(t),n)},Fne=0,Bne=Math.random(),Y_=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++Fne+Bne).toString(36)},Une=wn,zne=Ev,J_=zo,Hne=Y_,X_=U_,qne=z_,us=zne("wks"),fs=Une.Symbol,Wne=qne?fs:fs&&fs.withoutSetter||Hne,ds=function(e){return(!J_(us,e)||!(X_||typeof us[e]=="string"))&&(X_&&J_(fs,e)?us[e]=fs[e]:us[e]=Wne("Symbol."+e)),us[e]},Q_=cs,eT=H_,Vne=q_,Kne=Pne,Gne=ds,Zne=Gne("toPrimitive"),Yne=function(e,t){if(!Q_(e)||eT(e))return e;var n=Vne(e,Zne),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!Q_(r)||eT(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),Kne(e,t)},Jne=Yne,Xne=H_,tT=function(e){var t=Jne(e,"string");return Xne(t)?t:String(t)},Qne=wn,nT=cs,$v=Qne.document,ere=nT($v)&&nT($v.createElement),rT=function(e){return ere?$v.createElement(e):{}},tre=Uo,nre=qn,rre=rT,oT=!tre&&!nre(function(){return Object.defineProperty(rre("div"),"a",{get:function(){return 7}}).a!=7}),ore=Uo,ire=A_,are=M_,sre=vv,lre=tT,cre=zo,ure=oT,iT=Object.getOwnPropertyDescriptor;hv.f=ore?iT:function(t,n){if(t=sre(t),n=lre(n),ure)try{return iT(t,n)}catch{}if(cre(t,n))return are(!ire.f.call(t,n),t[n])};var ps={},fre=cs,ho=function(e){if(fre(e))return e;throw TypeError(String(e)+" is not an object")},dre=Uo,pre=oT,aT=ho,hre=tT,sT=Object.defineProperty;ps.f=dre?sT:function(t,n,r){if(aT(t),n=hre(n),aT(r),pre)try{return sT(t,n,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var mre=Uo,vre=ps,yre=M_,fu=mre?function(e,t,n){return vre.f(e,t,yre(1,n))}:function(e,t,n){return e[t]=n,e},lT={exports:{}},gre=Cn,Ov=Sv,bre=Function.toString;gre(Ov.inspectSource)||(Ov.inspectSource=function(e){return bre.call(e)});var cT=Ov.inspectSource,wre=wn,xre=Cn,Sre=cT,uT=wre.WeakMap,Ere=xre(uT)&&/native code/.test(Sre(uT)),$re=Ev,Ore=Y_,fT=$re("keys"),dT=function(e){return fT[e]||(fT[e]=Ore(e))},kv={},kre=Ere,_re=wn,Tre=cs,Cre=fu,_v=zo,Tv=Sv,Ire=dT,Are=kv,pT="Object already initialized",Pre=_re.WeakMap,du,hs,pu,Rre=function(e){return pu(e)?hs(e):du(e,{})},Mre=function(e){return function(t){var n;if(!Tre(t)||(n=hs(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(kre||Tv.state){var Ho=Tv.state||(Tv.state=new Pre),Dre=Ho.get,hT=Ho.has,jre=Ho.set;du=function(e,t){if(hT.call(Ho,e))throw new TypeError(pT);return t.facade=e,jre.call(Ho,e,t),t},hs=function(e){return Dre.call(Ho,e)||{}},pu=function(e){return hT.call(Ho,e)}}else{var Ni=Ire("state");Are[Ni]=!0,du=function(e,t){if(_v(e,Ni))throw new TypeError(pT);return t.facade=e,Cre(e,Ni,t),t},hs=function(e){return _v(e,Ni)?e[Ni]:{}},pu=function(e){return _v(e,Ni)}}var mT={set:du,get:hs,has:pu,enforce:Rre,getterFor:Mre},Cv=Uo,Nre=zo,vT=Function.prototype,Lre=Cv&&Object.getOwnPropertyDescriptor,Iv=Nre(vT,"name"),Fre=Iv&&(function(){}).name==="something",Bre=Iv&&(!Cv||Cv&&Lre(vT,"name").configurable),Av={EXISTS:Iv,PROPER:Fre,CONFIGURABLE:Bre},Ure=wn,yT=Cn,zre=zo,gT=fu,Hre=xv,qre=cT,bT=mT,Wre=Av.CONFIGURABLE,Vre=bT.get,Kre=bT.enforce,Gre=String(String).split("String");(lT.exports=function(e,t,n,r){var o=r?!!r.unsafe:!1,i=r?!!r.enumerable:!1,a=r?!!r.noTargetGet:!1,s=r&&r.name!==void 0?r.name:t,l;if(yT(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!zre(n,"name")||Wre&&n.name!==s)&&gT(n,"name",s),l=Kre(n),l.source||(l.source=Gre.join(typeof s=="string"?s:""))),e===Ure){i?e[t]=n:Hre(t,n);return}else o?!a&&e[t]&&(i=!0):delete e[t];i?e[t]=n:gT(e,t,n)})(Function.prototype,"toString",function(){return yT(this)&&Vre(this).source||qre(this)});var ms=lT.exports,wT={},Zre=Math.ceil,Yre=Math.floor,hu=function(e){var t=+e;return t!==t||t===0?0:(t>0?Yre:Zre)(t)},Jre=hu,Xre=Math.max,Qre=Math.min,eoe=function(e,t){var n=Jre(e);return n<0?Xre(n+t,0):Qre(n,t)},toe=hu,noe=Math.min,xT=function(e){return e>0?noe(toe(e),9007199254740991):0},roe=xT,ooe=function(e){return roe(e.length)},ioe=vv,aoe=eoe,soe=ooe,ST=function(e){return function(t,n,r){var o=ioe(t),i=soe(o),a=aoe(r,i),s;if(e&&n!=n){for(;i>a;)if(s=o[a++],s!=s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===n)return e||a||0;return!e&&-1}},loe={includes:ST(!0),indexOf:ST(!1)},Pv=zo,coe=vv,uoe=loe.indexOf,foe=kv,ET=function(e,t){var n=coe(e),r=0,o=[],i;for(i in n)!Pv(foe,i)&&Pv(n,i)&&o.push(i);for(;t.length>r;)Pv(n,i=t[r++])&&(~uoe(o,i)||o.push(i));return o},Rv=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],doe=ET,poe=Rv,hoe=poe.concat("length","prototype");wT.f=Object.getOwnPropertyNames||function(t){return doe(t,hoe)};var $T={};$T.f=Object.getOwnPropertySymbols;var moe=cu,voe=wT,yoe=$T,goe=ho,boe=moe("Reflect","ownKeys")||function(t){var n=voe.f(goe(t)),r=yoe.f;return r?n.concat(r(t)):n},woe=zo,xoe=boe,Soe=hv,Eoe=ps,$oe=function(e,t){for(var n=xoe(t),r=Eoe.f,o=Soe.f,i=0;i<n.length;i++){var a=n[i];woe(e,a)||r(e,a,o(t,a))}},Ooe=qn,koe=Cn,_oe=/#|\.prototype\./,vs=function(e,t){var n=Coe[Toe(e)];return n==Aoe?!0:n==Ioe?!1:koe(t)?Ooe(t):!!t},Toe=vs.normalize=function(e){return String(e).replace(_oe,".").toLowerCase()},Coe=vs.data={},Ioe=vs.NATIVE="N",Aoe=vs.POLYFILL="P",Poe=vs,Mv=wn,Roe=hv.f,Moe=fu,Doe=ms,joe=xv,Noe=$oe,Loe=Poe,Foe=function(e,t){var n=e.target,r=e.global,o=e.stat,i,a,s,l,c,u;if(r?a=Mv:o?a=Mv[n]||joe(n,{}):a=(Mv[n]||{}).prototype,a)for(s in t){if(c=t[s],e.noTargetGet?(u=Roe(a,s),l=u&&u.value):l=a[s],i=Loe(r?s:n+(o?".":"#")+s,e.forced),!i&&l!==void 0){if(typeof c==typeof l)continue;Noe(c,l)}(e.sham||l&&l.sham)&&Moe(c,"sham",!0),Doe(a,s,c,e)}},Boe=ds,Uoe=Boe("toStringTag"),OT={};OT[Uoe]="z";var Dv=String(OT)==="[object z]",zoe=Dv,Hoe=Cn,mu=mv,qoe=ds,Woe=qoe("toStringTag"),Voe=mu(function(){return arguments}())=="Arguments",Koe=function(e,t){try{return e[t]}catch{}},kT=zoe?mu:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=Koe(t=Object(e),Woe))=="string"?n:Voe?mu(t):(r=mu(t))=="Object"&&Hoe(t.callee)?"Arguments":r},Goe=kT,vu=function(e){if(Goe(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},Zoe=ho,_T=function(){var e=Zoe(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},jv={},TT=qn,Yoe=wn,CT=Yoe.RegExp;jv.UNSUPPORTED_Y=TT(function(){var e=CT("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),jv.BROKEN_CARET=TT(function(){var e=CT("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var Joe=ET,Xoe=Rv,Qoe=Object.keys||function(t){return Joe(t,Xoe)},eie=Uo,tie=ps,nie=ho,rie=Qoe,oie=eie?Object.defineProperties:function(t,n){nie(t);for(var r=rie(n),o=r.length,i=0,a;o>i;)tie.f(t,a=r[i++],n[a]);return t},iie=cu,aie=iie("document","documentElement"),sie=ho,lie=oie,IT=Rv,cie=kv,uie=aie,fie=rT,die=dT,AT=">",PT="<",Nv="prototype",Lv="script",RT=die("IE_PROTO"),Fv=function(){},MT=function(e){return PT+Lv+AT+e+PT+"/"+Lv+AT},DT=function(e){e.write(MT("")),e.close();var t=e.parentWindow.Object;return e=null,t},pie=function(){var e=fie("iframe"),t="java"+Lv+":",n;return e.style.display="none",uie.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(MT("document.F=Object")),n.close(),n.F},yu,gu=function(){try{yu=new ActiveXObject("htmlfile")}catch{}gu=typeof document<"u"?document.domain&&yu?DT(yu):pie():DT(yu);for(var e=IT.length;e--;)delete gu[Nv][IT[e]];return gu()};cie[RT]=!0;var hie=Object.create||function(t,n){var r;return t!==null?(Fv[Nv]=sie(t),r=new Fv,Fv[Nv]=null,r[RT]=t):r=gu(),n===void 0?r:lie(r,n)},mie=qn,vie=wn,yie=vie.RegExp,gie=mie(function(){var e=yie(".","s");return!(e.dotAll&&e.exec(`
350
+ `)&&e.flags==="s")}),bie=qn,wie=wn,xie=wie.RegExp,Sie=bie(function(){var e=xie("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),Eie=vu,$ie=_T,jT=jv,Oie=Ev,kie=hie,_ie=mT.get,Tie=gie,Cie=Sie,bu=RegExp.prototype.exec,Iie=Oie("native-string-replace",String.prototype.replace),Bv=bu,Uv=function(){var e=/a/,t=/b*/g;return bu.call(e,"a"),bu.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),NT=jT.UNSUPPORTED_Y||jT.BROKEN_CARET,zv=/()??/.exec("")[1]!==void 0,Aie=Uv||zv||NT||Tie||Cie;Aie&&(Bv=function(t){var n=this,r=_ie(n),o=Eie(t),i=r.raw,a,s,l,c,u,f,p;if(i)return i.lastIndex=n.lastIndex,a=Bv.call(i,o),n.lastIndex=i.lastIndex,a;var d=r.groups,h=NT&&n.sticky,m=$ie.call(n),y=n.source,v=0,g=o;if(h&&(m=m.replace("y",""),m.indexOf("g")===-1&&(m+="g"),g=o.slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&o.charAt(n.lastIndex-1)!==`
351
+ `)&&(y="(?: "+y+")",g=" "+g,v++),s=new RegExp("^(?:"+y+")",m)),zv&&(s=new RegExp("^"+y+"$(?!\\s)",m)),Uv&&(l=n.lastIndex),c=bu.call(h?s:n,g),h?c?(c.input=c.input.slice(v),c[0]=c[0].slice(v),c.index=n.lastIndex,n.lastIndex+=c[0].length):n.lastIndex=0:Uv&&c&&(n.lastIndex=n.global?c.index+c[0].length:l),zv&&c&&c.length>1&&Iie.call(c[0],s,function(){for(u=1;u<arguments.length-2;u++)arguments[u]===void 0&&(c[u]=void 0)}),c&&d)for(c.groups=f=kie(null),u=0;u<d.length;u++)p=d[u],f[p[0]]=c[p[1]];return c});var Hv=Bv,Pie=Foe,LT=Hv;Pie({target:"RegExp",proto:!0,forced:/./.exec!==LT},{exec:LT});var FT=ms,Rie=Hv,BT=qn,UT=ds,Mie=fu,Die=UT("species"),qv=RegExp.prototype,jie=function(e,t,n,r){var o=UT(e),i=!BT(function(){var c={};return c[o]=function(){return 7},""[e](c)!=7}),a=i&&!BT(function(){var c=!1,u=/a/;return e==="split"&&(u={},u.constructor={},u.constructor[Die]=function(){return u},u.flags="",u[o]=/./[o]),u.exec=function(){return c=!0,null},u[o](""),!c});if(!i||!a||n){var s=/./[o],l=t(o,""[e],function(c,u,f,p,d){var h=u.exec;return h===Rie||h===qv.exec?i&&!d?{done:!0,value:s.call(u,f,p)}:{done:!0,value:c.call(f,u,p)}:{done:!1}});FT(String.prototype,e,l[0]),FT(qv,o,l[1])}r&&Mie(qv[o],"sham",!0)},Nie=hu,Lie=vu,Fie=lu,zT=function(e){return function(t,n){var r=Lie(Fie(t)),o=Nie(n),i=r.length,a,s;return o<0||o>=i?e?"":void 0:(a=r.charCodeAt(o),a<55296||a>56319||o+1===i||(s=r.charCodeAt(o+1))<56320||s>57343?e?r.charAt(o):a:e?r.slice(o,o+2):(a-55296<<10)+(s-56320)+65536)}},Bie={codeAt:zT(!1),charAt:zT(!0)},Uie=Bie.charAt,zie=function(e,t,n){return t+(n?Uie(e,t).length:1)},Hie=Z_,qie=Math.floor,Wie="".replace,Vie=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Kie=/\$([$&'`]|\d{1,2})/g,Gie=function(e,t,n,r,o,i){var a=n+e.length,s=r.length,l=Kie;return o!==void 0&&(o=Hie(o),l=Vie),Wie.call(i,l,function(c,u){var f;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(a);case"<":f=o[u.slice(1,-1)];break;default:var p=+u;if(p===0)return c;if(p>s){var d=qie(p/10);return d===0?c:d<=s?r[d-1]===void 0?u.charAt(1):r[d-1]+u.charAt(1):c}f=r[p-1]}return f===void 0?"":f})},Zie=ho,Yie=Cn,Jie=mv,Xie=Hv,Qie=function(e,t){var n=e.exec;if(Yie(n)){var r=n.call(e,t);return r!==null&&Zie(r),r}if(Jie(e)==="RegExp")return Xie.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},eae=jie,tae=qn,nae=ho,rae=Cn,oae=hu,iae=xT,Li=vu,aae=lu,sae=zie,lae=q_,cae=Gie,uae=Qie,fae=ds,Wv=fae("replace"),dae=Math.max,pae=Math.min,hae=function(e){return e===void 0?e:String(e)},mae=function(){return"a".replace(/./,"$0")==="$0"}(),HT=function(){return/./[Wv]?/./[Wv]("a","$0")==="":!1}(),vae=!tae(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});eae("replace",function(e,t,n){var r=HT?"$":"$0";return[function(i,a){var s=aae(this),l=i==null?void 0:lae(i,Wv);return l?l.call(i,s,a):t.call(Li(s),i,a)},function(o,i){var a=nae(this),s=Li(o);if(typeof i=="string"&&i.indexOf(r)===-1&&i.indexOf("$<")===-1){var l=n(t,a,s,i);if(l.done)return l.value}var c=rae(i);c||(i=Li(i));var u=a.global;if(u){var f=a.unicode;a.lastIndex=0}for(var p=[];;){var d=uae(a,s);if(d===null||(p.push(d),!u))break;var h=Li(d[0]);h===""&&(a.lastIndex=sae(s,iae(a.lastIndex),f))}for(var m="",y=0,v=0;v<p.length;v++){d=p[v];for(var g=Li(d[0]),b=dae(pae(oae(d.index),s.length),0),k=[],S=1;S<d.length;S++)k.push(hae(d[S]));var $=d.groups;if(c){var C=[g].concat(k,b,s);$!==void 0&&C.push($);var P=Li(i.apply(void 0,C))}else P=cae(g,s,b,k,$,i);b>=y&&(m+=s.slice(y,b)+P,y=b+g.length)}return m+s.slice(y)}]},!vae||!mae||HT);var ys=Ct,yae=qh,gae=jo,wu=function(e){return yae.slice(0,e.length)===e},bae=function(){return wu("Bun/")?"BUN":wu("Cloudflare-Workers")?"CLOUDFLARE":wu("Deno/")?"DENO":wu("Node.js/")?"NODE":ys.Bun&&typeof Bun.version=="string"?"BUN":ys.Deno&&typeof Deno.version=="object"?"DENO":gae(ys.process)==="process"?"NODE":ys.window&&ys.document?"BROWSER":"REST"}(),wae=TypeError,xae=function(e,t){if(e<t)throw new wae("Not enough arguments");return e},qT=Ct,Sae=Mh,Eae=Xt,$ae=bae,Oae=qh,kae=qc,_ae=xae,Tae=qT.Function,Cae=/MSIE .\./.test(Oae)||$ae==="BUN"&&function(){var e=qT.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),WT=function(e,t){var n=t?2:1;return Cae?function(r,o){var i=_ae(arguments.length,1)>n,a=Eae(r)?r:Tae(r),s=i?kae(arguments,n):[],l=i?function(){Sae(a,this,s)}:a;return t?e(l,o):e(l)}:e},Iae=it,VT=Ct,Aae=WT,KT=Aae(VT.setInterval,!0);Iae({global:!0,bind:!0,forced:VT.setInterval!==KT},{setInterval:KT});var Pae=it,GT=Ct,Rae=WT,ZT=Rae(GT.setTimeout,!0);Pae({global:!0,bind:!0,forced:GT.setTimeout!==ZT},{setTimeout:ZT});var Mae=zt,Dae=Mae.setInterval,jae=Dae;const Nae=Le(jae);var Lae=It,YT=function(e,t){var n=[][e];return!!n&&Lae(function(){n.call(null,t||function(){return 1},1)})},Fae=it,Bae=jh,Uae=wO.indexOf,zae=YT,Vv=Bae([].indexOf),JT=!!Vv&&1/Vv([1],1,-0)<0,Hae=JT||!zae("indexOf");Fae({target:"Array",proto:!0,forced:Hae},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return JT?Vv(this,t,n)||0:Uae(this,t,n)}});var qae=Bo,Wae=qae("Array","indexOf"),Vae=Mr,Kae=Wae,Kv=Array.prototype,Gae=function(e){var t=e.indexOf;return e===Kv||Vae(Kv,e)&&t===Kv.indexOf?Kae:t},Zae=Gae,Yae=Zae,Jae=Yae;const Xae=Le(Jae);var XT=Pc,Qae=TypeError,ese=function(e,t){if(!delete e[t])throw new Qae("Cannot delete property "+XT(t)+" of "+XT(e))},tse=it,nse=Dr,rse=hm,ose=Dc,ise=No,ase=r_,sse=lm,lse=pm,cse=Ja,Gv=ese,use=Nc,fse=use("splice"),dse=Math.max,pse=Math.min;tse({target:"Array",proto:!0,forced:!fse},{splice:function(t,n){var r=nse(this),o=ise(r),i=rse(t,o),a=arguments.length,s,l,c,u,f,p;for(a===0?s=l=0:a===1?(s=0,l=o-i):(s=a-2,l=pse(dse(ose(n),0),o-i)),sse(o+s-l),c=lse(r,l),u=0;u<l;u++)f=i+u,f in r&&cse(c,u,r[f]);if(c.length=l,s<l){for(u=i;u<o-l;u++)f=u+l,p=u+s,f in r?r[p]=r[f]:Gv(r,p);for(u=o;u>o-l+s;u--)Gv(r,u-1)}else if(s>l)for(u=o-l;u>i;u--)f=u+l-1,p=u+s-1,f in r?r[p]=r[f]:Gv(r,p);for(u=0;u<s;u++)r[u+i]=arguments[u+2];return ase(r,o-l+s),c}});var hse=Bo,mse=hse("Array","splice"),vse=Mr,yse=mse,Zv=Array.prototype,gse=function(e){var t=e.splice;return e===Zv||vse(Zv,e)&&t===Zv.splice?yse:t},bse=gse,wse=bse,xse=wse;const Sse=Le(xse);var Ese=Bo,$se=Ese("Array","concat"),Ose=Mr,kse=$se,Yv=Array.prototype,_se=function(e){var t=e.concat;return e===Yv||Ose(Yv,e)&&t===Yv.concat?kse:t},Tse=_se,Cse=Tse,Ise=Cse;const yt=Le(Ise);var Ase=it,Pse=At,QT=Date,Rse=Pse(QT.prototype.getTime);Ase({target:"Date",stat:!0},{now:function(){return Rse(new QT)}});var Mse=zt,Dse=Mse.Date.now,jse=Dse,Nse=jse,Lse=Nse;const mo=Le(Lse);var Fse=km.forEach,Bse=YT,Use=Bse("forEach"),zse=Use?[].forEach:function(t){return Fse(this,t,arguments.length>1?arguments[1]:void 0)},Hse=it,eC=zse;Hse({target:"Array",proto:!0,forced:[].forEach!==eC},{forEach:eC});var qse=Bo,Wse=qse("Array","forEach"),Vse=Wse,Kse=Vse,Gse=Xa,Zse=bn,Yse=Mr,Jse=Kse,Jv=Array.prototype,Xse={DOMTokenList:!0,NodeList:!0},Qse=function(e){var t=e.forEach;return e===Jv||Yse(Jv,e)&&t===Jv.forEach||Zse(Xse,Gse(e))?Jse:t},ele=Qse;const xu=Le(ele);var tle=it,nle=Dr,tC=ym,rle=It,ole=rle(function(){tC(1)});tle({target:"Object",stat:!0,forced:ole},{keys:function(t){return tC(nle(t))}});var ile=zt,ale=ile.Object.keys,sle=ale,lle=sle,cle=lle;const ule=Le(cle);var fle=zt,dle=fle.Object.getOwnPropertySymbols,ple=dle,hle=ple,mle=hle;const nC=Le(mle);var vle=it,yle=km.filter,gle=Nc,ble=gle("filter");vle({target:"Array",proto:!0,forced:!ble},{filter:function(t){return yle(this,t,arguments.length>1?arguments[1]:void 0)}});var wle=Bo,xle=wle("Array","filter"),Sle=Mr,Ele=xle,Xv=Array.prototype,$le=function(e){var t=e.filter;return e===Xv||Sle(Xv,e)&&t===Xv.filter?Ele:t},Ole=$le,kle=Ole,_le=kle;const Tle=Le(_le);var rC={exports:{}},Cle=it,Ile=It,Ale=ur,oC=Va.f,iC=cn,Ple=!iC||Ile(function(){oC(1)});Cle({target:"Object",stat:!0,forced:Ple,sham:!iC},{getOwnPropertyDescriptor:function(t,n){return oC(Ale(t),n)}});var Rle=zt,aC=Rle.Object,Mle=rC.exports=function(t,n){return aC.getOwnPropertyDescriptor(t,n)};aC.getOwnPropertyDescriptor.sham&&(Mle.sham=!0);var Dle=rC.exports,jle=Dle,Nle=jle,Lle=Nle;const sC=Le(Lle);var Fle=fr,Ble=At,Ule=Hc,zle=Wc,Hle=uo,qle=Ble([].concat),Wle=Fle("Reflect","ownKeys")||function(t){var n=Ule.f(Hle(t)),r=zle.f;return r?qle(n,r(t)):n},Vle=it,Kle=cn,Gle=Wle,Zle=ur,Yle=Va,Jle=Ja;Vle({target:"Object",stat:!0,sham:!Kle},{getOwnPropertyDescriptors:function(t){for(var n=Zle(t),r=Yle.f,o=Gle(n),i={},a=0,s,l;o.length>a;)l=r(n,s=o[a++]),l!==void 0&&Jle(i,s,l);return i}});var Xle=zt,Qle=Xle.Object.getOwnPropertyDescriptors,ece=Qle,tce=ece,nce=tce;const lC=Le(nce);var cC={exports:{}},rce=it,oce=cn,uC=Lc.f;rce({target:"Object",stat:!0,forced:Object.defineProperties!==uC,sham:!oce},{defineProperties:uC});var ice=zt,fC=ice.Object,ace=cC.exports=function(t,n){return fC.defineProperties(t,n)};fC.defineProperties.sham&&(ace.sham=!0);var sce=cC.exports,lce=sce,cce=lce,uce=cce;const fce=Le(uce);var dce=I_;const pce=Le(dce);var hce=!1;function mce(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function vce(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var yce=function(){function e(n){var r=this;this._insertTag=function(o){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,i),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!hce:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(vce(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=mce(o);try{i.insertRule(r,i.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Qt="-ms-",Su="-moz-",Ze="-webkit-",dC="comm",Qv="rule",ey="decl",gce="@import",pC="@keyframes",bce="@layer",wce=Math.abs,Eu=String.fromCharCode,xce=Object.assign;function Sce(e,t){return Ht(e,0)^45?(((t<<2^Ht(e,0))<<2^Ht(e,1))<<2^Ht(e,2))<<2^Ht(e,3):0}function hC(e){return e.trim()}function Ece(e,t){return(e=t.exec(e))?e[0]:e}function Ye(e,t,n){return e.replace(t,n)}function ty(e,t){return e.indexOf(t)}function Ht(e,t){return e.charCodeAt(t)|0}function gs(e,t,n){return e.slice(t,n)}function mr(e){return e.length}function ny(e){return e.length}function $u(e,t){return t.push(e),e}function $ce(e,t){return e.map(t).join("")}var Ou=1,Fi=1,mC=0,fn=0,$t=0,Bi="";function ku(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Ou,column:Fi,length:a,return:""}}function bs(e,t){return xce(ku("",null,null,"",null,null,0),e,{length:-e.length},t)}function Oce(){return $t}function kce(){return $t=fn>0?Ht(Bi,--fn):0,Fi--,$t===10&&(Fi=1,Ou--),$t}function xn(){return $t=fn<mC?Ht(Bi,fn++):0,Fi++,$t===10&&(Fi=1,Ou++),$t}function vr(){return Ht(Bi,fn)}function _u(){return fn}function ws(e,t){return gs(Bi,e,t)}function xs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function vC(e){return Ou=Fi=1,mC=mr(Bi=e),fn=0,[]}function yC(e){return Bi="",e}function Tu(e){return hC(ws(fn-1,ry(e===91?e+2:e===40?e+1:e)))}function _ce(e){for(;($t=vr())&&$t<33;)xn();return xs(e)>2||xs($t)>3?"":" "}function Tce(e,t){for(;--t&&xn()&&!($t<48||$t>102||$t>57&&$t<65||$t>70&&$t<97););return ws(e,_u()+(t<6&&vr()==32&&xn()==32))}function ry(e){for(;xn();)switch($t){case e:return fn;case 34:case 39:e!==34&&e!==39&&ry($t);break;case 40:e===41&&ry(e);break;case 92:xn();break}return fn}function Cce(e,t){for(;xn()&&e+$t!==47+10;)if(e+$t===42+42&&vr()===47)break;return"/*"+ws(t,fn-1)+"*"+Eu(e===47?e:xn())}function Ice(e){for(;!xs(vr());)xn();return ws(e,fn)}function Ace(e){return yC(Cu("",null,null,null,[""],e=vC(e),0,[0],e))}function Cu(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,f=a,p=0,d=0,h=0,m=1,y=1,v=1,g=0,b="",k=o,S=i,$=r,C=b;y;)switch(h=g,g=xn()){case 40:if(h!=108&&Ht(C,f-1)==58){ty(C+=Ye(Tu(g),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:C+=Tu(g);break;case 9:case 10:case 13:case 32:C+=_ce(h);break;case 92:C+=Tce(_u()-1,7);continue;case 47:switch(vr()){case 42:case 47:$u(Pce(Cce(xn(),_u()),t,n),l);break;default:C+="/"}break;case 123*m:s[c++]=mr(C)*v;case 125*m:case 59:case 0:switch(g){case 0:case 125:y=0;case 59+u:v==-1&&(C=Ye(C,/\f/g,"")),d>0&&mr(C)-f&&$u(d>32?bC(C+";",r,n,f-1):bC(Ye(C," ","")+";",r,n,f-2),l);break;case 59:C+=";";default:if($u($=gC(C,t,n,c,u,o,s,b,k=[],S=[],f),i),g===123)if(u===0)Cu(C,t,$,$,k,i,f,s,S);else switch(p===99&&Ht(C,3)===110?100:p){case 100:case 108:case 109:case 115:Cu(e,$,$,r&&$u(gC(e,$,$,0,0,o,s,b,o,k=[],f),S),o,S,f,s,r?k:S);break;default:Cu(C,$,$,$,[""],S,0,s,S)}}c=u=d=0,m=v=1,b=C="",f=a;break;case 58:f=1+mr(C),d=h;default:if(m<1){if(g==123)--m;else if(g==125&&m++==0&&kce()==125)continue}switch(C+=Eu(g),g*m){case 38:v=u>0?1:(C+="\f",-1);break;case 44:s[c++]=(mr(C)-1)*v,v=1;break;case 64:vr()===45&&(C+=Tu(xn())),p=vr(),u=f=mr(b=C+=Ice(_u())),g++;break;case 45:h===45&&mr(C)==2&&(m=0)}}return i}function gC(e,t,n,r,o,i,a,s,l,c,u){for(var f=o-1,p=o===0?i:[""],d=ny(p),h=0,m=0,y=0;h<r;++h)for(var v=0,g=gs(e,f+1,f=wce(m=a[h])),b=e;v<d;++v)(b=hC(m>0?p[v]+" "+g:Ye(g,/&\f/g,p[v])))&&(l[y++]=b);return ku(e,t,n,o===0?Qv:s,l,c,u)}function Pce(e,t,n){return ku(e,t,n,dC,Eu(Oce()),gs(e,2,-2),0)}function bC(e,t,n,r){return ku(e,t,n,ey,gs(e,0,r),gs(e,r+1,-1),r)}function Ui(e,t){for(var n="",r=ny(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Rce(e,t,n,r){switch(e.type){case bce:if(e.children.length)break;case gce:case ey:return e.return=e.return||e.value;case dC:return"";case pC:return e.return=e.value+"{"+Ui(e.children,r)+"}";case Qv:e.value=e.props.join(",")}return mr(n=Ui(e.children,r))?e.return=e.value+"{"+n+"}":""}function Mce(e){var t=ny(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}function Dce(e){return function(t){t.root||(t=t.return)&&e(t)}}function jce(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Nce=function(t,n,r){for(var o=0,i=0;o=i,i=vr(),o===38&&i===12&&(n[r]=1),!xs(i);)xn();return ws(t,fn)},Lce=function(t,n){var r=-1,o=44;do switch(xs(o)){case 0:o===38&&vr()===12&&(n[r]=1),t[r]+=Nce(fn-1,n,r);break;case 2:t[r]+=Tu(o);break;case 4:if(o===44){t[++r]=vr()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Eu(o)}while(o=xn());return t},Fce=function(t,n){return yC(Lce(vC(t),n))},wC=new WeakMap,Bce=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!wC.get(r))&&!o){wC.set(t,!0);for(var i=[],a=Fce(n,i),s=r.props,l=0,c=0;l<a.length;l++)for(var u=0;u<s.length;u++,c++)t.props[c]=i[l]?a[l].replace(/&\f/g,s[u]):s[u]+" "+a[l]}}},Uce=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function xC(e,t){switch(Sce(e,t)){case 5103:return Ze+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ze+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ze+e+Su+e+Qt+e+e;case 6828:case 4268:return Ze+e+Qt+e+e;case 6165:return Ze+e+Qt+"flex-"+e+e;case 5187:return Ze+e+Ye(e,/(\w+).+(:[^]+)/,Ze+"box-$1$2"+Qt+"flex-$1$2")+e;case 5443:return Ze+e+Qt+"flex-item-"+Ye(e,/flex-|-self/,"")+e;case 4675:return Ze+e+Qt+"flex-line-pack"+Ye(e,/align-content|flex-|-self/,"")+e;case 5548:return Ze+e+Qt+Ye(e,"shrink","negative")+e;case 5292:return Ze+e+Qt+Ye(e,"basis","preferred-size")+e;case 6060:return Ze+"box-"+Ye(e,"-grow","")+Ze+e+Qt+Ye(e,"grow","positive")+e;case 4554:return Ze+Ye(e,/([^-])(transform)/g,"$1"+Ze+"$2")+e;case 6187:return Ye(Ye(Ye(e,/(zoom-|grab)/,Ze+"$1"),/(image-set)/,Ze+"$1"),e,"")+e;case 5495:case 3959:return Ye(e,/(image-set\([^]*)/,Ze+"$1$`$1");case 4968:return Ye(Ye(e,/(.+:)(flex-)?(.*)/,Ze+"box-pack:$3"+Qt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ze+e+e;case 4095:case 3583:case 4068:case 2532:return Ye(e,/(.+)-inline(.+)/,Ze+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(mr(e)-1-t>6)switch(Ht(e,t+1)){case 109:if(Ht(e,t+4)!==45)break;case 102:return Ye(e,/(.+:)(.+)-([^]+)/,"$1"+Ze+"$2-$3$1"+Su+(Ht(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ty(e,"stretch")?xC(Ye(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ht(e,t+1)!==115)break;case 6444:switch(Ht(e,mr(e)-3-(~ty(e,"!important")&&10))){case 107:return Ye(e,":",":"+Ze)+e;case 101:return Ye(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ze+(Ht(e,14)===45?"inline-":"")+"box$3$1"+Ze+"$2$3$1"+Qt+"$2box$3")+e}break;case 5936:switch(Ht(e,t+11)){case 114:return Ze+e+Qt+Ye(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ze+e+Qt+Ye(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ze+e+Qt+Ye(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ze+e+Qt+e+e}return e}var zce=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case ey:t.return=xC(t.value,t.length);break;case pC:return Ui([bs(t,{value:Ye(t.value,"@","@"+Ze)})],o);case Qv:if(t.length)return $ce(t.props,function(i){switch(Ece(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ui([bs(t,{props:[Ye(i,/:(read-\w+)/,":"+Su+"$1")]})],o);case"::placeholder":return Ui([bs(t,{props:[Ye(i,/:(plac\w+)/,":"+Ze+"input-$1")]}),bs(t,{props:[Ye(i,/:(plac\w+)/,":"+Su+"$1")]}),bs(t,{props:[Ye(i,/:(plac\w+)/,Qt+"input-$1")]})],o)}return""})}},Hce=[zce],qce=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var y=m.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var o=t.stylisPlugins||Hce,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var y=m.getAttribute("data-emotion").split(" "),v=1;v<y.length;v++)i[y[v]]=!0;s.push(m)});var l,c=[Bce,Uce];{var u,f=[Rce,Dce(function(m){u.insert(m)})],p=Mce(c.concat(o,f)),d=function(y){return Ui(Ace(y),p)};l=function(y,v,g,b){u=g,d(y?y+"{"+v.styles+"}":v.styles),b&&(h.inserted[v.name]=!0)}}var h={key:n,sheet:new yce({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:l};return h.sheet.hydrate(s),h};function Wce(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Vce={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Kce=!1,Gce=/[A-Z]|^ms/g,Zce=/_EMO_([^_]+?)_([^]*?)_EMO_/g,SC=function(t){return t.charCodeAt(1)===45},EC=function(t){return t!=null&&typeof t!="boolean"},oy=jce(function(e){return SC(e)?e:e.replace(Gce,"-$&").toLowerCase()}),$C=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Zce,function(r,o,i){return yr={name:o,styles:i,next:yr},o})}return Vce[t]!==1&&!SC(t)&&typeof n=="number"&&n!==0?n+"px":n},Yce="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Ss(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return yr={name:o.name,styles:o.styles,next:yr},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)yr={name:a.name,styles:a.styles,next:yr},a=a.next;var s=i.styles+";";return s}return Jce(e,t,n)}case"function":{if(e!==void 0){var l=yr,c=n(e);return yr=l,Ss(e,t,c)}break}}var u=n;if(t==null)return u;var f=t[u];return f!==void 0?f:u}function Jce(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Ss(e,t,n[o])+";";else for(var i in n){var a=n[i];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?r+=i+"{"+t[s]+"}":EC(s)&&(r+=oy(i)+":"+$C(i,s)+";")}else{if(i==="NO_COMPONENT_SELECTOR"&&Kce)throw new Error(Yce);if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)EC(a[l])&&(r+=oy(i)+":"+$C(i,a[l])+";");else{var c=Ss(e,t,a);switch(i){case"animation":case"animationName":{r+=oy(i)+":"+c+";";break}default:r+=i+"{"+c+"}"}}}}return r}var OC=/label:\s*([^\s;\n{]+)\s*(;|$)/g,yr;function iy(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";yr=void 0;var i=e[0];if(i==null||i.raw===void 0)r=!1,o+=Ss(n,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=Ss(n,t,e[s]),r){var l=i;o+=l[s]}OC.lastIndex=0;for(var c="",u;(u=OC.exec(o))!==null;)c+="-"+u[1];var f=Wce(o)+c;return{name:f,styles:o,next:yr}}var Xce=!0;function kC(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var Qce=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||Xce===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},eue=function(t,n,r){Qce(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function _C(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function TC(e,t,n){var r=[],o=kC(e,r,n);return r.length<2?n:o+t(r)}var tue=function(t){var n=qce(t);n.sheet.speedy=function(s){if(process.env.NODE_ENV!=="production"&&this.ctr!==0)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=s},n.compat=!0;var r=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=iy(c,n.registered,void 0);return eue(n,f,!1),n.key+"-"+f.name},o=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=iy(c,n.registered),p="animation-"+f.name;return _C(n,{name:f.name,styles:"@keyframes "+p+"{"+f.styles+"}"}),p},i=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=iy(c,n.registered);_C(n,f)},a=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return TC(n.registered,r,nue(c))};return{css:r,cx:a,injectGlobal:i,keyframes:o,hydrate:function(l){l.forEach(function(c){n.inserted[c]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:kC.bind(null,n.registered),merge:TC.bind(null,n.registered,r)}},nue=function e(t){for(var n="",r=0;r<t.length;r++){var o=t[r];if(o!=null){var i=void 0;switch(typeof o){case"boolean":break;case"object":{if(Array.isArray(o))i=e(o);else{i="";for(var a in o)o[a]&&a&&(i&&(i+=" "),i+=a)}break}default:i=o}i&&(n&&(n+=" "),n+=i)}}return n},rue=ms,ay=Date.prototype,CC="Invalid Date",IC="toString",oue=ay[IC],iue=ay.getTime;String(new Date(NaN))!=CC&&rue(ay,IC,function(){var t=iue.call(this);return t===t?oue.call(this):CC});var aue=Dv,sue=kT,lue=aue?{}.toString:function(){return"[object "+sue(this)+"]"},cue=Dv,uue=ms,fue=lue;cue||uue(Object.prototype,"toString",fue,{unsafe:!0});var due=Av.PROPER,pue=ms,hue=ho,AC=vu,mue=qn,vue=_T,sy="toString",PC=RegExp.prototype,RC=PC[sy],yue=mue(function(){return RC.call({source:"a",flags:"b"})!="/a/b"}),gue=due&&RC.name!=sy;(yue||gue)&&pue(RegExp.prototype,sy,function(){var t=hue(this),n=AC(t.source),r=t.flags,o=AC(r===void 0&&t instanceof RegExp&&!("flags"in PC)?vue.call(t):r);return"/"+n+"/"+o},{unsafe:!0});var MC=typeof window<"u"?window:self,bue=MC.crypto||MC.msCrypto,wue=function(e){if(!e)return Math.random;var t=Math.pow(2,32),n=new Uint32Array(1);return function(){return e.getRandomValues(n)[0]/t}}(bue);const xue=Le(wue);function Sue(){return xue().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var Eue=sO;const DC=Le(Eue);function nt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",n="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(n+=" color: ".concat(t,";")),[n,""]}function jC(e,t){for(var n,r,o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];return yt(n=[yt(r="%c".concat(e,"%c ")).call(r,t)]).call(n,qe(nt("green","white")),i)}function $ue(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.force,r=n===void 0?!1:n;return r?function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];if(i.length){var s=i,l=pr(s,1),c=l[0];typeof c=="function"&&(i=c());var u=DC(i[0])?i:[i],f=u.length===1;xu(u).call(u,function(p,d){if(f){var h,m;(h=console).log.apply(h,qe(jC.apply(void 0,yt(m=[e]).call(m,qe(p)))))}else if(d){var y;(y=console).log.apply(y,qe(DC(p)?p:[p]))}else{var v,g;(v=console).groupCollapsed.apply(v,qe(jC.apply(void 0,yt(g=[e]).call(g,qe(p)))))}}),f||console.groupEnd()}}:function(){return 0}}var Oue=Uo,kue=Av.EXISTS,_ue=ps.f,NC=Function.prototype,Tue=NC.toString,Cue=/^\s*function ([^ (]*)/,Iue="name";Oue&&!kue&&_ue(NC,Iue,{configurable:!0,get:function(){try{return Tue.call(this).match(Cue)[1]}catch{return""}}});var Aue=zt,Pue=Aue.setTimeout,Rue=Pue;const Mue=Le(Rue);function Due(e,t){if(!t)return e;var n=0,r=null;return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=mo();s-n>t?(e.apply(void 0,i),n=s):(clearTimeout(r),r=Mue(function(){e.apply(void 0,i),n=mo()},Math.max(0,t-s+n)))}}var LC=function(t){var n=t.debounce,r=t.name,o=t.onEvent,i=t.target,a=E.useRef();a.current=o;var s=E.useMemo(function(){return Due(function(c){var u=a.current;u&&u(c)},n)},[n,a]),l=E.useCallback(function(c){c.timeStampLow=mo(),s(c)},[s]);return E.useLayoutEffect(function(){return i.addEventListener(r,l,{passive:!0}),l({target:i,type:r}),function(){return i.removeEventListener(r,l)}},[r,l,i]),!1};LC.defaultProps={debounce:200};var jue=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},Nue=it,Lue=jue;Nue({target:"Math",stat:!0},{sign:Lue});var Fue=zt,Bue=Fue.Math.sign,Uue=Bue,zue=Uue,Hue=zue;const que=Le(Hue);function Wue(e,t){var n=que(t-e),r=Math.sqrt(Math.abs(t-e)),o=e+r*n;return n>0?Math.min(t,o):Math.max(t,o)}function Vue(e,t,n,r){for(var o=e,i=0;i<r;i++)o=n(o,t);return o}var FC=function(t){var n=t.name,r=t.onEnd,o=t.target,i=t.value,a=E.useRef(),s=E.useCallback(function(c,u,f,p){var d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:mo();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(a.current),a.current=requestAnimationFrame(function(){if(o){var h=f==="100%"?o.scrollHeight-o.offsetHeight:f,m=Vue(u,h,Wue,(mo()-d)/5);Math.abs(h-m)<1.5&&(m=h),o[c]=m,h===m?r&&r(!0):s(c,u,f,p+1,d)}}))},[a,r,o]),l=E.useCallback(function(){cancelAnimationFrame(a.current),r&&r(!1)},[r]);return E.useLayoutEffect(function(){return s(n,o[n],i,1),o?(o.addEventListener("pointerdown",l,{passive:!0}),o.addEventListener("wheel",l,{passive:!0}),function(){o.removeEventListener("pointerdown",l),o.removeEventListener("wheel",l),cancelAnimationFrame(a.current)}):function(){return cancelAnimationFrame(a.current)}},[s,a,l,n,o,i]),!1};FC.propTypes={name:Ke.string.isRequired,onEnd:Ke.func,target:Ke.any.isRequired,value:Ke.oneOfType([Ke.number,Ke.oneOf(["100%"])]).isRequired};function ly(e){var t=E.useState(e),n=pr(t,2),r=n[0],o=n[1],i=E.useRef(),a=E.useCallback(function(s){typeof s=="function"?a(function(l){return s=s(l),i.current=s,s}):(i.current=s,a(s))},[i]);return i.current=r,[r,o,i]}function BC(e,t){var n=ule(e);if(nC){var r=nC(e);t&&(r=Tle(r).call(r,function(o){return sC(e,o).enumerable})),n.push.apply(n,r)}return n}function UC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;xu(r=BC(Object(n),!0)).call(r,function(i){rne(e,i,n[i])})}else if(lC)fce(e,lC(n));else{var o;xu(o=BC(Object(n))).call(o,function(i){pce(e,i,sC(n,i))})}}return e}var Kue=function(){return 1/0},zC=17,Gue="bottom",Wn="top",HC=1,Zue=34,qC={};function Yue(e,t){return e(),Nae(e,t)}function WC(e){var t=e.mode,n=e.target,r=n.offsetHeight,o=n.scrollHeight,i=n.scrollTop,a=o-i-r<HC,s=i<HC,l=t===Wn?s:a,c=t!==Wn?s:a;return{atBottom:a,atEnd:l,atStart:c,atTop:s}}function Es(e,t){return e===(t===Wn?0:"100%")}var cy=function(t){var n=t.checkInterval,r=t.children,o=t.debounce,i=t.debug,a=t.initialScrollBehavior,s=t.mode,l=t.nonce,c=t.scroller,u=E.useMemo(function(){return $ue("<ScrollToBottom>",{force:i})},[i]);s=s===Wn?Wn:Gue;var f=E.useRef(0),p=E.useRef(a),d=ly(s===Wn?0:"100%"),h=pr(d,3),m=h[0],y=h[1],v=h[2],g=ly(null),b=pr(g,3),k=b[0],S=b[1],$=b[2],C=E.useRef(0),P=E.useRef(0),F=E.useRef(0),T=E.useState(!0),M=pr(T,2),q=M[0],B=M[1],A=E.useState(!0),D=pr(A,2),N=D[0],V=D[1],W=E.useState(!0),j=pr(W,2),x=j[0],z=j[1],K=E.useState(!1),O=pr(K,2),J=O[0],ae=O[1],re=ly(!0),ce=pr(re,3),pe=ce[0],he=ce[1],le=ce[2],Q=E.useRef([]),G=E.useCallback(function(H){var te=$.current;return Q.current.push(H),te&&H({scrollTop:te.scrollTop}),function(){var de=Q.current,Ae=Xae(de).call(de,H);~Ae&&Sse(de).call(de,Ae,1)}},[Q,$]),fe=E.useCallback(function(){var H=v.current;u(function(){var te;return yt(te=["%cSpineTo%c: %conEnd%c is fired."]).call(te,qe(nt("magenta")),qe(nt("orange")),[{animateTo:H}])}),f.current=mo(),Es(H,s)||he(!1),y(null)},[v,u,f,s,y,he]),ve=E.useCallback(function(H){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},de=te.behavior,Ae=$.current;if(typeof H!="number"&&H!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');u(function(){var ke;return[yt(ke=["%cscrollTo%c: Will scroll to %c".concat(typeof H=="number"?H+"px":H.replace(/%/g,"%%"),"%c")]).call(ke,qe(nt("lime","")),qe(nt("purple"))),{behavior:de,nextAnimateTo:H,target:Ae}]}),de==="auto"?(fe(),Ae&&(Ae.scrollTop=H==="100%"?Ae.scrollHeight-Ae.offsetHeight:H)):(de!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollTo". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),y(H)),Es(H,s)&&(u(function(){var ke;return[yt(ke=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(ke,qe(nt("lime","")),qe(nt("purple"))),[{mode:s,nextAnimateTo:H}]]}),he(!0))},[u,fe,s,y,he,$]),Ee=E.useCallback(function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=H.behavior;u(function(){var de;return yt(de=["%cscrollToBottom%c: Called"]).call(de,qe(nt("yellow","")))}),te!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToBottom". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ve("100%",{behavior:te||"smooth"})},[u,ve]),R=E.useCallback(function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=H.behavior;u(function(){var de;return yt(de=["%cscrollToTop%c: Called"]).call(de,qe(nt("yellow","")))}),te!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToTop". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ve(0,{behavior:te||"smooth"})},[u,ve]),X=E.useCallback(function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=H.behavior;u(function(){var Ae;return yt(Ae=["%cscrollToEnd%c: Called"]).call(Ae,qe(nt("yellow","")))}),te!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToEnd". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var de={behavior:te||"smooth"};s===Wn?R(de):Ee(de)},[u,s,Ee,R]),oe=E.useCallback(function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=H.behavior;u(function(){var Ae;return yt(Ae=["%cscrollToStart%c: Called"]).call(Ae,qe(nt("yellow","")))}),te!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToStart". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var de={behavior:te||"smooth"};s===Wn?Ee(de):R(de)},[u,s,Ee,R]),ee=E.useCallback(function(){var H=$.current;if(H){if(p.current==="auto"){u(function(){var dt;return yt(dt=["%ctarget changed%c: Initial scroll"]).call(dt,qe(nt("blue")))}),H.scrollTop=s===Wn?0:H.scrollHeight-H.offsetHeight,p.current=!1;return}var te=C.current,de=H.offsetHeight,Ae=H.scrollHeight,ke=H.scrollTop,Be=s===Wn?0:Math.max(0,Ae-de-ke),ct=Math.max(0,te-ke),Pt=c({maxValue:Be,minValue:ct,offsetHeight:de,scrollHeight:Ae,scrollTop:ke}),rt=Math.max(0,Math.min(Be,Pt)),tt;s===Wn||rt!==Be?tt=ke+rt:tt="100%",u(function(){var dt,pt,dn;return[yt(dt=[yt(pt=yt(dn="%cscrollToSticky%c: Will animate from %c".concat(te,"px%c to %c")).call(dn,typeof tt=="number"?tt+"px":tt.replace(/%/g,"%%"),"%c (%c")).call(pt,(tt==="100%"?Be:tt)+te,"px%c)")]).call(dt,qe(nt("orange")),qe(nt("purple")),qe(nt("purple")),qe(nt("purple"))),{animateFrom:te,maxValue:Be,minValue:ct,nextAnimateTo:tt,nextValue:rt,offsetHeight:de,rawNextValue:Pt,scrollHeight:Ae,scrollTop:ke}]}),ve(tt,{behavior:"smooth"})}},[C,u,s,c,ve,$]),xe=E.useCallback(function(H){var te,de=H.timeStampLow,Ae=v.current,ke=$.current,Be=Ae!==null;if(!(de<=f.current||!ke)){var ct=WC({mode:s,target:ke}),Pt=ct.atBottom,rt=ct.atEnd,tt=ct.atStart,dt=ct.atTop;B(Pt),V(rt),ae(tt),z(dt);var pt=ke.offsetHeight,dn=ke.scrollHeight,Sn=P.current,Vn=F.current,Lr=pt!==Sn,gr=dn!==Vn;if(Lr&&(P.current=pt),gr&&(F.current=dn),!Lr&&!gr){var Kn=Be&&Es(Ae,s)||rt;le.current!==Kn&&(u(function(){var ot,ht,Rt,Mt;return[yt(ot=["%conScroll%c: %csetSticky%c(%c".concat(Kn,"%c)")]).call(ot,qe(nt("red")),qe(nt("red")),qe(nt("purple"))),yt(ht=[yt(Rt=yt(Mt="(animating = %c".concat(Be,"%c && isEnd = %c")).call(Mt,Es(Ae,s),"%c) || atEnd = %c")).call(Rt,rt,"%c")]).call(ht,qe(nt("purple")),qe(nt("purple")),qe(nt("purple")),[{animating:Be,animateTo:Ae,atEnd:rt,mode:s,offsetHeight:ke.offsetHeight,scrollHeight:ke.scrollHeight,sticky:le.current,nextSticky:Kn}])]}),he(Kn))}else le.current&&(u(function(){var ot;return[yt(ot=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(ot,qe(nt("red")),qe(nt("orange")),[{offsetHeightChanged:Lr,scrollHeightChanged:gr}]),{nextOffsetHeight:pt,prevOffsetHeight:Sn,nextScrollHeight:dn,prevScrollHeight:Vn}]}),ee());var Fr=ke.scrollTop;xu(te=Q.current).call(te,function(ot){return ot({scrollTop:Fr})})}},[v,u,f,s,P,F,Q,ee,B,V,ae,z,he,le,$]);E.useEffect(function(){if(k){var H=!1,te=Yue(function(){var de=$.current,Ae=v.current!==null;le.current?WC({mode:s,target:de}).atEnd?H=!1:H?mo()-H>Zue&&(Ae||(C.current=de.scrollTop,u(function(){var ke;return yt(ke=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(ke,qe(nt("navy")),qe(nt("orange")))}),ee()),H=!1):H=mo():de.scrollHeight<=de.offsetHeight&&!le.current&&(u(function(){var ke;return[yt(ke=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(ke,qe(nt("navy")),qe(nt("purple"))),[{offsetHeight:de.offsetHeight,scrollHeight:de.scrollHeight,sticky:le.current}]]}),he(!0))},Math.max(zC,n)||zC);return function(){return clearInterval(te)}}},[v,n,u,s,ee,he,le,k,$]);var be=E.useMemo(function(){var H=qC[l]||(qC[l]=tue({key:"react-scroll-to-bottom--css-"+Sue(),nonce:l}));return function(te){return H.css(te)+""}},[l]),Oe=E.useMemo(function(){return{observeScrollPosition:G,setTarget:S,styleToClassName:be}},[G,S,be]),Ne=E.useMemo(function(){return{atBottom:q,atEnd:N,atStart:J,atTop:x,mode:s}},[q,N,J,x,s]),_e=E.useMemo(function(){var H=m!==null;return{animating:H,animatingToEnd:H&&Es(m,s),sticky:pe}},[m,s,pe]),U=E.useMemo(function(){return UC(UC({},Ne),_e)},[Ne,_e]),Z=E.useMemo(function(){return{scrollTo:ve,scrollToBottom:Ee,scrollToEnd:X,scrollToStart:oe,scrollToTop:R}},[ve,Ee,X,oe,R]);return E.useEffect(function(){if(k){var H=function(){F.current=k.scrollHeight};return k.addEventListener("focus",H,{capture:!0,passive:!0}),function(){return k.removeEventListener("focus",H)}}},[k]),u(function(){var H;return[yt(H=["%cRender%c: Render"]).call(H,qe(nt("cyan",""))),{animateTo:m,animating:m!==null,sticky:pe,target:k}]}),E.createElement(au.Provider,{value:Oe},E.createElement(lv.Provider,{value:Z},E.createElement(fv.Provider,{value:U},E.createElement(cv.Provider,{value:Ne},E.createElement(uv.Provider,{value:_e},r,k&&E.createElement(LC,{debounce:o,name:"scroll",onEvent:xe,target:k}),k&&m!==null&&E.createElement(FC,{name:"scrollTop",onEnd:fe,target:k,value:m}))))))};cy.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:Kue},cy.propTypes={checkInterval:Ke.number,children:Ke.any,debounce:Ke.number,debug:Ke.bool,initialScrollBehavior:Ke.oneOf(["auto","smooth"]),mode:Ke.oneOf(["bottom","top"]),nonce:Ke.string,scroller:Ke.func};var Jue={height:"100%",overflowY:"auto",width:"100%"},uy=function(t){var n=t.children,r=t.className,o=E.useContext(au),i=o.setTarget,a=dv()(Jue);return E.createElement("div",{className:ev(a,(r||"")+""),ref:i},n)};uy.defaultProps={children:void 0,className:void 0},uy.propTypes={children:Ke.any,className:Ke.string};var Xue={position:"relative"},fy=function(t){var n=t.children,r=t.className,o=t.followButtonClassName,i=t.scrollViewClassName,a=dv()(Xue);return E.createElement("div",{className:ev(a,(r||"")+"")},E.createElement(uy,{className:(i||"")+""},n),E.createElement(pv,{className:(o||"")+""}))};fy.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},fy.propTypes={children:Ke.any,className:Ke.string,followButtonClassName:Ke.string,scrollViewClassName:Ke.string};var dy=function(t){var n=t.checkInterval,r=t.children,o=t.className,i=t.debounce,a=t.debug,s=t.followButtonClassName,l=t.initialScrollBehavior,c=t.mode,u=t.nonce,f=t.scroller,p=t.scrollViewClassName;return E.createElement(cy,{checkInterval:n,debounce:i,debug:a,initialScrollBehavior:l,mode:c,nonce:u,scroller:f},E.createElement(fy,{className:o,followButtonClassName:s,scrollViewClassName:p},r))};dy.defaultProps={checkInterval:void 0,children:void 0,className:void 0,debounce:void 0,debug:void 0,followButtonClassName:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:void 0,scrollViewClassName:void 0},dy.propTypes={checkInterval:Ke.number,children:Ke.any,className:Ke.string,debounce:Ke.number,debug:Ke.bool,followButtonClassName:Ke.string,initialScrollBehavior:Ke.oneOf(["auto","smooth"]),mode:Ke.oneOf(["bottom","top"]),nonce:Ke.string,scroller:Ke.func,scrollViewClassName:Ke.string};function Que(){var e=$_(),t=e.scrollToBottom;return t}vW();const VC=E.memo(({scrollDownButton:e,...t})=>{const{messageList:n}=st,r=mn(v=>v.conversationId),o=Ie(v=>v.messages)[r??""]??[],i=Ie(v=>v.setState),a=Ie(v=>v.client),s=Ie(v=>v.messageContainerRef),l=Ie(v=>v.isTyping),c=Ie(v=>v.setIsTyping),u=Ie(v=>v.headerMessage),f=E.useMemo(()=>aP(o),[o]),[p,d]=E.useState(!0),{y:h}=yB(s),m=E.useCallback(()=>{if(!s.current)return;const{scrollHeight:v}=s.current;p&&s.current.scrollTo({top:v})},[]);E.useEffect(()=>a==null?void 0:a.on("isTyping",({isTyping:v,timeout:g})=>{c(v,g)}),[]),E.useEffect(()=>{const v=o[o.length-1];i({disableComposer:!!(v!=null&&v.disableInput)})},[o.length]),E.useEffect(()=>{if(!s.current)return;const{offsetHeight:v,scrollHeight:g,scrollTop:b}=s.current;d(g<=b+v+100)},[h]);const y=e!=null&&e.icon?e==null?void 0:e.icon:UB;return L.jsx(L.Fragment,{children:L.jsxs(dy,{...t,...n.container,followButtonClassName:"bpHidden",scrollViewClassName:n.viewPort.className,children:[u&&L.jsx("span",{...n.headerMessage,children:u}),L.jsx(hW,{}),f.map(v=>L.jsx(Rh,{scroll:m,...v},v.id)),l&&L.jsx(Rh,{scroll:m,direction:"incoming",children:L.jsx(O$,{})}),L.jsx("li",{"data-is-at-bottom":p,...n.scrollDownButton.container,children:L.jsxs(efe,{children:[(e==null?void 0:e.text)??"Back"," ",L.jsx(y,{...n.scrollDownButton.icon})]})})]})})}),efe=e=>{const[t]=k_(),n=Que(),{messageList:{scrollDownButton:r}}=st;return!t&&L.jsx("button",{type:"button",...r.button,onClick:()=>n(),...e})},tfe=()=>{const{color:e,fontFamily:t,radius:n,themeMode:r,variant:o}=Jx(),i=E.useMemo(()=>eb({color:e,fontFamily:t,radius:n,themeMode:r,variant:o}),[e,t,n,r,o]);return L.jsxs(L.Fragment,{children:[L.jsxs(w$,{children:[L.jsx($$,{}),L.jsx(VC,{}),L.jsx(iS,{})]}),L.jsx("style",{children:i})]})};Te.Avatar=gf,Te.Block=gi,Te.Composer=iS,Te.Container=w$,Te.Fab=nW,Te.Header=$$,Te.Message=Rh,Te.MessageList=VC,Te.Modal=co,Te.ModalProvider=aS,Te.RestartConversation=E$,Te.TypingIndicator=O$,Te.Webchat=tfe,Te.WebchatProvider=_H,Te.WebchatThemeSchema=yf,Te.__adapters=SA,Te.avatarThemeSchema=Bs,Te.blockThemeSchema=Zg,Te.configPropsSchema=Qg,Te.configurationSchema=Vg,Te.cssStyleSchema=Gg,Te.descriptionItemSchema=Go,Te.fileTypes=kx,Te.generateThemeStylesheet=eb,Te.getClient=Tx,Te.initPropsSchema=pP,Te.isFileType=_x,Te.markdownTypeSchema=Kg,Te.renderers=X1,Te.statePropsSchema=Jg,Te.styleOptionSchema=ue,Te.themeSchema=Yg,Te.useClient=h4,Te.useWebchatStore=Ie,Te.userPropsSchema=Xg,Te.webchatClasses=st,Object.defineProperty(Te,Symbol.toStringTag,{value:"Module"})});