tracer-sh 0.1.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.
@@ -0,0 +1,204 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-OFNGDK62-B2U64epE.js","assets/index-mD-B-NKT.js","assets/index-ckfqBqoi.css","assets/SearchableSelect-B7Oz7kCC.js"])))=>i.map(i=>d[i]);
2
+ import{s as mP,e as gP,f as or,g as te,_ as Ju,h as vw,l as bP,i as rs,o as ze,k as me,m as qt,n as Un,p as yP,q as Ns,v as vP,w as xP,x as Ke,y as EP,r as m,z as On,j as E,B as xw,D as cm,R as TP,c as Vt,b as z,E as wP,F as yn,G as AP,H as Ew,W as ns,t as bt,I as Tw,J as ww,K as Kg,L as fu,N as SP,O as Gg,P as Ch,C as kP}from"./index-mD-B-NKT.js";import{r as Ps,u as _P}from"./SearchableSelect-B7Oz7kCC.js";const Aw=new Set(["timestamp","start","end","created_at","updated_at","time"]);function CP(e,t){return Aw.has(e)?t>1e12:/time/i.test(e)&&t>1e12&&t<3e12}function IP(e,t){return Aw.has(e)?t>1e9&&t<1e12:/time/i.test(e)&&t>1e9&&t<3e9}var Sw="vercel.ai.error",OP=Symbol.for(Sw),Xg,Zg,nn=class kw extends(Zg=Error,Xg=OP,Zg){constructor({name:t,message:r,cause:n}){super(r),this[Xg]=!0,this.name=t,this.cause=n}static isInstance(t){return kw.hasMarker(t,Sw)}static hasMarker(t,r){const n=Symbol.for(r);return t!=null&&typeof t=="object"&&n in t&&typeof t[n]=="boolean"&&t[n]===!0}};function _w(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var Cw="AI_InvalidArgumentError",Iw=`vercel.ai.error.${Cw}`,NP=Symbol.for(Iw),Qg,Jg,PP=class extends(Jg=nn,Qg=NP,Jg){constructor({message:e,cause:t,argument:r}){super({name:Cw,message:e,cause:t}),this[Qg]=!0,this.argument=r}static isInstance(e){return nn.hasMarker(e,Iw)}},Ow="AI_JSONParseError",Nw=`vercel.ai.error.${Ow}`,DP=Symbol.for(Nw),eb,tb,rb=class extends(tb=nn,eb=DP,tb){constructor({text:e,cause:t}){super({name:Ow,message:`JSON parsing failed: Text: ${e}.
3
+ Error message: ${_w(t)}`,cause:t}),this[eb]=!0,this.text=e}static isInstance(e){return nn.hasMarker(e,Nw)}},Pw="AI_TypeValidationError",Dw=`vercel.ai.error.${Pw}`,RP=Symbol.for(Dw),nb,ib,Pa=class Ih extends(ib=nn,nb=RP,ib){constructor({value:t,cause:r,context:n}){let i="Type validation failed";if(n?.field&&(i+=` for ${n.field}`),n?.entityName||n?.entityId){i+=" (";const a=[];n.entityName&&a.push(n.entityName),n.entityId&&a.push(`id: "${n.entityId}"`),i+=a.join(", "),i+=")"}super({name:Pw,message:`${i}: Value: ${JSON.stringify(t)}.
4
+ Error message: ${_w(r)}`,cause:r}),this[nb]=!0,this.value=t,this.context=n}static isInstance(t){return nn.hasMarker(t,Dw)}static wrap({value:t,cause:r,context:n}){var i,a,o;return Ih.isInstance(r)&&r.value===t&&((i=r.context)==null?void 0:i.field)===n?.field&&((a=r.context)==null?void 0:a.entityName)===n?.entityName&&((o=r.context)==null?void 0:o.entityId)===n?.entityId?r:new Ih({value:t,cause:r,context:n})}},is;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function r(i){throw new Error}e.assertNever=r,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=n,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(is||(is={}));var ab;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(ab||(ab={}));is.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);is.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class el extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){const r=t||function(a){return a.message},n={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let s=n,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(r(o))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),n}static assert(t){if(!(t instanceof el))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,is.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r=Object.create(null),n=[];for(const i of this.issues)if(i.path.length>0){const a=i.path[0];r[a]=r[a]||[],r[a].push(t(i))}else n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}el.create=e=>new el(e);var ob;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(ob||(ob={}));var ve;(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"})(ve||(ve={}));class sb extends Error{constructor(t,r){super(t),this.name="ParseError",this.type=r.type,this.field=r.field,this.value=r.value,this.line=r.line}}const ub=10,LP=13,hi=32;function wf(e){}function MP(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=wf,onError:r=wf,onRetry:n=wf,onComment:i}=e,a=[];let o=!0,s,u="",l=0,c;function f(v){if(o&&(o=!1,v.charCodeAt(0)===239&&v.charCodeAt(1)===187&&v.charCodeAt(2)===191&&(v=v.slice(3))),a.length===0){const S=d(v);S!==""&&a.push(S);return}if(v.indexOf(`
5
+ `)===-1&&v.indexOf("\r")===-1){a.push(v);return}a.push(v);const T=a.join("");a.length=0;const x=d(T);x!==""&&a.push(x)}function d(v){let T=0;if(v.indexOf("\r")===-1){let x=v.indexOf(`
6
+ `,T);for(;x!==-1;){if(T===x){l>0&&t({id:s,event:c,data:u}),s=void 0,u="",l=0,c=void 0,T=x+1,x=v.indexOf(`
7
+ `,T);continue}const S=v.charCodeAt(T);if(lb(v,T,S)){const w=v.charCodeAt(T+5)===hi?T+6:T+5,A=v.slice(w,x);if(l===0&&v.charCodeAt(x+1)===ub){t({id:s,event:c,data:A}),s=void 0,u="",c=void 0,T=x+2,x=v.indexOf(`
8
+ `,T);continue}u=l===0?A:`${u}
9
+ ${A}`,l++}else cb(v,T,S)?c=v.slice(v.charCodeAt(T+6)===hi?T+7:T+6,x)||void 0:h(v,T,x);T=x+1,x=v.indexOf(`
10
+ `,T)}return v.slice(T)}for(;T<v.length;){const x=v.indexOf("\r",T),S=v.indexOf(`
11
+ `,T);let w=-1;if(x!==-1&&S!==-1?w=x<S?x:S:x!==-1?x===v.length-1?w=-1:w=x:S!==-1&&(w=S),w===-1)break;h(v,T,w),T=w+1,v.charCodeAt(T-1)===LP&&v.charCodeAt(T)===ub&&T++}return v.slice(T)}function h(v,T,x){if(T===x){b();return}const S=v.charCodeAt(T);if(lb(v,T,S)){const C=v.charCodeAt(T+5)===hi?T+6:T+5,M=v.slice(C,x);u=l===0?M:`${u}
12
+ ${M}`,l++;return}if(cb(v,T,S)){c=v.slice(v.charCodeAt(T+6)===hi?T+7:T+6,x)||void 0;return}if(S===105&&v.charCodeAt(T+1)===100&&v.charCodeAt(T+2)===58){const C=v.slice(v.charCodeAt(T+3)===hi?T+4:T+3,x);s=C.includes("\0")?void 0:C;return}if(S===58){if(i){const C=v.slice(T,x);i(C.slice(v.charCodeAt(T+1)===hi?2:1))}return}const w=v.slice(T,x),A=w.indexOf(":");if(A===-1){p(w,"",w);return}const _=w.slice(0,A),O=w.charCodeAt(A+1)===hi?2:1,R=w.slice(A+O);p(_,R,w)}function p(v,T,x){switch(v){case"event":c=T||void 0;break;case"data":u=l===0?T:`${u}
13
+ ${T}`,l++;break;case"id":s=T.includes("\0")?void 0:T;break;case"retry":/^\d+$/.test(T)?n(parseInt(T,10)):r(new sb(`Invalid \`retry\` value: "${T}"`,{type:"invalid-retry",value:T,line:x}));break;default:r(new sb(`Unknown field "${v.length>20?`${v.slice(0,20)}…`:v}"`,{type:"unknown-field",field:v,value:T,line:x}));break}}function b(){l>0&&t({id:s,event:c,data:u}),s=void 0,u="",l=0,c=void 0}function y(v={}){if(v.consume&&a.length>0){const T=a.join("");h(T,0,T.length)}o=!0,s=void 0,u="",l=0,c=void 0,a.length=0}return{feed:f,reset:y}}function lb(e,t,r){return r===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function cb(e,t,r){return r===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}class jP extends TransformStream{constructor({onError:t,onRetry:r,onComment:n}={}){let i;super({start(a){i=MP({onEvent:o=>{a.enqueue(o)},onError(o){t==="terminate"?a.error(o):typeof t=="function"&&t(o)},onRetry:r,onComment:n})},transform(a){i.feed(a)}})}}var Ds=({prefix:e,size:t=16,alphabet:r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:n="-"}={})=>{const i=()=>{const a=r.length,o=new Array(t);for(let s=0;s<t;s++)o[s]=r[Math.random()*a|0];return o.join("")};if(e==null)return i;if(r.includes(n))throw new PP({argument:"separator",message:`The separator "${n}" must not be part of the alphabet "${r}".`});return()=>`${e}${n}${i()}`},BP=Ds();function aa(e){if(e==null)return{};const t={};if(e instanceof Headers)e.forEach((r,n)=>{t[n.toLowerCase()]=r});else{Array.isArray(e)||(e=Object.entries(e));for(const[r,n]of e)n!=null&&(t[r.toLowerCase()]=n)}return t}var FP=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,$P=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function fb(e){const t=JSON.parse(e);return t===null||typeof t!="object"||FP.test(e)===!1&&$P.test(e)===!1?t:UP(t)}function UP(e){let t=[e];for(;t.length;){const r=t;t=[];for(const n of r){if(Object.prototype.hasOwnProperty.call(n,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(n,"constructor")&&n.constructor!==null&&typeof n.constructor=="object"&&Object.prototype.hasOwnProperty.call(n.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const i in n){const a=n[i];a&&typeof a=="object"&&t.push(a)}}}return e}function HP(e){const{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return fb(e)}try{return fb(e)}finally{Error.stackTraceLimit=t}}function fm(e){if(e.type==="object"||Array.isArray(e.type)&&e.type.includes("object")){e.additionalProperties=!1;const{properties:r}=e;if(r!=null)for(const n of Object.keys(r))r[n]=pi(r[n])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(pi):pi(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(pi)),e.allOf!=null&&(e.allOf=e.allOf.map(pi)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(pi));const{definitions:t}=e;if(t!=null)for(const r of Object.keys(t))t[r]=pi(t[r]);return e}function pi(e){return typeof e=="boolean"?e:fm(e)}var zP=Symbol("Let zodToJsonSchema decide on which parser to use"),db={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},qP=e=>typeof e=="string"?{...db,name:e}:{...db,...e};function br(){return{}}function WP(e,t){var r,n,i;const a={type:"array"};return(r=e.type)!=null&&r._def&&((i=(n=e.type)==null?void 0:n._def)==null?void 0:i.typeName)!==ve.ZodAny&&(a.items=Be(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(a.minItems=e.minLength.value),e.maxLength&&(a.maxItems=e.maxLength.value),e.exactLength&&(a.minItems=e.exactLength.value,a.maxItems=e.exactLength.value),a}function VP(e){const t={type:"integer",format:"int64"};if(!e.checks)return t;for(const r of e.checks)switch(r.kind){case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function YP(){return{type:"boolean"}}function Rw(e,t){return Be(e.type._def,t)}var KP=(e,t)=>Be(e.innerType._def,t);function Lw(e,t,r){const n=r??t.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((i,a)=>Lw(e,t,i))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return GP(e)}}var GP=e=>{const t={type:"integer",format:"unix-time"};for(const r of e.checks)switch(r.kind){case"min":t.minimum=r.value;break;case"max":t.maximum=r.value;break}return t};function XP(e,t){return{...Be(e.innerType._def,t),default:e.defaultValue()}}function ZP(e,t){return t.effectStrategy==="input"?Be(e.schema._def,t):br()}function QP(e){return{type:"string",enum:Array.from(e.values)}}var JP=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function e3(e,t){const r=[Be(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),Be(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(i=>!!i),n=[];return r.forEach(i=>{if(JP(i))n.push(...i.allOf);else{let a=i;if("additionalProperties"in i&&i.additionalProperties===!1){const{additionalProperties:o,...s}=i;a=s}n.push(a)}}),n.length?{allOf:n}:void 0}function t3(e){const t=typeof e.value;return t!=="bigint"&&t!=="number"&&t!=="boolean"&&t!=="string"?{type:Array.isArray(e.value)?"array":"object"}:{type:t==="bigint"?"integer":t,const:e.value}}var Af=void 0,Pr={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Af===void 0&&(Af=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Af),uuid:/^[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}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([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})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function Mw(e,t){const r={type:"string"};if(e.checks)for(const n of e.checks)switch(n.kind){case"min":r.minLength=typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value;break;case"max":r.maxLength=typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value;break;case"email":switch(t.emailStrategy){case"format:email":Dr(r,"email",n.message,t);break;case"format:idn-email":Dr(r,"idn-email",n.message,t);break;case"pattern:zod":Ut(r,Pr.email,n.message,t);break}break;case"url":Dr(r,"uri",n.message,t);break;case"uuid":Dr(r,"uuid",n.message,t);break;case"regex":Ut(r,n.regex,n.message,t);break;case"cuid":Ut(r,Pr.cuid,n.message,t);break;case"cuid2":Ut(r,Pr.cuid2,n.message,t);break;case"startsWith":Ut(r,RegExp(`^${Sf(n.value,t)}`),n.message,t);break;case"endsWith":Ut(r,RegExp(`${Sf(n.value,t)}$`),n.message,t);break;case"datetime":Dr(r,"date-time",n.message,t);break;case"date":Dr(r,"date",n.message,t);break;case"time":Dr(r,"time",n.message,t);break;case"duration":Dr(r,"duration",n.message,t);break;case"length":r.minLength=typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,r.maxLength=typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value;break;case"includes":{Ut(r,RegExp(Sf(n.value,t)),n.message,t);break}case"ip":{n.version!=="v6"&&Dr(r,"ipv4",n.message,t),n.version!=="v4"&&Dr(r,"ipv6",n.message,t);break}case"base64url":Ut(r,Pr.base64url,n.message,t);break;case"jwt":Ut(r,Pr.jwt,n.message,t);break;case"cidr":{n.version!=="v6"&&Ut(r,Pr.ipv4Cidr,n.message,t),n.version!=="v4"&&Ut(r,Pr.ipv6Cidr,n.message,t);break}case"emoji":Ut(r,Pr.emoji(),n.message,t);break;case"ulid":{Ut(r,Pr.ulid,n.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{Dr(r,"binary",n.message,t);break}case"contentEncoding:base64":{r.contentEncoding="base64";break}case"pattern:zod":{Ut(r,Pr.base64,n.message,t);break}}break}case"nanoid":Ut(r,Pr.nanoid,n.message,t)}return r}function Sf(e,t){return t.patternStrategy==="escape"?n3(e):e}var r3=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function n3(e){let t="";for(let r=0;r<e.length;r++)r3.has(e[r])||(t+="\\"),t+=e[r];return t}function Dr(e,t,r,n){var i;e.format||(i=e.anyOf)!=null&&i.some(a=>a.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...r&&n.errorMessages&&{errorMessage:{format:r}}})):e.format=t}function Ut(e,t,r,n){var i;e.pattern||(i=e.allOf)!=null&&i.some(a=>a.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:hb(t,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):e.pattern=hb(t,n)}function hb(e,t){var r;if(!t.applyRegexFlags||!e.flags)return e.source;const n={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},i=n.i?e.source.toLowerCase():e.source;let a="",o=!1,s=!1,u=!1;for(let l=0;l<i.length;l++){if(o){a+=i[l],o=!1;continue}if(n.i){if(s){if(i[l].match(/[a-z]/)){u?(a+=i[l],a+=`${i[l-2]}-${i[l]}`.toUpperCase(),u=!1):i[l+1]==="-"&&((r=i[l+2])!=null&&r.match(/[a-z]/))?(a+=i[l],u=!0):a+=`${i[l]}${i[l].toUpperCase()}`;continue}}else if(i[l].match(/[a-z]/)){a+=`[${i[l]}${i[l].toUpperCase()}]`;continue}}if(n.m){if(i[l]==="^"){a+=`(^|(?<=[\r
14
+ ]))`;continue}else if(i[l]==="$"){a+=`($|(?=[\r
15
+ ]))`;continue}}if(n.s&&i[l]==="."){a+=s?`${i[l]}\r
16
+ `:`[${i[l]}\r
17
+ ]`;continue}a+=i[l],i[l]==="\\"?o=!0:s&&i[l]==="]"?s=!1:!s&&i[l]==="["&&(s=!0)}try{new RegExp(a)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return a}function jw(e,t){var r,n,i,a,o,s;const u={type:"object",additionalProperties:(r=Be(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))!=null?r:t.allowedAdditionalProperties};if(((n=e.keyType)==null?void 0:n._def.typeName)===ve.ZodString&&((i=e.keyType._def.checks)!=null&&i.length)){const{type:l,...c}=Mw(e.keyType._def,t);return{...u,propertyNames:c}}else{if(((a=e.keyType)==null?void 0:a._def.typeName)===ve.ZodEnum)return{...u,propertyNames:{enum:e.keyType._def.values}};if(((o=e.keyType)==null?void 0:o._def.typeName)===ve.ZodBranded&&e.keyType._def.type._def.typeName===ve.ZodString&&((s=e.keyType._def.type._def.checks)!=null&&s.length)){const{type:l,...c}=Rw(e.keyType._def,t);return{...u,propertyNames:c}}}return u}function i3(e,t){if(t.mapStrategy==="record")return jw(e,t);const r=Be(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||br(),n=Be(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||br();return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}function a3(e){const t=e.values,n=Object.keys(e.values).filter(a=>typeof t[t[a]]!="number").map(a=>t[a]),i=Array.from(new Set(n.map(a=>typeof a)));return{type:i.length===1?i[0]==="string"?"string":"number":["string","number"],enum:n}}function o3(){return{not:br()}}function s3(){return{type:"null"}}var Oh={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function u3(e,t){const r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in Oh&&(!n._def.checks||!n._def.checks.length))){const n=r.reduce((i,a)=>{const o=Oh[a._def.typeName];return o&&!i.includes(o)?[...i,o]:i},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){const n=r.reduce((i,a)=>{const o=typeof a._def.value;switch(o){case"string":case"number":case"boolean":return[...i,o];case"bigint":return[...i,"integer"];case"object":if(a._def.value===null)return[...i,"null"];default:return i}},[]);if(n.length===r.length){const i=n.filter((a,o,s)=>s.indexOf(a)===o);return{type:i.length>1?i:i[0],enum:r.reduce((a,o)=>a.includes(o._def.value)?a:[...a,o._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,i)=>[...n,...i._def.values.filter(a=>!n.includes(a))],[])};return l3(e,t)}var l3=(e,t)=>{const r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,i)=>Be(n._def,{...t,currentPath:[...t.currentPath,"anyOf",`${i}`]})).filter(n=>!!n&&(!t.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0};function c3(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[Oh[e.innerType._def.typeName],"null"]};const r=Be(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function f3(e){const t={type:"number"};if(!e.checks)return t;for(const r of e.checks)switch(r.kind){case"int":t.type="integer";break;case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function d3(e,t){const r={type:"object",properties:{}},n=[],i=e.shape();for(const o in i){let s=i[o];if(s===void 0||s._def===void 0)continue;const u=p3(s),l=Be(s._def,{...t,currentPath:[...t.currentPath,"properties",o],propertyPath:[...t.currentPath,"properties",o]});l!==void 0&&(r.properties[o]=l,u||n.push(o))}n.length&&(r.required=n);const a=h3(e,t);return a!==void 0&&(r.additionalProperties=a),r}function h3(e,t){if(e.catchall._def.typeName!=="ZodNever")return Be(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function p3(e){try{return e.isOptional()}catch{return!0}}var m3=(e,t)=>{var r;if(t.currentPath.toString()===((r=t.propertyPath)==null?void 0:r.toString()))return Be(e.innerType._def,t);const n=Be(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:br()},n]}:br()},g3=(e,t)=>{if(t.pipeStrategy==="input")return Be(e.in._def,t);if(t.pipeStrategy==="output")return Be(e.out._def,t);const r=Be(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=Be(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(i=>i!==void 0)}};function b3(e,t){return Be(e.type._def,t)}function y3(e,t){const n={type:"array",uniqueItems:!0,items:Be(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}function v3(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>Be(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:Be(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>Be(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}function x3(){return{not:br()}}function E3(){return br()}var T3=(e,t)=>Be(e.innerType._def,t),w3=(e,t,r)=>{switch(t){case ve.ZodString:return Mw(e,r);case ve.ZodNumber:return f3(e);case ve.ZodObject:return d3(e,r);case ve.ZodBigInt:return VP(e);case ve.ZodBoolean:return YP();case ve.ZodDate:return Lw(e,r);case ve.ZodUndefined:return x3();case ve.ZodNull:return s3();case ve.ZodArray:return WP(e,r);case ve.ZodUnion:case ve.ZodDiscriminatedUnion:return u3(e,r);case ve.ZodIntersection:return e3(e,r);case ve.ZodTuple:return v3(e,r);case ve.ZodRecord:return jw(e,r);case ve.ZodLiteral:return t3(e);case ve.ZodEnum:return QP(e);case ve.ZodNativeEnum:return a3(e);case ve.ZodNullable:return c3(e,r);case ve.ZodOptional:return m3(e,r);case ve.ZodMap:return i3(e,r);case ve.ZodSet:return y3(e,r);case ve.ZodLazy:return()=>e.getter()._def;case ve.ZodPromise:return b3(e,r);case ve.ZodNaN:case ve.ZodNever:return o3();case ve.ZodEffects:return ZP(e,r);case ve.ZodAny:return br();case ve.ZodUnknown:return E3();case ve.ZodDefault:return XP(e,r);case ve.ZodBranded:return Rw(e,r);case ve.ZodReadonly:return T3(e,r);case ve.ZodCatch:return KP(e,r);case ve.ZodPipeline:return g3(e,r);case ve.ZodFunction:case ve.ZodVoid:case ve.ZodSymbol:return;default:return(n=>{})()}},A3=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")};function Be(e,t,r=!1){var n;const i=t.seen.get(e);if(t.override){const u=(n=t.override)==null?void 0:n.call(t,e,t,i,r);if(u!==zP)return u}if(i&&!r){const u=S3(i,t);if(u!==void 0)return u}const a={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,a);const o=w3(e,e.typeName,t),s=typeof o=="function"?Be(o(),t):o;if(s&&k3(e,t,s),t.postProcess){const u=t.postProcess(s,e,t);return a.jsonSchema=s,u}return a.jsonSchema=s,s}var S3=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:A3(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,n)=>t.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),br()):t.$refStrategy==="seen"?br():void 0}},k3=(e,t,r)=>(e.description&&(r.description=e.description),r),_3=e=>{const t=qP(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,i])=>[i._def,{def:i._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}},C3=(e,t)=>{var r;const n=_3(t);let i=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((l,[c,f])=>{var d;return{...l,[c]:(d=Be(f._def,{...n,currentPath:[...n.basePath,n.definitionPath,c]},!0))!=null?d:br()}},{}):void 0;const a=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,o=(r=Be(e._def,a===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,a]},!1))!=null?r:br(),s=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;s!==void 0&&(o.title=s);const u=a===void 0?i?{...o,[n.definitionPath]:i}:o:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,a].join("/"),[n.definitionPath]:{...i,[a]:o}};return u.$schema="http://json-schema.org/draft-07/schema#",u},Nh=Symbol.for("vercel.ai.schema");function I3(e){let t;return()=>(t==null&&(t=e()),t)}function fc(e,{validate:t}={}){return{[Nh]:!0,_type:void 0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function O3(e){return typeof e=="object"&&e!==null&&Nh in e&&e[Nh]===!0&&"jsonSchema"in e&&"validate"in e}function dm(e){return e==null?fc({properties:{},additionalProperties:!1}):O3(e)?e:"~standard"in e?e["~standard"].vendor==="zod"?Bw(e):N3(e):e()}function N3(e){return fc(()=>fm(e["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async t=>{const r=await e["~standard"].validate(t);return"value"in r?{success:!0,value:r.value}:{success:!1,error:new Pa({value:t,cause:r.issues})}}})}function P3(e,t){var r;const n=(r=void 0)!=null?r:!1;return fc(()=>C3(e,{$refStrategy:n?"root":"none"}),{validate:async i=>{const a=await e.safeParseAsync(i);return a.success?{success:!0,value:a.data}:{success:!1,error:a.error}}})}function D3(e,t){var r;const n=(r=void 0)!=null?r:!1;return fc(()=>fm(gP(e,{target:"draft-7",io:"input",reused:n?"ref":"inline"})),{validate:async i=>{const a=await mP(e,i);return a.success?{success:!0,value:a.data}:{success:!1,error:a.error}}})}function R3(e){return"_zod"in e}function Bw(e,t){return R3(e)?D3(e):P3(e)}async function pb({value:e,schema:t,context:r}){const n=await as({value:e,schema:t,context:r});if(!n.success)throw Pa.wrap({value:e,cause:n.error,context:r});return n.value}async function as({value:e,schema:t,context:r}){const n=dm(t);try{if(n.validate==null)return{success:!0,value:e,rawValue:e};const i=await n.validate(e);return i.success?{success:!0,value:i.value,rawValue:e}:{success:!1,error:Pa.wrap({value:e,cause:i.error,context:r}),rawValue:e}}catch(i){return{success:!1,error:Pa.wrap({value:e,cause:i,context:r}),rawValue:e}}}async function Li({text:e,schema:t}){try{const r=HP(e);return t==null?{success:!0,value:r,rawValue:r}:await as({value:r,schema:t})}catch(r){return{success:!1,error:rb.isInstance(r)?r:new rb({text:e,cause:r}),rawValue:void 0}}}function L3({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new jP).pipeThrough(new TransformStream({async transform({data:r},n){r!=="[DONE]"&&n.enqueue(await Li({text:r,schema:t}))}}))}async function Wn(e){return typeof e=="function"&&(e=e()),Promise.resolve(e)}var M3=Object.defineProperty,j3=(e,t)=>{for(var r in t)M3(e,r,{get:t[r],enumerable:!0})},Fw="AI_NoObjectGeneratedError",$w=`vercel.ai.error.${Fw}`,B3=Symbol.for($w),Uw,Qn=class extends nn{constructor({message:e="No object generated.",cause:t,text:r,response:n,usage:i,finishReason:a}){super({name:Fw,message:e,cause:t}),this[Uw]=!0,this.text=r,this.response=n,this.usage=i,this.finishReason=a}static isInstance(e){return nn.hasMarker(e,$w)}};Uw=B3;var Hw="AI_UIMessageStreamError",zw=`vercel.ai.error.${Hw}`,F3=Symbol.for(zw),qw,oa=class extends nn{constructor({chunkType:e,chunkId:t,message:r}){super({name:Hw,message:r}),this[qw]=!0,this.chunkType=e,this.chunkId=t}static isInstance(e){return nn.hasMarker(e,zw)}};qw=F3;var Ww=or([te(),Ju(Uint8Array),Ju(ArrayBuffer),vw(e=>{var t,r;return(r=(t=globalThis.Buffer)==null?void 0:t.isBuffer(e))!=null?r:!1},{message:"Must be a Buffer"})]),os=bP(()=>or([vP(),te(),xP(),qt(),rs(te(),os.optional()),Ns(os)])),Ce=rs(te(),rs(te(),os.optional())),Vw=ze({type:me("text"),text:te(),providerOptions:Ce.optional()}),$3=ze({type:me("image"),image:or([Ww,Ju(URL)]),mediaType:te().optional(),providerOptions:Ce.optional()}),Yw=ze({type:me("file"),data:or([Ww,Ju(URL)]),filename:te().optional(),mediaType:te(),providerOptions:Ce.optional()}),U3=ze({type:me("reasoning"),text:te(),providerOptions:Ce.optional()}),H3=ze({type:me("tool-call"),toolCallId:te(),toolName:te(),input:Un(),providerOptions:Ce.optional(),providerExecuted:qt().optional()}),z3=yP("type",[ze({type:me("text"),value:te(),providerOptions:Ce.optional()}),ze({type:me("json"),value:os,providerOptions:Ce.optional()}),ze({type:me("execution-denied"),reason:te().optional(),providerOptions:Ce.optional()}),ze({type:me("error-text"),value:te(),providerOptions:Ce.optional()}),ze({type:me("error-json"),value:os,providerOptions:Ce.optional()}),ze({type:me("content"),value:Ns(or([ze({type:me("text"),text:te(),providerOptions:Ce.optional()}),ze({type:me("media"),data:te(),mediaType:te()}),ze({type:me("file-data"),data:te(),mediaType:te(),filename:te().optional(),providerOptions:Ce.optional()}),ze({type:me("file-url"),url:te(),providerOptions:Ce.optional()}),ze({type:me("file-id"),fileId:or([te(),rs(te(),te())]),providerOptions:Ce.optional()}),ze({type:me("image-data"),data:te(),mediaType:te(),providerOptions:Ce.optional()}),ze({type:me("image-url"),url:te(),providerOptions:Ce.optional()}),ze({type:me("image-file-id"),fileId:or([te(),rs(te(),te())]),providerOptions:Ce.optional()}),ze({type:me("custom"),providerOptions:Ce.optional()})]))})]),Kw=ze({type:me("tool-result"),toolCallId:te(),toolName:te(),output:z3,providerOptions:Ce.optional()}),q3=ze({type:me("tool-approval-request"),approvalId:te(),toolCallId:te()}),W3=ze({type:me("tool-approval-response"),approvalId:te(),approved:qt(),reason:te().optional()}),V3=ze({role:me("system"),content:te(),providerOptions:Ce.optional()}),Y3=ze({role:me("user"),content:or([te(),Ns(or([Vw,$3,Yw]))]),providerOptions:Ce.optional()}),K3=ze({role:me("assistant"),content:or([te(),Ns(or([Vw,Yw,U3,H3,Kw,q3]))]),providerOptions:Ce.optional()}),G3=ze({role:me("tool"),content:Ns(or([Kw,W3])),providerOptions:Ce.optional()});or([V3,Y3,K3,G3]);function Gw(e,t){if(e===void 0&&t===void 0)return;if(e===void 0)return t;if(t===void 0)return e;const r={...e};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const i=t[n];if(i===void 0)continue;const a=n in e?e[n]:void 0,o=i!==null&&typeof i=="object"&&!Array.isArray(i)&&!(i instanceof Date)&&!(i instanceof RegExp),s=a!=null&&typeof a=="object"&&!Array.isArray(a)&&!(a instanceof Date)&&!(a instanceof RegExp);o&&s?r[n]=Gw(a,i):r[n]=i}return r}var X3={};j3(X3,{array:()=>eD,choice:()=>tD,json:()=>rD,object:()=>J3,text:()=>Q3});function Z3(e){const t=["ROOT"];let r=-1,n=null;function i(u,l,c){switch(u){case'"':{r=l,t.pop(),t.push(c),t.push("INSIDE_STRING");break}case"f":case"t":case"n":{r=l,n=l,t.pop(),t.push(c),t.push("INSIDE_LITERAL");break}case"-":{t.pop(),t.push(c),t.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{r=l,t.pop(),t.push(c),t.push("INSIDE_NUMBER");break}case"{":{r=l,t.pop(),t.push(c),t.push("INSIDE_OBJECT_START");break}case"[":{r=l,t.pop(),t.push(c),t.push("INSIDE_ARRAY_START");break}}}function a(u,l){switch(u){case",":{t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{r=l,t.pop();break}}}function o(u,l){switch(u){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{r=l,t.pop();break}}}for(let u=0;u<e.length;u++){const l=e[u];switch(t[t.length-1]){case"ROOT":i(l,u,"FINISH");break;case"INSIDE_OBJECT_START":{switch(l){case'"':{t.pop(),t.push("INSIDE_OBJECT_KEY");break}case"}":{r=u,t.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{l==='"'&&(t.pop(),t.push("INSIDE_OBJECT_KEY"));break}case"INSIDE_OBJECT_KEY":{l==='"'&&(t.pop(),t.push("INSIDE_OBJECT_AFTER_KEY"));break}case"INSIDE_OBJECT_AFTER_KEY":{l===":"&&(t.pop(),t.push("INSIDE_OBJECT_BEFORE_VALUE"));break}case"INSIDE_OBJECT_BEFORE_VALUE":{i(l,u,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{a(l,u);break}case"INSIDE_STRING":{switch(l){case'"':{t.pop(),r=u;break}case"\\":{t.push("INSIDE_STRING_ESCAPE");break}default:r=u}break}case"INSIDE_ARRAY_START":{l==="]"?(r=u,t.pop()):(r=u,i(l,u,"INSIDE_ARRAY_AFTER_VALUE"));break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(l){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{r=u,t.pop();break}default:{r=u;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{i(l,u,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{t.pop(),r=u;break}case"INSIDE_NUMBER":{switch(l){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{r=u;break}case"e":case"E":case"-":case".":break;case",":{t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&o(l,u),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&a(l,u);break}case"}":{t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&a(l,u);break}case"]":{t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&o(l,u);break}default:{t.pop();break}}break}case"INSIDE_LITERAL":{const f=e.substring(n,u+1);!"false".startsWith(f)&&!"true".startsWith(f)&&!"null".startsWith(f)?(t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?a(l,u):t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&o(l,u)):r=u;break}}}let s=e.slice(0,r+1);for(let u=t.length-1;u>=0;u--)switch(t[u]){case"INSIDE_STRING":{s+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{s+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{s+="]";break}case"INSIDE_LITERAL":{const c=e.substring(n,e.length);"true".startsWith(c)?s+="true".slice(c.length):"false".startsWith(c)?s+="false".slice(c.length):"null".startsWith(c)&&(s+="null".slice(c.length))}}return s}async function Rs(e){if(e===void 0)return{value:void 0,state:"undefined-input"};let t=await Li({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=await Li({text:Z3(e)}),t.success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var Q3=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:e}){return e},async parsePartialOutput({text:e}){return{partial:e}},createElementStreamTransform(){}}),J3=({schema:e,name:t,description:r})=>{const n=dm(e);return{name:"object",responseFormat:Wn(n.jsonSchema).then(i=>({type:"json",schema:i,...t!=null&&{name:t},...r!=null&&{description:r}})),async parseCompleteOutput({text:i},a){const o=await Li({text:i});if(!o.success)throw new Qn({message:"No object generated: could not parse the response.",cause:o.error,text:i,response:a.response,usage:a.usage,finishReason:a.finishReason});const s=await as({value:o.value,schema:n});if(!s.success)throw new Qn({message:"No object generated: response did not match schema.",cause:s.error,text:i,response:a.response,usage:a.usage,finishReason:a.finishReason});return s.value},async parsePartialOutput({text:i}){const a=await Rs(i);switch(a.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:a.value}}},createElementStreamTransform(){}}},eD=({element:e,name:t,description:r})=>{const n=dm(e);return{name:"array",responseFormat:Wn(n.jsonSchema).then(i=>{const{$schema:a,...o}=i;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:o}},required:["elements"],additionalProperties:!1},...t!=null&&{name:t},...r!=null&&{description:r}}}),async parseCompleteOutput({text:i},a){const o=await Li({text:i});if(!o.success)throw new Qn({message:"No object generated: could not parse the response.",cause:o.error,text:i,response:a.response,usage:a.usage,finishReason:a.finishReason});const s=o.value;if(s==null||typeof s!="object"||!("elements"in s)||!Array.isArray(s.elements))throw new Qn({message:"No object generated: response did not match schema.",cause:new Pa({value:s,cause:"response must be an object with an elements array"}),text:i,response:a.response,usage:a.usage,finishReason:a.finishReason});for(const u of s.elements){const l=await as({value:u,schema:n});if(!l.success)throw new Qn({message:"No object generated: response did not match schema.",cause:l.error,text:i,response:a.response,usage:a.usage,finishReason:a.finishReason})}return s.elements},async parsePartialOutput({text:i}){const a=await Rs(i);switch(a.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const o=a.value;if(o==null||typeof o!="object"||!("elements"in o)||!Array.isArray(o.elements))return;const s=a.state==="repaired-parse"&&o.elements.length>0?o.elements.slice(0,-1):o.elements,u=[];for(const l of s){const c=await as({value:l,schema:n});c.success&&u.push(c.value)}return{partial:u}}}},createElementStreamTransform(){let i=0;return new TransformStream({transform({partialOutput:a},o){if(a!=null)for(;i<a.length;i++)o.enqueue(a[i])}})}}},tD=({options:e,name:t,description:r})=>({name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:e}},required:["result"],additionalProperties:!1},...t!=null&&{name:t},...r!=null&&{description:r}}),async parseCompleteOutput({text:n},i){const a=await Li({text:n});if(!a.success)throw new Qn({message:"No object generated: could not parse the response.",cause:a.error,text:n,response:i.response,usage:i.usage,finishReason:i.finishReason});const o=a.value;if(o==null||typeof o!="object"||!("result"in o)||typeof o.result!="string"||!e.includes(o.result))throw new Qn({message:"No object generated: response did not match schema.",cause:new Pa({value:o,cause:"response must be an object that contains a choice value."}),text:n,response:i.response,usage:i.usage,finishReason:i.finishReason});return o.result},async parsePartialOutput({text:n}){const i=await Rs(n);switch(i.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const a=i.value;if(a==null||typeof a!="object"||!("result"in a)||typeof a.result!="string")return;const o=e.filter(s=>s.startsWith(a.result));return i.state==="successful-parse"?o.includes(a.result)?{partial:a.result}:void 0:o.length===1?{partial:o[0]}:void 0}}},createElementStreamTransform(){}}),rD=({name:e,description:t}={})=>({name:"json",responseFormat:Promise.resolve({type:"json",...e!=null&&{name:e},...t!=null&&{description:t}}),async parseCompleteOutput({text:r},n){const i=await Li({text:r});if(!i.success)throw new Qn({message:"No object generated: could not parse the response.",cause:i.error,text:r,response:n.response,usage:n.usage,finishReason:n.finishReason});return i.value},async parsePartialOutput({text:r}){const n=await Rs(r);switch(n.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return n.value===void 0?void 0:{partial:n.value}}},createElementStreamTransform(){}});Ds({prefix:"aitxt",size:24});(class extends TransformStream{constructor(){super({transform(e,t){t.enqueue(`data: ${JSON.stringify(e)}
18
+
19
+ `)},flush(e){e.enqueue(`data: [DONE]
20
+
21
+ `)}})}});var nD=I3(()=>Bw(or([Ke({type:me("text-start"),id:te(),providerMetadata:Ce.optional()}),Ke({type:me("text-delta"),id:te(),delta:te(),providerMetadata:Ce.optional()}),Ke({type:me("text-end"),id:te(),providerMetadata:Ce.optional()}),Ke({type:me("error"),errorText:te()}),Ke({type:me("tool-input-start"),toolCallId:te(),toolName:te(),providerExecuted:qt().optional(),providerMetadata:Ce.optional(),dynamic:qt().optional(),title:te().optional()}),Ke({type:me("tool-input-delta"),toolCallId:te(),inputTextDelta:te()}),Ke({type:me("tool-input-available"),toolCallId:te(),toolName:te(),input:Un(),providerExecuted:qt().optional(),providerMetadata:Ce.optional(),dynamic:qt().optional(),title:te().optional()}),Ke({type:me("tool-input-error"),toolCallId:te(),toolName:te(),input:Un(),providerExecuted:qt().optional(),providerMetadata:Ce.optional(),dynamic:qt().optional(),errorText:te(),title:te().optional()}),Ke({type:me("tool-approval-request"),approvalId:te(),toolCallId:te()}),Ke({type:me("tool-output-available"),toolCallId:te(),output:Un(),providerExecuted:qt().optional(),providerMetadata:Ce.optional(),dynamic:qt().optional(),preliminary:qt().optional()}),Ke({type:me("tool-output-error"),toolCallId:te(),errorText:te(),providerExecuted:qt().optional(),providerMetadata:Ce.optional(),dynamic:qt().optional()}),Ke({type:me("tool-output-denied"),toolCallId:te()}),Ke({type:me("reasoning-start"),id:te(),providerMetadata:Ce.optional()}),Ke({type:me("reasoning-delta"),id:te(),delta:te(),providerMetadata:Ce.optional()}),Ke({type:me("reasoning-end"),id:te(),providerMetadata:Ce.optional()}),Ke({type:me("source-url"),sourceId:te(),url:te(),title:te().optional(),providerMetadata:Ce.optional()}),Ke({type:me("source-document"),sourceId:te(),mediaType:te(),title:te(),filename:te().optional(),providerMetadata:Ce.optional()}),Ke({type:me("file"),url:te(),mediaType:te(),providerMetadata:Ce.optional()}),Ke({type:vw(e=>typeof e=="string"&&e.startsWith("data-"),{message:'Type must start with "data-"'}),id:te().optional(),data:Un(),transient:qt().optional()}),Ke({type:me("start-step")}),Ke({type:me("finish-step")}),Ke({type:me("start"),messageId:te().optional(),messageMetadata:Un().optional()}),Ke({type:me("finish"),finishReason:EP(["stop","length","content-filter","tool-calls","error","other"]).optional(),messageMetadata:Un().optional()}),Ke({type:me("abort"),reason:te().optional()}),Ke({type:me("message-metadata"),messageMetadata:Un()})])));function iD(e){return e.type.startsWith("data-")}function Ph(e){return e.type.startsWith("tool-")}function aD(e){return e.type==="dynamic-tool"}function tl(e){return Ph(e)||aD(e)}function mb(e){return e.type.split("-").slice(1).join("-")}function Xw({lastMessage:e,messageId:t}){return{message:e?.role==="assistant"?e:{id:t,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function Zw({stream:e,messageMetadataSchema:t,dataPartSchemas:r,runUpdateMessageJob:n,onError:i,onToolCall:a,onData:o}){return e.pipeThrough(new TransformStream({async transform(s,u){await n(async({state:l,write:c})=>{var f,d,h,p;function b(x){const w=l.message.parts.filter(tl).find(A=>A.toolCallId===x);if(w==null)throw new oa({chunkType:"tool-invocation",chunkId:x,message:`No tool invocation found for tool call ID "${x}".`});return w}function y(x){var S;const w=l.message.parts.find(O=>Ph(O)&&O.toolCallId===x.toolCallId),A=x,_=w;if(w!=null){w.state=x.state,_.input=A.input,_.output=A.output,_.errorText=A.errorText,_.rawInput=A.rawInput,_.preliminary=A.preliminary,x.title!==void 0&&(_.title=x.title),_.providerExecuted=(S=A.providerExecuted)!=null?S:w.providerExecuted;const O=A.providerMetadata;if(O!=null)if(x.state==="output-available"||x.state==="output-error"){const R=w;R.resultProviderMetadata=O}else w.callProviderMetadata=O}else l.message.parts.push({type:`tool-${x.toolName}`,toolCallId:x.toolCallId,state:x.state,title:x.title,input:A.input,output:A.output,rawInput:A.rawInput,errorText:A.errorText,providerExecuted:A.providerExecuted,preliminary:A.preliminary,...A.providerMetadata!=null&&(x.state==="output-available"||x.state==="output-error")?{resultProviderMetadata:A.providerMetadata}:{},...A.providerMetadata!=null&&!(x.state==="output-available"||x.state==="output-error")?{callProviderMetadata:A.providerMetadata}:{}})}function v(x){var S,w;const A=l.message.parts.find(R=>R.type==="dynamic-tool"&&R.toolCallId===x.toolCallId),_=x,O=A;if(A!=null){A.state=x.state,O.toolName=x.toolName,O.input=_.input,O.output=_.output,O.errorText=_.errorText,O.rawInput=(S=_.rawInput)!=null?S:O.rawInput,O.preliminary=_.preliminary,x.title!==void 0&&(O.title=x.title),O.providerExecuted=(w=_.providerExecuted)!=null?w:A.providerExecuted;const R=_.providerMetadata;if(R!=null)if(x.state==="output-available"||x.state==="output-error"){const C=A;C.resultProviderMetadata=R}else A.callProviderMetadata=R}else l.message.parts.push({type:"dynamic-tool",toolName:x.toolName,toolCallId:x.toolCallId,state:x.state,input:_.input,output:_.output,errorText:_.errorText,preliminary:_.preliminary,providerExecuted:_.providerExecuted,title:x.title,..._.providerMetadata!=null&&(x.state==="output-available"||x.state==="output-error")?{resultProviderMetadata:_.providerMetadata}:{},..._.providerMetadata!=null&&!(x.state==="output-available"||x.state==="output-error")?{callProviderMetadata:_.providerMetadata}:{}})}async function T(x){if(x!=null){const S=l.message.metadata!=null?Gw(l.message.metadata,x):x;t!=null&&await pb({value:S,schema:t,context:{field:"message.metadata",entityId:l.message.id}}),l.message.metadata=S}}switch(s.type){case"text-start":{const x={type:"text",text:"",providerMetadata:s.providerMetadata,state:"streaming"};l.activeTextParts[s.id]=x,l.message.parts.push(x),c();break}case"text-delta":{const x=l.activeTextParts[s.id];if(x==null)throw new oa({chunkType:"text-delta",chunkId:s.id,message:`Received text-delta for missing text part with ID "${s.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});x.text+=s.delta,x.providerMetadata=(f=s.providerMetadata)!=null?f:x.providerMetadata,c();break}case"text-end":{const x=l.activeTextParts[s.id];if(x==null)throw new oa({chunkType:"text-end",chunkId:s.id,message:`Received text-end for missing text part with ID "${s.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});x.state="done",x.providerMetadata=(d=s.providerMetadata)!=null?d:x.providerMetadata,delete l.activeTextParts[s.id],c();break}case"reasoning-start":{const x={type:"reasoning",text:"",providerMetadata:s.providerMetadata,state:"streaming"};l.activeReasoningParts[s.id]=x,l.message.parts.push(x),c();break}case"reasoning-delta":{const x=l.activeReasoningParts[s.id];if(x==null)throw new oa({chunkType:"reasoning-delta",chunkId:s.id,message:`Received reasoning-delta for missing reasoning part with ID "${s.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});x.text+=s.delta,x.providerMetadata=(h=s.providerMetadata)!=null?h:x.providerMetadata,c();break}case"reasoning-end":{const x=l.activeReasoningParts[s.id];if(x==null)throw new oa({chunkType:"reasoning-end",chunkId:s.id,message:`Received reasoning-end for missing reasoning part with ID "${s.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});x.providerMetadata=(p=s.providerMetadata)!=null?p:x.providerMetadata,x.state="done",delete l.activeReasoningParts[s.id],c();break}case"file":{l.message.parts.push({type:"file",mediaType:s.mediaType,url:s.url,...s.providerMetadata!=null?{providerMetadata:s.providerMetadata}:{}}),c();break}case"source-url":{l.message.parts.push({type:"source-url",sourceId:s.sourceId,url:s.url,title:s.title,providerMetadata:s.providerMetadata}),c();break}case"source-document":{l.message.parts.push({type:"source-document",sourceId:s.sourceId,mediaType:s.mediaType,title:s.title,filename:s.filename,providerMetadata:s.providerMetadata}),c();break}case"tool-input-start":{const x=l.message.parts.filter(Ph);l.partialToolCalls[s.toolCallId]={text:"",toolName:s.toolName,index:x.length,dynamic:s.dynamic,title:s.title},s.dynamic?v({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-streaming",input:void 0,providerExecuted:s.providerExecuted,title:s.title,providerMetadata:s.providerMetadata}):y({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-streaming",input:void 0,providerExecuted:s.providerExecuted,title:s.title,providerMetadata:s.providerMetadata}),c();break}case"tool-input-delta":{const x=l.partialToolCalls[s.toolCallId];if(x==null)throw new oa({chunkType:"tool-input-delta",chunkId:s.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${s.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});x.text+=s.inputTextDelta;const{value:S}=await Rs(x.text);x.dynamic?v({toolCallId:s.toolCallId,toolName:x.toolName,state:"input-streaming",input:S,title:x.title}):y({toolCallId:s.toolCallId,toolName:x.toolName,state:"input-streaming",input:S,title:x.title}),c();break}case"tool-input-available":{s.dynamic?v({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-available",input:s.input,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata,title:s.title}):y({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-available",input:s.input,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata,title:s.title}),c(),a&&!s.providerExecuted&&await a({toolCall:s});break}case"tool-input-error":{const x=l.message.parts.filter(tl).find(w=>w.toolCallId===s.toolCallId);(x!=null?x.type==="dynamic-tool":!!s.dynamic)?v({toolCallId:s.toolCallId,toolName:s.toolName,state:"output-error",input:s.input,errorText:s.errorText,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata}):y({toolCallId:s.toolCallId,toolName:s.toolName,state:"output-error",input:void 0,rawInput:s.input,errorText:s.errorText,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata}),c();break}case"tool-approval-request":{const x=b(s.toolCallId);x.state="approval-requested",x.approval={id:s.approvalId},c();break}case"tool-output-denied":{const x=b(s.toolCallId);x.state="output-denied",c();break}case"tool-output-available":{const x=b(s.toolCallId);x.type==="dynamic-tool"?v({toolCallId:s.toolCallId,toolName:x.toolName,state:"output-available",input:x.input,output:s.output,preliminary:s.preliminary,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata,title:x.title}):y({toolCallId:s.toolCallId,toolName:mb(x),state:"output-available",input:x.input,output:s.output,providerExecuted:s.providerExecuted,preliminary:s.preliminary,providerMetadata:s.providerMetadata,title:x.title}),c();break}case"tool-output-error":{const x=b(s.toolCallId);x.type==="dynamic-tool"?v({toolCallId:s.toolCallId,toolName:x.toolName,state:"output-error",input:x.input,errorText:s.errorText,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata,title:x.title}):y({toolCallId:s.toolCallId,toolName:mb(x),state:"output-error",input:x.input,rawInput:x.rawInput,errorText:s.errorText,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata,title:x.title}),c();break}case"start-step":{l.message.parts.push({type:"step-start"});break}case"finish-step":{l.activeTextParts={},l.activeReasoningParts={};break}case"start":{s.messageId!=null&&(l.message.id=s.messageId),await T(s.messageMetadata),(s.messageId!=null||s.messageMetadata!=null)&&c();break}case"finish":{s.finishReason!=null&&(l.finishReason=s.finishReason),await T(s.messageMetadata),s.messageMetadata!=null&&c();break}case"message-metadata":{await T(s.messageMetadata),s.messageMetadata!=null&&c();break}case"error":{i?.(new Error(s.errorText));break}default:if(iD(s)){if(r?.[s.type]!=null){const w=l.message.parts.findIndex(_=>"id"in _&&"data"in _&&_.id===s.id&&_.type===s.type),A=w>=0?w:l.message.parts.length;await pb({value:s.data,schema:r[s.type],context:{field:`message.parts[${A}].data`,entityName:s.type,entityId:s.id}})}const x=s;if(x.transient){o?.(x);break}const S=x.id!=null?l.message.parts.find(w=>x.type===w.type&&x.id===w.id):void 0;S!=null?S.data=x.data:l.message.parts.push(x),o?.(x),c()}}u.enqueue(s)})}}))}function oD(e){const t=e.pipeThrough(new TransformStream);return t[Symbol.asyncIterator]=function(){const r=this.getReader();let n=!1;async function i(a){var o;if(!n){n=!0;try{a&&await((o=r.cancel)==null?void 0:o.call(r))}finally{try{r.releaseLock()}catch{}}}}return{async next(){if(n)return{done:!0,value:void 0};const{done:a,value:o}=await r.read();return a?(await i(!0),{done:!0,value:void 0}):{done:!1,value:o}},async return(){return await i(!0),{done:!0,value:void 0}},async throw(a){throw await i(!0),a}}},t}async function Qw({stream:e,onError:t}){const r=e.getReader();try{for(;;){const{done:n}=await r.read();if(n)break}}catch(n){t?.(n)}finally{r.releaseLock()}}Ds({prefix:"aitxt",size:24});function sD({message:e,stream:t,onError:r,terminateOnError:n=!1}){var i;let a,o=!1;const s=new ReadableStream({start(c){a=c}}),u=Xw({messageId:(i=e?.id)!=null?i:"",lastMessage:e}),l=c=>{r?.(c),!o&&n&&(o=!0,a?.error(c))};return Qw({stream:Zw({stream:t,runUpdateMessageJob(c){return c({state:u,write:()=>{a?.enqueue(structuredClone(u.message))}})},onError:l}),onError:l}).finally(()=>{o||a?.close()}),oD(s)}Ds({prefix:"aiobj",size:24});var uD=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise((t,r)=>{this.queue.push(async()=>{try{await e(),t()}catch(n){r(n)}}),this.processQueue()})}};Ds({prefix:"aiobj",size:24});async function lD(e){if(e==null)return[];if(!globalThis.FileList||!(e instanceof globalThis.FileList))throw new Error("FileList is not supported in the current environment");return Promise.all(Array.from(e).map(async t=>{const{name:r,type:n}=t,i=await new Promise((a,o)=>{const s=new FileReader;s.onload=u=>{var l;a((l=u.target)==null?void 0:l.result)},s.onerror=u=>o(u),s.readAsDataURL(t)});return{type:"file",mediaType:n,filename:r,url:i}}))}var cD=class{constructor({api:e="/api/chat",credentials:t,headers:r,body:n,fetch:i,prepareSendMessagesRequest:a,prepareReconnectToStreamRequest:o}){this.api=e,this.credentials=t,this.headers=r,this.body=n,this.fetch=i,this.prepareSendMessagesRequest=a,this.prepareReconnectToStreamRequest=o}async sendMessages({abortSignal:e,...t}){var r,n,i,a,o;const s=await Wn(this.body),u=await Wn(this.headers),l=await Wn(this.credentials),c={...aa(u),...aa(t.headers)},f=await((r=this.prepareSendMessagesRequest)==null?void 0:r.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...s,...t.body},headers:c,credentials:l,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId})),d=(n=f?.api)!=null?n:this.api,h=f?.headers!==void 0?aa(f.headers):c,p=f?.body!==void 0?f.body:{...s,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId},b=(i=f?.credentials)!=null?i:l,v=await((a=this.fetch)!=null?a:globalThis.fetch)(d,{method:"POST",headers:{"Content-Type":"application/json",...h},body:JSON.stringify(p),credentials:b,signal:e});if(!v.ok)throw new Error((o=await v.text())!=null?o:"Failed to fetch the chat response.");if(!v.body)throw new Error("The response body is empty.");return this.processResponseStream(v.body)}async reconnectToStream(e){var t,r,n,i,a;const o=await Wn(this.body),s=await Wn(this.headers),u=await Wn(this.credentials),l={...aa(s),...aa(e.headers)},c=await((t=this.prepareReconnectToStreamRequest)==null?void 0:t.call(this,{api:this.api,id:e.chatId,body:{...o,...e.body},headers:l,credentials:u,requestMetadata:e.metadata})),f=(r=c?.api)!=null?r:`${this.api}/${e.chatId}/stream`,d=c?.headers!==void 0?aa(c.headers):l,h=(n=c?.credentials)!=null?n:u,b=await((i=this.fetch)!=null?i:globalThis.fetch)(f,{method:"GET",headers:d,credentials:h});if(b.status===204)return null;if(!b.ok)throw new Error((a=await b.text())!=null?a:"Failed to fetch the chat response.");if(!b.body)throw new Error("The response body is empty.");return this.processResponseStream(b.body)}},Jw=class extends cD{constructor(e={}){super(e)}processResponseStream(e){return L3({stream:e,schema:nD}).pipeThrough(new TransformStream({async transform(t,r){if(!t.success)throw t.error;r.enqueue(t.value)}}))}},fD=class{constructor({generateId:e=BP,id:t=e(),transport:r=new Jw,messageMetadataSchema:n,dataPartSchemas:i,state:a,onError:o,onToolCall:s,onFinish:u,onData:l,sendAutomaticallyWhen:c}){this.activeResponse=void 0,this.jobExecutor=new uD,this.sendMessage=async(f,d)=>{var h,p,b,y;if(f==null){await this.makeRequest({trigger:"submit-message",messageId:(h=this.lastMessage)==null?void 0:h.id,...d});return}let v;if("text"in f||"files"in f?v={parts:[...Array.isArray(f.files)?f.files:await lD(f.files),..."text"in f&&f.text!=null?[{type:"text",text:f.text}]:[]]}:v=f,f.messageId!=null){const T=this.state.messages.findIndex(x=>x.id===f.messageId);if(T===-1)throw new Error(`message with id ${f.messageId} not found`);if(this.state.messages[T].role!=="user")throw new Error(`message with id ${f.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,T+1),this.state.replaceMessage(T,{...v,id:f.messageId,role:(p=v.role)!=null?p:"user",metadata:f.metadata})}else this.state.pushMessage({...v,id:(b=v.id)!=null?b:this.generateId(),role:(y=v.role)!=null?y:"user",metadata:f.metadata});await this.makeRequest({trigger:"submit-message",messageId:f.messageId,...d})},this.regenerate=async({messageId:f,...d}={})=>{const h=f==null?this.state.messages.length-1:this.state.messages.findIndex(p=>p.id===f);if(h===-1)throw new Error(`message ${f} not found`);this.state.messages=this.state.messages.slice(0,this.messages[h].role==="assistant"?h:h+1),await this.makeRequest({trigger:"regenerate-message",messageId:f,...d})},this.resumeStream=async(f={})=>{await this.makeRequest({trigger:"resume-stream",...f})},this.clearError=()=>{this.status==="error"&&(this.state.error=void 0,this.setStatus({status:"ready"}))},this.addToolApprovalResponse=async({id:f,approved:d,reason:h,options:p})=>this.jobExecutor.run(async()=>{const b=this.state.messages,y=b[b.length-1],v=T=>tl(T)&&T.state==="approval-requested"&&T.approval.id===f?{...T,state:"approval-responded",approval:{id:f,approved:d,reason:h}}:T;this.state.replaceMessage(b.length-1,{...y,parts:y.parts.map(v)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(v)),this.status!=="streaming"&&this.status!=="submitted"&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(T=>{var x;T&&this.makeRequest({trigger:"submit-message",messageId:(x=this.lastMessage)==null?void 0:x.id,...p})})}),this.addToolOutput=async({state:f="output-available",toolCallId:d,output:h,errorText:p,options:b})=>this.jobExecutor.run(async()=>{const y=this.state.messages,v=y[y.length-1],T=x=>tl(x)&&x.toolCallId===d?{...x,state:f,output:h,errorText:p}:x;this.state.replaceMessage(y.length-1,{...v,parts:v.parts.map(T)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(T)),this.status!=="streaming"&&this.status!=="submitted"&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(x=>{var S;x&&this.makeRequest({trigger:"submit-message",messageId:(S=this.lastMessage)==null?void 0:S.id,...b})})}),this.addToolResult=this.addToolOutput,this.stop=async()=>{var f;this.status!=="streaming"&&this.status!=="submitted"||(f=this.activeResponse)!=null&&f.abortController&&this.activeResponse.abortController.abort()},this.id=t,this.transport=r,this.generateId=e,this.messageMetadataSchema=n,this.dataPartSchemas=i,this.state=a,this.onError=o,this.onToolCall=s,this.onFinish=u,this.onData=l,this.sendAutomaticallyWhen=c}get status(){return this.state.status}setStatus({status:e,error:t}){this.status!==e&&(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async shouldSendAutomatically(){if(!this.sendAutomaticallyWhen)return!1;const e=this.sendAutomaticallyWhen({messages:this.state.messages});return e&&typeof e=="object"&&"then"in e?await e:e}async makeRequest({trigger:e,metadata:t,headers:r,body:n,messageId:i}){var a,o,s;let u;if(e==="resume-stream")try{const h=await this.transport.reconnectToStream({chatId:this.id,metadata:t,headers:r,body:n});if(h==null)return;u=h}catch(h){this.onError&&h instanceof Error&&this.onError(h),this.setStatus({status:"error",error:h});return}this.setStatus({status:"submitted",error:void 0});const l=this.lastMessage;let c=!1,f=!1,d=!1;try{const h={state:Xw({lastMessage:this.state.snapshot(l),messageId:this.generateId()}),abortController:new AbortController};h.abortController.signal.addEventListener("abort",()=>{c=!0}),this.activeResponse=h;let p;e==="resume-stream"?p=u:p=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:h.abortController.signal,metadata:t,headers:r,body:n,trigger:e,messageId:i});const b=y=>this.jobExecutor.run(()=>y({state:h.state,write:()=>{var v;this.setStatus({status:"streaming"}),h.state.message.id===((v=this.lastMessage)==null?void 0:v.id)?this.state.replaceMessage(this.state.messages.length-1,h.state.message):this.state.pushMessage(h.state.message)}}));await Qw({stream:Zw({stream:p,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:b,onError:y=>{throw y}}),onError:y=>{throw y}}),this.setStatus({status:"ready"})}catch(h){if(c||h.name==="AbortError")return c=!0,this.setStatus({status:"ready"}),null;d=!0,h instanceof TypeError&&(h.message.toLowerCase().includes("fetch")||h.message.toLowerCase().includes("network"))&&(f=!0),this.onError&&h instanceof Error&&this.onError(h),this.setStatus({status:"error",error:h})}finally{try{(o=this.onFinish)==null||o.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:c,isDisconnect:f,isError:d,finishReason:(a=this.activeResponse)==null?void 0:a.state.finishReason})}catch(h){console.error(h)}this.activeResponse=void 0}!d&&await this.shouldSendAutomatically()&&await this.makeRequest({trigger:"submit-message",messageId:(s=this.lastMessage)==null?void 0:s.id,metadata:t,headers:r,body:n})}};class eA{data=new Map;listeners=new Map;pendingIds=new Set;rafId=null;update(t,r){const n=this.data.get(t);this.data.set(t,r(n)),this.pendingIds.add(t),this.rafId===null&&(this.rafId=requestAnimationFrame(()=>{this.rafId=null;const i=new Set(this.pendingIds);this.pendingIds.clear();for(const a of i)this.listeners.get(a)?.forEach(o=>o())}))}getSnapshot(t){return this.data.get(t)}clear(){this.data.clear(),this.listeners.clear(),this.pendingIds.clear(),this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null)}subscribe(t,r){let n=this.listeners.get(t);return n||(n=new Set,this.listeners.set(t,n)),n.add(r),()=>{n.delete(r)}}}function dD(e,t){const r=m.useCallback(i=>t?e.subscribe(t,i):()=>{},[e,t]),n=m.useCallback(()=>t?e.getSnapshot(t):void 0,[e,t]);return m.useSyncExternalStore(r,n)}const dc=(function(e){if(e==null)return gD;if(typeof e=="function")return hc(e);if(typeof e=="object")return Array.isArray(e)?hD(e):pD(e);if(typeof e=="string")return mD(e);throw new Error("Expected function, string, or object as test")});function hD(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=dc(e[r]);return hc(n);function n(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function pD(e){const t=e;return hc(r);function r(n){const i=n;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function mD(e){return hc(t);function t(r){return r&&r.type===e}}function hc(e){return t;function t(r,n,i){return!!(bD(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function gD(){return!0}function bD(e){return e!==null&&typeof e=="object"&&"type"in e}const tA=[],Po=!0,Dh=!1,Ea="skip";function hm(e,t,r,n){let i;typeof t=="function"&&typeof r!="function"?(n=r,r=t):i=t;const a=dc(i),o=n?-1:1;s(e,void 0,[])();function s(u,l,c){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const h=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(u.type+(h?"<"+h+">":""))+")"})}return d;function d(){let h=tA,p,b,y;if((!t||a(u,l,c[c.length-1]||void 0))&&(h=yD(r(u,c)),h[0]===Dh))return h;if("children"in u&&u.children){const v=u;if(v.children&&h[0]!==Ea)for(b=(n?v.children.length:-1)+o,y=c.concat(v);b>-1&&b<v.children.length;){const T=v.children[b];if(p=s(T,b,y)(),p[0]===Dh)return p;b=typeof p[1]=="number"?p[1]:b+o}}return h}}}function yD(e){return Array.isArray(e)?e:typeof e=="number"?[Po,e]:e==null?tA:[e]}function an(e,t,r,n){let i,a,o;typeof t=="function"&&typeof r!="function"?(a=void 0,o=t,i=r):(a=t,o=r,i=n),hm(e,a,s,i);function s(u,l){const c=l[l.length-1],f=c?c.children.indexOf(u):void 0;return o(u,f,c)}}const Da={indicator:"indicator",textOnly:"text-only",remove:"remove"};function vD({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:r=[],allowDataImages:n=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:o="text-gray-500",linkBlockPolicy:s=Da.indicator,imageBlockPolicy:u=Da.indicator}){const l=t.length&&!t.every(f=>f==="*"),c=r.length&&!r.every(f=>f==="*");if(!e&&(l||c))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return f=>{const d=SD(e,t,r,n,i,a,o,s,u);rA(f),an(f,d)}}function gb(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function xD(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const ED=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),TD=new Set(["javascript:","data:","file:","vbscript:"]);function bb(e,t,r,n=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&n&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const c=e.substring(5);if(c&&c.length>0&&c!=="invalid")return e}}catch{return null}return null}const o=gb(e,r);if(!o||TD.has(o.protocol)||!(ED.has(o.protocol)||a.includes(o.protocol)||a.includes("*")))return null;if(o.protocol==="mailto:"||!o.protocol.match(/^https?:$/))return o.href;const u=xD(e);return o&&t.some(l=>{const c=gb(l,r);return!c||c.origin!==o.origin?!1:o.href.startsWith(c.href)})?u?o.pathname+o.search+o.hash:o.href:t.includes("*")?o.protocol!=="https:"&&o.protocol!=="http:"?null:u?o.pathname+o.search+o.hash:o.href:null}function rA(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)rA(t)}}const kf=Symbol("node-seen");function wD(e,t,r){return t===Da.remove?{type:"remove"}:t===Da.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:r},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function AD(e,t,r){if(t===Da.remove)return{type:"remove"};if(t===Da.textOnly){const n=String(e.properties.alt||"");return n?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:n}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:r},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const SD=(e,t,r,n,i,a,o,s,u)=>{const l=(c,f,d)=>{if(c.type!=="element"||c[kf])return Po;if(c.tagName==="a"){const h=bb(c.properties.href,t,e,!1,!1,i);if(h===null){if(c[kf]=!0,an(c,l),d&&typeof f=="number"){const p=wD(c,s,o);if(p.type==="remove")return d.children.splice(f,1),[Ea,f];d.children[f]=p.element}return Ea}else return c.properties.href=h,c.properties.target="_blank",c.properties.rel="noopener noreferrer",Po}if(c.tagName==="img"){const h=bb(c.properties.src,r,e,n,!0,i);if(h===null){if(c[kf]=!0,an(c,l),d&&typeof f=="number"){const p=AD(c,u,a);if(p.type==="remove")return d.children.splice(f,1),[Ea,f];d.children[f]=p.element}return Ea}else return c.properties.src=h,Po}return Po};return l},nA=-1,pc=0,Ho=1,rl=2,pm=3,mm=4,gm=5,bm=6,iA=7,aA=8,yb=typeof self=="object"?self:globalThis,kD=(e,t)=>{const r=(i,a)=>(e.set(a,i),i),n=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case pc:case nA:return r(o,i);case Ho:{const s=r([],i);for(const u of o)s.push(n(u));return s}case rl:{const s=r({},i);for(const[u,l]of o)s[n(u)]=n(l);return s}case pm:return r(new Date(o),i);case mm:{const{source:s,flags:u}=o;return r(new RegExp(s,u),i)}case gm:{const s=r(new Map,i);for(const[u,l]of o)s.set(n(u),n(l));return s}case bm:{const s=r(new Set,i);for(const u of o)s.add(n(u));return s}case iA:{const{name:s,message:u}=o;return r(new yb[s](u),i)}case aA:return r(BigInt(o),i);case"BigInt":return r(Object(BigInt(o)),i);case"ArrayBuffer":return r(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:s}=new Uint8Array(o);return r(new DataView(s),o)}}return r(new yb[a](o),i)};return n},vb=e=>kD(new Map,e)(0),sa="",{toString:_D}={},{keys:CD}=Object,fo=e=>{const t=typeof e;if(t!=="object"||!e)return[pc,t];const r=_D.call(e).slice(8,-1);switch(r){case"Array":return[Ho,sa];case"Object":return[rl,sa];case"Date":return[pm,sa];case"RegExp":return[mm,sa];case"Map":return[gm,sa];case"Set":return[bm,sa];case"DataView":return[Ho,r]}return r.includes("Array")?[Ho,r]:r.includes("Error")?[iA,r]:[rl,r]},du=([e,t])=>e===pc&&(t==="function"||t==="symbol"),ID=(e,t,r,n)=>{const i=(o,s)=>{const u=n.push(o)-1;return r.set(s,u),u},a=o=>{if(r.has(o))return r.get(o);let[s,u]=fo(o);switch(s){case pc:{let c=o;switch(u){case"bigint":s=aA,c=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([nA],o)}return i([s,c],o)}case Ho:{if(u){let d=o;return u==="DataView"?d=new Uint8Array(o.buffer):u==="ArrayBuffer"&&(d=new Uint8Array(o)),i([u,[...d]],o)}const c=[],f=i([s,c],o);for(const d of o)c.push(a(d));return f}case rl:{if(u)switch(u){case"BigInt":return i([u,o.toString()],o);case"Boolean":case"Number":case"String":return i([u,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const c=[],f=i([s,c],o);for(const d of CD(o))(e||!du(fo(o[d])))&&c.push([a(d),a(o[d])]);return f}case pm:return i([s,o.toISOString()],o);case mm:{const{source:c,flags:f}=o;return i([s,{source:c,flags:f}],o)}case gm:{const c=[],f=i([s,c],o);for(const[d,h]of o)(e||!(du(fo(d))||du(fo(h))))&&c.push([a(d),a(h)]);return f}case bm:{const c=[],f=i([s,c],o);for(const d of o)(e||!du(fo(d)))&&c.push(a(d));return f}}const{message:l}=o;return i([s,{name:u,message:l}],o)};return a},xb=(e,{json:t,lossy:r}={})=>{const n=[];return ID(!(t||r),!!t,new Map,n)(e),n},Mi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?vb(xb(e,t)):structuredClone(e):(e,t)=>vb(xb(e,t));class Ls{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}}Ls.prototype.normal={};Ls.prototype.property={};Ls.prototype.space=void 0;function oA(e,t){const r={},n={};for(const i of e)Object.assign(r,i.property),Object.assign(n,i.normal);return new Ls(r,n,t)}function ss(e){return e.toLowerCase()}class sr{constructor(t,r){this.attribute=r,this.property=t}}sr.prototype.attribute="";sr.prototype.booleanish=!1;sr.prototype.boolean=!1;sr.prototype.commaOrSpaceSeparated=!1;sr.prototype.commaSeparated=!1;sr.prototype.defined=!1;sr.prototype.mustUseProperty=!1;sr.prototype.number=!1;sr.prototype.overloadedBoolean=!1;sr.prototype.property="";sr.prototype.spaceSeparated=!1;sr.prototype.space=void 0;let OD=0;const Ee=Ki(),ct=Ki(),Rh=Ki(),Z=Ki(),Ve=Ki(),Sa=Ki(),dr=Ki();function Ki(){return 2**++OD}const Lh=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ee,booleanish:ct,commaOrSpaceSeparated:dr,commaSeparated:Sa,number:Z,overloadedBoolean:Rh,spaceSeparated:Ve},Symbol.toStringTag,{value:"Module"})),_f=Object.keys(Lh);class ym extends sr{constructor(t,r,n,i){let a=-1;if(super(t,r),Eb(this,"space",i),typeof n=="number")for(;++a<_f.length;){const o=_f[a];Eb(this,_f[a],(n&Lh[o])===Lh[o])}}}ym.prototype.defined=!0;function Eb(e,t,r){r&&(e[t]=r)}function Ya(e){const t={},r={};for(const[n,i]of Object.entries(e.properties)){const a=new ym(n,e.transform(e.attributes||{},n),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),t[n]=a,r[ss(n)]=n,r[ss(a.attribute)]=n}return new Ls(t,r,e.space)}const sA=Ya({properties:{ariaActiveDescendant:null,ariaAtomic:ct,ariaAutoComplete:null,ariaBusy:ct,ariaChecked:ct,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:Ve,ariaCurrent:null,ariaDescribedBy:Ve,ariaDetails:null,ariaDisabled:ct,ariaDropEffect:Ve,ariaErrorMessage:null,ariaExpanded:ct,ariaFlowTo:Ve,ariaGrabbed:ct,ariaHasPopup:null,ariaHidden:ct,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ve,ariaLevel:Z,ariaLive:null,ariaModal:ct,ariaMultiLine:ct,ariaMultiSelectable:ct,ariaOrientation:null,ariaOwns:Ve,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:ct,ariaReadOnly:ct,ariaRelevant:null,ariaRequired:ct,ariaRoleDescription:Ve,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:ct,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function uA(e,t){return t in e?e[t]:t}function lA(e,t){return uA(e,t.toLowerCase())}const ND=Ya({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Sa,acceptCharset:Ve,accessKey:Ve,action:null,allow:null,allowFullScreen:Ee,allowPaymentRequest:Ee,allowUserMedia:Ee,alt:null,as:null,async:Ee,autoCapitalize:null,autoComplete:Ve,autoFocus:Ee,autoPlay:Ee,blocking:Ve,capture:null,charSet:null,checked:Ee,cite:null,className:Ve,cols:Z,colSpan:null,content:null,contentEditable:ct,controls:Ee,controlsList:Ve,coords:Z|Sa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ee,defer:Ee,dir:null,dirName:null,disabled:Ee,download:Rh,draggable:ct,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ee,formTarget:null,headers:Ve,height:Z,hidden:Rh,high:Z,href:null,hrefLang:null,htmlFor:Ve,httpEquiv:Ve,id:null,imageSizes:null,imageSrcSet:null,inert:Ee,inputMode:null,integrity:null,is:null,isMap:Ee,itemId:null,itemProp:Ve,itemRef:Ve,itemScope:Ee,itemType:Ve,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ee,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:Ee,muted:Ee,name:null,nonce:null,noModule:Ee,noValidate:Ee,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle: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:Ee,optimum:Z,pattern:null,ping:Ve,placeholder:null,playsInline:Ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ee,referrerPolicy:null,rel:Ve,required:Ee,reversed:Ee,rows:Z,rowSpan:Z,sandbox:Ve,scope:null,scoped:Ee,seamless:Ee,selected:Ee,shadowRootClonable:Ee,shadowRootDelegatesFocus:Ee,shadowRootMode:null,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:ct,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:Ee,useMap:null,value:ct,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ve,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ee,declare:Ee,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:Ee,noHref:Ee,noShade:Ee,noWrap:Ee,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:ct,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ee,disableRemotePlayback:Ee,prefix:null,property:null,results:Z,security:null,unselectable:null},space:"html",transform:lA}),PD=Ya({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",transformOrigin:"transform-origin",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"},properties:{about:dr,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:Ve,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:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:Ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,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:Sa,g2:Sa,glyphName:Sa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:dr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,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:Z,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:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ve,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:dr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:dr,rev:dr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:dr,requiredFeatures:dr,requiredFonts:dr,requiredFormats:dr,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:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:dr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:dr,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:dr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:uA}),cA=Ya({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),fA=Ya({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:lA}),dA=Ya({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),DD={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"},RD=/[A-Z]/g,Tb=/-[a-z]/g,LD=/^data[-\w.:]+$/i;function mc(e,t){const r=ss(t);let n=t,i=sr;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&LD.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Tb,jD);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Tb.test(a)){let o=a.replace(RD,MD);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=ym}return new i(n,t)}function MD(e){return"-"+e.toLowerCase()}function jD(e){return e.charAt(1).toUpperCase()}const Ms=oA([sA,ND,cA,fA,dA],"html"),ui=oA([sA,PD,cA,fA,dA],"svg");function wb(e){const t=[],r=String(e||"");let n=r.indexOf(","),i=0,a=!1;for(;!a;){n===-1&&(n=r.length,a=!0);const o=r.slice(i,n).trim();(o||!a)&&t.push(o),i=n+1,n=r.indexOf(",",i)}return t}function hA(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const Ab=/[#.]/g;function BD(e,t){const r=e||"",n={};let i=0,a,o;for(;i<r.length;){Ab.lastIndex=i;const s=Ab.exec(r),u=r.slice(i,s?s.index:r.length);u&&(a?a==="#"?n.id=u:Array.isArray(n.className)?n.className.push(u):n.className=[u]:o=u,i+=u.length),s&&(a=s[0],i++)}return{type:"element",tagName:o||t||"div",properties:n,children:[]}}function Sb(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function pA(e){return e.join(" ").trim()}function mA(e,t,r){const n=r?HD(r):void 0;function i(a,o,...s){let u;if(a==null){u={type:"root",children:[]};const l=o;s.unshift(l)}else{u=BD(a,t);const l=u.tagName.toLowerCase(),c=n?n.get(l):void 0;if(u.tagName=c||l,FD(o))s.unshift(o);else for(const[f,d]of Object.entries(o))$D(e,u.properties,f,d)}for(const l of s)Mh(u.children,l);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return i}function FD(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,r=Object.keys(e);for(const n of r){const i=t[n];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const o of a)if(typeof o!="number"&&typeof o!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function $D(e,t,r,n){const i=mc(e,r);let a;if(n!=null){if(typeof n=="number"){if(Number.isNaN(n))return;a=n}else typeof n=="boolean"?a=n:typeof n=="string"?i.spaceSeparated?a=Sb(n):i.commaSeparated?a=wb(n):i.commaOrSpaceSeparated?a=Sb(wb(n).join(" ")):a=kb(i,i.property,n):Array.isArray(n)?a=[...n]:a=i.property==="style"?UD(n):String(n);if(Array.isArray(a)){const o=[];for(const s of a)o.push(kb(i,i.property,s));a=o}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Mh(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const r of t)Mh(e,r);else if(typeof t=="object"&&"type"in t)t.type==="root"?Mh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function kb(e,t,r){if(typeof r=="string"){if(e.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((e.boolean||e.overloadedBoolean)&&(r===""||ss(r)===ss(t)))return!0}return r}function UD(e){const t=[];for(const[r,n]of Object.entries(e))t.push([r,n].join(": "));return t.join("; ")}function HD(e){const t=new Map;for(const r of e)t.set(r.toLowerCase(),r);return t}const zD=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],qD=mA(Ms,"div"),WD=mA(ui,"g",zD);function VD(e){const t=String(e),r=[];return{toOffset:i,toPoint:n};function n(a){if(typeof a=="number"&&a>-1&&a<=t.length){let o=0;for(;;){let s=r[o];if(s===void 0){const u=_b(t,r[o-1]);s=u===-1?t.length+1:u+1,r[o]=s}if(s>a)return{line:o+1,column:a-(o>0?r[o-1]:0)+1,offset:a};o++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;r.length<a.line;){const s=r[r.length-1],u=_b(t,s),l=u===-1?t.length+1:u+1;if(s===l)break;r.push(l)}const o=(a.line>1?r[a.line-2]:0)+a.column-1;if(o<r[a.line-1])return o}}}function _b(e,t){const r=e.indexOf("\r",t),n=e.indexOf(`
22
+ `,t);return n===-1?r:r===-1||r+1===n?n:r<n?r:n}const ki={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},gA={}.hasOwnProperty,YD=Object.prototype;function KD(e,t){const r=t||{};return vm({file:r.file||void 0,location:!1,schema:r.space==="svg"?ui:Ms,verbose:r.verbose||!1},e)}function vm(e,t){let r;switch(t.nodeName){case"#comment":{const n=t;return r={type:"comment",value:n.data},Fu(e,n,r),r}case"#document":case"#document-fragment":{const n=t,i="mode"in n?n.mode==="quirks"||n.mode==="limited-quirks":!1;if(r={type:"root",children:bA(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),o=VD(a),s=o.toPoint(0),u=o.toPoint(a.length);r.position={start:s,end:u}}return r}case"#documentType":{const n=t;return r={type:"doctype"},Fu(e,n,r),r}case"#text":{const n=t;return r={type:"text",value:n.value},Fu(e,n,r),r}default:return r=GD(e,t),r}}function bA(e,t){let r=-1;const n=[];for(;++r<t.length;){const i=vm(e,t[r]);n.push(i)}return n}function GD(e,t){const r=e.schema;e.schema=t.namespaceURI===ki.svg?ui:Ms;let n=-1;const i={};for(;++n<t.attrs.length;){const s=t.attrs[n],u=(s.prefix?s.prefix+":":"")+s.name;gA.call(YD,u)||(i[u]=s.value)}const o=(e.schema.space==="svg"?WD:qD)(t.tagName,i,bA(e,t.childNodes));if(Fu(e,t,o),o.tagName==="template"){const s=t,u=s.sourceCodeLocation,l=u&&u.startTag&&Ta(u.startTag),c=u&&u.endTag&&Ta(u.endTag),f=vm(e,s.content);l&&c&&e.file&&(f.position={start:l.end,end:c.start}),o.content=f}return e.schema=r,o}function Fu(e,t,r){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const n=XD(e,r,t.sourceCodeLocation);n&&(e.location=!0,r.position=n)}}function XD(e,t,r){const n=Ta(r);if(t.type==="element"){const i=t.children[t.children.length-1];if(n&&!r.endTag&&i&&i.position&&i.position.end&&(n.end=Object.assign({},i.position.end)),e.verbose){const a={};let o;if(r.attrs)for(o in r.attrs)gA.call(r.attrs,o)&&(a[mc(e.schema,o).property]=Ta(r.attrs[o]));r.startTag;const s=Ta(r.startTag),u=r.endTag?Ta(r.endTag):void 0,l={opening:s};u&&(l.closing=u),l.properties=a,t.data={position:l}}}return n}function Ta(e){const t=Cb({line:e.startLine,column:e.startCol,offset:e.startOffset}),r=Cb({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||r?{start:t,end:r}:void 0}function Cb(e){return e.line&&e.column?e:void 0}const Ib={}.hasOwnProperty;function yA(e,t){const r=t||{};function n(i,...a){let o=n.invalid;const s=n.handlers;if(i&&Ib.call(i,e)){const u=String(i[e]);o=Ib.call(s,u)?s[u]:n.unknown}if(o)return o.call(this,i,...a)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}const ZD={},QD={}.hasOwnProperty,vA=yA("type",{handlers:{root:eR,element:aR,text:nR,comment:iR,doctype:rR}});function JD(e,t){const n=(t||ZD).space;return vA(e,n==="svg"?ui:Ms)}function eR(e,t){const r={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return r.childNodes=xm(e.children,r,t),Ka(e,r),r}function tR(e,t){const r={nodeName:"#document-fragment",childNodes:[]};return r.childNodes=xm(e.children,r,t),Ka(e,r),r}function rR(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ka(e,t),t}function nR(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ka(e,t),t}function iR(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ka(e,t),t}function aR(e,t){const r=t;let n=r;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(n=ui);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&QD.call(e.properties,a)){const u=oR(n,a,e.properties[a]);u&&i.push(u)}}const o=n.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:ki[o],childNodes:[],parentNode:null};return s.childNodes=xm(e.children,s,n),Ka(e,s),e.tagName==="template"&&e.content&&(s.content=tR(e.content,n)),s}function oR(e,t,r){const n=mc(e,t);if(r===!1||r===null||r===void 0||typeof r=="number"&&Number.isNaN(r)||!r&&n.boolean)return;Array.isArray(r)&&(r=n.commaSeparated?hA(r):pA(r));const i={name:n.attribute,value:r===!0?"":String(r)};if(n.space&&n.space!=="html"&&n.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=n.attribute.slice(0,a)),i.namespace=ki[n.space]}return i}function xm(e,t,r){let n=-1;const i=[];if(e)for(;++n<e.length;){const a=vA(e[n],r);a.parentNode=t,i.push(a)}return i}function Ka(e,t){const r=e.position;r&&r.start&&r.end&&(r.start.offset,r.end.offset,t.sourceCodeLocation={startLine:r.start.line,startCol:r.start.column,startOffset:r.start.offset,endLine:r.end.line,endCol:r.end.column,endOffset:r.end.offset})}const sR=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],uR=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Je="�";var k;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(k||(k={}));const tr={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function xA(e){return e>=55296&&e<=57343}function lR(e){return e>=56320&&e<=57343}function cR(e,t){return(e-55296)*1024+9216+t}function EA(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function TA(e){return e>=64976&&e<=65007||uR.has(e)}var $;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})($||($={}));const fR=65536;class dR{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=fR,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,r){const{line:n,col:i,offset:a}=this,o=i+r,s=a+r;return{code:t,startLine:n,endLine:n,startCol:o,endCol:o,startOffset:s,endOffset:s}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const r=this.html.charCodeAt(this.pos+1);if(lR(r))return this.pos++,this._addGap(),cR(t,r)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,k.EOF;return this._err($.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,r){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=r}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,r){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(r)return this.html.startsWith(t,this.pos);for(let n=0;n<t.length;n++)if((this.html.charCodeAt(this.pos+n)|32)!==t.charCodeAt(n))return!1;return!0}peek(t){const r=this.pos+t;if(r>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,k.EOF;const n=this.html.charCodeAt(r);return n===k.CARRIAGE_RETURN?k.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,k.EOF;let t=this.html.charCodeAt(this.pos);return t===k.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,k.LINE_FEED):t===k.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,xA(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===k.LINE_FEED||t===k.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){EA(t)?this._err($.controlCharacterInInputStream):TA(t)&&this._err($.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Se;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Se||(Se={}));function wA(e,t){for(let r=e.attrs.length-1;r>=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null}const hR=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),pR=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function mR(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=pR.get(e))!==null&&t!==void 0?t:e}var wt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(wt||(wt={}));const gR=32;var Xn;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Xn||(Xn={}));function jh(e){return e>=wt.ZERO&&e<=wt.NINE}function bR(e){return e>=wt.UPPER_A&&e<=wt.UPPER_F||e>=wt.LOWER_A&&e<=wt.LOWER_F}function yR(e){return e>=wt.UPPER_A&&e<=wt.UPPER_Z||e>=wt.LOWER_A&&e<=wt.LOWER_Z||jh(e)}function vR(e){return e===wt.EQUALS||yR(e)}var Et;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Et||(Et={}));var xn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(xn||(xn={}));class xR{constructor(t,r,n){this.decodeTree=t,this.emitCodePoint=r,this.errors=n,this.state=Et.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=xn.Strict}startEntity(t){this.decodeMode=t,this.state=Et.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case Et.EntityStart:return t.charCodeAt(r)===wt.NUM?(this.state=Et.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=Et.NamedEntity,this.stateNamedEntity(t,r));case Et.NumericStart:return this.stateNumericStart(t,r);case Et.NumericDecimal:return this.stateNumericDecimal(t,r);case Et.NumericHex:return this.stateNumericHex(t,r);case Et.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|gR)===wt.LOWER_X?(this.state=Et.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=Et.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,n,i){if(r!==n){const a=n-r;this.result=this.result*Math.pow(i,a)+Number.parseInt(t.substr(r,a),i),this.consumed+=a}}stateNumericHex(t,r){const n=r;for(;r<t.length;){const i=t.charCodeAt(r);if(jh(i)||bR(i))r+=1;else return this.addToNumericResult(t,n,r,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,n,r,16),-1}stateNumericDecimal(t,r){const n=r;for(;r<t.length;){const i=t.charCodeAt(r);if(jh(i))r+=1;else return this.addToNumericResult(t,n,r,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,n,r,10),-1}emitNumericEntity(t,r){var n;if(this.consumed<=r)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===wt.SEMI)this.consumed+=1;else if(this.decodeMode===xn.Strict)return 0;return this.emitCodePoint(mR(this.result),this.consumed),this.errors&&(t!==wt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,r){const{decodeTree:n}=this;let i=n[this.treeIndex],a=(i&Xn.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){const o=t.charCodeAt(r);if(this.treeIndex=ER(n,i,this.treeIndex+Math.max(1,a),o),this.treeIndex<0)return this.result===0||this.decodeMode===xn.Attribute&&(a===0||vR(o))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],a=(i&Xn.VALUE_LENGTH)>>14,a!==0){if(o===wt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==xn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:r,decodeTree:n}=this,i=(n[r]&Xn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,n){const{decodeTree:i}=this;return this.emitCodePoint(r===1?i[t]&~Xn.VALUE_LENGTH:i[t+1],n),r===3&&this.emitCodePoint(i[t+2],n),n}end(){var t;switch(this.state){case Et.NamedEntity:return this.result!==0&&(this.decodeMode!==xn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Et.NumericDecimal:return this.emitNumericEntity(0,2);case Et.NumericHex:return this.emitNumericEntity(0,3);case Et.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Et.EntityStart:return 0}}}function ER(e,t,r,n){const i=(t&Xn.BRANCH_LENGTH)>>7,a=t&Xn.JUMP_TABLE;if(i===0)return a!==0&&n===a?r:-1;if(a){const u=n-a;return u<0||u>=i?-1:e[r+u]-1}let o=r,s=o+i-1;for(;o<=s;){const u=o+s>>>1,l=e[u];if(l<n)o=u+1;else if(l>n)s=u-1;else return e[u+i]}return-1}var K;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(K||(K={}));var Ni;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Ni||(Ni={}));var Sr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Sr||(Sr={}));var j;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(j||(j={}));var g;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(g||(g={}));const TR=new Map([[j.A,g.A],[j.ADDRESS,g.ADDRESS],[j.ANNOTATION_XML,g.ANNOTATION_XML],[j.APPLET,g.APPLET],[j.AREA,g.AREA],[j.ARTICLE,g.ARTICLE],[j.ASIDE,g.ASIDE],[j.B,g.B],[j.BASE,g.BASE],[j.BASEFONT,g.BASEFONT],[j.BGSOUND,g.BGSOUND],[j.BIG,g.BIG],[j.BLOCKQUOTE,g.BLOCKQUOTE],[j.BODY,g.BODY],[j.BR,g.BR],[j.BUTTON,g.BUTTON],[j.CAPTION,g.CAPTION],[j.CENTER,g.CENTER],[j.CODE,g.CODE],[j.COL,g.COL],[j.COLGROUP,g.COLGROUP],[j.DD,g.DD],[j.DESC,g.DESC],[j.DETAILS,g.DETAILS],[j.DIALOG,g.DIALOG],[j.DIR,g.DIR],[j.DIV,g.DIV],[j.DL,g.DL],[j.DT,g.DT],[j.EM,g.EM],[j.EMBED,g.EMBED],[j.FIELDSET,g.FIELDSET],[j.FIGCAPTION,g.FIGCAPTION],[j.FIGURE,g.FIGURE],[j.FONT,g.FONT],[j.FOOTER,g.FOOTER],[j.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[j.FORM,g.FORM],[j.FRAME,g.FRAME],[j.FRAMESET,g.FRAMESET],[j.H1,g.H1],[j.H2,g.H2],[j.H3,g.H3],[j.H4,g.H4],[j.H5,g.H5],[j.H6,g.H6],[j.HEAD,g.HEAD],[j.HEADER,g.HEADER],[j.HGROUP,g.HGROUP],[j.HR,g.HR],[j.HTML,g.HTML],[j.I,g.I],[j.IMG,g.IMG],[j.IMAGE,g.IMAGE],[j.INPUT,g.INPUT],[j.IFRAME,g.IFRAME],[j.KEYGEN,g.KEYGEN],[j.LABEL,g.LABEL],[j.LI,g.LI],[j.LINK,g.LINK],[j.LISTING,g.LISTING],[j.MAIN,g.MAIN],[j.MALIGNMARK,g.MALIGNMARK],[j.MARQUEE,g.MARQUEE],[j.MATH,g.MATH],[j.MENU,g.MENU],[j.META,g.META],[j.MGLYPH,g.MGLYPH],[j.MI,g.MI],[j.MO,g.MO],[j.MN,g.MN],[j.MS,g.MS],[j.MTEXT,g.MTEXT],[j.NAV,g.NAV],[j.NOBR,g.NOBR],[j.NOFRAMES,g.NOFRAMES],[j.NOEMBED,g.NOEMBED],[j.NOSCRIPT,g.NOSCRIPT],[j.OBJECT,g.OBJECT],[j.OL,g.OL],[j.OPTGROUP,g.OPTGROUP],[j.OPTION,g.OPTION],[j.P,g.P],[j.PARAM,g.PARAM],[j.PLAINTEXT,g.PLAINTEXT],[j.PRE,g.PRE],[j.RB,g.RB],[j.RP,g.RP],[j.RT,g.RT],[j.RTC,g.RTC],[j.RUBY,g.RUBY],[j.S,g.S],[j.SCRIPT,g.SCRIPT],[j.SEARCH,g.SEARCH],[j.SECTION,g.SECTION],[j.SELECT,g.SELECT],[j.SOURCE,g.SOURCE],[j.SMALL,g.SMALL],[j.SPAN,g.SPAN],[j.STRIKE,g.STRIKE],[j.STRONG,g.STRONG],[j.STYLE,g.STYLE],[j.SUB,g.SUB],[j.SUMMARY,g.SUMMARY],[j.SUP,g.SUP],[j.TABLE,g.TABLE],[j.TBODY,g.TBODY],[j.TEMPLATE,g.TEMPLATE],[j.TEXTAREA,g.TEXTAREA],[j.TFOOT,g.TFOOT],[j.TD,g.TD],[j.TH,g.TH],[j.THEAD,g.THEAD],[j.TITLE,g.TITLE],[j.TR,g.TR],[j.TRACK,g.TRACK],[j.TT,g.TT],[j.U,g.U],[j.UL,g.UL],[j.SVG,g.SVG],[j.VAR,g.VAR],[j.WBR,g.WBR],[j.XMP,g.XMP]]);function Ga(e){var t;return(t=TR.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const X=g,wR={[K.HTML]:new Set([X.ADDRESS,X.APPLET,X.AREA,X.ARTICLE,X.ASIDE,X.BASE,X.BASEFONT,X.BGSOUND,X.BLOCKQUOTE,X.BODY,X.BR,X.BUTTON,X.CAPTION,X.CENTER,X.COL,X.COLGROUP,X.DD,X.DETAILS,X.DIR,X.DIV,X.DL,X.DT,X.EMBED,X.FIELDSET,X.FIGCAPTION,X.FIGURE,X.FOOTER,X.FORM,X.FRAME,X.FRAMESET,X.H1,X.H2,X.H3,X.H4,X.H5,X.H6,X.HEAD,X.HEADER,X.HGROUP,X.HR,X.HTML,X.IFRAME,X.IMG,X.INPUT,X.LI,X.LINK,X.LISTING,X.MAIN,X.MARQUEE,X.MENU,X.META,X.NAV,X.NOEMBED,X.NOFRAMES,X.NOSCRIPT,X.OBJECT,X.OL,X.P,X.PARAM,X.PLAINTEXT,X.PRE,X.SCRIPT,X.SECTION,X.SELECT,X.SOURCE,X.STYLE,X.SUMMARY,X.TABLE,X.TBODY,X.TD,X.TEMPLATE,X.TEXTAREA,X.TFOOT,X.TH,X.THEAD,X.TITLE,X.TR,X.TRACK,X.UL,X.WBR,X.XMP]),[K.MATHML]:new Set([X.MI,X.MO,X.MN,X.MS,X.MTEXT,X.ANNOTATION_XML]),[K.SVG]:new Set([X.TITLE,X.FOREIGN_OBJECT,X.DESC]),[K.XLINK]:new Set,[K.XML]:new Set,[K.XMLNS]:new Set},Bh=new Set([X.H1,X.H2,X.H3,X.H4,X.H5,X.H6]);j.STYLE,j.SCRIPT,j.XMP,j.IFRAME,j.NOEMBED,j.NOFRAMES,j.PLAINTEXT;var I;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(I||(I={}));const ut={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function AR(e){return e>=k.DIGIT_0&&e<=k.DIGIT_9}function Do(e){return e>=k.LATIN_CAPITAL_A&&e<=k.LATIN_CAPITAL_Z}function SR(e){return e>=k.LATIN_SMALL_A&&e<=k.LATIN_SMALL_Z}function Hn(e){return SR(e)||Do(e)}function Ob(e){return Hn(e)||AR(e)}function hu(e){return e+32}function AA(e){return e===k.SPACE||e===k.LINE_FEED||e===k.TABULATION||e===k.FORM_FEED}function Nb(e){return AA(e)||e===k.SOLIDUS||e===k.GREATER_THAN_SIGN}function kR(e){return e===k.NULL?$.nullCharacterReference:e>1114111?$.characterReferenceOutsideUnicodeRange:xA(e)?$.surrogateCharacterReference:TA(e)?$.noncharacterCharacterReference:EA(e)||e===k.CARRIAGE_RETURN?$.controlCharacterReference:null}class _R{constructor(t,r){this.options=t,this.handler=r,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=I.DATA,this.returnState=I.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new dR(r),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new xR(hR,(n,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(n)},r.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err($.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err($.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{const i=kR(n);i&&this._err(i,1)}}:void 0)}_err(t,r=0){var n,i;(i=(n=this.handler).onParseError)===null||i===void 0||i.call(n,this.preprocessor.getError(t,r))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,r,n){this.active=!0,this.preprocessor.write(t,r),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let r=0;r<t;r++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,r){return this.preprocessor.startsWith(t,r)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Se.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Se.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Se.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Se.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,r){this.currentCharacterToken={type:t,chars:r,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,r;const n=this.currentToken;if(wA(n,this.currentAttr.name)===null){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){const i=(t=(r=n.location).attrs)!==null&&t!==void 0?t:r.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err($.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Ga(t.tagName),t.type===Se.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err($.endTagWithAttributes),t.selfClosing&&this._err($.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Se.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Se.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Se.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Se.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,r){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=r;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,r)}_emitCodePoint(t){const r=AA(t)?Se.WHITESPACE_CHARACTER:t===k.NULL?Se.NULL_CHARACTER:Se.CHARACTER;this._appendCharToCurrentCharacterToken(r,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Se.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=I.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?xn.Attribute:xn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===I.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case I.DATA:{this._stateData(t);break}case I.RCDATA:{this._stateRcdata(t);break}case I.RAWTEXT:{this._stateRawtext(t);break}case I.SCRIPT_DATA:{this._stateScriptData(t);break}case I.PLAINTEXT:{this._statePlaintext(t);break}case I.TAG_OPEN:{this._stateTagOpen(t);break}case I.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case I.TAG_NAME:{this._stateTagName(t);break}case I.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case I.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case I.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case I.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case I.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case I.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case I.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case I.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case I.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case I.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case I.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case I.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case I.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case I.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case I.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case I.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case I.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case I.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case I.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case I.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case I.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case I.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case I.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case I.BOGUS_COMMENT:{this._stateBogusComment(t);break}case I.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case I.COMMENT_START:{this._stateCommentStart(t);break}case I.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case I.COMMENT:{this._stateComment(t);break}case I.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case I.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case I.COMMENT_END:{this._stateCommentEnd(t);break}case I.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case I.DOCTYPE:{this._stateDoctype(t);break}case I.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case I.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case I.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case I.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case I.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case I.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case I.CDATA_SECTION:{this._stateCdataSection(t);break}case I.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case I.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case I.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case I.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case k.LESS_THAN_SIGN:{this.state=I.TAG_OPEN;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err($.unexpectedNullCharacter),this._emitCodePoint(t);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case k.AMPERSAND:{this._startCharacterReference();break}case k.LESS_THAN_SIGN:{this.state=I.RCDATA_LESS_THAN_SIGN;break}case k.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(Je);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case k.LESS_THAN_SIGN:{this.state=I.RAWTEXT_LESS_THAN_SIGN;break}case k.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(Je);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_LESS_THAN_SIGN;break}case k.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(Je);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case k.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(Je);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Hn(t))this._createStartTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case k.EXCLAMATION_MARK:{this.state=I.MARKUP_DECLARATION_OPEN;break}case k.SOLIDUS:{this.state=I.END_TAG_OPEN;break}case k.QUESTION_MARK:{this._err($.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t);break}case k.EOF:{this._err($.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err($.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=I.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Hn(t))this._createEndTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case k.GREATER_THAN_SIGN:{this._err($.missingEndTagName),this.state=I.DATA;break}case k.EOF:{this._err($.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err($.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const r=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.BEFORE_ATTRIBUTE_NAME;break}case k.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case k.NULL:{this._err($.unexpectedNullCharacter),r.tagName+=Je;break}case k.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:r.tagName+=String.fromCodePoint(Do(t)?hu(t):t)}}_stateRcdataLessThanSign(t){t===k.SOLIDUS?this.state=I.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Hn(t)?(this.state=I.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const r=this.currentToken;switch(r.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=I.BEFORE_ATTRIBUTE_NAME,!1;case k.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=I.SELF_CLOSING_START_TAG,!1;case k.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=I.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===k.SOLIDUS?this.state=I.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Hn(t)?(this.state=I.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case k.SOLIDUS:{this.state=I.SCRIPT_DATA_END_TAG_OPEN;break}case k.EXCLAMATION_MARK:{this.state=I.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=I.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Hn(t)?(this.state=I.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===k.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===k.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case k.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(Je);break}case k.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case k.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.NULL:{this._err($.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(Je);break}case k.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case k.HYPHEN_MINUS:{this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case k.NULL:{this._err($.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(Je);break}case k.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===k.SOLIDUS?this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Hn(t)?(this._emitChars("<"),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Hn(t)?(this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(tr.SCRIPT,!1)&&Nb(this.preprocessor.peek(tr.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<tr.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case k.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(Je);break}case k.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case k.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.NULL:{this._err($.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Je);break}case k.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case k.HYPHEN_MINUS:{this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case k.NULL:{this._err($.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Je);break}case k.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===k.SOLIDUS?(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(tr.SCRIPT,!1)&&Nb(this.preprocessor.peek(tr.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<tr.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.SOLIDUS:case k.GREATER_THAN_SIGN:case k.EOF:{this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case k.EQUALS_SIGN:{this._err($.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=I.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:case k.SOLIDUS:case k.GREATER_THAN_SIGN:case k.EOF:{this._leaveAttrName(),this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case k.EQUALS_SIGN:{this._leaveAttrName(),this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case k.QUOTATION_MARK:case k.APOSTROPHE:case k.LESS_THAN_SIGN:{this._err($.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case k.NULL:{this._err($.unexpectedNullCharacter),this.currentAttr.name+=Je;break}default:this.currentAttr.name+=String.fromCodePoint(Do(t)?hu(t):t)}}_stateAfterAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case k.EQUALS_SIGN:{this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{this.state=I.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this.state=I.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err($.missingAttributeValue),this.state=I.DATA,this.emitCurrentTagToken();break}default:this.state=I.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case k.QUOTATION_MARK:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err($.unexpectedNullCharacter),this.currentAttr.value+=Je;break}case k.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case k.APOSTROPHE:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err($.unexpectedNullCharacter),this.currentAttr.value+=Je;break}case k.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case k.NULL:{this._err($.unexpectedNullCharacter),this.currentAttr.value+=Je;break}case k.QUOTATION_MARK:case k.APOSTROPHE:case k.LESS_THAN_SIGN:case k.EQUALS_SIGN:case k.GRAVE_ACCENT:{this._err($.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case k.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case k.SOLIDUS:{this._leaveAttrValue(),this.state=I.SELF_CLOSING_START_TAG;break}case k.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this._err($.missingWhitespaceBetweenAttributes),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case k.GREATER_THAN_SIGN:{const r=this.currentToken;r.selfClosing=!0,this.state=I.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this._err($.unexpectedSolidusInTag),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const r=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(r);break}case k.EOF:{this.emitCurrentComment(r),this._emitEOFToken();break}case k.NULL:{this._err($.unexpectedNullCharacter),r.data+=Je;break}default:r.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(tr.DASH_DASH,!0)?(this._createCommentToken(tr.DASH_DASH.length+1),this.state=I.COMMENT_START):this._consumeSequenceIfMatch(tr.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(tr.DOCTYPE.length+1),this.state=I.DOCTYPE):this._consumeSequenceIfMatch(tr.CDATA_START,!0)?this.inForeignNode?this.state=I.CDATA_SECTION:(this._err($.cdataInHtmlContent),this._createCommentToken(tr.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=I.BOGUS_COMMENT):this._ensureHibernation()||(this._err($.incorrectlyOpenedComment),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case k.HYPHEN_MINUS:{this.state=I.COMMENT_START_DASH;break}case k.GREATER_THAN_SIGN:{this._err($.abruptClosingOfEmptyComment),this.state=I.DATA;const r=this.currentToken;this.emitCurrentComment(r);break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const r=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case k.GREATER_THAN_SIGN:{this._err($.abruptClosingOfEmptyComment),this.state=I.DATA,this.emitCurrentComment(r);break}case k.EOF:{this._err($.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateComment(t){const r=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=I.COMMENT_END_DASH;break}case k.LESS_THAN_SIGN:{r.data+="<",this.state=I.COMMENT_LESS_THAN_SIGN;break}case k.NULL:{this._err($.unexpectedNullCharacter),r.data+=Je;break}case k.EOF:{this._err($.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const r=this.currentToken;switch(t){case k.EXCLAMATION_MARK:{r.data+="!",this.state=I.COMMENT_LESS_THAN_SIGN_BANG;break}case k.LESS_THAN_SIGN:{r.data+="<";break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===k.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=I.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===k.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=I.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==k.GREATER_THAN_SIGN&&t!==k.EOF&&this._err($.nestedComment),this.state=I.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const r=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case k.EOF:{this._err($.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const r=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(r);break}case k.EXCLAMATION_MARK:{this.state=I.COMMENT_END_BANG;break}case k.HYPHEN_MINUS:{r.data+="-";break}case k.EOF:{this._err($.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const r=this.currentToken;switch(t){case k.HYPHEN_MINUS:{r.data+="--!",this.state=I.COMMENT_END_DASH;break}case k.GREATER_THAN_SIGN:{this._err($.incorrectlyClosedComment),this.state=I.DATA,this.emitCurrentComment(r);break}case k.EOF:{this._err($.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--!",this.state=I.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case k.EOF:{this._err($.eofInDoctype),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err($.missingWhitespaceBeforeDoctypeName),this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Do(t))this._createDoctypeToken(String.fromCharCode(hu(t))),this.state=I.DOCTYPE_NAME;else switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.NULL:{this._err($.unexpectedNullCharacter),this._createDoctypeToken(Je),this.state=I.DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this._err($.missingDoctypeName),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=I.DATA;break}case k.EOF:{this._err($.eofInDoctype),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=I.DOCTYPE_NAME}}_stateDoctypeName(t){const r=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.AFTER_DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(r);break}case k.NULL:{this._err($.unexpectedNullCharacter),r.name+=Je;break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.name+=String.fromCodePoint(Do(t)?hu(t):t)}}_stateAfterDoctypeName(t){const r=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(r);break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(tr.PUBLIC,!1)?this.state=I.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(tr.SYSTEM,!1)?this.state=I.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err($.invalidCharacterSequenceAfterDoctypeName),r.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const r=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.QUOTATION_MARK:{this._err($.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err($.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err($.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(r);break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const r=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{r.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{r.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err($.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(r);break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const r=this.currentToken;switch(t){case k.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.NULL:{this._err($.unexpectedNullCharacter),r.publicId+=Je;break}case k.GREATER_THAN_SIGN:{this._err($.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=I.DATA;break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const r=this.currentToken;switch(t){case k.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.NULL:{this._err($.unexpectedNullCharacter),r.publicId+=Je;break}case k.GREATER_THAN_SIGN:{this._err($.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=I.DATA;break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const r=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(r);break}case k.QUOTATION_MARK:{this._err($.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err($.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const r=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=I.DATA;break}case k.QUOTATION_MARK:{r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const r=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.QUOTATION_MARK:{this._err($.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err($.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err($.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(r);break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const r=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err($.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(r);break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const r=this.currentToken;switch(t){case k.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.NULL:{this._err($.unexpectedNullCharacter),r.systemId+=Je;break}case k.GREATER_THAN_SIGN:{this._err($.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=I.DATA;break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const r=this.currentToken;switch(t){case k.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.NULL:{this._err($.unexpectedNullCharacter),r.systemId+=Je;break}case k.GREATER_THAN_SIGN:{this._err($.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=I.DATA;break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const r=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=I.DATA;break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err($.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const r=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=I.DATA;break}case k.NULL:{this._err($.unexpectedNullCharacter);break}case k.EOF:{this.emitCurrentDoctype(r),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case k.RIGHT_SQUARE_BRACKET:{this.state=I.CDATA_SECTION_BRACKET;break}case k.EOF:{this._err($.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===k.RIGHT_SQUARE_BRACKET?this.state=I.CDATA_SECTION_END:(this._emitChars("]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case k.GREATER_THAN_SIGN:{this.state=I.DATA;break}case k.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(k.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ob(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ob(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===k.SEMICOLON&&this._err($.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const SA=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),Pb=new Set([...SA,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),nl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),CR=new Set([...nl,g.OL,g.UL]),IR=new Set([...nl,g.BUTTON]),Db=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),Rb=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),OR=new Set([g.TR,g.TEMPLATE,g.HTML]),NR=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),PR=new Set([g.TABLE,g.TEMPLATE,g.HTML]),DR=new Set([g.TD,g.TH]);class RR{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,r,n){this.treeAdapter=r,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===K.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,r){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=r,this.currentTagId=r,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,r,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,r){const n=this._indexOf(t);this.items[n]=r,n===this.stackTop&&(this.current=r)}insertAfter(t,r,n){const i=this._indexOf(t)+1;this.items.splice(i,0,r),this.tagIDs.splice(i,0,n),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let r=this.stackTop+1;do r=this.tagIDs.lastIndexOf(t,r-1);while(r>0&&this.treeAdapter.getNamespaceURI(this.items[r])!==K.HTML);this.shortenToLength(Math.max(r,0))}shortenToLength(t){for(;this.stackTop>=t;){const r=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(r,this.stackTop<t)}}popUntilElementPopped(t){const r=this._indexOf(t);this.shortenToLength(Math.max(r,0))}popUntilPopped(t,r){const n=this._indexOfTagNames(t,r);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Bh,K.HTML)}popUntilTableCellPopped(){this.popUntilPopped(DR,K.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,r){for(let n=this.stackTop;n>=0;n--)if(t.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===r)return n;return-1}clearBackTo(t,r){const n=this._indexOfTagNames(t,r);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(PR,K.HTML)}clearBackToTableBodyContext(){this.clearBackTo(NR,K.HTML)}clearBackToTableRowContext(){this.clearBackTo(OR,K.HTML)}remove(t){const r=this._indexOf(t);r>=0&&(r===this.stackTop?this.pop():(this.items.splice(r,1),this.tagIDs.splice(r,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const r=this._indexOf(t)-1;return r>=0?this.items[r]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInDynamicScope(t,r){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case K.HTML:{if(i===t)return!0;if(r.has(i))return!1;break}case K.SVG:{if(Rb.has(i))return!1;break}case K.MATHML:{if(Db.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,nl)}hasInListItemScope(t){return this.hasInDynamicScope(t,CR)}hasInButtonScope(t){return this.hasInDynamicScope(t,IR)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case K.HTML:{if(Bh.has(r))return!0;if(nl.has(r))return!1;break}case K.SVG:{if(Rb.has(r))return!1;break}case K.MATHML:{if(Db.has(r))return!1;break}}}return!0}hasInTableScope(t){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===K.HTML)switch(this.tagIDs[r]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===K.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===K.HTML)switch(this.tagIDs[r]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&SA.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Pb.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Pb.has(this.currentTagId);)this.pop()}}const Cf=3;var Qr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Qr||(Qr={}));const Lb={type:Qr.Marker};class LR{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,r){const n=[],i=r.length,a=this.treeAdapter.getTagName(t),o=this.treeAdapter.getNamespaceURI(t);for(let s=0;s<this.entries.length;s++){const u=this.entries[s];if(u.type===Qr.Marker)break;const{element:l}=u;if(this.treeAdapter.getTagName(l)===a&&this.treeAdapter.getNamespaceURI(l)===o){const c=this.treeAdapter.getAttrList(l);c.length===i&&n.push({idx:s,attrs:c})}}return n}_ensureNoahArkCondition(t){if(this.entries.length<Cf)return;const r=this.treeAdapter.getAttrList(t),n=this._getNoahArkConditionCandidates(t,r);if(n.length<Cf)return;const i=new Map(r.map(o=>[o.name,o.value]));let a=0;for(let o=0;o<n.length;o++){const s=n[o];s.attrs.every(u=>i.get(u.name)===u.value)&&(a+=1,a>=Cf&&this.entries.splice(s.idx,1))}}insertMarker(){this.entries.unshift(Lb)}pushElement(t,r){this._ensureNoahArkCondition(t),this.entries.unshift({type:Qr.Element,element:t,token:r})}insertElementAfterBookmark(t,r){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:Qr.Element,element:t,token:r})}removeEntry(t){const r=this.entries.indexOf(t);r!==-1&&this.entries.splice(r,1)}clearToLastMarker(){const t=this.entries.indexOf(Lb);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const r=this.entries.find(n=>n.type===Qr.Marker||this.treeAdapter.getTagName(n.element)===t);return r&&r.type===Qr.Element?r:null}getElementEntry(t){return this.entries.find(r=>r.type===Qr.Element&&r.element===t)}}const zn={createDocument(){return{nodeName:"#document",mode:Sr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,r){return{nodeName:e,tagName:e,attrs:r,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,r){const n=e.childNodes.indexOf(r);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,r,n){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=r,i.systemId=n;else{const a={nodeName:"#documentType",name:t,publicId:r,systemId:n,parentNode:null};zn.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const r=e.childNodes[e.childNodes.length-1];if(zn.isTextNode(r)){r.value+=t;return}}zn.appendChild(e,zn.createTextNode(t))},insertTextBefore(e,t,r){const n=e.childNodes[e.childNodes.indexOf(r)-1];n&&zn.isTextNode(n)?n.value+=t:zn.insertBefore(e,zn.createTextNode(t),r)},adoptAttributes(e,t){const r=new Set(e.attrs.map(n=>n.name));for(let n=0;n<t.length;n++)r.has(t[n].name)||e.attrs.push(t[n])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},kA="html",MR="about:legacy-compat",jR="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",_A=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],BR=[..._A,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],FR=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),CA=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],$R=[...CA,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Mb(e,t){return t.some(r=>e.startsWith(r))}function UR(e){return e.name===kA&&e.publicId===null&&(e.systemId===null||e.systemId===MR)}function HR(e){if(e.name!==kA)return Sr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===jR)return Sr.QUIRKS;let{publicId:r}=e;if(r!==null){if(r=r.toLowerCase(),FR.has(r))return Sr.QUIRKS;let n=t===null?BR:_A;if(Mb(r,n))return Sr.QUIRKS;if(n=t===null?CA:$R,Mb(r,n))return Sr.LIMITED_QUIRKS}return Sr.NO_QUIRKS}const jb={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},zR="definitionurl",qR="definitionURL",WR=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),VR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:K.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:K.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:K.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:K.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:K.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:K.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:K.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:K.XML}],["xml:space",{prefix:"xml",name:"space",namespace:K.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:K.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:K.XMLNS}]]),YR=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),KR=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function GR(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:n})=>n===Ni.COLOR||n===Ni.SIZE||n===Ni.FACE)||KR.has(t)}function IA(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===zR){e.attrs[t].name=qR;break}}function OA(e){for(let t=0;t<e.attrs.length;t++){const r=WR.get(e.attrs[t].name);r!=null&&(e.attrs[t].name=r)}}function Em(e){for(let t=0;t<e.attrs.length;t++){const r=VR.get(e.attrs[t].name);r&&(e.attrs[t].prefix=r.prefix,e.attrs[t].name=r.name,e.attrs[t].namespace=r.namespace)}}function XR(e){const t=YR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ga(e.tagName))}function ZR(e,t){return t===K.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function QR(e,t,r){if(t===K.MATHML&&e===g.ANNOTATION_XML){for(let n=0;n<r.length;n++)if(r[n].name===Ni.ENCODING){const i=r[n].value.toLowerCase();return i===jb.TEXT_HTML||i===jb.APPLICATION_XML}}return t===K.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function JR(e,t,r,n){return(!n||n===K.HTML)&&QR(e,t,r)||(!n||n===K.MATHML)&&ZR(e,t)}const eL="hidden",tL=8,rL=3;var D;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(D||(D={}));const nL={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},NA=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Bb={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:zn,onParseError:null};class Fb{constructor(t,r,n=null,i=null){this.fragmentContext=n,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=D.INITIAL,this.originalInsertionMode=D.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Bb,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=r??this.treeAdapter.createDocument(),this.tokenizer=new _R(this.options,this),this.activeFormattingElements=new LR(this.treeAdapter),this.fragmentContextID=n?Ga(this.treeAdapter.getTagName(n)):g.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new RR(this.document,this.treeAdapter,this)}static parse(t,r){const n=new this(r);return n.tokenizer.write(t,!0),n.document}static getFragmentParser(t,r){const n={...Bb,...r};t??(t=n.treeAdapter.createElement(j.TEMPLATE,K.HTML,[]));const i=n.treeAdapter.createElement("documentmock",K.HTML,[]),a=new this(n,i,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(D.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),r=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,r),r}_err(t,r,n){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:nL,o={code:r,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:n?a.startLine:a.endLine,endCol:n?a.startCol:a.endCol,endOffset:n?a.startOffset:a.endOffset};this.onParseError(o)}onItemPush(t,r,n){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),n&&this.openElements.stackTop>0&&this._setContextModes(t,r)}onItemPop(t,r){var n,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(n=this.treeAdapter).onItemPop)===null||i===void 0||i.call(n,t,this.openElements.current),r){let a,o;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,o=this.fragmentContextID):{current:a,currentTagId:o}=this.openElements,this._setContextModes(a,o)}}_setContextModes(t,r){const n=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===K.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&t!==void 0&&r!==void 0&&!this._isIntegrationPoint(r,t)}_switchToTextParsing(t,r){this._insertElement(t,K.HTML),this.tokenizer.state=r,this.originalInsertionMode=this.insertionMode,this.insertionMode=D.TEXT}switchToPlaintextParsing(){this.insertionMode=D.TEXT,this.originalInsertionMode=D.IN_BODY,this.tokenizer.state=ut.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===j.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==K.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=ut.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=ut.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=ut.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=ut.PLAINTEXT;break}}}_setDocumentType(t){const r=t.name||"",n=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,r,n,i),t.location){const o=this.treeAdapter.getChildNodes(this.document).find(s=>this.treeAdapter.isDocumentTypeNode(s));o&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}}_attachElementToTree(t,r){if(this.options.sourceCodeLocationInfo){const n=r&&{...r,startTag:r};this.treeAdapter.setNodeSourceCodeLocation(t,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n??this.document,t)}}_appendElement(t,r){const n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location)}_insertElement(t,r){const n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID)}_insertFakeElement(t,r){const n=this.treeAdapter.createElement(t,K.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,r)}_insertTemplate(t){const r=this.treeAdapter.createElement(t.tagName,K.HTML,t.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(r,n),this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(j.HTML,K.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.HTML)}_appendCommentNode(t,r){const n=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(r,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,t.location)}_insertCharacters(t){let r,n;if(this._shouldFosterParentOnInsertion()?({parent:r,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(r,t.chars,n):this.treeAdapter.insertText(r,t.chars)):(r=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(r,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(r),a=n?i.lastIndexOf(n):i.length,o=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:u,endCol:l,endOffset:c}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:u,endCol:l,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}_adoptNodes(t,r){for(let n=this.treeAdapter.getFirstChild(t);n;n=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(r,n)}_setEndLocation(t,r){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&r.location){const n=r.location,i=this.treeAdapter.getTagName(t),a=r.type===Se.END_TAG&&i===r.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let r,n;return this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,n=this.fragmentContextID):{current:r,currentTagId:n}=this.openElements,t.tagID===g.SVG&&this.treeAdapter.getTagName(r)===j.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(r)===K.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,r,K.HTML)}_processToken(t){switch(t.type){case Se.CHARACTER:{this.onCharacter(t);break}case Se.NULL_CHARACTER:{this.onNullCharacter(t);break}case Se.COMMENT:{this.onComment(t);break}case Se.DOCTYPE:{this.onDoctype(t);break}case Se.START_TAG:{this._processStartTag(t);break}case Se.END_TAG:{this.onEndTag(t);break}case Se.EOF:{this.onEof(t);break}case Se.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,r,n){const i=this.treeAdapter.getNamespaceURI(r),a=this.treeAdapter.getAttrList(r);return JR(t,i,a,n)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const r=this.activeFormattingElements.entries.findIndex(i=>i.type===Qr.Marker||this.openElements.contains(i.element)),n=r===-1?t-1:r-1;for(let i=n;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=D.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=D.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=D.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=D.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=D.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=D.IN_TABLE;return}case g.BODY:{this.insertionMode=D.IN_BODY;return}case g.FRAMESET:{this.insertionMode=D.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?D.AFTER_HEAD:D.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=D.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=D.IN_HEAD;return}break}}this.insertionMode=D.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let r=t-1;r>0;r--){const n=this.openElements.tagIDs[r];if(n===g.TEMPLATE)break;if(n===g.TABLE){this.insertionMode=D.IN_SELECT_IN_TABLE;return}}this.insertionMode=D.IN_SELECT}_isElementCausesFosterParenting(t){return NA.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const r=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(r)===K.HTML)return{parent:this.treeAdapter.getTemplateContent(r),beforeElement:null};break}case g.TABLE:{const n=this.treeAdapter.getParentNode(r);return n?{parent:n,beforeElement:r}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const r=this._findFosterParentingLocation();r.beforeElement?this.treeAdapter.insertBefore(r.parent,t,r.beforeElement):this.treeAdapter.appendChild(r.parent,t)}_isSpecialElement(t,r){const n=this.treeAdapter.getNamespaceURI(t);return wR[n].has(r)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){DM(this,t);return}switch(this.insertionMode){case D.INITIAL:{ho(this,t);break}case D.BEFORE_HTML:{zo(this,t);break}case D.BEFORE_HEAD:{qo(this,t);break}case D.IN_HEAD:{Wo(this,t);break}case D.IN_HEAD_NO_SCRIPT:{Vo(this,t);break}case D.AFTER_HEAD:{Yo(this,t);break}case D.IN_BODY:case D.IN_CAPTION:case D.IN_CELL:case D.IN_TEMPLATE:{DA(this,t);break}case D.TEXT:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{If(this,t);break}case D.IN_TABLE_TEXT:{FA(this,t);break}case D.IN_COLUMN_GROUP:{il(this,t);break}case D.AFTER_BODY:{al(this,t);break}case D.AFTER_AFTER_BODY:{$u(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){PM(this,t);return}switch(this.insertionMode){case D.INITIAL:{ho(this,t);break}case D.BEFORE_HTML:{zo(this,t);break}case D.BEFORE_HEAD:{qo(this,t);break}case D.IN_HEAD:{Wo(this,t);break}case D.IN_HEAD_NO_SCRIPT:{Vo(this,t);break}case D.AFTER_HEAD:{Yo(this,t);break}case D.TEXT:{this._insertCharacters(t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{If(this,t);break}case D.IN_COLUMN_GROUP:{il(this,t);break}case D.AFTER_BODY:{al(this,t);break}case D.AFTER_AFTER_BODY:{$u(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Fh(this,t);return}switch(this.insertionMode){case D.INITIAL:case D.BEFORE_HTML:case D.BEFORE_HEAD:case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:case D.IN_BODY:case D.IN_TABLE:case D.IN_CAPTION:case D.IN_COLUMN_GROUP:case D.IN_TABLE_BODY:case D.IN_ROW:case D.IN_CELL:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:case D.IN_TEMPLATE:case D.IN_FRAMESET:case D.AFTER_FRAMESET:{Fh(this,t);break}case D.IN_TABLE_TEXT:{po(this,t);break}case D.AFTER_BODY:{cL(this,t);break}case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{fL(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case D.INITIAL:{dL(this,t);break}case D.BEFORE_HEAD:case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:{this._err(t,$.misplacedDoctype);break}case D.IN_TABLE_TEXT:{po(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,$.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?RM(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case D.INITIAL:{ho(this,t);break}case D.BEFORE_HTML:{hL(this,t);break}case D.BEFORE_HEAD:{mL(this,t);break}case D.IN_HEAD:{Hr(this,t);break}case D.IN_HEAD_NO_SCRIPT:{yL(this,t);break}case D.AFTER_HEAD:{xL(this,t);break}case D.IN_BODY:{Bt(this,t);break}case D.IN_TABLE:{Ra(this,t);break}case D.IN_TABLE_TEXT:{po(this,t);break}case D.IN_CAPTION:{gM(this,t);break}case D.IN_COLUMN_GROUP:{Am(this,t);break}case D.IN_TABLE_BODY:{yc(this,t);break}case D.IN_ROW:{vc(this,t);break}case D.IN_CELL:{vM(this,t);break}case D.IN_SELECT:{HA(this,t);break}case D.IN_SELECT_IN_TABLE:{EM(this,t);break}case D.IN_TEMPLATE:{wM(this,t);break}case D.AFTER_BODY:{SM(this,t);break}case D.IN_FRAMESET:{kM(this,t);break}case D.AFTER_FRAMESET:{CM(this,t);break}case D.AFTER_AFTER_BODY:{OM(this,t);break}case D.AFTER_AFTER_FRAMESET:{NM(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?LM(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case D.INITIAL:{ho(this,t);break}case D.BEFORE_HTML:{pL(this,t);break}case D.BEFORE_HEAD:{gL(this,t);break}case D.IN_HEAD:{bL(this,t);break}case D.IN_HEAD_NO_SCRIPT:{vL(this,t);break}case D.AFTER_HEAD:{EL(this,t);break}case D.IN_BODY:{bc(this,t);break}case D.TEXT:{oM(this,t);break}case D.IN_TABLE:{us(this,t);break}case D.IN_TABLE_TEXT:{po(this,t);break}case D.IN_CAPTION:{bM(this,t);break}case D.IN_COLUMN_GROUP:{yM(this,t);break}case D.IN_TABLE_BODY:{$h(this,t);break}case D.IN_ROW:{UA(this,t);break}case D.IN_CELL:{xM(this,t);break}case D.IN_SELECT:{zA(this,t);break}case D.IN_SELECT_IN_TABLE:{TM(this,t);break}case D.IN_TEMPLATE:{AM(this,t);break}case D.AFTER_BODY:{WA(this,t);break}case D.IN_FRAMESET:{_M(this,t);break}case D.AFTER_FRAMESET:{IM(this,t);break}case D.AFTER_AFTER_BODY:{$u(this,t);break}}}onEof(t){switch(this.insertionMode){case D.INITIAL:{ho(this,t);break}case D.BEFORE_HTML:{zo(this,t);break}case D.BEFORE_HEAD:{qo(this,t);break}case D.IN_HEAD:{Wo(this,t);break}case D.IN_HEAD_NO_SCRIPT:{Vo(this,t);break}case D.AFTER_HEAD:{Yo(this,t);break}case D.IN_BODY:case D.IN_TABLE:case D.IN_CAPTION:case D.IN_COLUMN_GROUP:case D.IN_TABLE_BODY:case D.IN_ROW:case D.IN_CELL:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:{jA(this,t);break}case D.TEXT:{sM(this,t);break}case D.IN_TABLE_TEXT:{po(this,t);break}case D.IN_TEMPLATE:{qA(this,t);break}case D.AFTER_BODY:case D.IN_FRAMESET:case D.AFTER_FRAMESET:case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{wm(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===k.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:case D.TEXT:case D.IN_COLUMN_GROUP:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:case D.IN_FRAMESET:case D.AFTER_FRAMESET:{this._insertCharacters(t);break}case D.IN_BODY:case D.IN_CAPTION:case D.IN_CELL:case D.IN_TEMPLATE:case D.AFTER_BODY:case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{PA(this,t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{If(this,t);break}case D.IN_TABLE_TEXT:{BA(this,t);break}}}}function iL(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return r?e.openElements.contains(r.element)?e.openElements.hasInScope(t.tagID)||(r=null):(e.activeFormattingElements.removeEntry(r),r=null):MA(e,t),r}function aL(e,t){let r=null,n=e.openElements.stackTop;for(;n>=0;n--){const i=e.openElements.items[n];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[n])&&(r=i)}return r||(e.openElements.shortenToLength(Math.max(n,0)),e.activeFormattingElements.removeEntry(t)),r}function oL(e,t,r){let n=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==r;a++,o=i){i=e.openElements.getCommonAncestor(o);const s=e.activeFormattingElements.getElementEntry(o),u=s&&a>=rL;!s||u?(u&&e.activeFormattingElements.removeEntry(s),e.openElements.remove(o)):(o=sL(e,s),n===t&&(e.activeFormattingElements.bookmark=s),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(o,n),n=o)}return n}function sL(e,t){const r=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,r,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function uL(e,t,r){const n=e.treeAdapter.getTagName(t),i=Ga(n);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(r);else{const a=e.treeAdapter.getNamespaceURI(t);i===g.TEMPLATE&&a===K.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,r)}}function lL(e,t,r){const n=e.treeAdapter.getNamespaceURI(r.element),{token:i}=r,a=e.treeAdapter.createElement(i.tagName,n,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(r),e.openElements.remove(r.element),e.openElements.insertAfter(t,a,i.tagID)}function Tm(e,t){for(let r=0;r<tL;r++){const n=iL(e,t);if(!n)break;const i=aL(e,n);if(!i)break;e.activeFormattingElements.bookmark=n;const a=oL(e,i,n.element),o=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(a),o&&uL(e,o,a),lL(e,i,n)}}function Fh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function cL(e,t){e._appendCommentNode(t,e.openElements.items[0])}function fL(e,t){e._appendCommentNode(t,e.document)}function wm(e,t){if(e.stopped=!0,t.location){const r=e.fragmentContext?0:2;for(let n=e.openElements.stackTop;n>=r;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(n);if(i&&!i.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],o=e.treeAdapter.getNodeSourceCodeLocation(a);o&&!o.endTag&&e._setEndLocation(a,t)}}}}function dL(e,t){e._setDocumentType(t);const r=t.forceQuirks?Sr.QUIRKS:HR(t);UR(t)||e._err(t,$.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=D.BEFORE_HTML}function ho(e,t){e._err(t,$.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Sr.QUIRKS),e.insertionMode=D.BEFORE_HTML,e._processToken(t)}function hL(e,t){t.tagID===g.HTML?(e._insertElement(t,K.HTML),e.insertionMode=D.BEFORE_HEAD):zo(e,t)}function pL(e,t){const r=t.tagID;(r===g.HTML||r===g.HEAD||r===g.BODY||r===g.BR)&&zo(e,t)}function zo(e,t){e._insertFakeRootElement(),e.insertionMode=D.BEFORE_HEAD,e._processToken(t)}function mL(e,t){switch(t.tagID){case g.HTML:{Bt(e,t);break}case g.HEAD:{e._insertElement(t,K.HTML),e.headElement=e.openElements.current,e.insertionMode=D.IN_HEAD;break}default:qo(e,t)}}function gL(e,t){const r=t.tagID;r===g.HEAD||r===g.BODY||r===g.HTML||r===g.BR?qo(e,t):e._err(t,$.endTagWithoutMatchingOpenElement)}function qo(e,t){e._insertFakeElement(j.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=D.IN_HEAD,e._processToken(t)}function Hr(e,t){switch(t.tagID){case g.HTML:{Bt(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,ut.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,ut.RAWTEXT):(e._insertElement(t,K.HTML),e.insertionMode=D.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,ut.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,ut.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=D.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(D.IN_TEMPLATE);break}case g.HEAD:{e._err(t,$.misplacedStartTagForHeadElement);break}default:Wo(e,t)}}function bL(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=D.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{Wo(e,t);break}case g.TEMPLATE:{Gi(e,t);break}default:e._err(t,$.endTagWithoutMatchingOpenElement)}}function Gi(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,$.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,$.endTagWithoutMatchingOpenElement)}function Wo(e,t){e.openElements.pop(),e.insertionMode=D.AFTER_HEAD,e._processToken(t)}function yL(e,t){switch(t.tagID){case g.HTML:{Bt(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{Hr(e,t);break}case g.NOSCRIPT:{e._err(t,$.nestedNoscriptInHead);break}default:Vo(e,t)}}function vL(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=D.IN_HEAD;break}case g.BR:{Vo(e,t);break}default:e._err(t,$.endTagWithoutMatchingOpenElement)}}function Vo(e,t){const r=t.type===Se.EOF?$.openElementsLeftAfterEof:$.disallowedContentInNoscriptInHead;e._err(t,r),e.openElements.pop(),e.insertionMode=D.IN_HEAD,e._processToken(t)}function xL(e,t){switch(t.tagID){case g.HTML:{Bt(e,t);break}case g.BODY:{e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=D.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,K.HTML),e.insertionMode=D.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,$.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),Hr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,$.misplacedStartTagForHeadElement);break}default:Yo(e,t)}}function EL(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Yo(e,t);break}case g.TEMPLATE:{Gi(e,t);break}default:e._err(t,$.endTagWithoutMatchingOpenElement)}}function Yo(e,t){e._insertFakeElement(j.BODY,g.BODY),e.insertionMode=D.IN_BODY,gc(e,t)}function gc(e,t){switch(t.type){case Se.CHARACTER:{DA(e,t);break}case Se.WHITESPACE_CHARACTER:{PA(e,t);break}case Se.COMMENT:{Fh(e,t);break}case Se.START_TAG:{Bt(e,t);break}case Se.END_TAG:{bc(e,t);break}case Se.EOF:{jA(e,t);break}}}function PA(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function DA(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function TL(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function wL(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(r,t.attrs))}function AL(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&r&&(e.treeAdapter.detachNode(r),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,K.HTML),e.insertionMode=D.IN_FRAMESET)}function SL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,K.HTML)}function kL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Bh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,K.HTML)}function _L(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function CL(e,t){const r=e.openElements.tmplCount>0;(!e.formElement||r)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,K.HTML),r||(e.formElement=e.openElements.current))}function IL(e,t){e.framesetOk=!1;const r=t.tagID;for(let n=e.openElements.stackTop;n>=0;n--){const i=e.openElements.tagIDs[n];if(r===g.LI&&i===g.LI||(r===g.DD||r===g.DT)&&(i===g.DD||i===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==g.ADDRESS&&i!==g.DIV&&i!==g.P&&e._isSpecialElement(e.openElements.items[n],i))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,K.HTML)}function OL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.tokenizer.state=ut.PLAINTEXT}function NL(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.framesetOk=!1}function PL(e,t){const r=e.activeFormattingElements.getElementEntryInScopeWithTagName(j.A);r&&(Tm(e,t),e.openElements.remove(r.element),e.activeFormattingElements.removeEntry(r)),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function DL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function RL(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Tm(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function LL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function ML(e,t){e.treeAdapter.getDocumentMode(e.document)!==Sr.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=D.IN_TABLE}function RA(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function LA(e){const t=wA(e,Ni.TYPE);return t!=null&&t.toLowerCase()===eL}function jL(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),LA(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function BL(e,t){e._appendElement(t,K.HTML),t.ackSelfClosing=!0}function FL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function $L(e,t){t.tagName=j.IMG,t.tagID=g.IMG,RA(e,t)}function UL(e,t){e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.tokenizer.state=ut.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=D.TEXT}function HL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,ut.RAWTEXT)}function zL(e,t){e.framesetOk=!1,e._switchToTextParsing(t,ut.RAWTEXT)}function $b(e,t){e._switchToTextParsing(t,ut.RAWTEXT)}function qL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===D.IN_TABLE||e.insertionMode===D.IN_CAPTION||e.insertionMode===D.IN_TABLE_BODY||e.insertionMode===D.IN_ROW||e.insertionMode===D.IN_CELL?D.IN_SELECT_IN_TABLE:D.IN_SELECT}function WL(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function VL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,K.HTML)}function YL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,K.HTML)}function KL(e,t){e._reconstructActiveFormattingElements(),IA(t),Em(t),t.selfClosing?e._appendElement(t,K.MATHML):e._insertElement(t,K.MATHML),t.ackSelfClosing=!0}function GL(e,t){e._reconstructActiveFormattingElements(),OA(t),Em(t),t.selfClosing?e._appendElement(t,K.SVG):e._insertElement(t,K.SVG),t.ackSelfClosing=!0}function Ub(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function Bt(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{DL(e,t);break}case g.A:{PL(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{kL(e,t);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{SL(e,t);break}case g.LI:case g.DD:case g.DT:{IL(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{RA(e,t);break}case g.HR:{FL(e,t);break}case g.RB:case g.RTC:{VL(e,t);break}case g.RT:case g.RP:{YL(e,t);break}case g.PRE:case g.LISTING:{_L(e,t);break}case g.XMP:{HL(e,t);break}case g.SVG:{GL(e,t);break}case g.HTML:{TL(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{Hr(e,t);break}case g.BODY:{wL(e,t);break}case g.FORM:{CL(e,t);break}case g.NOBR:{RL(e,t);break}case g.MATH:{KL(e,t);break}case g.TABLE:{ML(e,t);break}case g.INPUT:{jL(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{BL(e,t);break}case g.IMAGE:{$L(e,t);break}case g.BUTTON:{NL(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{LL(e,t);break}case g.IFRAME:{zL(e,t);break}case g.SELECT:{qL(e,t);break}case g.OPTION:case g.OPTGROUP:{WL(e,t);break}case g.NOEMBED:case g.NOFRAMES:{$b(e,t);break}case g.FRAMESET:{AL(e,t);break}case g.TEXTAREA:{UL(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?$b(e,t):Ub(e,t);break}case g.PLAINTEXT:{OL(e,t);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:Ub(e,t)}}function XL(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=D.AFTER_BODY,e.options.sourceCodeLocationInfo)){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e._setEndLocation(r,t)}}function ZL(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=D.AFTER_BODY,WA(e,t))}function QL(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r))}function JL(e){const t=e.openElements.tmplCount>0,{formElement:r}=e;t||(e.formElement=null),(r||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):r&&e.openElements.remove(r))}function eM(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(j.P,g.P),e._closePElement()}function tM(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function rM(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r))}function nM(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function iM(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker())}function aM(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(j.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function MA(e,t){const r=t.tagName,n=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],o=e.openElements.tagIDs[i];if(n===o&&(n!==g.UNKNOWN||e.treeAdapter.getTagName(a)===r)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,o))break}}function bc(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{Tm(e,t);break}case g.P:{eM(e);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{QL(e,t);break}case g.LI:{tM(e);break}case g.DD:case g.DT:{rM(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{nM(e);break}case g.BR:{aM(e);break}case g.BODY:{XL(e,t);break}case g.HTML:{ZL(e,t);break}case g.FORM:{JL(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{iM(e,t);break}case g.TEMPLATE:{Gi(e,t);break}default:MA(e,t)}}function jA(e,t){e.tmplInsertionModeStack.length>0?qA(e,t):wm(e,t)}function oM(e,t){var r;t.tagID===g.SCRIPT&&((r=e.scriptHandler)===null||r===void 0||r.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function sM(e,t){e._err(t,$.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function If(e,t){if(e.openElements.currentTagId!==void 0&&NA.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=D.IN_TABLE_TEXT,t.type){case Se.CHARACTER:{FA(e,t);break}case Se.WHITESPACE_CHARACTER:{BA(e,t);break}}else js(e,t)}function uM(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,K.HTML),e.insertionMode=D.IN_CAPTION}function lM(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=D.IN_COLUMN_GROUP}function cM(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.COLGROUP,g.COLGROUP),e.insertionMode=D.IN_COLUMN_GROUP,Am(e,t)}function fM(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=D.IN_TABLE_BODY}function dM(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.TBODY,g.TBODY),e.insertionMode=D.IN_TABLE_BODY,yc(e,t)}function hM(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function pM(e,t){LA(t)?e._appendElement(t,K.HTML):js(e,t),t.ackSelfClosing=!0}function mM(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,K.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ra(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{dM(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{Hr(e,t);break}case g.COL:{cM(e,t);break}case g.FORM:{mM(e,t);break}case g.TABLE:{hM(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{fM(e,t);break}case g.INPUT:{pM(e,t);break}case g.CAPTION:{uM(e,t);break}case g.COLGROUP:{lM(e,t);break}default:js(e,t)}}function us(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{Gi(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:js(e,t)}}function js(e,t){const r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,gc(e,t),e.fosterParentingEnabled=r}function BA(e,t){e.pendingCharacterTokens.push(t)}function FA(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function po(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;r<e.pendingCharacterTokens.length;r++)js(e,e.pendingCharacterTokens[r]);else for(;r<e.pendingCharacterTokens.length;r++)e._insertCharacters(e.pendingCharacterTokens[r]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const $A=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function gM(e,t){const r=t.tagID;$A.has(r)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=D.IN_TABLE,Ra(e,t)):Bt(e,t)}function bM(e,t){const r=t.tagID;switch(r){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=D.IN_TABLE,r===g.TABLE&&us(e,t));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:bc(e,t)}}function Am(e,t){switch(t.tagID){case g.HTML:{Bt(e,t);break}case g.COL:{e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{Hr(e,t);break}default:il(e,t)}}function yM(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=D.IN_TABLE);break}case g.TEMPLATE:{Gi(e,t);break}case g.COL:break;default:il(e,t)}}function il(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=D.IN_TABLE,e._processToken(t))}function yc(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,K.HTML),e.insertionMode=D.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(j.TR,g.TR),e.insertionMode=D.IN_ROW,vc(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE,Ra(e,t));break}default:Ra(e,t)}}function $h(e,t){const r=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(r)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE,us(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:case g.TR:break;default:us(e,t)}}function vc(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,K.HTML),e.insertionMode=D.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE_BODY,yc(e,t));break}default:Ra(e,t)}}function UA(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE_BODY,$h(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE_BODY,$h(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:us(e,t)}}function vM(e,t){const r=t.tagID;$A.has(r)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),vc(e,t)):Bt(e,t)}function xM(e,t){const r=t.tagID;switch(r){case g.TD:case g.TH:{e.openElements.hasInTableScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=D.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(r)&&(e._closeTableCell(),UA(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:bc(e,t)}}function HA(e,t){switch(t.tagID){case g.HTML:{Bt(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,K.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,K.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{Hr(e,t);break}}}function zA(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{Gi(e,t);break}}}function EM(e,t){const r=t.tagID;r===g.CAPTION||r===g.TABLE||r===g.TBODY||r===g.TFOOT||r===g.THEAD||r===g.TR||r===g.TD||r===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):HA(e,t)}function TM(e,t){const r=t.tagID;r===g.CAPTION||r===g.TABLE||r===g.TBODY||r===g.TFOOT||r===g.THEAD||r===g.TR||r===g.TD||r===g.TH?e.openElements.hasInTableScope(r)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):zA(e,t)}function wM(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{Hr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=D.IN_TABLE,e.insertionMode=D.IN_TABLE,Ra(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=D.IN_COLUMN_GROUP,e.insertionMode=D.IN_COLUMN_GROUP,Am(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=D.IN_TABLE_BODY,e.insertionMode=D.IN_TABLE_BODY,yc(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=D.IN_ROW,e.insertionMode=D.IN_ROW,vc(e,t);break}default:e.tmplInsertionModeStack[0]=D.IN_BODY,e.insertionMode=D.IN_BODY,Bt(e,t)}}function AM(e,t){t.tagID===g.TEMPLATE&&Gi(e,t)}function qA(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):wm(e,t)}function SM(e,t){t.tagID===g.HTML?Bt(e,t):al(e,t)}function WA(e,t){var r;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=D.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.HTML){e._setEndLocation(e.openElements.items[0],t);const n=e.openElements.items[1];n&&!(!((r=e.treeAdapter.getNodeSourceCodeLocation(n))===null||r===void 0)&&r.endTag)&&e._setEndLocation(n,t)}}else al(e,t)}function al(e,t){e.insertionMode=D.IN_BODY,gc(e,t)}function kM(e,t){switch(t.tagID){case g.HTML:{Bt(e,t);break}case g.FRAMESET:{e._insertElement(t,K.HTML);break}case g.FRAME:{e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{Hr(e,t);break}}}function _M(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=D.AFTER_FRAMESET))}function CM(e,t){switch(t.tagID){case g.HTML:{Bt(e,t);break}case g.NOFRAMES:{Hr(e,t);break}}}function IM(e,t){t.tagID===g.HTML&&(e.insertionMode=D.AFTER_AFTER_FRAMESET)}function OM(e,t){t.tagID===g.HTML?Bt(e,t):$u(e,t)}function $u(e,t){e.insertionMode=D.IN_BODY,gc(e,t)}function NM(e,t){switch(t.tagID){case g.HTML:{Bt(e,t);break}case g.NOFRAMES:{Hr(e,t);break}}}function PM(e,t){t.chars=Je,e._insertCharacters(t)}function DM(e,t){e._insertCharacters(t),e.framesetOk=!1}function VA(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==K.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function RM(e,t){if(GR(t))VA(e),e._startTagOutsideForeignContent(t);else{const r=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(r);n===K.MATHML?IA(t):n===K.SVG&&(XR(t),OA(t)),Em(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}function LM(e,t){if(t.tagID===g.P||t.tagID===g.BR){VA(e),e._endTagOutsideForeignContent(t);return}for(let r=e.openElements.stackTop;r>0;r--){const n=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(n)===K.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(n);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(r);break}}}j.AREA,j.BASE,j.BASEFONT,j.BGSOUND,j.BR,j.COL,j.EMBED,j.FRAME,j.HR,j.IMG,j.INPUT,j.KEYGEN,j.LINK,j.META,j.PARAM,j.SOURCE,j.TRACK,j.WBR;const xc=YA("end"),cn=YA("start");function YA(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function KA(e){const t=cn(e),r=xc(e);if(t&&r)return{start:t,end:r}}const MM=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,jM=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Hb={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function GA(e,t){const r=YM(e),n=yA("type",{handlers:{root:BM,element:FM,text:$M,comment:ZA,doctype:UM,raw:zM},unknown:qM}),i={parser:r?new Fb(Hb):Fb.getFragmentParser(void 0,Hb),handle(s){n(s,i)},stitches:!1,options:t||{}};n(e,i),Xa(i,cn());const a=r?i.parser.document:i.parser.getFragment(),o=KD(a,{file:i.options.file});return i.stitches&&an(o,"comment",function(s,u,l){const c=s;if(c.value.stitch&&l&&u!==void 0){const f=l.children;return f[u]=c.value.stitch,u}}),o.type==="root"&&o.children.length===1&&o.children[0].type===e.type?o.children[0]:o}function XA(e,t){let r=-1;if(e)for(;++r<e.length;)t.handle(e[r])}function BM(e,t){XA(e.children,t)}function FM(e,t){WM(e,t),XA(e.children,t),VM(e,t)}function $M(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const r={type:Se.CHARACTER,chars:e.value,location:Bs(e)};Xa(t,cn(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function UM(e,t){const r={type:Se.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Bs(e)};Xa(t,cn(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function HM(e,t){t.stitches=!0;const r=KM(e);if("children"in e&&"children"in r){const n=GA({type:"root",children:e.children},t.options);r.children=n.children}ZA({type:"comment",value:{stitch:r}},t)}function ZA(e,t){const r=e.value,n={type:Se.COMMENT,data:r,location:Bs(e)};Xa(t,cn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function zM(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,QA(t,cn(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(MM,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const r=t.parser.tokenizer._consume();t.parser.tokenizer._callState(r)}}function qM(e,t){const r=e;if(t.options.passThrough&&t.options.passThrough.includes(r.type))HM(r,t);else{let n="";throw jM.has(r.type)&&(n=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+r.type+"` node"+n)}}function Xa(e,t){QA(e,t);const r=e.parser.tokenizer.currentCharacterToken;r&&r.location&&(r.location.endLine=e.parser.tokenizer.preprocessor.line,r.location.endCol=e.parser.tokenizer.preprocessor.col+1,r.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=ut.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function QA(e,t){if(t&&t.offset!==void 0){const r={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=r}}function WM(e,t){const r=e.tagName.toLowerCase();if(t.parser.tokenizer.state===ut.PLAINTEXT)return;Xa(t,cn(e));const n=t.parser.openElements.current;let i="namespaceURI"in n?n.namespaceURI:ki.html;i===ki.html&&r==="svg"&&(i=ki.svg);const a=JD({...e,children:[]},{space:i===ki.svg?"svg":"html"}),o={type:Se.START_TAG,tagName:r,tagID:Ga(r),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Bs(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=r}function VM(e,t){const r=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&sR.includes(r)||t.parser.tokenizer.state===ut.PLAINTEXT)return;Xa(t,xc(e));const n={type:Se.END_TAG,tagName:r,tagID:Ga(r),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Bs(e)};t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken),r===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===ut.RCDATA||t.parser.tokenizer.state===ut.RAWTEXT||t.parser.tokenizer.state===ut.SCRIPT_DATA)&&(t.parser.tokenizer.state=ut.DATA)}function YM(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Bs(e){const t=cn(e)||{line:void 0,column:void 0,offset:void 0},r=xc(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:r.line,endCol:r.column,endOffset:r.offset}}function KM(e){return"children"in e?Mi({...e,children:[]}):Mi(e)}function Uh(e){return function(t,r){return GA(t,{...e,file:r})}}const mi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Si={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...mi,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...mi],h2:[["className","sr-only"]],img:[...mi,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...mi,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...mi],table:[...mi],ul:[...mi,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Vn={}.hasOwnProperty;function GM(e,t){let r={type:"root",children:[]};const n={schema:t?{...Si,...t}:Si,stack:[]},i=JA(n,e);return i&&(Array.isArray(i)?i.length===1?r=i[0]:r.children=i:r=i),r}function JA(e,t){if(t&&typeof t=="object"){const r=t;switch(typeof r.type=="string"?r.type:""){case"comment":return XM(e,r);case"doctype":return ZM(e,r);case"element":return QM(e,r);case"root":return JM(e,r);case"text":return e6(e,r)}}}function XM(e,t){if(e.schema.allowComments){const r=typeof t.value=="string"?t.value:"",n=r.indexOf("-->"),a={type:"comment",value:n<0?r:r.slice(0,n)};return Fs(a,t),a}}function ZM(e,t){if(e.schema.allowDoctypes){const r={type:"doctype"};return Fs(r,t),r}}function QM(e,t){const r=typeof t.tagName=="string"?t.tagName:"";e.stack.push(r);const n=eS(e,t.children),i=t6(e,t.properties);e.stack.pop();let a=!1;if(r&&r!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(r))&&(a=!0,e.schema.ancestors&&Vn.call(e.schema.ancestors,r))){const s=e.schema.ancestors[r];let u=-1;for(a=!1;++u<s.length;)e.stack.includes(s[u])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(r)?n:void 0;const o={type:"element",tagName:r,properties:i,children:n};return Fs(o,t),o}function JM(e,t){const n={type:"root",children:eS(e,t.children)};return Fs(n,t),n}function e6(e,t){const n={type:"text",value:typeof t.value=="string"?t.value:""};return Fs(n,t),n}function eS(e,t){const r=[];if(Array.isArray(t)){const n=t;let i=-1;for(;++i<n.length;){const a=JA(e,n[i]);a&&(Array.isArray(a)?r.push(...a):r.push(a))}}return r}function t6(e,t){const r=e.stack[e.stack.length-1],n=e.schema.attributes,i=e.schema.required,a=n&&Vn.call(n,r)?n[r]:void 0,o=n&&Vn.call(n,"*")?n["*"]:void 0,s=t&&typeof t=="object"?t:{},u={};let l;for(l in s)if(Vn.call(s,l)){const c=s[l];let f=zb(e,qb(a,l),l,c);f==null&&(f=zb(e,qb(o,l),l,c)),f!=null&&(u[l]=f)}if(i&&Vn.call(i,r)){const c=i[r];for(l in c)Vn.call(c,l)&&!Vn.call(u,l)&&(u[l]=c[l])}return u}function zb(e,t,r,n){return t?Array.isArray(n)?r6(e,t,r,n):tS(e,t,r,n):void 0}function r6(e,t,r,n){let i=-1;const a=[];for(;++i<n.length;){const o=tS(e,t,r,n[i]);(typeof o=="number"||typeof o=="string")&&a.push(o)}return a}function tS(e,t,r,n){if(!(typeof n!="boolean"&&typeof n!="number"&&typeof n!="string")&&n6(e,r,n)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const o=t[a];if(o&&typeof o=="object"&&"flags"in o){if(o.test(String(n))){i=!0;break}}else if(o===n){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(r)?e.schema.clobberPrefix+n:n}}function n6(e,t,r){const n=e.schema.protocols&&Vn.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!n||n.length===0)return!0;const i=String(r),a=i.indexOf(":"),o=i.indexOf("?"),s=i.indexOf("#"),u=i.indexOf("/");if(a<0||u>-1&&a>u||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<n.length;){const c=n[l];if(a===c.length&&i.slice(0,c.length)===c)return!0}return!1}function Fs(e,t){const r=KA(t);t.data&&(e.data=Mi(t.data)),r&&(e.position=r)}function qb(e,t){let r,n=-1;if(e)for(;++n<e.length;){const i=e[n],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(r=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return r}function rS(e){return function(t){return GM(t,e)}}function Wb(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;i!==-1;)n++,i=r.indexOf(t,i+t.length);return n}const Yt=li(/[A-Za-z]/),Mt=li(/[\dA-Za-z]/),i6=li(/[#-'*+\--9=?A-Z^-~]/);function ol(e){return e!==null&&(e<32||e===127)}const Hh=li(/\d/),a6=li(/[\dA-Fa-f]/),o6=li(/[!-/:-@[-`{-~]/);function de(e){return e!==null&&e<-2}function We(e){return e!==null&&(e<0||e===32)}function Ie(e){return e===-2||e===-1||e===32}const Ec=li(new RegExp("\\p{P}|\\p{S}","u")),ji=li(/\s/);function li(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function s6(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function u6(e,t,r){const i=dc((r||{}).ignore||[]),a=l6(t);let o=-1;for(;++o<a.length;)hm(e,"text",s);function s(l,c){let f=-1,d;for(;++f<c.length;){const h=c[f],p=d?d.children:void 0;if(i(h,p?p.indexOf(h):void 0,d))return;d=h}if(d)return u(l,c)}function u(l,c){const f=c[c.length-1],d=a[o][0],h=a[o][1];let p=0;const y=f.children.indexOf(l);let v=!1,T=[];d.lastIndex=0;let x=d.exec(l.value);for(;x;){const S=x.index,w={index:x.index,input:x.input,stack:[...c,l]};let A=h(...x,w);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?d.lastIndex=S+1:(p!==S&&T.push({type:"text",value:l.value.slice(p,S)}),Array.isArray(A)?T.push(...A):A&&T.push(A),p=S+x[0].length,v=!0),!d.global)break;x=d.exec(l.value)}return v?(p<l.value.length&&T.push({type:"text",value:l.value.slice(p)}),f.children.splice(y,1,...T)):T=[l],y+T.length}}function l6(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let n=-1;for(;++n<r.length;){const i=r[n];t.push([c6(i[0]),f6(i[1])])}return t}function c6(e){return typeof e=="string"?new RegExp(s6(e),"g"):e}function f6(e){return typeof e=="function"?e:function(){return e}}const Of="phrasing",Nf=["autolink","link","image","label"];function d6(){return{transforms:[v6],enter:{literalAutolink:p6,literalAutolinkEmail:Pf,literalAutolinkHttp:Pf,literalAutolinkWww:Pf},exit:{literalAutolink:y6,literalAutolinkEmail:b6,literalAutolinkHttp:m6,literalAutolinkWww:g6}}}function h6(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Of,notInConstruct:Nf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Of,notInConstruct:Nf},{character:":",before:"[ps]",after:"\\/",inConstruct:Of,notInConstruct:Nf}]}}function p6(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Pf(e){this.config.enter.autolinkProtocol.call(this,e)}function m6(e){this.config.exit.autolinkProtocol.call(this,e)}function g6(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 b6(e){this.config.exit.autolinkEmail.call(this,e)}function y6(e){this.exit(e)}function v6(e){u6(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,x6],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),E6]],{ignore:["link","linkReference"]})}function x6(e,t,r,n,i){let a="";if(!nS(i)||(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!T6(r)))return!1;const o=w6(r+n);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function E6(e,t,r,n){return!nS(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function T6(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 w6(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const i=Wb(e,"(");let a=Wb(e,")");for(;n!==-1&&i>a;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),a++;return[e,r]}function nS(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||ji(r)||Ec(r))&&(!t||r!==47)}function Br(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}iS.peek=P6;function A6(){this.buffer()}function S6(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function k6(){this.buffer()}function _6(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function C6(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Br(this.sliceSerialize(e)).toLowerCase(),r.label=t}function I6(e){this.exit(e)}function O6(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Br(this.sliceSerialize(e)).toLowerCase(),r.label=t}function N6(e){this.exit(e)}function P6(){return"["}function iS(e,t,r,n){const i=r.createTracker(n);let a=i.move("[^");const o=r.enter("footnoteReference"),s=r.enter("reference");return a+=i.move(r.safe(r.associationId(e),{after:"]",before:a})),s(),o(),a+=i.move("]"),a}function D6(){return{enter:{gfmFootnoteCallString:A6,gfmFootnoteCall:S6,gfmFootnoteDefinitionLabelString:k6,gfmFootnoteDefinition:_6},exit:{gfmFootnoteCallString:C6,gfmFootnoteCall:I6,gfmFootnoteDefinitionLabelString:O6,gfmFootnoteDefinition:N6}}}function R6(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:iS},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,a,o){const s=a.createTracker(o);let u=s.move("[^");const l=a.enter("footnoteDefinition"),c=a.enter("label");return u+=s.move(a.safe(a.associationId(n),{before:u,after:"]"})),c(),u+=s.move("]:"),n.children&&n.children.length>0&&(s.shift(4),u+=s.move((t?`
23
+ `:" ")+a.indentLines(a.containerFlow(n,s.current()),t?aS:L6))),l(),u}}function L6(e,t,r){return t===0?e:aS(e,t,r)}function aS(e,t,r){return(r?"":" ")+e}const M6=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];oS.peek=U6;function j6(){return{canContainEols:["delete"],enter:{strikethrough:F6},exit:{strikethrough:$6}}}function B6(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:M6}],handlers:{delete:oS}}}function F6(e){this.enter({type:"delete",children:[]},e)}function $6(e){this.exit(e)}function oS(e,t,r,n){const i=r.createTracker(n),a=r.enter("strikethrough");let o=i.move("~~");return o+=r.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function U6(){return"~"}function H6(e){return e.length}function z6(e,t){const r=t||{},n=(r.align||[]).concat(),i=r.stringLength||H6,a=[],o=[],s=[],u=[];let l=0,c=-1;for(;++c<e.length;){const b=[],y=[];let v=-1;for(e[c].length>l&&(l=e[c].length);++v<e[c].length;){const T=q6(e[c][v]);if(r.alignDelimiters!==!1){const x=i(T);y[v]=x,(u[v]===void 0||x>u[v])&&(u[v]=x)}b.push(T)}o[c]=b,s[c]=y}let f=-1;if(typeof n=="object"&&"length"in n)for(;++f<l;)a[f]=Vb(n[f]);else{const b=Vb(n);for(;++f<l;)a[f]=b}f=-1;const d=[],h=[];for(;++f<l;){const b=a[f];let y="",v="";b===99?(y=":",v=":"):b===108?y=":":b===114&&(v=":");let T=r.alignDelimiters===!1?1:Math.max(1,u[f]-y.length-v.length);const x=y+"-".repeat(T)+v;r.alignDelimiters!==!1&&(T=y.length+T+v.length,T>u[f]&&(u[f]=T),h[f]=T),d[f]=x}o.splice(1,0,d),s.splice(1,0,h),c=-1;const p=[];for(;++c<o.length;){const b=o[c],y=s[c];f=-1;const v=[];for(;++f<l;){const T=b[f]||"";let x="",S="";if(r.alignDelimiters!==!1){const w=u[f]-(y[f]||0),A=a[f];A===114?x=" ".repeat(w):A===99?w%2?(x=" ".repeat(w/2+.5),S=" ".repeat(w/2-.5)):(x=" ".repeat(w/2),S=x):S=" ".repeat(w)}r.delimiterStart!==!1&&!f&&v.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&T==="")&&(r.delimiterStart!==!1||f)&&v.push(" "),r.alignDelimiters!==!1&&v.push(x),v.push(T),r.alignDelimiters!==!1&&v.push(S),r.padding!==!1&&v.push(" "),(r.delimiterEnd!==!1||f!==l-1)&&v.push("|")}p.push(r.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return p.join(`
24
+ `)}function q6(e){return e==null?"":String(e)}function Vb(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 W6(e,t,r,n){const i=r.enter("blockquote"),a=r.createTracker(n);a.move("> "),a.shift(2);const o=r.indentLines(r.containerFlow(e,a.current()),V6);return i(),o}function V6(e,t,r){return">"+(r?"":" ")+e}function Y6(e,t){return Yb(e,t.inConstruct,!0)&&!Yb(e,t.notInConstruct,!1)}function Yb(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function Kb(e,t,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
25
+ `&&Y6(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
26
+ `}function K6(e,t){const r=String(e);let n=r.indexOf(t),i=n,a=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++a>o&&(o=a):a=1,i=n+t.length,n=r.indexOf(t,i);return o}function G6(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 X6(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 Z6(e,t,r,n){const i=X6(r),a=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(G6(e,r)){const f=r.enter("codeIndented"),d=r.indentLines(a,Q6);return f(),d}const s=r.createTracker(n),u=i.repeat(Math.max(K6(a,i)+1,3)),l=r.enter("codeFenced");let c=s.move(u);if(e.lang){const f=r.enter(`codeFencedLang${o}`);c+=s.move(r.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=r.enter(`codeFencedMeta${o}`);c+=s.move(" "),c+=s.move(r.safe(e.meta,{before:c,after:`
27
+ `,encode:["`"],...s.current()})),f()}return c+=s.move(`
28
+ `),a&&(c+=s.move(a+`
29
+ `)),c+=s.move(u),l(),c}function Q6(e,t,r){return(r?"":" ")+e}function Sm(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 J6(e,t,r,n){const i=Sm(r),a=i==='"'?"Quote":"Apostrophe",o=r.enter("definition");let s=r.enter("label");const u=r.createTracker(n);let l=u.move("[");return l+=u.move(r.safe(r.associationId(e),{before:l,after:"]",...u.current()})),l+=u.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(r.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(s=r.enter("destinationRaw"),l+=u.move(r.safe(e.url,{before:l,after:e.title?" ":`
30
+ `,...u.current()}))),s(),e.title&&(s=r.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(r.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),o(),l}function e4(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function ls(e){return"&#x"+e.toString(16).toUpperCase()+";"}function La(e){if(e===null||We(e)||ji(e))return 1;if(Ec(e))return 2}function sl(e,t,r){const n=La(e),i=La(t);return n===void 0?i===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}sS.peek=t4;function sS(e,t,r,n){const i=e4(r),a=r.enter("emphasis"),o=r.createTracker(n),s=o.move(i);let u=o.move(r.containerPhrasing(e,{after:i,before:s,...o.current()}));const l=u.charCodeAt(0),c=sl(n.before.charCodeAt(n.before.length-1),l,i);c.inside&&(u=ls(l)+u.slice(1));const f=u.charCodeAt(u.length-1),d=sl(n.after.charCodeAt(0),f,i);d.inside&&(u=u.slice(0,-1)+ls(f));const h=o.move(i);return a(),r.attentionEncodeSurroundingInfo={after:d.outside,before:c.outside},s+u+h}function t4(e,t,r){return r.options.emphasis||"*"}const r4={};function km(e,t){const r=r4,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return uS(e,n,i)}function uS(e,t,r){if(n4(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Gb(e.children,t,r)}return Array.isArray(e)?Gb(e,t,r):""}function Gb(e,t,r){const n=[];let i=-1;for(;++i<e.length;)n[i]=uS(e[i],t,r);return n.join("")}function n4(e){return!!(e&&typeof e=="object")}function i4(e,t){let r=!1;return an(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,Dh}),!!((!e.depth||e.depth<3)&&km(e)&&(t.options.setext||r))}function a4(e,t,r,n){const i=Math.max(Math.min(6,e.depth||1),1),a=r.createTracker(n);if(i4(e,r)){const c=r.enter("headingSetext"),f=r.enter("phrasing"),d=r.containerPhrasing(e,{...a.current(),before:`
31
+ `,after:`
32
+ `});return f(),c(),d+`
33
+ `+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
34
+ `))+1))}const o="#".repeat(i),s=r.enter("headingAtx"),u=r.enter("phrasing");a.move(o+" ");let l=r.containerPhrasing(e,{before:"# ",after:`
35
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=ls(l.charCodeAt(0))+l.slice(1)),l=l?o+" "+l:o,r.options.closeAtx&&(l+=" "+o),u(),s(),l}lS.peek=o4;function lS(e){return e.value||""}function o4(){return"<"}cS.peek=s4;function cS(e,t,r,n){const i=Sm(r),a=i==='"'?"Quote":"Apostrophe",o=r.enter("image");let s=r.enter("label");const u=r.createTracker(n);let l=u.move("![");return l+=u.move(r.safe(e.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(r.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(s=r.enter("destinationRaw"),l+=u.move(r.safe(e.url,{before:l,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=r.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(r.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),l+=u.move(")"),o(),l}function s4(){return"!"}fS.peek=u4;function fS(e,t,r,n){const i=e.referenceType,a=r.enter("imageReference");let o=r.enter("label");const s=r.createTracker(n);let u=s.move("![");const l=r.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),o();const c=r.stack;r.stack=[],o=r.enter("reference");const f=r.safe(r.associationId(e),{before:u,after:"]",...s.current()});return o(),r.stack=c,a(),i==="full"||!l||l!==f?u+=s.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function u4(){return"!"}dS.peek=l4;function dS(e,t,r){let n=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++a<r.unsafe.length;){const o=r.unsafe[a],s=r.compilePattern(o);let u;if(o.atBreak)for(;u=s.exec(n);){let l=u.index;n.charCodeAt(l)===10&&n.charCodeAt(l-1)===13&&l--,n=n.slice(0,l)+" "+n.slice(u.index+1)}}return i+n+i}function l4(){return"`"}function hS(e,t){const r=km(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}pS.peek=c4;function pS(e,t,r,n){const i=Sm(r),a=i==='"'?"Quote":"Apostrophe",o=r.createTracker(n);let s,u;if(hS(e,r)){const c=r.stack;r.stack=[],s=r.enter("autolink");let f=o.move("<");return f+=o.move(r.containerPhrasing(e,{before:f,after:">",...o.current()})),f+=o.move(">"),s(),r.stack=c,f}s=r.enter("link"),u=r.enter("label");let l=o.move("[");return l+=o.move(r.containerPhrasing(e,{before:l,after:"](",...o.current()})),l+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=r.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(r.safe(e.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(u=r.enter("destinationRaw"),l+=o.move(r.safe(e.url,{before:l,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=r.enter(`title${a}`),l+=o.move(" "+i),l+=o.move(r.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),u()),l+=o.move(")"),s(),l}function c4(e,t,r){return hS(e,r)?"<":"["}mS.peek=f4;function mS(e,t,r,n){const i=e.referenceType,a=r.enter("linkReference");let o=r.enter("label");const s=r.createTracker(n);let u=s.move("[");const l=r.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),o();const c=r.stack;r.stack=[],o=r.enter("reference");const f=r.safe(r.associationId(e),{before:u,after:"]",...s.current()});return o(),r.stack=c,a(),i==="full"||!l||l!==f?u+=s.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function f4(){return"["}function _m(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 d4(e){const t=_m(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function h4(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 gS(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 p4(e,t,r,n){const i=r.enter("list"),a=r.bulletCurrent;let o=e.ordered?h4(r):_m(r);const s=e.ordered?o==="."?")":".":d4(r);let u=t&&r.bulletLastUsed?o===r.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&c&&(!c.children||!c.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(u=!0),gS(r)===o&&c){let f=-1;for(;++f<e.children.length;){const d=e.children[f];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(o=s),r.bulletCurrent=o;const l=r.containerFlow(e,n);return r.bulletLastUsed=o,r.bulletCurrent=a,i(),l}function m4(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 g4(e,t,r,n){const i=m4(r);let a=r.bulletCurrent||_m(r);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=r.createTracker(n);s.move(a+" ".repeat(o-a.length)),s.shift(o);const u=r.enter("listItem"),l=r.indentLines(r.containerFlow(e,s.current()),c);return u(),l;function c(f,d,h){return d?(h?"":" ".repeat(o))+f:(h?a:a+" ".repeat(o-a.length))+f}}function b4(e,t,r,n){const i=r.enter("paragraph"),a=r.enter("phrasing"),o=r.containerPhrasing(e,n);return a(),i(),o}const y4=dc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function v4(e,t,r,n){return(e.children.some(function(o){return y4(o)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function x4(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}bS.peek=E4;function bS(e,t,r,n){const i=x4(r),a=r.enter("strong"),o=r.createTracker(n),s=o.move(i+i);let u=o.move(r.containerPhrasing(e,{after:i,before:s,...o.current()}));const l=u.charCodeAt(0),c=sl(n.before.charCodeAt(n.before.length-1),l,i);c.inside&&(u=ls(l)+u.slice(1));const f=u.charCodeAt(u.length-1),d=sl(n.after.charCodeAt(0),f,i);d.inside&&(u=u.slice(0,-1)+ls(f));const h=o.move(i+i);return a(),r.attentionEncodeSurroundingInfo={after:d.outside,before:c.outside},s+u+h}function E4(e,t,r){return r.options.strong||"*"}function T4(e,t,r,n){return r.safe(e.value,n)}function w4(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 A4(e,t,r){const n=(gS(r)+(r.options.ruleSpaces?" ":"")).repeat(w4(r));return r.options.ruleSpaces?n.slice(0,-1):n}const yS={blockquote:W6,break:Kb,code:Z6,definition:J6,emphasis:sS,hardBreak:Kb,heading:a4,html:lS,image:cS,imageReference:fS,inlineCode:dS,link:pS,linkReference:mS,list:p4,listItem:g4,paragraph:b4,root:v4,strong:bS,text:T4,thematicBreak:A4},Xb=document.createElement("i");function Cm(e){const t="&"+e+";";Xb.innerHTML=t;const r=Xb.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function vS(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}const S4=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function k4(e){return e.replace(S4,_4)}function _4(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const i=r.charCodeAt(1),a=i===120||i===88;return vS(r.slice(a?2:1),a?16:10)}return Cm(r)||e}function C4(){return{enter:{table:I4,tableData:Zb,tableHeader:Zb,tableRow:N4},exit:{codeText:P4,table:O4,tableData:Df,tableHeader:Df,tableRow:Df}}}function I4(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function O4(e){this.exit(e),this.data.inTable=void 0}function N4(e){this.enter({type:"tableRow",children:[]},e)}function Df(e){this.exit(e)}function Zb(e){this.enter({type:"tableCell",children:[]},e)}function P4(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,D4));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function D4(e,t){return t==="|"?t:e}function R4(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,a=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
36
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:o,tableCell:u,tableRow:s}};function o(h,p,b,y){return l(c(h,b,y),h.align)}function s(h,p,b,y){const v=f(h,b,y),T=l([v]);return T.slice(0,T.indexOf(`
37
+ `))}function u(h,p,b,y){const v=b.enter("tableCell"),T=b.enter("phrasing"),x=b.containerPhrasing(h,{...y,before:a,after:a});return T(),v(),x}function l(h,p){return z6(h,{align:p,alignDelimiters:n,padding:r,stringLength:i})}function c(h,p,b){const y=h.children;let v=-1;const T=[],x=p.enter("table");for(;++v<y.length;)T[v]=f(y[v],p,b);return x(),T}function f(h,p,b){const y=h.children;let v=-1;const T=[],x=p.enter("tableRow");for(;++v<y.length;)T[v]=u(y[v],h,p,b);return x(),T}function d(h,p,b){let y=yS.inlineCode(h,p,b);return b.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function L4(){return{exit:{taskListCheckValueChecked:Qb,taskListCheckValueUnchecked:Qb,paragraph:j4}}}function M4(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:B4}}}function Qb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function j4(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.type==="text"){const i=t.children;let a=-1,o;for(;++a<i.length;){const s=i[a];if(s.type==="paragraph"){o=s;break}}o===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function B4(e,t,r,n){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=r.createTracker(n);a&&s.move(o);let u=yS.listItem(e,t,r,{...n,...s.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+o}}function F4(){return[d6(),D6(),j6(),C4(),L4()]}function $4(e){return{extensions:[h6(),R6(e),B6(),R4(e),M4()]}}function mr(e,t,r,n){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)o=Array.from(n),o.unshift(t,r),e.splice(...o);else for(r&&e.splice(t,r);a<n.length;)o=n.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function kr(e,t){return e.length>0?(mr(e,e.length,0,t),e):t}const Jb={}.hasOwnProperty;function xS(e){const t={};let r=-1;for(;++r<e.length;)U4(t,e[r]);return t}function U4(e,t){let r;for(r in t){const i=(Jb.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r];let o;if(a)for(o in a){Jb.call(i,o)||(i[o]=[]);const s=a[o];H4(i[o],Array.isArray(s)?s:s?[s]:[])}}}function H4(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);mr(e,0,0,n)}const z4={tokenize:G4,partial:!0},ES={tokenize:X4,partial:!0},TS={tokenize:Z4,partial:!0},wS={tokenize:Q4,partial:!0},q4={tokenize:J4,partial:!0},AS={name:"wwwAutolink",tokenize:Y4,previous:kS},SS={name:"protocolAutolink",tokenize:K4,previous:_S},Nn={name:"emailAutolink",tokenize:V4,previous:CS},fn={};function W4(){return{text:fn}}let gi=48;for(;gi<123;)fn[gi]=Nn,gi++,gi===58?gi=65:gi===91&&(gi=97);fn[43]=Nn;fn[45]=Nn;fn[46]=Nn;fn[95]=Nn;fn[72]=[Nn,SS];fn[104]=[Nn,SS];fn[87]=[Nn,AS];fn[119]=[Nn,AS];function V4(e,t,r){const n=this;let i,a;return o;function o(f){return!zh(f)||!CS.call(n,n.previous)||Im(n.events)?r(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return zh(f)?(e.consume(f),s):f===64?(e.consume(f),u):r(f)}function u(f){return f===46?e.check(q4,c,l)(f):f===45||f===95||Mt(f)?(a=!0,e.consume(f),u):c(f)}function l(f){return e.consume(f),i=!0,u}function c(f){return a&&i&&Yt(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):r(f)}}function Y4(e,t,r){const n=this;return i;function i(o){return o!==87&&o!==119||!kS.call(n,n.previous)||Im(n.events)?r(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(z4,e.attempt(ES,e.attempt(TS,a),r),r)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function K4(e,t,r){const n=this;let i="",a=!1;return o;function o(f){return(f===72||f===104)&&_S.call(n,n.previous)&&!Im(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):r(f)}function s(f){if(Yt(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(f),u}return r(f)}function u(f){return f===47?(e.consume(f),a?l:(a=!0,u)):r(f)}function l(f){return f===null||ol(f)||We(f)||ji(f)||Ec(f)?r(f):e.attempt(ES,e.attempt(TS,c),r)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function G4(e,t,r){let n=0;return i;function i(o){return(o===87||o===119)&&n<3?(n++,e.consume(o),i):o===46&&n===3?(e.consume(o),a):r(o)}function a(o){return o===null?r(o):t(o)}}function X4(e,t,r){let n,i,a;return o;function o(l){return l===46||l===95?e.check(wS,u,s)(l):l===null||We(l)||ji(l)||l!==45&&Ec(l)?u(l):(a=!0,e.consume(l),o)}function s(l){return l===95?n=!0:(i=n,n=void 0),e.consume(l),o}function u(l){return i||n||!a?r(l):t(l)}}function Z4(e,t){let r=0,n=0;return i;function i(o){return o===40?(r++,e.consume(o),i):o===41&&n<r?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(wS,t,a)(o):o===null||We(o)||ji(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&n++,e.consume(o),i}}function Q4(e,t,r){return n;function n(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),n):s===38?(e.consume(s),a):s===93?(e.consume(s),i):s===60||s===null||We(s)||ji(s)?t(s):r(s)}function i(s){return s===null||s===40||s===91||We(s)||ji(s)?t(s):n(s)}function a(s){return Yt(s)?o(s):r(s)}function o(s){return s===59?(e.consume(s),n):Yt(s)?(e.consume(s),o):r(s)}}function J4(e,t,r){return n;function n(a){return e.consume(a),i}function i(a){return Mt(a)?r(a):t(a)}}function kS(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||We(e)}function _S(e){return!Yt(e)}function CS(e){return!(e===47||zh(e))}function zh(e){return e===43||e===45||e===46||e===95||Mt(e)}function Im(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}function Za(e){const t=[];let r=-1,n=0,i=0;for(;++r<e.length;){const a=e.charCodeAt(r);let o="";if(a===37&&Mt(e.charCodeAt(r+1))&&Mt(e.charCodeAt(r+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(r+1);a<56320&&s>56319&&s<57344?(o=String.fromCharCode(a,s),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(n,r),encodeURIComponent(o)),n=r+i+1,o=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}function Tc(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!n.includes(a)&&(t=a(t,r),n.push(a))}return t}const qh={name:"attention",resolveAll:e5,tokenize:t5};function e5(e,t){let r=-1,n,i,a,o,s,u,l,c;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;u=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const f={...e[n][1].end},d={...e[r][1].start};ey(f,-u),ey(d,u),o={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...e[n][1].end}},s={type:u>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:d},a={type:u>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},i={type:u>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},e[n][1].end={...o.start},e[r][1].start={...s.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=kr(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=kr(l,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=kr(l,Tc(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),l=kr(l,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,l=kr(l,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,mr(e,n-1,r-n+3,l),r=n+l.length-c-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function t5(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=La(n);let a;return o;function o(u){return a=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===a)return e.consume(u),s;const l=e.exit("attentionSequence"),c=La(u),f=!c||c===2&&i||r.includes(u),d=!i||i===2&&c||r.includes(n);return l._open=!!(a===42?f:f&&(i||!d)),l._close=!!(a===42?d:d&&(c||!f)),t(u)}}function ey(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const r5={name:"autolink",tokenize:n5};function n5(e,t,r){let n=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(h){return Yt(h)?(e.consume(h),o):h===64?r(h):l(h)}function o(h){return h===43||h===45||h===46||Mt(h)?(n=1,s(h)):l(h)}function s(h){return h===58?(e.consume(h),n=0,u):(h===43||h===45||h===46||Mt(h))&&n++<32?(e.consume(h),s):(n=0,l(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||ol(h)?r(h):(e.consume(h),u)}function l(h){return h===64?(e.consume(h),c):i6(h)?(e.consume(h),l):r(h)}function c(h){return Mt(h)?f(h):r(h)}function f(h){return h===46?(e.consume(h),n=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):d(h)}function d(h){if((h===45||Mt(h))&&n++<63){const p=h===45?d:f;return e.consume(h),p}return r(h)}}function Pe(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(u){return Ie(u)?(e.enter(r),s(u)):t(u)}function s(u){return Ie(u)&&a++<i?(e.consume(u),s):(e.exit(r),t(u))}}const $s={partial:!0,tokenize:i5};function i5(e,t,r){return n;function n(a){return Ie(a)?Pe(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||de(a)?t(a):r(a)}}const IS={continuation:{tokenize:o5},exit:s5,name:"blockQuote",tokenize:a5};function a5(e,t,r){const n=this;return i;function i(o){if(o===62){const s=n.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return r(o)}function a(o){return Ie(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function o5(e,t,r){const n=this;return i;function i(o){return Ie(o)?Pe(e,a,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(IS,t,r)(o)}}function s5(e){e.exit("blockQuote")}const OS={name:"characterEscape",tokenize:u5};function u5(e,t,r){return n;function n(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return o6(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}const NS={name:"characterReference",tokenize:l5};function l5(e,t,r){const n=this;let i=0,a,o;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,o=Mt,c(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=a6,c):(e.enter("characterReferenceValue"),a=7,o=Hh,c(f))}function c(f){if(f===59&&i){const d=e.exit("characterReferenceValue");return o===Mt&&!Cm(n.sliceSerialize(d))?r(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(f)&&i++<a?(e.consume(f),c):r(f)}}const ty={partial:!0,tokenize:f5},ry={concrete:!0,name:"codeFenced",tokenize:c5};function c5(e,t,r){const n=this,i={partial:!0,tokenize:w};let a=0,o=0,s;return u;function u(A){return l(A)}function l(A){const _=n.events[n.events.length-1];return a=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,s=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(A)}function c(A){return A===s?(o++,e.consume(A),c):o<3?r(A):(e.exit("codeFencedFenceSequence"),Ie(A)?Pe(e,f,"whitespace")(A):f(A))}function f(A){return A===null||de(A)?(e.exit("codeFencedFence"),n.interrupt?t(A):e.check(ty,b,S)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(A))}function d(A){return A===null||de(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(A)):Ie(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Pe(e,h,"whitespace")(A)):A===96&&A===s?r(A):(e.consume(A),d)}function h(A){return A===null||de(A)?f(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(A))}function p(A){return A===null||de(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(A)):A===96&&A===s?r(A):(e.consume(A),p)}function b(A){return e.attempt(i,S,y)(A)}function y(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),v}function v(A){return a>0&&Ie(A)?Pe(e,T,"linePrefix",a+1)(A):T(A)}function T(A){return A===null||de(A)?e.check(ty,b,S)(A):(e.enter("codeFlowValue"),x(A))}function x(A){return A===null||de(A)?(e.exit("codeFlowValue"),T(A)):(e.consume(A),x)}function S(A){return e.exit("codeFenced"),t(A)}function w(A,_,O){let R=0;return C;function C(U){return A.enter("lineEnding"),A.consume(U),A.exit("lineEnding"),M}function M(U){return A.enter("codeFencedFence"),Ie(U)?Pe(A,L,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):L(U)}function L(U){return U===s?(A.enter("codeFencedFenceSequence"),Q(U)):O(U)}function Q(U){return U===s?(R++,A.consume(U),Q):R>=o?(A.exit("codeFencedFenceSequence"),Ie(U)?Pe(A,H,"whitespace")(U):H(U)):O(U)}function H(U){return U===null||de(U)?(A.exit("codeFencedFence"),_(U)):O(U)}}}function f5(e,t,r){const n=this;return i;function i(o){return o===null?r(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return n.parser.lazy[n.now().line]?r(o):t(o)}}const Rf={name:"codeIndented",tokenize:h5},d5={partial:!0,tokenize:p5};function h5(e,t,r){const n=this;return i;function i(l){return e.enter("codeIndented"),Pe(e,a,"linePrefix",5)(l)}function a(l){const c=n.events[n.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(l):r(l)}function o(l){return l===null?u(l):de(l)?e.attempt(d5,o,u)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||de(l)?(e.exit("codeFlowValue"),o(l)):(e.consume(l),s)}function u(l){return e.exit("codeIndented"),t(l)}}function p5(e,t,r){const n=this;return i;function i(o){return n.parser.lazy[n.now().line]?r(o):de(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Pe(e,a,"linePrefix",5)(o)}function a(o){const s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):de(o)?i(o):r(o)}}const m5={name:"codeText",previous:b5,resolve:g5,tokenize:y5};function g5(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="codeTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function b5(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function y5(e,t,r){let n=0,i,a;return o;function o(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),n++,s):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?r(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(a=e.enter("codeTextSequence"),i=0,c(f)):de(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),l(f))}function l(f){return f===null||f===32||f===96||de(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),l)}function c(f){return f===96?(e.consume(f),i++,c):i===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",l(f))}}class v5{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){const i=r||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&mo(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),mo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),mo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);mo(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);mo(this.left,r.reverse())}}}function mo(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function PS(e){const t={};let r=-1,n,i,a,o,s,u,l;const c=new v5(e);for(;++r<c.length;){for(;r in t;)r=t[r];if(n=c.get(r),r&&n[1].type==="chunkFlow"&&c.get(r-1)[1].type==="listItemPrefix"&&(u=n[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,x5(c,r)),r=t[r],l=!0);else if(n[1]._container){for(a=r,i=void 0;a--;)if(o=c.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(n[1].end={...c.get(i)[1].start},s=c.slice(i,r),s.unshift(n),c.splice(i,r-i+1,s))}}return mr(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function x5(e,t){const r=e.get(t)[1],n=e.get(t)[2];let i=t-1;const a=[];let o=r._tokenizer;o||(o=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,u=[],l={};let c,f,d=-1,h=r,p=0,b=0;const y=[b];for(;h;){for(;e.get(++i)[1]!==h;);a.push(i),h._tokenizer||(c=n.sliceStream(h),h.next||c.push(null),f&&o.defineSkip(h.start),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=r;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(b=d+1,y.push(b),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(o.events=[],h?(h._tokenizer=void 0,h.previous=void 0):y.pop(),d=y.length;d--;){const v=s.slice(y[d],y[d+1]),T=a.pop();u.push([T,T+v.length-1]),e.splice(T,2,v)}for(u.reverse(),d=-1;++d<u.length;)l[p+u[d][0]]=p+u[d][1],p+=u[d][1]-u[d][0]-1;return l}const E5={resolve:w5,tokenize:A5},T5={partial:!0,tokenize:S5};function w5(e){return PS(e),e}function A5(e,t){let r;return n;function n(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?a(s):de(s)?e.check(T5,o,a)(s):(e.consume(s),i)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function S5(e,t,r){const n=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Pe(e,a,"linePrefix")}function a(o){if(o===null||de(o))return r(o);const s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(n.parser.constructs.flow,r,t)(o)}}function DS(e,t,r,n,i,a,o,s,u){const l=u||Number.POSITIVE_INFINITY;let c=0;return f;function f(v){return v===60?(e.enter(n),e.enter(i),e.enter(a),e.consume(v),e.exit(a),d):v===null||v===32||v===41||ol(v)?r(v):(e.enter(n),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),b(v))}function d(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(i),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===62?(e.exit("chunkString"),e.exit(s),d(v)):v===null||v===60||de(v)?r(v):(e.consume(v),v===92?p:h)}function p(v){return v===60||v===62||v===92?(e.consume(v),h):h(v)}function b(v){return!c&&(v===null||v===41||We(v))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(n),t(v)):c<l&&v===40?(e.consume(v),c++,b):v===41?(e.consume(v),c--,b):v===null||v===32||v===40||ol(v)?r(v):(e.consume(v),v===92?y:b)}function y(v){return v===40||v===41||v===92?(e.consume(v),b):b(v)}}function RS(e,t,r,n,i,a){const o=this;let s=0,u;return l;function l(h){return e.enter(n),e.enter(i),e.consume(h),e.exit(i),e.enter(a),c}function c(h){return s>999||h===null||h===91||h===93&&!u||h===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?r(h):h===93?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(n),t):de(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||de(h)||s++>999?(e.exit("chunkString"),c(h)):(e.consume(h),u||(u=!Ie(h)),h===92?d:f)}function d(h){return h===91||h===92||h===93?(e.consume(h),s++,f):f(h)}}function LS(e,t,r,n,i,a){let o;return s;function s(d){return d===34||d===39||d===40?(e.enter(n),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,u):r(d)}function u(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(n),t):(e.enter(a),l(d))}function l(d){return d===o?(e.exit(a),u(o)):d===null?r(d):de(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Pe(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===o||d===null||de(d)?(e.exit("chunkString"),l(d)):(e.consume(d),d===92?f:c)}function f(d){return d===o||d===92?(e.consume(d),c):c(d)}}function Ko(e,t){let r;return n;function n(i){return de(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):Ie(i)?Pe(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}const k5={name:"definition",tokenize:C5},_5={partial:!0,tokenize:I5};function C5(e,t,r){const n=this;let i;return a;function a(h){return e.enter("definition"),o(h)}function o(h){return RS.call(n,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function s(h){return i=Br(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):r(h)}function u(h){return We(h)?Ko(e,l)(h):l(h)}function l(h){return DS(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(_5,f,f)(h)}function f(h){return Ie(h)?Pe(e,d,"whitespace")(h):d(h)}function d(h){return h===null||de(h)?(e.exit("definition"),n.parser.defined.push(i),t(h)):r(h)}}function I5(e,t,r){return n;function n(s){return We(s)?Ko(e,i)(s):r(s)}function i(s){return LS(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return Ie(s)?Pe(e,o,"whitespace")(s):o(s)}function o(s){return s===null||de(s)?t(s):r(s)}}const O5={name:"hardBreakEscape",tokenize:N5};function N5(e,t,r){return n;function n(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return de(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}const P5={name:"headingAtx",resolve:D5,tokenize:R5};function D5(e,t){let r=e.length-2,n=3,i,a;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},a={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},mr(e,n,r-n+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function R5(e,t,r){let n=0;return i;function i(c){return e.enter("atxHeading"),a(c)}function a(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&n++<6?(e.consume(c),o):c===null||We(c)?(e.exit("atxHeadingSequence"),s(c)):r(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||de(c)?(e.exit("atxHeading"),t(c)):Ie(c)?Pe(e,s,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),s(c))}function l(c){return c===null||c===35||We(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),l)}}const L5=["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"],ny=["pre","script","style","textarea"],M5={concrete:!0,name:"htmlFlow",resolveTo:F5,tokenize:$5},j5={partial:!0,tokenize:H5},B5={partial:!0,tokenize:U5};function F5(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 $5(e,t,r){const n=this;let i,a,o,s,u;return l;function l(N){return c(N)}function c(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),f}function f(N){return N===33?(e.consume(N),d):N===47?(e.consume(N),a=!0,b):N===63?(e.consume(N),i=3,n.interrupt?t:P):Yt(N)?(e.consume(N),o=String.fromCharCode(N),y):r(N)}function d(N){return N===45?(e.consume(N),i=2,h):N===91?(e.consume(N),i=5,s=0,p):Yt(N)?(e.consume(N),i=4,n.interrupt?t:P):r(N)}function h(N){return N===45?(e.consume(N),n.interrupt?t:P):r(N)}function p(N){const pe="CDATA[";return N===pe.charCodeAt(s++)?(e.consume(N),s===pe.length?n.interrupt?t:L:p):r(N)}function b(N){return Yt(N)?(e.consume(N),o=String.fromCharCode(N),y):r(N)}function y(N){if(N===null||N===47||N===62||We(N)){const pe=N===47,we=o.toLowerCase();return!pe&&!a&&ny.includes(we)?(i=1,n.interrupt?t(N):L(N)):L5.includes(o.toLowerCase())?(i=6,pe?(e.consume(N),v):n.interrupt?t(N):L(N)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(N):a?T(N):x(N))}return N===45||Mt(N)?(e.consume(N),o+=String.fromCharCode(N),y):r(N)}function v(N){return N===62?(e.consume(N),n.interrupt?t:L):r(N)}function T(N){return Ie(N)?(e.consume(N),T):C(N)}function x(N){return N===47?(e.consume(N),C):N===58||N===95||Yt(N)?(e.consume(N),S):Ie(N)?(e.consume(N),x):C(N)}function S(N){return N===45||N===46||N===58||N===95||Mt(N)?(e.consume(N),S):w(N)}function w(N){return N===61?(e.consume(N),A):Ie(N)?(e.consume(N),w):x(N)}function A(N){return N===null||N===60||N===61||N===62||N===96?r(N):N===34||N===39?(e.consume(N),u=N,_):Ie(N)?(e.consume(N),A):O(N)}function _(N){return N===u?(e.consume(N),u=null,R):N===null||de(N)?r(N):(e.consume(N),_)}function O(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||We(N)?w(N):(e.consume(N),O)}function R(N){return N===47||N===62||Ie(N)?x(N):r(N)}function C(N){return N===62?(e.consume(N),M):r(N)}function M(N){return N===null||de(N)?L(N):Ie(N)?(e.consume(N),M):r(N)}function L(N){return N===45&&i===2?(e.consume(N),q):N===60&&i===1?(e.consume(N),J):N===62&&i===4?(e.consume(N),le):N===63&&i===3?(e.consume(N),P):N===93&&i===5?(e.consume(N),re):de(N)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(j5,he,Q)(N)):N===null||de(N)?(e.exit("htmlFlowData"),Q(N)):(e.consume(N),L)}function Q(N){return e.check(B5,H,he)(N)}function H(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),U}function U(N){return N===null||de(N)?Q(N):(e.enter("htmlFlowData"),L(N))}function q(N){return N===45?(e.consume(N),P):L(N)}function J(N){return N===47?(e.consume(N),o="",V):L(N)}function V(N){if(N===62){const pe=o.toLowerCase();return ny.includes(pe)?(e.consume(N),le):L(N)}return Yt(N)&&o.length<8?(e.consume(N),o+=String.fromCharCode(N),V):L(N)}function re(N){return N===93?(e.consume(N),P):L(N)}function P(N){return N===62?(e.consume(N),le):N===45&&i===2?(e.consume(N),P):L(N)}function le(N){return N===null||de(N)?(e.exit("htmlFlowData"),he(N)):(e.consume(N),le)}function he(N){return e.exit("htmlFlow"),t(N)}}function U5(e,t,r){const n=this;return i;function i(o){return de(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):r(o)}function a(o){return n.parser.lazy[n.now().line]?r(o):t(o)}}function H5(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt($s,t,r)}}const z5={name:"htmlText",tokenize:q5};function q5(e,t,r){const n=this;let i,a,o;return s;function s(P){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(P),u}function u(P){return P===33?(e.consume(P),l):P===47?(e.consume(P),w):P===63?(e.consume(P),x):Yt(P)?(e.consume(P),O):r(P)}function l(P){return P===45?(e.consume(P),c):P===91?(e.consume(P),a=0,p):Yt(P)?(e.consume(P),T):r(P)}function c(P){return P===45?(e.consume(P),h):r(P)}function f(P){return P===null?r(P):P===45?(e.consume(P),d):de(P)?(o=f,J(P)):(e.consume(P),f)}function d(P){return P===45?(e.consume(P),h):f(P)}function h(P){return P===62?q(P):P===45?d(P):f(P)}function p(P){const le="CDATA[";return P===le.charCodeAt(a++)?(e.consume(P),a===le.length?b:p):r(P)}function b(P){return P===null?r(P):P===93?(e.consume(P),y):de(P)?(o=b,J(P)):(e.consume(P),b)}function y(P){return P===93?(e.consume(P),v):b(P)}function v(P){return P===62?q(P):P===93?(e.consume(P),v):b(P)}function T(P){return P===null||P===62?q(P):de(P)?(o=T,J(P)):(e.consume(P),T)}function x(P){return P===null?r(P):P===63?(e.consume(P),S):de(P)?(o=x,J(P)):(e.consume(P),x)}function S(P){return P===62?q(P):x(P)}function w(P){return Yt(P)?(e.consume(P),A):r(P)}function A(P){return P===45||Mt(P)?(e.consume(P),A):_(P)}function _(P){return de(P)?(o=_,J(P)):Ie(P)?(e.consume(P),_):q(P)}function O(P){return P===45||Mt(P)?(e.consume(P),O):P===47||P===62||We(P)?R(P):r(P)}function R(P){return P===47?(e.consume(P),q):P===58||P===95||Yt(P)?(e.consume(P),C):de(P)?(o=R,J(P)):Ie(P)?(e.consume(P),R):q(P)}function C(P){return P===45||P===46||P===58||P===95||Mt(P)?(e.consume(P),C):M(P)}function M(P){return P===61?(e.consume(P),L):de(P)?(o=M,J(P)):Ie(P)?(e.consume(P),M):R(P)}function L(P){return P===null||P===60||P===61||P===62||P===96?r(P):P===34||P===39?(e.consume(P),i=P,Q):de(P)?(o=L,J(P)):Ie(P)?(e.consume(P),L):(e.consume(P),H)}function Q(P){return P===i?(e.consume(P),i=void 0,U):P===null?r(P):de(P)?(o=Q,J(P)):(e.consume(P),Q)}function H(P){return P===null||P===34||P===39||P===60||P===61||P===96?r(P):P===47||P===62||We(P)?R(P):(e.consume(P),H)}function U(P){return P===47||P===62||We(P)?R(P):r(P)}function q(P){return P===62?(e.consume(P),e.exit("htmlTextData"),e.exit("htmlText"),t):r(P)}function J(P){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),V}function V(P){return Ie(P)?Pe(e,re,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):re(P)}function re(P){return e.enter("htmlTextData"),o(P)}}const Om={name:"labelEnd",resolveAll:K5,resolveTo:G5,tokenize:X5},W5={tokenize:Z5},V5={tokenize:Q5},Y5={tokenize:J5};function K5(e){let t=-1;const r=[];for(;++t<e.length;){const n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){const i=n.type==="labelImage"?4:2;n.type="data",t+=i}}return e.length!==r.length&&mr(e,0,e.length,r),e}function G5(e,t){let r=e.length,n=0,i,a,o,s;for(;r--;)if(i=e[r][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(o=r);const u={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[a][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[a+n+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",u,t],["enter",l,t]],s=kr(s,e.slice(a+1,a+n+3)),s=kr(s,[["enter",c,t]]),s=kr(s,Tc(t.parser.constructs.insideSpan.null,e.slice(a+n+4,o-3),t)),s=kr(s,[["exit",c,t],e[o-2],e[o-1],["exit",l,t]]),s=kr(s,e.slice(o+1)),s=kr(s,[["exit",u,t]]),mr(e,a,e.length,s),e}function X5(e,t,r){const n=this;let i=n.events.length,a,o;for(;i--;)if((n.events[i][1].type==="labelImage"||n.events[i][1].type==="labelLink")&&!n.events[i][1]._balanced){a=n.events[i][1];break}return s;function s(d){return a?a._inactive?f(d):(o=n.parser.defined.includes(Br(n.sliceSerialize({start:a.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),u):r(d)}function u(d){return d===40?e.attempt(W5,c,o?c:f)(d):d===91?e.attempt(V5,c,o?l:f)(d):o?c(d):f(d)}function l(d){return e.attempt(Y5,c,f)(d)}function c(d){return t(d)}function f(d){return a._balanced=!0,r(d)}}function Z5(e,t,r){return n;function n(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return We(f)?Ko(e,a)(f):a(f)}function a(f){return f===41?c(f):DS(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return We(f)?Ko(e,u)(f):c(f)}function s(f){return r(f)}function u(f){return f===34||f===39||f===40?LS(e,l,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return We(f)?Ko(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):r(f)}}function Q5(e,t,r){const n=this;return i;function i(s){return RS.call(n,e,a,o,"reference","referenceMarker","referenceString")(s)}function a(s){return n.parser.defined.includes(Br(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function o(s){return r(s)}}function J5(e,t,r){return n;function n(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):r(a)}}const ej={name:"labelStartImage",resolveAll:Om.resolveAll,tokenize:tj};function tj(e,t,r){const n=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):r(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}const rj={name:"labelStartLink",resolveAll:Om.resolveAll,tokenize:nj};function nj(e,t,r){const n=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(o):t(o)}}const Lf={name:"lineEnding",tokenize:ij};function ij(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Pe(e,t,"linePrefix")}}const Uu={name:"thematicBreak",tokenize:aj};function aj(e,t,r){let n=0,i;return a;function a(l){return e.enter("thematicBreak"),o(l)}function o(l){return i=l,s(l)}function s(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):n>=3&&(l===null||de(l))?(e.exit("thematicBreak"),t(l)):r(l)}function u(l){return l===i?(e.consume(l),n++,u):(e.exit("thematicBreakSequence"),Ie(l)?Pe(e,s,"whitespace")(l):s(l))}}const rr={continuation:{tokenize:lj},exit:fj,name:"list",tokenize:uj},oj={partial:!0,tokenize:dj},sj={partial:!0,tokenize:cj};function uj(e,t,r){const n=this,i=n.events[n.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(h){const p=n.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!n.containerState.marker||h===n.containerState.marker:Hh(h)){if(n.containerState.type||(n.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Uu,r,l)(h):l(h);if(!n.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return r(h)}function u(h){return Hh(h)&&++o<10?(e.consume(h),u):(!n.interrupt||o<2)&&(n.containerState.marker?h===n.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),l(h)):r(h)}function l(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||h,e.check($s,n.interrupt?r:c,e.attempt(oj,d,f))}function c(h){return n.containerState.initialBlankLine=!0,a++,d(h)}function f(h){return Ie(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),d):r(h)}function d(h){return n.containerState.size=a+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function lj(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check($s,i,a);function i(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Pe(e,t,"listItemIndent",n.containerState.size+1)(s)}function a(s){return n.containerState.furtherBlankLines||!Ie(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(sj,t,o)(s))}function o(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,Pe(e,e.attempt(rr,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function cj(e,t,r){const n=this;return Pe(e,i,"listItemIndent",n.containerState.size+1);function i(a){const o=n.events[n.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===n.containerState.size?t(a):r(a)}}function fj(e){e.exit(this.containerState.type)}function dj(e,t,r){const n=this;return Pe(e,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=n.events[n.events.length-1];return!Ie(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}const iy={name:"setextUnderline",resolveTo:hj,tokenize:pj};function hj(e,t){let r=e.length,n,i,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(i=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);const o={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=o,e.push(["exit",o,t]),e}function pj(e,t,r){const n=this;let i;return a;function a(l){let c=n.events.length,f;for(;c--;)if(n.events[c][1].type!=="lineEnding"&&n.events[c][1].type!=="linePrefix"&&n.events[c][1].type!=="content"){f=n.events[c][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||f)?(e.enter("setextHeadingLine"),i=l,o(l)):r(l)}function o(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===i?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),Ie(l)?Pe(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||de(l)?(e.exit("setextHeadingLine"),t(l)):r(l)}}const mj={tokenize:wj,partial:!0};function gj(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:xj,continuation:{tokenize:Ej},exit:Tj}},text:{91:{name:"gfmFootnoteCall",tokenize:vj},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:bj,resolveTo:yj}}}}function bj(e,t,r){const n=this;let i=n.events.length;const a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o;for(;i--;){const u=n.events[i][1];if(u.type==="labelImage"){o=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!o||!o._balanced)return r(u);const l=Br(n.sliceSerialize({start:o.end,end:n.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?r(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function yj(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...s),e}function vj(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a=0,o;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?r(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(a>999||f===93&&!o||f===null||f===91||We(f))return r(f);if(f===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(Br(n.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(f)}return We(f)||(o=!0),a++,e.consume(f),f===92?c:l}function c(f){return f===91||f===92||f===93?(e.consume(f),a++,l):l(f)}}function xj(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,o=0,s;return u;function u(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):r(p)}function c(p){if(o>999||p===93&&!s||p===null||p===91||We(p))return r(p);if(p===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return a=Br(n.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return We(p)||(s=!0),o++,e.consume(p),p===92?f:c}function f(p){return p===91||p===92||p===93?(e.consume(p),o++,c):c(p)}function d(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(a)||i.push(a),Pe(e,h,"gfmFootnoteDefinitionWhitespace")):r(p)}function h(p){return t(p)}}function Ej(e,t,r){return e.check($s,t,e.attempt(mj,t,r))}function Tj(e){e.exit("gfmFootnoteDefinition")}function wj(e,t,r){const n=this;return Pe(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=n.events[n.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):r(a)}}function Aj(e){let r=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:a,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(o,s){let u=-1;for(;++u<o.length;)if(o[u][0]==="enter"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._close){let l=u;for(;l--;)if(o[l][0]==="exit"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._open&&o[u][1].end.offset-o[u][1].start.offset===o[l][1].end.offset-o[l][1].start.offset){o[u][1].type="strikethroughSequence",o[l][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},o[l][1].start),end:Object.assign({},o[u][1].end)},f={type:"strikethroughText",start:Object.assign({},o[l][1].end),end:Object.assign({},o[u][1].start)},d=[["enter",c,s],["enter",o[l][1],s],["exit",o[l][1],s],["enter",f,s]],h=s.parser.constructs.insideSpan.null;h&&mr(d,d.length,0,Tc(h,o.slice(l+1,u),s)),mr(d,d.length,0,[["exit",f,s],["enter",o[u][1],s],["exit",o[u][1],s],["exit",c,s]]),mr(o,l-1,u-l+3,d),u=l+d.length-2;break}}for(u=-1;++u<o.length;)o[u][1].type==="strikethroughSequenceTemporary"&&(o[u][1].type="data");return o}function a(o,s,u){const l=this.previous,c=this.events;let f=0;return d;function d(p){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(p):(o.enter("strikethroughSequenceTemporary"),h(p))}function h(p){const b=La(l);if(p===126)return f>1?u(p):(o.consume(p),f++,h);if(f<2&&!r)return u(p);const y=o.exit("strikethroughSequenceTemporary"),v=La(p);return y._open=!v||v===2&&!!b,y._close=!b||b===2&&!!v,s(p)}}}class Sj{constructor(){this.map=[]}add(t,r,n){kj(this,t,r,n)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push(t.slice()),t.length=0;let i=n.pop();for(;i;){for(const a of i)t.push(a);i=n.pop()}this.map.length=0}}function kj(e,t,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=r,e.map[i][2].push(...n);return}i+=1}e.map.push([t,r,n])}}function _j(e,t){let r=!1;const n=[];for(;t<e.length;){const i=e[t];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=n.length-1;n[a]=n[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function Cj(){return{flow:{null:{name:"table",tokenize:Ij,resolveAll:Oj}}}}function Ij(e,t,r){const n=this;let i=0,a=0,o;return s;function s(C){let M=n.events.length-1;for(;M>-1;){const H=n.events[M][1].type;if(H==="lineEnding"||H==="linePrefix")M--;else break}const L=M>-1?n.events[M][1].type:null,Q=L==="tableHead"||L==="tableRow"?A:u;return Q===A&&n.parser.lazy[n.now().line]?r(C):Q(C)}function u(C){return e.enter("tableHead"),e.enter("tableRow"),l(C)}function l(C){return C===124||(o=!0,a+=1),c(C)}function c(C){return C===null?r(C):de(C)?a>1?(a=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),h):r(C):Ie(C)?Pe(e,c,"whitespace")(C):(a+=1,o&&(o=!1,i+=1),C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),o=!0,c):(e.enter("data"),f(C)))}function f(C){return C===null||C===124||We(C)?(e.exit("data"),c(C)):(e.consume(C),C===92?d:f)}function d(C){return C===92||C===124?(e.consume(C),f):f(C)}function h(C){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(C):(e.enter("tableDelimiterRow"),o=!1,Ie(C)?Pe(e,p,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):p(C))}function p(C){return C===45||C===58?y(C):C===124?(o=!0,e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),b):w(C)}function b(C){return Ie(C)?Pe(e,y,"whitespace")(C):y(C)}function y(C){return C===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),v):C===45?(a+=1,v(C)):C===null||de(C)?S(C):w(C)}function v(C){return C===45?(e.enter("tableDelimiterFiller"),T(C)):w(C)}function T(C){return C===45?(e.consume(C),T):C===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(C))}function x(C){return Ie(C)?Pe(e,S,"whitespace")(C):S(C)}function S(C){return C===124?p(C):C===null||de(C)?!o||i!==a?w(C):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(C)):w(C)}function w(C){return r(C)}function A(C){return e.enter("tableRow"),_(C)}function _(C){return C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),_):C===null||de(C)?(e.exit("tableRow"),t(C)):Ie(C)?Pe(e,_,"whitespace")(C):(e.enter("data"),O(C))}function O(C){return C===null||C===124||We(C)?(e.exit("data"),_(C)):(e.consume(C),C===92?R:O)}function R(C){return C===92||C===124?(e.consume(C),O):O(C)}}function Oj(e,t){let r=-1,n=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,u=0,l,c,f;const d=new Sj;for(;++r<e.length;){const h=e[r],p=h[1];h[0]==="enter"?p.type==="tableHead"?(s=!1,u!==0&&(ay(d,t,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(r,0,[["enter",l,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(n=!0,f=void 0,a=[0,0,0,0],o=[0,r+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(r,0,[["enter",c,t]])),i=p.type==="tableDelimiterRow"?2:c?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(n=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],f=pu(d,t,a,i,void 0,f),a=[0,0,0,0]),o[2]=r)):p.type==="tableCellDivider"&&(n?n=!1:(a[1]!==0&&(o[0]=o[1],f=pu(d,t,a,i,void 0,f)),a=o,o=[a[1],r,0,0])):p.type==="tableHead"?(s=!0,u=r):p.type==="tableRow"||p.type==="tableDelimiterRow"?(u=r,a[1]!==0?(o[0]=o[1],f=pu(d,t,a,i,r,f)):o[1]!==0&&(f=pu(d,t,o,i,r,f)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(o[3]=r)}for(u!==0&&ay(d,t,u,l,c),d.consume(t.events),r=-1;++r<t.events.length;){const h=t.events[r];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=_j(t.events,r))}return e}function pu(e,t,r,n,i,a){const o=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",s="tableContent";r[0]!==0&&(a.end=Object.assign({},ba(t.events,r[0])),e.add(r[0],0,[["exit",a,t]]));const u=ba(t.events,r[1]);if(a={type:o,start:Object.assign({},u),end:Object.assign({},u)},e.add(r[1],0,[["enter",a,t]]),r[2]!==0){const l=ba(t.events,r[2]),c=ba(t.events,r[3]),f={type:s,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(r[2],0,[["enter",f,t]]),n!==2){const d=t.events[r[2]],h=t.events[r[3]];if(d[1].end=Object.assign({},h[1].end),d[1].type="chunkText",d[1].contentType="text",r[3]>r[2]+1){const p=r[2]+1,b=r[3]-r[2]-1;e.add(p,b,[])}}e.add(r[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},ba(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function ay(e,t,r,n,i){const a=[],o=ba(t.events,r);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),n.end=Object.assign({},o),a.push(["exit",n,t]),e.add(r+1,0,a)}function ba(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const Nj={name:"tasklistCheck",tokenize:Dj};function Pj(){return{text:{91:Nj}}}function Dj(e,t,r){const n=this;return i;function i(u){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return We(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),o):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),o):r(u)}function o(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):r(u)}function s(u){return de(u)?t(u):Ie(u)?e.check({tokenize:Rj},t,r)(u):r(u)}}function Rj(e,t,r){return Pe(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function Lj(e){return xS([W4(),gj(),Aj(e),Cj(),Pj()])}const Mj={};function jj(e){const t=this,r=e||Mj,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Lj(r)),a.push(F4()),o.push($4(r))}var Bj=Object.defineProperty,Fj=Object.defineProperties,$j=Object.getOwnPropertyDescriptors,oy=Object.getOwnPropertySymbols,Uj=Object.prototype.hasOwnProperty,Hj=Object.prototype.propertyIsEnumerable,sy=(e,t,r)=>t in e?Bj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,MS=(e,t)=>{for(var r in t||(t={}))Uj.call(t,r)&&sy(e,r,t[r]);if(oy)for(var r of oy(t))Hj.call(t,r)&&sy(e,r,t[r]);return e},jS=(e,t)=>Fj(e,$j(t)),Xt=(e,t)=>{let r=!1,n=!1;for(let i=0;i<t;i+=1){if(e[i]==="\\"&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){n=!n,i+=2;continue}!n&&e[i]==="`"&&(r=!r)}return r||n},zj=(e,t)=>{let r=e.substring(t,t+3)==="```",n=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return r||n||i},qj=e=>{let t=0;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"&&r+1<e.length&&e[r+1]==="`"){r+=1;continue}e[r]==="`"&&!zj(e,r)&&(t+=1)}return t},ti=(e,t)=>{let r=!1,n=!1,i=-1;for(let a=0;a<e.length;a+=1){if(e[a]==="\\"&&a+1<e.length&&e[a+1]==="`"){a+=1;continue}if(e.substring(a,a+3)==="```"){n=!n,a+=2;continue}if(!n&&e[a]==="`")if(r){if(i<t&&t<a)return!0;r=!1,i=-1}else r=!0,i=a}return!1},Wj=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,Vj=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(Wj,(t,r,n,i)=>Xt(e,i)?t:`${r}\\>${n}`),Yj=/(\*\*)([^*]*\*?)$/,Kj=/(__)([^_]*?)$/,Gj=/(\*\*\*)([^*]*?)$/,Xj=/(\*)([^*]*?)$/,Zj=/(_)([^_]*?)$/,Qj=/(`)([^`]*?)$/,Jj=/(~~)([^~]*?)$/,Xi=/^[\s_~*`]*$/,BS=/^[\s]*[-*+][\s]+$/,e8=/[\p{L}\p{N}_]/u,t8=/^```[^`\n]*```?$/,r8=/^\*{4,}$/,n8=/(__)([^_]+)_$/,i8=/(~~)([^~]+)~$/,uy=/~~/g,ri=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:e8.test(e)},a8=(e,t)=>{let r=1;for(let n=t-1;n>=0;n-=1)if(e[n]==="]")r+=1;else if(e[n]==="["&&(r-=1,r===0))return n;return-1},FS=(e,t)=>{let r=1;for(let n=t+1;n<e.length;n+=1)if(e[n]==="[")r+=1;else if(e[n]==="]"&&(r-=1,r===0))return n;return-1},wc=(e,t)=>{let r=!1,n=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(n=!n,i+=1,r=!1):n||(r=!r))}return r||n},o8=(e,t)=>{for(let r=t;r<e.length;r+=1){if(e[r]===")")return!0;if(e[r]===`
38
+ `)return!1}return!1},$S=(e,t)=>{for(let r=t-1;r>=0;r-=1){if(e[r]===")")return!1;if(e[r]==="(")return r>0&&e[r-1]==="]"?o8(e,t):!1;if(e[r]===`
39
+ `)return!1}return!1},s8=(e,t)=>{for(let r=t-1;r>=0;r-=1){if(e[r]===">")return!1;if(e[r]==="<"){let n=r+1<e.length?e[r+1]:"";return n>="a"&&n<="z"||n>="A"&&n<="Z"||n==="/"}if(e[r]===`
40
+ `)return!1}return!1},Nm=(e,t,r)=>{let n=0;for(let u=t-1;u>=0;u-=1)if(e[u]===`
41
+ `){n=u+1;break}let i=e.length;for(let u=t;u<e.length;u+=1)if(e[u]===`
42
+ `){i=u;break}let a=e.substring(n,i),o=0,s=!1;for(let u of a)if(u===r)o+=1;else if(u!==" "&&u!==" "){s=!0;break}return o>=3&&!s},u8=(e,t,r,n)=>r==="\\"||e.includes("$")&&wc(e,t)?!0:r!=="*"&&n==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(r==="*"||r&&n&&ri(r)&&ri(n)||(!r||r===" "||r===" "||r===`
43
+ `)&&(!n||n===" "||n===" "||n===`
44
+ `)),US=e=>{let t=0,r=!1,n=e.length;for(let i=0;i<n;i+=1){if(e[i]==="`"&&i+2<n&&e[i+1]==="`"&&e[i+2]==="`"){r=!r,i+=2;continue}if(r||e[i]!=="*")continue;let a=i>0?e[i-1]:"",o=i<n-1?e[i+1]:"";u8(e,i,a,o)||(t+=1)}return t},l8=(e,t,r,n)=>!!(r==="\\"||e.includes("$")&&wc(e,t)||$S(e,t)||s8(e,t)||r==="_"||n==="_"||r&&n&&ri(r)&&ri(n)),c8=e=>{let t=0,r=!1,n=e.length;for(let i=0;i<n;i+=1){if(e[i]==="`"&&i+2<n&&e[i+1]==="`"&&e[i+2]==="`"){r=!r,i+=2;continue}if(r||e[i]!=="_")continue;let a=i>0?e[i-1]:"",o=i<n-1?e[i+1]:"";l8(e,i,a,o)||(t+=1)}return t},f8=e=>{let t=0,r=0,n=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){r>=3&&(t+=Math.floor(r/3)),r=0,n=!n,i+=2;continue}n||(e[i]==="*"?r+=1:(r>=3&&(t+=Math.floor(r/3)),r=0))}return r>=3&&(t+=Math.floor(r/3)),t},Pm=e=>{let t=0,r=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){r=!r,n+=2;continue}r||e[n]==="*"&&n+1<e.length&&e[n+1]==="*"&&(t+=1,n+=1)}return t},ly=e=>{let t=0,r=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){r=!r,n+=2;continue}r||e[n]==="_"&&n+1<e.length&&e[n+1]==="_"&&(t+=1,n+=1)}return t},d8=(e,t,r)=>{if(!t||Xi.test(t))return!0;let n=e.substring(0,r).lastIndexOf(`
45
+ `),i=n===-1?0:n+1,a=e.substring(i,r);return BS.test(a)&&t.includes(`
46
+ `)?!0:Nm(e,r,"*")},h8=e=>{let t=e.match(Yj);if(!t)return e;let r=t[2],n=e.lastIndexOf(t[1]);return Xt(e,n)||ti(e,n)||d8(e,r,n)?e:Pm(e)%2===1?r.endsWith("*")?`${e}*`:`${e}**`:e},p8=(e,t,r)=>{if(!t||Xi.test(t))return!0;let n=e.substring(0,r).lastIndexOf(`
47
+ `),i=n===-1?0:n+1,a=e.substring(i,r);return BS.test(a)&&t.includes(`
48
+ `)?!0:Nm(e,r,"_")},m8=e=>{let t=e.match(Kj);if(!t){let i=e.match(n8);if(i){let a=e.lastIndexOf(i[1]);if(!(Xt(e,a)||ti(e,a))&&ly(e)%2===1)return`${e}_`}return e}let r=t[2],n=e.lastIndexOf(t[1]);return Xt(e,n)||ti(e,n)||p8(e,r,n)?e:ly(e)%2===1?`${e}__`:e},g8=e=>{let t=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){t=!t,r+=2;continue}if(!t&&e[r]==="*"&&e[r-1]!=="*"&&e[r+1]!=="*"&&e[r-1]!=="\\"&&!wc(e,r)){let n=r>0?e[r-1]:"",i=r<e.length-1?e[r+1]:"";if((!n||n===" "||n===" "||n===`
49
+ `)&&(!i||i===" "||i===" "||i===`
50
+ `)||n&&i&&ri(n)&&ri(i))continue;return r}}return-1},b8=e=>{if(!e.match(Xj))return e;let t=g8(e);if(t===-1||Xt(e,t)||ti(e,t))return e;let r=e.substring(t+1);return!r||Xi.test(r)?e:US(e)%2===1?`${e}*`:e},HS=e=>{let t=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){t=!t,r+=2;continue}if(!t&&e[r]==="_"&&e[r-1]!=="_"&&e[r+1]!=="_"&&e[r-1]!=="\\"&&!wc(e,r)&&!$S(e,r)){let n=r>0?e[r-1]:"",i=r<e.length-1?e[r+1]:"";if(n&&i&&ri(n)&&ri(i))continue;return r}}return-1},y8=e=>{let t=e.length;for(;t>0&&e[t-1]===`
51
+ `;)t-=1;if(t<e.length){let r=e.slice(0,t),n=e.slice(t);return`${r}_${n}`}return`${e}_`},v8=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(Pm(t)%2!==1)return null;let r=t.indexOf("**"),n=HS(t);return r!==-1&&n!==-1&&r<n?`${t}_**`:null},x8=e=>{if(!e.match(Zj))return e;let t=HS(e);if(t===-1)return e;let r=e.substring(t+1);if(!r||Xi.test(r)||Xt(e,t)||ti(e,t))return e;if(c8(e)%2===1){let n=v8(e);return n!==null?n:y8(e)}return e},E8=e=>{let t=Pm(e),r=US(e);return t%2===0&&r%2===0},T8=(e,t,r)=>!t||Xi.test(t)||Xt(e,r)||ti(e,r)?!0:Nm(e,r,"*"),w8=e=>{if(r8.test(e))return e;let t=e.match(Gj);if(!t)return e;let r=t[2],n=e.lastIndexOf(t[1]);return T8(e,r,n)?e:f8(e)%2===1?E8(e)?e:`${e}***`:e},A8=/<[a-zA-Z/][^>]*$/,S8=e=>{let t=e.match(A8);return!t||t.index===void 0||Xt(e,t.index)?e:e.substring(0,t.index).trimEnd()},k8=e=>!e.match(t8)||e.includes(`
52
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,_8=e=>(e.match(/```/g)||[]).length%2===1,C8=e=>{let t=k8(e);if(t!==null)return t;let r=e.match(Qj);if(r&&!_8(e)){let n=r[2];if(!n||Xi.test(n))return e;if(qj(e)%2===1)return`${e}\``}return e},zS=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",I8=e=>{let t=0,r=!1;for(let n=0;n<e.length-1;n+=1)e[n]==="`"&&!zS(e,n)&&(r=!r),!r&&e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},O8=e=>{let t=0,r=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"){n+=1;continue}if(e[n]==="`"&&!zS(e,n)){r=!r;continue}!r&&e[n]==="$"&&(n+1<e.length&&e[n+1]==="$"?n+=1:t+=1)}return t},N8=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
53
+ `,t)!==-1&&!e.endsWith(`
54
+ `)?`${e}
55
+ $$`:`${e}$$`},P8=e=>I8(e)%2===0?e:N8(e),D8=e=>O8(e)%2===1?`${e}$`:e,R8=(e,t,r)=>{if(e.substring(t+2).includes(")"))return null;let n=a8(e,t);if(n===-1||Xt(e,n))return null;let i=n>0&&e[n-1]==="!",a=i?n-1:n,o=e.substring(0,a);if(i)return o;let s=e.substring(n+1,t);return r==="text-only"?`${o}${s}`:`${o}[${s}](streamdown:incomplete-link)`},cy=(e,t)=>{for(let r=0;r<t;r++)if(e[r]==="["&&!Xt(e,r)){if(r>0&&e[r-1]==="!")continue;let n=FS(e,r);if(n===-1)return r;if(n+1<e.length&&e[n+1]==="("){let i=e.indexOf(")",n+2);i!==-1&&(r=i)}}return t},L8=(e,t,r)=>{let n=t>0&&e[t-1]==="!",i=n?t-1:t;if(!e.substring(t+1).includes("]")){let a=e.substring(0,i);if(n)return a;if(r==="text-only"){let o=cy(e,t);return e.substring(0,o)+e.substring(o+1)}return`${e}](streamdown:incomplete-link)`}if(FS(e,t)===-1){let a=e.substring(0,i);if(n)return a;if(r==="text-only"){let o=cy(e,t);return e.substring(0,o)+e.substring(o+1)}return`${e}](streamdown:incomplete-link)`}return null},qS=(e,t="protocol")=>{let r=e.lastIndexOf("](");if(r!==-1&&!Xt(e,r)){let n=R8(e,r,t);if(n!==null)return n}for(let n=e.length-1;n>=0;n-=1)if(e[n]==="["&&!Xt(e,n)){let i=L8(e,n,t);if(i!==null)return i}return e},M8=/^-{1,2}$/,j8=/^[\s]*-{1,2}[\s]+$/,B8=/^={1,2}$/,F8=/^[\s]*={1,2}[\s]+$/,$8=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
56
+ `);if(t===-1)return e;let r=e.substring(t+1),n=e.substring(0,t),i=r.trim();if(M8.test(i)&&!r.match(j8)){let a=n.split(`
57
+ `).at(-1);if(a&&a.trim().length>0)return`${e}​`}if(B8.test(i)&&!r.match(F8)){let a=n.split(`
58
+ `).at(-1);if(a&&a.trim().length>0)return`${e}​`}return e},U8=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),H8=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(U8,(t,r)=>Xt(e,r)?t:"\\~"),z8=e=>{var t,r;let n=e.match(Jj);if(n){let i=n[2];if(!i||Xi.test(i))return e;let a=e.lastIndexOf(n[1]);if(Xt(e,a)||ti(e,a))return e;if(((t=e.match(uy))==null?void 0:t.length)%2===1)return`${e}~~`}else{let i=e.match(i8);if(i){let a=e.lastIndexOf(i[0].slice(0,2));if(Xt(e,a)||ti(e,a))return e;if(((r=e.match(uy))==null?void 0:r.length)%2===1)return`${e}~`}}return e},Mf=e=>e!==!1,q8=e=>e===!0,zt={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},W8=[{handler:{name:"singleTilde",handle:H8,priority:zt.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:Vj,priority:zt.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:S8,priority:zt.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:$8,priority:zt.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:qS,priority:zt.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:w8,priority:zt.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:h8,priority:zt.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:m8,priority:zt.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:b8,priority:zt.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:x8,priority:zt.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:C8,priority:zt.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:z8,priority:zt.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:P8,priority:zt.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:D8,priority:zt.INLINE_KATEX},optionKey:"inlineKatex"}],V8=e=>{var t;let r=(t=e?.linkMode)!=null?t:"protocol";return W8.filter(({handler:n,optionKey:i})=>n.name==="links"?Mf(e?.links)||Mf(e?.images):n.name==="inlineKatex"?q8(e?.inlineKatex):Mf(e?.[i])).map(({handler:n,earlyReturn:i})=>n.name==="links"?{handler:jS(MS({},n),{handle:a=>qS(a,r)}),earlyReturn:r==="protocol"?i:void 0}:{handler:n,earlyReturn:i})},Y8=(e,t)=>{var r;if(!e||typeof e!="string")return e;let n=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=V8(t),a=((r=t?.handlers)!=null?r:[]).map(s=>{var u;return{handler:jS(MS({},s),{priority:(u=s.priority)!=null?u:zt.DEFAULT}),earlyReturn:void 0}}),o=[...i,...a].sort((s,u)=>{var l,c;return((l=s.handler.priority)!=null?l:0)-((c=u.handler.priority)!=null?c:0)});for(let{handler:s,earlyReturn:u}of o)if(n=s.handle(n),u!=null&&u(n))return n;return n},K8=Y8;function WS(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=WS(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Le(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=WS(e))&&(n&&(n+=" "),n+=t);return n}const G8=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},X8=(e,t)=>({classGroupId:e,validator:t}),VS=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),ul="-",fy=[],Z8="arbitrary..",Q8=e=>{const t=e9(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return J8(o);const s=o.split(ul),u=s[0]===""&&s.length>1?1:0;return YS(s,u,t)},getConflictingClassGroupIds:(o,s)=>{if(s){const u=n[o],l=r[o];return u?l?G8(l,u):u:l||fy}return r[o]||fy}}},YS=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],a=r.nextPart.get(i);if(a){const l=YS(e,t+1,a);if(l)return l}const o=r.validators;if(o===null)return;const s=t===0?e.join(ul):e.slice(t).join(ul),u=o.length;for(let l=0;l<u;l++){const c=o[l];if(c.validator(s))return c.classGroupId}},J8=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?Z8+n:void 0})(),e9=e=>{const{theme:t,classGroups:r}=e;return t9(r,t)},t9=(e,t)=>{const r=VS();for(const n in e){const i=e[n];Dm(i,r,n,t)}return r},Dm=(e,t,r,n)=>{const i=e.length;for(let a=0;a<i;a++){const o=e[a];r9(o,t,r,n)}},r9=(e,t,r,n)=>{if(typeof e=="string"){n9(e,t,r);return}if(typeof e=="function"){i9(e,t,r,n);return}a9(e,t,r,n)},n9=(e,t,r)=>{const n=e===""?t:KS(t,e);n.classGroupId=r},i9=(e,t,r,n)=>{if(o9(e)){Dm(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(X8(r,e))},a9=(e,t,r,n)=>{const i=Object.entries(e),a=i.length;for(let o=0;o<a;o++){const[s,u]=i[o];Dm(u,KS(t,s),r,n)}},KS=(e,t)=>{let r=e;const n=t.split(ul),i=n.length;for(let a=0;a<i;a++){const o=n[a];let s=r.nextPart.get(o);s||(s=VS(),r.nextPart.set(o,s)),r=s}return r},o9=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,s9=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(a,o)=>{r[a]=o,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(a){let o=r[a];if(o!==void 0)return o;if((o=n[a])!==void 0)return i(a,o),o},set(a,o){a in r?r[a]=o:i(a,o)}}},Wh="!",dy=":",u9=[],hy=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),l9=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const a=[];let o=0,s=0,u=0,l;const c=i.length;for(let b=0;b<c;b++){const y=i[b];if(o===0&&s===0){if(y===dy){a.push(i.slice(u,b)),u=b+1;continue}if(y==="/"){l=b;continue}}y==="["?o++:y==="]"?o--:y==="("?s++:y===")"&&s--}const f=a.length===0?i:i.slice(u);let d=f,h=!1;f.endsWith(Wh)?(d=f.slice(0,-1),h=!0):f.startsWith(Wh)&&(d=f.slice(1),h=!0);const p=l&&l>u?l-u:void 0;return hy(a,h,d,p)};if(t){const i=t+dy,a=n;n=o=>o.startsWith(i)?a(o.slice(i.length)):hy(u9,!1,o,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},c9=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let a=0;a<r.length;a++){const o=r[a],s=o[0]==="[",u=t.has(o);s||u?(i.length>0&&(i.sort(),n.push(...i),i=[]),n.push(o)):i.push(o)}return i.length>0&&(i.sort(),n.push(...i)),n}},f9=e=>({cache:s9(e.cacheSize),parseClassName:l9(e),sortModifiers:c9(e),...Q8(e)}),d9=/\s+/,h9=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(d9);let u="";for(let l=s.length-1;l>=0;l-=1){const c=s[l],{isExternal:f,modifiers:d,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:b}=r(c);if(f){u=c+(u.length>0?" "+u:u);continue}let y=!!b,v=n(y?p.substring(0,b):p);if(!v){if(!y){u=c+(u.length>0?" "+u:u);continue}if(v=n(p),!v){u=c+(u.length>0?" "+u:u);continue}y=!1}const T=d.length===0?"":d.length===1?d[0]:a(d).join(":"),x=h?T+Wh:T,S=x+v;if(o.indexOf(S)>-1)continue;o.push(S);const w=i(v,y);for(let A=0;A<w.length;++A){const _=w[A];o.push(x+_)}u=c+(u.length>0?" "+u:u)}return u},p9=(...e)=>{let t=0,r,n,i="";for(;t<e.length;)(r=e[t++])&&(n=GS(r))&&(i&&(i+=" "),i+=n);return i},GS=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=GS(e[n]))&&(r&&(r+=" "),r+=t);return r},m9=(e,...t)=>{let r,n,i,a;const o=u=>{const l=t.reduce((c,f)=>f(c),e());return r=f9(l),n=r.cache.get,i=r.cache.set,a=s,s(u)},s=u=>{const l=n(u);if(l)return l;const c=h9(u,r);return i(u,c),c};return a=o,(...u)=>a(p9(...u))},g9=[],ht=e=>{const t=r=>r[e]||g9;return t.isThemeGetter=!0,t},XS=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ZS=/^\((?:(\w[\w-]*):)?(.+)\)$/i,b9=/^\d+\/\d+$/,y9=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,v9=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,x9=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,E9=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,T9=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ua=e=>b9.test(e),Ae=e=>!!e&&!Number.isNaN(Number(e)),Bn=e=>!!e&&Number.isInteger(Number(e)),jf=e=>e.endsWith("%")&&Ae(e.slice(0,-1)),gn=e=>y9.test(e),w9=()=>!0,A9=e=>v9.test(e)&&!x9.test(e),QS=()=>!1,S9=e=>E9.test(e),k9=e=>T9.test(e),_9=e=>!ie(e)&&!ae(e),C9=e=>Qa(e,tk,QS),ie=e=>XS.test(e),bi=e=>Qa(e,rk,A9),Bf=e=>Qa(e,D9,Ae),py=e=>Qa(e,JS,QS),I9=e=>Qa(e,ek,k9),mu=e=>Qa(e,nk,S9),ae=e=>ZS.test(e),go=e=>Ja(e,rk),O9=e=>Ja(e,R9),my=e=>Ja(e,JS),N9=e=>Ja(e,tk),P9=e=>Ja(e,ek),gu=e=>Ja(e,nk,!0),Qa=(e,t,r)=>{const n=XS.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Ja=(e,t,r=!1)=>{const n=ZS.exec(e);return n?n[1]?t(n[1]):r:!1},JS=e=>e==="position"||e==="percentage",ek=e=>e==="image"||e==="url",tk=e=>e==="length"||e==="size"||e==="bg-size",rk=e=>e==="length",D9=e=>e==="number",R9=e=>e==="family-name",nk=e=>e==="shadow",L9=()=>{const e=ht("color"),t=ht("font"),r=ht("text"),n=ht("font-weight"),i=ht("tracking"),a=ht("leading"),o=ht("breakpoint"),s=ht("container"),u=ht("spacing"),l=ht("radius"),c=ht("shadow"),f=ht("inset-shadow"),d=ht("text-shadow"),h=ht("drop-shadow"),p=ht("blur"),b=ht("perspective"),y=ht("aspect"),v=ht("ease"),T=ht("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...S(),ae,ie],A=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],O=()=>[ae,ie,u],R=()=>[ua,"full","auto",...O()],C=()=>[Bn,"none","subgrid",ae,ie],M=()=>["auto",{span:["full",Bn,ae,ie]},Bn,ae,ie],L=()=>[Bn,"auto",ae,ie],Q=()=>["auto","min","max","fr",ae,ie],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...O()],J=()=>[ua,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],V=()=>[e,ae,ie],re=()=>[...S(),my,py,{position:[ae,ie]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],le=()=>["auto","cover","contain",N9,C9,{size:[ae,ie]}],he=()=>[jf,go,bi],N=()=>["","none","full",l,ae,ie],pe=()=>["",Ae,go,bi],we=()=>["solid","dashed","dotted","double"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>[Ae,jf,my,py],be=()=>["","none",p,ae,ie],Y=()=>["none",Ae,ae,ie],G=()=>["none",Ae,ae,ie],ue=()=>[Ae,ae,ie],W=()=>[ua,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[gn],breakpoint:[gn],color:[w9],container:[gn],"drop-shadow":[gn],ease:["in","out","in-out"],font:[_9],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[gn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[gn],shadow:[gn],spacing:["px",Ae],text:[gn],"text-shadow":[gn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ua,ie,ae,y]}],container:["container"],columns:[{columns:[Ae,ie,ae,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{start:R()}],end:[{end:R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[Bn,"auto",ae,ie]}],basis:[{basis:[ua,"full","auto",s,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ae,ua,"auto","initial","none",ie]}],grow:[{grow:["",Ae,ae,ie]}],shrink:[{shrink:["",Ae,ae,ie]}],order:[{order:[Bn,"first","last","none",ae,ie]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:M()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:M()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],w:[{w:[s,"screen",...J()]}],"min-w":[{"min-w":[s,"screen","none",...J()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",r,go,bi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,ae,Bf]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jf,ie]}],"font-family":[{font:[O9,ie,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ae,ie]}],"line-clamp":[{"line-clamp":[Ae,"none",ae,Bf]}],leading:[{leading:[a,...O()]}],"list-image":[{"list-image":["none",ae,ie]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ae,ie]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...we(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ae,"from-font","auto",ae,bi]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[Ae,"auto",ae,ie]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae,ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae,ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:le()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Bn,ae,ie],radial:["",ae,ie],conic:[Bn,ae,ie]},P9,I9]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:he()}],"gradient-via-pos":[{via:he()}],"gradient-to-pos":[{to:he()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:N()}],"rounded-s":[{"rounded-s":N()}],"rounded-e":[{"rounded-e":N()}],"rounded-t":[{"rounded-t":N()}],"rounded-r":[{"rounded-r":N()}],"rounded-b":[{"rounded-b":N()}],"rounded-l":[{"rounded-l":N()}],"rounded-ss":[{"rounded-ss":N()}],"rounded-se":[{"rounded-se":N()}],"rounded-ee":[{"rounded-ee":N()}],"rounded-es":[{"rounded-es":N()}],"rounded-tl":[{"rounded-tl":N()}],"rounded-tr":[{"rounded-tr":N()}],"rounded-br":[{"rounded-br":N()}],"rounded-bl":[{"rounded-bl":N()}],"border-w":[{border:pe()}],"border-w-x":[{"border-x":pe()}],"border-w-y":[{"border-y":pe()}],"border-w-s":[{"border-s":pe()}],"border-w-e":[{"border-e":pe()}],"border-w-t":[{"border-t":pe()}],"border-w-r":[{"border-r":pe()}],"border-w-b":[{"border-b":pe()}],"border-w-l":[{"border-l":pe()}],"divide-x":[{"divide-x":pe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":pe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...we(),"hidden","none"]}],"divide-style":[{divide:[...we(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...we(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ae,ae,ie]}],"outline-w":[{outline:["",Ae,go,bi]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",c,gu,mu]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",f,gu,mu]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[Ae,bi]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":pe()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",d,gu,mu]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[Ae,ae,ie]}],"mix-blend":[{"mix-blend":[...ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ce()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[ae,ie]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[Ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:le()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ae,ie]}],filter:[{filter:["","none",ae,ie]}],blur:[{blur:be()}],brightness:[{brightness:[Ae,ae,ie]}],contrast:[{contrast:[Ae,ae,ie]}],"drop-shadow":[{"drop-shadow":["","none",h,gu,mu]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",Ae,ae,ie]}],"hue-rotate":[{"hue-rotate":[Ae,ae,ie]}],invert:[{invert:["",Ae,ae,ie]}],saturate:[{saturate:[Ae,ae,ie]}],sepia:[{sepia:["",Ae,ae,ie]}],"backdrop-filter":[{"backdrop-filter":["","none",ae,ie]}],"backdrop-blur":[{"backdrop-blur":be()}],"backdrop-brightness":[{"backdrop-brightness":[Ae,ae,ie]}],"backdrop-contrast":[{"backdrop-contrast":[Ae,ae,ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ae,ae,ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ae,ae,ie]}],"backdrop-invert":[{"backdrop-invert":["",Ae,ae,ie]}],"backdrop-opacity":[{"backdrop-opacity":[Ae,ae,ie]}],"backdrop-saturate":[{"backdrop-saturate":[Ae,ae,ie]}],"backdrop-sepia":[{"backdrop-sepia":["",Ae,ae,ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ae,ie]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ae,"initial",ae,ie]}],ease:[{ease:["linear","initial",v,ae,ie]}],delay:[{delay:[Ae,ae,ie]}],animate:[{animate:["none",T,ae,ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ae,ie]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":["scale-3d"],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[ae,ie,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:W()}],"translate-x":[{"translate-x":W()}],"translate-y":[{"translate-y":W()}],"translate-z":[{"translate-z":W()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae,ie]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae,ie]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[Ae,go,bi,Bf]}],stroke:[{stroke:["none",...V()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},ik=m9(L9),M9=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,j9=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,B9={};function gy(e,t){return(B9.jsx?j9:M9).test(e)}const F9=/[ \t\n\f\r]/g;function $9(e){return typeof e=="object"?e.type==="text"?by(e.value):!1:by(e)}function by(e){return e.replace(F9,"")===""}var la={},Ff,yy;function U9(){if(yy)return Ff;yy=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,s=/^\s+|\s+$/g,u=`
59
+ `,l="/",c="*",f="",d="comment",h="declaration";function p(y,v){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];v=v||{};var T=1,x=1;function S(H){var U=H.match(t);U&&(T+=U.length);var q=H.lastIndexOf(u);x=~q?H.length-q:x+H.length}function w(){var H={line:T,column:x};return function(U){return U.position=new A(H),R(),U}}function A(H){this.start=H,this.end={line:T,column:x},this.source=v.source}A.prototype.content=y;function _(H){var U=new Error(v.source+":"+T+":"+x+": "+H);if(U.reason=H,U.filename=v.source,U.line=T,U.column=x,U.source=y,!v.silent)throw U}function O(H){var U=H.exec(y);if(U){var q=U[0];return S(q),y=y.slice(q.length),U}}function R(){O(r)}function C(H){var U;for(H=H||[];U=M();)U!==!1&&H.push(U);return H}function M(){var H=w();if(!(l!=y.charAt(0)||c!=y.charAt(1))){for(var U=2;f!=y.charAt(U)&&(c!=y.charAt(U)||l!=y.charAt(U+1));)++U;if(U+=2,f===y.charAt(U-1))return _("End of comment missing");var q=y.slice(2,U-2);return x+=2,S(q),y=y.slice(U),x+=2,H({type:d,comment:q})}}function L(){var H=w(),U=O(n);if(U){if(M(),!O(i))return _("property missing ':'");var q=O(a),J=H({type:h,property:b(U[0].replace(e,f)),value:q?b(q[0].replace(e,f)):f});return O(o),J}}function Q(){var H=[];C(H);for(var U;U=L();)U!==!1&&(H.push(U),C(H));return H}return R(),Q()}function b(y){return y?y.replace(s,f):f}return Ff=p,Ff}var vy;function H9(){if(vy)return la;vy=1;var e=la&&la.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(la,"__esModule",{value:!0}),la.default=r;const t=e(U9());function r(n,i){let a=null;if(!n||typeof n!="string")return a;const o=(0,t.default)(n),s=typeof i=="function";return o.forEach(u=>{if(u.type!=="declaration")return;const{property:l,value:c}=u;s?i(l,c,u):c&&(a=a||{},a[l]=c)}),a}return la}var bo={},xy;function z9(){if(xy)return bo;xy=1,Object.defineProperty(bo,"__esModule",{value:!0}),bo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(l){return!l||r.test(l)||e.test(l)},o=function(l,c){return c.toUpperCase()},s=function(l,c){return"".concat(c,"-")},u=function(l,c){return c===void 0&&(c={}),a(l)?l:(l=l.toLowerCase(),c.reactCompat?l=l.replace(i,s):l=l.replace(n,s),l.replace(t,o))};return bo.camelCase=u,bo}var yo,Ey;function q9(){if(Ey)return yo;Ey=1;var e=yo&&yo.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(H9()),r=z9();function n(i,a){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(s,u){s&&u&&(o[(0,r.camelCase)(s,a)]=u)}),o}return n.default=n,yo=n,yo}var W9=q9();const V9=On(W9);function Go(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ty(e.position):"start"in e||"end"in e?Ty(e):"line"in e||"column"in e?Vh(e):""}function Vh(e){return wy(e&&e.line)+":"+wy(e&&e.column)}function Ty(e){return Vh(e&&e.start)+"-"+Vh(e&&e.end)}function wy(e){return e&&typeof e=="number"?e:1}class Ft extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let i="",a={},o=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof n=="string"){const u=n.indexOf(":");u===-1?a.ruleId=n:(a.source=n.slice(0,u),a.ruleId=n.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=Go(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ft.prototype.file="";Ft.prototype.name="";Ft.prototype.reason="";Ft.prototype.message="";Ft.prototype.stack="";Ft.prototype.column=void 0;Ft.prototype.line=void 0;Ft.prototype.ancestors=void 0;Ft.prototype.cause=void 0;Ft.prototype.fatal=void 0;Ft.prototype.place=void 0;Ft.prototype.ruleId=void 0;Ft.prototype.source=void 0;const Rm={}.hasOwnProperty,Y9=new Map,K9=/[A-Z]/g,G9=new Set(["table","tbody","thead","tfoot","tr"]),X9=new Set(["td","th"]),ak="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Z9(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=aB(r,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");n=iB(r,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ui:Ms,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=ok(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ok(e,t,r){if(t.type==="element")return Q9(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return J9(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return tB(e,t,r);if(t.type==="mdxjsEsm")return eB(e,t);if(t.type==="root")return rB(e,t,r);if(t.type==="text")return nB(e,t)}function Q9(e,t,r){const n=e.schema;let i=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=ui,e.schema=i),e.ancestors.push(t);const a=uk(e,t.tagName,!1),o=oB(e,t);let s=Mm(e,t);return G9.has(t.tagName)&&(s=s.filter(function(u){return typeof u=="string"?!$9(u):!0})),sk(e,o,a,t),Lm(o,s),e.ancestors.pop(),e.schema=n,e.create(t,a,o,r)}function J9(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}cs(e,t.position)}function eB(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);cs(e,t.position)}function tB(e,t,r){const n=e.schema;let i=n;t.name==="svg"&&n.space==="html"&&(i=ui,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:uk(e,t.name,!0),o=sB(e,t),s=Mm(e,t);return sk(e,o,a,t),Lm(o,s),e.ancestors.pop(),e.schema=n,e.create(t,a,o,r)}function rB(e,t,r){const n={};return Lm(n,Mm(e,t)),e.create(t,e.Fragment,n,r)}function nB(e,t){return t.value}function sk(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function Lm(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function iB(e,t,r){return n;function n(i,a,o,s){const l=Array.isArray(o.children)?r:t;return s?l(a,o,s):l(a,o)}}function aB(e,t){return r;function r(n,i,a,o){const s=Array.isArray(a.children),u=cn(n);return t(i,a,o,s,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function oB(e,t){const r={};let n,i;for(i in t.properties)if(i!=="children"&&Rm.call(t.properties,i)){const a=uB(e,i,t.properties[i]);if(a){const[o,s]=a;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&X9.has(t.tagName)?n=s:r[o]=s}}if(n){const a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function sB(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const a=n.data.estree.body[0];a.type;const o=a.expression;o.type;const s=o.properties[0];s.type,Object.assign(r,e.evaluater.evaluateExpression(s.argument))}else cs(e,t.position);else{const i=n.name;let a;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const s=n.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else cs(e,t.position);else a=n.value===null?!0:n.value;r[i]=a}return r}function Mm(e,t){const r=[];let n=-1;const i=e.passKeys?new Map:Y9;for(;++n<t.children.length;){const a=t.children[n];let o;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const l=i.get(u)||0;o=u+"-"+l,i.set(u,l+1)}}const s=ok(e,a,o);s!==void 0&&r.push(s)}return r}function uB(e,t,r){const n=mc(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?hA(r):pA(r)),n.property==="style"){let i=typeof r=="object"?r:lB(e,String(r));return e.stylePropertyNameCase==="css"&&(i=cB(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&n.space?DD[n.property]||n.property:n.attribute,r]}}function lB(e,t){try{return V9(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const n=r,i=new Ft("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=ak+"#cannot-parse-style-attribute",i}}function uk(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const s=gy(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}n=o}else n=gy(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const i=n.value;return Rm.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(n);cs(e)}function cs(e,t){const r=new Ft("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=ak+"#cannot-handle-mdx-estrees-without-createevaluater",r}function cB(e){const t={};let r;for(r in e)Rm.call(e,r)&&(t[fB(r)]=e[r]);return t}function fB(e){let t=e.replace(K9,dB);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function dB(e){return"-"+e.toLowerCase()}const $f={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"]},hB={tokenize:pB};function pB(e){const t=e.attempt(this.parser.constructs.contentInitial,n,i);let r;return t;function n(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Pe(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const u=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=u),r=u,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return de(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),o)}}const mB={tokenize:gB},Ay={tokenize:bB};function gB(e){const t=this,r=[];let n=0,i,a,o;return s;function s(x){if(n<r.length){const S=r[n];return t.containerState=S[1],e.attempt(S[0].continuation,u,l)(x)}return l(x)}function u(x){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&T();const S=t.events.length;let w=S,A;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){A=t.events[w][1].end;break}v(n);let _=S;for(;_<t.events.length;)t.events[_][1].end={...A},_++;return mr(t.events,w+1,0,t.events.slice(S)),t.events.length=_,l(x)}return s(x)}function l(x){if(n===r.length){if(!i)return d(x);if(i.currentConstruct&&i.currentConstruct.concrete)return p(x);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ay,c,f)(x)}function c(x){return i&&T(),v(n),d(x)}function f(x){return t.parser.lazy[t.now().line]=n!==r.length,o=t.now().offset,p(x)}function d(x){return t.containerState={},e.attempt(Ay,h,p)(x)}function h(x){return n++,r.push([t.currentConstruct,t.containerState]),d(x)}function p(x){if(x===null){i&&T(),v(0),e.consume(x);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),b(x)}function b(x){if(x===null){y(e.exit("chunkFlow"),!0),v(0),e.consume(x);return}return de(x)?(e.consume(x),y(e.exit("chunkFlow")),n=0,t.interrupt=void 0,s):(e.consume(x),b)}function y(x,S){const w=t.sliceStream(x);if(S&&w.push(null),x.previous=a,a&&(a.next=x),a=x,i.defineSkip(x.start),i.write(w),t.parser.lazy[x.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<o&&(!i.events[A][1].end||i.events[A][1].end.offset>o))return;const _=t.events.length;let O=_,R,C;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(R){C=t.events[O][1].end;break}R=!0}for(v(n),A=_;A<t.events.length;)t.events[A][1].end={...C},A++;mr(t.events,O+1,0,t.events.slice(_)),t.events.length=A}}function v(x){let S=r.length;for(;S-- >x;){const w=r[S];t.containerState=w[1],w[0].exit.call(t,e)}r.length=x}function T(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function bB(e,t,r){return Pe(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const yB={tokenize:vB};function vB(e){const t=this,r=e.attempt($s,n,e.attempt(this.parser.constructs.flowInitial,i,Pe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(E5,i)),"linePrefix")));return r;function n(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const xB={resolveAll:ck()},EB=lk("string"),TB=lk("text");function lk(e){return{resolveAll:ck(e==="text"?wB:void 0),tokenize:t};function t(r){const n=this,i=this.parser.constructs[e],a=r.attempt(i,o,s);return o;function o(c){return l(c)?a(c):s(c)}function s(c){if(c===null){r.consume(c);return}return r.enter("data"),r.consume(c),u}function u(c){return l(c)?(r.exit("data"),a(c)):(r.consume(c),u)}function l(c){if(c===null)return!0;const f=i[c];let d=-1;if(f)for(;++d<f.length;){const h=f[d];if(!h.previous||h.previous.call(n,n.previous))return!0}return!1}}}function ck(e){return t;function t(r,n){let i=-1,a;for(;++i<=r.length;)a===void 0?r[i]&&r[i][1].type==="data"&&(a=i,i++):(!r[i]||r[i][1].type!=="data")&&(i!==a+2&&(r[a][1].end=r[i-1][1].end,r.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(r,n):r}}function wB(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const n=e[r-1][1],i=t.sliceStream(n);let a=i.length,o=-1,s=0,u;for(;a--;){const l=i[a];if(typeof l=="string"){for(o=l.length;l.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(l===-2)u=!0,s++;else if(l!==-1){a++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(s=0),s){const l={type:r===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:n.start._bufferIndex+o,_index:n.start._index+a,line:n.end.line,column:n.end.column-s,offset:n.end.offset-s},end:{...n.end}};n.end={...l.start},n.start.offset===n.end.offset?Object.assign(n,l):(e.splice(r,0,["enter",l,t],["exit",l,t]),r+=2)}r++}return e}const AB={42:rr,43:rr,45:rr,48:rr,49:rr,50:rr,51:rr,52:rr,53:rr,54:rr,55:rr,56:rr,57:rr,62:IS},SB={91:k5},kB={[-2]:Rf,[-1]:Rf,32:Rf},_B={35:P5,42:Uu,45:[iy,Uu],60:M5,61:iy,95:Uu,96:ry,126:ry},CB={38:NS,92:OS},IB={[-5]:Lf,[-4]:Lf,[-3]:Lf,33:ej,38:NS,42:qh,60:[r5,z5],91:rj,92:[O5,OS],93:Om,95:qh,96:m5},OB={null:[qh,xB]},NB={null:[42,95]},PB={null:[]},DB=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:NB,contentInitial:SB,disable:PB,document:AB,flow:_B,flowInitial:kB,insideSpan:OB,string:CB,text:IB},Symbol.toStringTag,{value:"Module"}));function RB(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const i={},a=[];let o=[],s=[];const u={attempt:_(w),check:_(A),consume:T,enter:x,exit:S,interrupt:_(A,{interrupt:!0})},l={code:null,containerState:{},defineSkip:b,events:[],now:p,parser:e,previous:null,sliceSerialize:d,sliceStream:h,write:f};let c=t.tokenize.call(l,u);return t.resolveAll&&a.push(t),l;function f(M){return o=kr(o,M),y(),o[o.length-1]!==null?[]:(O(t,0),l.events=Tc(a,l.events,l),l.events)}function d(M,L){return MB(h(M),L)}function h(M){return LB(o,M)}function p(){const{_bufferIndex:M,_index:L,line:Q,column:H,offset:U}=n;return{_bufferIndex:M,_index:L,line:Q,column:H,offset:U}}function b(M){i[M.line]=M.column,C()}function y(){let M;for(;n._index<o.length;){const L=o[n._index];if(typeof L=="string")for(M=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===M&&n._bufferIndex<L.length;)v(L.charCodeAt(n._bufferIndex));else v(L)}}function v(M){c=c(M)}function T(M){de(M)?(n.line++,n.column=1,n.offset+=M===-3?2:1,C()):M!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===o[n._index].length&&(n._bufferIndex=-1,n._index++)),l.previous=M}function x(M,L){const Q=L||{};return Q.type=M,Q.start=p(),l.events.push(["enter",Q,l]),s.push(Q),Q}function S(M){const L=s.pop();return L.end=p(),l.events.push(["exit",L,l]),L}function w(M,L){O(M,L.from)}function A(M,L){L.restore()}function _(M,L){return Q;function Q(H,U,q){let J,V,re,P;return Array.isArray(H)?he(H):"tokenize"in H?he([H]):le(H);function le(ce){return fe;function fe(be){const Y=be!==null&&ce[be],G=be!==null&&ce.null,ue=[...Array.isArray(Y)?Y:Y?[Y]:[],...Array.isArray(G)?G:G?[G]:[]];return he(ue)(be)}}function he(ce){return J=ce,V=0,ce.length===0?q:N(ce[V])}function N(ce){return fe;function fe(be){return P=R(),re=ce,ce.partial||(l.currentConstruct=ce),ce.name&&l.parser.constructs.disable.null.includes(ce.name)?we():ce.tokenize.call(L?Object.assign(Object.create(l),L):l,u,pe,we)(be)}}function pe(ce){return M(re,P),U}function we(ce){return P.restore(),++V<J.length?N(J[V]):q}}}function O(M,L){M.resolveAll&&!a.includes(M)&&a.push(M),M.resolve&&mr(l.events,L,l.events.length-L,M.resolve(l.events.slice(L),l)),M.resolveTo&&(l.events=M.resolveTo(l.events,l))}function R(){const M=p(),L=l.previous,Q=l.currentConstruct,H=l.events.length,U=Array.from(s);return{from:H,restore:q};function q(){n=M,l.previous=L,l.currentConstruct=Q,l.events.length=H,s=U,C()}}function C(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function LB(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(r===i)o=[e[r].slice(n,a)];else{if(o=e.slice(r,i),n>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(n):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function MB(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const a=e[r];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
60
+ `;break}case-3:{o=`\r
61
+ `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,n.push(o)}return n.join("")}function jB(e){const n={constructs:xS([DB,...(e||{}).extensions||[]]),content:i(hB),defined:[],document:i(mB),flow:i(yB),lazy:{},string:i(EB),text:i(TB)};return n;function i(a){return o;function o(s){return RB(n,a,s)}}}function BB(e){for(;!PS(e););return e}const Sy=/[\0\t\n\r]/g;function FB(){let e=1,t="",r=!0,n;return i;function i(a,o,s){const u=[];let l,c,f,d,h;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),f=0,t="",r&&(a.charCodeAt(0)===65279&&f++,r=void 0);f<a.length;){if(Sy.lastIndex=f,l=Sy.exec(a),d=l&&l.index!==void 0?l.index:a.length,h=a.charCodeAt(d),!l){t=a.slice(f);break}if(h===10&&f===d&&n)u.push(-3),n=void 0;else switch(n&&(u.push(-5),n=void 0),f<d&&(u.push(a.slice(f,d)),e+=d-f),h){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:n=!0,e=1}f=d+1}return s&&(n&&u.push(-5),t&&u.push(t),u.push(null)),u}}const fk={}.hasOwnProperty;function $B(e,t,r){return typeof t!="string"&&(r=t,t=void 0),UB(r)(BB(jB(r).document().write(FB()(e,t,!0))))}function UB(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ue),autolinkProtocol:R,autolinkEmail:R,atxHeading:a(st),blockQuote:a(G),characterEscape:R,characterReference:R,codeFenced:a(ue),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ue,o),codeText:a(W,o),codeTextData:R,data:R,codeFlowValue:R,definition:a($e),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(Oe),hardBreakEscape:a(rt),hardBreakTrailing:a(rt),htmlFlow:a(er,o),htmlFlowData:R,htmlText:a(er,o),htmlTextData:R,image:a(xe),label:o,link:a(Ue),listItem:a(lr),listItemValue:d,listOrdered:a(xt,f),listUnordered:a(xt),paragraph:a(Vr),reference:N,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(st),strong:a(Ef),thematicBreak:a(_e)},exit:{atxHeading:u(),atxHeadingSequence:w,autolink:u(),autolinkEmail:Y,autolinkProtocol:be,blockQuote:u(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:we,characterReferenceMarkerNumeric:we,characterReferenceValue:ce,characterReference:fe,codeFenced:u(y),codeFencedFence:b,codeFencedFenceInfo:h,codeFencedFenceMeta:p,codeFlowValue:C,codeIndented:u(v),codeText:u(U),codeTextData:C,data:C,definition:u(),definitionDestinationString:S,definitionLabelString:T,definitionTitleString:x,emphasis:u(),hardBreakEscape:u(L),hardBreakTrailing:u(L),htmlFlow:u(Q),htmlFlowData:C,htmlText:u(H),htmlTextData:C,image:u(J),label:re,labelText:V,lineEnding:M,link:u(q),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:pe,resourceDestinationString:P,resourceTitleString:le,resource:he,setextHeading:u(O),setextHeadingLineSequence:_,setextHeadingText:A,strong:u(),thematicBreak:u()}};dk(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(F){let ee={type:"root",children:[]};const ge={stack:[ee],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:c,data:r},ye=[];let Me=-1;for(;++Me<F.length;)if(F[Me][1].type==="listOrdered"||F[Me][1].type==="listUnordered")if(F[Me][0]==="enter")ye.push(Me);else{const cr=ye.pop();Me=i(F,cr,Me)}for(Me=-1;++Me<F.length;){const cr=t[F[Me][0]];fk.call(cr,F[Me][1].type)&&cr[F[Me][1].type].call(Object.assign({sliceSerialize:F[Me][2].sliceSerialize},ge),F[Me][1])}if(ge.tokenStack.length>0){const cr=ge.tokenStack[ge.tokenStack.length-1];(cr[1]||ky).call(ge,void 0,cr[0])}for(ee.position={start:Fn(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:Fn(F.length>0?F[F.length-2][1].end:{line:1,column:1,offset:0})},Me=-1;++Me<t.transforms.length;)ee=t.transforms[Me](ee)||ee;return ee}function i(F,ee,ge){let ye=ee-1,Me=-1,cr=!1,di,pn,lo,co;for(;++ye<=ge;){const fr=F[ye];switch(fr[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{fr[0]==="enter"?Me++:Me--,co=void 0;break}case"lineEndingBlank":{fr[0]==="enter"&&(di&&!co&&!Me&&!lo&&(lo=ye),co=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:co=void 0}if(!Me&&fr[0]==="enter"&&fr[1].type==="listItemPrefix"||Me===-1&&fr[0]==="exit"&&(fr[1].type==="listUnordered"||fr[1].type==="listOrdered")){if(di){let ia=ye;for(pn=void 0;ia--;){const mn=F[ia];if(mn[1].type==="lineEnding"||mn[1].type==="lineEndingBlank"){if(mn[0]==="exit")continue;pn&&(F[pn][1].type="lineEndingBlank",cr=!0),mn[1].type="lineEnding",pn=ia}else if(!(mn[1].type==="linePrefix"||mn[1].type==="blockQuotePrefix"||mn[1].type==="blockQuotePrefixWhitespace"||mn[1].type==="blockQuoteMarker"||mn[1].type==="listItemIndent"))break}lo&&(!pn||lo<pn)&&(di._spread=!0),di.end=Object.assign({},pn?F[pn][1].start:fr[1].end),F.splice(pn||ye,0,["exit",di,fr[2]]),ye++,ge++}if(fr[1].type==="listItemPrefix"){const ia={type:"listItem",_spread:!1,start:Object.assign({},fr[1].start),end:void 0};di=ia,F.splice(ye,0,["enter",ia,fr[2]]),ye++,ge++,lo=void 0,co=!0}}}return F[ee][1]._spread=cr,ge}function a(F,ee){return ge;function ge(ye){s.call(this,F(ye),ye),ee&&ee.call(this,ye)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(F,ee,ge){this.stack[this.stack.length-1].children.push(F),this.stack.push(F),this.tokenStack.push([ee,ge||void 0]),F.position={start:Fn(ee.start),end:void 0}}function u(F){return ee;function ee(ge){F&&F.call(this,ge),l.call(this,ge)}}function l(F,ee){const ge=this.stack.pop(),ye=this.tokenStack.pop();if(ye)ye[0].type!==F.type&&(ee?ee.call(this,F,ye[0]):(ye[1]||ky).call(this,F,ye[0]));else throw new Error("Cannot close `"+F.type+"` ("+Go({start:F.start,end:F.end})+"): it’s not open");ge.position.end=Fn(F.end)}function c(){return km(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(F){if(this.data.expectingFirstListItemValue){const ee=this.stack[this.stack.length-2];ee.start=Number.parseInt(this.sliceSerialize(F),10),this.data.expectingFirstListItemValue=void 0}}function h(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.lang=F}function p(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.meta=F}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.value=F.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.value=F.replace(/(\r?\n|\r)$/g,"")}function T(F){const ee=this.resume(),ge=this.stack[this.stack.length-1];ge.label=ee,ge.identifier=Br(this.sliceSerialize(F)).toLowerCase()}function x(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.title=F}function S(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.url=F}function w(F){const ee=this.stack[this.stack.length-1];if(!ee.depth){const ge=this.sliceSerialize(F).length;ee.depth=ge}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function _(F){const ee=this.stack[this.stack.length-1];ee.depth=this.sliceSerialize(F).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function R(F){const ge=this.stack[this.stack.length-1].children;let ye=ge[ge.length-1];(!ye||ye.type!=="text")&&(ye=Tf(),ye.position={start:Fn(F.start),end:void 0},ge.push(ye)),this.stack.push(ye)}function C(F){const ee=this.stack.pop();ee.value+=this.sliceSerialize(F),ee.position.end=Fn(F.end)}function M(F){const ee=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ge=ee.children[ee.children.length-1];ge.position.end=Fn(F.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ee.type)&&(R.call(this,F),C.call(this,F))}function L(){this.data.atHardBreak=!0}function Q(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.value=F}function H(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.value=F}function U(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.value=F}function q(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const ee=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=ee,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function J(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const ee=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=ee,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function V(F){const ee=this.sliceSerialize(F),ge=this.stack[this.stack.length-2];ge.label=k4(ee),ge.identifier=Br(ee).toLowerCase()}function re(){const F=this.stack[this.stack.length-1],ee=this.resume(),ge=this.stack[this.stack.length-1];if(this.data.inReference=!0,ge.type==="link"){const ye=F.children;ge.children=ye}else ge.alt=ee}function P(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.url=F}function le(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.title=F}function he(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function pe(F){const ee=this.resume(),ge=this.stack[this.stack.length-1];ge.label=ee,ge.identifier=Br(this.sliceSerialize(F)).toLowerCase(),this.data.referenceType="full"}function we(F){this.data.characterReferenceType=F.type}function ce(F){const ee=this.sliceSerialize(F),ge=this.data.characterReferenceType;let ye;ge?(ye=vS(ee,ge==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ye=Cm(ee);const Me=this.stack[this.stack.length-1];Me.value+=ye}function fe(F){const ee=this.stack.pop();ee.position.end=Fn(F.end)}function be(F){C.call(this,F);const ee=this.stack[this.stack.length-1];ee.url=this.sliceSerialize(F)}function Y(F){C.call(this,F);const ee=this.stack[this.stack.length-1];ee.url="mailto:"+this.sliceSerialize(F)}function G(){return{type:"blockquote",children:[]}}function ue(){return{type:"code",lang:null,meta:null,value:""}}function W(){return{type:"inlineCode",value:""}}function $e(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Oe(){return{type:"emphasis",children:[]}}function st(){return{type:"heading",depth:0,children:[]}}function rt(){return{type:"break"}}function er(){return{type:"html",value:""}}function xe(){return{type:"image",title:null,url:"",alt:null}}function Ue(){return{type:"link",title:null,url:"",children:[]}}function xt(F){return{type:"list",ordered:F.type==="listOrdered",start:null,spread:F._spread,children:[]}}function lr(F){return{type:"listItem",spread:F._spread,checked:null,children:[]}}function Vr(){return{type:"paragraph",children:[]}}function Ef(){return{type:"strong",children:[]}}function Tf(){return{type:"text",value:""}}function _e(){return{type:"thematicBreak"}}}function Fn(e){return{line:e.line,column:e.column,offset:e.offset}}function dk(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?dk(e,n):HB(e,n)}}function HB(e,t){let r;for(r in t)if(fk.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function ky(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Go({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Go({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Go({start:t.start,end:t.end})+") is still open")}function zB(e){const t=this;t.parser=r;function r(n){return $B(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function qB(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function WB(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
62
+ `}]}function VB(e,t){const r=t.value?t.value+`
63
+ `:"",n={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(n.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function YB(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function KB(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function GB(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),i=Za(n.toLowerCase()),a=e.footnoteOrder.indexOf(n);let o,s=e.footnoteCounts.get(n);s===void 0?(s=0,e.footnoteOrder.push(n),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(n,s);const u={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,u);const l={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,l),e.applyData(t,l)}function XB(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ZB(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function hk(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=n:i.push({type:"text",value:n}),i}function QB(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return hk(e,t);const i={src:Za(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function JB(e,t){const r={src:Za(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function eF(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function tF(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return hk(e,t);const i={href:Za(n.url||"")};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function rF(e,t){const r={href:Za(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nF(e,t,r){const n=e.all(t),i=r?iF(r):pk(t),a={},o=[];if(typeof t.checked=="boolean"){const c=n[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},n.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:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<n.length;){const c=n[s];(i||s!==0||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
64
+ `}),c.type==="element"&&c.tagName==="p"&&!i?o.push(...c.children):o.push(c)}const u=n[n.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
65
+ `});const l={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function iF(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let n=-1;for(;!t&&++n<r.length;)t=pk(r[n])}return t}function pk(e){const t=e.spread;return t??e.children.length>1}function aF(e,t){const r={},n=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++i<n.length;){const o=n[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,a),e.applyData(t,a)}function oF(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function sF(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function uF(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lF(e,t){const r=e.all(t),n=r.shift(),i=[];if(n){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],o),i.push(o)}if(r.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},s=cn(t.children[1]),u=xc(t.children[t.children.length-1]);s&&u&&(o.position={start:s,end:u}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function cF(e,t,r){const n=r?r.children:void 0,a=(n?n.indexOf(t):1)===0?"th":"td",o=r&&r.type==="table"?r.align:void 0,s=o?o.length:t.children.length;let u=-1;const l=[];for(;++u<s;){const f=t.children[u],d={},h=o?o[u]:void 0;h&&(d.align=h);let p={type:"element",tagName:a,properties:d,children:[]};f&&(p.children=e.all(f),e.patch(f,p),p=e.applyData(f,p)),l.push(p)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)}function fF(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const _y=9,Cy=32;function dF(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),i=0;const a=[];for(;n;)a.push(Iy(t.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return a.push(Iy(t.slice(i),i>0,!1)),a.join("")}function Iy(e,t,r){let n=0,i=e.length;if(t){let a=e.codePointAt(n);for(;a===_y||a===Cy;)n++,a=e.codePointAt(n)}if(r){let a=e.codePointAt(i-1);for(;a===_y||a===Cy;)i--,a=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}function hF(e,t){const r={type:"text",value:dF(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function pF(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const mF={blockquote:qB,break:WB,code:VB,delete:YB,emphasis:KB,footnoteReference:GB,heading:XB,html:ZB,imageReference:QB,image:JB,inlineCode:eF,linkReference:tF,link:rF,listItem:nF,list:aF,paragraph:oF,root:sF,strong:uF,table:lF,tableCell:fF,tableRow:cF,text:hF,thematicBreak:pF,toml:bu,yaml:bu,definition:bu,footnoteDefinition:bu};function bu(){}function gF(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function bF(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function yF(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||gF,n=e.options.footnoteBackLabel||bF,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let u=-1;for(;++u<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[u]);if(!l)continue;const c=e.all(l),f=String(l.identifier).toUpperCase(),d=Za(f.toLowerCase());let h=0;const p=[],b=e.footnoteCounts.get(f);for(;b!==void 0&&++h<=b;){p.length>0&&p.push({type:"text",value:" "});let T=typeof r=="string"?r:r(u,h);typeof T=="string"&&(T={type:"text",value:T}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+d+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(u,h),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const y=c[c.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const T=y.children[y.children.length-1];T&&T.type==="text"?T.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...p)}else c.push(...p);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(c,!0)};e.patch(l,v),s.push(v)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Mi(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
66
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
67
+ `}]}}const Yh={}.hasOwnProperty,vF={};function xF(e,t){const r=t||vF,n=new Map,i=new Map,a=new Map,o={...mF,...r.handlers},s={all:l,applyData:TF,definitionById:n,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:u,options:r,patch:EF,wrap:AF};return an(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const f=c.type==="definition"?n:i,d=String(c.identifier).toUpperCase();f.has(d)||f.set(d,c)}}),s;function u(c,f){const d=c.type,h=s.handlers[d];if(Yh.call(s.handlers,d)&&h)return h(s,c,f);if(s.options.passThrough&&s.options.passThrough.includes(d)){if("children"in c){const{children:b,...y}=c,v=Mi(y);return v.children=s.all(c),v}return Mi(c)}return(s.options.unknownHandler||wF)(s,c,f)}function l(c){const f=[];if("children"in c){const d=c.children;let h=-1;for(;++h<d.length;){const p=s.one(d[h],c);if(p){if(h&&d[h-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=Oy(p.value)),!Array.isArray(p)&&p.type==="element")){const b=p.children[0];b&&b.type==="text"&&(b.value=Oy(b.value))}Array.isArray(p)?f.push(...p):f.push(p)}}}return f}}function EF(e,t){e.position&&(t.position=KA(e))}function TF(e,t){let r=t;if(e&&e.data){const n=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof n=="string")if(r.type==="element")r.tagName=n;else{const o="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:o}}r.type==="element"&&a&&Object.assign(r.properties,Mi(a)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}function wF(e,t){const r=t.data||{},n="value"in t&&!(Yh.call(r,"hProperties")||Yh.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function AF(e,t){const r=[];let n=-1;for(t&&r.push({type:"text",value:`
68
+ `});++n<e.length;)n&&r.push({type:"text",value:`
69
+ `}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:`
70
+ `}),r}function Oy(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function Ny(e,t){const r=xF(e,t),n=r.one(e,void 0),i=yF(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
71
+ `},i),a}function SF(e,t){return e&&"run"in e?async function(r,n){const i=Ny(r,{file:n,...t});await e.run(i,n)}:function(r,n){return Ny(r,{file:n,...e||t})}}function Py(e){if(e)throw e}var Uf,Dy;function kF(){if(Dy)return Uf;Dy=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},a=function(l){if(!l||t.call(l)!=="[object Object]")return!1;var c=e.call(l,"constructor"),f=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!c&&!f)return!1;var d;for(d in l);return typeof d>"u"||e.call(l,d)},o=function(l,c){r&&c.name==="__proto__"?r(l,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):l[c.name]=c.newValue},s=function(l,c){if(c==="__proto__")if(e.call(l,c)){if(n)return n(l,c).value}else return;return l[c]};return Uf=function u(){var l,c,f,d,h,p,b=arguments[0],y=1,v=arguments.length,T=!1;for(typeof b=="boolean"&&(T=b,b=arguments[1]||{},y=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});y<v;++y)if(l=arguments[y],l!=null)for(c in l)f=s(b,c),d=s(l,c),b!==d&&(T&&d&&(a(d)||(h=i(d)))?(h?(h=!1,p=f&&i(f)?f:[]):p=f&&a(f)?f:{},o(b,{name:c,newValue:u(T,p,d)})):typeof d<"u"&&o(b,{name:c,newValue:d}));return b},Uf}var _F=kF();const Hf=On(_F);function Kh(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 CF(){const e=[],t={run:r,use:n};return t;function r(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(u,...l){const c=e[++a];let f=-1;if(u){o(u);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,c?IF(c,s)(...l):o(null,...l)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function IF(e,t){let r;return n;function n(...o){const s=e.length>o.length;let u;s&&o.push(i);try{u=e.apply(this,o)}catch(l){const c=l;if(s&&r)throw c;return i(c)}s||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(o,...s){r||(r=!0,t(o,...s))}function a(o){i(null,o)}}const Zr={basename:OF,dirname:NF,extname:PF,join:DF,sep:"/"};function OF(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Us(e);let r=0,n=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else n<0&&(a=!0,n=i+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(n=i):(s=-1,n=o));return r===n?n=o:n<0&&(n=e.length),e.slice(r,n)}function NF(e){if(Us(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function PF(e){Us(e);let t=e.length,r=-1,n=0,i=-1,a=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){n=t+1;break}continue}r<0&&(o=!0,r=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||r<0||a===0||a===1&&i===r-1&&i===n+1?"":e.slice(i,r)}function DF(...e){let t=-1,r;for(;++t<e.length;)Us(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":RF(r)}function RF(e){Us(e);const t=e.codePointAt(0)===47;let r=LF(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function LF(e,t){let r="",n=0,i=-1,a=0,o=-1,s,u;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(u=r.lastIndexOf("/"),u!==r.length-1){u<0?(r="",n=0):(r=r.slice(0,u),n=r.length-1-r.lastIndexOf("/")),i=o,a=0;continue}}else if(r.length>0){r="",n=0,i=o,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(i+1,o):r=e.slice(i+1,o),n=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return r}function Us(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const MF={cwd:jF};function jF(){return"/"}function Gh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function BF(e){if(typeof e=="string")e=new URL(e);else if(!Gh(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 FF(e)}function FF(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const n=t.codePointAt(r+2);if(n===70||n===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const zf=["history","path","basename","stem","extname","dirname"];class $F{constructor(t){let r;t?Gh(t)?r={path:t}:typeof t=="string"||UF(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":MF.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<zf.length;){const a=zf[n];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let i;for(i in r)zf.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?Zr.basename(this.path):void 0}set basename(t){Wf(t,"basename"),qf(t,"basename"),this.path=Zr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Zr.dirname(this.path):void 0}set dirname(t){Ry(this.basename,"dirname"),this.path=Zr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Zr.extname(this.path):void 0}set extname(t){if(qf(t,"extname"),Ry(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=Zr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Gh(t)&&(t=BF(t)),Wf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Zr.basename(this.path,this.extname):void 0}set stem(t){Wf(t,"stem"),qf(t,"stem"),this.path=Zr.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){const i=this.message(t,r,n);throw i.fatal=!0,i}info(t,r,n){const i=this.message(t,r,n);return i.fatal=void 0,i}message(t,r,n){const i=new Ft(t,r,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function qf(e,t){if(e&&e.includes(Zr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Zr.sep+"`")}function Wf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ry(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function UF(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const HF=(function(e){const n=this.constructor.prototype,i=n[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,n),a}),zF={}.hasOwnProperty;class jm extends HF{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=CF()}copy(){const t=new jm;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(Hf(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Kf("data",this.frozen),this.namespace[t]=r,this):zF.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Kf("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[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const i=r.call(t,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=yu(t),n=this.parser||this.Parser;return Vf("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),Vf("process",this.parser||this.Parser),Yf("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(a,o){const s=yu(t),u=n.parse(s);n.run(u,s,function(c,f,d){if(c||!f||!d)return l(c);const h=f,p=n.stringify(h,d);VF(p)?d.value=p:d.result=p,l(c,d)});function l(c,f){c||!f?o(c):a?a(f):r(void 0,f)}}}processSync(t){let r=!1,n;return this.freeze(),Vf("processSync",this.parser||this.Parser),Yf("processSync",this.compiler||this.Compiler),this.process(t,i),My("processSync","process",r),n;function i(a,o){r=!0,Py(a),n=o}}run(t,r,n){Ly(t),this.freeze();const i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?a(void 0,n):new Promise(a);function a(o,s){const u=yu(r);i.run(t,u,l);function l(c,f,d){const h=f||t;c?s(c):o?o(h):n(void 0,h,d)}}}runSync(t,r){let n=!1,i;return this.run(t,r,a),My("runSync","run",n),i;function a(o,s){Py(o),i=s,n=!0}}stringify(t,r){this.freeze();const n=yu(r),i=this.compiler||this.Compiler;return Yf("stringify",i),Ly(t),i(t,n)}use(t,...r){const n=this.attachers,i=this.namespace;if(Kf("use",this.frozen),t!=null)if(typeof t=="function")u(t,r);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[c,...f]=l;u(c,f)}else o(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function o(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&&(i.settings=Hf(!0,i.settings,l.settings))}function s(l){let c=-1;if(l!=null)if(Array.isArray(l))for(;++c<l.length;){const f=l[c];a(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,c){let f=-1,d=-1;for(;++f<n.length;)if(n[f][0]===l){d=f;break}if(d===-1)n.push([l,...c]);else if(c.length>0){let[h,...p]=c;const b=n[d][1];Kh(b)&&Kh(h)&&(h=Hf(!0,b,h)),n[d]=[l,h,...p]}}}}const qF=new jm().freeze();function Vf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Yf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Kf(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 Ly(e){if(!Kh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function My(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function yu(e){return WF(e)?e:new $F(e)}function WF(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function VF(e){return typeof e=="string"||YF(e)}function YF(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Bm(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Zi=Bm();function mk(e){Zi=e}var Xo={exec:()=>null};function De(e,t=""){let r=typeof e=="string"?e:e.source,n={replace:(i,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(Kt.caret,"$1"),r=r.replace(i,o),n},getRegex:()=>new RegExp(r,t)};return n}var KF=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Kt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},GF=/^(?:[ \t]*(?:\n|$))+/,XF=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ZF=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Hs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,QF=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Fm=/(?:[*+-]|\d{1,9}[.)])/,gk=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,bk=De(gk).replace(/bull/g,Fm).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),JF=De(gk).replace(/bull/g,Fm).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),$m=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,e7=/^[^\n]+/,Um=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,t7=De(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Um).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),r7=De(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Fm).getRegex(),Ac="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Hm=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,n7=De("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Hm).replace("tag",Ac).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),yk=De($m).replace("hr",Hs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ac).getRegex(),i7=De(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",yk).getRegex(),zm={blockquote:i7,code:XF,def:t7,fences:ZF,heading:QF,hr:Hs,html:n7,lheading:bk,list:r7,newline:GF,paragraph:yk,table:Xo,text:e7},jy=De("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Hs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ac).getRegex(),a7={...zm,lheading:JF,table:jy,paragraph:De($m).replace("hr",Hs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",jy).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ac).getRegex()},o7={...zm,html:De(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Hm).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Xo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:De($m).replace("hr",Hs).replace("heading",` *#{1,6} *[^
72
+ ]`).replace("lheading",bk).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},s7=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,u7=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,vk=/^( {2,}|\\)\n(?!\s*$)/,l7=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Sc=/[\p{P}\p{S}]/u,qm=/[\s\p{P}\p{S}]/u,xk=/[^\s\p{P}\p{S}]/u,c7=De(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,qm).getRegex(),Ek=/(?!~)[\p{P}\p{S}]/u,f7=/(?!~)[\s\p{P}\p{S}]/u,d7=/(?:[^\s\p{P}\p{S}]|~)/u,h7=De(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",KF?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Tk=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,p7=De(Tk,"u").replace(/punct/g,Sc).getRegex(),m7=De(Tk,"u").replace(/punct/g,Ek).getRegex(),wk="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",g7=De(wk,"gu").replace(/notPunctSpace/g,xk).replace(/punctSpace/g,qm).replace(/punct/g,Sc).getRegex(),b7=De(wk,"gu").replace(/notPunctSpace/g,d7).replace(/punctSpace/g,f7).replace(/punct/g,Ek).getRegex(),y7=De("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,xk).replace(/punctSpace/g,qm).replace(/punct/g,Sc).getRegex(),v7=De(/\\(punct)/,"gu").replace(/punct/g,Sc).getRegex(),x7=De(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),E7=De(Hm).replace("(?:-->|$)","-->").getRegex(),T7=De("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",E7).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ll=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,w7=De(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ll).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ak=De(/^!?\[(label)\]\[(ref)\]/).replace("label",ll).replace("ref",Um).getRegex(),Sk=De(/^!?\[(ref)\](?:\[\])?/).replace("ref",Um).getRegex(),A7=De("reflink|nolink(?!\\()","g").replace("reflink",Ak).replace("nolink",Sk).getRegex(),By=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Wm={_backpedal:Xo,anyPunctuation:v7,autolink:x7,blockSkip:h7,br:vk,code:u7,del:Xo,emStrongLDelim:p7,emStrongRDelimAst:g7,emStrongRDelimUnd:y7,escape:s7,link:w7,nolink:Sk,punctuation:c7,reflink:Ak,reflinkSearch:A7,tag:T7,text:l7,url:Xo},S7={...Wm,link:De(/^!?\[(label)\]\((.*?)\)/).replace("label",ll).getRegex(),reflink:De(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ll).getRegex()},Xh={...Wm,emStrongRDelimAst:b7,emStrongLDelim:m7,url:De(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",By).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:De(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",By).getRegex()},k7={...Xh,br:De(vk).replace("{2,}","*").getRegex(),text:De(Xh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},vu={normal:zm,gfm:a7,pedantic:o7},vo={normal:Wm,gfm:Xh,breaks:k7,pedantic:S7},_7={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Fy=e=>_7[e];function bn(e,t){if(t){if(Kt.escapeTest.test(e))return e.replace(Kt.escapeReplace,Fy)}else if(Kt.escapeTestNoEncode.test(e))return e.replace(Kt.escapeReplaceNoEncode,Fy);return e}function $y(e){try{e=encodeURI(e).replace(Kt.percentDecode,"%")}catch{return null}return e}function Uy(e,t){let r=e.replace(Kt.findPipe,(a,o,s)=>{let u=!1,l=o;for(;--l>=0&&s[l]==="\\";)u=!u;return u?"|":" |"}),n=r.split(Kt.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(Kt.slashPipe,"|");return n}function xo(e,t,r){let n=e.length;if(n===0)return"";let i=0;for(;i<n&&e.charAt(n-i-1)===t;)i++;return e.slice(0,n-i)}function C7(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}function Hy(e,t,r,n,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let u={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,u}function I7(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(n===null)return t;let i=n[1];return t.split(`
73
+ `).map(a=>{let o=a.match(r.other.beginningSpace);if(o===null)return a;let[s]=o;return s.length>=i.length?a.slice(i.length):a}).join(`
74
+ `)}var cl=class{options;rules;lexer;constructor(t){this.options=t||Zi}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let n=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:xo(n,`
75
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let n=r[0],i=I7(n,r[3]||"",this.rules);return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let n=r[2].trim();if(this.rules.other.endingHash.test(n)){let i=xo(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(n=i.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:xo(r[0],`
76
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let n=xo(r[0],`
77
+ `).split(`
78
+ `),i="",a="",o=[];for(;n.length>0;){let s=!1,u=[],l;for(l=0;l<n.length;l++)if(this.rules.other.blockquoteStart.test(n[l]))u.push(n[l]),s=!0;else if(!s)u.push(n[l]);else break;n=n.slice(l);let c=u.join(`
79
+ `),f=c.replace(this.rules.other.blockquoteSetextReplace,`
80
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
81
+ ${c}`:c,a=a?`${a}
82
+ ${f}`:f;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,o,!0),this.lexer.state.top=d,n.length===0)break;let h=o.at(-1);if(h?.type==="code")break;if(h?.type==="blockquote"){let p=h,b=p.raw+`
83
+ `+n.join(`
84
+ `),y=this.blockquote(b);o[o.length-1]=y,i=i.substring(0,i.length-p.raw.length)+y.raw,a=a.substring(0,a.length-p.text.length)+y.text;break}else if(h?.type==="list"){let p=h,b=p.raw+`
85
+ `+n.join(`
86
+ `),y=this.list(b);o[o.length-1]=y,i=i.substring(0,i.length-h.raw.length)+y.raw,a=a.substring(0,a.length-p.raw.length)+y.raw,n=b.substring(o.at(-1).raw.length).split(`
87
+ `);continue}}return{type:"blockquote",raw:i,tokens:o,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let n=r[1].trim(),i=n.length>1,a={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let o=this.rules.other.listItemRegex(n),s=!1;for(;t;){let l=!1,c="",f="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;c=r[0],t=t.substring(c.length);let d=r[2].split(`
88
+ `,1)[0].replace(this.rules.other.listReplaceTabs,y=>" ".repeat(3*y.length)),h=t.split(`
89
+ `,1)[0],p=!d.trim(),b=0;if(this.options.pedantic?(b=2,f=d.trimStart()):p?b=r[1].length+1:(b=r[2].search(this.rules.other.nonSpaceChar),b=b>4?1:b,f=d.slice(b),b+=r[1].length),p&&this.rules.other.blankLine.test(h)&&(c+=h+`
90
+ `,t=t.substring(h.length+1),l=!0),!l){let y=this.rules.other.nextBulletRegex(b),v=this.rules.other.hrRegex(b),T=this.rules.other.fencesBeginRegex(b),x=this.rules.other.headingBeginRegex(b),S=this.rules.other.htmlBeginRegex(b);for(;t;){let w=t.split(`
91
+ `,1)[0],A;if(h=w,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),A=h):A=h.replace(this.rules.other.tabCharGlobal," "),T.test(h)||x.test(h)||S.test(h)||y.test(h)||v.test(h))break;if(A.search(this.rules.other.nonSpaceChar)>=b||!h.trim())f+=`
92
+ `+A.slice(b);else{if(p||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(d)||x.test(d)||v.test(d))break;f+=`
93
+ `+h}!p&&!h.trim()&&(p=!0),c+=w+`
94
+ `,t=t.substring(w.length+1),d=A.slice(b)}}a.loose||(s?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(s=!0)),a.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(f),loose:!1,text:f,tokens:[]}),a.raw+=c}let u=a.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let l of a.items){if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),l.task){if(l.text=l.text.replace(this.rules.other.listReplaceTask,""),l.tokens[0]?.type==="text"||l.tokens[0]?.type==="paragraph"){l.tokens[0].raw=l.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),l.tokens[0].text=l.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let f=this.lexer.inlineQueue.length-1;f>=0;f--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[f].src)){this.lexer.inlineQueue[f].src=this.lexer.inlineQueue[f].src.replace(this.rules.other.listReplaceTask,"");break}}let c=this.rules.other.listTaskCheckbox.exec(l.raw);if(c){let f={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};l.checked=f.checked,a.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=f.raw+l.tokens[0].raw,l.tokens[0].text=f.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(f)):l.tokens.unshift({type:"paragraph",raw:f.raw,text:f.raw,tokens:[f]}):l.tokens.unshift(f)}}if(!a.loose){let c=l.tokens.filter(d=>d.type==="space"),f=c.length>0&&c.some(d=>this.rules.other.anyLine.test(d.raw));a.loose=f}}if(a.loose)for(let l of a.items){l.loose=!0;for(let c of l.tokens)c.type==="text"&&(c.type="paragraph")}return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let n=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:i,title:a}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let n=Uy(r[1]),i=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
95
+ `):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let s of i)this.rules.other.tableAlignRight.test(s)?o.align.push("right"):this.rules.other.tableAlignCenter.test(s)?o.align.push("center"):this.rules.other.tableAlignLeft.test(s)?o.align.push("left"):o.align.push(null);for(let s=0;s<n.length;s++)o.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:o.align[s]});for(let s of a)o.rows.push(Uy(s,o.header.length).map((u,l)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:o.align[l]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let n=r[1].charAt(r[1].length-1)===`
96
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let o=xo(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=C7(r[2],"()");if(o===-2)return;if(o>-1){let s=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,s).trim(),r[3]=""}}let i=r[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(i);o&&(i=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i=i.slice(1):i=i.slice(1,-1)),Hy(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let i=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[i.toLowerCase()];if(!a){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return Hy(n,a,n[0],this.lexer,this.rules)}}emStrong(t,r,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[2])||!n||this.rules.inline.punctuation.exec(n))){let a=[...i[0]].length-1,o,s,u=a,l=0,c=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,r=r.slice(-1*t.length+a);(i=c.exec(r))!=null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(s=[...o].length,i[3]||i[4]){u+=s;continue}else if((i[5]||i[6])&&a%3&&!((a+s)%3)){l+=s;continue}if(u-=s,u>0)continue;s=Math.min(s,s+u+l);let f=[...i[0]][0].length,d=t.slice(0,a+i.index+f+s);if(Math.min(a,s)%2){let p=d.slice(1,-1);return{type:"em",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}let h=d.slice(2,-2);return{type:"strong",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let n=r[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(n),a=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return i&&a&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:r[0],text:n}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let n,i;return r[2]==="@"?(n=r[1],i="mailto:"+n):(n=r[1],i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let n,i;if(r[2]==="@")n=r[0],i="mailto:"+n;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);n=r[0],r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let n=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:n}}}},_r=class Zh{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Zi,this.options.tokenizer=this.options.tokenizer||new cl,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Kt,block:vu.normal,inline:vo.normal};this.options.pedantic?(r.block=vu.pedantic,r.inline=vo.pedantic):this.options.gfm&&(r.block=vu.gfm,this.options.breaks?r.inline=vo.breaks:r.inline=vo.gfm),this.tokenizer.rules=r}static get rules(){return{block:vu,inline:vo}}static lex(t,r){return new Zh(r).lex(t)}static lexInline(t,r){return new Zh(r).inlineTokens(t)}lex(t){t=t.replace(Kt.carriageReturn,`
97
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],n=!1){for(this.options.pedantic&&(t=t.replace(Kt.tabCharGlobal," ").replace(Kt.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(o=>(i=o.call({lexer:this},t,r))?(t=t.substring(i.raw.length),r.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let o=r.at(-1);i.raw.length===1&&o!==void 0?o.raw+=`
98
+ `:r.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
99
+ `)?"":`
100
+ `)+i.raw,o.text+=`
101
+ `+i.text,this.inlineQueue.at(-1).src=o.text):r.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
102
+ `)?"":`
103
+ `)+i.raw,o.text+=`
104
+ `+i.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},r.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),r.push(i);continue}let a=t;if(this.options.extensions?.startBlock){let o=1/0,s=t.slice(1),u;this.options.extensions.startBlock.forEach(l=>{u=l.call({lexer:this},s),typeof u=="number"&&u>=0&&(o=Math.min(o,u))}),o<1/0&&o>=0&&(a=t.substring(0,o+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let o=r.at(-1);n&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(`
105
+ `)?"":`
106
+ `)+i.raw,o.text+=`
107
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(i),n=a.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let o=r.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
108
+ `)?"":`
109
+ `)+i.raw,o.text+=`
110
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(i);continue}if(t){let o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let n=t,i=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)u.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)a=i[2]?i[2].length:0,n=n.slice(0,i.index+a)+"["+"a".repeat(i[0].length-a-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let o=!1,s="";for(;t;){o||(s=""),o=!1;let u;if(this.options.extensions?.inline?.some(c=>(u=c.call({lexer:this},t,r))?(t=t.substring(u.raw.length),r.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);let c=r.at(-1);u.type==="text"&&c?.type==="text"?(c.raw+=u.raw,c.text+=u.text):r.push(u);continue}if(u=this.tokenizer.emStrong(t,n,s)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.del(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),r.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),r.push(u);continue}let l=t;if(this.options.extensions?.startInline){let c=1/0,f=t.slice(1),d;this.options.extensions.startInline.forEach(h=>{d=h.call({lexer:this},f),typeof d=="number"&&d>=0&&(c=Math.min(c,d))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(u=this.tokenizer.inlineText(l)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(s=u.raw.slice(-1)),o=!0;let c=r.at(-1);c?.type==="text"?(c.raw+=u.raw,c.text+=u.text):r.push(u);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return r}},fl=class{options;parser;constructor(t){this.options=t||Zi}space(t){return""}code({text:t,lang:r,escaped:n}){let i=(r||"").match(Kt.notSpaceStart)?.[0],a=t.replace(Kt.endingNewline,"")+`
111
+ `;return i?'<pre><code class="language-'+bn(i)+'">'+(n?a:bn(a,!0))+`</code></pre>
112
+ `:"<pre><code>"+(n?a:bn(a,!0))+`</code></pre>
113
+ `}blockquote({tokens:t}){return`<blockquote>
114
+ ${this.parser.parse(t)}</blockquote>
115
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
116
+ `}hr(t){return`<hr>
117
+ `}list(t){let r=t.ordered,n=t.start,i="";for(let s=0;s<t.items.length;s++){let u=t.items[s];i+=this.listitem(u)}let a=r?"ol":"ul",o=r&&n!==1?' start="'+n+'"':"";return"<"+a+o+`>
118
+ `+i+"</"+a+`>
119
+ `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
120
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
121
+ `}table(t){let r="",n="";for(let a=0;a<t.header.length;a++)n+=this.tablecell(t.header[a]);r+=this.tablerow({text:n});let i="";for(let a=0;a<t.rows.length;a++){let o=t.rows[a];n="";for(let s=0;s<o.length;s++)n+=this.tablecell(o[s]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
122
+ <thead>
123
+ `+r+`</thead>
124
+ `+i+`</table>
125
+ `}tablerow({text:t}){return`<tr>
126
+ ${t}</tr>
127
+ `}tablecell(t){let r=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+r+`</${n}>
128
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${bn(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:n}){let i=this.parser.parseInline(n),a=$y(t);if(a===null)return i;t=a;let o='<a href="'+t+'"';return r&&(o+=' title="'+bn(r)+'"'),o+=">"+i+"</a>",o}image({href:t,title:r,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let a=$y(t);if(a===null)return bn(n);t=a;let o=`<img src="${t}" alt="${n}"`;return r&&(o+=` title="${bn(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:bn(t.text)}},Vm=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},Rr=class Qh{options;renderer;textRenderer;constructor(t){this.options=t||Zi,this.options.renderer=this.options.renderer||new fl,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Vm}static parse(t,r){return new Qh(r).parse(t)}static parseInline(t,r){return new Qh(r).parseInline(t)}parse(t){let r="";for(let n=0;n<t.length;n++){let i=t[n];if(this.options.extensions?.renderers?.[i.type]){let o=i,s=this.options.extensions.renderers[o.type].call({parser:this},o);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){r+=s||"";continue}}let a=i;switch(a.type){case"space":{r+=this.renderer.space(a);break}case"hr":{r+=this.renderer.hr(a);break}case"heading":{r+=this.renderer.heading(a);break}case"code":{r+=this.renderer.code(a);break}case"table":{r+=this.renderer.table(a);break}case"blockquote":{r+=this.renderer.blockquote(a);break}case"list":{r+=this.renderer.list(a);break}case"checkbox":{r+=this.renderer.checkbox(a);break}case"html":{r+=this.renderer.html(a);break}case"def":{r+=this.renderer.def(a);break}case"paragraph":{r+=this.renderer.paragraph(a);break}case"text":{r+=this.renderer.text(a);break}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return r}parseInline(t,r=this.renderer){let n="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions?.renderers?.[a.type]){let s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=s||"";continue}}let o=a;switch(o.type){case"escape":{n+=r.text(o);break}case"html":{n+=r.html(o);break}case"link":{n+=r.link(o);break}case"image":{n+=r.image(o);break}case"checkbox":{n+=r.checkbox(o);break}case"strong":{n+=r.strong(o);break}case"em":{n+=r.em(o);break}case"codespan":{n+=r.codespan(o);break}case"br":{n+=r.br(o);break}case"del":{n+=r.del(o);break}case"text":{n+=r.text(o);break}default:{let s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}},Ro=class{options;block;constructor(e){this.options=e||Zi}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?_r.lex:_r.lexInline}provideParser(){return this.block?Rr.parse:Rr.parseInline}},O7=class{defaults=Bm();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Rr;Renderer=fl;TextRenderer=Vm;Lexer=_r;Tokenizer=cl;Hooks=Ro;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(let n of e)switch(r=r.concat(t.call(this,n)),n.type){case"table":{let i=n;for(let a of i.header)r=r.concat(this.walkTokens(a.tokens,t));for(let a of i.rows)for(let o of a)r=r.concat(this.walkTokens(o.tokens,t));break}case"list":{let i=n;r=r.concat(this.walkTokens(i.items,t));break}default:{let i=n;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(a=>{let o=i[a].flat(1/0);r=r.concat(this.walkTokens(o,t))}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=t.renderers[i.name];a?t.renderers[i.name]=function(...o){let s=i.renderer.apply(this,o);return s===!1&&(s=a.apply(this,o)),s}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=t[i.level];a?a.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),n.extensions=t),r.renderer){let i=this.defaults.renderer||new fl(this.defaults);for(let a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let o=a,s=r.renderer[o],u=i[o];i[o]=(...l)=>{let c=s.apply(i,l);return c===!1&&(c=u.apply(i,l)),c||""}}n.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new cl(this.defaults);for(let a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let o=a,s=r.tokenizer[o],u=i[o];i[o]=(...l)=>{let c=s.apply(i,l);return c===!1&&(c=u.apply(i,l)),c}}n.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new Ro;for(let a in r.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let o=a,s=r.hooks[o],u=i[o];Ro.passThroughHooks.has(a)?i[o]=l=>{if(this.defaults.async&&Ro.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await s.call(i,l);return u.call(i,f)})();let c=s.call(i,l);return u.call(i,c)}:i[o]=(...l)=>{if(this.defaults.async)return(async()=>{let f=await s.apply(i,l);return f===!1&&(f=await u.apply(i,l)),f})();let c=s.apply(i,l);return c===!1&&(c=u.apply(i,l)),c}}n.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(o){let s=[];return s.push(a.call(this,o)),i&&(s=s.concat(i.call(this,o))),s}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return _r.lex(e,t??this.defaults)}parser(e,t){return Rr.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let n={...r},i={...this.defaults,...n},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let o=i.hooks?await i.hooks.preprocess(t):t,s=await(i.hooks?await i.hooks.provideLexer():e?_r.lex:_r.lexInline)(o,i),u=i.hooks?await i.hooks.processAllTokens(s):s;i.walkTokens&&await Promise.all(this.walkTokens(u,i.walkTokens));let l=await(i.hooks?await i.hooks.provideParser():e?Rr.parse:Rr.parseInline)(u,i);return i.hooks?await i.hooks.postprocess(l):l})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let o=(i.hooks?i.hooks.provideLexer():e?_r.lex:_r.lexInline)(t,i);i.hooks&&(o=i.hooks.processAllTokens(o)),i.walkTokens&&this.walkTokens(o,i.walkTokens);let s=(i.hooks?i.hooks.provideParser():e?Rr.parse:Rr.parseInline)(o,i);return i.hooks&&(s=i.hooks.postprocess(s)),s}catch(o){return a(o)}}}onError(e,t){return r=>{if(r.message+=`
129
+ Please report this to https://github.com/markedjs/marked.`,e){let n="<p>An error occurred:</p><pre>"+bn(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},Bi=new O7;function He(e,t){return Bi.parse(e,t)}He.options=He.setOptions=function(e){return Bi.setOptions(e),He.defaults=Bi.defaults,mk(He.defaults),He};He.getDefaults=Bm;He.defaults=Zi;He.use=function(...e){return Bi.use(...e),He.defaults=Bi.defaults,mk(He.defaults),He};He.walkTokens=function(e,t){return Bi.walkTokens(e,t)};He.parseInline=Bi.parseInline;He.Parser=Rr;He.parser=Rr.parse;He.Renderer=fl;He.TextRenderer=Vm;He.Lexer=_r;He.lexer=_r.lex;He.Tokenizer=cl;He.Hooks=Ro;He.parse=He;He.options;He.setOptions;He.use;He.walkTokens;He.parseInline;Rr.parse;_r.lex;var N7=300,P7="300px",D7=500;function R7(e={}){let{immediate:t=!1,debounceDelay:r=N7,rootMargin:n=P7,idleTimeout:i=D7}=e,[a,o]=m.useState(!1),s=m.useRef(null),u=m.useRef(null),l=m.useRef(null),c=m.useMemo(()=>h=>{let p=Date.now();return window.setTimeout(()=>{h({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-p))})},1)},[]),f=m.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(h,p)=>window.requestIdleCallback(h,p):c,[c]),d=m.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?h=>window.cancelIdleCallback(h):h=>{clearTimeout(h)},[]);return m.useEffect(()=>{if(t){o(!0);return}let h=s.current;if(!h)return;u.current&&(clearTimeout(u.current),u.current=null),l.current&&(d(l.current),l.current=null);let p=()=>{u.current&&(clearTimeout(u.current),u.current=null),l.current&&(d(l.current),l.current=null)},b=x=>{l.current=f(S=>{S.timeRemaining()>0||S.didTimeout?(o(!0),x.disconnect()):l.current=f(()=>{o(!0),x.disconnect()},{timeout:i/2})},{timeout:i})},y=x=>{p(),u.current=window.setTimeout(()=>{var S,w;let A=x.takeRecords();(A.length===0||(w=(S=A.at(-1))==null?void 0:S.isIntersecting)!=null&&w)&&b(x)},r)},v=(x,S)=>{x.isIntersecting?y(S):p()},T=new IntersectionObserver(x=>{for(let S of x)v(S,T)},{rootMargin:n,threshold:0});return T.observe(h),()=>{u.current&&clearTimeout(u.current),l.current&&d(l.current),T.disconnect()}},[t,r,n,i,d,f]),{shouldRender:a,containerRef:s}}var kk=/\s/,L7=/^\s+$/,M7=new Set(["code","pre","svg","math","annotation"]),j7=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",B7=e=>e.some(t=>j7(t)&&M7.has(t.tagName)),F7=e=>{let t=[],r="",n=!1;for(let i of e){let a=kk.test(i);a!==n&&r&&(t.push(r),r=""),r+=i,n=a}return r&&t.push(r),t},$7=e=>{let t=[],r="";for(let n of e)kk.test(n)?r+=n:(r&&(t.push(r),r=""),t.push(n));return r&&t.push(r),t},U7=(e,t,r,n,i,a)=>{let o=`--sd-animation:sd-${t};--sd-duration:${i?0:r}ms;--sd-easing:${n}`;return a&&(o+=`;--sd-delay:${a}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:o},children:[{type:"text",value:e}]}},H7=(e,t,r,n,i)=>{let a=t.at(-1);if(!(a&&"children"in a))return;if(B7(t))return Ea;let o=a,s=o.children.indexOf(e);if(s===-1)return;let u=e.value;if(!u.trim()){i.count+=u.length;return}let l=r.sep==="char"?$7(u):F7(u),c=n.prevContentLength,f=l.map(d=>{let h=i.count;if(i.count+=d.length,L7.test(d))return{type:"text",value:d};let p=c>0&&h<c,b=p?0:i.newIndex++*r.stagger;return U7(d,r.animation,r.duration,r.easing,p,b)});return o.children.splice(s,1,...f),s+f.length},z7=0;function Jh(e){var t,r,n,i,a;let o={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(r=e?.duration)!=null?r:150,easing:(n=e?.easing)!=null?n:"ease",sep:(i=e?.sep)!=null?i:"word",stagger:(a=e?.stagger)!=null?a:40},s={prevContentLength:0,lastRenderCharCount:0},u=z7++,l=()=>c=>{let f={count:0,newIndex:0};hm(c,"text",(d,h)=>H7(d,h,o,s,f)),s.lastRenderCharCount=f.count,s.prevContentLength=0};return Object.defineProperty(l,"name",{value:`rehypeAnimate$${u}`}),{name:"animate",type:"animate",rehypePlugin:l,setPrevContentLength(c){s.prevContentLength=c},getLastRenderCharCount(){let c=s.lastRenderCharCount;return s.lastRenderCharCount=0,c}}}Jh();var _k=m.createContext(!1),q7=()=>m.useContext(_k),Ym=(...e)=>ik(Le(e)),W7=(e,t)=>{if(!e||!t)return t;let r=`${e}:`;return t.split(/\s+/).filter(Boolean).map(n=>n.startsWith(r)?n:`${e}:${n}`).join(" ")},V7=e=>e?(...t)=>W7(e,ik(Le(t))):Ym,ka=(e,t,r)=>{let n=typeof t=="string"&&r.startsWith("text/csv")?"\uFEFF":"",i=typeof t=="string"?new Blob([n+t],{type:r}):t,a=URL.createObjectURL(i),o=document.createElement("a");o.href=a,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)},ep=m.createContext(Ym),ke=()=>m.useContext(ep),Y7=Ym("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),K7=e=>{let t={};for(let r of e.split(";")){let n=r.indexOf(":");if(n>0){let i=r.slice(0,n).trim(),a=r.slice(n+1).trim();i&&a&&(t[i]=a)}}return t},G7=m.memo(({children:e,result:t,language:r,className:n,startLine:i,lineNumbers:a=!0,...o})=>{let s=ke(),u=m.useMemo(()=>s(Y7),[s]),l=m.useMemo(()=>{let c={};return t.bg&&(c["--sdm-bg"]=t.bg),t.fg&&(c["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(c,K7(t.rootStyle)),c},[t.bg,t.fg,t.rootStyle]);return E.jsx("div",{className:s(n,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":r,"data-streamdown":"code-block-body",...o,children:E.jsx("pre",{className:s(n,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:l,children:E.jsx("code",{className:a?s("[counter-increment:line_0] [counter-reset:line]"):void 0,style:a&&i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((c,f)=>E.jsx("span",{className:a?u:void 0,children:c.length===0||c.length===1&&c[0].content===""?`
130
+ `:c.map((d,h)=>{let p={},b=!!d.bgColor;if(d.color&&(p["--sdm-c"]=d.color),d.bgColor&&(p["--sdm-tbg"]=d.bgColor),d.htmlStyle)for(let[y,v]of Object.entries(d.htmlStyle))y==="color"?p["--sdm-c"]=v:y==="background-color"?(p["--sdm-tbg"]=v,b=!0):p[y]=v;return E.jsx("span",{className:s("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",b&&"bg-[var(--sdm-tbg)]",b&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:p,...d.htmlAttrs,children:d.content},h)})},f))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),X7=({className:e,language:t,style:r,isIncomplete:n,...i})=>{let a=ke();return E.jsx("div",{className:a("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":n||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...r},...i})},Ck=m.createContext({code:""}),Ik=()=>m.useContext(Ck),Z7=({language:e})=>{let t=ke();return E.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:E.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},Q7=e=>{let t=e.length;for(;t>0&&e[t-1]===`
131
+ `;)t--;return e.slice(0,t)},J7=m.lazy(()=>xw(()=>import("./highlighted-body-OFNGDK62-B2U64epE.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.HighlightedCodeBlockBody}))),e$=({code:e,language:t,className:r,children:n,isIncomplete:i=!1,startLine:a,lineNumbers:o,...s})=>{let u=ke(),l=m.useMemo(()=>Q7(e),[e]),c=m.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:l.split(`
132
+ `).map(f=>[{content:f,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[l]);return E.jsx(Ck.Provider,{value:{code:e},children:E.jsxs(X7,{isIncomplete:i,language:t,children:[E.jsx(Z7,{language:t}),n?E.jsx("div",{className:u("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:E.jsx("div",{className:u("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:n})}):null,E.jsx(m.Suspense,{fallback:E.jsx(G7,{className:r,language:t,lineNumbers:o,result:c,startLine:a,...s}),children:E.jsx(J7,{className:r,code:l,language:t,lineNumbers:o,raw:c,startLine:a,...s})})]})})},t$=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),r$=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),n$=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),i$=e=>E.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[E.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),a$=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),o$=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),s$=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),u$=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),l$=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),c$=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Lo={CheckIcon:t$,CopyIcon:r$,DownloadIcon:n$,ExternalLinkIcon:u$,Loader2Icon:i$,Maximize2Icon:a$,RotateCcwIcon:o$,XIcon:s$,ZoomInIcon:l$,ZoomOutIcon:c$},Ok=m.createContext(Lo),f$=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let r=Object.keys(e),n=Object.keys(t);return r.length!==n.length?!1:r.every(i=>e[i]===t[i])},zy=({icons:e,children:t})=>{let r=m.useRef(e),n=m.useRef(e?{...Lo,...e}:Lo);f$(r.current,e)||(r.current=e,n.current=e?{...Lo,...e}:Lo);let i=n.current;return E.jsx(Ok.Provider,{value:i,children:t})},zr=()=>m.useContext(Ok),Nk={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},tp=m.createContext(Nk),Pn=()=>m.useContext(tp),qy=({onCopy:e,onError:t,timeout:r=2e3,children:n,className:i,code:a,...o})=>{let s=ke(),[u,l]=m.useState(!1),c=m.useRef(0),{code:f}=Ik(),{isAnimating:d}=m.useContext(yr),h=Pn(),p=a??f,b=async()=>{var T;if(typeof window>"u"||!((T=navigator?.clipboard)!=null&&T.writeText)){t?.(new Error("Clipboard API not available"));return}try{u||(await navigator.clipboard.writeText(p),l(!0),e?.(),c.current=window.setTimeout(()=>l(!1),r))}catch(x){t?.(x)}};m.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let y=zr(),v=u?y.CheckIcon:y.CopyIcon;return E.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:d,onClick:b,title:h.copyCode,type:"button",...o,children:n??E.jsx(v,{size:14})})},Wy={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},d$=({onDownload:e,onError:t,language:r,children:n,className:i,code:a,...o})=>{let s=ke(),{code:u}=Ik(),{isAnimating:l}=m.useContext(yr),c=Pn(),f=zr(),d=a??u,h=`file.${r&&r in Wy?Wy[r]:"txt"}`,p="text/plain",b=()=>{try{ka(h,d,p),e?.()}catch(y){t?.(y)}};return E.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:l,onClick:b,title:c.downloadFile,type:"button",...o,children:n??E.jsx(f.DownloadIcon,{size:14})})},Vy=()=>{let{Loader2Icon:e}=zr(),t=ke();return E.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[E.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),E.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:E.jsx(e,{className:t("size-4 animate-spin")})})]})},h$=/\.[^/.]+$/,p$=({node:e,className:t,src:r,alt:n,onLoad:i,onError:a,...o})=>{let{DownloadIcon:s}=zr(),u=ke(),l=m.useRef(null),[c,f]=m.useState(!1),[d,h]=m.useState(!1),p=Pn(),b=o.width!=null||o.height!=null,y=(c||b)&&!d,v=d&&!b;m.useEffect(()=>{let w=l.current;if(w!=null&&w.complete){let A=w.naturalWidth>0;f(A),h(!A)}},[]);let T=m.useCallback(w=>{f(!0),h(!1),i?.(w)},[i]),x=m.useCallback(w=>{f(!1),h(!0),a?.(w)},[a]),S=async()=>{if(r)try{let w=await(await fetch(r)).blob(),A=new URL(r,window.location.origin).pathname.split("/").pop()||"",_=A.split(".").pop(),O=A.includes(".")&&_!==void 0&&_.length<=4,R="";if(O)R=A;else{let C=w.type,M="png";C.includes("jpeg")||C.includes("jpg")?M="jpg":C.includes("png")?M="png":C.includes("svg")?M="svg":C.includes("gif")?M="gif":C.includes("webp")&&(M="webp"),R=`${(n||A||"image").replace(h$,"")}.${M}`}ka(R,w,w.type)}catch{window.open(r,"_blank")}};return r?E.jsxs("div",{className:u("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[E.jsx("img",{alt:n,className:u("max-w-full rounded-lg",v&&"hidden",t),"data-streamdown":"image",onError:x,onLoad:T,ref:l,src:r,...o}),v&&E.jsx("span",{className:u("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:p.imageNotAvailable}),E.jsx("div",{className:u("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),y&&E.jsx("button",{className:u("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:S,title:p.downloadImage,type:"button",children:E.jsx(s,{size:14})})]}):null},Zo=0,Km=()=>{Zo+=1,Zo===1&&(document.body.style.overflow="hidden")},Gm=()=>{Zo=Math.max(0,Zo-1),Zo===0&&(document.body.style.overflow="")},m$=({url:e,isOpen:t,onClose:r,onConfirm:n})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:o,XIcon:s}=zr(),u=ke(),[l,c]=m.useState(!1),f=Pn(),d=m.useCallback(async()=>{try{await navigator.clipboard.writeText(e),c(!0),setTimeout(()=>c(!1),2e3)}catch{}},[e]),h=m.useCallback(()=>{n(),r()},[n,r]);return m.useEffect(()=>{if(t){Km();let p=b=>{b.key==="Escape"&&r()};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p),Gm()}}},[t,r]),t?E.jsx("div",{className:u("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:r,onKeyDown:p=>{p.key==="Escape"&&r()},role:"button",tabIndex:0,children:E.jsxs("div",{className:u("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:p=>p.stopPropagation(),onKeyDown:p=>p.stopPropagation(),role:"presentation",children:[E.jsx("button",{className:u("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:r,title:f.close,type:"button",children:E.jsx(s,{size:16})}),E.jsxs("div",{className:u("flex flex-col gap-2"),children:[E.jsxs("div",{className:u("flex items-center gap-2 font-semibold text-lg"),children:[E.jsx(o,{size:20}),E.jsx("span",{children:f.openExternalLink})]}),E.jsx("p",{className:u("text-muted-foreground text-sm"),children:f.externalLinkWarning})]}),E.jsx("div",{className:u("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),E.jsxs("div",{className:u("flex gap-2"),children:[E.jsx("button",{className:u("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:d,type:"button",children:l?E.jsxs(E.Fragment,{children:[E.jsx(i,{size:14}),E.jsx("span",{children:f.copied})]}):E.jsxs(E.Fragment,{children:[E.jsx(a,{size:14}),E.jsx("span",{children:f.copyLink})]})}),E.jsxs("button",{className:u("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:h,type:"button",children:[E.jsx(o,{size:14}),E.jsx("span",{children:f.openLink})]})]})]})}):null},rp=m.createContext(null),Xm=()=>m.useContext(rp),que=()=>{var e;let t=Xm();return(e=t?.code)!=null?e:null},Zm=()=>{var e;let t=Xm();return(e=t?.mermaid)!=null?e:null},g$=e=>{var t;let r=Xm();return r!=null&&r.renderers&&e&&(t=r.renderers.find(n=>Array.isArray(n.language)?n.language.includes(e):n.language===e))!=null?t:null},b$=(e,t)=>{var r;let n=(r=void 0)!=null?r:5;return new Promise((i,a)=>{let o="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),s=new Image;s.crossOrigin="anonymous",s.onload=()=>{let u=document.createElement("canvas"),l=s.width*n,c=s.height*n;u.width=l,u.height=c;let f=u.getContext("2d");if(!f){a(new Error("Failed to create 2D canvas context for PNG export"));return}f.drawImage(s,0,0,l,c),u.toBlob(d=>{if(!d){a(new Error("Failed to create PNG blob"));return}i(d)},"image/png")},s.onerror=()=>a(new Error("Failed to load SVG image")),s.src=o})},y$=({chart:e,children:t,className:r,onDownload:n,config:i,onError:a})=>{let o=ke(),[s,u]=m.useState(!1),l=m.useRef(null),{isAnimating:c}=m.useContext(yr),f=zr(),d=Zm(),h=Pn(),p=async b=>{try{if(b==="mmd"){ka("diagram.mmd",e,"text/plain"),u(!1),n?.(b);return}if(!d){a?.(new Error("Mermaid plugin not available"));return}let y=d.getMermaid(i),v=e.split("").reduce((S,w)=>(S<<5)-S+w.charCodeAt(0)|0,0),T=`mermaid-${Math.abs(v)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:x}=await y.render(T,e);if(!x){a?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(b==="svg"){ka("diagram.svg",x,"image/svg+xml"),u(!1),n?.(b);return}if(b==="png"){let S=await b$(x);ka("diagram.png",S,"image/png"),n?.(b),u(!1);return}}catch(y){a?.(y)}};return m.useEffect(()=>{let b=y=>{let v=y.composedPath();l.current&&!v.includes(l.current)&&u(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b)}},[]),E.jsxs("div",{className:o("relative"),ref:l,children:[E.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),disabled:c,onClick:()=>u(!s),title:h.downloadDiagram,type:"button",children:t??E.jsx(f.DownloadIcon,{size:14})}),s?E.jsxs("div",{className:o("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[E.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>p("svg"),title:h.downloadDiagramAsSvg,type:"button",children:h.mermaidFormatSvg}),E.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>p("png"),title:h.downloadDiagramAsPng,type:"button",children:h.mermaidFormatPng}),E.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>p("mmd"),title:h.downloadDiagramAsMmd,type:"button",children:h.mermaidFormatMmd})]}):null]})},v$=({chart:e,config:t,onFullscreen:r,onExit:n,className:i,...a})=>{let{Maximize2Icon:o,XIcon:s}=zr(),u=ke(),[l,c]=m.useState(!1),{isAnimating:f,controls:d}=m.useContext(yr),h=Pn(),p=(()=>{if(typeof d=="boolean")return d;let y=d.mermaid;return y===!1?!1:y===!0||y===void 0?!0:y.panZoom!==!1})(),b=()=>{c(!l)};return m.useEffect(()=>{if(l){Km();let y=v=>{v.key==="Escape"&&c(!1)};return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y),Gm()}}},[l]),m.useEffect(()=>{l?r?.():n&&n()},[l,r,n]),E.jsxs(E.Fragment,{children:[E.jsx("button",{className:u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:f,onClick:b,title:h.viewFullscreen,type:"button",...a,children:E.jsx(o,{size:14})}),l?Ps.createPortal(E.jsxs("div",{className:u("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:b,onKeyDown:y=>{y.key==="Escape"&&b()},role:"button",tabIndex:0,children:[E.jsx("button",{className:u("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:b,title:h.exitFullscreen,type:"button",children:E.jsx(s,{size:20})}),E.jsx("div",{className:u("flex size-full items-center justify-center p-4"),onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),role:"presentation",children:E.jsx(f2,{chart:e,className:u("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:p})})]}),document.body):null]})},Pk=e=>{var t,r;let n=[],i=[],a=e.querySelectorAll("thead th");for(let s of a)n.push(((t=s.textContent)==null?void 0:t.trim())||"");let o=e.querySelectorAll("tbody tr");for(let s of o){let u=[],l=s.querySelectorAll("td");for(let c of l)u.push(((r=c.textContent)==null?void 0:r.trim())||"");i.push(u)}return{headers:n,rows:i}},Dk=e=>{let{headers:t,rows:r}=e,n=s=>{let u=!1,l=!1;for(let c of s){if(c==='"'){u=!0,l=!0;break}(c===","||c===`
133
+ `)&&(u=!0)}return u?l?`"${s.replace(/"/g,'""')}"`:`"${s}"`:s},i=t.length>0?r.length+1:r.length,a=new Array(i),o=0;t.length>0&&(a[o]=t.map(n).join(","),o+=1);for(let s of r)a[o]=s.map(n).join(","),o+=1;return a.join(`
134
+ `)},x$=e=>{let{headers:t,rows:r}=e,n=s=>{let u=!1;for(let c of s)if(c===" "||c===`
135
+ `||c==="\r"){u=!0;break}if(!u)return s;let l=[];for(let c of s)c===" "?l.push("\\t"):c===`
136
+ `?l.push("\\n"):c==="\r"?l.push("\\r"):l.push(c);return l.join("")},i=t.length>0?r.length+1:r.length,a=new Array(i),o=0;t.length>0&&(a[o]=t.map(n).join(" "),o+=1);for(let s of r)a[o]=s.map(n).join(" "),o+=1;return a.join(`
137
+ `)},Gf=e=>{let t=!1;for(let n of e)if(n==="\\"||n==="|"){t=!0;break}if(!t)return e;let r=[];for(let n of e)n==="\\"?r.push("\\\\"):n==="|"?r.push("\\|"):r.push(n);return r.join("")},np=e=>{let{headers:t,rows:r}=e;if(t.length===0)return"";let n=new Array(r.length+2),i=0,a=t.map(s=>Gf(s));n[i]=`| ${a.join(" | ")} |`,i+=1;let o=new Array(t.length);for(let s=0;s<t.length;s+=1)o[s]="---";n[i]=`| ${o.join(" | ")} |`,i+=1;for(let s of r)if(s.length<t.length){let u=new Array(t.length);for(let l=0;l<t.length;l+=1)u[l]=l<s.length?Gf(s[l]):"";n[i]=`| ${u.join(" | ")} |`,i+=1}else{let u=s.map(l=>Gf(l));n[i]=`| ${u.join(" | ")} |`,i+=1}return n.join(`
138
+ `)},Rk=({children:e,className:t,onCopy:r,onError:n,timeout:i=2e3})=>{let a=ke(),[o,s]=m.useState(!1),[u,l]=m.useState(!1),c=m.useRef(null),f=m.useRef(0),{isAnimating:d}=m.useContext(yr),h=Pn(),p=async v=>{var T,x;if(typeof window>"u"||!((T=navigator?.clipboard)!=null&&T.write)){n?.(new Error("Clipboard API not available"));return}try{let S=(x=c.current)==null?void 0:x.closest('[data-streamdown="table-wrapper"]'),w=S?.querySelector("table");if(!w){n?.(new Error("Table not found"));return}let A=Pk(w),_=({csv:Dk,tsv:x$,md:np}[v]||np)(A),O=new ClipboardItem({"text/plain":new Blob([_],{type:"text/plain"}),"text/html":new Blob([w.outerHTML],{type:"text/html"})});await navigator.clipboard.write([O]),l(!0),s(!1),r?.(v),f.current=window.setTimeout(()=>l(!1),i)}catch(S){n?.(S)}};m.useEffect(()=>{let v=T=>{let x=T.composedPath();c.current&&!x.includes(c.current)&&s(!1)};return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v),window.clearTimeout(f.current)}},[]);let b=zr(),y=u?b.CheckIcon:b.CopyIcon;return E.jsxs("div",{className:a("relative"),ref:c,children:[E.jsx("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>s(!o),title:h.copyTable,type:"button",children:e??E.jsx(y,{height:14,width:14})}),o?E.jsxs("div",{className:a("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[E.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>p("md"),title:h.copyTableAsMarkdown,type:"button",children:h.tableFormatMarkdown}),E.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>p("csv"),title:h.copyTableAsCsv,type:"button",children:h.tableFormatCsv}),E.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>p("tsv"),title:h.copyTableAsTsv,type:"button",children:h.tableFormatTsv})]}):null]})},Lk=({children:e,className:t,onDownload:r,onError:n})=>{let i=ke(),[a,o]=m.useState(!1),s=m.useRef(null),{isAnimating:u}=m.useContext(yr),l=Pn(),c=zr(),f=d=>{var h;try{let p=(h=s.current)==null?void 0:h.closest('[data-streamdown="table-wrapper"]'),b=p?.querySelector("table");if(!b){n?.(new Error("Table not found"));return}let y=Pk(b),v=d==="csv"?Dk(y):np(y);ka(`table.${d==="csv"?"csv":"md"}`,v,d==="csv"?"text/csv":"text/markdown"),o(!1),r?.(d)}catch(p){n?.(p)}};return m.useEffect(()=>{let d=h=>{let p=h.composedPath();s.current&&!p.includes(s.current)&&o(!1)};return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[]),E.jsxs("div",{className:i("relative"),ref:s,children:[E.jsx("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:()=>o(!a),title:l.downloadTable,type:"button",children:e??E.jsx(c.DownloadIcon,{size:14})}),a?E.jsxs("div",{className:i("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[E.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("csv"),title:l.downloadTableAsCsv,type:"button",children:l.tableFormatCsv}),E.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("markdown"),title:l.downloadTableAsMarkdown,type:"button",children:l.tableFormatMarkdown})]}):null]})},E$=({children:e,className:t,showCopy:r=!0,showDownload:n=!0})=>{let{Maximize2Icon:i,XIcon:a}=zr(),o=ke(),[s,u]=m.useState(!1),{isAnimating:l}=m.useContext(yr),c=Pn(),f=()=>{u(!0)},d=()=>{u(!1)};return m.useEffect(()=>{if(s){Km();let h=p=>{p.key==="Escape"&&u(!1)};return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h),Gm()}}},[s]),E.jsxs(E.Fragment,{children:[E.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:l,onClick:f,title:c.viewFullscreen,type:"button",children:E.jsx(i,{size:14})}),s?Ps.createPortal(E.jsx("div",{"aria-label":c.viewFullscreen,"aria-modal":"true",className:o("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:d,onKeyDown:h=>{h.key==="Escape"&&d()},role:"dialog",children:E.jsxs("div",{className:o("flex h-full flex-col"),onClick:h=>h.stopPropagation(),onKeyDown:h=>h.stopPropagation(),role:"presentation",children:[E.jsxs("div",{className:o("flex items-center justify-end gap-1 p-4"),children:[r?E.jsx(Rk,{}):null,n?E.jsx(Lk,{}):null,E.jsx("button",{className:o("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:d,title:c.exitFullscreen,type:"button",children:E.jsx(a,{size:20})})]}),E.jsx("div",{className:o("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:E.jsx("table",{className:o("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},T$=({children:e,className:t,showControls:r,showCopy:n=!0,showDownload:i=!0,showFullscreen:a=!0,...o})=>{let s=ke(),u=r&&n,l=r&&i,c=r&&a,f=u||l||c;return E.jsxs("div",{className:s("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[f?E.jsxs("div",{className:s("flex items-center justify-end gap-1"),children:[u?E.jsx(Rk,{}):null,l?E.jsx(Lk,{}):null,c?E.jsx(E$,{showCopy:u,showDownload:l,children:e}):null]}):null,E.jsx("div",{className:s("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:E.jsx("table",{className:s("w-full divide-y divide-border",t),"data-streamdown":"table",...o,children:e})})]})},w$=/startLine=(\d+)/,A$=/\bnoLineNumbers\b/,S$=m.lazy(()=>xw(()=>Promise.resolve().then(()=>Fue),void 0).then(e=>({default:e.Mermaid}))),k$=/language-([^\s]+)/;function kc(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let r=e.position.start,n=t.position.start,i=e.position.end,a=t.position.end;return r?.line===n?.line&&r?.column===n?.column&&i?.line===a?.line&&i?.column===a?.column}function ot(e,t){return e.className===t.className&&kc(e.node,t.node)}var ip=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Xf=(e,t)=>{if(typeof e=="boolean")return e;let r=e.table;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},Yy=(e,t)=>{if(typeof e=="boolean")return e;let r=e.code;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},xu=(e,t)=>{if(typeof e=="boolean")return e;let r=e.mermaid;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},Qm=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...n,children:e})},(e,t)=>ot(e,t));Qm.displayName="MarkdownOl";var Mk=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("li",{className:i("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...n,children:e})},(e,t)=>e.className===t.className&&kc(e.node,t.node));Mk.displayName="MarkdownLi";var jk=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...n,children:e})},(e,t)=>ot(e,t));jk.displayName="MarkdownUl";var Bk=m.memo(({className:e,node:t,...r})=>{let n=ke();return E.jsx("hr",{className:n("my-6 border-border",e),"data-streamdown":"horizontal-rule",...r})},(e,t)=>ot(e,t));Bk.displayName="MarkdownHr";var Fk=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("span",{className:i("font-semibold",t),"data-streamdown":"strong",...n,children:e})},(e,t)=>ot(e,t));Fk.displayName="MarkdownStrong";var _$=({children:e,className:t,href:r,node:n,...i})=>{let a=ke(),{linkSafety:o}=m.useContext(yr),[s,u]=m.useState(!1),l=r==="streamdown:incomplete-link",c=m.useCallback(async p=>{if(!(!(o!=null&&o.enabled&&r)||l)){if(p.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(r)){window.open(r,"_blank","noreferrer");return}u(!0)}},[o,r,l]),f=m.useCallback(()=>{r&&window.open(r,"_blank","noreferrer")},[r]),d=m.useCallback(()=>{u(!1)},[]),h={url:r??"",isOpen:s,onClose:d,onConfirm:f};return o!=null&&o.enabled&&r?E.jsxs(E.Fragment,{children:[E.jsx("button",{className:a("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",onClick:c,type:"button",children:e}),o.renderModal?o.renderModal(h):E.jsx(m$,{...h})]}):E.jsx("a",{className:a("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",href:r,rel:"noreferrer",target:"_blank",...i,children:e})},$k=m.memo(_$,(e,t)=>ot(e,t)&&e.href===t.href);$k.displayName="MarkdownA";var Uk=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...n,children:e})},(e,t)=>ot(e,t));Uk.displayName="MarkdownH1";var Hk=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...n,children:e})},(e,t)=>ot(e,t));Hk.displayName="MarkdownH2";var zk=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...n,children:e})},(e,t)=>ot(e,t));zk.displayName="MarkdownH3";var qk=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...n,children:e})},(e,t)=>ot(e,t));qk.displayName="MarkdownH4";var Wk=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...n,children:e})},(e,t)=>ot(e,t));Wk.displayName="MarkdownH5";var Vk=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...n,children:e})},(e,t)=>ot(e,t));Vk.displayName="MarkdownH6";var Yk=m.memo(({children:e,className:t,node:r,...n})=>{let{controls:i}=m.useContext(yr),a=ip(i,"table"),o=Xf(i,"copy"),s=Xf(i,"download"),u=Xf(i,"fullscreen");return E.jsx(T$,{className:t,showControls:a,showCopy:o,showDownload:s,showFullscreen:u,...n,children:e})},(e,t)=>ot(e,t));Yk.displayName="MarkdownTable";var Kk=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...n,children:e})},(e,t)=>ot(e,t));Kk.displayName="MarkdownThead";var Gk=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...n,children:e})},(e,t)=>ot(e,t));Gk.displayName="MarkdownTbody";var Xk=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("tr",{className:i("border-border",t),"data-streamdown":"table-row",...n,children:e})},(e,t)=>ot(e,t));Xk.displayName="MarkdownTr";var Zk=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("th",{className:i("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...n,children:e})},(e,t)=>ot(e,t));Zk.displayName="MarkdownTh";var Qk=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...n,children:e})},(e,t)=>ot(e,t));Qk.displayName="MarkdownTd";var Jk=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("blockquote",{className:i("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...n,children:e})},(e,t)=>ot(e,t));Jk.displayName="MarkdownBlockquote";var e2=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...n,children:e})},(e,t)=>ot(e,t));e2.displayName="MarkdownSup";var t2=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...n,children:e})},(e,t)=>ot(e,t));t2.displayName="MarkdownSub";var r2=m.memo(({children:e,className:t,node:r,...n})=>{if("data-footnotes"in n){let i=o=>{var s,u;if(!m.isValidElement(o))return!1;let l=Array.isArray(o.props.children)?o.props.children:[o.props.children],c=!1,f=!1;for(let d of l)if(d){if(typeof d=="string")d.trim()!==""&&(c=!0);else if(m.isValidElement(d))if(((s=d.props)==null?void 0:s["data-footnote-backref"])!==void 0)f=!0;else{let h=Array.isArray(d.props.children)?d.props.children:[d.props.children];for(let p of h){if(typeof p=="string"&&p.trim()!==""){c=!0;break}if(m.isValidElement(p)&&((u=p.props)==null?void 0:u["data-footnote-backref"])===void 0){c=!0;break}}}}return f&&!c},a=Array.isArray(e)?e.map(o=>{if(!m.isValidElement(o))return o;if(o.type===Qm){let s=(Array.isArray(o.props.children)?o.props.children:[o.props.children]).filter(u=>!i(u));return s.length===0?null:{...o,props:{...o.props,children:s}}}return o}):e;return(Array.isArray(a)?a.some(o=>o!==null):a!==null)?E.jsx("section",{className:t,...n,children:a}):null}return E.jsx("section",{className:t,...n,children:e})},(e,t)=>ot(e,t));r2.displayName="MarkdownSection";var C$=({node:e,className:t,children:r,...n})=>{var i,a;let o=ke(),s=!("data-block"in n),{mermaid:u,controls:l,lineNumbers:c}=m.useContext(yr),f=Zm(),d=q7(),h=t?.match(k$),p=(i=h?.at(1))!=null?i:"",b=g$(p);if(s)return E.jsx("code",{className:o("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...n,children:r});let y=(a=e?.properties)==null?void 0:a.metastring,v=y?.match(w$),T=v?Number.parseInt(v[1],10):void 0,x=T!==void 0&&T>=1?T:void 0,S=!(y&&A$.test(y))&&c!==!1,w="";if(m.isValidElement(r)&&r.props&&typeof r.props=="object"&&"children"in r.props&&typeof r.props.children=="string"?w=r.props.children:typeof r=="string"&&(w=r),b){let R=b.component;return E.jsx(m.Suspense,{fallback:E.jsx(Vy,{}),children:E.jsx(R,{code:w,isIncomplete:d,language:p,meta:y})})}if(p==="mermaid"&&f){let R=ip(l,"mermaid"),C=xu(l,"download"),M=xu(l,"copy"),L=xu(l,"fullscreen"),Q=xu(l,"panZoom"),H=R&&(C||M||L);return E.jsx(m.Suspense,{fallback:E.jsx(Vy,{}),children:E.jsxs("div",{className:o("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[E.jsx("div",{className:o("flex h-8 items-center text-muted-foreground text-xs"),children:E.jsx("span",{className:o("ml-1 font-mono lowercase"),children:"mermaid"})}),H?E.jsx("div",{className:o("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:E.jsxs("div",{className:o("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[C?E.jsx(y$,{chart:w,config:u?.config}):null,M?E.jsx(qy,{code:w}):null,L?E.jsx(v$,{chart:w,config:u?.config}):null]})}):null,E.jsx("div",{className:o("rounded-md border border-border bg-background"),children:E.jsx(S$,{chart:w,config:u?.config,showControls:Q})})]})})}let A=ip(l,"code"),_=Yy(l,"download"),O=Yy(l,"copy");return E.jsx(e$,{className:t,code:w,isIncomplete:d,language:p,lineNumbers:S,startLine:x,children:A?E.jsxs(E.Fragment,{children:[_?E.jsx(d$,{code:w,language:p}):null,O?E.jsx(qy,{}):null]}):null})},n2=m.memo(C$,(e,t)=>e.className===t.className&&kc(e.node,t.node));n2.displayName="MarkdownCode";var i2=m.memo(p$,(e,t)=>e.className===t.className&&kc(e.node,t.node));i2.displayName="MarkdownImg";var a2=m.memo(({children:e,node:t,...r})=>{let n=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(n.length===1&&m.isValidElement(n[0])){let i=n[0].props.node,a=i?.tagName;if(a==="img")return E.jsx(E.Fragment,{children:e});if(a==="code"&&"data-block"in n[0].props)return E.jsx(E.Fragment,{children:e})}return E.jsx("p",{...r,children:e})},(e,t)=>ot(e,t));a2.displayName="MarkdownParagraph";var I$={ol:Qm,li:Mk,ul:jk,hr:Bk,strong:Fk,a:$k,h1:Uk,h2:Hk,h3:zk,h4:qk,h5:Wk,h6:Vk,table:Yk,thead:Kk,tbody:Gk,tr:Xk,th:Zk,td:Qk,blockquote:Jk,code:n2,img:i2,pre:({children:e})=>m.isValidElement(e)?m.cloneElement(e,{"data-block":"true"}):e,sup:e2,sub:t2,p:a2,section:r2},O$=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,N$=new RegExp("\\p{L}","u");function Ky(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let r of t){if(O$.test(r))return"rtl";if(N$.test(r))return"ltr"}return"ltr"}var P$=/^[ \t]{0,3}(`{3,}|~{3,})/,D$=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,Gy=e=>{let t=e.split(`
139
+ `),r=null,n=0;for(let i of t){let a=P$.exec(i);if(r===null){if(a){let o=a[1];r=o[0],n=o.length}}else if(a){let o=a[1],s=o[0],u=o.length;s===r&&u>=n&&(r=null,n=0)}}return r!==null},R$=e=>{let t=e.split(`
140
+ `);for(let r of t){let n=r.trim();if(n.length>0&&n.includes("|")&&D$.test(n))return!0}return!1},L$=()=>e=>{an(e,"html",(t,r,n)=>{!n||typeof r!="number"||(n.children[r]={type:"text",value:t.value})})},Xy=[],Zy={allowDangerousHtml:!0},Eu=new WeakMap,M$=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let r=e.rehypePlugins,n=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(r||n||i)){let c="default";return this.keyCache.set(e,c),c}let a=c=>{if(!c||c.length===0)return"";let f="";for(let d=0;d<c.length;d+=1){let h=c[d];if(d>0&&(f+=","),Array.isArray(h)){let[p,b]=h;if(typeof p=="function"){let y=Eu.get(p);y||(y=p.name,Eu.set(p,y)),f+=y}else f+=String(p);f+=":",f+=JSON.stringify(b)}else if(typeof h=="function"){let p=Eu.get(h);p||(p=h.name,Eu.set(h,p)),f+=p}else f+=String(h)}return f},o=a(r),s=a(n),u=i?JSON.stringify(i):"",l=`${s}::${o}::${u}`;return this.keyCache.set(e,l),l}get(e){let t=this.generateCacheKey(e),r=this.cache.get(t);return r&&(this.cache.delete(t),this.cache.set(t,r)),r}set(e,t){let r=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let n=this.cache.keys().next().value;n&&this.cache.delete(n)}this.cache.set(r,t)}clear(){this.cache.clear()}},Qy=new M$,o2=e=>{let t=j$(e),r=e.children||"",n=t.runSync(t.parse(r),r);return q$(n,e)},j$=e=>{let t=Qy.get(e);if(t)return t;let r=F$(e);return Qy.set(e,r),r},B$=e=>e.some(t=>Array.isArray(t)?t[0]===Uh:t===Uh),F$=e=>{let t=e.rehypePlugins||Xy,r=e.remarkPlugins||Xy,n=B$(t)?r:[...r,L$],i=e.remarkRehypeOptions?{...Zy,...e.remarkRehypeOptions}:Zy;return qF().use(zB).use(n).use(SF,i).use(t)},$$=e=>e,U$=(e,t,r,n)=>{r?e.children.splice(t,1):e.children[t]={type:"text",value:n}},H$=(e,t)=>{var r;for(let n in $f)if(Object.hasOwn($f,n)&&Object.hasOwn(e.properties,n)){let i=e.properties[n],a=$f[n];(a===null||a.includes(e.tagName))&&(e.properties[n]=(r=t(String(i||""),n,e))!=null?r:void 0)}},z$=(e,t,r,n,i,a)=>{let o=!1;return n?o=!n.includes(e.tagName):i&&(o=i.includes(e.tagName)),!o&&a&&typeof t=="number"&&(o=!a(e,t,r)),o},q$=(e,t)=>{let{allowElement:r,allowedElements:n,disallowedElements:i,skipHtml:a,unwrapDisallowed:o,urlTransform:s}=t;if(r||n||i||a||s){let u=s||$$;an(e,(l,c,f)=>{if(l.type==="raw"&&f&&typeof c=="number")return U$(f,c,a,l.value),c;if(l.type==="element"&&(H$(l,u),z$(l,c,f,n,i,r)&&f&&typeof c=="number"))return o&&l.children?f.children.splice(c,1,...l.children):f.children.splice(c,1),c})}return Z9(e,{Fragment:E.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0})},W$=/\[\^[\w-]{1,200}\](?!:)/,V$=/\[\^[\w-]{1,200}\]:/,Y$=/<(\w+)[\s>]/,K$=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Jy=new Map,ev=new Map,G$=e=>{let t=e.toLowerCase(),r=Jy.get(t);if(r)return r;let n=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return Jy.set(t,n),n},X$=e=>{let t=e.toLowerCase(),r=ev.get(t);if(r)return r;let n=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return ev.set(t,n),n},tv=(e,t)=>{if(K$.has(t.toLowerCase()))return 0;let r=e.match(G$(t));if(!r)return 0;let n=0;for(let i of r)i.trimEnd().endsWith("/>")||(n+=1);return n},rv=(e,t)=>{let r=e.match(X$(t));return r?r.length:0},Z$=e=>{let t=0;for(let r=0;r<e.length-1;r+=1)e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},Q$=e=>{let t=W$.test(e),r=V$.test(e);if(t||r)return[e];let n=_r.lex(e,{gfm:!0}),i=[],a=[],o=!1;for(let s of n){let u=s.raw,l=i.length;if(a.length>0){i[l-1]+=u;let c=a.at(-1),f=tv(u,c),d=rv(u,c);for(let h=0;h<f;h+=1)a.push(c);for(let h=0;h<d;h+=1)a.length>0&&a.at(-1)===c&&a.pop();continue}if(s.type==="html"&&s.block){let c=u.match(Y$);if(c){let f=c[1],d=tv(u,f),h=rv(u,f);d>h&&a.push(f)}}if(l>0&&!o){let c=i[l-1];if(Z$(c)%2===1){i[l-1]=c+u;continue}}i.push(u),s.type!=="space"&&(o=s.type==="code")}return i},J$=(e,t)=>{if(!t.length)return e;let r=e;for(let n of t){let i=new RegExp(`(<${n}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${n}\\s*>)`,"gi");r=r.replace(i,(a,o,s,u)=>{if(!s.includes(`
141
+
142
+ `))return o+s+u;let l=s.replace(/\n\n/g,`
143
+ <!---->
144
+ `),c=(l.startsWith(`
145
+ `)?"":`
146
+ `)+l+(l.endsWith(`
147
+ `)?"":`
148
+ `);return`${o}${c}${u}
149
+
150
+ `})}return r},eU=/([\\`*_~[\]|])/g,tU=e=>e.replace(eU,"\\$1"),rU=(e,t)=>{if(!t.length)return e;let r=e;for(let n of t){let i=new RegExp(`(<${n}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${n}\\s*>)`,"gi");r=r.replace(i,(a,o,s,u)=>{let l=tU(s).replace(/\n\n/g,"&#10;&#10;");return o+l+u})}return r},s2=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(s2).join(""):"",nU=e=>t=>{if(!e||e.length===0)return;let r=new Set(e.map(n=>n.toLowerCase()));an(t,"element",n=>{if(r.has(n.tagName.toLowerCase())){let i=s2(n);n.children=i?[{type:"text",value:i}]:[]}})},iU=()=>e=>{an(e,"code",t=>{var r,n;t.meta&&(t.data=(r=t.data)!=null?r:{},t.data.hProperties={...(n=t.data.hProperties)!=null?n:{},metastring:t.meta})})},aU=/^[ \t]*<[\w!/?-]/,oU=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,sU=e=>typeof e!="string"||e.length===0||!aU.test(e)?e:e.replace(oU,"$1"),nv,iv,av,ov,Hu={...Si,protocols:{...Si.protocols,href:[...(iv=(nv=Si.protocols)==null?void 0:nv.href)!=null?iv:[],"tel"]},attributes:{...Si.attributes,code:[...(ov=(av=Si.attributes)==null?void 0:av.code)!=null?ov:[],"metastring"]}},ap={raw:Uh,sanitize:[rS,Hu],harden:[vD,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},uU={gfm:[jj,{}],codeMeta:iU},sv=Object.values(ap),lU=Object.values(uU),cU={block:" ▋",circle:" ●"},u2=["github-light","github-dark"],l2={enabled:!0},fU={shikiTheme:u2,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:l2},yr=m.createContext(fU),c2=m.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:r,index:n,isIncomplete:i,dir:a,animatePlugin:o,...s})=>{if(o){let c=o.getLastRenderCharCount();o.setPrevContentLength(c)}let u=typeof e=="string"&&r?sU(e):e,l=E.jsx(o2,{...s,children:u});return E.jsx(_k.Provider,{value:i,children:a?E.jsx("div",{dir:a,style:{display:"contents"},children:l}):l})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let r=Object.keys(e.components||{}),n=Object.keys(t.components||{});if(r.length!==n.length||r.some(i=>{var a,o;return((a=e.components)==null?void 0:a[i])!==((o=t.components)==null?void 0:o[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});c2.displayName="Block";var Fi=m.memo(({children:e,mode:t="streaming",dir:r,parseIncompleteMarkdown:n=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:o=sv,remarkPlugins:s=lU,className:u,shikiTheme:l=u2,mermaid:c,controls:f=!0,isAnimating:d=!1,animated:h,BlockComponent:p=c2,parseMarkdownIntoBlocksFn:b=Q$,caret:y,plugins:v,remend:T,linkSafety:x=l2,lineNumbers:S=!0,allowedTags:w,literalTagContent:A,translations:_,icons:O,prefix:R,onAnimationStart:C,onAnimationEnd:M,...L})=>{let Q=m.useId(),[H,U]=m.useTransition(),q=m.useMemo(()=>V7(R),[R]),J=m.useRef(null),V=m.useRef(C),re=m.useRef(M);V.current=C,re.current=M,m.useEffect(()=>{var xe,Ue,xt;if(t==="static")return;let lr=J.current;if(J.current=d,lr===null){d&&((xe=V.current)==null||xe.call(V));return}d&&!lr?(Ue=V.current)==null||Ue.call(V):!d&&lr&&((xt=re.current)==null||xt.call(re))},[d,t]);let P=m.useMemo(()=>w?Object.keys(w):[],[w]),le=m.useMemo(()=>{if(typeof e!="string")return"";let xe=t==="streaming"&&n?K8(e,T):e;return A&&A.length>0&&(xe=rU(xe,A)),P.length>0&&(xe=J$(xe,P)),xe},[e,t,n,T,P,A]),he=m.useMemo(()=>b(le),[le,b]),[N,pe]=m.useState(he);m.useEffect(()=>{t==="streaming"&&!Y?U(()=>{pe(he)}):pe(he)},[he,t]);let we=t==="streaming"?N:he,ce=m.useMemo(()=>r==="auto"?we.map(Ky):void 0,[we,r]),fe=m.useMemo(()=>we.map((xe,Ue)=>`${Q}-${Ue}`),[we.length,Q]),be=m.useMemo(()=>h===!0?"true":h?JSON.stringify(h):"",[h]),Y=m.useMemo(()=>be?be==="true"?Jh():Jh(h):null,[be]),G=m.useMemo(()=>{var xe,Ue;return{shikiTheme:(Ue=(xe=v?.code)==null?void 0:xe.getThemes())!=null?Ue:l,controls:f,isAnimating:d,lineNumbers:S,mode:t,mermaid:c,linkSafety:x}},[l,f,d,S,t,c,x,v?.code]),ue=m.useMemo(()=>_?JSON.stringify(_):"",[_]),W=m.useMemo(()=>({...Nk,..._}),[ue]),$e=m.useMemo(()=>{let{inlineCode:xe,...Ue}=a??{},xt={...I$,...Ue};if(xe){let lr=xt.code;xt.code=Vr=>"data-block"in Vr?lr?m.createElement(lr,Vr):null:m.createElement(xe,Vr)}return xt},[a]),Oe=m.useMemo(()=>{let xe=[];return v!=null&&v.cjk&&(xe=[...xe,...v.cjk.remarkPluginsBefore]),xe=[...xe,...s],v!=null&&v.cjk&&(xe=[...xe,...v.cjk.remarkPluginsAfter]),v!=null&&v.math&&(xe=[...xe,v.math.remarkPlugin]),xe},[s,v?.math,v?.cjk]),st=m.useMemo(()=>{var xe;let Ue=o;if(w&&Object.keys(w).length>0&&o===sv){let xt={...Hu,tagNames:[...(xe=Hu.tagNames)!=null?xe:[],...Object.keys(w)],attributes:{...Hu.attributes,...w}};Ue=[ap.raw,[rS,xt],ap.harden]}return A&&A.length>0&&(Ue=[...Ue,[nU,A]]),v!=null&&v.math&&(Ue=[...Ue,v.math.rehypePlugin]),Y&&d&&(Ue=[...Ue,Y.rehypePlugin]),Ue},[o,v?.math,Y,d,w,A]),rt=m.useMemo(()=>{if(!d||we.length===0)return!1;let xe=we.at(-1);return Gy(xe)||R$(xe)},[d,we]),er=m.useMemo(()=>y&&d&&!rt?{"--streamdown-caret":`"${cU[y]}"`}:void 0,[y,d,rt]);return t==="static"?E.jsx(tp.Provider,{value:W,children:E.jsx(rp.Provider,{value:v??null,children:E.jsx(yr.Provider,{value:G,children:E.jsx(zy,{icons:O,children:E.jsx(ep.Provider,{value:q,children:E.jsx("div",{className:q("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",u),dir:r==="auto"?Ky(le):r,children:E.jsx(o2,{components:$e,rehypePlugins:st,remarkPlugins:Oe,...L,children:le})})})})})})}):E.jsx(tp.Provider,{value:W,children:E.jsx(rp.Provider,{value:v??null,children:E.jsx(yr.Provider,{value:G,children:E.jsx(zy,{icons:O,children:E.jsx(ep.Provider,{value:q,children:E.jsxs("div",{className:q("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",y&&!rt?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,u),style:er,children:[we.length===0&&y&&d&&E.jsx("span",{}),we.map((xe,Ue)=>{var xt;let lr=Ue===we.length-1,Vr=d&&lr&&Gy(xe);return E.jsx(p,{animatePlugin:Y,components:$e,content:xe,dir:(xt=ce?.[Ue])!=null?xt:r!=="auto"?r:void 0,index:Ue,isIncomplete:Vr,rehypePlugins:st,remarkPlugins:Oe,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:n,...L},fe[Ue])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);Fi.displayName="Streamdown";var dU=({children:e,className:t,minZoom:r=.5,maxZoom:n=3,zoomStep:i=.1,showControls:a=!0,initialZoom:o=1,fullscreen:s=!1})=>{let{RotateCcwIcon:u,ZoomInIcon:l,ZoomOutIcon:c}=zr(),f=ke(),d=m.useRef(null),h=m.useRef(null),[p,b]=m.useState(o),[y,v]=m.useState({x:0,y:0}),[T,x]=m.useState(!1),[S,w]=m.useState({x:0,y:0}),[A,_]=m.useState({x:0,y:0}),O=m.useCallback(q=>{b(J=>Math.max(r,Math.min(n,J+q)))},[r,n]),R=m.useCallback(()=>{O(i)},[O,i]),C=m.useCallback(()=>{O(-i)},[O,i]),M=m.useCallback(()=>{b(o),v({x:0,y:0})},[o]),L=m.useCallback(q=>{q.preventDefault();let J=q.deltaY>0?-i:i;O(J)},[O,i]),Q=m.useCallback(q=>{if(q.button!==0||q.isPrimary===!1)return;x(!0),w({x:q.clientX,y:q.clientY}),_(y);let J=q.currentTarget;J instanceof HTMLElement&&J.setPointerCapture(q.pointerId)},[y]),H=m.useCallback(q=>{if(!T)return;q.preventDefault();let J=q.clientX-S.x,V=q.clientY-S.y;v({x:A.x+J,y:A.y+V})},[T,S,A]),U=m.useCallback(q=>{x(!1);let J=q.currentTarget;J instanceof HTMLElement&&J.releasePointerCapture(q.pointerId)},[]);return m.useEffect(()=>{let q=d.current;if(q)return q.addEventListener("wheel",L,{passive:!1}),()=>{q.removeEventListener("wheel",L)}},[L]),m.useEffect(()=>{let q=h.current;if(q&&T)return document.body.style.userSelect="none",q.addEventListener("pointermove",H,{passive:!1}),q.addEventListener("pointerup",U),q.addEventListener("pointercancel",U),()=>{document.body.style.userSelect="",q.removeEventListener("pointermove",H),q.removeEventListener("pointerup",U),q.removeEventListener("pointercancel",U)}},[T,H,U]),E.jsxs("div",{className:f("relative flex flex-col",s?"h-full w-full":"min-h-28 w-full",t),ref:d,style:{cursor:T?"grabbing":"grab"},children:[a?E.jsxs("div",{className:f("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",s?"bottom-4 left-4":"bottom-2 left-2"),children:[E.jsx("button",{className:f("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:p>=n,onClick:R,title:"Zoom in",type:"button",children:E.jsx(l,{size:16})}),E.jsx("button",{className:f("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:p<=r,onClick:C,title:"Zoom out",type:"button",children:E.jsx(c,{size:16})}),E.jsx("button",{className:f("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:M,title:"Reset zoom and pan",type:"button",children:E.jsx(u,{size:16})})]}):null,E.jsx("div",{className:f("flex-1 origin-center transition-transform duration-150 ease-out",s?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:Q,ref:h,role:"application",style:{transform:`translate(${y.x}px, ${y.y}px) scale(${p})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},f2=({chart:e,className:t,config:r,fullscreen:n=!1,showControls:i=!0})=>{let a=ke(),[o,s]=m.useState(null),[u,l]=m.useState(!1),[c,f]=m.useState(""),[d,h]=m.useState(""),[p,b]=m.useState(0),{mermaid:y}=m.useContext(yr),v=Zm(),T=y?.errorComponent,{shouldRender:x,containerRef:S}=R7({immediate:n});if(m.useEffect(()=>{if(x){if(!v){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),l(!0);let A=v.getMermaid(r),_=e.split("").reduce((C,M)=>(C<<5)-C+M.charCodeAt(0)|0,0),O=`mermaid-${Math.abs(_)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:R}=await A.render(O,e);f(R),h(R)}catch(A){if(!(d||c)){let _=A instanceof Error?A.message:"Failed to render Mermaid chart";s(_)}}finally{l(!1)}})()}},[e,r,p,x,v]),!(x||c||d))return E.jsx("div",{className:a("my-4 min-h-[200px]",t),ref:S});if(u&&!c&&!d)return E.jsx("div",{className:a("my-4 flex justify-center p-4",t),ref:S,children:E.jsxs("div",{className:a("flex items-center space-x-2 text-muted-foreground"),children:[E.jsx("div",{className:a("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),E.jsx("span",{className:a("text-sm"),children:"Loading diagram..."})]})});if(o&&!c&&!d){let A=()=>b(_=>_+1);return T?E.jsx("div",{ref:S,children:E.jsx(T,{chart:e,error:o,retry:A})}):E.jsxs("div",{className:a("rounded-md bg-red-50 p-4",t),ref:S,children:[E.jsxs("p",{className:a("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",o]}),E.jsxs("details",{className:a("mt-2"),children:[E.jsx("summary",{className:a("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),E.jsx("pre",{className:a("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let w=c||d;return E.jsx("div",{className:a("size-full",t),"data-streamdown":"mermaid",ref:S,children:E.jsx(dU,{className:a(n?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:n,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:E.jsx("div",{"aria-label":"Mermaid chart",className:a("flex justify-center",n?"size-full items-center":null),dangerouslySetInnerHTML:{__html:w},role:"img"})})})};function hU(e,t){return e[13]=1,e[14]=t>>8,e[15]=t&255,e[16]=t>>8,e[17]=t&255,e}const d2=112,h2=72,p2=89,m2=115;let Zf;function pU(){const e=new Int32Array(256);for(let t=0;t<256;t++){let r=t;for(let n=0;n<8;n++)r=r&1?3988292384^r>>>1:r>>>1;e[t]=r}return e}function mU(e){let t=-1;Zf||(Zf=pU());for(let r=0;r<e.length;r++)t=Zf[(t^e[r])&255]^t>>>8;return t^-1}function gU(e){const t=e.length-1;for(let r=t;r>=4;r--)if(e[r-4]===9&&e[r-3]===d2&&e[r-2]===h2&&e[r-1]===p2&&e[r]===m2)return r-3;return 0}function bU(e,t,r=!1){const n=new Uint8Array(13);t*=39.3701,n[0]=d2,n[1]=h2,n[2]=p2,n[3]=m2,n[4]=t>>>24,n[5]=t>>>16,n[6]=t>>>8,n[7]=t&255,n[8]=n[4],n[9]=n[5],n[10]=n[6],n[11]=n[7],n[12]=1;const i=mU(n),a=new Uint8Array(4);if(a[0]=i>>>24,a[1]=i>>>16,a[2]=i>>>8,a[3]=i&255,r){const o=gU(e);return e.set(n,o),e.set(a,o+13),e}else{const o=new Uint8Array(4);o[0]=0,o[1]=0,o[2]=0,o[3]=9;const s=new Uint8Array(54);return s.set(e,0),s.set(o,33),s.set(n,37),s.set(a,50),s}}const yU="AAlwSFlz",vU="AAAJcEhZ",xU="AAAACXBI";function EU(e){let t=e.indexOf(yU);return t===-1&&(t=e.indexOf(vU)),t===-1&&(t=e.indexOf(xU)),t}const g2="[modern-screenshot]",ni=typeof window<"u",TU=ni&&"Worker"in window,wU=ni&&"atob"in window,AU=ni&&"btoa"in window,Jm=ni?window.navigator?.userAgent:"",b2=Jm.includes("Chrome"),dl=Jm.includes("AppleWebKit")&&!b2,e0=Jm.includes("Firefox"),SU=e=>e&&"__CONTEXT__"in e,kU=e=>e.constructor.name==="CSSFontFaceRule",_U=e=>e.constructor.name==="CSSImportRule",CU=e=>e.constructor.name==="CSSLayerBlockRule",on=e=>e.nodeType===1,zs=e=>typeof e.className=="object",y2=e=>e.tagName==="image",IU=e=>e.tagName==="use",fs=e=>on(e)&&typeof e.style<"u"&&!zs(e),OU=e=>e.nodeType===8,NU=e=>e.nodeType===3,Ma=e=>e.tagName==="IMG",_c=e=>e.tagName==="VIDEO",PU=e=>e.tagName==="CANVAS",DU=e=>e.tagName==="TEXTAREA",RU=e=>e.tagName==="INPUT",LU=e=>e.tagName==="STYLE",MU=e=>e.tagName==="SCRIPT",jU=e=>e.tagName==="SELECT",BU=e=>e.tagName==="SLOT",FU=e=>e.tagName==="IFRAME",$U=(...e)=>console.warn(g2,...e);function UU(e){const t=e?.createElement?.("canvas");return t&&(t.height=t.width=1),!!t&&"toDataURL"in t&&!!t.toDataURL("image/webp").includes("image/webp")}const op=e=>e.startsWith("data:");function v2(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(ni&&e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i)||!ni)return e;const r=Cc().implementation.createHTMLDocument(),n=r.createElement("base"),i=r.createElement("a");return r.head.appendChild(n),r.body.appendChild(i),t&&(n.href=t),i.href=e,i.href}function Cc(e){return(e&&on(e)?e?.ownerDocument:e)??window.document}const Ic="http://www.w3.org/2000/svg";function HU(e,t,r){const n=Cc(r).createElementNS(Ic,"svg");return n.setAttributeNS(null,"width",e.toString()),n.setAttributeNS(null,"height",t.toString()),n.setAttributeNS(null,"viewBox",`0 0 ${e} ${t}`),n}function zU(e,t){let r=new XMLSerializer().serializeToString(e);return t&&(r=r.replace(/[\u0000-\u0008\v\f\u000E-\u001F\uD800-\uDFFF\uFFFE\uFFFF]/gu,"")),`data:image/svg+xml;charset=utf-8,${encodeURIComponent(r)}`}function qU(e,t){return new Promise((r,n)=>{const i=new FileReader;i.onload=()=>r(i.result),i.onerror=()=>n(i.error),i.onabort=()=>n(new Error(`Failed read blob to ${t}`)),i.readAsDataURL(e)})}const WU=e=>qU(e,"dataUrl");function _a(e,t){const r=Cc(t).createElement("img");return r.decoding="sync",r.loading="eager",r.src=e,r}function ds(e,t){return new Promise(r=>{const{timeout:n,ownerDocument:i,onError:a,onWarn:o}=t??{},s=typeof e=="string"?_a(e,Cc(i)):e;let u=null,l=null;function c(){r(s),u&&clearTimeout(u),l?.()}if(n&&(u=setTimeout(c,n)),_c(s)){const f=s.currentSrc||s.src;if(!f)return s.poster?ds(s.poster,t).then(r):c();if(s.readyState>=2)return c();const d=c,h=p=>{o?.("Failed video load",f,p),a?.(p),c()};l=()=>{s.removeEventListener("loadeddata",d),s.removeEventListener("error",h)},s.addEventListener("loadeddata",d,{once:!0}),s.addEventListener("error",h,{once:!0})}else{const f=y2(s)?s.href.baseVal:s.currentSrc||s.src;if(!f)return c();const d=async()=>{if(Ma(s)&&"decode"in s)try{await s.decode()}catch(p){o?.("Failed to decode image, trying to render anyway",s.dataset.originalSrc||f,p)}c()},h=p=>{o?.("Failed image load",s.dataset.originalSrc||f,p),c()};if(Ma(s)&&s.complete)return d();l=()=>{s.removeEventListener("load",d),s.removeEventListener("error",h)},s.addEventListener("load",d,{once:!0}),s.addEventListener("error",h,{once:!0})}})}async function VU(e,t){fs(e)&&(Ma(e)||_c(e)?await ds(e,t):await Promise.all(["img","video"].flatMap(r=>Array.from(e.querySelectorAll(r)).map(n=>ds(n,t)))))}const x2=(function(){let t=0;const r=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(t+=1,`u${r()}${t}`)})();function E2(e){return e?.split(",").map(t=>t.trim().replace(/"|'/g,"").toLowerCase()).filter(Boolean)}let uv=0;function YU(e){const t=`${g2}[#${uv}]`;return uv++,{time:r=>e&&console.time(`${t} ${r}`),timeEnd:r=>e&&console.timeEnd(`${t} ${r}`),warn:(...r)=>e&&$U(...r)}}function KU(e){return{cache:e?"no-cache":"force-cache"}}async function Oc(e,t){return SU(e)?e:GU(e,{...t,autoDestruct:!0})}async function GU(e,t){const{scale:r=1,workerUrl:n,workerNumber:i=1}=t||{},a=!!t?.debug,o=t?.features??!0,s=e.ownerDocument??(ni?window.document:void 0),u=e.ownerDocument?.defaultView??(ni?window:void 0),l=new Map,c={width:0,height:0,quality:1,type:"image/png",scale:r,backgroundColor:null,style:null,filter:null,maximumCanvasSize:0,timeout:3e4,progress:null,debug:a,fetch:{requestInit:KU(t?.fetch?.bypassingCache),placeholderImage:"data:image/png;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",bypassingCache:!1,...t?.fetch},fetchFn:null,font:{},drawImageInterval:100,workerUrl:null,workerNumber:i,onCloneEachNode:null,onCloneNode:null,onEmbedNode:null,onCreateForeignObjectSvg:null,includeStyleProperties:null,autoDestruct:!1,...t,__CONTEXT__:!0,log:YU(a),node:e,ownerDocument:s,ownerWindow:u,dpi:r===1?null:96*r,svgStyleElement:T2(s),svgDefsElement:s?.createElementNS(Ic,"defs"),svgStyles:new Map,defaultComputedStyles:new Map,workers:[...Array.from({length:TU&&n&&i?i:0})].map(()=>{try{const h=new Worker(n);return h.onmessage=async p=>{const{url:b,result:y}=p.data;y?l.get(b)?.resolve?.(y):l.get(b)?.reject?.(new Error(`Error receiving message from worker: ${b}`))},h.onmessageerror=p=>{const{url:b}=p.data;l.get(b)?.reject?.(new Error(`Error receiving message from worker: ${b}`))},h}catch(h){return c.log.warn("Failed to new Worker",h),null}}).filter(Boolean),fontFamilies:new Map,fontCssTexts:new Map,acceptOfImage:`${[UU(s)&&"image/webp","image/svg+xml","image/*","*/*"].filter(Boolean).join(",")};q=0.8`,requests:l,drawImageCount:0,tasks:[],features:o,isEnable:h=>h==="restoreScrollPosition"?typeof o=="boolean"?!1:o[h]??!1:typeof o=="boolean"?o:o[h]??!0,shadowRoots:[]};c.log.time("wait until load"),await VU(e,{timeout:c.timeout,onWarn:c.log.warn}),c.log.timeEnd("wait until load");const{width:f,height:d}=XU(e,c);return c.width=f,c.height=d,c}function T2(e){if(!e)return;const t=e.createElement("style"),r=t.ownerDocument.createTextNode(`
151
+ .______background-clip--text {
152
+ background-clip: text;
153
+ -webkit-background-clip: text;
154
+ }
155
+ `);return t.appendChild(r),t}function XU(e,t){let{width:r,height:n}=t;if(on(e)&&(!r||!n)){const i=e.getBoundingClientRect();r=r||i.width||Number(e.getAttribute("width"))||0,n=n||i.height||Number(e.getAttribute("height"))||0}return{width:r,height:n}}async function ZU(e,t){const{log:r,timeout:n,drawImageCount:i,drawImageInterval:a}=t;r.time("image to canvas");const o=await ds(e,{timeout:n,onWarn:t.log.warn}),{canvas:s,context2d:u}=QU(e.ownerDocument,t),l=()=>{try{u?.drawImage(o,0,0,s.width,s.height)}catch(c){t.log.warn("Failed to drawImage",c)}};if(l(),t.isEnable("fixSvgXmlDecode"))for(let c=0;c<i;c++)await new Promise(f=>{setTimeout(()=>{u?.clearRect(0,0,s.width,s.height),l(),f()},c+a)});return t.drawImageCount=0,r.timeEnd("image to canvas"),s}function QU(e,t){const{width:r,height:n,scale:i,backgroundColor:a,maximumCanvasSize:o}=t,s=e.createElement("canvas");s.width=Math.floor(r*i),s.height=Math.floor(n*i),s.style.width=`${r}px`,s.style.height=`${n}px`,o&&(s.width>o||s.height>o)&&(s.width>o&&s.height>o?s.width>s.height?(s.height*=o/s.width,s.width=o):(s.width*=o/s.height,s.height=o):s.width>o?(s.height*=o/s.width,s.width=o):(s.width*=o/s.height,s.height=o));const u=s.getContext("2d");return u&&a&&(u.fillStyle=a,u.fillRect(0,0,s.width,s.height)),{canvas:s,context2d:u}}function w2(e,t){if(e.ownerDocument)try{const a=e.toDataURL();if(a!=="data:,")return _a(a,e.ownerDocument)}catch(a){t.log.warn("Failed to clone canvas",a)}const r=e.cloneNode(!1),n=e.getContext("2d"),i=r.getContext("2d");try{return n&&i&&i.putImageData(n.getImageData(0,0,e.width,e.height),0,0),r}catch(a){t.log.warn("Failed to clone canvas",a)}return r}function JU(e,t){try{if(e?.contentDocument?.documentElement)return t0(e.contentDocument.documentElement,t)}catch(r){t.log.warn("Failed to clone iframe",r)}return e.cloneNode(!1)}function eH(e){const t=e.cloneNode(!1);return e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),t.loading==="lazy"&&(t.loading="eager"),t}async function tH(e,t){if(e.ownerDocument&&!e.currentSrc&&e.poster)return _a(e.poster,e.ownerDocument);const r=e.cloneNode(!1);r.crossOrigin="anonymous",e.currentSrc&&e.currentSrc!==e.src&&(r.src=e.currentSrc);const n=r.ownerDocument;if(n){let i=!0;if(await ds(r,{onError:()=>i=!1,onWarn:t.log.warn}),!i)return e.poster?_a(e.poster,e.ownerDocument):r;r.currentTime=e.currentTime,await new Promise(o=>{r.addEventListener("seeked",o,{once:!0})});const a=n.createElement("canvas");a.width=e.offsetWidth,a.height=e.offsetHeight;try{const o=a.getContext("2d");o&&o.drawImage(r,0,0,a.width,a.height)}catch(o){return t.log.warn("Failed to clone video",o),e.poster?_a(e.poster,e.ownerDocument):r}return w2(a,t)}return r}function rH(e,t){return PU(e)?w2(e,t):FU(e)?JU(e,t):Ma(e)?eH(e):_c(e)?tH(e,t):e.cloneNode(!1)}function nH(e){let t=e.sandbox;if(!t){const{ownerDocument:r}=e;try{r&&(t=r.createElement("iframe"),t.id=`__SANDBOX__${x2()}`,t.width="0",t.height="0",t.style.visibility="hidden",t.style.position="fixed",r.body.appendChild(t),t.srcdoc='<!DOCTYPE html><meta charset="UTF-8"><title></title><body>',e.sandbox=t)}catch(n){e.log.warn("Failed to getSandBox",n)}}return t}const iH=["width","height","-webkit-text-fill-color"],aH=["stroke","fill"];function A2(e,t,r){const{defaultComputedStyles:n}=r,i=e.nodeName.toLowerCase(),a=zs(e)&&i!=="svg",o=a?aH.map(b=>[b,e.getAttribute(b)]).filter(([,b])=>b!==null):[],s=[a&&"svg",i,o.map((b,y)=>`${b}=${y}`).join(","),t].filter(Boolean).join(":");if(n.has(s))return n.get(s);const l=nH(r)?.contentWindow;if(!l)return new Map;const c=l?.document;let f,d;a?(f=c.createElementNS(Ic,"svg"),d=f.ownerDocument.createElementNS(f.namespaceURI,i),o.forEach(([b,y])=>{d.setAttributeNS(null,b,y)}),f.appendChild(d)):f=d=c.createElement(i),d.textContent=" ",c.body.appendChild(f);const h=l.getComputedStyle(d,t),p=new Map;for(let b=h.length,y=0;y<b;y++){const v=h.item(y);iH.includes(v)||p.set(v,h.getPropertyValue(v))}return c.body.removeChild(f),n.set(s,p),p}function S2(e,t,r){const n=new Map,i=[],a=new Map;if(r)for(const s of r)o(s);else for(let s=e.length,u=0;u<s;u++){const l=e.item(u);o(l)}for(let s=i.length,u=0;u<s;u++)a.get(i[u])?.forEach((l,c)=>n.set(c,l));function o(s){const u=e.getPropertyValue(s),l=e.getPropertyPriority(s),c=s.lastIndexOf("-"),f=c>-1?s.substring(0,c):void 0;if(f){let d=a.get(f);d||(d=new Map,a.set(f,d)),d.set(s,[u,l])}t.get(s)===u&&!l||(f?i.push(f):n.set(s,[u,l]))}return n}function oH(e,t,r,n){const{ownerWindow:i,includeStyleProperties:a,currentParentNodeStyle:o}=n,s=t.style,u=i.getComputedStyle(e),l=A2(e,null,n);o?.forEach((f,d)=>{l.delete(d)});const c=S2(u,l,a);c.delete("transition-property"),c.delete("all"),c.delete("d"),c.delete("content"),r&&(c.delete("position"),c.delete("margin-top"),c.delete("margin-right"),c.delete("margin-bottom"),c.delete("margin-left"),c.delete("margin-block-start"),c.delete("margin-block-end"),c.delete("margin-inline-start"),c.delete("margin-inline-end"),c.set("box-sizing",["border-box",""])),c.get("background-clip")?.[0]==="text"&&t.classList.add("______background-clip--text"),b2&&(c.has("font-kerning")||c.set("font-kerning",["normal",""]),(c.get("overflow-x")?.[0]==="hidden"||c.get("overflow-y")?.[0]==="hidden")&&c.get("text-overflow")?.[0]==="ellipsis"&&e.scrollWidth===e.clientWidth&&c.set("text-overflow",["clip",""]));for(let f=s.length,d=0;d<f;d++)s.removeProperty(s.item(d));return c.forEach(([f,d],h)=>{s.setProperty(h,f,d)}),c}function sH(e,t){(DU(e)||RU(e)||jU(e))&&t.setAttribute("value",e.value)}const uH=["::before","::after"],lH=["::-webkit-scrollbar","::-webkit-scrollbar-button","::-webkit-scrollbar-thumb","::-webkit-scrollbar-track","::-webkit-scrollbar-track-piece","::-webkit-scrollbar-corner","::-webkit-resizer"];function cH(e,t,r,n,i){const{ownerWindow:a,svgStyleElement:o,svgStyles:s,currentNodeStyle:u}=n;if(!o||!a)return;function l(c){const f=a.getComputedStyle(e,c);let d=f.getPropertyValue("content");if(!d||d==="none")return;i?.(d),d=d.replace(/(')|(")|(counter\(.+\))/g,"");const h=[x2()],p=A2(e,c,n);u?.forEach((x,S)=>{p.delete(S)});const b=S2(f,p,n.includeStyleProperties);b.delete("content"),b.delete("-webkit-locale"),b.get("background-clip")?.[0]==="text"&&t.classList.add("______background-clip--text");const y=[`content: '${d}';`];if(b.forEach(([x,S],w)=>{y.push(`${w}: ${x}${S?" !important":""};`)}),y.length===1)return;try{t.className=[t.className,...h].join(" ")}catch(x){n.log.warn("Failed to copyPseudoClass",x);return}const v=y.join(`
156
+ `);let T=s.get(v);T||(T=[],s.set(v,T)),T.push(`.${h[0]}${c}`)}uH.forEach(l),r&&lH.forEach(l)}const lv=new Set(["symbol"]);async function cv(e,t,r,n,i){if(on(r)&&(LU(r)||MU(r))||n.filter&&!n.filter(r))return;lv.has(t.nodeName)||lv.has(r.nodeName)?n.currentParentNodeStyle=void 0:n.currentParentNodeStyle=n.currentNodeStyle;const a=await t0(r,n,!1,i);n.isEnable("restoreScrollPosition")&&fH(e,a),t.appendChild(a)}async function fv(e,t,r,n){let i=e.firstChild;on(e)&&e.shadowRoot&&(i=e.shadowRoot?.firstChild,r.shadowRoots.push(e.shadowRoot));for(let a=i;a;a=a.nextSibling)if(!OU(a))if(on(a)&&BU(a)&&typeof a.assignedNodes=="function"){const o=a.assignedNodes();for(let s=0;s<o.length;s++)await cv(e,t,o[s],r,n)}else await cv(e,t,a,r,n)}function fH(e,t){if(!fs(e)||!fs(t))return;const{scrollTop:r,scrollLeft:n}=e;if(!r&&!n)return;const{transform:i}=t.style,a=new DOMMatrix(i),{a:o,b:s,c:u,d:l}=a;a.a=1,a.b=0,a.c=0,a.d=1,a.translateSelf(-n,-r),a.a=o,a.b=s,a.c=u,a.d=l,t.style.transform=a.toString()}function dH(e,t){const{backgroundColor:r,width:n,height:i,style:a}=t,o=e.style;if(r&&o.setProperty("background-color",r,"important"),n&&o.setProperty("width",`${n}px`,"important"),i&&o.setProperty("height",`${i}px`,"important"),a)for(const s in a)o[s]=a[s]}const hH=/^[\w-:]+$/;async function t0(e,t,r=!1,n){const{ownerDocument:i,ownerWindow:a,fontFamilies:o,onCloneEachNode:s}=t;if(i&&NU(e))return n&&/\S/.test(e.data)&&n(e.data),i.createTextNode(e.data);if(i&&a&&on(e)&&(fs(e)||zs(e))){const l=await rH(e,t);if(t.isEnable("removeAbnormalAttributes")){const b=l.getAttributeNames();for(let y=b.length,v=0;v<y;v++){const T=b[v];hH.test(T)||l.removeAttribute(T)}}const c=t.currentNodeStyle=oH(e,l,r,t);r&&dH(l,t);let f=!1;if(t.isEnable("copyScrollbar")){const b=[c.get("overflow-x")?.[0],c.get("overflow-y")?.[0]];f=b.includes("scroll")||(b.includes("auto")||b.includes("overlay"))&&(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)}const d=c.get("text-transform")?.[0],h=E2(c.get("font-family")?.[0]),p=h?b=>{d==="uppercase"?b=b.toUpperCase():d==="lowercase"?b=b.toLowerCase():d==="capitalize"&&(b=b[0].toUpperCase()+b.substring(1)),h.forEach(y=>{let v=o.get(y);v||o.set(y,v=new Set),b.split("").forEach(T=>v.add(T))})}:void 0;return cH(e,l,f,t,p),sH(e,l),_c(e)||await fv(e,l,t,p),await s?.(l),l}const u=e.cloneNode(!1);return await fv(e,u,t),await s?.(u),u}function pH(e){if(e.ownerDocument=void 0,e.ownerWindow=void 0,e.svgStyleElement=void 0,e.svgDefsElement=void 0,e.svgStyles.clear(),e.defaultComputedStyles.clear(),e.sandbox){try{e.sandbox.remove()}catch(t){e.log.warn("Failed to destroyContext",t)}e.sandbox=void 0}e.workers=[],e.fontFamilies.clear(),e.fontCssTexts.clear(),e.requests.clear(),e.tasks=[],e.shadowRoots=[]}function mH(e){const{url:t,timeout:r,responseType:n,...i}=e,a=new AbortController,o=r?setTimeout(()=>a.abort(),r):void 0;return fetch(t,{signal:a.signal,...i}).then(s=>{if(!s.ok)throw new Error("Failed fetch, not 2xx response",{cause:s});switch(n){case"arrayBuffer":return s.arrayBuffer();case"dataUrl":return s.blob().then(WU);default:return s.text()}}).finally(()=>clearTimeout(o))}function hs(e,t){const{url:r,requestType:n="text",responseType:i="text",imageDom:a}=t;let o=r;const{timeout:s,acceptOfImage:u,requests:l,fetchFn:c,fetch:{requestInit:f,bypassingCache:d,placeholderImage:h},font:p,workers:b,fontFamilies:y}=e;n==="image"&&(dl||e0)&&e.drawImageCount++;let v=l.get(r);if(!v){d&&d instanceof RegExp&&d.test(o)&&(o+=(/\?/.test(o)?"&":"?")+new Date().getTime());const T=n.startsWith("font")&&p&&p.minify,x=new Set;T&&n.split(";")[1].split(",").forEach(_=>{y.has(_)&&y.get(_).forEach(O=>x.add(O))});const S=T&&x.size,w={url:o,timeout:s,responseType:S?"arrayBuffer":i,headers:n==="image"?{accept:u}:void 0,...f};v={type:n,resolve:void 0,reject:void 0,response:null},v.response=(async()=>{if(c&&n==="image"){const A=await c(r);if(A)return A}return!dl&&r.startsWith("http")&&b.length?new Promise((A,_)=>{b[l.size&b.length-1].postMessage({rawUrl:r,...w}),v.resolve=A,v.reject=_}):mH(w)})().catch(A=>{if(l.delete(r),n==="image"&&h)return e.log.warn("Failed to fetch image base64, trying to use placeholder image",o),typeof h=="string"?h:h(a);throw A}),l.set(r,v)}return v.response}async function k2(e,t,r,n){if(!_2(e))return e;for(const[i,a]of gH(e,t))try{const o=await hs(r,{url:a,requestType:n?"image":"text",responseType:"dataUrl"});e=e.replace(bH(i),`$1${o}$3`)}catch(o){r.log.warn("Failed to fetch css data url",i,o)}return e}function _2(e){return/url\((['"]?)([^'"]+?)\1\)/.test(e)}const C2=/url\((['"]?)([^'"]+?)\1\)/g;function gH(e,t){const r=[];return e.replace(C2,(n,i,a)=>(r.push([a,v2(a,t)]),n)),r.filter(([n])=>!op(n))}function bH(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}const yH=["background-image","border-image-source","-webkit-border-image","-webkit-mask-image","list-style-image"];function vH(e,t){return yH.map(r=>{const n=e.getPropertyValue(r);return!n||n==="none"?null:((dl||e0)&&t.drawImageCount++,k2(n,null,t,!0).then(i=>{!i||n===i||e.setProperty(r,i,e.getPropertyPriority(r))}))}).filter(Boolean)}function xH(e,t){if(Ma(e)){const r=e.currentSrc||e.src;if(!op(r))return[hs(t,{url:r,imageDom:e,requestType:"image",responseType:"dataUrl"}).then(n=>{n&&(e.srcset="",e.dataset.originalSrc=r,e.src=n||"")})];(dl||e0)&&t.drawImageCount++}else if(zs(e)&&!op(e.href.baseVal)){const r=e.href.baseVal;return[hs(t,{url:r,imageDom:e,requestType:"image",responseType:"dataUrl"}).then(n=>{n&&(e.dataset.originalSrc=r,e.href.baseVal=n||"")})]}return[]}function EH(e,t){const{ownerDocument:r,svgDefsElement:n}=t,i=e.getAttribute("href")??e.getAttribute("xlink:href");if(!i)return[];const[a,o]=i.split("#");if(o){const s=`#${o}`,u=t.shadowRoots.reduce((l,c)=>l??c.querySelector(`svg ${s}`),r?.querySelector(`svg ${s}`));if(a&&e.setAttribute("href",s),n?.querySelector(s))return[];if(u)return n?.appendChild(u.cloneNode(!0)),[];if(a)return[hs(t,{url:a,responseType:"text"}).then(l=>{n?.insertAdjacentHTML("beforeend",l)})]}return[]}function I2(e,t){const{tasks:r}=t;on(e)&&((Ma(e)||y2(e))&&r.push(...xH(e,t)),IU(e)&&r.push(...EH(e,t))),fs(e)&&r.push(...vH(e.style,t)),e.childNodes.forEach(n=>{I2(n,t)})}async function TH(e,t){const{ownerDocument:r,svgStyleElement:n,fontFamilies:i,fontCssTexts:a,tasks:o,font:s}=t;if(!(!r||!n||!i.size))if(s&&s.cssText){const u=hv(s.cssText,t);n.appendChild(r.createTextNode(`${u}
157
+ `))}else{const u=Array.from(r.styleSheets).filter(h=>{try{return"cssRules"in h&&!!h.cssRules.length}catch(p){return t.log.warn(`Error while reading CSS rules from ${h.href}`,p),!1}}),l=r.implementation.createHTMLDocument(""),c=l.createElement("style");l.head.appendChild(c);const f=c.sheet;await Promise.all(u.flatMap(h=>Array.from(h.cssRules).map(async p=>{if(_U(p)){const b=p.href;let y="";try{y=await hs(t,{url:b,requestType:"text",responseType:"text"})}catch(T){t.log.warn(`Error fetch remote css import from ${b}`,T)}const v=y.replace(C2,(T,x,S)=>T.replace(S,v2(S,b)));for(const T of AH(v))try{f.insertRule(T,f.cssRules.length)}catch(x){t.log.warn("Error inserting rule from remote css import",{rule:T,error:x})}}}))),f.cssRules.length&&u.push(f);const d=[];u.forEach(h=>{sp(h.cssRules,d)}),d.filter(h=>kU(h)&&_2(h.style.getPropertyValue("src"))&&E2(h.style.getPropertyValue("font-family"))?.some(p=>i.has(p))).forEach(h=>{const p=h,b=a.get(p.cssText);b?n.appendChild(r.createTextNode(`${b}
158
+ `)):o.push(k2(p.cssText,p.parentStyleSheet?p.parentStyleSheet.href:null,t).then(y=>{y=hv(y,t),a.set(p.cssText,y),n.appendChild(r.createTextNode(`${y}
159
+ `))}))})}}const wH=/(\/\*[\s\S]*?\*\/)/g,dv=/((@.*?keyframes [\s\S]*?){([\s\S]*?}\s*?)})/gi;function AH(e){if(e==null)return[];const t=[];let r=e.replace(wH,"");for(;;){const a=dv.exec(r);if(!a)break;t.push(a[0])}r=r.replace(dv,"");const n=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,i=new RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let a=n.exec(r);if(a)i.lastIndex=n.lastIndex;else if(a=i.exec(r),a)n.lastIndex=i.lastIndex;else break;t.push(a[0])}return t}const SH=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,kH=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function hv(e,t){const{font:r}=t,n=r?r?.preferredFormat:void 0;return n?e.replace(kH,i=>{for(;;){const[a,,o]=SH.exec(i)||[];if(!o)return"";if(o===n)return`src: ${a};`}}):e}function sp(e,t=[]){for(const r of Array.from(e))CU(r)?t.push(...sp(r.cssRules)):"cssRules"in r?sp(r.cssRules,t):t.push(r);return t}const _H=/\bx?link:?href\s*=\s*["'](?!data:)[^"']+["']/i;function CH(e){return _H.test(e.innerHTML)}async function IH(e,t){const r=await Oc(e,t);if(on(r.node)&&zs(r.node)&&!CH(r.node))return r.node;const{ownerDocument:n,log:i,tasks:a,svgStyleElement:o,svgDefsElement:s,svgStyles:u,font:l,progress:c,autoDestruct:f,onCloneNode:d,onEmbedNode:h,onCreateForeignObjectSvg:p}=r;i.time("clone node");const b=await t0(r.node,r,!0);if(o&&n){let S="";u.forEach((w,A)=>{S+=`${w.join(`,
160
+ `)} {
161
+ ${A}
162
+ }
163
+ `}),o.appendChild(n.createTextNode(S))}i.timeEnd("clone node"),await d?.(b),l!==!1&&on(b)&&(i.time("embed web font"),await TH(b,r),i.timeEnd("embed web font")),i.time("embed node"),I2(b,r);const y=a.length;let v=0;const T=async()=>{for(;;){const S=a.pop();if(!S)break;try{await S}catch(w){r.log.warn("Failed to run task",w)}c?.(++v,y)}};c?.(v,y),await Promise.all([...Array.from({length:4})].map(T)),i.timeEnd("embed node"),await h?.(b);const x=OH(b,r);return s&&x.insertBefore(s,x.children[0]),o&&x.insertBefore(o,x.children[0]),f&&pH(r),await p?.(x),x}function OH(e,t){const{width:r,height:n}=t,i=HU(r,n,e.ownerDocument),a=i.ownerDocument.createElementNS(i.namespaceURI,"foreignObject");return a.setAttributeNS(null,"x","0%"),a.setAttributeNS(null,"y","0%"),a.setAttributeNS(null,"width","100%"),a.setAttributeNS(null,"height","100%"),a.append(e),i.appendChild(a),i}async function NH(e,t){const r=await Oc(e,t),n=await IH(r),i=zU(n,r.isEnable("removeControlCharacter"));r.autoDestruct||(r.svgStyleElement=T2(r.ownerDocument),r.svgDefsElement=r.ownerDocument?.createElementNS(Ic,"defs"),r.svgStyles.clear());const a=_a(i,n.ownerDocument);return await ZU(a,r)}async function PH(e,t){const r=await Oc(e,t),{log:n,quality:i,type:a,dpi:o}=r,s=await NH(r);n.time("canvas to data url");let u=s.toDataURL(a,i);if(["image/png","image/jpeg"].includes(a)&&o&&wU&&AU){const[l,c]=u.split(",");let f=0,d=!1;if(a==="image/png"){const x=EU(c);x>=0?(f=Math.ceil((x+28)/3)*4,d=!0):f=33/3*4}else a==="image/jpeg"&&(f=18/3*4);const h=c.substring(0,f),p=c.substring(f),b=window.atob(h),y=new Uint8Array(b.length);for(let x=0;x<y.length;x++)y[x]=b.charCodeAt(x);const v=a==="image/png"?bU(y,o,d):hU(y,o),T=window.btoa(String.fromCharCode(...v));u=[l,",",T,p].join("")}return n.timeEnd("canvas to data url"),u}async function O2(e,t){return PH(await Oc(e,{...t,type:"image/png"}))}const DH=e=>typeof e=="boolean"||e instanceof Boolean,RH=e=>typeof e=="number"||e instanceof Number,LH=e=>typeof e=="bigint"||e instanceof BigInt,N2=e=>!!e&&e instanceof Date,MH=e=>typeof e=="string"||e instanceof String,jH=e=>Array.isArray(e),P2=e=>typeof e=="object"&&e!==null,D2=e=>!!e&&e instanceof Object&&typeof e=="function";function hl(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function BH(e,t,r){return r?JSON.stringify(e):t?`"${e}"`:e}function R2(e){let{field:t,value:r,data:n,lastElement:i,openBracket:a,closeBracket:o,level:s,style:u,shouldExpandNode:l,clickToExpandNode:c,outerRef:f,beforeExpandChange:d}=e;const h=m.useRef(!1),[p,b]=m.useState(()=>l(s,r,t)),y=m.useRef(null);m.useEffect(()=>{h.current?b(l(s,r,t)):h.current=!0},[l]);const v=m.useId();if(n.length===0)return FH({field:t,openBracket:a,closeBracket:o,lastElement:i,style:u});const T=p?u.collapseIcon:u.expandIcon,x=p?u.ariaLables.collapseJson:u.ariaLables.expandJson,S=s+1,w=n.length-1,A=R=>{p!==R&&(!d||d({level:s,value:r,field:t,newExpandValue:R}))&&b(R)},_=R=>{if(R.key==="ArrowRight"||R.key==="ArrowLeft")R.preventDefault(),A(R.key==="ArrowRight");else if(R.key==="ArrowUp"||R.key==="ArrowDown"){R.preventDefault();const C=R.key==="ArrowUp"?-1:1;if(!f.current)return;const M=f.current.querySelectorAll("[role=button]");let L=-1;for(let H=0;H<M.length;H++)if(M[H].tabIndex===0){L=H;break}if(L<0)return;const Q=(L+C+M.length)%M.length;M[L].tabIndex=-1,M[Q].tabIndex=0,M[Q].focus()}},O=()=>{var R;A(!p);const C=y.current;if(!C)return;const M=(R=f.current)===null||R===void 0?void 0:R.querySelector('[role=button][tabindex="0"]');M&&(M.tabIndex=-1),C.tabIndex=0,C.focus()};return m.createElement("div",{className:u.basicChildStyle,role:"treeitem","aria-expanded":p,"aria-selected":void 0},m.createElement("span",{className:T,onClick:O,onKeyDown:_,role:"button","aria-label":x,"aria-expanded":p,"aria-controls":p?v:void 0,ref:y,tabIndex:s===0?0:-1}),(t||t==="")&&(c?m.createElement("span",{className:u.clickableLabel,onClick:O,onKeyDown:_},hl(t,u.quotesForFieldNames),":"):m.createElement("span",{className:u.label},hl(t,u.quotesForFieldNames),":")),m.createElement("span",{className:u.punctuation},a),p?m.createElement("ul",{id:v,role:"group",className:u.childFieldsContainer},n.map((R,C)=>m.createElement(up,{key:R[0]||C,field:R[0],value:R[1],style:u,lastElement:C===w,level:S,shouldExpandNode:l,clickToExpandNode:c,beforeExpandChange:d,outerRef:f}))):m.createElement("span",{className:u.collapsedContent,onClick:O,onKeyDown:_}),m.createElement("span",{className:u.punctuation},o),!i&&m.createElement("span",{className:u.punctuation},","))}function FH(e){let{field:t,openBracket:r,closeBracket:n,lastElement:i,style:a}=e;return m.createElement("div",{className:a.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&m.createElement("span",{className:a.label},hl(t,a.quotesForFieldNames),":"),m.createElement("span",{className:a.punctuation},r),m.createElement("span",{className:a.punctuation},n),!i&&m.createElement("span",{className:a.punctuation},","))}function $H(e){let{field:t,value:r,style:n,lastElement:i,shouldExpandNode:a,clickToExpandNode:o,level:s,outerRef:u,beforeExpandChange:l}=e;return R2({field:t,value:r,lastElement:i||!1,level:s,openBracket:"{",closeBracket:"}",style:n,shouldExpandNode:a,clickToExpandNode:o,data:Object.keys(r).map(c=>[c,r[c]]),outerRef:u,beforeExpandChange:l})}function UH(e){let{field:t,value:r,style:n,lastElement:i,level:a,shouldExpandNode:o,clickToExpandNode:s,outerRef:u,beforeExpandChange:l}=e;return R2({field:t,value:r,lastElement:i||!1,level:a,openBracket:"[",closeBracket:"]",style:n,shouldExpandNode:o,clickToExpandNode:s,data:r.map(c=>[void 0,c]),outerRef:u,beforeExpandChange:l})}function HH(e){let{field:t,value:r,style:n,lastElement:i}=e,a,o=n.otherValue;return r===null?(a="null",o=n.nullValue):r===void 0?(a="undefined",o=n.undefinedValue):MH(r)?(a=BH(r,!n.noQuotesForStringValues,n.stringifyStringValues),o=n.stringValue):DH(r)?(a=r?"true":"false",o=n.booleanValue):RH(r)?(a=r.toString(),o=n.numberValue):LH(r)?(a=`${r.toString()}n`,o=n.numberValue):N2(r)?a=r.toISOString():D2(r)?a="function() { }":a=r.toString(),m.createElement("div",{className:n.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&m.createElement("span",{className:n.label},hl(t,n.quotesForFieldNames),":"),m.createElement("span",{className:o},a),!i&&m.createElement("span",{className:n.punctuation},","))}function up(e){const t=e.value;return jH(t)?m.createElement(UH,Object.assign({},e)):P2(t)&&!N2(t)&&!D2(t)?m.createElement($H,Object.assign({},e)):m.createElement(HH,Object.assign({},e))}var Ht={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti"};const zH={collapseJson:"collapse JSON",expandJson:"expand JSON"},zu={container:Ht["container-light"],basicChildStyle:Ht["basic-element-style"],childFieldsContainer:Ht["child-fields-container"],label:Ht["label-light"],clickableLabel:Ht["clickable-label-light"],nullValue:Ht["value-null-light"],undefinedValue:Ht["value-undefined-light"],stringValue:Ht["value-string-light"],booleanValue:Ht["value-boolean-light"],numberValue:Ht["value-number-light"],otherValue:Ht["value-other-light"],punctuation:Ht["punctuation-light"],collapseIcon:Ht["collapse-icon-light"],expandIcon:Ht["expand-icon-light"],collapsedContent:Ht["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:zH,stringifyStringValues:!1},qH=()=>!0,WH=e=>e<1,VH=e=>{let{data:t,style:r=zu,shouldExpandNode:n=qH,clickToExpandNode:i=!1,beforeExpandChange:a,compactTopLevel:o,...s}=e;const u=m.useRef(null);return m.createElement("div",Object.assign({"aria-label":"JSON view"},s,{className:r.container,ref:u,role:"tree"}),o&&P2(t)?Object.entries(t).map(l=>{let[c,f]=l;return m.createElement(up,{key:c,field:c,value:f,style:{...zu,...r},lastElement:!0,level:1,shouldExpandNode:n,clickToExpandNode:i,beforeExpandChange:a,outerRef:u})}):m.createElement(up,{value:t,style:{...zu,...r},lastElement:!0,level:0,shouldExpandNode:n,clickToExpandNode:i,outerRef:u,beforeExpandChange:a}))},YH=()=>!1;function r0({data:e,collapsed:t}){return E.jsx("div",{className:"text-xs font-mono",children:E.jsx(VH,{data:e,shouldExpandNode:t?YH:WH,style:zu})})}var KH=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function n0(e){if(typeof e!="string")return!1;var t=KH;return t.includes(e)}var GH=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],XH=new Set(GH);function L2(e){return typeof e!="string"?!1:XH.has(e)}function M2(e){return typeof e=="string"&&e.startsWith("data-")}function Fr(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(L2(r)||M2(r))&&(t[r]=e[r]);return t}function qs(e){if(e==null)return null;if(m.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Fr(t)}return typeof e=="object"&&!Array.isArray(e)?Fr(e):null}function Pt(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(L2(r)||M2(r)||n0(r))&&(t[r]=e[r]);return t}function ZH(e){return e==null?null:m.isValidElement(e)?Pt(e.props):typeof e=="object"&&!Array.isArray(e)?Pt(e):null}var QH=["children","width","height","viewBox","className","style","title","desc"];function lp(){return lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lp.apply(null,arguments)}function JH(e,t){if(e==null)return{};var r,n,i=ez(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ez(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var j2=m.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:a,className:o,style:s,title:u,desc:l}=e,c=JH(e,QH),f=a||{width:n,height:i,x:0,y:0},d=Le("recharts-surface",o);return m.createElement("svg",lp({},Pt(c),{className:d,width:n,height:i,style:s,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),m.createElement("title",null,u),m.createElement("desc",null,l),r)}),tz=["children","className"];function cp(){return cp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cp.apply(null,arguments)}function rz(e,t){if(e==null)return{};var r,n,i=nz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function nz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Zt=m.forwardRef((e,t)=>{var{children:r,className:n}=e,i=rz(e,tz),a=Le("recharts-layer",n);return m.createElement("g",cp({className:a},Pt(i),{ref:t}),r)}),iz=m.createContext(null);function Ye(e){return function(){return e}}const B2=Math.cos,pl=Math.sin,qr=Math.sqrt,ml=Math.PI,Nc=2*ml,fp=Math.PI,dp=2*fp,Ti=1e-6,az=dp-Ti;function F2(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function oz(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return F2;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class sz{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?F2:oz(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,u=n-t,l=i-r,c=o-t,f=s-r,d=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>Ti)if(!(Math.abs(f*u-l*c)>Ti)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,p=i-s,b=u*u+l*l,y=h*h+p*p,v=Math.sqrt(b),T=Math.sqrt(d),x=a*Math.tan((fp-Math.acos((b+d-y)/(2*v*T)))/2),S=x/T,w=x/v;Math.abs(S-1)>Ti&&this._append`L${t+S*c},${r+S*f}`,this._append`A${a},${a},0,0,${+(f*h>c*p)},${this._x1=t+w*u},${this._y1=r+w*l}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),u=n*Math.sin(i),l=t+s,c=r+u,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Ti||Math.abs(this._y1-c)>Ti)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%dp+dp),d>az?this._append`A${n},${n},0,1,${f},${t-s},${r-u}A${n},${n},0,1,${f},${this._x1=l},${this._y1=c}`:d>Ti&&this._append`A${n},${n},0,${+(d>=fp)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function i0(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new sz(t)}function a0(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function $2(e){this._context=e}$2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Pc(e){return new $2(e)}function U2(e){return e[0]}function H2(e){return e[1]}function z2(e,t){var r=Ye(!0),n=null,i=Pc,a=null,o=i0(s);e=typeof e=="function"?e:e===void 0?U2:Ye(e),t=typeof t=="function"?t:t===void 0?H2:Ye(t);function s(u){var l,c=(u=a0(u)).length,f,d=!1,h;for(n==null&&(a=i(h=o())),l=0;l<=c;++l)!(l<c&&r(f=u[l],l,u))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(f,l,u),+t(f,l,u));if(h)return a=null,h+""||null}return s.x=function(u){return arguments.length?(e=typeof u=="function"?u:Ye(+u),s):e},s.y=function(u){return arguments.length?(t=typeof u=="function"?u:Ye(+u),s):t},s.defined=function(u){return arguments.length?(r=typeof u=="function"?u:Ye(!!u),s):r},s.curve=function(u){return arguments.length?(i=u,n!=null&&(a=i(n)),s):i},s.context=function(u){return arguments.length?(u==null?n=a=null:a=i(n=u),s):n},s}function Tu(e,t,r){var n=null,i=Ye(!0),a=null,o=Pc,s=null,u=i0(l);e=typeof e=="function"?e:e===void 0?U2:Ye(+e),t=typeof t=="function"?t:Ye(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?H2:Ye(+r);function l(f){var d,h,p,b=(f=a0(f)).length,y,v=!1,T,x=new Array(b),S=new Array(b);for(a==null&&(s=o(T=u())),d=0;d<=b;++d){if(!(d<b&&i(y=f[d],d,f))===v)if(v=!v)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=d-1;p>=h;--p)s.point(x[p],S[p]);s.lineEnd(),s.areaEnd()}v&&(x[d]=+e(y,d,f),S[d]=+t(y,d,f),s.point(n?+n(y,d,f):x[d],r?+r(y,d,f):S[d]))}if(T)return s=null,T+""||null}function c(){return z2().defined(i).curve(o).context(a)}return l.x=function(f){return arguments.length?(e=typeof f=="function"?f:Ye(+f),n=null,l):e},l.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Ye(+f),l):e},l.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Ye(+f),l):n},l.y=function(f){return arguments.length?(t=typeof f=="function"?f:Ye(+f),r=null,l):t},l.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Ye(+f),l):t},l.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Ye(+f),l):r},l.lineX0=l.lineY0=function(){return c().x(e).y(t)},l.lineY1=function(){return c().x(e).y(r)},l.lineX1=function(){return c().x(n).y(t)},l.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Ye(!!f),l):i},l.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),l):o},l.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),l):a},l}class q2{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function uz(e){return new q2(e,!0)}function lz(e){return new q2(e,!1)}const o0={draw(e,t){const r=qr(t/ml);e.moveTo(r,0),e.arc(0,0,r,0,Nc)}},cz={draw(e,t){const r=qr(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},W2=qr(1/3),fz=W2*2,dz={draw(e,t){const r=qr(t/fz),n=r*W2;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},hz={draw(e,t){const r=qr(t),n=-r/2;e.rect(n,n,r,r)}},pz=.8908130915292852,V2=pl(ml/10)/pl(7*ml/10),mz=pl(Nc/10)*V2,gz=-B2(Nc/10)*V2,bz={draw(e,t){const r=qr(t*pz),n=mz*r,i=gz*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=Nc*a/5,s=B2(o),u=pl(o);e.lineTo(u*r,-s*r),e.lineTo(s*n-u*i,u*n+s*i)}e.closePath()}},Qf=qr(3),yz={draw(e,t){const r=-qr(t/(Qf*3));e.moveTo(0,r*2),e.lineTo(-Qf*r,-r),e.lineTo(Qf*r,-r),e.closePath()}},Er=-.5,Tr=qr(3)/2,hp=1/qr(12),vz=(hp/2+1)*3,xz={draw(e,t){const r=qr(t/vz),n=r/2,i=r*hp,a=n,o=r*hp+r,s=-a,u=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,u),e.lineTo(Er*n-Tr*i,Tr*n+Er*i),e.lineTo(Er*a-Tr*o,Tr*a+Er*o),e.lineTo(Er*s-Tr*u,Tr*s+Er*u),e.lineTo(Er*n+Tr*i,Er*i-Tr*n),e.lineTo(Er*a+Tr*o,Er*o-Tr*a),e.lineTo(Er*s+Tr*u,Er*u-Tr*s),e.closePath()}};function Ez(e,t){let r=null,n=i0(i);e=typeof e=="function"?e:Ye(e||o0),t=typeof t=="function"?t:Ye(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Ye(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Ye(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function gl(){}function bl(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Y2(e){this._context=e}Y2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:bl(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:bl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Tz(e){return new Y2(e)}function K2(e){this._context=e}K2.prototype={areaStart:gl,areaEnd:gl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:bl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wz(e){return new K2(e)}function G2(e){this._context=e}G2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:bl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Az(e){return new G2(e)}function X2(e){this._context=e}X2.prototype={areaStart:gl,areaEnd:gl,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Sz(e){return new X2(e)}function pv(e){return e<0?-1:1}function mv(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(pv(a)+pv(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function gv(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Jf(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function yl(e){this._context=e}yl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Jf(this,this._t0,gv(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Jf(this,gv(this,r=mv(this,e,t)),r);break;default:Jf(this,this._t0,r=mv(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Z2(e){this._context=new Q2(e)}(Z2.prototype=Object.create(yl.prototype)).point=function(e,t){yl.prototype.point.call(this,t,e)};function Q2(e){this._context=e}Q2.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function kz(e){return new yl(e)}function _z(e){return new Z2(e)}function J2(e){this._context=e}J2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=bv(e),i=bv(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function bv(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Cz(e){return new J2(e)}function Dc(e,t){this._context=e,this._t=t}Dc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Iz(e){return new Dc(e,.5)}function Oz(e){return new Dc(e,0)}function Nz(e){return new Dc(e,1)}function $i(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function pp(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function Pz(e,t){return e[t]}function Dz(e){const t=[];return t.key=e,t}function Rz(){var e=Ye([]),t=pp,r=$i,n=Pz;function i(a){var o=Array.from(e.apply(this,arguments),Dz),s,u=o.length,l=-1,c;for(const f of a)for(s=0,++l;s<u;++s)(o[s][l]=[0,+n(f,o[s].key,l,a)]).data=f;for(s=0,c=a0(t(o));s<u;++s)o[c[s]].index=s;return r(o,c),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:Ye(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:Ye(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?pp:typeof a=="function"?a:Ye(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??$i,i):r},i}function Lz(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}$i(e,t)}}function Mz(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,s=0;o<i;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}$i(e,t)}}function jz(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var s=0,u=0,l=0;s<o;++s){for(var c=e[t[s]],f=c[n][1]||0,d=c[n-1][1]||0,h=(f-d)/2,p=0;p<s;++p){var b=e[t[p]],y=b[n][1]||0,v=b[n-1][1]||0;h+=y-v}u+=f,l+=h*f}i[n-1][1]+=i[n-1][0]=r,u&&(r-=l/u)}i[n-1][1]+=i[n-1][0]=r,$i(e,t)}}var ed={},td={},yv;function Bz(){return yv||(yv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(td)),td}var rd={},vv;function e_(){return vv||(vv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(rd)),rd}var nd={},xv;function s0(){return xv||(xv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="string"||typeof r=="symbol"?r:Object.is(r?.valueOf?.(),-0)?"-0":String(r)}e.toKey=t})(nd)),nd}var id={},ad={},Ev;function Fz(){return Ev||(Ev=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(t).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}e.toString=t})(ad)),ad}var Tv;function u0(){return Tv||(Tv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Fz(),r=s0();function n(i){if(Array.isArray(i))return i.map(r.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const a=[],o=i.length;if(o===0)return a;let s=0,u="",l="",c=!1;for(i.charCodeAt(0)===46&&(a.push(""),s++);s<o;){const f=i[s];l?f==="\\"&&s+1<o?(s++,u+=i[s]):f===l?l="":u+=f:c?f==='"'||f==="'"?l=f:f==="]"?(c=!1,a.push(u),u=""):u+=f:f==="["?(c=!0,u&&(a.push(u),u="")):f==="."?u&&(a.push(u),u=""):u+=f,s++}return u&&a.push(u),a}e.toPath=n})(id)),id}var wv;function l0(){return wv||(wv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Bz(),r=e_(),n=s0(),i=u0();function a(s,u,l){if(s==null)return l;switch(typeof u){case"string":{if(t.isUnsafeProperty(u))return l;const c=s[u];return c===void 0?r.isDeepKey(u)?a(s,i.toPath(u),l):l:c}case"number":case"symbol":{typeof u=="number"&&(u=n.toKey(u));const c=s[u];return c===void 0?l:c}default:{if(Array.isArray(u))return o(s,u,l);if(Object.is(u?.valueOf(),-0)?u="-0":u=String(u),t.isUnsafeProperty(u))return l;const c=s[u];return c===void 0?l:c}}}function o(s,u,l){if(u.length===0)return l;let c=s;for(let f=0;f<u.length;f++){if(c==null||t.isUnsafeProperty(u[f]))return l;c=c[u[f]]}return c===void 0?l:c}e.get=a})(ed)),ed}var od,Av;function $z(){return Av||(Av=1,od=l0().get),od}var Uz=$z();const ja=On(Uz);var Hz=4;function Zn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hz,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function it(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((i,a,o)=>{var s=r[o-1];return typeof s=="string"?i+s+a:s!==void 0?i+Zn(s)+a:i+a},"")}var nr=e=>e===0?0:e>0?1:-1,sn=e=>typeof e=="number"&&e!=+e,mp=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,se=e=>(typeof e=="number"||e instanceof Number)&&!sn(e),jt=e=>se(e)||typeof e=="string",zz=0,ps=e=>{var t=++zz;return"".concat(e||"").concat(t)},$r=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!se(t)&&typeof t!="string")return n;var a;if(mp(t)){if(r==null)return n;var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return sn(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},t_=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1};function at(e,t,r){return se(e)&&se(t)?Zn(e+r*(t-e)):t}function r_(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):ja(n,t))===r)}var tt=e=>e===null||typeof e>"u",Ws=e=>tt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function ir(e){return e!=null}function eo(){}var qz=["type","size","sizeType"];function gp(){return gp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gp.apply(null,arguments)}function Sv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function kv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sv(Object(r),!0).forEach(function(n){Wz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wz(e,t,r){return(t=Vz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vz(e){var t=Yz(e,"string");return typeof t=="symbol"?t:t+""}function Yz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kz(e,t){if(e==null)return{};var r,n,i=Gz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Gz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var n_={symbolCircle:o0,symbolCross:cz,symbolDiamond:dz,symbolSquare:hz,symbolStar:bz,symbolTriangle:yz,symbolWye:xz},Xz=Math.PI/180,Zz=e=>{var t="symbol".concat(Ws(e));return n_[t]||o0},Qz=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*Xz;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},Jz=(e,t)=>{n_["symbol".concat(Ws(e))]=t},i_=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=Kz(e,qz),a=kv(kv({},i),{},{type:t,size:r,sizeType:n}),o="circle";typeof t=="string"&&(o=t);var s=()=>{var d=Zz(o),h=Ez().type(d).size(Qz(r,n,o)),p=h();if(p!==null)return p},{className:u,cx:l,cy:c}=a,f=Pt(a);return se(l)&&se(c)&&se(r)?m.createElement("path",gp({},f,{className:Le("recharts-symbols",u),transform:"translate(".concat(l,", ").concat(c,")"),d:s()})):null};i_.registerSymbol=Jz;var a_=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,c0=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(m.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{n0(i)&&typeof r[i]=="function"&&(n[i]=(a=>r[i](r,a)))}),n},eq=(e,t,r)=>n=>(e(t,r,n),null),f0=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var a=e[i];n0(i)&&typeof a=="function"&&(n||(n={}),n[i]=eq(a,t,r))}),n};function _v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tq(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_v(Object(r),!0).forEach(function(n){rq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_v(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rq(e,t,r){return(t=nq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nq(e){var t=iq(e,"string");return typeof t=="symbol"?t:t+""}function iq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dt(e,t){var r=tq({},e),n=t,i=Object.keys(t),a=i.reduce((o,s)=>(o[s]===void 0&&n[s]!==void 0&&(o[s]=n[s]),o),r);return a}var sd={},ud={},Cv;function aq(){return Cv||(Cv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const i=new Map;for(let a=0;a<r.length;a++){const o=r[a],s=n(o,a,r);i.has(s)||i.set(s,o)}return Array.from(i.values())}e.uniqBy=t})(ud)),ud}var ld={},Iv;function oq(){return Iv||(Iv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return function(...i){return r.apply(this,i.slice(0,n))}}e.ary=t})(ld)),ld}var cd={},Ov;function o_(){return Ov||(Ov=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(cd)),cd}var fd={},dd={},hd={},Nv;function sq(){return Nv||(Nv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(hd)),hd}var Pv;function s_(){return Pv||(Pv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=sq();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(dd)),dd}var pd={},Dv;function uq(){return Dv||(Dv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(pd)),pd}var Rv;function lq(){return Rv||(Rv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=s_(),r=uq();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})(fd)),fd}var md={},gd={},Lv;function cq(){return Lv||(Lv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=l0();function r(n){return function(i){return t.get(i,n)}}e.property=r})(gd)),gd}var bd={},yd={},vd={},xd={},Mv;function u_(){return Mv||(Mv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=t})(xd)),xd}var Ed={},jv;function l_(){return jv||(jv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(Ed)),Ed}var Td={},Bv;function c_(){return Bv||(Bv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.isEqualsSameValueZero=t})(Td)),Td}var Fv;function fq(){return Fv||(Fv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=u_(),r=l_(),n=c_();function i(c,f,d){return typeof d!="function"?i(c,f,()=>{}):a(c,f,function h(p,b,y,v,T,x){const S=d(p,b,y,v,T,x);return S!==void 0?!!S:a(p,b,h,x)},new Map)}function a(c,f,d,h){if(f===c)return!0;switch(typeof f){case"object":return o(c,f,d,h);case"function":return Object.keys(f).length>0?a(c,{...f},d,h):n.isEqualsSameValueZero(c,f);default:return t.isObject(c)?typeof f=="string"?f==="":!0:n.isEqualsSameValueZero(c,f)}}function o(c,f,d,h){if(f==null)return!0;if(Array.isArray(f))return u(c,f,d,h);if(f instanceof Map)return s(c,f,d,h);if(f instanceof Set)return l(c,f,d,h);const p=Object.keys(f);if(c==null||r.isPrimitive(c))return p.length===0;if(p.length===0)return!0;if(h?.has(f))return h.get(f)===c;h?.set(f,c);try{for(let b=0;b<p.length;b++){const y=p[b];if(!r.isPrimitive(c)&&!(y in c)||f[y]===void 0&&c[y]!==void 0||f[y]===null&&c[y]!==null||!d(c[y],f[y],y,c,f,h))return!1}return!0}finally{h?.delete(f)}}function s(c,f,d,h){if(f.size===0)return!0;if(!(c instanceof Map))return!1;for(const[p,b]of f.entries()){const y=c.get(p);if(d(y,b,p,c,f,h)===!1)return!1}return!0}function u(c,f,d,h){if(f.length===0)return!0;if(!Array.isArray(c))return!1;const p=new Set;for(let b=0;b<f.length;b++){const y=f[b];let v=!1;for(let T=0;T<c.length;T++){if(p.has(T))continue;const x=c[T];let S=!1;if(d(x,y,b,c,f,h)&&(S=!0),S){p.add(T),v=!0;break}}if(!v)return!1}return!0}function l(c,f,d,h){return f.size===0?!0:c instanceof Set?u([...c],[...f],d,h):!1}e.isMatchWith=i,e.isSetMatch=l})(vd)),vd}var $v;function f_(){return $v||($v=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=fq();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(yd)),yd}var wd={},Ad={},Sd={},Uv;function dq(){return Uv||(Uv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t})(Sd)),Sd}var kd={},Hv;function d0(){return Hv||(Hv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(kd)),kd}var _d={},zv;function d_(){return zv||(zv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",i="[object Boolean]",a="[object Arguments]",o="[object Symbol]",s="[object Date]",u="[object Map]",l="[object Set]",c="[object Array]",f="[object Function]",d="[object ArrayBuffer]",h="[object Object]",p="[object Error]",b="[object DataView]",y="[object Uint8Array]",v="[object Uint8ClampedArray]",T="[object Uint16Array]",x="[object Uint32Array]",S="[object BigUint64Array]",w="[object Int8Array]",A="[object Int16Array]",_="[object Int32Array]",O="[object BigInt64Array]",R="[object Float32Array]",C="[object Float64Array]";e.argumentsTag=a,e.arrayBufferTag=d,e.arrayTag=c,e.bigInt64ArrayTag=O,e.bigUint64ArrayTag=S,e.booleanTag=i,e.dataViewTag=b,e.dateTag=s,e.errorTag=p,e.float32ArrayTag=R,e.float64ArrayTag=C,e.functionTag=f,e.int16ArrayTag=A,e.int32ArrayTag=_,e.int8ArrayTag=w,e.mapTag=u,e.numberTag=n,e.objectTag=h,e.regexpTag=t,e.setTag=l,e.stringTag=r,e.symbolTag=o,e.uint16ArrayTag=T,e.uint32ArrayTag=x,e.uint8ArrayTag=y,e.uint8ClampedArrayTag=v})(_d)),_d}var Cd={},qv;function hq(){return qv||(qv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(Cd)),Cd}var Wv;function h_(){return Wv||(Wv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dq(),r=d0(),n=d_(),i=l_(),a=hq();function o(c,f){return s(c,void 0,c,new Map,f)}function s(c,f,d,h=new Map,p=void 0){const b=p?.(c,f,d,h);if(b!==void 0)return b;if(i.isPrimitive(c))return c;if(h.has(c))return h.get(c);if(Array.isArray(c)){const y=new Array(c.length);h.set(c,y);for(let v=0;v<c.length;v++)y[v]=s(c[v],v,d,h,p);return Object.hasOwn(c,"index")&&(y.index=c.index),Object.hasOwn(c,"input")&&(y.input=c.input),y}if(c instanceof Date)return new Date(c.getTime());if(c instanceof RegExp){const y=new RegExp(c.source,c.flags);return y.lastIndex=c.lastIndex,y}if(c instanceof Map){const y=new Map;h.set(c,y);for(const[v,T]of c)y.set(v,s(T,v,d,h,p));return y}if(c instanceof Set){const y=new Set;h.set(c,y);for(const v of c)y.add(s(v,void 0,d,h,p));return y}if(typeof Buffer<"u"&&Buffer.isBuffer(c))return c.subarray();if(a.isTypedArray(c)){const y=new(Object.getPrototypeOf(c)).constructor(c.length);h.set(c,y);for(let v=0;v<c.length;v++)y[v]=s(c[v],v,d,h,p);return y}if(c instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&c instanceof SharedArrayBuffer)return c.slice(0);if(c instanceof DataView){const y=new DataView(c.buffer.slice(0),c.byteOffset,c.byteLength);return h.set(c,y),u(y,c,d,h,p),y}if(typeof File<"u"&&c instanceof File){const y=new File([c],c.name,{type:c.type});return h.set(c,y),u(y,c,d,h,p),y}if(typeof Blob<"u"&&c instanceof Blob){const y=new Blob([c],{type:c.type});return h.set(c,y),u(y,c,d,h,p),y}if(c instanceof Error){const y=new c.constructor;return h.set(c,y),y.message=c.message,y.name=c.name,y.stack=c.stack,y.cause=c.cause,u(y,c,d,h,p),y}if(c instanceof Boolean){const y=new Boolean(c.valueOf());return h.set(c,y),u(y,c,d,h,p),y}if(c instanceof Number){const y=new Number(c.valueOf());return h.set(c,y),u(y,c,d,h,p),y}if(c instanceof String){const y=new String(c.valueOf());return h.set(c,y),u(y,c,d,h,p),y}if(typeof c=="object"&&l(c)){const y=Object.create(Object.getPrototypeOf(c));return h.set(c,y),u(y,c,d,h,p),y}return c}function u(c,f,d=c,h,p){const b=[...Object.keys(f),...t.getSymbols(f)];for(let y=0;y<b.length;y++){const v=b[y],T=Object.getOwnPropertyDescriptor(c,v);(T==null||T.writable)&&(c[v]=s(f[v],v,d,h,p))}}function l(c){switch(r.getTag(c)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=o,e.cloneDeepWithImpl=s,e.copyProperties=u})(Ad)),Ad}var Vv;function pq(){return Vv||(Vv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=h_();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(wd)),wd}var Yv;function mq(){return Yv||(Yv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=f_(),r=pq();function n(i){return i=r.cloneDeep(i),a=>t.isMatch(a,i)}e.matches=n})(bd)),bd}var Id={},Od={},Nd={},Kv;function gq(){return Kv||(Kv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=h_(),r=d0(),n=d_();function i(a,o){return t.cloneDeepWith(a,(s,u,l,c)=>{const f=o?.(s,u,l,c);if(f!==void 0)return f;if(typeof a=="object"){if(r.getTag(a)===n.objectTag&&typeof a.constructor!="function"){const d={};return c.set(a,d),t.copyProperties(d,a,l,c),d}switch(Object.prototype.toString.call(a)){case n.numberTag:case n.stringTag:case n.booleanTag:{const d=new a.constructor(a?.valueOf());return t.copyProperties(d,a),d}case n.argumentsTag:{const d={};return t.copyProperties(d,a),d.length=a.length,d[Symbol.iterator]=a[Symbol.iterator],d}default:return}}})}e.cloneDeepWith=i})(Nd)),Nd}var Gv;function bq(){return Gv||(Gv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gq();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(Od)),Od}var Pd={},Dd={},Xv;function p_(){return Xv||(Xv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(n,i=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n<i;case"symbol":return!1;case"string":return t.test(n)}}e.isIndex=r})(Dd)),Dd}var Rd={},Zv;function yq(){return Zv||(Zv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=d0();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(Rd)),Rd}var Qv;function vq(){return Qv||(Qv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=e_(),r=p_(),n=yq(),i=u0();function a(o,s){let u;if(Array.isArray(s)?u=s:typeof s=="string"&&t.isDeepKey(s)&&o?.[s]==null?u=i.toPath(s):u=[s],u.length===0)return!1;let l=o;for(let c=0;c<u.length;c++){const f=u[c];if((l==null||!Object.hasOwn(l,f))&&!((Array.isArray(l)||n.isArguments(l))&&r.isIndex(f)&&f<l.length))return!1;l=l[f]}return!0}e.has=a})(Pd)),Pd}var Jv;function xq(){return Jv||(Jv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=f_(),r=s0(),n=bq(),i=l0(),a=vq();function o(s,u){switch(typeof s){case"object":{Object.is(s?.valueOf(),-0)&&(s="-0");break}case"number":{s=r.toKey(s);break}}return u=n.cloneDeep(u),function(l){const c=i.get(l,s);return c===void 0?a.has(l,s):u===void 0?c===void 0:t.isMatch(c,u)}}e.matchesProperty=o})(Id)),Id}var e1;function Eq(){return e1||(e1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=o_(),r=cq(),n=mq(),i=xq();function a(o){if(o==null)return t.identity;switch(typeof o){case"function":return o;case"object":return Array.isArray(o)&&o.length===2?i.matchesProperty(o[0],o[1]):n.matches(o);case"string":case"symbol":case"number":return r.property(o)}}e.iteratee=a})(md)),md}var t1;function Tq(){return t1||(t1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=aq(),r=oq(),n=o_(),i=lq(),a=Eq();function o(s,u=n.identity){return i.isArrayLikeObject(s)?t.uniqBy(Array.from(s),r.ary(a.iteratee(u),1)):[]}e.uniqBy=o})(sd)),sd}var Ld,r1;function wq(){return r1||(r1=1,Ld=Tq().uniqBy),Ld}var Aq=wq();const n1=On(Aq);function Sq(e,t,r){return t===!0?n1(e,r):typeof t=="function"?n1(e,t):e}var Md={exports:{}},jd={},Bd={exports:{}},Fd={};var i1;function kq(){if(i1)return Fd;i1=1;var e=cm();function t(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function s(f,d){var h=d(),p=n({inst:{value:h,getSnapshot:d}}),b=p[0].inst,y=p[1];return a(function(){b.value=h,b.getSnapshot=d,u(b)&&y({inst:b})},[f,h,d]),i(function(){return u(b)&&y({inst:b}),f(function(){u(b)&&y({inst:b})})},[f]),o(h),h}function u(f){var d=f.getSnapshot;f=f.value;try{var h=d();return!r(f,h)}catch{return!0}}function l(f,d){return d()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:s;return Fd.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,Fd}var a1;function _q(){return a1||(a1=1,Bd.exports=kq()),Bd.exports}var o1;function Cq(){if(o1)return jd;o1=1;var e=cm(),t=_q();function r(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,u=e.useDebugValue;return jd.useSyncExternalStoreWithSelector=function(l,c,f,d,h){var p=a(null);if(p.current===null){var b={hasValue:!1,value:null};p.current=b}else b=p.current;p=s(function(){function v(A){if(!T){if(T=!0,x=A,A=d(A),h!==void 0&&b.hasValue){var _=b.value;if(h(_,A))return S=_}return S=A}if(_=S,n(x,A))return _;var O=d(A);return h!==void 0&&h(_,O)?(x=A,_):(x=A,S=O)}var T=!1,x,S,w=f===void 0?null:f;return[function(){return v(c())},w===null?void 0:function(){return v(w())}]},[c,f,d,h]);var y=i(l,p[0],p[1]);return o(function(){b.hasValue=!0,b.value=y},[y]),u(y),y},jd}var s1;function Iq(){return s1||(s1=1,Md.exports=Cq()),Md.exports}var Oq=Iq(),h0=m.createContext(null),Nq=e=>e,Qe=()=>{var e=m.useContext(h0);return e?e.store.dispatch:Nq},qu=()=>{},Pq=()=>qu,Dq=(e,t)=>e===t;function oe(e){var t=m.useContext(h0),r=m.useMemo(()=>t?n=>{if(n!=null)return e(n)}:qu,[t,e]);return Oq.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:Pq,t?t.store.getState:qu,t?t.store.getState:qu,r,Dq)}function Rq(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Lq(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Mq(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var u1=e=>Array.isArray(e)?e:[e];function jq(e){const t=Array.isArray(e[0])?e[0]:e;return Mq(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Bq(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var Fq=class{constructor(e){this.value=e}deref(){return this.value}},$q=typeof WeakRef<"u"?WeakRef:Fq,Uq=0,l1=1;function wu(){return{s:Uq,v:void 0,o:null,p:null}}function m_(e,t={}){let r=wu();const{resultEqualityCheck:n}=t;let i,a=0;function o(){let s=r;const{length:u}=arguments;for(let f=0,d=u;f<d;f++){const h=arguments[f];if(typeof h=="function"||typeof h=="object"&&h!==null){let p=s.o;p===null&&(s.o=p=new WeakMap);const b=p.get(h);b===void 0?(s=wu(),p.set(h,s)):s=b}else{let p=s.p;p===null&&(s.p=p=new Map);const b=p.get(h);b===void 0?(s=wu(),p.set(h,s)):s=b}}const l=s;let c;if(s.s===l1)c=s.v;else if(c=e.apply(null,arguments),a++,n){const f=i?.deref?.()??i;f!=null&&n(f,c)&&(c=f,a!==0&&a--),i=typeof c=="object"&&c!==null||typeof c=="function"?new $q(c):c}return l.s=l1,l.v=c,c}return o.clearCache=()=>{r=wu(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Hq(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let a=0,o=0,s,u={},l=i.pop();typeof l=="object"&&(u=l,l=i.pop()),Rq(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const c={...r,...u},{memoize:f,memoizeOptions:d=[],argsMemoize:h=m_,argsMemoizeOptions:p=[]}=c,b=u1(d),y=u1(p),v=jq(i),T=f(function(){return a++,l.apply(null,arguments)},...b),x=h(function(){o++;const w=Bq(v,arguments);return s=T.apply(null,w),s},...y);return Object.assign(x,{resultFunc:l,memoizedResultFunc:T,dependencies:v,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var B=Hq(m_),zq=Object.assign((e,t=B)=>{Lq(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(a=>e[a]);return t(n,(...a)=>a.reduce((o,s,u)=>(o[r[u]]=s,o),{}))},{withTypes:()=>zq}),$d={},Ud={},Hd={},c1;function qq(){return c1||(c1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,i,a)=>{if(n!==i){const o=t(n),s=t(i);if(o===s&&o===0){if(n<i)return a==="desc"?1:-1;if(n>i)return a==="desc"?-1:1}return a==="desc"?s-o:o-s}return 0};e.compareValues=r})(Hd)),Hd}var zd={},qd={},f1;function g_(){return f1||(f1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(qd)),qd}var d1;function Wq(){return d1||(d1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=g_(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,o){return Array.isArray(a)?!1:typeof a=="number"||typeof a=="boolean"||a==null||t.isSymbol(a)?!0:typeof a=="string"&&(n.test(a)||!r.test(a))||o!=null&&Object.hasOwn(o,a)}e.isKey=i})(zd)),zd}var h1;function Vq(){return h1||(h1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qq(),r=Wq(),n=u0();function i(a,o,s,u){if(a==null)return[];s=u?void 0:s,Array.isArray(a)||(a=Object.values(a)),Array.isArray(o)||(o=o==null?[null]:[o]),o.length===0&&(o=[null]),Array.isArray(s)||(s=s==null?[]:[s]),s=s.map(h=>String(h));const l=(h,p)=>{let b=h;for(let y=0;y<p.length&&b!=null;++y)b=b[p[y]];return b},c=(h,p)=>p==null||h==null?p:typeof h=="object"&&"key"in h?Object.hasOwn(p,h.key)?p[h.key]:l(p,h.path):typeof h=="function"?h(p):Array.isArray(h)?l(p,h):typeof p=="object"?p[h]:p,f=o.map(h=>(Array.isArray(h)&&h.length===1&&(h=h[0]),h==null||typeof h=="function"||Array.isArray(h)||r.isKey(h)?h:{key:h,path:n.toPath(h)}));return a.map(h=>({original:h,criteria:f.map(p=>c(p,h))})).slice().sort((h,p)=>{for(let b=0;b<f.length;b++){const y=t.compareValues(h.criteria[b],p.criteria[b],s[b]);if(y!==0)return y}return 0}).map(h=>h.original)}e.orderBy=i})(Ud)),Ud}var Wd={},p1;function Yq(){return p1||(p1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const i=[],a=Math.floor(n),o=(s,u)=>{for(let l=0;l<s.length;l++){const c=s[l];Array.isArray(c)&&u<a?o(c,u+1):i.push(c)}};return o(r,0),i}e.flatten=t})(Wd)),Wd}var Vd={},m1;function b_(){return m1||(m1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=p_(),r=s_(),n=u_(),i=c_();function a(o,s,u){return n.isObject(u)&&(typeof s=="number"&&r.isArrayLike(u)&&t.isIndex(s)&&s<u.length||typeof s=="string"&&s in u)?i.isEqualsSameValueZero(u[s],o):!1}e.isIterateeCall=a})(Vd)),Vd}var g1;function Kq(){return g1||(g1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Vq(),r=Yq(),n=b_();function i(a,...o){const s=o.length;return s>1&&n.isIterateeCall(a,o[0],o[1])?o=[]:s>2&&n.isIterateeCall(o[0],o[1],o[2])&&(o=[o[0]]),t.orderBy(a,r.flatten(o),["asc"])}e.sortBy=i})($d)),$d}var Yd,b1;function Gq(){return b1||(b1=1,Yd=Kq().sortBy),Yd}var Xq=Gq();const Rc=On(Xq);var y_=e=>e.legend.settings,Zq=e=>e.legend.size,Qq=e=>e.legend.payload;B([Qq,y_],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?Rc(n,r):n});var Au=1;function Jq(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=m.useState({height:0,left:0,top:0,width:0}),n=m.useCallback(i=>{if(i!=null){var a=i.getBoundingClientRect(),o={height:a.height,left:a.left,top:a.top,width:a.width};(Math.abs(o.height-t.height)>Au||Math.abs(o.left-t.left)>Au||Math.abs(o.top-t.top)>Au||Math.abs(o.width-t.width)>Au)&&r({height:o.height,left:o.left,top:o.top,width:o.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function It(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var eW=typeof Symbol=="function"&&Symbol.observable||"@@observable",y1=eW,Kd=()=>Math.random().toString(36).substring(7).split("").join("."),tW={INIT:`@@redux/INIT${Kd()}`,REPLACE:`@@redux/REPLACE${Kd()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Kd()}`},vl=tW;function p0(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function v_(e,t,r){if(typeof e!="function")throw new Error(It(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(It(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(It(1));return r(v_)(e,t)}let n=e,i=t,a=new Map,o=a,s=0,u=!1;function l(){o===a&&(o=new Map,a.forEach((y,v)=>{o.set(v,y)}))}function c(){if(u)throw new Error(It(3));return i}function f(y){if(typeof y!="function")throw new Error(It(4));if(u)throw new Error(It(5));let v=!0;l();const T=s++;return o.set(T,y),function(){if(v){if(u)throw new Error(It(6));v=!1,l(),o.delete(T),a=null}}}function d(y){if(!p0(y))throw new Error(It(7));if(typeof y.type>"u")throw new Error(It(8));if(typeof y.type!="string")throw new Error(It(17));if(u)throw new Error(It(9));try{u=!0,i=n(i,y)}finally{u=!1}return(a=o).forEach(T=>{T()}),y}function h(y){if(typeof y!="function")throw new Error(It(10));n=y,d({type:vl.REPLACE})}function p(){const y=f;return{subscribe(v){if(typeof v!="object"||v===null)throw new Error(It(11));function T(){const S=v;S.next&&S.next(c())}return T(),{unsubscribe:y(T)}},[y1](){return this}}}return d({type:vl.INIT}),{dispatch:d,subscribe:f,getState:c,replaceReducer:h,[y1]:p}}function rW(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:vl.INIT})>"u")throw new Error(It(12));if(typeof r(void 0,{type:vl.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(It(13))})}function x_(e){const t=Object.keys(e),r={};for(let a=0;a<t.length;a++){const o=t[a];typeof e[o]=="function"&&(r[o]=e[o])}const n=Object.keys(r);let i;try{rW(r)}catch(a){i=a}return function(o={},s){if(i)throw i;let u=!1;const l={};for(let c=0;c<n.length;c++){const f=n[c],d=r[f],h=o[f],p=d(h,s);if(typeof p>"u")throw s&&s.type,new Error(It(14));l[f]=p,u=u||p!==h}return u=u||n.length!==Object.keys(o).length,u?l:o}}function xl(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function nW(...e){return t=>(r,n)=>{const i=t(r,n);let a=()=>{throw new Error(It(15))};const o={getState:i.getState,dispatch:(u,...l)=>a(u,...l)},s=e.map(u=>u(o));return a=xl(...s)(i.dispatch),{...i,dispatch:a}}}function E_(e){return p0(e)&&"type"in e&&typeof e.type=="string"}var T_=Symbol.for("immer-nothing"),v1=Symbol.for("immer-draftable"),Qt=Symbol.for("immer-state");function Lr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var pr=Object,Ba=pr.getPrototypeOf,El="constructor",Lc="prototype",bp="configurable",Tl="enumerable",Wu="writable",ms="value",kn=e=>!!e&&!!e[Qt];function Ur(e){return e?w_(e)||jc(e)||!!e[v1]||!!e[El]?.[v1]||Bc(e)||Fc(e):!1}var iW=pr[Lc][El].toString(),x1=new WeakMap;function w_(e){if(!e||!m0(e))return!1;const t=Ba(e);if(t===null||t===pr[Lc])return!0;const r=pr.hasOwnProperty.call(t,El)&&t[El];if(r===Object)return!0;if(!ya(r))return!1;let n=x1.get(r);return n===void 0&&(n=Function.toString.call(r),x1.set(r,n)),n===iW}function Mc(e,t,r=!0){Vs(e)===0?(r?Reflect.ownKeys(e):pr.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Vs(e){const t=e[Qt];return t?t.type_:jc(e)?1:Bc(e)?2:Fc(e)?3:0}var E1=(e,t,r=Vs(e))=>r===2?e.has(t):pr[Lc].hasOwnProperty.call(e,t),yp=(e,t,r=Vs(e))=>r===2?e.get(t):e[t],wl=(e,t,r,n=Vs(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function aW(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var jc=Array.isArray,Bc=e=>e instanceof Map,Fc=e=>e instanceof Set,m0=e=>typeof e=="object",ya=e=>typeof e=="function",Gd=e=>typeof e=="boolean";function oW(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var vn=e=>e.copy_||e.base_,g0=e=>e.modified_?e.copy_:e.base_;function vp(e,t){if(Bc(e))return new Map(e);if(Fc(e))return new Set(e);if(jc(e))return Array[Lc].slice.call(e);const r=w_(e);if(t===!0||t==="class_only"&&!r){const n=pr.getOwnPropertyDescriptors(e);delete n[Qt];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const o=i[a],s=n[o];s[Wu]===!1&&(s[Wu]=!0,s[bp]=!0),(s.get||s.set)&&(n[o]={[bp]:!0,[Wu]:!0,[Tl]:s[Tl],[ms]:e[o]})}return pr.create(Ba(e),n)}else{const n=Ba(e);if(n!==null&&r)return{...e};const i=pr.create(n);return pr.assign(i,e)}}function b0(e,t=!1){return $c(e)||kn(e)||!Ur(e)||(Vs(e)>1&&pr.defineProperties(e,{set:Su,add:Su,clear:Su,delete:Su}),pr.freeze(e),t&&Mc(e,(r,n)=>{b0(n,!0)},!1)),e}function sW(){Lr(2)}var Su={[ms]:sW};function $c(e){return e===null||!m0(e)?!0:pr.isFrozen(e)}var Al="MapSet",xp="Patches",T1="ArrayMethods",A_={};function Ui(e){const t=A_[e];return t||Lr(0,e),t}var w1=e=>!!A_[e],gs,S_=()=>gs,uW=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:w1(Al)?Ui(Al):void 0,arrayMethodsPlugin_:w1(T1)?Ui(T1):void 0});function A1(e,t){t&&(e.patchPlugin_=Ui(xp),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ep(e){Tp(e),e.drafts_.forEach(lW),e.drafts_=null}function Tp(e){e===gs&&(gs=e.parent_)}var S1=e=>gs=uW(gs,e);function lW(e){const t=e[Qt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function k1(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[Qt].modified_&&(Ep(t),Lr(4)),Ur(e)&&(e=_1(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[Qt].base_,e,t)}else e=_1(t,r);return cW(t,e,!0),Ep(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==T_?e:void 0}function _1(e,t){if($c(t))return t;const r=t[Qt];if(!r)return Sl(t,e.handledSet_,e);if(!Uc(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);C_(r,e)}return r.copy_}function cW(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&b0(t,r)}function k_(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Uc=(e,t)=>e.scope_===t,fW=[];function __(e,t,r,n){const i=vn(e),a=e.type_;if(n!==void 0&&yp(i,n,a)===t){wl(i,n,r,a);return}if(!e.draftLocations_){const s=e.draftLocations_=new Map;Mc(i,(u,l)=>{if(kn(l)){const c=s.get(l)||[];c.push(u),s.set(l,c)}})}const o=e.draftLocations_.get(t)??fW;for(const s of o)wl(i,s,r,a)}function dW(e,t,r){e.callbacks_.push(function(i){const a=t;if(!a||!Uc(a,i))return;i.mapSetPlugin_?.fixSetContents(a);const o=g0(a);__(e,a.draft_??a,o,r),C_(a,i)})}function C_(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const i=n.getPath(e);i&&n.generatePatches_(e,i,t)}k_(e)}}function hW(e,t,r){const{scope_:n}=e;if(kn(r)){const i=r[Qt];Uc(i,n)&&i.callbacks_.push(function(){Vu(e);const o=g0(i);__(e,r,o,t)})}else Ur(r)&&e.callbacks_.push(function(){const a=vn(e);e.type_===3?a.has(r)&&Sl(r,n.handledSet_,n):yp(a,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Sl(yp(e.copy_,t,e.type_),n.handledSet_,n)})}function Sl(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||kn(e)||t.has(e)||!Ur(e)||$c(e)||(t.add(e),Mc(e,(n,i)=>{if(kn(i)){const a=i[Qt];if(Uc(a,r)){const o=g0(a);wl(e,n,o,e.type_),k_(a)}}else Ur(i)&&Sl(i,t,r)})),e}function pW(e,t){const r=jc(e),n={type_:r?1:0,scope_:t?t.scope_:S_(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,a=kl;r&&(i=[n],a=bs);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return n.draft_=s,n.revoke_=o,[s,n]}var kl={get(e,t){if(t===Qt)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const i=vn(e);if(!E1(i,t,e.type_))return mW(e,i,t);const a=i[t];if(e.finalized_||!Ur(a)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&oW(t))return a;if(a===Xd(e.base_,t)){Vu(e);const o=e.type_===1?+t:t,s=Ap(e.scope_,a,e,o);return e.copy_[o]=s}return a},has(e,t){return t in vn(e)},ownKeys(e){return Reflect.ownKeys(vn(e))},set(e,t,r){const n=I_(vn(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Xd(vn(e),t),a=i?.[Qt];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(aW(r,i)&&(r!==void 0||E1(e.base_,t,e.type_)))return!0;Vu(e),wp(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),hW(e,t,r)),!0},deleteProperty(e,t){return Vu(e),Xd(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),wp(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=vn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Wu]:!0,[bp]:e.type_!==1||t!=="length",[Tl]:n[Tl],[ms]:r[t]}},defineProperty(){Lr(11)},getPrototypeOf(e){return Ba(e.base_)},setPrototypeOf(){Lr(12)}},bs={};for(let e in kl){let t=kl[e];bs[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}bs.deleteProperty=function(e,t){return bs.set.call(this,e,t,void 0)};bs.set=function(e,t,r){return kl.set.call(this,e[0],t,r,e[0])};function Xd(e,t){const r=e[Qt];return(r?vn(r):e)[t]}function mW(e,t,r){const n=I_(t,r);return n?ms in n?n[ms]:n.get?.call(e.draft_):void 0}function I_(e,t){if(!(t in e))return;let r=Ba(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ba(r)}}function wp(e){e.modified_||(e.modified_=!0,e.parent_&&wp(e.parent_))}function Vu(e){e.copy_||(e.assigned_=new Map,e.copy_=vp(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var gW=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(ya(r)&&!ya(n)){const o=n;n=r;const s=this;return function(l=o,...c){return s.produce(l,f=>n.call(this,f,...c))}}ya(n)||Lr(6),i!==void 0&&!ya(i)&&Lr(7);let a;if(Ur(r)){const o=S1(this),s=Ap(o,r,void 0);let u=!0;try{a=n(s),u=!1}finally{u?Ep(o):Tp(o)}return A1(o,i),k1(a,o)}else if(!r||!m0(r)){if(a=n(r),a===void 0&&(a=r),a===T_&&(a=void 0),this.autoFreeze_&&b0(a,!0),i){const o=[],s=[];Ui(xp).generateReplacementPatches_(r,a,{patches_:o,inversePatches_:s}),i(o,s)}return a}else Lr(1,r)},this.produceWithPatches=(r,n)=>{if(ya(r))return(s,...u)=>this.produceWithPatches(s,l=>r(l,...u));let i,a;return[this.produce(r,n,(s,u)=>{i=s,a=u}),i,a]},Gd(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Gd(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Gd(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Ur(t)||Lr(8),kn(t)&&(t=Cr(t));const r=S1(this),n=Ap(r,t,void 0);return n[Qt].isManual_=!0,Tp(r),n}finishDraft(t,r){const n=t&&t[Qt];(!n||!n.isManual_)&&Lr(9);const{scope_:i}=n;return A1(i,r),k1(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const a=r[n];if(a.path.length===0&&a.op==="replace"){t=a.value;break}}n>-1&&(r=r.slice(n+1));const i=Ui(xp).applyPatches_;return kn(t)?i(t,r):this.produce(t,a=>i(a,r))}};function Ap(e,t,r,n){const[i,a]=Bc(t)?Ui(Al).proxyMap_(t,r):Fc(t)?Ui(Al).proxySet_(t,r):pW(t,r);return(r?.scope_??S_()).drafts_.push(i),a.callbacks_=r?.callbacks_??[],a.key_=n,r&&n!==void 0?dW(r,a,n):a.callbacks_.push(function(u){u.mapSetPlugin_?.fixSetContents(a);const{patchPlugin_:l}=u;a.modified_&&l&&l.generatePatches_(a,[],u)}),i}function Cr(e){return kn(e)||Lr(10,e),O_(e)}function O_(e){if(!Ur(e)||$c(e))return e;const t=e[Qt];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=vp(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=vp(e,!0);return Mc(r,(i,a)=>{wl(r,i,O_(a))},n),t&&(t.finalized_=!1),r}var bW=new gW,N_=bW.produce;function P_(e){return({dispatch:r,getState:n})=>i=>a=>typeof a=="function"?a(r,n,e):i(a)}var yW=P_(),vW=P_,xW=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?xl:xl.apply(null,arguments)};function vr(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(gr(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>E_(n)&&n.type===e,r}var D_=class Mo extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Mo.prototype)}static get[Symbol.species](){return Mo}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Mo(...t[0].concat(this)):new Mo(...t.concat(this))}};function C1(e){return Ur(e)?N_(e,()=>{}):e}function ku(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function EW(e){return typeof e=="boolean"}var TW=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let o=new D_;return r&&(EW(r)?o.push(yW):o.push(vW(r.extraArgument))),o},R_="RTK_autoBatch",Xe=()=>e=>({payload:e,meta:{[R_]:!0}}),I1=e=>t=>{setTimeout(t,e)},L_=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,a=!1,o=!1;const s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:I1(10):e.type==="callback"?e.queueNotification:I1(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(c=>c()))};return Object.assign({},n,{subscribe(c){const f=()=>i&&c(),d=n.subscribe(f);return s.add(c),()=>{d(),s.delete(c)}},dispatch(c){try{return i=!c?.meta?.[R_],a=!i,a&&(o||(o=!0,u(l))),n.dispatch(c)}finally{i=!0}}})},wW=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new D_(e);return n&&i.push(L_(typeof n=="object"?n:void 0)),i};function AW(e){const t=TW(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:a=void 0,enhancers:o=void 0}=e||{};let s;if(typeof r=="function")s=r;else if(p0(r))s=x_(r);else throw new Error(gr(1));let u;typeof n=="function"?u=n(t):u=t();let l=xl;i&&(l=xW({trace:!1,...typeof i=="object"&&i}));const c=nW(...u),f=wW(c);let d=typeof o=="function"?o(f):f();const h=l(...d);return v_(s,a,h)}function M_(e){const t={},r=[];let n;const i={addCase(a,o){const s=typeof a=="string"?a:a.type;if(!s)throw new Error(gr(28));if(s in t)throw new Error(gr(29));return t[s]=o,i},addAsyncThunk(a,o){return o.pending&&(t[a.pending.type]=o.pending),o.rejected&&(t[a.rejected.type]=o.rejected),o.fulfilled&&(t[a.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:a.settled,reducer:o.settled}),i},addMatcher(a,o){return r.push({matcher:a,reducer:o}),i},addDefaultCase(a){return n=a,i}};return e(i),[t,r,n]}function SW(e){return typeof e=="function"}function kW(e,t){let[r,n,i]=M_(t),a;if(SW(e))a=()=>C1(e());else{const s=C1(e);a=()=>s}function o(s=a(),u){let l=[r[u.type],...n.filter(({matcher:c})=>c(u)).map(({reducer:c})=>c)];return l.filter(c=>!!c).length===0&&(l=[i]),l.reduce((c,f)=>{if(f)if(kn(c)){const h=f(c,u);return h===void 0?c:h}else{if(Ur(c))return N_(c,d=>f(d,u));{const d=f(c,u);if(d===void 0){if(c===null)return c;throw Error("A case reducer on a non-draftable value must not return undefined")}return d}}return c},s)}return o.getInitialState=a,o}var _W="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",CW=(e=21)=>{let t="",r=e;for(;r--;)t+=_W[Math.random()*64|0];return t},IW=Symbol.for("rtk-slice-createasyncthunk");function OW(e,t){return`${e}/${t}`}function NW({creators:e}={}){const t=e?.asyncThunk?.[IW];return function(n){const{name:i,reducerPath:a=i}=n;if(!i)throw new Error(gr(11));const o=(typeof n.reducers=="function"?n.reducers(DW()):n.reducers)||{},s=Object.keys(o),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(x,S){const w=typeof x=="string"?x:x.type;if(!w)throw new Error(gr(12));if(w in u.sliceCaseReducersByType)throw new Error(gr(13));return u.sliceCaseReducersByType[w]=S,l},addMatcher(x,S){return u.sliceMatchers.push({matcher:x,reducer:S}),l},exposeAction(x,S){return u.actionCreators[x]=S,l},exposeCaseReducer(x,S){return u.sliceCaseReducersByName[x]=S,l}};s.forEach(x=>{const S=o[x],w={reducerName:x,type:OW(i,x),createNotation:typeof n.reducers=="function"};LW(S)?jW(w,S,l,t):RW(w,S,l)});function c(){const[x={},S=[],w=void 0]=typeof n.extraReducers=="function"?M_(n.extraReducers):[n.extraReducers],A={...x,...u.sliceCaseReducersByType};return kW(n.initialState,_=>{for(let O in A)_.addCase(O,A[O]);for(let O of u.sliceMatchers)_.addMatcher(O.matcher,O.reducer);for(let O of S)_.addMatcher(O.matcher,O.reducer);w&&_.addDefaultCase(w)})}const f=x=>x,d=new Map,h=new WeakMap;let p;function b(x,S){return p||(p=c()),p(x,S)}function y(){return p||(p=c()),p.getInitialState()}function v(x,S=!1){function w(_){let O=_[x];return typeof O>"u"&&S&&(O=ku(h,w,y)),O}function A(_=f){const O=ku(d,S,()=>new WeakMap);return ku(O,_,()=>{const R={};for(const[C,M]of Object.entries(n.selectors??{}))R[C]=PW(M,_,()=>ku(h,_,y),S);return R})}return{reducerPath:x,getSelectors:A,get selectors(){return A(w)},selectSlice:w}}const T={name:i,reducer:b,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:y,...v(a),injectInto(x,{reducerPath:S,...w}={}){const A=S??a;return x.inject({reducerPath:A,reducer:b},w),{...T,...v(A,!0)}}};return T}}function PW(e,t,r,n){function i(a,...o){let s=t(a);return typeof s>"u"&&n&&(s=r()),e(s,...o)}return i.unwrapped=e,i}var $t=NW();function DW(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function RW({type:e,reducerName:t,createNotation:r},n,i){let a,o;if("reducer"in n){if(r&&!MW(n))throw new Error(gr(17));a=n.reducer,o=n.prepare}else a=n;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?vr(e,o):vr(e))}function LW(e){return e._reducerDefinitionType==="asyncThunk"}function MW(e){return e._reducerDefinitionType==="reducerWithPrepare"}function jW({type:e,reducerName:t},r,n,i){if(!i)throw new Error(gr(18));const{payloadCreator:a,fulfilled:o,pending:s,rejected:u,settled:l,options:c}=r,f=i(e,a,c);n.exposeAction(t,f),o&&n.addCase(f.fulfilled,o),s&&n.addCase(f.pending,s),u&&n.addCase(f.rejected,u),l&&n.addMatcher(f.settled,l),n.exposeCaseReducer(t,{fulfilled:o||_u,pending:s||_u,rejected:u||_u,settled:l||_u})}function _u(){}var BW="task",j_="listener",B_="completed",y0="cancelled",FW=`task-${y0}`,$W=`task-${B_}`,Sp=`${j_}-${y0}`,UW=`${j_}-${B_}`,Hc=class{constructor(e){this.code=e,this.message=`${BW} ${y0} (reason: ${e})`}name="TaskAbortError";message},v0=(e,t)=>{if(typeof e!="function")throw new TypeError(gr(32))},_l=()=>{},F_=(e,t=_l)=>(e.catch(t),e),$_=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Pi=e=>{if(e.aborted)throw new Hc(e.reason)};function U_(e,t){let r=_l;return new Promise((n,i)=>{const a=()=>i(new Hc(e.reason));if(e.aborted){a();return}r=$_(e,a),t.finally(()=>r()).then(n,i)}).finally(()=>{r=_l})}var HW=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Hc?"cancelled":"rejected",error:r}}finally{t?.()}},Cl=e=>t=>F_(U_(e,t).then(r=>(Pi(e),r))),H_=e=>{const t=Cl(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Ca}=Object,O1={},zc="listenerMiddleware",zW=(e,t)=>{const r=n=>$_(e,()=>n.abort(e.reason));return(n,i)=>{v0(n);const a=new AbortController;r(a);const o=HW(async()=>{Pi(e),Pi(a.signal);const s=await n({pause:Cl(a.signal),delay:H_(a.signal),signal:a.signal});return Pi(a.signal),s},()=>a.abort($W));return i?.autoJoin&&t.push(o.catch(_l)),{result:Cl(e)(o),cancel(){a.abort(FW)}}}},qW=(e,t)=>{const r=async(n,i)=>{Pi(t);let a=()=>{};const s=[new Promise((u,l)=>{let c=e({predicate:n,effect:(f,d)=>{d.unsubscribe(),u([f,d.getState(),d.getOriginalState()])}});a=()=>{c(),l()}})];i!=null&&s.push(new Promise(u=>setTimeout(u,i,null)));try{const u=await U_(t,Promise.race(s));return Pi(t),u}finally{a()}};return(n,i)=>F_(r(n,i))},z_=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:a}=e;if(t)i=vr(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(gr(21));return v0(a),{predicate:i,type:t,effect:a}},q_=Ca(e=>{const{type:t,predicate:r,effect:n}=z_(e);return{id:CW(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(gr(22))}}},{withTypes:()=>q_}),N1=(e,t)=>{const{type:r,effect:n,predicate:i}=z_(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===i)&&a.effect===n)},kp=e=>{e.pending.forEach(t=>{t.abort(Sp)})},WW=(e,t)=>()=>{for(const r of t.keys())kp(r);e.clear()},P1=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},W_=Ca(vr(`${zc}/add`),{withTypes:()=>W_}),VW=vr(`${zc}/removeAll`),V_=Ca(vr(`${zc}/remove`),{withTypes:()=>V_}),YW=(...e)=>{console.error(`${zc}/error`,...e)},Ys=(e={})=>{const t=new Map,r=new Map,n=h=>{const p=r.get(h)??0;r.set(h,p+1)},i=h=>{const p=r.get(h)??1;p===1?r.delete(h):r.set(h,p-1)},{extra:a,onError:o=YW}=e;v0(o);const s=h=>(h.unsubscribe=()=>t.delete(h.id),t.set(h.id,h),p=>{h.unsubscribe(),p?.cancelActive&&kp(h)}),u=h=>{const p=N1(t,h)??q_(h);return s(p)};Ca(u,{withTypes:()=>u});const l=h=>{const p=N1(t,h);return p&&(p.unsubscribe(),h.cancelActive&&kp(p)),!!p};Ca(l,{withTypes:()=>l});const c=async(h,p,b,y)=>{const v=new AbortController,T=qW(u,v.signal),x=[];try{h.pending.add(v),n(h),await Promise.resolve(h.effect(p,Ca({},b,{getOriginalState:y,condition:(S,w)=>T(S,w).then(Boolean),take:T,delay:H_(v.signal),pause:Cl(v.signal),extra:a,signal:v.signal,fork:zW(v.signal,x),unsubscribe:h.unsubscribe,subscribe:()=>{t.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((S,w,A)=>{S!==v&&(S.abort(Sp),A.delete(S))})},cancel:()=>{v.abort(Sp),h.pending.delete(v)},throwIfCancelled:()=>{Pi(v.signal)}})))}catch(S){S instanceof Hc||P1(o,S,{raisedBy:"effect"})}finally{await Promise.all(x),v.abort(UW),i(h),h.pending.delete(v)}},f=WW(t,r);return{middleware:h=>p=>b=>{if(!E_(b))return p(b);if(W_.match(b))return u(b.payload);if(VW.match(b)){f();return}if(V_.match(b))return l(b.payload);let y=h.getState();const v=()=>{if(y===O1)throw new Error(gr(23));return y};let T;try{if(T=p(b),t.size>0){const x=h.getState(),S=Array.from(t.values());for(const w of S){let A=!1;try{A=w.predicate(b,x,y)}catch(_){A=!1,P1(o,_,{raisedBy:"predicate"})}A&&c(w,b,h,v)}}}finally{y=O1}return T},startListening:u,stopListening:l,clearListeners:f}};function gr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var KW={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},Y_=$t({name:"chartLayout",initialState:KW,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,a;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(a=t.payload.left)!==null&&a!==void 0?a:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:GW,setLayout:XW,setChartSize:ZW,setScale:QW}=Y_.actions,JW=Y_.reducer;function K_(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function Te(e){return Number.isFinite(e)}function Fa(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function D1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?D1(Object(r),!0).forEach(function(n){eV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eV(e,t,r){return(t=tV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tV(e){var t=rV(e,"string");return typeof t=="symbol"?t:t+""}function rV(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lt(e,t,r){return tt(e)||tt(t)?r:jt(t)?ja(e,t,r):typeof t=="function"?t(e):r}var nV=(e,t,r)=>{if(t&&r){var{width:n,height:i}=r,{align:a,verticalAlign:o,layout:s}=t;if((s==="vertical"||s==="horizontal"&&o==="middle")&&a!=="center"&&se(e[a]))return wa(wa({},e),{},{[a]:e[a]+(n||0)});if((s==="horizontal"||s==="vertical"&&a==="center")&&o!=="middle"&&se(e[o]))return wa(wa({},e),{},{[o]:e[o]+(i||0)})}return e},Dn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",G_=(e,t,r,n)=>{if(n)return e.map(s=>s.coordinate);var i,a,o=e.map(s=>(s.coordinate===t&&(i=!0),s.coordinate===r&&(a=!0),s.coordinate));return i||o.push(t),a||o.push(r),o},X_=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:a,scale:o,realScaleType:s,isCategorical:u,categoricalDomain:l,tickCount:c,ticks:f,niceTicks:d,axisType:h}=e;if(!o)return null;var p=s==="scaleBand"&&o.bandwidth?o.bandwidth()/2:2,b=i==="category"&&o.bandwidth?o.bandwidth()/p:0;if(b=h==="angleAxis"&&a&&a.length>=2?nr(a[0]-a[1])*2*b:b,f||d){var y=(f||d||[]).map((v,T)=>{var x=n?n.indexOf(v):v,S=o.map(x);return Te(S)?{coordinate:S+b,value:v,offset:b,index:T}:null}).filter(ir);return y}return u&&l?l.map((v,T)=>{var x=o.map(v);return Te(x)?{coordinate:x+b,value:v,index:T,offset:b}:null}).filter(ir):o.ticks&&c!=null?o.ticks(c).map((v,T)=>{var x=o.map(v);return Te(x)?{coordinate:x+b,value:v,index:T,offset:b}:null}).filter(ir):o.domain().map((v,T)=>{var x=o.map(v);return Te(x)?{coordinate:x+b,value:n?n[v]:v,index:T,offset:b}:null}).filter(ir)},iV=(e,t)=>{if(!t||t.length!==2||!se(t[0])||!se(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!se(e[0])||e[0]<r)&&(i[0]=r),(!se(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},aV=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i<n;++i)for(var a=0,o=0,s=0;s<r;++s){var u=e[s],l=u?.[i];if(l!=null){var c=l[1],f=l[0],d=sn(c)?f:c;d>=0?(l[0]=a,a+=d,l[1]=a):(l[0]=o,o+=d,l[1]=o)}}}},oV=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i<n;++i)for(var a=0,o=0;o<r;++o){var s=e[o],u=s?.[i];if(u!=null){var l=sn(u[1])?u[0]:u[1];l>=0?(u[0]=a,a+=l,u[1]=a):(u[0]=0,u[1]=0)}}}},sV={sign:aV,expand:Lz,none:$i,silhouette:Mz,wiggle:jz,positive:oV},uV=(e,t,r)=>{var n,i=(n=sV[r])!==null&&n!==void 0?n:$i,a=Rz().keys(t).value((s,u)=>Number(lt(s,u,0))).order(pp).offset(i),o=a(e);return o.forEach((s,u)=>{s.forEach((l,c)=>{var f=lt(e[c],t[u],0);Array.isArray(f)&&f.length===2&&se(f[0])&&se(f[1])&&(l[0]=f[0],l[1]=f[1])})}),o};function lV(e){return e==null?void 0:String(e)}function R1(e){var{axis:t,ticks:r,bandSize:n,entry:i,index:a,dataKey:o}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!tt(i[t.dataKey])){var s=r_(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r!=null&&r[a]?r[a].coordinate+n/2:null}var u=lt(i,tt(o)?t.dataKey:o),l=t.scale.map(u);return se(l)?l:null}var L1=e=>{var{axis:t,ticks:r,offset:n,bandSize:i,entry:a,index:o}=e;if(t.type==="category")return r[o]?r[o].coordinate+n:null;var s=lt(a,t.dataKey,t.scale.domain()[o]);if(tt(s))return null;var u=t.scale.map(s);return se(u)?u-i/2+n:null},cV=e=>{var{numericAxis:t}=e,r=t.scale.domain();if(t.type==="number"){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]},fV=e=>{var t=e.flat(2).filter(se);return[Math.min(...t),Math.max(...t)]},dV=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],hV=(e,t,r)=>{if(e!=null)return dV(Object.keys(e).reduce((n,i)=>{var a=e[i];if(!a)return n;var{stackedData:o}=a,s=o.reduce((u,l)=>{var c=K_(l,t,r),f=fV(c);return!Te(f[0])||!Te(f[1])?u:[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(s[0],n[0]),Math.max(s[1],n[1])]},[1/0,-1/0]))},M1=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,j1=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,$a=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=Rc(t,c=>c.coordinate),a=1/0,o=1,s=i.length;o<s;o++){var u=i[o],l=i[o-1];a=Math.min((u?.coordinate||0)-(l?.coordinate||0),a)}return a===1/0?0:a}return r?void 0:0};function B1(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:i,name:a}=e;return wa(wa({},t),{},{dataKey:r,payload:n,value:i,name:a})}function qc(e,t){if(e)return String(e);if(typeof t=="string")return t}var pV=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},mV=(e,t)=>t==="centric"?e.angle:e.radius,Rn=e=>e.layout.width,Ln=e=>e.layout.height,gV=e=>e.layout.scale,Z_=e=>e.layout.margin,Wc=B(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Vc=B(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),bV="data-recharts-item-index",yV="data-recharts-item-id",Ks=60;function F1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Cu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?F1(Object(r),!0).forEach(function(n){vV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vV(e,t,r){return(t=xV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xV(e){var t=EV(e,"string");return typeof t=="symbol"?t:t+""}function EV(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var TV=e=>e.brush.height;function wV(e){var t=Vc(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Ks;return r+i}return r},0)}function AV(e){var t=Vc(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Ks;return r+i}return r},0)}function SV(e){var t=Wc(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function kV(e){var t=Wc(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var At=B([Rn,Ln,Z_,TV,wV,AV,SV,kV,y_,Zq],(e,t,r,n,i,a,o,s,u,l)=>{var c={left:(r.left||0)+i,right:(r.right||0)+a},f={top:(r.top||0)+o,bottom:(r.bottom||0)+s},d=Cu(Cu({},f),c),h=d.bottom;d.bottom+=n,d=nV(d,u,l);var p=e-d.left-d.right,b=t-d.top-d.bottom;return Cu(Cu({brushBottom:h},d),{},{width:Math.max(p,0),height:Math.max(b,0)})}),_V=B(At,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),x0=B(Rn,Ln,(e,t)=>({x:0,y:0,width:e,height:t})),CV=m.createContext(null),St=()=>m.useContext(CV)!=null,Yc=e=>e.brush,Kc=B([Yc,At,Z_],(e,t,r)=>({height:e.height,x:se(e.x)?e.x:t.left,y:se(e.y)?e.y:t.top+t.height+t.brushBottom-(r?.bottom||0),width:se(e.width)?e.width:t.width})),$1=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(r.replace(/%s/g,()=>i[o++]))}},IV={initialDimension:{width:-1,height:-1}},OV=m.createContext(IV.initialDimension),Q_=()=>m.useContext(OV);function E0(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Gs=()=>{var e,t=St(),r=oe(_V),n=oe(Kc),i=(e=oe(Yc))===null||e===void 0?void 0:e.padding;return!t||!n||!i?r:{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}},NV={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},J_=()=>{var e;return(e=oe(At))!==null&&e!==void 0?e:NV},eC=()=>oe(Rn),tC=()=>oe(Ln),Fe=e=>e.layout.layoutType,Qi=()=>oe(Fe),rC=()=>{var e=Qi();if(e==="horizontal"||e==="vertical")return e},nC=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},PV=()=>{var e=Qi();return e!==void 0},Xs=e=>{var t=Qe(),r=St(),{width:n,height:i}=e,a=Q_(),o=n,s=i;return a&&(o=a.width>0?a.width:n,s=a.height>0?a.height:i),m.useEffect(()=>{!r&&Fa(o)&&Fa(s)&&t(ZW({width:o,height:s}))},[t,r,o,s]),null},iC=Symbol.for("immer-nothing"),U1=Symbol.for("immer-draftable"),xr=Symbol.for("immer-state");function Mr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ys=Object.getPrototypeOf;function Ua(e){return!!e&&!!e[xr]}function Hi(e){return e?aC(e)||Array.isArray(e)||!!e[U1]||!!e.constructor?.[U1]||Zs(e)||Xc(e):!1}var DV=Object.prototype.constructor.toString(),H1=new WeakMap;function aC(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=H1.get(r);return n===void 0&&(n=Function.toString.call(r),H1.set(r,n)),n===DV}function Il(e,t,r=!0){Gc(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Gc(e){const t=e[xr];return t?t.type_:Array.isArray(e)?1:Zs(e)?2:Xc(e)?3:0}function _p(e,t){return Gc(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function oC(e,t,r){const n=Gc(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function RV(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Zs(e){return e instanceof Map}function Xc(e){return e instanceof Set}function wi(e){return e.copy_||e.base_}function Cp(e,t){if(Zs(e))return new Map(e);if(Xc(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=aC(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[xr];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const o=i[a],s=n[o];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[o]})}return Object.create(ys(e),n)}else{const n=ys(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function T0(e,t=!1){return Zc(e)||Ua(e)||!Hi(e)||(Gc(e)>1&&Object.defineProperties(e,{set:Iu,add:Iu,clear:Iu,delete:Iu}),Object.freeze(e),t&&Object.values(e).forEach(r=>T0(r,!0))),e}function LV(){Mr(2)}var Iu={value:LV};function Zc(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var MV={};function zi(e){const t=MV[e];return t||Mr(0,e),t}var vs;function sC(){return vs}function jV(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function z1(e,t){t&&(zi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ip(e){Op(e),e.drafts_.forEach(BV),e.drafts_=null}function Op(e){e===vs&&(vs=e.parent_)}function q1(e){return vs=jV(vs,e)}function BV(e){const t=e[xr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function W1(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[xr].modified_&&(Ip(t),Mr(4)),Hi(e)&&(e=Ol(t,e),t.parent_||Nl(t,e)),t.patches_&&zi("Patches").generateReplacementPatches_(r[xr].base_,e,t.patches_,t.inversePatches_)):e=Ol(t,r,[]),Ip(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==iC?e:void 0}function Ol(e,t,r){if(Zc(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[xr];if(!i)return Il(t,(a,o)=>V1(e,i,t,a,o,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return Nl(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const a=i.copy_;let o=a,s=!1;i.type_===3&&(o=new Set(a),a.clear(),s=!0),Il(o,(u,l)=>V1(e,i,a,u,l,r,s),n),Nl(e,a,!1),r&&e.patches_&&zi("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function V1(e,t,r,n,i,a,o){if(i==null||typeof i!="object"&&!o)return;const s=Zc(i);if(!(s&&!o)){if(Ua(i)){const u=a&&t&&t.type_!==3&&!_p(t.assigned_,n)?a.concat(n):void 0,l=Ol(e,i,u);if(oC(r,n,l),Ua(l))e.canAutoFreeze_=!1;else return}else o&&r.add(i);if(Hi(i)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&s)return;Ol(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Zs(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Nl(e,i)}}}function Nl(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&T0(t,r)}function FV(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:sC(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,a=w0;r&&(i=[n],a=xs);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return n.draft_=s,n.revoke_=o,s}var w0={get(e,t){if(t===xr)return e;const r=wi(e);if(!_p(r,t))return $V(e,r,t);const n=r[t];return e.finalized_||!Hi(n)?n:n===Zd(e.base_,t)?(Qd(e),e.copy_[t]=Pp(n,e)):n},has(e,t){return t in wi(e)},ownKeys(e){return Reflect.ownKeys(wi(e))},set(e,t,r){const n=uC(wi(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Zd(wi(e),t),a=i?.[xr];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(RV(r,i)&&(r!==void 0||_p(e.base_,t)))return!0;Qd(e),Np(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Zd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Qd(e),Np(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=wi(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Mr(11)},getPrototypeOf(e){return ys(e.base_)},setPrototypeOf(){Mr(12)}},xs={};Il(w0,(e,t)=>{xs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});xs.deleteProperty=function(e,t){return xs.set.call(this,e,t,void 0)};xs.set=function(e,t,r){return w0.set.call(this,e[0],t,r,e[0])};function Zd(e,t){const r=e[xr];return(r?wi(r):e)[t]}function $V(e,t,r){const n=uC(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function uC(e,t){if(!(t in e))return;let r=ys(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=ys(r)}}function Np(e){e.modified_||(e.modified_=!0,e.parent_&&Np(e.parent_))}function Qd(e){e.copy_||(e.copy_=Cp(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var UV=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const a=r;r=t;const o=this;return function(u=a,...l){return o.produce(u,c=>r.call(this,c,...l))}}typeof r!="function"&&Mr(6),n!==void 0&&typeof n!="function"&&Mr(7);let i;if(Hi(t)){const a=q1(this),o=Pp(t,void 0);let s=!0;try{i=r(o),s=!1}finally{s?Ip(a):Op(a)}return z1(a,n),W1(i,a)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===iC&&(i=void 0),this.autoFreeze_&&T0(i,!0),n){const a=[],o=[];zi("Patches").generateReplacementPatches_(t,i,a,o),n(a,o)}return i}else Mr(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(o,...s)=>this.produceWithPatches(o,u=>t(u,...s));let n,i;return[this.produce(t,r,(o,s)=>{n=o,i=s}),n,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Hi(e)||Mr(8),Ua(e)&&(e=HV(e));const t=q1(this),r=Pp(e,void 0);return r[xr].isManual_=!0,Op(t),r}finishDraft(e,t){const r=e&&e[xr];(!r||!r.isManual_)&&Mr(9);const{scope_:n}=r;return z1(n,t),W1(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=zi("Patches").applyPatches_;return Ua(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Pp(e,t){const r=Zs(e)?zi("MapSet").proxyMap_(e,t):Xc(e)?zi("MapSet").proxySet_(e,t):FV(e,t);return(t?t.scope_:sC()).drafts_.push(r),r}function HV(e){return Ua(e)||Mr(10,e),lC(e)}function lC(e){if(!Hi(e)||Zc(e))return e;const t=e[xr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Cp(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Cp(e,!0);return Il(r,(i,a)=>{oC(r,i,lC(a))},n),t&&(t.finalized_=!1),r}var zV=new UV;zV.produce;var qV={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},cC=$t({name:"legend",initialState:qV,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:Xe()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:n}=t.payload,i=Cr(e).payload.indexOf(r);i>-1&&(e.payload[i]=n)},prepare:Xe()},removeLegendPayload:{reducer(e,t){var r=Cr(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:Xe()}}}),{setLegendSize:Vue,setLegendSettings:Yue,addLegendPayload:WV,replaceLegendPayload:VV,removeLegendPayload:YV}=cC.actions,KV=cC.reducer,Jd={exports:{}},eh={};var Y1;function GV(){if(Y1)return eh;Y1=1;var e=cm();function t(u,l){return u===l&&(u!==0||1/u===1/l)||u!==u&&l!==l}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,s=e.useDebugValue;return eh.useSyncExternalStoreWithSelector=function(u,l,c,f,d){var h=i(null);if(h.current===null){var p={hasValue:!1,value:null};h.current=p}else p=h.current;h=o(function(){function y(w){if(!v){if(v=!0,T=w,w=f(w),d!==void 0&&p.hasValue){var A=p.value;if(d(A,w))return x=A}return x=w}if(A=x,r(T,w))return A;var _=f(w);return d!==void 0&&d(A,_)?(T=w,A):(T=w,x=_)}var v=!1,T,x,S=c===void 0?null:c;return[function(){return y(l())},S===null?void 0:function(){return y(S())}]},[l,c,f,d]);var b=n(u,h[0],h[1]);return a(function(){p.hasValue=!0,p.value=b},[b]),s(b),b},eh}var K1;function XV(){return K1||(K1=1,Jd.exports=GV()),Jd.exports}XV();function ZV(e){e()}function QV(){let e=null,t=null;return{clear(){e=null,t=null},notify(){ZV(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var G1={notify(){},get:()=>[]};function JV(e,t){let r,n=G1,i=0,a=!1;function o(b){c();const y=n.subscribe(b);let v=!1;return()=>{v||(v=!0,y(),f())}}function s(){n.notify()}function u(){p.onStateChange&&p.onStateChange()}function l(){return a}function c(){i++,r||(r=e.subscribe(u),n=QV())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=G1)}function d(){a||(a=!0,c())}function h(){a&&(a=!1,f())}const p={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:l,trySubscribe:d,tryUnsubscribe:h,getListeners:()=>n};return p}var eY=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",tY=eY(),rY=()=>typeof navigator<"u"&&navigator.product==="ReactNative",nY=rY(),iY=()=>tY||nY?m.useLayoutEffect:m.useEffect,aY=iY();function X1(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function oY(e,t){if(X1(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++)if(!Object.prototype.hasOwnProperty.call(t,r[i])||!X1(e[r[i]],t[r[i]]))return!1;return!0}var sY=Symbol.for("react-redux-context"),uY=typeof globalThis<"u"?globalThis:{};function lY(){if(!m.createContext)return{};const e=uY[sY]??=new Map;let t=e.get(m.createContext);return t||(t=m.createContext(null),e.set(m.createContext,t)),t}var cY=lY();function fY(e){const{children:t,context:r,serverState:n,store:i}=e,a=m.useMemo(()=>{const u=JV(i);return{store:i,subscription:u,getServerState:n?()=>n:void 0}},[i,n]),o=m.useMemo(()=>i.getState(),[i]);aY(()=>{const{subscription:u}=a;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),o!==i.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[a,o]);const s=r||cY;return m.createElement(s.Provider,{value:a},t)}var dY=fY,hY=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function pY(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Qs(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(hY.has(n)){if(e[n]==null&&t[n]==null)continue;if(!oY(e[n],t[n]))return!1}else if(!pY(e[n],t[n]))return!1;return!0}function Dp(){return Dp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dp.apply(null,arguments)}function Z1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Eo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Z1(Object(r),!0).forEach(function(n){mY(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mY(e,t,r){return(t=gY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gY(e){var t=bY(e,"string");return typeof t=="symbol"?t:t+""}function bY(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yY(e){return Array.isArray(e)&&jt(e[0])&&jt(e[1])?e.join(" ~ "):e}var ca={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function vY(e,t){return t==null?e:Rc(e,t)}var xY=e=>{var{separator:t=ca.separator,contentStyle:r,itemStyle:n,labelStyle:i=ca.labelStyle,payload:a,formatter:o,itemSorter:s,wrapperClassName:u,labelClassName:l,label:c,labelFormatter:f,accessibilityLayer:d=ca.accessibilityLayer}=e,h=()=>{if(a&&a.length){var w={padding:0,margin:0},A=vY(a,s),_=A.map((O,R)=>{if(!O||O.type==="none")return null;var C=O.formatter||o||yY,{value:M,name:L}=O,Q=M,H=L;if(C){var U=C(M,L,O,R,a);if(Array.isArray(U))[Q,H]=U;else if(U!=null)Q=U;else return null}var q=Eo(Eo({},ca.itemStyle),{},{color:O.color||ca.itemStyle.color},n);return m.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(R),style:q},jt(H)?m.createElement("span",{className:"recharts-tooltip-item-name"},H):null,jt(H)?m.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,m.createElement("span",{className:"recharts-tooltip-item-value"},Q),m.createElement("span",{className:"recharts-tooltip-item-unit"},O.unit||""))});return m.createElement("ul",{className:"recharts-tooltip-item-list",style:w},_)}return null},p=Eo(Eo({},ca.contentStyle),r),b=Eo({margin:0},i),y=!tt(c),v=y?c:"",T=Le("recharts-default-tooltip",u),x=Le("recharts-tooltip-label",l);y&&f&&a!==void 0&&a!==null&&(v=f(c,a));var S=d?{role:"status","aria-live":"assertive"}:{};return m.createElement("div",Dp({className:T,style:p},S),m.createElement("p",{className:x,style:b},m.isValidElement(v)?v:"".concat(v)),h())},To="recharts-tooltip-wrapper",EY={visibility:"hidden"};function TY(e){var{coordinate:t,translateX:r,translateY:n}=e;return Le(To,{["".concat(To,"-right")]:se(r)&&t&&se(t.x)&&r>=t.x,["".concat(To,"-left")]:se(r)&&t&&se(t.x)&&r<t.x,["".concat(To,"-bottom")]:se(n)&&t&&se(t.y)&&n>=t.y,["".concat(To,"-top")]:se(n)&&t&&se(t.y)&&n<t.y})}function Q1(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offset:i,position:a,reverseDirection:o,tooltipDimension:s,viewBox:u,viewBoxDimension:l}=e;if(a&&se(a[n]))return a[n];var c=r[n]-s-(i>0?i:0),f=r[n]+i;if(t[n])return o[n]?c:f;var d=u[n];if(d==null)return 0;if(o[n]){var h=c,p=d;return h<p?Math.max(f,d):Math.max(c,d)}if(l==null)return 0;var b=f+s,y=d+l;return b>y?Math.max(c,d):Math.max(f,d)}function wY(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function AY(e){var{allowEscapeViewBox:t,coordinate:r,offsetTop:n,offsetLeft:i,position:a,reverseDirection:o,tooltipBox:s,useTranslate3d:u,viewBox:l}=e,c,f,d;return s.height>0&&s.width>0&&r?(f=Q1({allowEscapeViewBox:t,coordinate:r,key:"x",offset:i,position:a,reverseDirection:o,tooltipDimension:s.width,viewBox:l,viewBoxDimension:l.width}),d=Q1({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:a,reverseDirection:o,tooltipDimension:s.height,viewBox:l,viewBoxDimension:l.height}),c=wY({translateX:f,translateY:d,useTranslate3d:u})):c=EY,{cssProperties:c,cssClasses:TY({translateX:f,translateY:d,coordinate:r})}}var SY=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Js={isSsr:SY()};function fC(){var[e,t]=m.useState(()=>Js.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return m.useEffect(()=>{if(window.matchMedia){var r=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>{t(r.matches)};return r.addEventListener("change",n),()=>{r.removeEventListener("change",n)}}},[]),e}function J1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?J1(Object(r),!0).forEach(function(n){kY(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kY(e,t,r){return(t=_Y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _Y(e){var t=CY(e,"string");return typeof t=="symbol"?t:t+""}function CY(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function IY(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function OY(e){var t,r,n,i,a,o,s=fC(),[u,l]=m.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));m.useEffect(()=>{var p=b=>{if(b.key==="Escape"){var y,v,T,x;l({dismissed:!0,dismissedAtCoordinate:{x:(y=(v=e.coordinate)===null||v===void 0?void 0:v.x)!==null&&y!==void 0?y:0,y:(T=(x=e.coordinate)===null||x===void 0?void 0:x.y)!==null&&T!==void 0?T:0}})}};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),u.dismissed&&(((n=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)!==u.dismissedAtCoordinate.x||((a=(o=e.coordinate)===null||o===void 0?void 0:o.y)!==null&&a!==void 0?a:0)!==u.dismissedAtCoordinate.y)&&l(fa(fa({},u),{},{dismissed:!1}));var{cssClasses:c,cssProperties:f}=AY({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),d=e.hasPortalFromProps?{}:fa(fa({transition:IY({prefersReducedMotion:s,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},f),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),h=fa(fa({},d),{},{visibility:!u.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return m.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:c,style:h,ref:e.innerRef},e.children)}var NY=m.memo(OY),dC=()=>{var e;return(e=oe(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Rp(){return Rp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rp.apply(null,arguments)}function ex(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ex(Object(r),!0).forEach(function(n){PY(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ex(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function PY(e,t,r){return(t=DY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DY(e){var t=RY(e,"string");return typeof t=="symbol"?t:t+""}function RY(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rx={curveBasisClosed:wz,curveBasisOpen:Az,curveBasis:Tz,curveBumpX:uz,curveBumpY:lz,curveLinearClosed:Sz,curveLinear:Pc,curveMonotoneX:kz,curveMonotoneY:_z,curveNatural:Cz,curveStep:Iz,curveStepAfter:Nz,curveStepBefore:Oz},Pl=e=>Te(e.x)&&Te(e.y),nx=e=>e.base!=null&&Pl(e.base)&&Pl(e),wo=e=>e.x,Ao=e=>e.y,LY=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(Ws(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=rx["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return rx[r]||Pc},ix={connectNulls:!1,type:"linear"},MY=e=>{var{type:t=ix.type,points:r=[],baseLine:n,layout:i,connectNulls:a=ix.connectNulls}=e,o=LY(t,i),s=a?r.filter(Pl):r;if(Array.isArray(n)){var u,l=r.map((p,b)=>tx(tx({},p),{},{base:n[b]}));i==="vertical"?u=Tu().y(Ao).x1(wo).x0(p=>p.base.x):u=Tu().x(wo).y1(Ao).y0(p=>p.base.y);var c=u.defined(nx).curve(o),f=a?l.filter(nx):l;return c(f)}var d;i==="vertical"&&se(n)?d=Tu().y(Ao).x1(wo).x0(n):se(n)?d=Tu().x(wo).y1(Ao).y0(n):d=z2().x(wo).y(Ao);var h=d.defined(Pl).curve(o);return h(s)},hC=e=>{var{className:t,points:r,path:n,pathRef:i}=e,a=Qi();if((!r||!r.length)&&!n)return null;var o={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||a,connectNulls:e.connectNulls},s=r&&r.length?MY(o):n;return m.createElement("path",Rp({},Fr(e),c0(e),{className:Le("recharts-curve",t),d:s===null?void 0:s,ref:i}))},jY=["x","y","top","left","width","height","className"];function Lp(){return Lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Lp.apply(null,arguments)}function ax(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function BY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ax(Object(r),!0).forEach(function(n){FY(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ax(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FY(e,t,r){return(t=$Y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $Y(e){var t=UY(e,"string");return typeof t=="symbol"?t:t+""}function UY(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HY(e,t){if(e==null)return{};var r,n,i=zY(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function zY(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var qY=(e,t,r,n,i,a)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(a,",").concat(t,"h").concat(r),WY=e=>{var{x:t=0,y:r=0,top:n=0,left:i=0,width:a=0,height:o=0,className:s}=e,u=HY(e,jY),l=BY({x:t,y:r,top:n,left:i,width:a,height:o},u);return!se(t)||!se(r)||!se(a)||!se(o)||!se(n)||!se(i)?null:m.createElement("path",Lp({},Pt(l),{className:Le("recharts-cross",s),d:qY(t,r,a,o,n,i)}))};function VY(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function ox(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function sx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ox(Object(r),!0).forEach(function(n){YY(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ox(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function YY(e,t,r){return(t=KY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KY(e){var t=GY(e,"string");return typeof t=="symbol"?t:t+""}function GY(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var XY=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),pC=(e,t,r)=>e.map(n=>"".concat(XY(n)," ").concat(t,"ms ").concat(r)).join(","),ZY=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(i=>n.includes(i))),Es=(e,t)=>Object.keys(t).reduce((r,n)=>sx(sx({},r),{},{[n]:e(n,t[n])}),{});function ux(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ux(Object(r),!0).forEach(function(n){QY(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ux(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QY(e,t,r){return(t=JY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JY(e){var t=eK(e,"string");return typeof t=="symbol"?t:t+""}function eK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Dl=(e,t,r)=>e+(t-e)*r,Mp=e=>{var{from:t,to:r}=e;return t!==r},mC=(e,t,r)=>{var n=Es((i,a)=>{if(Mp(a)){var[o,s]=e(a.from,a.to,a.velocity);return gt(gt({},a),{},{from:o,velocity:s})}return a},t);return r<1?Es((i,a)=>Mp(a)&&n[i]!=null?gt(gt({},a),{},{velocity:Dl(a.velocity,n[i].velocity,r),from:Dl(a.from,n[i].from,r)}):a,t):mC(e,n,r-1)};function tK(e,t,r,n,i,a){var o,s=n.reduce((d,h)=>gt(gt({},d),{},{[h]:{from:e[h],velocity:0,to:t[h]}}),{}),u=()=>Es((d,h)=>h.from,s),l=()=>!Object.values(s).filter(Mp).length,c=null,f=d=>{o||(o=d);var h=d-o,p=h/r.dt;s=mC(r,s,p),i(gt(gt(gt({},e),t),u())),o=d,l()||(c=a.setTimeout(f))};return()=>(c=a.setTimeout(f),()=>{var d;(d=c)===null||d===void 0||d()})}function rK(e,t,r,n,i,a,o){var s=null,u=i.reduce((f,d)=>{var h=e[d],p=t[d];return h==null||p==null?f:gt(gt({},f),{},{[d]:[h,p]})},{}),l,c=f=>{l||(l=f);var d=(f-l)/n,h=Es((b,y)=>Dl(...y,r(d)),u);if(a(gt(gt(gt({},e),t),h)),d<1)s=o.setTimeout(c);else{var p=Es((b,y)=>Dl(...y,r(1)),u);a(gt(gt(gt({},e),t),p))}};return()=>(s=o.setTimeout(c),()=>{var f;(f=s)===null||f===void 0||f()})}const nK=(e,t,r,n,i,a)=>{var o=ZY(e,t);return r==null?()=>(i(gt(gt({},e),t)),()=>{}):r.isStepper===!0?tK(e,t,r,o,i,a):rK(e,t,r,n,o,i,a)};var Rl=1e-4,gC=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],bC=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),lx=(e,t)=>r=>{var n=gC(e,t);return bC(n,r)},iK=(e,t)=>r=>{var n=gC(e,t),i=[...n.map((a,o)=>a*o).slice(1),0];return bC(i,r)},aK=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var i=n.map(a=>parseFloat(a));return[i[0],i[1],i[2],i[3]]},oK=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length===1)switch(r[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var i=aK(r[0]);if(i)return i}}return r.length===4?r:[0,0,1,1]},sK=(e,t,r,n)=>{var i=lx(e,r),a=lx(t,n),o=iK(e,r),s=l=>l>1?1:l<0?0:l,u=l=>{for(var c=l>1?1:l,f=c,d=0;d<8;++d){var h=i(f)-c,p=o(f);if(Math.abs(h-c)<Rl||p<Rl)return a(f);f=s(f-h/p)}return a(f)};return u.isStepper=!1,u},cx=function(){return sK(...oK(...arguments))},uK=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:i=17}=t,a=(o,s,u)=>{var l=-(o-s)*r,c=u*n,f=u+(l-c)*i/1e3,d=u*i/1e3+o;return Math.abs(d-s)<Rl&&Math.abs(f)<Rl?[s,0]:[d,f]};return a.isStepper=!0,a.dt=i,a},lK=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return cx(e);case"spring":return uK();default:if(e.split("(")[0]==="cubic-bezier")return cx(e)}return typeof e=="function"?e:null};function cK(e){var t,r=()=>null,n=!1,i=null,a=o=>{if(!n){if(Array.isArray(o)){if(!o.length)return;var s=o,[u,...l]=s;if(typeof u=="number"){i=e.setTimeout(a.bind(null,l),u);return}a(u),i=e.setTimeout(a.bind(null,l));return}typeof o=="string"&&(t=o,r(t)),typeof o=="object"&&(t=o,r(t)),typeof o=="function"&&o()}};return{stop:()=>{n=!0},start:o=>{n=!1,i&&(i(),i=null),a(o)},subscribe:o=>(r=o,()=>{r=()=>null}),getTimeoutController:()=>e}}class fK{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,a=o=>{o-n>=r?t(o):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(a))};return i=requestAnimationFrame(a),()=>{i!=null&&cancelAnimationFrame(i)}}}function dK(){return cK(new fK)}var hK=m.createContext(dK);function pK(e,t){var r=m.useContext(hK);return m.useMemo(()=>t??r(e),[e,t,r])}var mK={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},fx={t:0},th={t:1};function Qc(e){var t=Dt(e,mK),{isActive:r,canBegin:n,duration:i,easing:a,begin:o,onAnimationEnd:s,onAnimationStart:u,children:l}=t,c=fC(),f=r==="auto"?!Js.isSsr&&!c:r,d=pK(t.animationId,t.animationManager),[h,p]=m.useState(f?fx:th),b=m.useRef(null);return m.useEffect(()=>{f||p(th)},[f]),m.useEffect(()=>{if(!f||!n)return eo;var y=nK(fx,th,lK(a),i,p,d.getTimeoutController()),v=()=>{b.current=y()};return d.start([u,o,v,i,s]),()=>{d.stop(),b.current&&b.current(),s()}},[f,n,i,a,o,u,s,d]),l(h.t)}function Jc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=m.useRef(ps(t)),n=m.useRef(e);return n.current!==e&&(r.current=ps(t),n.current=e),r.current}var gK=["radius"],bK=["radius"],dx,hx,px,mx,gx,bx,yx,vx,xx,Ex;function Tx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tx(Object(r),!0).forEach(function(n){yK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yK(e,t,r){return(t=vK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vK(e){var t=xK(e,"string");return typeof t=="symbol"?t:t+""}function xK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ll(){return Ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ll.apply(null,arguments)}function Ax(e,t){if(e==null)return{};var r,n,i=EK(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function EK(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Yr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Sx=(e,t,r,n,i)=>{var a=Zn(r),o=Zn(n),s=Math.min(Math.abs(a)/2,Math.abs(o)/2),u=o>=0?1:-1,l=a>=0?1:-1,c=o>=0&&a>=0||o<0&&a<0?1:0,f;if(s>0&&Array.isArray(i)){for(var d=[0,0,0,0],h=0,p=4;h<p;h++){var b,y=(b=i[h])!==null&&b!==void 0?b:0;d[h]=y>s?s:y}f=it(dx||(dx=Yr(["M",",",""])),e,t+u*d[0]),d[0]>0&&(f+=it(hx||(hx=Yr(["A ",",",",0,0,",",",",",""])),d[0],d[0],c,e+l*d[0],t)),f+=it(px||(px=Yr(["L ",",",""])),e+r-l*d[1],t),d[1]>0&&(f+=it(mx||(mx=Yr(["A ",",",",0,0,",`,
164
+ `,",",""])),d[1],d[1],c,e+r,t+u*d[1])),f+=it(gx||(gx=Yr(["L ",",",""])),e+r,t+n-u*d[2]),d[2]>0&&(f+=it(bx||(bx=Yr(["A ",",",",0,0,",`,
165
+ `,",",""])),d[2],d[2],c,e+r-l*d[2],t+n)),f+=it(yx||(yx=Yr(["L ",",",""])),e+l*d[3],t+n),d[3]>0&&(f+=it(vx||(vx=Yr(["A ",",",",0,0,",`,
166
+ `,",",""])),d[3],d[3],c,e,t+n-u*d[3])),f+="Z"}else if(s>0&&i===+i&&i>0){var v=Math.min(s,i);f=it(xx||(xx=Yr(["M ",",",`
167
+ A `,",",",0,0,",",",",",`
168
+ L `,",",`
169
+ A `,",",",0,0,",",",",",`
170
+ L `,",",`
171
+ A `,",",",0,0,",",",",",`
172
+ L `,",",`
173
+ A `,",",",0,0,",",",","," Z"])),e,t+u*v,v,v,c,e+l*v,t,e+r-l*v,t,v,v,c,e+r,t+u*v,e+r,t+n-u*v,v,v,c,e+r-l*v,t+n,e+l*v,t+n,v,v,c,e,t+n-u*v)}else f=it(Ex||(Ex=Yr(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return f},kx={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},A0=e=>{var t=Dt(e,kx),r=m.useRef(null),[n,i]=m.useState(-1);m.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var J=r.current.getTotalLength();J&&i(J)}catch{}},[]);var{x:a,y:o,width:s,height:u,radius:l,className:c}=t,{animationEasing:f,animationDuration:d,animationBegin:h,isAnimationActive:p,isUpdateAnimationActive:b}=t,y=m.useRef(s),v=m.useRef(u),T=m.useRef(a),x=m.useRef(o),S=m.useMemo(()=>({x:a,y:o,width:s,height:u,radius:l}),[a,o,s,u,l]),w=Jc(S,"rectangle-");if(a!==+a||o!==+o||s!==+s||u!==+u||s===0||u===0)return null;var A=Le("recharts-rectangle",c);if(!b){var _=Pt(t),{radius:O}=_,R=Ax(_,gK);return m.createElement("path",Ll({},R,{x:Zn(a),y:Zn(o),width:Zn(s),height:Zn(u),radius:typeof l=="number"?l:void 0,className:A,d:Sx(a,o,s,u,l)}))}var C=y.current,M=v.current,L=T.current,Q=x.current,H="0px ".concat(n===-1?1:n,"px"),U="".concat(n,"px ").concat(n,"px"),q=pC(["strokeDasharray"],d,typeof f=="string"?f:kx.animationEasing);return m.createElement(Qc,{animationId:w,key:w,canBegin:n>0,duration:d,easing:f,isActive:b,begin:h},J=>{var V=at(C,s,J),re=at(M,u,J),P=at(L,a,J),le=at(Q,o,J);r.current&&(y.current=V,v.current=re,T.current=P,x.current=le);var he;p?J>0?he={transition:q,strokeDasharray:U}:he={strokeDasharray:H}:he={strokeDasharray:U};var N=Pt(t),{radius:pe}=N,we=Ax(N,bK);return m.createElement("path",Ll({},we,{radius:typeof l=="number"?l:void 0,className:A,d:Sx(P,le,V,re,l),ref:r,style:wx(wx({},he),t.style)}))})};function _x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Cx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_x(Object(r),!0).forEach(function(n){TK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_x(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TK(e,t,r){return(t=wK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wK(e){var t=AK(e,"string");return typeof t=="symbol"?t:t+""}function AK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ml=Math.PI/180,SK=e=>e*180/Math.PI,Nt=(e,t,r,n)=>({x:e+Math.cos(-Ml*n)*r,y:t+Math.sin(-Ml*n)*r}),kK=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},_K=(e,t)=>{var{x:r,y:n}=e,{x:i,y:a}=t;return Math.sqrt((r-i)**2+(n-a)**2)},CK=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:a}=t,o=_K({x:r,y:n},{x:i,y:a});if(o<=0)return{radius:o,angle:0};var s=(r-i)/o,u=Math.acos(s);return n>a&&(u=2*Math.PI-u),{radius:o,angle:SK(u),angleInRadian:u}},IK=e=>{var{startAngle:t,endAngle:r}=e,n=Math.floor(t/360),i=Math.floor(r/360),a=Math.min(n,i);return{startAngle:t-a*360,endAngle:r-a*360}},OK=(e,t)=>{var{startAngle:r,endAngle:n}=t,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return e+o*360},NK=(e,t)=>{var{relativeX:r,relativeY:n}=e,{radius:i,angle:a}=CK({x:r,y:n},t),{innerRadius:o,outerRadius:s}=t;if(i<o||i>s||i===0)return null;var{startAngle:u,endAngle:l}=IK(t),c=a,f;if(u<=l){for(;c>l;)c-=360;for(;c<u;)c+=360;f=c>=u&&c<=l}else{for(;c>u;)c-=360;for(;c<l;)c+=360;f=c>=l&&c<=u}return f?Cx(Cx({},t),{},{radius:i,angle:OK(c,t)}):null};function yC(e){var{cx:t,cy:r,radius:n,startAngle:i,endAngle:a}=e,o=Nt(t,r,n,i),s=Nt(t,r,n,a);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}var Ix,Ox,Nx,Px,Dx,Rx,Lx;function jp(){return jp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jp.apply(null,arguments)}function _i(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var PK=(e,t)=>{var r=nr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},Ou=e=>{var{cx:t,cy:r,radius:n,angle:i,sign:a,isExternal:o,cornerRadius:s,cornerIsExternal:u}=e,l=s*(o?1:-1)+n,c=Math.asin(s/l)/Ml,f=u?i:i+a*c,d=Nt(t,r,l,f),h=Nt(t,r,n,f),p=u?i-a*c:i,b=Nt(t,r,l*Math.cos(c*Ml),p);return{center:d,circleTangency:h,lineTangency:b,theta:c}},vC=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:a,endAngle:o}=e,s=PK(a,o),u=a+s,l=Nt(t,r,i,a),c=Nt(t,r,i,u),f=it(Ix||(Ix=_i(["M ",",",`
174
+ A `,",",`,0,
175
+ `,",",`,
176
+ `,",",`
177
+ `])),l.x,l.y,i,i,+(Math.abs(s)>180),+(a>u),c.x,c.y);if(n>0){var d=Nt(t,r,n,a),h=Nt(t,r,n,u);f+=it(Ox||(Ox=_i(["L ",",",`
178
+ A `,",",`,0,
179
+ `,",",`,
180
+ `,","," Z"])),h.x,h.y,n,n,+(Math.abs(s)>180),+(a<=u),d.x,d.y)}else f+=it(Nx||(Nx=_i(["L ",","," Z"])),t,r);return f},DK=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,cornerRadius:a,forceCornerRadius:o,cornerIsExternal:s,startAngle:u,endAngle:l}=e,c=nr(l-u),{circleTangency:f,lineTangency:d,theta:h}=Ou({cx:t,cy:r,radius:i,angle:u,sign:c,cornerRadius:a,cornerIsExternal:s}),{circleTangency:p,lineTangency:b,theta:y}=Ou({cx:t,cy:r,radius:i,angle:l,sign:-c,cornerRadius:a,cornerIsExternal:s}),v=s?Math.abs(u-l):Math.abs(u-l)-h-y;if(v<0)return o?it(Px||(Px=_i(["M ",",",`
181
+ a`,",",",0,0,1,",`,0
182
+ a`,",",",0,0,1,",`,0
183
+ `])),d.x,d.y,a,a,a*2,a,a,-a*2):vC({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:u,endAngle:l});var T=it(Dx||(Dx=_i(["M ",",",`
184
+ A`,",",",0,0,",",",",",`
185
+ A`,",",",0,",",",",",",",`
186
+ A`,",",",0,0,",",",",",`
187
+ `])),d.x,d.y,a,a,+(c<0),f.x,f.y,i,i,+(v>180),+(c<0),p.x,p.y,a,a,+(c<0),b.x,b.y);if(n>0){var{circleTangency:x,lineTangency:S,theta:w}=Ou({cx:t,cy:r,radius:n,angle:u,sign:c,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),{circleTangency:A,lineTangency:_,theta:O}=Ou({cx:t,cy:r,radius:n,angle:l,sign:-c,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),R=s?Math.abs(u-l):Math.abs(u-l)-w-O;if(R<0&&a===0)return"".concat(T,"L").concat(t,",").concat(r,"Z");T+=it(Rx||(Rx=_i(["L",",",`
188
+ A`,",",",0,0,",",",",",`
189
+ A`,",",",0,",",",",",",",`
190
+ A`,",",",0,0,",",",",","Z"])),_.x,_.y,a,a,+(c<0),A.x,A.y,n,n,+(R>180),+(c>0),x.x,x.y,a,a,+(c<0),S.x,S.y)}else T+=it(Lx||(Lx=_i(["L",",","Z"])),t,r);return T},RK={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},xC=e=>{var t=Dt(e,RK),{cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:o,forceCornerRadius:s,cornerIsExternal:u,startAngle:l,endAngle:c,className:f}=t;if(a<i||l===c)return null;var d=Le("recharts-sector",f),h=a-i,p=$r(o,h,0,!0),b;return p>0&&Math.abs(l-c)<360?b=DK({cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:Math.min(p,h/2),forceCornerRadius:s,cornerIsExternal:u,startAngle:l,endAngle:c}):b=vC({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:l,endAngle:c}),m.createElement("path",jp({},Pt(t),{className:d,d:b}))};function LK(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(a_(t)){if(e==="centric"){var{cx:n,cy:i,innerRadius:a,outerRadius:o,angle:s}=t,u=Nt(n,i,a,s),l=Nt(n,i,o,s);return[{x:u.x,y:u.y},{x:l.x,y:l.y}]}return yC(t)}}var rh={},nh={},ih={},Mx;function MK(){return Mx||(Mx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=g_();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(ih)),ih}var jx;function jK(){return jx||(jx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MK();function r(n){return n?(n=t.toNumber(n),n===1/0||n===-1/0?(n<0?-1:1)*Number.MAX_VALUE:n===n?n:0):n===0?n:0}e.toFinite=r})(nh)),nh}var Bx;function BK(){return Bx||(Bx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=b_(),r=jK();function n(i,a,o){o&&typeof o!="number"&&t.isIterateeCall(i,a,o)&&(a=o=void 0),i=r.toFinite(i),a===void 0?(a=i,i=0):a=r.toFinite(a),o=o===void 0?i<a?1:-1:r.toFinite(o);const s=Math.max(Math.ceil((a-i)/(o||1)),0),u=new Array(s);for(let l=0;l<s;l++)u[l]=i,i+=o;return u}e.range=n})(rh)),rh}var ah,Fx;function FK(){return Fx||(Fx=1,ah=BK().range),ah}var $K=FK();const EC=On($K);var Wr=e=>e.chartData,S0=B([Wr],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),eu=(e,t,r,n)=>n?S0(e):Wr(e),UK=(e,t,r)=>r?S0(e):Wr(e),HK=B([eu],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});B([S0],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});var zK=B([Wr],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});function tn(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(Te(t)&&Te(r))return!0}return!1}function $x(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function TC(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,i,a;if(Te(r))i=r;else if(typeof r=="function")return;if(Te(n))a=n;else if(typeof n=="function")return;var o=[i,a];if(tn(o))return o}}function qK(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(tn(n))return $x(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[i,a]=e,o,s;if(i==="auto")t!=null&&(o=Math.min(...t));else if(se(i))o=i;else if(typeof i=="function")try{t!=null&&(o=i(t?.[0]))}catch{}else if(typeof i=="string"&&M1.test(i)){var u=M1.exec(i);if(u==null||u[1]==null||t==null)o=void 0;else{var l=+u[1];o=t[0]-l}}else o=t?.[0];if(a==="auto")t!=null&&(s=Math.max(...t));else if(se(a))s=a;else if(typeof a=="function")try{t!=null&&(s=a(t?.[1]))}catch{}else if(typeof a=="string"&&j1.test(a)){var c=j1.exec(a);if(c==null||c[1]==null||t==null)s=void 0;else{var f=+c[1];s=t[1]+f}}else s=t?.[1];var d=[o,s];if(tn(d))return t==null?d:$x(d,t,r)}}}var to=1e9,WK={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},_0,et=!0,Or="[DecimalError] ",Di=Or+"Invalid argument: ",k0=Or+"Exponent out of range: ",ro=Math.floor,Ai=Math.pow,VK=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,hr,Tt=1e7,Ze=7,wC=9007199254740991,jl=ro(wC/Ze),ne={};ne.absoluteValue=ne.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};ne.comparedTo=ne.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};ne.decimalPlaces=ne.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Ze;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};ne.dividedBy=ne.div=function(e){return An(this,new this.constructor(e))};ne.dividedToIntegerBy=ne.idiv=function(e){var t=this,r=t.constructor;return qe(An(t,new r(e),0,1),r.precision)};ne.equals=ne.eq=function(e){return!this.cmp(e)};ne.exponent=function(){return dt(this)};ne.greaterThan=ne.gt=function(e){return this.cmp(e)>0};ne.greaterThanOrEqualTo=ne.gte=function(e){return this.cmp(e)>=0};ne.isInteger=ne.isint=function(){return this.e>this.d.length-2};ne.isNegative=ne.isneg=function(){return this.s<0};ne.isPositive=ne.ispos=function(){return this.s>0};ne.isZero=function(){return this.s===0};ne.lessThan=ne.lt=function(e){return this.cmp(e)<0};ne.lessThanOrEqualTo=ne.lte=function(e){return this.cmp(e)<1};ne.logarithm=ne.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(hr))throw Error(Or+"NaN");if(r.s<1)throw Error(Or+(r.s?"NaN":"-Infinity"));return r.eq(hr)?new n(0):(et=!1,t=An(Ts(r,a),Ts(e,a),a),et=!0,qe(t,i))};ne.minus=ne.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?kC(t,e):AC(t,(e.s=-e.s,e))};ne.modulo=ne.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Or+"NaN");return r.s?(et=!1,t=An(r,e,0,1).times(e),et=!0,r.minus(t)):qe(new n(r),i)};ne.naturalExponential=ne.exp=function(){return SC(this)};ne.naturalLogarithm=ne.ln=function(){return Ts(this)};ne.negated=ne.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ne.plus=ne.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?AC(t,e):kC(t,(e.s=-e.s,e))};ne.precision=ne.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Di+e);if(t=dt(i)+1,n=i.d.length-1,r=n*Ze+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};ne.squareRoot=ne.sqrt=function(){var e,t,r,n,i,a,o,s=this,u=s.constructor;if(s.s<1){if(!s.s)return new u(0);throw Error(Or+"NaN")}for(e=dt(s),et=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=en(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=ro((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new u(t)):n=new u(i.toString()),r=u.precision,i=o=r+3;;)if(a=n,n=a.plus(An(s,a,o+2)).times(.5),en(a.d).slice(0,o)===(t=en(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(qe(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return et=!0,qe(n,r)};ne.times=ne.mul=function(e){var t,r,n,i,a,o,s,u,l,c=this,f=c.constructor,d=c.d,h=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,r=c.e+e.e,u=d.length,l=h.length,u<l&&(a=d,d=h,h=a,o=u,u=l,l=o),a=[],o=u+l,n=o;n--;)a.push(0);for(n=l;--n>=0;){for(t=0,i=u+n;i>n;)s=a[i]+h[n]*d[i-n-1]+t,a[i--]=s%Tt|0,t=s/Tt|0;a[i]=(a[i]+t)%Tt|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,et?qe(e,f.precision):e};ne.toDecimalPlaces=ne.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(un(e,0,to),t===void 0?t=n.rounding:un(t,0,8),qe(r,e+dt(r)+1,t))};ne.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=qi(n,!0):(un(e,0,to),t===void 0?t=i.rounding:un(t,0,8),n=qe(new i(n),e+1,t),r=qi(n,!0,e+1)),r};ne.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?qi(i):(un(e,0,to),t===void 0?t=a.rounding:un(t,0,8),n=qe(new a(i),e+dt(i)+1,t),r=qi(n.abs(),!1,e+dt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};ne.toInteger=ne.toint=function(){var e=this,t=e.constructor;return qe(new t(e),dt(e)+1,t.rounding)};ne.toNumber=function(){return+this};ne.toPower=ne.pow=function(e){var t,r,n,i,a,o,s=this,u=s.constructor,l=12,c=+(e=new u(e));if(!e.s)return new u(hr);if(s=new u(s),!s.s){if(e.s<1)throw Error(Or+"Infinity");return s}if(s.eq(hr))return s;if(n=u.precision,e.eq(hr))return qe(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=c<0?-c:c)<=wC){for(i=new u(hr),t=Math.ceil(n/Ze+4),et=!1;r%2&&(i=i.times(s),Hx(i.d,t)),r=ro(r/2),r!==0;)s=s.times(s),Hx(s.d,t);return et=!0,e.s<0?new u(hr).div(i):qe(i,n)}}else if(a<0)throw Error(Or+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,et=!1,i=e.times(Ts(s,n+l)),et=!0,i=SC(i),i.s=a,i};ne.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=dt(i),n=qi(i,r<=a.toExpNeg||r>=a.toExpPos)):(un(e,1,to),t===void 0?t=a.rounding:un(t,0,8),i=qe(new a(i),e,t),r=dt(i),n=qi(i,e<=r||r<=a.toExpNeg,e)),n};ne.toSignificantDigits=ne.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(un(e,1,to),t===void 0?t=n.rounding:un(t,0,8)),qe(new n(r),e,t)};ne.toString=ne.valueOf=ne.val=ne.toJSON=ne[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=dt(e),r=e.constructor;return qi(e,t<=r.toExpNeg||t>=r.toExpPos)};function AC(e,t){var r,n,i,a,o,s,u,l,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),et?qe(t,f):t;if(u=e.d,l=t.d,o=e.e,i=t.e,u=u.slice(),a=o-i,a){for(a<0?(n=u,a=-a,s=l.length):(n=l,i=o,s=u.length),o=Math.ceil(f/Ze),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=u.length,a=l.length,s-a<0&&(a=s,n=l,l=u,u=n),r=0;a;)r=(u[--a]=u[a]+l[a]+r)/Tt|0,u[a]%=Tt;for(r&&(u.unshift(r),++i),s=u.length;u[--s]==0;)u.pop();return t.d=u,t.e=i,et?qe(t,f):t}function un(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Di+e)}function en(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)n=e[t]+"",r=Ze-n.length,r&&(a+=Yn(r)),a+=n;o=e[t],n=o+"",r=Ze-n.length,r&&(a+=Yn(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var An=(function(){function e(n,i){var a,o=0,s=n.length;for(n=n.slice();s--;)a=n[s]*i+o,n[s]=a%Tt|0,o=a/Tt|0;return o&&n.unshift(o),n}function t(n,i,a,o){var s,u;if(a!=o)u=a>o?1:-1;else for(s=u=0;s<a;s++)if(n[s]!=i[s]){u=n[s]>i[s]?1:-1;break}return u}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]<i[a]?1:0,n[a]=o*Tt+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,o){var s,u,l,c,f,d,h,p,b,y,v,T,x,S,w,A,_,O,R=n.constructor,C=n.s==i.s?1:-1,M=n.d,L=i.d;if(!n.s)return new R(n);if(!i.s)throw Error(Or+"Division by zero");for(u=n.e-i.e,_=L.length,w=M.length,h=new R(C),p=h.d=[],l=0;L[l]==(M[l]||0);)++l;if(L[l]>(M[l]||0)&&--u,a==null?T=a=R.precision:o?T=a+(dt(n)-dt(i))+1:T=a,T<0)return new R(0);if(T=T/Ze+2|0,l=0,_==1)for(c=0,L=L[0],T++;(l<w||c)&&T--;l++)x=c*Tt+(M[l]||0),p[l]=x/L|0,c=x%L|0;else{for(c=Tt/(L[0]+1)|0,c>1&&(L=e(L,c),M=e(M,c),_=L.length,w=M.length),S=_,b=M.slice(0,_),y=b.length;y<_;)b[y++]=0;O=L.slice(),O.unshift(0),A=L[0],L[1]>=Tt/2&&++A;do c=0,s=t(L,b,_,y),s<0?(v=b[0],_!=y&&(v=v*Tt+(b[1]||0)),c=v/A|0,c>1?(c>=Tt&&(c=Tt-1),f=e(L,c),d=f.length,y=b.length,s=t(f,b,d,y),s==1&&(c--,r(f,_<d?O:L,d))):(c==0&&(s=c=1),f=L.slice()),d=f.length,d<y&&f.unshift(0),r(b,f,y),s==-1&&(y=b.length,s=t(L,b,_,y),s<1&&(c++,r(b,_<y?O:L,y))),y=b.length):s===0&&(c++,b=[0]),p[l++]=c,s&&b[0]?b[y++]=M[S]||0:(b=[M[S]],y=1);while((S++<w||b[0]!==void 0)&&T--)}return p[0]||p.shift(),h.e=u,qe(h,o?a+dt(h)+1:a)}})();function SC(e,t){var r,n,i,a,o,s,u=0,l=0,c=e.constructor,f=c.precision;if(dt(e)>16)throw Error(k0+dt(e));if(!e.s)return new c(hr);for(et=!1,s=f,o=new c(.03125);e.abs().gte(.1);)e=e.times(o),l+=5;for(n=Math.log(Ai(2,l))/Math.LN10*2+5|0,s+=n,r=i=a=new c(hr),c.precision=s;;){if(i=qe(i.times(e),s),r=r.times(++u),o=a.plus(An(i,r,s)),en(o.d).slice(0,s)===en(a.d).slice(0,s)){for(;l--;)a=qe(a.times(a),s);return c.precision=f,t==null?(et=!0,qe(a,f)):a}a=o}}function dt(e){for(var t=e.e*Ze,r=e.d[0];r>=10;r/=10)t++;return t}function oh(e,t,r){if(t>e.LN10.sd())throw et=!0,r&&(e.precision=r),Error(Or+"LN10 precision limit exceeded");return qe(new e(e.LN10),t)}function Yn(e){for(var t="";e--;)t+="0";return t}function Ts(e,t){var r,n,i,a,o,s,u,l,c,f=1,d=10,h=e,p=h.d,b=h.constructor,y=b.precision;if(h.s<1)throw Error(Or+(h.s?"NaN":"-Infinity"));if(h.eq(hr))return new b(0);if(t==null?(et=!1,l=y):l=t,h.eq(10))return t==null&&(et=!0),oh(b,l);if(l+=d,b.precision=l,r=en(p),n=r.charAt(0),a=dt(h),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=en(h.d),n=r.charAt(0),f++;a=dt(h),n>1?(h=new b("0."+r),a++):h=new b(n+"."+r.slice(1))}else return u=oh(b,l+2,y).times(a+""),h=Ts(new b(n+"."+r.slice(1)),l-d).plus(u),b.precision=y,t==null?(et=!0,qe(h,y)):h;for(s=o=h=An(h.minus(hr),h.plus(hr),l),c=qe(h.times(h),l),i=3;;){if(o=qe(o.times(c),l),u=s.plus(An(o,new b(i),l)),en(u.d).slice(0,l)===en(s.d).slice(0,l))return s=s.times(2),a!==0&&(s=s.plus(oh(b,l+2,y).times(a+""))),s=An(s,new b(f),l),b.precision=y,t==null?(et=!0,qe(s,y)):s;s=u,i+=2}}function Ux(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=ro(r/Ze),e.d=[],n=(r+1)%Ze,r<0&&(n+=Ze),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=Ze;n<i;)e.d.push(+t.slice(n,n+=Ze));t=t.slice(n),n=Ze-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),et&&(e.e>jl||e.e<-jl))throw Error(k0+r)}else e.s=0,e.e=0,e.d=[0];return e}function qe(e,t,r){var n,i,a,o,s,u,l,c,f=e.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=Ze,i=t,l=f[c=0];else{if(c=Math.ceil((n+1)/Ze),a=f.length,c>=a)return e;for(l=a=f[c],o=1;a>=10;a/=10)o++;n%=Ze,i=n-Ze+o}if(r!==void 0&&(a=Ai(10,o-i-1),s=l/a%10|0,u=t<0||f[c+1]!==void 0||l%a,u=r<4?(s||u)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||u||r==6&&(n>0?i>0?l/Ai(10,o-i):0:f[c-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return u?(a=dt(e),f.length=1,t=t-a-1,f[0]=Ai(10,(Ze-t%Ze)%Ze),e.e=ro(-t/Ze)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=c,a=1,c--):(f.length=c+1,a=Ai(10,Ze-n),f[c]=i>0?(l/Ai(10,o-i)%Ai(10,i)|0)*a:0),u)for(;;)if(c==0){(f[0]+=a)==Tt&&(f[0]=1,++e.e);break}else{if(f[c]+=a,f[c]!=Tt)break;f[c--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(et&&(e.e>jl||e.e<-jl))throw Error(k0+dt(e));return e}function kC(e,t){var r,n,i,a,o,s,u,l,c,f,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),et?qe(t,h):t;if(u=e.d,f=t.d,n=t.e,l=e.e,u=u.slice(),o=l-n,o){for(c=o<0,c?(r=u,o=-o,s=f.length):(r=f,n=l,s=u.length),i=Math.max(Math.ceil(h/Ze),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=u.length,s=f.length,c=i<s,c&&(s=i),i=0;i<s;i++)if(u[i]!=f[i]){c=u[i]<f[i];break}o=0}for(c&&(r=u,u=f,f=r,t.s=-t.s),s=u.length,i=f.length-s;i>0;--i)u[s++]=0;for(i=f.length;i>o;){if(u[--i]<f[i]){for(a=i;a&&u[--a]===0;)u[a]=Tt-1;--u[a],u[i]+=Tt}u[i]-=f[i]}for(;u[--s]===0;)u.pop();for(;u[0]===0;u.shift())--n;return u[0]?(t.d=u,t.e=n,et?qe(t,h):t):new d(0)}function qi(e,t,r){var n,i=dt(e),a=en(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+Yn(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Yn(-i-1)+a,r&&(n=r-o)>0&&(a+=Yn(n))):i>=o?(a+=Yn(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+Yn(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=Yn(n))),e.s<0?"-"+a:a}function Hx(e,t){if(e.length>t)return e.length=t,!0}function _C(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Di+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return Ux(o,a.toString())}else if(typeof a!="string")throw Error(Di+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,VK.test(a))Ux(o,a);else throw Error(Di+a)}if(i.prototype=ne,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=_C,i.config=i.set=YK,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function YK(e){if(!e||typeof e!="object")throw Error(Or+"Object expected");var t,r,n,i=["precision",1,to,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(ro(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Di+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Di+r+": "+n);return this}var _0=_C(WK);hr=new _0(1);const Ne=_0;function CC(e){var t;return e===0?t=1:t=Math.floor(new Ne(e).abs().log(10).toNumber())+1,t}function IC(e,t,r){for(var n=new Ne(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var OC=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},C0=(e,t,r)=>{if(e.lte(0))return new Ne(0);var n=CC(e.toNumber()),i=new Ne(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new Ne(Math.ceil(a.div(o).toNumber())).add(r).mul(o),u=s.mul(i);return t?new Ne(u.toNumber()):new Ne(Math.ceil(u.toNumber()))},NC=(e,t,r)=>{var n;if(e.lte(0))return new Ne(0);var i=[1,2,2.5,5],a=e.toNumber(),o=Math.floor(new Ne(a).abs().log(10).toNumber()),s=new Ne(10).pow(o),u=e.div(s).toNumber(),l=i.findIndex(h=>h>=u-1e-10);if(l===-1&&(s=s.mul(10),l=0),l+=r,l>=i.length){var c=Math.floor(l/i.length);l%=i.length,s=s.mul(new Ne(10).pow(c))}var f=(n=i[l])!==null&&n!==void 0?n:1,d=new Ne(f).mul(s);return t?d:new Ne(Math.ceil(d.toNumber()))},KK=(e,t,r)=>{var n=new Ne(1),i=new Ne(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new Ne(10).pow(CC(e)-1),i=new Ne(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new Ne(Math.floor(e)))}else e===0?i=new Ne(Math.floor((t-1)/2)):r||(i=new Ne(Math.floor(e)));for(var o=Math.floor((t-1)/2),s=[],u=0;u<t;u++)s.push(i.add(new Ne(u-o).mul(n)).toNumber());return s},PC=function(t,r,n,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:C0;if(!Number.isFinite((r-t)/(n-1)))return{step:new Ne(0),tickMin:new Ne(0),tickMax:new Ne(0)};var s=o(new Ne(r).sub(t).div(n-1),i,a),u;t<=0&&r>=0?u=new Ne(0):(u=new Ne(t).add(r).div(2),u=u.sub(new Ne(u).mod(s)));var l=Math.ceil(u.sub(t).div(s).toNumber()),c=Math.ceil(new Ne(r).sub(u).div(s).toNumber()),f=l+c+1;return f>n?PC(t,r,n,i,a+1,o):(f<n&&(c=r>0?c+(n-f):c,l=r>0?l:l+(n-f)),{step:s,tickMin:u.sub(new Ne(l).mul(s)),tickMax:u.add(new Ne(c).mul(s))})},zx=function(t){var[r,n]=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",s=Math.max(i,2),[u,l]=OC([r,n]);if(u===-1/0||l===1/0){var c=l===1/0?[u,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),l];return r>n?c.reverse():c}if(u===l)return KK(u,i,a);var f=o==="snap125"?NC:C0,{step:d,tickMin:h,tickMax:p}=PC(u,l,s,a,0,f),b=IC(h,p.add(new Ne(.1).mul(d)),d);return r>n?b.reverse():b},qx=function(t,r){var[n,i]=t,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[s,u]=OC([n,i]);if(s===-1/0||u===1/0)return[n,i];if(s===u)return[s];var l=o==="snap125"?NC:C0,c=Math.max(r,2),f=l(new Ne(u).sub(s).div(c-1),a,0),d=[...IC(new Ne(s),new Ne(u),f),u];return a===!1&&(d=d.map(h=>Math.round(h))),n>i?d.reverse():d},DC=e=>e.rootProps.maxBarSize,GK=e=>e.rootProps.barGap,RC=e=>e.rootProps.barCategoryGap,XK=e=>e.rootProps.barSize,ef=e=>e.rootProps.stackOffset,LC=e=>e.rootProps.reverseStackOrder,I0=e=>e.options.chartName,O0=e=>e.rootProps.syncId,MC=e=>e.rootProps.syncMethod,N0=e=>e.options.eventEmitter,ft={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},yi={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Kr={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},tf=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function rf(e,t,r){if(r!=="auto")return r;if(e!=null)return Dn(e,t)?"category":"number"}function Wx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Bl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wx(Object(r),!0).forEach(function(n){ZK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ZK(e,t,r){return(t=QK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QK(e){var t=JK(e,"string");return typeof t=="symbol"?t:t+""}function JK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Vx={allowDataOverflow:yi.allowDataOverflow,allowDecimals:yi.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:yi.angleAxisId,includeHidden:!1,name:void 0,reversed:yi.reversed,scale:yi.scale,tick:yi.tick,tickCount:void 0,ticks:void 0,type:yi.type,unit:void 0,niceTicks:"auto"},Yx={allowDataOverflow:Kr.allowDataOverflow,allowDecimals:Kr.allowDecimals,allowDuplicatedCategory:Kr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Kr.radiusAxisId,includeHidden:Kr.includeHidden,name:void 0,reversed:Kr.reversed,scale:Kr.scale,tick:Kr.tick,tickCount:Kr.tickCount,ticks:void 0,type:Kr.type,unit:void 0,niceTicks:"auto"},eG=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},P0=B([eG,nC],(e,t)=>{var r;if(e!=null)return e;var n=(r=rf(t,"angleAxis",Vx.type))!==null&&r!==void 0?r:"category";return Bl(Bl({},Vx),{},{type:n})}),tG=(e,t)=>e.polarAxis.radiusAxis[t],D0=B([tG,nC],(e,t)=>{var r;if(e!=null)return e;var n=(r=rf(t,"radiusAxis",Yx.type))!==null&&r!==void 0?r:"category";return Bl(Bl({},Yx),{},{type:n})}),nf=e=>e.polarOptions,R0=B([Rn,Ln,At],kK),jC=B([nf,R0],(e,t)=>{if(e!=null)return $r(e.innerRadius,t,0)}),BC=B([nf,R0],(e,t)=>{if(e!=null)return $r(e.outerRadius,t,t*.8)}),rG=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},FC=B([nf],rG);B([P0,FC],tf);var $C=B([R0,jC,BC],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});B([D0,$C],tf);var UC=B([Fe,nf,jC,BC,Rn,Ln],(e,t,r,n,i,a)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var{cx:o,cy:s,startAngle:u,endAngle:l}=t;return{cx:$r(o,i,i/2),cy:$r(s,a,a/2),innerRadius:r,outerRadius:n,startAngle:u,endAngle:l,clockWise:!1}}}),kt=(e,t)=>t,af=(e,t,r)=>r;function L0(e){return e?.id}function HC(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:i,dataKey:a}=r,o=new Map;return e.forEach(s=>{var u,l=(u=s.data)!==null&&u!==void 0?u:n;if(!(l==null||l.length===0)){var c=L0(s);l.forEach((f,d)=>{var h=a==null||i?d:String(lt(f,a,null)),p=lt(f,s.dataKey,0),b;o.has(h)?b=o.get(h):b={},Object.assign(b,{[c]:p}),o.set(h,b)})}}),Array.from(o.values())}function of(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var sf=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function uf(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function nG(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}var _t=e=>{var t=Fe(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},no=e=>e.tooltip.settings.axisId;function M0(e){if(e!=null){var t=e.ticks,r=e.bandwidth,n=e.range(),i=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(a){function o(){return a.apply(this,arguments)}return o.toString=function(){return a.toString()},o})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(a){var o=i[0],s=i[1];return o<=s?a>=o&&a<=s:a>=s&&a<=o},bandwidth:r?()=>r.call(e):void 0,ticks:t?a=>t.call(e,a):void 0,map:(a,o)=>{var s=e(a);if(s!=null){if(e.bandwidth&&o!==null&&o!==void 0&&o.position){var u=e.bandwidth();switch(o.position){case"middle":s+=u/2;break;case"end":s+=u;break}}return s}}}}}var iG=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!tn(t)){for(var r,n,i=0;i<t.length;i++){var a=t[i];Te(a)&&((r===void 0||a<r)&&(r=a),(n===void 0||a>n)&&(n=a))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function Jn(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function aG(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function j0(e){let t,r,n;e.length!==2?(t=Jn,r=(s,u)=>Jn(e(s),u),n=(s,u)=>e(s)-u):(t=e===Jn||e===aG?e:oG,r=e,n=e);function i(s,u,l=0,c=s.length){if(l<c){if(t(u,u)!==0)return c;do{const f=l+c>>>1;r(s[f],u)<0?l=f+1:c=f}while(l<c)}return l}function a(s,u,l=0,c=s.length){if(l<c){if(t(u,u)!==0)return c;do{const f=l+c>>>1;r(s[f],u)<=0?l=f+1:c=f}while(l<c)}return l}function o(s,u,l=0,c=s.length){const f=i(s,u,l,c-1);return f>l&&n(s[f-1],u)>-n(s[f],u)?f-1:f}return{left:i,center:o,right:a}}function oG(){return 0}function zC(e){return e===null?NaN:+e}function*sG(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const uG=j0(Jn),tu=uG.right;j0(zC).center;class Kx extends Map{constructor(t,r=fG){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(Gx(this,t))}has(t){return super.has(Gx(this,t))}set(t,r){return super.set(lG(this,t),r)}delete(t){return super.delete(cG(this,t))}}function Gx({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function lG({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function cG({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function fG(e){return e!==null&&typeof e=="object"?e.valueOf():e}function dG(e=Jn){if(e===Jn)return qC;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function qC(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const hG=Math.sqrt(50),pG=Math.sqrt(10),mG=Math.sqrt(2);function Fl(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=hG?10:a>=pG?5:a>=mG?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/o,s=Math.round(e*l),u=Math.round(t*l),s/l<e&&++s,u/l>t&&--u,l=-l):(l=Math.pow(10,i)*o,s=Math.round(e/l),u=Math.round(t/l),s*l<e&&++s,u*l>t&&--u),u<s&&.5<=r&&r<2?Fl(e,t,r*2):[s,u,l]}function Bp(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,o]=n?Fl(t,e,r):Fl(e,t,r);if(!(a>=i))return[];const s=a-i+1,u=new Array(s);if(n)if(o<0)for(let l=0;l<s;++l)u[l]=(a-l)/-o;else for(let l=0;l<s;++l)u[l]=(a-l)*o;else if(o<0)for(let l=0;l<s;++l)u[l]=(i+l)/-o;else for(let l=0;l<s;++l)u[l]=(i+l)*o;return u}function Fp(e,t,r){return t=+t,e=+e,r=+r,Fl(e,t,r)[2]}function $p(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?Fp(t,e,r):Fp(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function Xx(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Zx(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function WC(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?qC:dG(i);n>r;){if(n-r>600){const u=n-r+1,l=t-r+1,c=Math.log(u),f=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*f*(u-f)/u)*(l-u/2<0?-1:1),h=Math.max(r,Math.floor(t-l*f/u+d)),p=Math.min(n,Math.floor(t+(u-l)*f/u+d));WC(e,t,h,p,i)}const a=e[t];let o=r,s=n;for(So(e,r,t),i(e[n],a)>0&&So(e,r,n);o<s;){for(So(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[r],a)===0?So(e,r,s):(++s,So(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function So(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function gG(e,t,r){if(e=Float64Array.from(sG(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Zx(e);if(t>=1)return Xx(e);var n,i=(n-1)*t,a=Math.floor(i),o=Xx(WC(e,a).subarray(0,a+1)),s=Zx(e.subarray(a+1));return o+(s-o)*(i-a)}}function bG(e,t,r=zC){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function yG(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n<i;)a[n]=e+n*r;return a}function Nr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Mn(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Up=Symbol("implicit");function B0(){var e=new Kx,t=[],r=[],n=Up;function i(a){let o=e.get(a);if(o===void 0){if(n!==Up)return n;e.set(a,o=t.push(a)-1)}return r[o%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new Kx;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return B0(t,r).unknown(n)},Nr.apply(i,arguments),i}function F0(){var e=B0().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,s=!1,u=0,l=0,c=.5;delete e.unknown;function f(){var d=t().length,h=i<n,p=h?i:n,b=h?n:i;a=(b-p)/Math.max(1,d-u+l*2),s&&(a=Math.floor(a)),p+=(b-p-a*(d-u))*c,o=a*(1-u),s&&(p=Math.round(p),o=Math.round(o));var y=yG(d).map(function(v){return p+a*v});return r(h?y.reverse():y)}return e.domain=function(d){return arguments.length?(t(d),f()):t()},e.range=function(d){return arguments.length?([n,i]=d,n=+n,i=+i,f()):[n,i]},e.rangeRound=function(d){return[n,i]=d,n=+n,i=+i,s=!0,f()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(d){return arguments.length?(s=!!d,f()):s},e.padding=function(d){return arguments.length?(u=Math.min(1,l=+d),f()):u},e.paddingInner=function(d){return arguments.length?(u=Math.min(1,d),f()):u},e.paddingOuter=function(d){return arguments.length?(l=+d,f()):l},e.align=function(d){return arguments.length?(c=Math.max(0,Math.min(1,d)),f()):c},e.copy=function(){return F0(t(),[n,i]).round(s).paddingInner(u).paddingOuter(l).align(c)},Nr.apply(f(),arguments)}function VC(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return VC(t())},e}function vG(){return VC(F0.apply(null,arguments).paddingInner(1))}function $0(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function YC(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ru(){}var ws=.7,$l=1/ws,Ia="\\s*([+-]?\\d+)\\s*",As="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",rn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xG=/^#([0-9a-f]{3,8})$/,EG=new RegExp(`^rgb\\(${Ia},${Ia},${Ia}\\)$`),TG=new RegExp(`^rgb\\(${rn},${rn},${rn}\\)$`),wG=new RegExp(`^rgba\\(${Ia},${Ia},${Ia},${As}\\)$`),AG=new RegExp(`^rgba\\(${rn},${rn},${rn},${As}\\)$`),SG=new RegExp(`^hsl\\(${As},${rn},${rn}\\)$`),kG=new RegExp(`^hsla\\(${As},${rn},${rn},${As}\\)$`),Qx={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};$0(ru,Ss,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Jx,formatHex:Jx,formatHex8:_G,formatHsl:CG,formatRgb:eE,toString:eE});function Jx(){return this.rgb().formatHex()}function _G(){return this.rgb().formatHex8()}function CG(){return KC(this).formatHsl()}function eE(){return this.rgb().formatRgb()}function Ss(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=xG.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?tE(t):r===3?new ar(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Nu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Nu(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=EG.exec(e))?new ar(t[1],t[2],t[3],1):(t=TG.exec(e))?new ar(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=wG.exec(e))?Nu(t[1],t[2],t[3],t[4]):(t=AG.exec(e))?Nu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=SG.exec(e))?iE(t[1],t[2]/100,t[3]/100,1):(t=kG.exec(e))?iE(t[1],t[2]/100,t[3]/100,t[4]):Qx.hasOwnProperty(e)?tE(Qx[e]):e==="transparent"?new ar(NaN,NaN,NaN,0):null}function tE(e){return new ar(e>>16&255,e>>8&255,e&255,1)}function Nu(e,t,r,n){return n<=0&&(e=t=r=NaN),new ar(e,t,r,n)}function IG(e){return e instanceof ru||(e=Ss(e)),e?(e=e.rgb(),new ar(e.r,e.g,e.b,e.opacity)):new ar}function Hp(e,t,r,n){return arguments.length===1?IG(e):new ar(e,t,r,n??1)}function ar(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}$0(ar,Hp,YC(ru,{brighter(e){return e=e==null?$l:Math.pow($l,e),new ar(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ws:Math.pow(ws,e),new ar(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ar(Ri(this.r),Ri(this.g),Ri(this.b),Ul(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:rE,formatHex:rE,formatHex8:OG,formatRgb:nE,toString:nE}));function rE(){return`#${Ci(this.r)}${Ci(this.g)}${Ci(this.b)}`}function OG(){return`#${Ci(this.r)}${Ci(this.g)}${Ci(this.b)}${Ci((isNaN(this.opacity)?1:this.opacity)*255)}`}function nE(){const e=Ul(this.opacity);return`${e===1?"rgb(":"rgba("}${Ri(this.r)}, ${Ri(this.g)}, ${Ri(this.b)}${e===1?")":`, ${e})`}`}function Ul(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ri(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ci(e){return e=Ri(e),(e<16?"0":"")+e.toString(16)}function iE(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new jr(e,t,r,n)}function KC(e){if(e instanceof jr)return new jr(e.h,e.s,e.l,e.opacity);if(e instanceof ru||(e=Ss(e)),!e)return new jr;if(e instanceof jr)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,u=(a+i)/2;return s?(t===a?o=(r-n)/s+(r<n)*6:r===a?o=(n-t)/s+2:o=(t-r)/s+4,s/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new jr(o,s,u,e.opacity)}function NG(e,t,r,n){return arguments.length===1?KC(e):new jr(e,t,r,n??1)}function jr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}$0(jr,NG,YC(ru,{brighter(e){return e=e==null?$l:Math.pow($l,e),new jr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ws:Math.pow(ws,e),new jr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new ar(sh(e>=240?e-240:e+120,i,n),sh(e,i,n),sh(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new jr(aE(this.h),Pu(this.s),Pu(this.l),Ul(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ul(this.opacity);return`${e===1?"hsl(":"hsla("}${aE(this.h)}, ${Pu(this.s)*100}%, ${Pu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function aE(e){return e=(e||0)%360,e<0?e+360:e}function Pu(e){return Math.max(0,Math.min(1,e||0))}function sh(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const U0=e=>()=>e;function PG(e,t){return function(r){return e+r*t}}function DG(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function RG(e){return(e=+e)==1?GC:function(t,r){return r-t?DG(t,r,e):U0(isNaN(t)?r:t)}}function GC(e,t){var r=t-e;return r?PG(e,r):U0(isNaN(e)?t:e)}const oE=(function e(t){var r=RG(t);function n(i,a){var o=r((i=Hp(i)).r,(a=Hp(a)).r),s=r(i.g,a.g),u=r(i.b,a.b),l=GC(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return n.gamma=e,n})(1);function LG(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function MG(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function jG(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=io(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(s){for(o=0;o<n;++o)a[o]=i[o](s);return a}}function BG(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Hl(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function FG(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=io(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var zp=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,uh=new RegExp(zp.source,"g");function $G(e){return function(){return e}}function UG(e){return function(t){return e(t)+""}}function HG(e,t){var r=zp.lastIndex=uh.lastIndex=0,n,i,a,o=-1,s=[],u=[];for(e=e+"",t=t+"";(n=zp.exec(e))&&(i=uh.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,u.push({i:o,x:Hl(n,i)})),r=uh.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?u[0]?UG(u[0].x):$G(t):(t=u.length,function(l){for(var c=0,f;c<t;++c)s[(f=u[c]).i]=f.x(l);return s.join("")})}function io(e,t){var r=typeof t,n;return t==null||r==="boolean"?U0(t):(r==="number"?Hl:r==="string"?(n=Ss(t))?(t=n,oE):HG:t instanceof Ss?oE:t instanceof Date?BG:MG(t)?LG:Array.isArray(t)?jG:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?FG:Hl)(e,t)}function H0(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function zG(e,t){t===void 0&&(t=e,e=io);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[s](o-s)}}function qG(e){return function(){return e}}function zl(e){return+e}var sE=[0,1];function Gt(e){return e}function qp(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:qG(isNaN(t)?NaN:.5)}function WG(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function VG(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=qp(i,n),a=r(o,a)):(n=qp(n,i),a=r(a,o)),function(s){return a(n(s))}}function YG(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=qp(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(s){var u=tu(e,s,1,n)-1;return a[u](i[u](s))}}function nu(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function lf(){var e=sE,t=sE,r=io,n,i,a,o=Gt,s,u,l;function c(){var d=Math.min(e.length,t.length);return o!==Gt&&(o=WG(e[0],e[d-1])),s=d>2?YG:VG,u=l=null,f}function f(d){return d==null||isNaN(d=+d)?a:(u||(u=s(e.map(n),t,r)))(n(o(d)))}return f.invert=function(d){return o(i((l||(l=s(t,e.map(n),Hl)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,zl),c()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),c()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),r=H0,c()},f.clamp=function(d){return arguments.length?(o=d?!0:Gt,c()):o!==Gt},f.interpolate=function(d){return arguments.length?(r=d,c()):r},f.unknown=function(d){return arguments.length?(a=d,f):a},function(d,h){return n=d,i=h,c()}}function z0(){return lf()(Gt,Gt)}function KG(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ql(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Ha(e){return e=ql(Math.abs(e)),e?e[1]:NaN}function GG(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>n&&(s=Math.max(1,n-u)),a.push(r.substring(i-=s,i+s)),!((u+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function XG(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var ZG=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ks(e){if(!(t=ZG.exec(e)))throw new Error("invalid format: "+e);var t;return new q0({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}ks.prototype=q0.prototype;function q0(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}q0.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function QG(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var Wl;function JG(e,t){var r=ql(e,t);if(!r)return Wl=void 0,e.toPrecision(t);var n=r[0],i=r[1],a=i-(Wl=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+ql(e,Math.max(0,t+a-1))[0]}function uE(e,t){var r=ql(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const lE={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:KG,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>uE(e*100,t),r:uE,s:JG,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function cE(e){return e}var fE=Array.prototype.map,dE=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function eX(e){var t=e.grouping===void 0||e.thousands===void 0?cE:GG(fE.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?cE:XG(fE.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function l(f,d){f=ks(f);var h=f.fill,p=f.align,b=f.sign,y=f.symbol,v=f.zero,T=f.width,x=f.comma,S=f.precision,w=f.trim,A=f.type;A==="n"?(x=!0,A="g"):lE[A]||(S===void 0&&(S=12),w=!0,A="g"),(v||h==="0"&&p==="=")&&(v=!0,h="0",p="=");var _=(d&&d.prefix!==void 0?d.prefix:"")+(y==="$"?r:y==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():""),O=(y==="$"?n:/[%p]/.test(A)?o:"")+(d&&d.suffix!==void 0?d.suffix:""),R=lE[A],C=/[defgprs%]/.test(A);S=S===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function M(L){var Q=_,H=O,U,q,J;if(A==="c")H=R(L)+H,L="";else{L=+L;var V=L<0||1/L<0;if(L=isNaN(L)?u:R(Math.abs(L),S),w&&(L=QG(L)),V&&+L==0&&b!=="+"&&(V=!1),Q=(V?b==="("?b:s:b==="-"||b==="("?"":b)+Q,H=(A==="s"&&!isNaN(L)&&Wl!==void 0?dE[8+Wl/3]:"")+H+(V&&b==="("?")":""),C){for(U=-1,q=L.length;++U<q;)if(J=L.charCodeAt(U),48>J||J>57){H=(J===46?i+L.slice(U+1):L.slice(U))+H,L=L.slice(0,U);break}}}x&&!v&&(L=t(L,1/0));var re=Q.length+L.length+H.length,P=re<T?new Array(T-re+1).join(h):"";switch(x&&v&&(L=t(P+L,P.length?T-H.length:1/0),P=""),p){case"<":L=Q+L+H+P;break;case"=":L=Q+P+L+H;break;case"^":L=P.slice(0,re=P.length>>1)+Q+L+H+P.slice(re);break;default:L=P+Q+L+H;break}return a(L)}return M.toString=function(){return f+""},M}function c(f,d){var h=Math.max(-8,Math.min(8,Math.floor(Ha(d)/3)))*3,p=Math.pow(10,-h),b=l((f=ks(f),f.type="f",f),{suffix:dE[8+h/3]});return function(y){return b(p*y)}}return{format:l,formatPrefix:c}}var Du,W0,XC;tX({thousands:",",grouping:[3],currency:["$",""]});function tX(e){return Du=eX(e),W0=Du.format,XC=Du.formatPrefix,Du}function rX(e){return Math.max(0,-Ha(Math.abs(e)))}function nX(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ha(t)/3)))*3-Ha(Math.abs(e)))}function iX(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ha(t)-Ha(e))+1}function ZC(e,t,r,n){var i=$p(e,t,r),a;switch(n=ks(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=nX(i,o))&&(n.precision=a),XC(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=iX(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=rX(i))&&(n.precision=a-(n.type==="%")*2);break}}return W0(n)}function ci(e){var t=e.domain;return e.ticks=function(r){var n=t();return Bp(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return ZC(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],s=n[a],u,l,c=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);c-- >0;){if(l=Fp(o,s,r),l===u)return n[i]=o,n[a]=s,t(n);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;u=l}return e},e}function QC(){var e=z0();return e.copy=function(){return nu(e,QC())},Nr.apply(e,arguments),ci(e)}function JC(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,zl),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return JC(e).unknown(t)},e=arguments.length?Array.from(e,zl):[0,1],ci(r)}function eI(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return a<i&&(o=r,r=n,n=o,o=i,i=a,a=o),e[r]=t.floor(i),e[n]=t.ceil(a),e}function hE(e){return Math.log(e)}function pE(e){return Math.exp(e)}function aX(e){return-Math.log(-e)}function oX(e){return-Math.exp(-e)}function sX(e){return isFinite(e)?+("1e"+e):e<0?0:e}function uX(e){return e===10?sX:e===Math.E?Math.exp:t=>Math.pow(e,t)}function lX(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function mE(e){return(t,r)=>-e(-t,r)}function V0(e){const t=e(hE,pE),r=t.domain;let n=10,i,a;function o(){return i=lX(n),a=uX(n),r()[0]<0?(i=mE(i),a=mE(a),e(aX,oX)):e(hE,pE),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const u=r();let l=u[0],c=u[u.length-1];const f=c<l;f&&([l,c]=[c,l]);let d=i(l),h=i(c),p,b;const y=s==null?10:+s;let v=[];if(!(n%1)&&h-d<y){if(d=Math.floor(d),h=Math.ceil(h),l>0){for(;d<=h;++d)for(p=1;p<n;++p)if(b=d<0?p/a(-d):p*a(d),!(b<l)){if(b>c)break;v.push(b)}}else for(;d<=h;++d)for(p=n-1;p>=1;--p)if(b=d>0?p/a(-d):p*a(d),!(b<l)){if(b>c)break;v.push(b)}v.length*2<y&&(v=Bp(l,c,y))}else v=Bp(d,h,Math.min(h-d,y)).map(a);return f?v.reverse():v},t.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=n===10?"s":","),typeof u!="function"&&(!(n%1)&&(u=ks(u)).precision==null&&(u.trim=!0),u=W0(u)),s===1/0)return u;const l=Math.max(1,n*s/t.ticks().length);return c=>{let f=c/a(Math.round(i(c)));return f*n<n-.5&&(f*=n),f<=l?u(c):""}},t.nice=()=>r(eI(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function tI(){const e=V0(lf()).domain([1,10]);return e.copy=()=>nu(e,tI()).base(e.base()),Nr.apply(e,arguments),e}function gE(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function bE(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Y0(e){var t=1,r=e(gE(t),bE(t));return r.constant=function(n){return arguments.length?e(gE(t=+n),bE(t)):t},ci(r)}function rI(){var e=Y0(lf());return e.copy=function(){return nu(e,rI()).constant(e.constant())},Nr.apply(e,arguments)}function yE(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function cX(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function fX(e){return e<0?-e*e:e*e}function K0(e){var t=e(Gt,Gt),r=1;function n(){return r===1?e(Gt,Gt):r===.5?e(cX,fX):e(yE(r),yE(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ci(t)}function G0(){var e=K0(lf());return e.copy=function(){return nu(e,G0()).exponent(e.exponent())},Nr.apply(e,arguments),e}function dX(){return G0.apply(null,arguments).exponent(.5)}function vE(e){return Math.sign(e)*e*e}function hX(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function nI(){var e=z0(),t=[0,1],r=!1,n;function i(a){var o=hX(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(vE(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,zl)).map(vE)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return nI(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Nr.apply(i,arguments),ci(i)}function iI(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o<s;)r[o-1]=bG(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?n:t[tu(r,o)]}return a.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Jn),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return iI().domain(e).range(t).unknown(n)},Nr.apply(a,arguments)}function aI(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function o(u){return u!=null&&u<=u?i[tu(n,u,0,r)]:a}function s(){var u=-1;for(n=new Array(r);++u<r;)n[u]=((u+1)*t-(u-r)*e)/(r+1);return o}return o.domain=function(u){return arguments.length?([e,t]=u,e=+e,t=+t,s()):[e,t]},o.range=function(u){return arguments.length?(r=(i=Array.from(u)).length-1,s()):i.slice()},o.invertExtent=function(u){var l=i.indexOf(u);return l<0?[NaN,NaN]:l<1?[e,n[0]]:l>=r?[n[r-1],t]:[n[l-1],n[l]]},o.unknown=function(u){return arguments.length&&(a=u),o},o.thresholds=function(){return n.slice()},o.copy=function(){return aI().domain([e,t]).range(i).unknown(a)},Nr.apply(ci(o),arguments)}function oI(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[tu(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return oI().domain(e).range(t).unknown(r)},Nr.apply(i,arguments)}const lh=new Date,ch=new Date;function yt(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const u=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return u;let l;do u.push(l=new Date(+a)),t(a,s),e(a);while(l<a&&a<o);return u},i.filter=a=>yt(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(lh.setTime(+a),ch.setTime(+o),e(lh),e(ch),Math.floor(r(lh,ch))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Vl=yt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Vl.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?yt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Vl);Vl.range;const Tn=1e3,Ir=Tn*60,wn=Ir*60,_n=wn*24,X0=_n*7,xE=_n*30,fh=_n*365,Ii=yt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Tn)},(e,t)=>(t-e)/Tn,e=>e.getUTCSeconds());Ii.range;const Z0=yt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Tn)},(e,t)=>{e.setTime(+e+t*Ir)},(e,t)=>(t-e)/Ir,e=>e.getMinutes());Z0.range;const Q0=yt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ir)},(e,t)=>(t-e)/Ir,e=>e.getUTCMinutes());Q0.range;const J0=yt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Tn-e.getMinutes()*Ir)},(e,t)=>{e.setTime(+e+t*wn)},(e,t)=>(t-e)/wn,e=>e.getHours());J0.range;const eg=yt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*wn)},(e,t)=>(t-e)/wn,e=>e.getUTCHours());eg.range;const iu=yt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ir)/_n,e=>e.getDate()-1);iu.range;const cf=yt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/_n,e=>e.getUTCDate()-1);cf.range;const sI=yt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/_n,e=>Math.floor(e/_n));sI.range;function Ji(e){return yt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Ir)/X0)}const ff=Ji(0),Yl=Ji(1),pX=Ji(2),mX=Ji(3),za=Ji(4),gX=Ji(5),bX=Ji(6);ff.range;Yl.range;pX.range;mX.range;za.range;gX.range;bX.range;function ea(e){return yt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/X0)}const df=ea(0),Kl=ea(1),yX=ea(2),vX=ea(3),qa=ea(4),xX=ea(5),EX=ea(6);df.range;Kl.range;yX.range;vX.range;qa.range;xX.range;EX.range;const tg=yt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());tg.range;const rg=yt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());rg.range;const Cn=yt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Cn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:yt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Cn.range;const In=yt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());In.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:yt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});In.range;function uI(e,t,r,n,i,a){const o=[[Ii,1,Tn],[Ii,5,5*Tn],[Ii,15,15*Tn],[Ii,30,30*Tn],[a,1,Ir],[a,5,5*Ir],[a,15,15*Ir],[a,30,30*Ir],[i,1,wn],[i,3,3*wn],[i,6,6*wn],[i,12,12*wn],[n,1,_n],[n,2,2*_n],[r,1,X0],[t,1,xE],[t,3,3*xE],[e,1,fh]];function s(l,c,f){const d=c<l;d&&([l,c]=[c,l]);const h=f&&typeof f.range=="function"?f:u(l,c,f),p=h?h.range(l,+c+1):[];return d?p.reverse():p}function u(l,c,f){const d=Math.abs(c-l)/f,h=j0(([,,y])=>y).right(o,d);if(h===o.length)return e.every($p(l/fh,c/fh,f));if(h===0)return Vl.every(Math.max($p(l,c,f),1));const[p,b]=o[d/o[h-1][2]<o[h][2]/d?h-1:h];return p.every(b)}return[s,u]}const[TX,wX]=uI(In,rg,df,sI,eg,Q0),[AX,SX]=uI(Cn,tg,ff,iu,J0,Z0);function dh(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function hh(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function ko(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function kX(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,u=e.shortMonths,l=_o(i),c=Co(i),f=_o(a),d=Co(a),h=_o(o),p=Co(o),b=_o(s),y=Co(s),v=_o(u),T=Co(u),x={a:J,A:V,b:re,B:P,c:null,d:kE,e:kE,f:GX,g:aZ,G:sZ,H:VX,I:YX,j:KX,L:lI,m:XX,M:ZX,p:le,q:he,Q:IE,s:OE,S:QX,u:JX,U:eZ,V:tZ,w:rZ,W:nZ,x:null,X:null,y:iZ,Y:oZ,Z:uZ,"%":CE},S={a:N,A:pe,b:we,B:ce,c:null,d:_E,e:_E,f:dZ,g:TZ,G:AZ,H:lZ,I:cZ,j:fZ,L:fI,m:hZ,M:pZ,p:fe,q:be,Q:IE,s:OE,S:mZ,u:gZ,U:bZ,V:yZ,w:vZ,W:xZ,x:null,X:null,y:EZ,Y:wZ,Z:SZ,"%":CE},w={a:C,A:M,b:L,B:Q,c:H,d:AE,e:AE,f:HX,g:wE,G:TE,H:SE,I:SE,j:BX,L:UX,m:jX,M:FX,p:R,q:MX,Q:qX,s:WX,S:$X,u:NX,U:PX,V:DX,w:OX,W:RX,x:U,X:q,y:wE,Y:TE,Z:LX,"%":zX};x.x=A(r,x),x.X=A(n,x),x.c=A(t,x),S.x=A(r,S),S.X=A(n,S),S.c=A(t,S);function A(Y,G){return function(ue){var W=[],$e=-1,Oe=0,st=Y.length,rt,er,xe;for(ue instanceof Date||(ue=new Date(+ue));++$e<st;)Y.charCodeAt($e)===37&&(W.push(Y.slice(Oe,$e)),(er=EE[rt=Y.charAt(++$e)])!=null?rt=Y.charAt(++$e):er=rt==="e"?" ":"0",(xe=G[rt])&&(rt=xe(ue,er)),W.push(rt),Oe=$e+1);return W.push(Y.slice(Oe,$e)),W.join("")}}function _(Y,G){return function(ue){var W=ko(1900,void 0,1),$e=O(W,Y,ue+="",0),Oe,st;if($e!=ue.length)return null;if("Q"in W)return new Date(W.Q);if("s"in W)return new Date(W.s*1e3+("L"in W?W.L:0));if(G&&!("Z"in W)&&(W.Z=0),"p"in W&&(W.H=W.H%12+W.p*12),W.m===void 0&&(W.m="q"in W?W.q:0),"V"in W){if(W.V<1||W.V>53)return null;"w"in W||(W.w=1),"Z"in W?(Oe=hh(ko(W.y,0,1)),st=Oe.getUTCDay(),Oe=st>4||st===0?Kl.ceil(Oe):Kl(Oe),Oe=cf.offset(Oe,(W.V-1)*7),W.y=Oe.getUTCFullYear(),W.m=Oe.getUTCMonth(),W.d=Oe.getUTCDate()+(W.w+6)%7):(Oe=dh(ko(W.y,0,1)),st=Oe.getDay(),Oe=st>4||st===0?Yl.ceil(Oe):Yl(Oe),Oe=iu.offset(Oe,(W.V-1)*7),W.y=Oe.getFullYear(),W.m=Oe.getMonth(),W.d=Oe.getDate()+(W.w+6)%7)}else("W"in W||"U"in W)&&("w"in W||(W.w="u"in W?W.u%7:"W"in W?1:0),st="Z"in W?hh(ko(W.y,0,1)).getUTCDay():dh(ko(W.y,0,1)).getDay(),W.m=0,W.d="W"in W?(W.w+6)%7+W.W*7-(st+5)%7:W.w+W.U*7-(st+6)%7);return"Z"in W?(W.H+=W.Z/100|0,W.M+=W.Z%100,hh(W)):dh(W)}}function O(Y,G,ue,W){for(var $e=0,Oe=G.length,st=ue.length,rt,er;$e<Oe;){if(W>=st)return-1;if(rt=G.charCodeAt($e++),rt===37){if(rt=G.charAt($e++),er=w[rt in EE?G.charAt($e++):rt],!er||(W=er(Y,ue,W))<0)return-1}else if(rt!=ue.charCodeAt(W++))return-1}return W}function R(Y,G,ue){var W=l.exec(G.slice(ue));return W?(Y.p=c.get(W[0].toLowerCase()),ue+W[0].length):-1}function C(Y,G,ue){var W=h.exec(G.slice(ue));return W?(Y.w=p.get(W[0].toLowerCase()),ue+W[0].length):-1}function M(Y,G,ue){var W=f.exec(G.slice(ue));return W?(Y.w=d.get(W[0].toLowerCase()),ue+W[0].length):-1}function L(Y,G,ue){var W=v.exec(G.slice(ue));return W?(Y.m=T.get(W[0].toLowerCase()),ue+W[0].length):-1}function Q(Y,G,ue){var W=b.exec(G.slice(ue));return W?(Y.m=y.get(W[0].toLowerCase()),ue+W[0].length):-1}function H(Y,G,ue){return O(Y,t,G,ue)}function U(Y,G,ue){return O(Y,r,G,ue)}function q(Y,G,ue){return O(Y,n,G,ue)}function J(Y){return o[Y.getDay()]}function V(Y){return a[Y.getDay()]}function re(Y){return u[Y.getMonth()]}function P(Y){return s[Y.getMonth()]}function le(Y){return i[+(Y.getHours()>=12)]}function he(Y){return 1+~~(Y.getMonth()/3)}function N(Y){return o[Y.getUTCDay()]}function pe(Y){return a[Y.getUTCDay()]}function we(Y){return u[Y.getUTCMonth()]}function ce(Y){return s[Y.getUTCMonth()]}function fe(Y){return i[+(Y.getUTCHours()>=12)]}function be(Y){return 1+~~(Y.getUTCMonth()/3)}return{format:function(Y){var G=A(Y+="",x);return G.toString=function(){return Y},G},parse:function(Y){var G=_(Y+="",!1);return G.toString=function(){return Y},G},utcFormat:function(Y){var G=A(Y+="",S);return G.toString=function(){return Y},G},utcParse:function(Y){var G=_(Y+="",!0);return G.toString=function(){return Y},G}}}var EE={"-":"",_:" ",0:"0"},Ct=/^\s*\d+/,_X=/^%/,CX=/[\\^$*+?|[\]().{}]/g;function Re(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function IX(e){return e.replace(CX,"\\$&")}function _o(e){return new RegExp("^(?:"+e.map(IX).join("|")+")","i")}function Co(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function OX(e,t,r){var n=Ct.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function NX(e,t,r){var n=Ct.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function PX(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function DX(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function RX(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function TE(e,t,r){var n=Ct.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function wE(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function LX(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function MX(e,t,r){var n=Ct.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function jX(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function AE(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function BX(e,t,r){var n=Ct.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function SE(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function FX(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function $X(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function UX(e,t,r){var n=Ct.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function HX(e,t,r){var n=Ct.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function zX(e,t,r){var n=_X.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function qX(e,t,r){var n=Ct.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function WX(e,t,r){var n=Ct.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function kE(e,t){return Re(e.getDate(),t,2)}function VX(e,t){return Re(e.getHours(),t,2)}function YX(e,t){return Re(e.getHours()%12||12,t,2)}function KX(e,t){return Re(1+iu.count(Cn(e),e),t,3)}function lI(e,t){return Re(e.getMilliseconds(),t,3)}function GX(e,t){return lI(e,t)+"000"}function XX(e,t){return Re(e.getMonth()+1,t,2)}function ZX(e,t){return Re(e.getMinutes(),t,2)}function QX(e,t){return Re(e.getSeconds(),t,2)}function JX(e){var t=e.getDay();return t===0?7:t}function eZ(e,t){return Re(ff.count(Cn(e)-1,e),t,2)}function cI(e){var t=e.getDay();return t>=4||t===0?za(e):za.ceil(e)}function tZ(e,t){return e=cI(e),Re(za.count(Cn(e),e)+(Cn(e).getDay()===4),t,2)}function rZ(e){return e.getDay()}function nZ(e,t){return Re(Yl.count(Cn(e)-1,e),t,2)}function iZ(e,t){return Re(e.getFullYear()%100,t,2)}function aZ(e,t){return e=cI(e),Re(e.getFullYear()%100,t,2)}function oZ(e,t){return Re(e.getFullYear()%1e4,t,4)}function sZ(e,t){var r=e.getDay();return e=r>=4||r===0?za(e):za.ceil(e),Re(e.getFullYear()%1e4,t,4)}function uZ(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Re(t/60|0,"0",2)+Re(t%60,"0",2)}function _E(e,t){return Re(e.getUTCDate(),t,2)}function lZ(e,t){return Re(e.getUTCHours(),t,2)}function cZ(e,t){return Re(e.getUTCHours()%12||12,t,2)}function fZ(e,t){return Re(1+cf.count(In(e),e),t,3)}function fI(e,t){return Re(e.getUTCMilliseconds(),t,3)}function dZ(e,t){return fI(e,t)+"000"}function hZ(e,t){return Re(e.getUTCMonth()+1,t,2)}function pZ(e,t){return Re(e.getUTCMinutes(),t,2)}function mZ(e,t){return Re(e.getUTCSeconds(),t,2)}function gZ(e){var t=e.getUTCDay();return t===0?7:t}function bZ(e,t){return Re(df.count(In(e)-1,e),t,2)}function dI(e){var t=e.getUTCDay();return t>=4||t===0?qa(e):qa.ceil(e)}function yZ(e,t){return e=dI(e),Re(qa.count(In(e),e)+(In(e).getUTCDay()===4),t,2)}function vZ(e){return e.getUTCDay()}function xZ(e,t){return Re(Kl.count(In(e)-1,e),t,2)}function EZ(e,t){return Re(e.getUTCFullYear()%100,t,2)}function TZ(e,t){return e=dI(e),Re(e.getUTCFullYear()%100,t,2)}function wZ(e,t){return Re(e.getUTCFullYear()%1e4,t,4)}function AZ(e,t){var r=e.getUTCDay();return e=r>=4||r===0?qa(e):qa.ceil(e),Re(e.getUTCFullYear()%1e4,t,4)}function SZ(){return"+0000"}function CE(){return"%"}function IE(e){return+e}function OE(e){return Math.floor(+e/1e3)}var da,hI,pI;kZ({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function kZ(e){return da=kX(e),hI=da.format,da.parse,pI=da.utcFormat,da.utcParse,da}function _Z(e){return new Date(e)}function CZ(e){return e instanceof Date?+e:+new Date(+e)}function ng(e,t,r,n,i,a,o,s,u,l){var c=z0(),f=c.invert,d=c.domain,h=l(".%L"),p=l(":%S"),b=l("%I:%M"),y=l("%I %p"),v=l("%a %d"),T=l("%b %d"),x=l("%B"),S=l("%Y");function w(A){return(u(A)<A?h:s(A)<A?p:o(A)<A?b:a(A)<A?y:n(A)<A?i(A)<A?v:T:r(A)<A?x:S)(A)}return c.invert=function(A){return new Date(f(A))},c.domain=function(A){return arguments.length?d(Array.from(A,CZ)):d().map(_Z)},c.ticks=function(A){var _=d();return e(_[0],_[_.length-1],A??10)},c.tickFormat=function(A,_){return _==null?w:l(_)},c.nice=function(A){var _=d();return(!A||typeof A.range!="function")&&(A=t(_[0],_[_.length-1],A??10)),A?d(eI(_,A)):c},c.copy=function(){return nu(c,ng(e,t,r,n,i,a,o,s,u,l))},c}function IZ(){return Nr.apply(ng(AX,SX,Cn,tg,ff,iu,J0,Z0,Ii,hI).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function OZ(){return Nr.apply(ng(TX,wX,In,rg,df,cf,eg,Q0,Ii,pI).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function hf(){var e=0,t=1,r,n,i,a,o=Gt,s=!1,u;function l(f){return f==null||isNaN(f=+f)?u:o(i===0?.5:(f=(a(f)-r)*i,s?Math.max(0,Math.min(1,f)):f))}l.domain=function(f){return arguments.length?([e,t]=f,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),l):[e,t]},l.clamp=function(f){return arguments.length?(s=!!f,l):s},l.interpolator=function(f){return arguments.length?(o=f,l):o};function c(f){return function(d){var h,p;return arguments.length?([h,p]=d,o=f(h,p),l):[o(0),o(1)]}}return l.range=c(io),l.rangeRound=c(H0),l.unknown=function(f){return arguments.length?(u=f,l):u},function(f){return a=f,r=f(e),n=f(t),i=r===n?0:1/(n-r),l}}function fi(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function mI(){var e=ci(hf()(Gt));return e.copy=function(){return fi(e,mI())},Mn.apply(e,arguments)}function gI(){var e=V0(hf()).domain([1,10]);return e.copy=function(){return fi(e,gI()).base(e.base())},Mn.apply(e,arguments)}function bI(){var e=Y0(hf());return e.copy=function(){return fi(e,bI()).constant(e.constant())},Mn.apply(e,arguments)}function ig(){var e=K0(hf());return e.copy=function(){return fi(e,ig()).exponent(e.exponent())},Mn.apply(e,arguments)}function NZ(){return ig.apply(null,arguments).exponent(.5)}function yI(){var e=[],t=Gt;function r(n){if(n!=null&&!isNaN(n=+n))return t((tu(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Jn),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>gG(e,a/n))},r.copy=function(){return yI(t).domain(e)},Mn.apply(r,arguments)}function pf(){var e=0,t=.5,r=1,n=1,i,a,o,s,u,l=Gt,c,f=!1,d;function h(b){return isNaN(b=+b)?d:(b=.5+((b=+c(b))-a)*(n*b<n*a?s:u),l(f?Math.max(0,Math.min(1,b)):b))}h.domain=function(b){return arguments.length?([e,t,r]=b,i=c(e=+e),a=c(t=+t),o=c(r=+r),s=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),n=a<i?-1:1,h):[e,t,r]},h.clamp=function(b){return arguments.length?(f=!!b,h):f},h.interpolator=function(b){return arguments.length?(l=b,h):l};function p(b){return function(y){var v,T,x;return arguments.length?([v,T,x]=y,l=zG(b,[v,T,x]),h):[l(0),l(.5),l(1)]}}return h.range=p(io),h.rangeRound=p(H0),h.unknown=function(b){return arguments.length?(d=b,h):d},function(b){return c=b,i=b(e),a=b(t),o=b(r),s=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),n=a<i?-1:1,h}}function vI(){var e=ci(pf()(Gt));return e.copy=function(){return fi(e,vI())},Mn.apply(e,arguments)}function xI(){var e=V0(pf()).domain([.1,1,10]);return e.copy=function(){return fi(e,xI()).base(e.base())},Mn.apply(e,arguments)}function EI(){var e=Y0(pf());return e.copy=function(){return fi(e,EI()).constant(e.constant())},Mn.apply(e,arguments)}function ag(){var e=K0(pf());return e.copy=function(){return fi(e,ag()).exponent(e.exponent())},Mn.apply(e,arguments)}function PZ(){return ag.apply(null,arguments).exponent(.5)}const TI=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:F0,scaleDiverging:vI,scaleDivergingLog:xI,scaleDivergingPow:ag,scaleDivergingSqrt:PZ,scaleDivergingSymlog:EI,scaleIdentity:JC,scaleImplicit:Up,scaleLinear:QC,scaleLog:tI,scaleOrdinal:B0,scalePoint:vG,scalePow:G0,scaleQuantile:iI,scaleQuantize:aI,scaleRadial:nI,scaleSequential:mI,scaleSequentialLog:gI,scaleSequentialPow:ig,scaleSequentialQuantile:yI,scaleSequentialSqrt:NZ,scaleSequentialSymlog:bI,scaleSqrt:dX,scaleSymlog:rI,scaleThreshold:oI,scaleTime:IZ,scaleUtc:OZ,tickFormat:ZC},Symbol.toStringTag,{value:"Module"}));function DZ(e){var t=TI;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(Ws(e));if(r in t&&typeof t[r]=="function")return t[r]()}function NE(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var n=DZ(e);if(n!=null)return n.domain(t).range(r),n}}function og(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?NE(e.scale,r,n):NE(t,r,n)}function RZ(e){return"scale".concat(Ws(e))}function LZ(e){return RZ(e)in TI}var wI=(e,t,r)=>{if(e!=null){var{scale:n,type:i}=e;if(n==="auto")return i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":i==="category"?"band":"linear";if(typeof n=="string")return LZ(n)?n:"point"}};function MZ(e,t){for(var r=0,n=e.length,i=e[0]<e[e.length-1];r<n;){var a=Math.floor((r+n)/2);(i?e[a]<t:e[a]>t)?r=a+1:n=a}return r}function AI(e,t){if(e){var r=t??e.domain(),n=r.map(a=>{var o;return(o=e(a))!==null&&o!==void 0?o:0}),i=e.range();if(!(r.length===0||i.length<2))return a=>{var o,s,u=MZ(n,a);if(u<=0)return r[0];if(u>=r.length)return r[r.length-1];var l=(o=n[u-1])!==null&&o!==void 0?o:0,c=(s=n[u])!==null&&s!==void 0?s:0;return Math.abs(a-l)<=Math.abs(a-c)?r[u-1]:r[u]}}}function jZ(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):AI(e,void 0)}function PE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Gl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PE(Object(r),!0).forEach(function(n){BZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BZ(e,t,r){return(t=FZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FZ(e){var t=$Z(e,"string");return typeof t=="symbol"?t:t+""}function $Z(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Wp=[0,"auto"],pt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},SI=(e,t)=>e.cartesianAxis.xAxis[t],dn=(e,t)=>{var r=SI(e,t);return r??pt},mt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Wp,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:Ks},kI=(e,t)=>e.cartesianAxis.yAxis[t],hn=(e,t)=>{var r=kI(e,t);return r??mt},UZ={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},sg=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??UZ},Jt=(e,t,r)=>{switch(t){case"xAxis":return dn(e,r);case"yAxis":return hn(e,r);case"zAxis":return sg(e,r);case"angleAxis":return P0(e,r);case"radiusAxis":return D0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},HZ=(e,t,r)=>{switch(t){case"xAxis":return dn(e,r);case"yAxis":return hn(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},au=(e,t,r)=>{switch(t){case"xAxis":return dn(e,r);case"yAxis":return hn(e,r);case"angleAxis":return P0(e,r);case"radiusAxis":return D0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},_I=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function CI(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var mf=e=>e.graphicalItems.cartesianItems,zZ=B([kt,af],CI),II=(e,t,r)=>e.filter(r).filter(n=>t?.includeHidden===!0?!0:!n.hide),ao=B([mf,Jt,zZ],II,{memoizeOptions:{resultEqualityCheck:uf}}),OI=B([ao],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(of)),NI=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),qZ=B([ao],NI),PI=e=>e.map(t=>t.data).filter(Boolean).flat(1),WZ=B([ao],e=>e.some(t=>!t.data)),DI=B([ao],PI,{memoizeOptions:{resultEqualityCheck:uf}}),RI=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},ug=B([DI,eu],RI),VZ=(e,t,r)=>t?.dataKey!=null?e.map(n=>({value:lt(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:lt(i,n)}))):e.map(n=>({value:n})),LI=(e,t,r,n,i,a)=>{var{chartData:o=[],dataStartIndex:s,dataEndIndex:u}=n,l=VZ(e,t,r);if(i&&t?.dataKey!=null&&a.length>0){var c=o.slice(s,u+1),f=c.map(d=>({value:lt(d,t.dataKey)})).filter(d=>d.value!=null);return[...f,...l]}return l},ou=B([ug,Jt,ao,eu,WZ,DI],LI);function Oa(e){if(jt(e)||e instanceof Date){var t=Number(e);if(Te(t))return t}}function DE(e){if(Array.isArray(e)){var t=[Oa(e[0]),Oa(e[1])];return tn(t)?t:void 0}var r=Oa(e);if(r!=null)return[r,r]}function ln(e){return e.map(Oa).filter(ir)}function YZ(e,t){var r=Oa(e),n=Oa(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var KZ=B([ou],e=>e?.map(t=>t.value).sort(YZ));function MI(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function GZ(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!sn(t))n=t;else if(Array.isArray(t)){var i=ln(t);i.length>0&&(n=Math.max(...i))}return n==null?[]:ln(r.flatMap(a=>{var o=lt(e,a.dataKey),s,u;if(Array.isArray(o)?[s,u]=o:s=u=o,!(!Te(s)||!Te(u)))return[n-s,n+u]}))}var vt=e=>{var t=_t(e),r=no(e);return au(e,t,r)},Wa=B([vt],e=>e?.dataKey),XZ=B([OI,eu,vt],HC),jI=(e,t,r,n)=>{var i={},a=t.reduce((o,s)=>{if(s.stackId==null)return o;var u=o[s.stackId];return u==null&&(u=[]),u.push(s),o[s.stackId]=u,o},i);return Object.fromEntries(Object.entries(a).map(o=>{var[s,u]=o,l=n?[...u].reverse():u,c=l.map(L0);return[s,{stackedData:uV(e,c,r),graphicalItems:l}]}))},Vp=B([XZ,OI,ef,LC],jI),BI=(e,t,r,n)=>{var{dataStartIndex:i,dataEndIndex:a}=t;if(n==null&&r!=="zAxis"){var o=hV(e,i,a);if(!(o!=null&&o[0]===0&&o[1]===0))return o}},ZZ=B([Jt],e=>e.allowDataOverflow),lg=e=>{var t;if(e==null||!("domain"in e))return Wp;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=ln(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:Wp},FI=B([Jt],lg),$I=B([FI,ZZ],TC),QZ=B([Vp,Wr,kt,$I],BI,{memoizeOptions:{resultEqualityCheck:sf}}),cg=e=>e.errorBars,JZ=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>MI(r,n)),Xl=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.filter(Boolean);if(i.length!==0){var a=i.flat(),o=Math.min(...a),s=Math.max(...a);return[o,s]}},UI=function(t,r,n,i,a){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],s,u;if(n.length>0&&n.forEach(l=>{var c,f=l.data!=null?[...l.data]:o,d=(c=i[l.id])===null||c===void 0?void 0:c.filter(h=>MI(a,h));f.forEach(h=>{var p,b=lt(h,(p=r.dataKey)!==null&&p!==void 0?p:l.dataKey),y=GZ(h,b,d);if(y.length>=2){var v=Math.min(...y),T=Math.max(...y);(s==null||v<s)&&(s=v),(u==null||T>u)&&(u=T)}var x=DE(b);x!=null&&(s=s==null?x[0]:Math.min(s,x[0]),u=u==null?x[1]:Math.max(u,x[1]))})}),r?.dataKey!=null&&n.length===0&&t.forEach(l=>{var c=DE(lt(l,r.dataKey));c!=null&&(s=s==null?c[0]:Math.min(s,c[0]),u=u==null?c[1]:Math.max(u,c[1]))}),Te(s)&&Te(u))return[s,u]},eQ=B([ug,Jt,qZ,cg,kt,HK],UI,{memoizeOptions:{resultEqualityCheck:sf}});function tQ(e){var{value:t}=e;if(jt(t)||t instanceof Date)return t}var rQ=(e,t,r)=>{var n=e.map(tQ).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&t_(n))?EC(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},HI=e=>e.referenceElements.dots,oo=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),nQ=B([HI,kt,af],oo),zI=e=>e.referenceElements.areas,iQ=B([zI,kt,af],oo),qI=e=>e.referenceElements.lines,aQ=B([qI,kt,af],oo),WI=(e,t)=>{if(e!=null){var r=ln(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},oQ=B(nQ,kt,WI),VI=(e,t)=>{if(e!=null){var r=ln(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},sQ=B([iQ,kt],VI);function uQ(e){var t;if(e.x!=null)return ln([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:ln(r)}function lQ(e){var t;if(e.y!=null)return ln([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:ln(r)}var YI=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?uQ(n):lQ(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},cQ=B([aQ,kt],YI),fQ=B(oQ,cQ,sQ,(e,t,r)=>Xl(e,r,t)),KI=(e,t,r,n,i,a,o,s)=>{if(r!=null)return r;var u=o==="vertical"&&s==="xAxis"||o==="horizontal"&&s==="yAxis",l=u?Xl(n,a,i):Xl(a,i);return qK(t,l,e.allowDataOverflow)},dQ=B([Jt,FI,$I,QZ,eQ,fQ,Fe,kt],KI,{memoizeOptions:{resultEqualityCheck:sf}}),hQ=[0,1],GI=(e,t,r,n,i,a,o)=>{if(!((e==null||r==null||r.length===0)&&o===void 0)){var{dataKey:s,type:u}=e,l=Dn(t,a);if(l&&s==null){var c;return EC(0,(c=r?.length)!==null&&c!==void 0?c:0)}return u==="category"?rQ(n,e,l):i==="expand"&&!l?hQ:o}},fg=B([Jt,Fe,ug,ou,ef,kt,dQ],GI),so=B([Jt,_I,I0],wI),XI=(e,t,r)=>{var{niceTicks:n}=t;if(n!=="none"){var i=lg(t),a=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&tn(e)){if(a)return zx(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return qx(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(a&&tn(e))return zx(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&tn(e))return qx(e,t.tickCount,t.allowDecimals,"adaptive")}}},dg=B([fg,au,so],XI),ZI=(e,t,r,n)=>{if(n!=="angleAxis"&&e?.type==="number"&&tn(t)&&Array.isArray(r)&&r.length>0){var i,a,o=t[0],s=(i=r[0])!==null&&i!==void 0?i:0,u=t[1],l=(a=r[r.length-1])!==null&&a!==void 0?a:0;return[Math.min(o,s),Math.max(u,l)]}return t},pQ=B([Jt,fg,dg,kt],ZI),mQ=B(ou,Jt,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(ln(e.map(f=>f.value))).sort((f,d)=>f-d),i=n[0],a=n[n.length-1];if(i==null||a==null)return 1/0;var o=a-i;if(o===0)return 1/0;for(var s=0;s<n.length-1;s++){var u=n[s],l=n[s+1];if(!(u==null||l==null)){var c=l-u;r=Math.min(r,c)}}return r/o}}),QI=B(mQ,Fe,RC,At,(e,t,r,n,i)=>i,(e,t,r,n,i)=>{if(!Te(e))return 0;var a=t==="vertical"?n.height:n.width;if(i==="gap")return e*a/2;if(i==="no-gap"){var o=$r(r,e*a),s=e*a/2;return s-o-(s-o)/a*o}return 0}),gQ=(e,t,r)=>{var n=dn(e,t);return n==null||typeof n.padding!="string"?0:QI(e,"xAxis",t,r,n.padding)},bQ=(e,t,r)=>{var n=hn(e,t);return n==null||typeof n.padding!="string"?0:QI(e,"yAxis",t,r,n.padding)},yQ=B(dn,gQ,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((r=i.left)!==null&&r!==void 0?r:0)+t,right:((n=i.right)!==null&&n!==void 0?n:0)+t}}),vQ=B(hn,bQ,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((r=i.top)!==null&&r!==void 0?r:0)+t,bottom:((n=i.bottom)!==null&&n!==void 0?n:0)+t}}),xQ=B([At,yQ,Kc,Yc,(e,t,r)=>r],(e,t,r,n,i)=>{var{padding:a}=n;return i?[a.left,r.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),EQ=B([At,Fe,vQ,Kc,Yc,(e,t,r)=>r],(e,t,r,n,i,a)=>{var{padding:o}=i;return a?[n.height-o.bottom,o.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),su=(e,t,r,n)=>{var i;switch(t){case"xAxis":return xQ(e,r,n);case"yAxis":return EQ(e,r,n);case"zAxis":return(i=sg(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return FC(e);case"radiusAxis":return $C(e,r);default:return}},JI=B([Jt,su],tf),TQ=B([so,pQ],iG),hg=B([Jt,so,TQ,JI],og),eO=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:i,scale:a}=r,o=Dn(e,n);if(o&&(i==="number"||a!=="auto"))return t.map(s=>s.value)}},pg=B([Fe,ou,au,kt],eO),ii=B([hg],M0);B([hg],jZ);B([hg,KZ],AI);B([ao,cg,kt],JZ);function tO(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var gf=(e,t)=>t,bf=(e,t,r)=>r,wQ=B(Wc,gf,bf,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(tO)),AQ=B(Vc,gf,bf,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(tO)),rO=(e,t)=>({width:e.width,height:t.height}),SQ=(e,t)=>{var r=typeof t.width=="number"?t.width:Ks;return{width:r,height:e.height}},nO=B(At,dn,rO),kQ=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},_Q=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},CQ=B(Ln,At,wQ,gf,bf,(e,t,r,n,i)=>{var a={},o;return r.forEach(s=>{var u=rO(t,s);o==null&&(o=kQ(t,n,e));var l=n==="top"&&!i||n==="bottom"&&i;a[s.id]=o-Number(l)*u.height,o+=(l?-1:1)*u.height}),a}),IQ=B(Rn,At,AQ,gf,bf,(e,t,r,n,i)=>{var a={},o;return r.forEach(s=>{var u=SQ(t,s);o==null&&(o=_Q(t,n,e));var l=n==="left"&&!i||n==="right"&&i;a[s.id]=o-Number(l)*u.width,o+=(l?-1:1)*u.width}),a}),OQ=(e,t)=>{var r=dn(e,t);if(r!=null)return CQ(e,r.orientation,r.mirror)},NQ=B([At,dn,OQ,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r?.[n];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),PQ=(e,t)=>{var r=hn(e,t);if(r!=null)return IQ(e,r.orientation,r.mirror)},DQ=B([At,hn,PQ,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r?.[n];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),iO=B(At,hn,(e,t)=>{var r=typeof t.width=="number"?t.width:Ks;return{width:r,height:e.height}}),RE=(e,t,r)=>{switch(t){case"xAxis":return nO(e,r).width;case"yAxis":return iO(e,r).height;default:return}},aO=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:i,type:a,dataKey:o}=r,s=Dn(e,n),u=t.map(c=>c.value),l=u.filter(c=>c!=null);if(o&&s&&a==="category"&&i&&t_(l))return u}},mg=B([Fe,ou,Jt,kt],aO),LE=B([Fe,HZ,so,ii,mg,pg,su,dg,kt],(e,t,r,n,i,a,o,s,u)=>{if(t!=null){var l=Dn(e,u);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:u,categoricalDomain:a,duplicateDomain:i,isCategorical:l,niceTicks:s,range:o,realScaleType:r,scale:n}}}),RQ=(e,t,r,n,i,a,o,s,u)=>{if(!(t==null||n==null)){var l=Dn(e,u),{type:c,ticks:f,tickCount:d}=t,h=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,p=c==="category"&&n.bandwidth?n.bandwidth()/h:0;p=u==="angleAxis"&&a!=null&&a.length>=2?nr(a[0]-a[1])*2*p:p;var b=f||i;return b?b.map((y,v)=>{var T=o?o.indexOf(y):y,x=n.map(T);return Te(x)?{index:v,coordinate:x+p,value:y,offset:p}:null}).filter(ir):l&&s?s.map((y,v)=>{var T=n.map(y);return Te(T)?{coordinate:T+p,value:y,index:v,offset:p}:null}).filter(ir):n.ticks?n.ticks(d).map((y,v)=>{var T=n.map(y);return Te(T)?{coordinate:T+p,value:y,index:v,offset:p}:null}).filter(ir):n.domain().map((y,v)=>{var T=n.map(y);return Te(T)?{coordinate:T+p,value:o?o[y]:y,index:v,offset:p}:null}).filter(ir)}},oO=B([Fe,au,so,ii,dg,su,mg,pg,kt],RQ),LQ=(e,t,r,n,i,a,o)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var s=Dn(e,o),{tickCount:u}=t,l=0;return l=o==="angleAxis"&&n?.length>=2?nr(n[0]-n[1])*2*l:l,s&&a?a.map((c,f)=>{var d=r.map(c);return Te(d)?{coordinate:d+l,value:c,index:f,offset:l}:null}).filter(ir):r.ticks?r.ticks(u).map((c,f)=>{var d=r.map(c);return Te(d)?{coordinate:d+l,value:c,index:f,offset:l}:null}).filter(ir):r.domain().map((c,f)=>{var d=r.map(c);return Te(d)?{coordinate:d+l,value:i?i[c]:c,index:f,offset:l}:null}).filter(ir)}},ai=B([Fe,au,ii,su,mg,pg,kt],LQ),oi=B(Jt,ii,(e,t)=>{if(!(e==null||t==null))return Gl(Gl({},e),{},{scale:t})}),MQ=B([Jt,so,fg,JI],og),jQ=B([MQ],M0);B((e,t,r)=>sg(e,r),jQ,(e,t)=>{if(!(e==null||t==null))return Gl(Gl({},e),{},{scale:t})});var BQ=B([Fe,Wc,Vc],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),FQ=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};B([FQ],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,i=e[0];for(var a of e){var o=Math.abs(a.coordinate-t);o<n&&(n=o,i=a)}return(r=i)===null||r===void 0?void 0:r.value}});var sO=e=>e.options.defaultTooltipEventType,uO=e=>e.options.validateTooltipEventTypes;function lO(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function uu(e,t){var r=sO(e),n=uO(e);return lO(t,r,n)}function $Q(e){return oe(t=>uu(t,e))}var cO=(e,t)=>{var r,n=Number(t);if(!(sn(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},UQ=e=>e.tooltip.settings,Gn={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},HQ={itemInteraction:{click:Gn,hover:Gn},axisInteraction:{click:Gn,hover:Gn},keyboardInteraction:Gn,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},fO=$t({name:"tooltip",initialState:HQ,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:Xe()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,i=Cr(e).tooltipItemPayloads.indexOf(r);i>-1&&(e.tooltipItemPayloads[i]=n)},prepare:Xe()},removeTooltipEntrySettings:{reducer(e,t){var r=Cr(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:Xe()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:zQ,replaceTooltipEntrySettings:qQ,removeTooltipEntrySettings:WQ,setTooltipSettingsState:VQ,setActiveMouseOverItemIndex:dO,mouseLeaveItem:YQ,mouseLeaveChart:hO,setActiveClickItemIndex:KQ,setMouseOverAxisIndex:pO,setMouseClickAxisIndex:GQ,setSyncInteraction:jo,setKeyboardInteraction:Zl}=fO.actions,XQ=fO.reducer;function ME(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ru(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ME(Object(r),!0).forEach(function(n){ZQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ME(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ZQ(e,t,r){return(t=QQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QQ(e){var t=JQ(e,"string");return typeof t=="symbol"?t:t+""}function JQ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eJ(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function tJ(e){return e.index!=null}var mO=(e,t,r,n)=>{if(t==null)return Gn;var i=eJ(e,t,r);if(i==null)return Gn;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var a=e.settings.active===!0;if(tJ(i)){if(a)return Ru(Ru({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return Ru(Ru({},Gn),{},{coordinate:i.coordinate})};function rJ(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}function nJ(e,t){var r=rJ(e),n=t[0],i=t[1];if(r===void 0)return!1;var a=Math.min(n,i),o=Math.max(n,i);return r>=a&&r<=o}function iJ(e,t,r){if(r==null||t==null)return!0;var n=lt(e,t);return n==null||!tn(r)?!0:nJ(n,r)}var Qo=(e,t,r,n)=>{var i=e?.index;if(i==null)return null;var a=Number(i);if(!Te(a))return i;var o=0,s=1/0;t.length>0&&(s=t.length-1);var u=Math.max(o,Math.min(a,s)),l=t[u];return l==null||iJ(l,r,n)?String(u):null},gO=(e,t,r,n,i,a,o)=>{if(a!=null){var s=o[0],u=s?.getPosition(a);if(u!=null)return u;var l=i?.[Number(a)];if(l)return r==="horizontal"?{x:l.coordinate,y:(n.top+t)/2}:{x:(n.left+e)/2,y:l.coordinate}}},bO=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(r==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&(n!=null||e.keyboardInteraction.active)){var a=e.tooltipItemPayloads[0];return a!=null?[a]:[]}return e.tooltipItemPayloads.filter(o=>{var s;return((s=o.settings)===null||s===void 0?void 0:s.graphicalItemId)===i})},yO=e=>e.options.tooltipPayloadSearcher,uo=e=>e.tooltip;function jE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function BE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jE(Object(r),!0).forEach(function(n){aJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aJ(e,t,r){return(t=oJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oJ(e){var t=sJ(e,"string");return typeof t=="symbol"?t:t+""}function sJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uJ(e){if(typeof e=="string"||typeof e=="number")return e}function lJ(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function cJ(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function FE(e){if(typeof e=="string")return e}function fJ(e){if(!(e==null||typeof e!="object")){var t="name"in e?uJ(e.name):void 0,r="unit"in e?lJ(e.unit):void 0,n="dataKey"in e?cJ(e.dataKey):void 0,i="payload"in e?e.payload:void 0,a="color"in e?FE(e.color):void 0,o="fill"in e?FE(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:i,color:a,fill:o}}}function dJ(e,t){return e??t}var vO=(e,t,r,n,i,a,o)=>{if(!(t==null||a==null)){var{chartData:s,computedData:u,dataStartIndex:l,dataEndIndex:c}=r,f=[];return e.reduce((d,h)=>{var p,{dataDefinedOnItem:b,settings:y}=h,v=dJ(b,s),T=Array.isArray(v)?K_(v,l,c):v,x=(p=y?.dataKey)!==null&&p!==void 0?p:n,S=y?.nameKey,w;if(n&&Array.isArray(T)&&!Array.isArray(T[0])&&o==="axis"?w=r_(T,n,i):w=a(T,t,u,S),Array.isArray(w))w.forEach(_=>{var O,R,C=fJ(_),M=C?.name,L=C?.dataKey,Q=C?.payload,H=BE(BE({},y),{},{name:M,unit:C?.unit,color:(O=C?.color)!==null&&O!==void 0?O:y?.color,fill:(R=C?.fill)!==null&&R!==void 0?R:y?.fill});d.push(B1({tooltipEntrySettings:H,dataKey:L,payload:Q,value:lt(Q,L),name:M==null?void 0:String(M)}))});else{var A;d.push(B1({tooltipEntrySettings:y,dataKey:x,payload:w,value:lt(w,x),name:(A=lt(w,S))!==null&&A!==void 0?A:y?.name}))}return d},f)}},gg=B([vt,_I,I0],wI),hJ=B([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),pJ=B([_t,no],CI),ta=B([hJ,vt,pJ],II,{memoizeOptions:{resultEqualityCheck:uf}}),mJ=B([ta],e=>e.filter(of)),xO=B([ta],PI,{memoizeOptions:{resultEqualityCheck:uf}}),gJ=B([ta],e=>e.some(t=>!t.data)),Wi=B([xO,Wr],RI),bJ=B([mJ,Wr,vt],HC),bg=B([Wi,vt,ta,Wr,gJ,xO],LI),EO=B([vt],lg),yJ=B([vt],e=>e.allowDataOverflow),TO=B([EO,yJ],TC),vJ=B([ta],e=>e.filter(of)),xJ=B([bJ,vJ,ef,LC],jI),EJ=B([xJ,Wr,_t,TO],BI),TJ=B([ta],NI),wJ=B([Wi,vt,TJ,cg,_t,zK],UI,{memoizeOptions:{resultEqualityCheck:sf}}),AJ=B([HI,_t,no],oo),SJ=B([AJ,_t],WI),kJ=B([zI,_t,no],oo),_J=B([kJ,_t],VI),CJ=B([qI,_t,no],oo),IJ=B([CJ,_t],YI),OJ=B([SJ,IJ,_J],Xl),NJ=B([vt,EO,TO,EJ,wJ,OJ,Fe,_t],KI),Va=B([vt,Fe,Wi,bg,ef,_t,NJ],GI),PJ=B([Va,vt,gg],XI),DJ=B([vt,Va,PJ,_t],ZI),wO=e=>{var t=_t(e),r=no(e),n=!1;return su(e,t,r,n)},AO=B([vt,wO],tf),RJ=B([vt,gg,DJ,AO],og),SO=B([RJ],M0),LJ=B([Fe,bg,vt,_t],aO),MJ=B([Fe,bg,vt,_t],eO),jJ=(e,t,r,n,i,a,o,s)=>{if(t){var{type:u}=t,l=Dn(e,s);if(n){var c=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,f=u==="category"&&n.bandwidth?n.bandwidth()/c:0;return f=s==="angleAxis"&&i!=null&&i?.length>=2?nr(i[0]-i[1])*2*f:f,l&&o?o.map((d,h)=>{var p=n.map(d);return Te(p)?{coordinate:p+f,value:d,index:h,offset:f}:null}).filter(ir):n.domain().map((d,h)=>{var p=n.map(d);return Te(p)?{coordinate:p+f,value:a?a[d]:d,index:h,offset:f}:null}).filter(ir)}}},jn=B([Fe,vt,gg,SO,wO,LJ,MJ,_t],jJ),yg=B([sO,uO,UQ],(e,t,r)=>lO(r.shared,e,t)),kO=e=>e.tooltip.settings.trigger,vg=e=>e.tooltip.settings.defaultIndex,lu=B([uo,yg,kO,vg],mO),Vi=B([lu,Wi,Wa,Va],Qo),_O=B([jn,Vi],cO),CO=B([lu],e=>{if(e)return e.dataKey}),BJ=B([lu],e=>{if(e)return e.graphicalItemId}),IO=B([uo,yg,kO,vg],bO),FJ=B([Rn,Ln,Fe,At,jn,vg,IO],gO),$J=B([lu,FJ],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),UJ=B([lu],e=>{var t;return(t=e?.active)!==null&&t!==void 0?t:!1}),HJ=B([IO,Vi,Wr,Wa,_O,yO,yg],vO),zJ=B([HJ],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function $E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function UE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$E(Object(r),!0).forEach(function(n){qJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$E(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qJ(e,t,r){return(t=WJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WJ(e){var t=VJ(e,"string");return typeof t=="symbol"?t:t+""}function VJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var YJ=()=>oe(vt),KJ=()=>{var e=YJ(),t=oe(jn),r=oe(SO);return $a(!e||!r?void 0:UE(UE({},e),{},{scale:r}),t)};function HE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ha(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HE(Object(r),!0).forEach(function(n){GJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GJ(e,t,r){return(t=XJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XJ(e){var t=ZJ(e,"string");return typeof t=="symbol"?t:t+""}function ZJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var QJ=(e,t,r,n)=>{var i=t.find(a=>a&&a.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.relativeY};if(e==="vertical")return{x:n.relativeX,y:i.coordinate}}return{x:0,y:0}},JJ=(e,t,r,n)=>{var i=t.find(l=>l&&l.index===r);if(i){if(e==="centric"){var a=i.coordinate,{radius:o}=n;return ha(ha(ha({},n),Nt(n.cx,n.cy,o,a)),{},{angle:a,radius:o})}var s=i.coordinate,{angle:u}=n;return ha(ha(ha({},n),Nt(n.cx,n.cy,s,u)),{},{angle:u,radius:s})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function eee(e,t){var{relativeX:r,relativeY:n}=e;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var OO=(e,t,r,n,i)=>{var a,o=(a=t?.length)!==null&&a!==void 0?a:0;if(o<=1||e==null)return 0;if(n==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var s=0;s<o;s++){var u,l,c,f,d,h=s>0?(u=r[s-1])===null||u===void 0?void 0:u.coordinate:(l=r[o-1])===null||l===void 0?void 0:l.coordinate,p=(c=r[s])===null||c===void 0?void 0:c.coordinate,b=s>=o-1?(f=r[0])===null||f===void 0?void 0:f.coordinate:(d=r[s+1])===null||d===void 0?void 0:d.coordinate,y=void 0;if(!(h==null||p==null||b==null))if(nr(p-h)!==nr(b-p)){var v=[];if(nr(b-p)===nr(i[1]-i[0])){y=b;var T=p+i[1]-i[0];v[0]=Math.min(T,(T+h)/2),v[1]=Math.max(T,(T+h)/2)}else{y=h;var x=b+i[1]-i[0];v[0]=Math.min(p,(x+p)/2),v[1]=Math.max(p,(x+p)/2)}var S=[Math.min(p,(y+p)/2),Math.max(p,(y+p)/2)];if(e>S[0]&&e<=S[1]||e>=v[0]&&e<=v[1]){var w;return(w=r[s])===null||w===void 0?void 0:w.index}}else{var A=Math.min(h,b),_=Math.max(h,b);if(e>(A+p)/2&&e<=(_+p)/2){var O;return(O=r[s])===null||O===void 0?void 0:O.index}}}else if(t)for(var R=0;R<o;R++){var C=t[R];if(C!=null){var M=t[R+1],L=t[R-1];if(R===0&&M!=null&&e<=(C.coordinate+M.coordinate)/2||R===o-1&&L!=null&&e>(C.coordinate+L.coordinate)/2||R>0&&R<o-1&&L!=null&&M!=null&&e>(C.coordinate+L.coordinate)/2&&e<=(C.coordinate+M.coordinate)/2)return C.index}}return-1},tee=()=>oe(I0),xg=(e,t)=>t,NO=(e,t,r)=>r,Eg=(e,t,r,n)=>n,ree=B(jn,e=>Rc(e,t=>t.coordinate)),Tg=B([uo,xg,NO,Eg],mO),wg=B([Tg,Wi,Wa,Va],Qo),nee=(e,t,r)=>{if(t!=null){var n=uo(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},PO=B([uo,xg,NO,Eg],bO),Ql=B([Rn,Ln,Fe,At,jn,Eg,PO],gO),iee=B([Tg,Ql],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),DO=B([jn,wg],cO),aee=B([PO,wg,Wr,Wa,DO,yO,xg],vO),oee=B([Tg,wg],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),see=(e,t,r,n,i,a,o)=>{if(!(!e||!r||!n||!i)&&eee(e,o)){var s=pV(e,t),u=OO(s,a,i,r,n),l=QJ(t,i,u,e);return{activeIndex:String(u),activeCoordinate:l}}},uee=(e,t,r,n,i,a,o)=>{if(!(!e||!n||!i||!a||!r)){var s=NK(e,r);if(s){var u=mV(s,t),l=OO(u,o,a,n,i),c=JJ(t,a,l,s);return{activeIndex:String(l),activeCoordinate:c}}}},lee=(e,t,r,n,i,a,o,s)=>{if(!(!e||!t||!n||!i||!a))return t==="horizontal"||t==="vertical"?see(e,t,n,i,a,o,s):uee(e,t,r,n,i,a,o)},cee=B(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),fee=B(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(ft)),r=Array.from(new Set(t));return r.sort((n,i)=>n-i)},{memoizeOptions:{resultEqualityCheck:nG}});function zE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zE(Object(r),!0).forEach(function(n){dee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dee(e,t,r){return(t=hee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hee(e){var t=pee(e,"string");return typeof t=="symbol"?t:t+""}function pee(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mee={},gee={zIndexMap:Object.values(ft).reduce((e,t)=>qE(qE({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),mee)},bee=new Set(Object.values(ft));function yee(e){return bee.has(e)}var RO=$t({name:"zIndex",initialState:gee,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:Xe()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!yee(r)&&delete e.zIndexMap[r])},prepare:Xe()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r,element:n,isPanorama:i}=t.payload;e.zIndexMap[r]?i?e.zIndexMap[r].panoramaElement=n:e.zIndexMap[r].element=n:e.zIndexMap[r]={consumers:0,element:i?void 0:n,panoramaElement:i?n:void 0}},prepare:Xe()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:Xe()}}}),{registerZIndexPortal:vee,unregisterZIndexPortal:ph,registerZIndexPortalElement:xee,unregisterZIndexPortalElement:Eee}=RO.actions,Tee=RO.reducer;function ur(e){var{zIndex:t,children:r}=e,n=PV(),i=n&&t!==void 0&&t!==0,a=St(),o=m.useRef(void 0),s=m.useRef(new Set),u=Qe(),l=oe(f=>cee(f,t,a));if(m.useLayoutEffect(()=>{if(!i){var f=s.current;f.forEach(h=>{u(ph({zIndex:h}))}),f.clear(),o.current=void 0;return}if(s.current.has(t)||(u(vee({zIndex:t})),s.current.add(t)),l){o.current=l;var d=s.current;d.forEach(h=>{h!==t&&(u(ph({zIndex:h})),d.delete(h))})}},[u,t,i,l]),m.useLayoutEffect(()=>{var f=s.current;return()=>{f.forEach(d=>{u(ph({zIndex:d}))}),f.clear()}},[u]),!i)return r;var c=l??o.current;return c?Ps.createPortal(r,c):null}function Yp(){return Yp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yp.apply(null,arguments)}function WE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Lu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WE(Object(r),!0).forEach(function(n){wee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wee(e,t,r){return(t=Aee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Aee(e){var t=See(e,"string");return typeof t=="symbol"?t:t+""}function See(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kee(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return m.isValidElement(t)?m.cloneElement(t,n):m.createElement(r,n)}function _ee(e){var t,{coordinate:r,payload:n,index:i,offset:a,tooltipAxisBandSize:o,layout:s,cursor:u,tooltipEventType:l,chartName:c}=e,f=r,d=n,h=i;if(!u||!f||c!=="ScatterChart"&&l!=="axis")return null;var p,b,y;if(c==="ScatterChart")p=f,b=WY,y=ft.cursorLine;else if(c==="BarChart")p=VY(s,f,a,o),b=A0,y=ft.cursorRectangle;else if(s==="radial"&&a_(f)){var{cx:v,cy:T,radius:x,startAngle:S,endAngle:w}=yC(f);p={cx:v,cy:T,startAngle:S,endAngle:w,innerRadius:x,outerRadius:x},b=xC,y=ft.cursorLine}else p={points:LK(s,f,a)},b=hC,y=ft.cursorLine;var A=typeof u=="object"&&"className"in u?u.className:void 0,_=Lu(Lu(Lu(Lu({stroke:"#ccc",pointerEvents:"none"},a),p),qs(u)),{},{payload:d,payloadIndex:h,className:Le("recharts-tooltip-cursor",A)});return m.createElement(ur,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:y},m.createElement(kee,{cursor:u,cursorComp:b,cursorProps:_}))}function Cee(e){var t=KJ(),r=J_(),n=Qi(),i=tee();return t==null||r==null||n==null||i==null?null:m.createElement(_ee,Yp({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var LO=m.createContext(null),Iee=()=>m.useContext(LO),mh={exports:{}},VE;function Oee(){return VE||(VE=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(u,l,c){this.fn=u,this.context=l,this.once=c||!1}function a(u,l,c,f,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var h=new i(c,f||u,d),p=r?r+l:l;return u._events[p]?u._events[p].fn?u._events[p]=[u._events[p],h]:u._events[p].push(h):(u._events[p]=h,u._eventsCount++),u}function o(u,l){--u._eventsCount===0?u._events=new n:delete u._events[l]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var l=[],c,f;if(this._eventsCount===0)return l;for(f in c=this._events)t.call(c,f)&&l.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(c)):l},s.prototype.listeners=function(l){var c=r?r+l:l,f=this._events[c];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,p=new Array(h);d<h;d++)p[d]=f[d].fn;return p},s.prototype.listenerCount=function(l){var c=r?r+l:l,f=this._events[c];return f?f.fn?1:f.length:0},s.prototype.emit=function(l,c,f,d,h,p){var b=r?r+l:l;if(!this._events[b])return!1;var y=this._events[b],v=arguments.length,T,x;if(y.fn){switch(y.once&&this.removeListener(l,y.fn,void 0,!0),v){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,c),!0;case 3:return y.fn.call(y.context,c,f),!0;case 4:return y.fn.call(y.context,c,f,d),!0;case 5:return y.fn.call(y.context,c,f,d,h),!0;case 6:return y.fn.call(y.context,c,f,d,h,p),!0}for(x=1,T=new Array(v-1);x<v;x++)T[x-1]=arguments[x];y.fn.apply(y.context,T)}else{var S=y.length,w;for(x=0;x<S;x++)switch(y[x].once&&this.removeListener(l,y[x].fn,void 0,!0),v){case 1:y[x].fn.call(y[x].context);break;case 2:y[x].fn.call(y[x].context,c);break;case 3:y[x].fn.call(y[x].context,c,f);break;case 4:y[x].fn.call(y[x].context,c,f,d);break;default:if(!T)for(w=1,T=new Array(v-1);w<v;w++)T[w-1]=arguments[w];y[x].fn.apply(y[x].context,T)}}return!0},s.prototype.on=function(l,c,f){return a(this,l,c,f,!1)},s.prototype.once=function(l,c,f){return a(this,l,c,f,!0)},s.prototype.removeListener=function(l,c,f,d){var h=r?r+l:l;if(!this._events[h])return this;if(!c)return o(this,h),this;var p=this._events[h];if(p.fn)p.fn===c&&(!d||p.once)&&(!f||p.context===f)&&o(this,h);else{for(var b=0,y=[],v=p.length;b<v;b++)(p[b].fn!==c||d&&!p[b].once||f&&p[b].context!==f)&&y.push(p[b]);y.length?this._events[h]=y.length===1?y[0]:y:o(this,h)}return this},s.prototype.removeAllListeners=function(l){var c;return l?(c=r?r+l:l,this._events[c]&&o(this,c)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(mh)),mh.exports}var Nee=Oee();const Pee=On(Nee);var _s=new Pee,Kp="recharts.syncEvent.tooltip",YE="recharts.syncEvent.brush",MO=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!sn(r))return e[r]}},Dee={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},jO=$t({name:"options",initialState:Dee,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),Ree=jO.reducer,{createEventEmitter:Lee}=jO.actions;function Mee(e){return e.tooltip.syncInteraction}var jee={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},BO=$t({name:"chartData",initialState:jee,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:n}=t.payload;r!=null&&(e.dataStartIndex=r),n!=null&&(e.dataEndIndex=n)}}}),{setChartData:KE,setDataStartEndIndexes:Bee,setComputedData:Kue}=BO.actions,Fee=BO.reducer,$ee=["x","y"];function GE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GE(Object(r),!0).forEach(function(n){Uee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Uee(e,t,r){return(t=Hee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hee(e){var t=zee(e,"string");return typeof t=="symbol"?t:t+""}function zee(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qee(e,t){if(e==null)return{};var r,n,i=Wee(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Wee(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Vee(){var e=oe(O0),t=oe(N0),r=Qe(),n=oe(MC),i=oe(jn),a=Qi(),o=Gs(),s=oe(u=>u.rootProps.className);m.useEffect(()=>{if(e==null)return eo;var u=(l,c,f)=>{if(t!==f&&e===l){if(c.payload.active===!1){r(jo({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(n==="index"){var d;if(o&&c!==null&&c!==void 0&&(d=c.payload)!==null&&d!==void 0&&d.coordinate&&c.payload.sourceViewBox){var h=c.payload.coordinate,{x:p,y:b}=h,y=qee(h,$ee),{x:v,y:T,width:x,height:S}=c.payload.sourceViewBox,w=pa(pa({},y),{},{x:o.x+(x?(p-v)/x:0)*o.width,y:o.y+(S?(b-T)/S:0)*o.height});r(pa(pa({},c),{},{payload:pa(pa({},c.payload),{},{coordinate:w})}))}else r(c);return}if(i!=null){var A;if(typeof n=="function"){var _={activeTooltipIndex:c.payload.index==null?void 0:Number(c.payload.index),isTooltipActive:c.payload.active,activeIndex:c.payload.index==null?void 0:Number(c.payload.index),activeLabel:c.payload.label,activeDataKey:c.payload.dataKey,activeCoordinate:c.payload.coordinate},O=n(i,_);A=i[O]}else n==="value"&&(A=i.find(q=>String(q.value)===c.payload.label));var{coordinate:R}=c.payload;if(R==null||o==null){r(jo({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(A==null){r(jo({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:c.payload.sourceViewBox,graphicalItemId:void 0}));return}var{x:C,y:M}=R,L=Math.min(C,o.x+o.width),Q=Math.min(M,o.y+o.height),H={x:a==="horizontal"?A.coordinate:L,y:a==="horizontal"?Q:A.coordinate},U=jo({active:c.payload.active,coordinate:H,dataKey:c.payload.dataKey,index:String(A.index),label:c.payload.label,sourceViewBox:c.payload.sourceViewBox,graphicalItemId:c.payload.graphicalItemId});r(U)}}};return _s.on(Kp,u),()=>{_s.off(Kp,u)}},[s,r,t,e,n,i,a,o])}function Yee(){var e=oe(O0),t=oe(N0),r=Qe();m.useEffect(()=>{if(e==null)return eo;var n=(i,a,o)=>{t!==o&&e===i&&r(Bee(a))};return _s.on(YE,n),()=>{_s.off(YE,n)}},[r,t,e])}function Kee(){var e=Qe();m.useEffect(()=>{e(Lee())},[e]),Vee(),Yee()}function Gee(e,t,r,n,i,a){var o=oe(p=>nee(p,e,t)),s=oe(BJ),u=oe(N0),l=oe(O0),c=oe(MC),f=oe(Mee),d=f?.sourceViewBox!=null,h=Gs();m.useEffect(()=>{if(!d&&l!=null&&u!=null){var p=jo({active:a,coordinate:r,dataKey:o,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:h,graphicalItemId:s});_s.emit(Kp,l,p,u)}},[d,r,o,s,i,n,u,l,c,a,h])}function XE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ZE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XE(Object(r),!0).forEach(function(n){Xee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Xee(e,t,r){return(t=Zee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zee(e){var t=Qee(e,"string");return typeof t=="symbol"?t:t+""}function Qee(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jee(e){return e.dataKey}function ete(e,t){return m.isValidElement(e)?m.cloneElement(e,t):typeof e=="function"?m.createElement(e,t):m.createElement(xY,t)}var QE=[],tte={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function FO(e){var t,r,n=Dt(e,tte),{active:i,allowEscapeViewBox:a,animationDuration:o,animationEasing:s,content:u,filterNull:l,isAnimationActive:c,offset:f,payloadUniqBy:d,position:h,reverseDirection:p,useTranslate3d:b,wrapperStyle:y,cursor:v,shared:T,trigger:x,defaultIndex:S,portal:w,axisId:A}=n,_=Qe(),O=typeof S=="number"?String(S):S;m.useEffect(()=>{_(VQ({shared:T,trigger:x,axisId:A,active:i,defaultIndex:O}))},[_,T,x,A,i,O]);var R=Gs(),C=dC(),M=$Q(T),{activeIndex:L,isActive:Q}=(t=oe(be=>oee(be,M,x,O)))!==null&&t!==void 0?t:{},H=oe(be=>aee(be,M,x,O)),U=oe(be=>DO(be,M,x,O)),q=oe(be=>iee(be,M,x,O)),J=H,V=Iee(),re=(r=i??Q)!==null&&r!==void 0?r:!1,[P,le]=Jq([J,re]),he=M==="axis"?U:void 0;Gee(M,x,q,he,L,re);var N=w??V;if(N==null||R==null||M==null)return null;var pe=J??QE;re||(pe=QE),l&&pe.length&&(pe=Sq(pe.filter(be=>be.value!=null&&(be.hide!==!0||n.includeHidden)),d,Jee));var we=pe.length>0,ce=ZE(ZE({},n),{},{payload:pe,label:he,active:re,activeIndex:L,coordinate:q,accessibilityLayer:C}),fe=m.createElement(NY,{allowEscapeViewBox:a,animationDuration:o,animationEasing:s,isAnimationActive:c,active:re,coordinate:q,hasPayload:we,offset:f,position:h,reverseDirection:p,useTranslate3d:b,viewBox:R,wrapperStyle:y,lastBoundingBox:P,innerRef:le,hasPortalFromProps:!!w},ete(u,ce));return m.createElement(m.Fragment,null,Ps.createPortal(fe,N),re&&m.createElement(Cee,{cursor:v,tooltipEventType:M,coordinate:q,payload:pe,index:L}))}var $O=e=>null;$O.displayName="Cell";function rte(e,t,r){return(t=nte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nte(e){var t=ite(e,"string");return typeof t=="symbol"?t:t+""}function ite(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class ate{constructor(t){rte(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function JE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ote(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JE(Object(r),!0).forEach(function(n){ste(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ste(e,t,r){return(t=ute(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ute(e){var t=lte(e,"string");return typeof t=="symbol"?t:t+""}function lte(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cte={cacheSize:2e3,enableCache:!0},UO=ote({},cte),eT=new ate(UO.cacheSize),fte={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},tT="recharts_measurement_span";function dte(e,t){var r=t.fontSize||"",n=t.fontFamily||"",i=t.fontWeight||"",a=t.fontStyle||"",o=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(a,"|").concat(o,"|").concat(s)}var rT=(e,t)=>{try{var r=document.getElementById(tT);r||(r=document.createElement("span"),r.setAttribute("id",tT),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,fte,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},Jo=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Js.isSsr)return{width:0,height:0};if(!UO.enableCache)return rT(t,r);var n=dte(t,r),i=eT.get(n);if(i)return i;var a=rT(t,r);return eT.set(n,a),a},HO;function hte(e,t,r){return(t=pte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pte(e){var t=mte(e,"string");return typeof t=="symbol"?t:t+""}function mte(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nT=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,iT=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,gte=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,bte=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,yte={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},vte=["cm","mm","pt","pc","in","Q","px"];function xte(e){return vte.includes(e)}var Aa="NaN";function Ete(e,t){return e*yte[t]}class Ot{static parse(t){var r,[,n,i]=(r=bte.exec(t))!==null&&r!==void 0?r:[];return n==null?Ot.NaN:new Ot(parseFloat(n),i??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,sn(t)&&(this.unit=""),r!==""&&!gte.test(r)&&(this.num=NaN,this.unit=""),xte(r)&&(this.num=Ete(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new Ot(NaN,""):new Ot(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Ot(NaN,""):new Ot(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Ot(NaN,""):new Ot(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Ot(NaN,""):new Ot(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return sn(this.num)}}HO=Ot;hte(Ot,"NaN",new HO(NaN,""));function zO(e){if(e==null||e.includes(Aa))return Aa;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,a]=(r=nT.exec(t))!==null&&r!==void 0?r:[],o=Ot.parse(n??""),s=Ot.parse(a??""),u=i==="*"?o.multiply(s):o.divide(s);if(u.isNaN())return Aa;t=t.replace(nT,u.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var l,[,c,f,d]=(l=iT.exec(t))!==null&&l!==void 0?l:[],h=Ot.parse(c??""),p=Ot.parse(d??""),b=f==="+"?h.add(p):h.subtract(p);if(b.isNaN())return Aa;t=t.replace(iT,b.toString())}return t}var aT=/\(([^()]*)\)/;function Tte(e){for(var t=e,r;(r=aT.exec(t))!=null;){var[,n]=r;t=t.replace(aT,zO(n))}return t}function wte(e){var t=e.replace(/\s+/g,"");return t=Tte(t),t=zO(t),t}function Ate(e){try{return wte(e)}catch{return Aa}}function gh(e){var t=Ate(e.slice(5,-1));return t===Aa?"":t}var Ste=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],kte=["dx","dy","angle","className","breakAll"];function Gp(){return Gp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gp.apply(null,arguments)}function oT(e,t){if(e==null)return{};var r,n,i=_te(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function _te(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var qO=/[ \f\n\r\t\v\u2028\u2029]+/,WO=e=>{var{children:t,breakAll:r,style:n}=e;try{var i=[];tt(t)||(r?i=t.toString().split(""):i=t.toString().split(qO));var a=i.map(s=>({word:s,width:Jo(s,n).width})),o=r?0:Jo(" ",n).width;return{wordsWithComputedWidth:a,spaceWidth:o}}catch{return null}};function VO(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function Cte(e){return tt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var YO=(e,t,r,n)=>e.reduce((i,a)=>{var{word:o,width:s}=a,u=i[i.length-1];if(u&&s!=null&&(t==null||n||u.width+s+r<Number(t)))u.words.push(o),u.width+=s+r;else{var l={words:[o],width:s};i.push(l)}return i},[]),KO=e=>e.reduce((t,r)=>t.width>r.width?t:r),Ite="…",sT=(e,t,r,n,i,a,o,s)=>{var u=e.slice(0,t),l=WO({breakAll:r,style:n,children:u+Ite});if(!l)return[!1,[]];var c=YO(l.wordsWithComputedWidth,a,o,s),f=c.length>i||KO(c).width>Number(a);return[f,c]},Ote=(e,t,r,n,i)=>{var{maxLines:a,children:o,style:s,breakAll:u}=e,l=se(a),c=String(o),f=YO(t,n,r,i);if(!l||i)return f;var d=f.length>a||KO(f).width>Number(n);if(!d)return f;for(var h=0,p=c.length-1,b=0,y;h<=p&&b<=c.length-1;){var v=Math.floor((h+p)/2),T=v-1,[x,S]=sT(c,T,u,s,a,n,r,i),[w]=sT(c,v,u,s,a,n,r,i);if(!x&&!w&&(h=v+1),x&&w&&(p=v-1),!x&&w){y=S;break}b++}return y||f},uT=e=>{var t=tt(e)?[]:e.toString().split(qO);return[{words:t,width:void 0}]},Nte=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:a,maxLines:o}=e;if((t||r)&&!Js.isSsr){var s,u,l=WO({breakAll:a,children:n,style:i});if(l){var{wordsWithComputedWidth:c,spaceWidth:f}=l;s=c,u=f}else return uT(n);return Ote({breakAll:a,children:n,maxLines:o,style:i},s,u,t,!!r)}return uT(n)},GO="#808080",Pte={angle:0,breakAll:!1,capHeight:"0.71em",fill:GO,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Ag=m.forwardRef((e,t)=>{var r=Dt(e,Pte),{x:n,y:i,lineHeight:a,capHeight:o,fill:s,scaleToFit:u,textAnchor:l,verticalAnchor:c}=r,f=oT(r,Ste),d=m.useMemo(()=>Nte({breakAll:f.breakAll,children:f.children,maxLines:f.maxLines,scaleToFit:u,style:f.style,width:f.width}),[f.breakAll,f.children,f.maxLines,u,f.style,f.width]),{dx:h,dy:p,angle:b,className:y,breakAll:v}=f,T=oT(f,kte);if(!jt(n)||!jt(i)||d.length===0)return null;var x=Number(n)+(se(h)?h:0),S=Number(i)+(se(p)?p:0);if(!Te(x)||!Te(S))return null;var w;switch(c){case"start":w=gh("calc(".concat(o,")"));break;case"middle":w=gh("calc(".concat((d.length-1)/2," * -").concat(a," + (").concat(o," / 2))"));break;default:w=gh("calc(".concat(d.length-1," * -").concat(a,")"));break}var A=[],_=d[0];if(u&&_!=null){var O=_.width,{width:R}=f;A.push("scale(".concat(se(R)&&se(O)?R/O:1,")"))}return b&&A.push("rotate(".concat(b,", ").concat(x,", ").concat(S,")")),A.length&&(T.transform=A.join(" ")),m.createElement("text",Gp({},Pt(T),{ref:t,x,y:S,className:Le("recharts-text",y),textAnchor:l,fill:s.includes("url")?GO:s}),d.map((C,M)=>{var L=C.words.join(v?"":" ");return m.createElement("tspan",{x,dy:M===0?w:a,key:"".concat(L,"-").concat(M)},L)}))});Ag.displayName="Text";function lT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Gr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lT(Object(r),!0).forEach(function(n){Dte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Dte(e,t,r){return(t=Rte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rte(e){var t=Lte(e,"string");return typeof t=="symbol"?t:t+""}function Lte(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Mte=e=>{var{viewBox:t,position:r,offset:n=0,parentViewBox:i}=e,{x:a,y:o,height:s,upperWidth:u,lowerWidth:l}=E0(t),c=a,f=a+(u-l)/2,d=(c+f)/2,h=(u+l)/2,p=c+u/2,b=s>=0?1:-1,y=b*n,v=b>0?"end":"start",T=b>0?"start":"end",x=u>=0?1:-1,S=x*n,w=x>0?"end":"start",A=x>0?"start":"end",_=i;if(r==="top"){var O={x:c+u/2,y:o-y,horizontalAnchor:"middle",verticalAnchor:v};return _&&(O.height=Math.max(o-_.y,0),O.width=u),O}if(r==="bottom"){var R={x:f+l/2,y:o+s+y,horizontalAnchor:"middle",verticalAnchor:T};return _&&(R.height=Math.max(_.y+_.height-(o+s),0),R.width=l),R}if(r==="left"){var C={x:d-S,y:o+s/2,horizontalAnchor:w,verticalAnchor:"middle"};return _&&(C.width=Math.max(C.x-_.x,0),C.height=s),C}if(r==="right"){var M={x:d+h+S,y:o+s/2,horizontalAnchor:A,verticalAnchor:"middle"};return _&&(M.width=Math.max(_.x+_.width-M.x,0),M.height=s),M}var L=_?{width:h,height:s}:{};return r==="insideLeft"?Gr({x:d+S,y:o+s/2,horizontalAnchor:A,verticalAnchor:"middle"},L):r==="insideRight"?Gr({x:d+h-S,y:o+s/2,horizontalAnchor:w,verticalAnchor:"middle"},L):r==="insideTop"?Gr({x:c+u/2,y:o+y,horizontalAnchor:"middle",verticalAnchor:T},L):r==="insideBottom"?Gr({x:f+l/2,y:o+s-y,horizontalAnchor:"middle",verticalAnchor:v},L):r==="insideTopLeft"?Gr({x:c+S,y:o+y,horizontalAnchor:A,verticalAnchor:T},L):r==="insideTopRight"?Gr({x:c+u-S,y:o+y,horizontalAnchor:w,verticalAnchor:T},L):r==="insideBottomLeft"?Gr({x:f+S,y:o+s-y,horizontalAnchor:A,verticalAnchor:v},L):r==="insideBottomRight"?Gr({x:f+l-S,y:o+s-y,horizontalAnchor:w,verticalAnchor:v},L):r&&typeof r=="object"&&(se(r.x)||mp(r.x))&&(se(r.y)||mp(r.y))?Gr({x:a+$r(r.x,h),y:o+$r(r.y,s),horizontalAnchor:"end",verticalAnchor:"end"},L):Gr({x:p,y:o+s/2,horizontalAnchor:"middle",verticalAnchor:"middle"},L)},jte=["labelRef"],Bte=["content"];function cT(e,t){if(e==null)return{};var r,n,i=Fte(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Fte(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function fT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Bo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fT(Object(r),!0).forEach(function(n){$te(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $te(e,t,r){return(t=Ute(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ute(e){var t=Hte(e,"string");return typeof t=="symbol"?t:t+""}function Hte(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function En(){return En=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},En.apply(null,arguments)}var XO=m.createContext(null),Sg=e=>{var{x:t,y:r,upperWidth:n,lowerWidth:i,width:a,height:o,children:s}=e,u=m.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:a,height:o}),[t,r,n,i,a,o]);return m.createElement(XO.Provider,{value:u},s)},ZO=()=>{var e=m.useContext(XO),t=Gs();return e||(t?E0(t):void 0)},zte=m.createContext(null),qte=()=>{var e=m.useContext(zte),t=oe(UC);return e||t},Wte=e=>{var{value:t,formatter:r}=e,n=tt(e.children)?t:e.children;return typeof r=="function"?r(n):n},kg=e=>e!=null&&typeof e=="function",Vte=(e,t)=>{var r=nr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},Yte=(e,t,r,n,i)=>{var{offset:a,className:o}=e,{cx:s,cy:u,innerRadius:l,outerRadius:c,startAngle:f,endAngle:d,clockWise:h}=i,p=(l+c)/2,b=Vte(f,d),y=b>=0?1:-1,v,T;switch(t){case"insideStart":v=f+y*a,T=h;break;case"insideEnd":v=d-y*a,T=!h;break;case"end":v=d+y*a,T=h;break;default:throw new Error("Unsupported position ".concat(t))}T=b<=0?T:!T;var x=Nt(s,u,p,v),S=Nt(s,u,p,v+(T?1:-1)*359),w="M".concat(x.x,",").concat(x.y,`
191
+ A`).concat(p,",").concat(p,",0,1,").concat(T?0:1,`,
192
+ `).concat(S.x,",").concat(S.y),A=tt(e.id)?ps("recharts-radial-line-"):e.id;return m.createElement("text",En({},n,{dominantBaseline:"central",className:Le("recharts-radial-bar-label",o)}),m.createElement("defs",null,m.createElement("path",{id:A,d:w})),m.createElement("textPath",{xlinkHref:"#".concat(A)},r))},Kte=(e,t,r)=>{var{cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:s,endAngle:u}=e,l=(s+u)/2;if(r==="outside"){var{x:c,y:f}=Nt(n,i,o+t,l);return{x:c,y:f,textAnchor:c>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var d=(a+o)/2,{x:h,y:p}=Nt(n,i,d,l);return{x:h,y:p,textAnchor:"middle",verticalAnchor:"middle"}},Yu=e=>e!=null&&"cx"in e&&se(e.cx),Gte={angle:0,offset:5,zIndex:ft.label,position:"middle",textBreakAll:!1};function Xte(e){if(!Yu(e))return e;var{cx:t,cy:r,outerRadius:n}=e,i=n*2;return{x:t-n,y:r-n,width:i,upperWidth:i,lowerWidth:i,height:i}}function Kn(e){var t=Dt(e,Gte),{viewBox:r,parentViewBox:n,position:i,value:a,children:o,content:s,className:u="",textBreakAll:l,labelRef:c}=t,f=qte(),d=ZO(),h=i==="center"?d:f??d,p,b,y;r==null?p=h:Yu(r)?p=r:p=E0(r);var v=Xte(p);if(!p||tt(a)&&tt(o)&&!m.isValidElement(s)&&typeof s!="function")return null;var T=Bo(Bo({},t),{},{viewBox:p});if(m.isValidElement(s)){var{labelRef:x}=T,S=cT(T,jte);return m.cloneElement(s,S)}if(typeof s=="function"){var{content:w}=T,A=cT(T,Bte);if(b=m.createElement(s,A),m.isValidElement(b))return b}else b=Wte(t);var _=Pt(t);if(Yu(p)){if(i==="insideStart"||i==="insideEnd"||i==="end")return Yte(t,i,b,_,p);y=Kte(p,t.offset,t.position)}else{if(!v)return null;var O=Mte({viewBox:v,position:i,offset:t.offset,parentViewBox:Yu(n)?void 0:n});y=Bo(Bo({x:O.x,y:O.y,textAnchor:O.horizontalAnchor,verticalAnchor:O.verticalAnchor},O.width!==void 0?{width:O.width}:{}),O.height!==void 0?{height:O.height}:{})}return m.createElement(ur,{zIndex:t.zIndex},m.createElement(Ag,En({ref:c,className:Le("recharts-label",u)},_,y,{textAnchor:VO(_.textAnchor)?_.textAnchor:y.textAnchor,breakAll:l}),b))}Kn.displayName="Label";var Zte=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?m.createElement(Kn,En({key:"label-implicit"},n)):jt(e)?m.createElement(Kn,En({key:"label-implicit",value:e},n)):m.isValidElement(e)?e.type===Kn?m.cloneElement(e,Bo({key:"label-implicit"},n)):m.createElement(Kn,En({key:"label-implicit",content:e},n)):kg(e)?m.createElement(Kn,En({key:"label-implicit",content:e},n)):e&&typeof e=="object"?m.createElement(Kn,En({},e,{key:"label-implicit"},n)):null};function _g(e){var{label:t,labelRef:r}=e,n=ZO();return Zte(t,n,r)||null}var Qte=["valueAccessor"],Jte=["dataKey","clockWise","id","textBreakAll","zIndex"];function Jl(){return Jl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jl.apply(null,arguments)}function dT(e,t){if(e==null)return{};var r,n,i=ere(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ere(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var tre=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(Cte(t))return t},QO=m.createContext(void 0),JO=QO.Provider,eN=m.createContext(void 0);eN.Provider;function rre(){return m.useContext(QO)}function nre(){return m.useContext(eN)}function Ku(e){var{valueAccessor:t=tre}=e,r=dT(e,Qte),{dataKey:n,clockWise:i,id:a,textBreakAll:o,zIndex:s}=r,u=dT(r,Jte),l=rre(),c=nre(),f=l||c;return!f||!f.length?null:m.createElement(ur,{zIndex:s??ft.label},m.createElement(Zt,{className:"recharts-label-list"},f.map((d,h)=>{var p,b=tt(n)?t(d,h):lt(d.payload,n),y=tt(a)?{}:{id:"".concat(a,"-").concat(h)};return m.createElement(Kn,Jl({key:"label-".concat(h)},Pt(d),u,y,{fill:(p=r.fill)!==null&&p!==void 0?p:d.fill,parentViewBox:d.parentViewBox,value:b,textBreakAll:o,viewBox:d.viewBox,index:h,zIndex:0}))})))}Ku.displayName="LabelList";function tN(e){var{label:t}=e;return t?t===!0?m.createElement(Ku,{key:"labelList-implicit"}):m.isValidElement(t)||kg(t)?m.createElement(Ku,{key:"labelList-implicit",content:t}):typeof t=="object"?m.createElement(Ku,Jl({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Xp(){return Xp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xp.apply(null,arguments)}var rN=e=>{var{cx:t,cy:r,r:n,className:i}=e,a=Le("recharts-dot",i);return se(t)&&se(r)&&se(n)?m.createElement("circle",Xp({},Fr(e),c0(e),{className:a,cx:t,cy:r,r:n})):null},ire={radiusAxis:{},angleAxis:{}},nN=$t({name:"polarAxis",initialState:ire,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:Gue,removeRadiusAxis:Xue,addAngleAxis:Zue,removeAngleAxis:Que}=nN.actions,are=nN.reducer;function ore(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var bh={exports:{}},je={};var hT;function sre(){if(hT)return je;hT=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,T=e?Symbol.for("react.scope"):60119;function x(w){if(typeof w=="object"&&w!==null){var A=w.$$typeof;switch(A){case t:switch(w=w.type,w){case u:case l:case n:case a:case i:case f:return w;default:switch(w=w&&w.$$typeof,w){case s:case c:case p:case h:case o:return w;default:return A}}case r:return A}}}function S(w){return x(w)===l}return je.AsyncMode=u,je.ConcurrentMode=l,je.ContextConsumer=s,je.ContextProvider=o,je.Element=t,je.ForwardRef=c,je.Fragment=n,je.Lazy=p,je.Memo=h,je.Portal=r,je.Profiler=a,je.StrictMode=i,je.Suspense=f,je.isAsyncMode=function(w){return S(w)||x(w)===u},je.isConcurrentMode=S,je.isContextConsumer=function(w){return x(w)===s},je.isContextProvider=function(w){return x(w)===o},je.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},je.isForwardRef=function(w){return x(w)===c},je.isFragment=function(w){return x(w)===n},je.isLazy=function(w){return x(w)===p},je.isMemo=function(w){return x(w)===h},je.isPortal=function(w){return x(w)===r},je.isProfiler=function(w){return x(w)===a},je.isStrictMode=function(w){return x(w)===i},je.isSuspense=function(w){return x(w)===f},je.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===n||w===l||w===a||w===i||w===f||w===d||typeof w=="object"&&w!==null&&(w.$$typeof===p||w.$$typeof===h||w.$$typeof===o||w.$$typeof===s||w.$$typeof===c||w.$$typeof===y||w.$$typeof===v||w.$$typeof===T||w.$$typeof===b)},je.typeOf=x,je}var pT;function ure(){return pT||(pT=1,bh.exports=sre()),bh.exports}var lre=ure(),mT=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",gT=null,yh=null,iN=e=>{if(e===gT&&Array.isArray(yh))return yh;var t=[];return m.Children.forEach(e,r=>{tt(r)||(lre.isFragment(r)?t=t.concat(iN(r.props.children)):t.push(r))}),yh=t,gT=e,t};function cre(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(i=>mT(i)):n=[mT(t)],iN(e).forEach(i=>{var a=ja(i,"type.displayName")||ja(i,"type.name");a&&n.indexOf(a)!==-1&&r.push(i)}),r}var aN=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,vh={},bT;function fre(){return bT||(bT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){const i=r[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable?!1:r.toString()===`[object ${i}]`}let n=r;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(r)===n}e.isPlainObject=t})(vh)),vh}var xh,yT;function dre(){return yT||(yT=1,xh=fre().isPlainObject),xh}var hre=dre();const pre=On(hre);var vT,xT,ET,TT,wT;function AT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ST(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AT(Object(r),!0).forEach(function(n){mre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mre(e,t,r){return(t=gre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gre(e){var t=bre(e,"string");return typeof t=="symbol"?t:t+""}function bre(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ec(){return ec=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ec.apply(null,arguments)}function Io(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var kT=(e,t,r,n,i)=>{var a=r-n,o;return o=it(vT||(vT=Io(["M ",",",""])),e,t),o+=it(xT||(xT=Io(["L ",",",""])),e+r,t),o+=it(ET||(ET=Io(["L ",",",""])),e+r-a/2,t+i),o+=it(TT||(TT=Io(["L ",",",""])),e+r-a/2-n,t+i),o+=it(wT||(wT=Io(["L ",","," Z"])),e,t),o},yre={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},vre=e=>{var t=Dt(e,yre),{x:r,y:n,upperWidth:i,lowerWidth:a,height:o,className:s}=t,{animationEasing:u,animationDuration:l,animationBegin:c,isUpdateAnimationActive:f}=t,d=m.useRef(null),[h,p]=m.useState(-1),b=m.useRef(i),y=m.useRef(a),v=m.useRef(o),T=m.useRef(r),x=m.useRef(n),S=Jc(e,"trapezoid-");if(m.useEffect(()=>{if(d.current&&d.current.getTotalLength)try{var H=d.current.getTotalLength();H&&p(H)}catch{}},[]),r!==+r||n!==+n||i!==+i||a!==+a||o!==+o||i===0&&a===0||o===0)return null;var w=Le("recharts-trapezoid",s);if(!f)return m.createElement("g",null,m.createElement("path",ec({},Pt(t),{className:w,d:kT(r,n,i,a,o)})));var A=b.current,_=y.current,O=v.current,R=T.current,C=x.current,M="0px ".concat(h===-1?1:h,"px"),L="".concat(h,"px ").concat(h,"px"),Q=pC(["strokeDasharray"],l,u);return m.createElement(Qc,{animationId:S,key:S,canBegin:h>0,duration:l,easing:u,isActive:f,begin:c},H=>{var U=at(A,i,H),q=at(_,a,H),J=at(O,o,H),V=at(R,r,H),re=at(C,n,H);d.current&&(b.current=U,y.current=q,v.current=J,T.current=V,x.current=re);var P=H>0?{transition:Q,strokeDasharray:L}:{strokeDasharray:M};return m.createElement("path",ec({},Pt(t),{className:w,d:kT(V,re,U,q,J),ref:d,style:ST(ST({},P),t.style)}))})},xre=["option","shapeType","activeClassName","inActiveClassName"];function Ere(e,t){if(e==null)return{};var r,n,i=Tre(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Tre(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function _T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_T(Object(r),!0).forEach(function(n){wre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_T(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wre(e,t,r){return(t=Are(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Are(e){var t=Sre(e,"string");return typeof t=="symbol"?t:t+""}function Sre(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kre(e,t){return tc(tc({},t),e)}function _re(e,t){return e==="symbols"}function CT(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return m.createElement(A0,r);case"trapezoid":return m.createElement(vre,r);case"sector":return m.createElement(xC,r);case"symbols":if(_re(t))return m.createElement(i_,r);break;case"curve":return m.createElement(hC,r);default:return null}}function Cre(e){return m.isValidElement(e)?e.props:e}function oN(e){var{option:t,shapeType:r,activeClassName:n="recharts-active-shape",inActiveClassName:i="recharts-shape"}=e,a=Ere(e,xre),o;if(m.isValidElement(t))o=m.cloneElement(t,tc(tc({},a),Cre(t)));else if(typeof t=="function")o=t(a,a.index);else if(pre(t)&&typeof t!="boolean"){var s=kre(t,a);o=m.createElement(CT,{shapeType:r,elementProps:s})}else{var u=a;o=m.createElement(CT,{shapeType:r,elementProps:u})}return a.isActive?m.createElement(Zt,{className:n},o):m.createElement(Zt,{className:i},o)}var sN=(e,t,r)=>{var n=Qe();return(i,a)=>o=>{e?.(i,a,o),n(dO({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}},uN=e=>{var t=Qe();return(r,n)=>i=>{e?.(r,n,i),t(YQ())}},lN=(e,t,r)=>{var n=Qe();return(i,a)=>o=>{e?.(i,a,o),n(KQ({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}};function cN(e){var{tooltipEntrySettings:t}=e,r=Qe(),n=St(),i=m.useRef(null);return m.useLayoutEffect(()=>{n||(i.current===null?r(zQ(t)):i.current!==t&&r(qQ({prev:i.current,next:t})),i.current=t)},[t,r,n]),m.useLayoutEffect(()=>()=>{i.current&&(r(WQ(i.current)),i.current=null)},[r]),null}function fN(e){var{legendPayload:t}=e,r=Qe(),n=St(),i=m.useRef(null);return m.useLayoutEffect(()=>{n||(i.current===null?r(WV(t)):i.current!==t&&r(VV({prev:i.current,next:t})),i.current=t)},[r,n,t]),m.useLayoutEffect(()=>()=>{i.current&&(r(YV(i.current)),i.current=null)},[r]),null}var Eh,Ire=()=>{var[e]=m.useState(()=>ps("uid-"));return e},Ore=(Eh=TP.useId)!==null&&Eh!==void 0?Eh:Ire;function Nre(e,t){var r=Ore();return t||(e?"".concat(e,"-").concat(r):r)}var Pre=m.createContext(void 0),dN=e=>{var{id:t,type:r,children:n}=e,i=Nre("recharts-".concat(r),t);return m.createElement(Pre.Provider,{value:i},n(i))},Dre={cartesianItems:[],polarItems:[]},hN=$t({name:"graphicalItems",initialState:Dre,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Xe()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=Cr(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},prepare:Xe()},removeCartesianGraphicalItem:{reducer(e,t){var r=Cr(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:Xe()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Xe()},removePolarGraphicalItem:{reducer(e,t){var r=Cr(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:Xe()},replacePolarGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=Cr(e).polarItems.indexOf(r);i>-1&&(e.polarItems[i]=n)},prepare:Xe()}}}),{addCartesianGraphicalItem:Rre,replaceCartesianGraphicalItem:Lre,removeCartesianGraphicalItem:Mre,addPolarGraphicalItem:Jue,removePolarGraphicalItem:ele,replacePolarGraphicalItem:tle}=hN.actions,jre=hN.reducer,Bre=e=>{var t=Qe(),r=m.useRef(null);return m.useLayoutEffect(()=>{r.current===null?t(Rre(e)):r.current!==e&&t(Lre({prev:r.current,next:e})),r.current=e},[t,e]),m.useLayoutEffect(()=>()=>{r.current&&(t(Mre(r.current)),r.current=null)},[t]),null},pN=m.memo(Bre),Fre=["points"];function IT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Th(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?IT(Object(r),!0).forEach(function(n){$re(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $re(e,t,r){return(t=Ure(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ure(e){var t=Hre(e,"string");return typeof t=="symbol"?t:t+""}function Hre(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rc(){return rc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rc.apply(null,arguments)}function zre(e,t){if(e==null)return{};var r,n,i=qre(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function qre(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Wre(e){var{option:t,dotProps:r,className:n}=e;if(m.isValidElement(t))return m.cloneElement(t,r);if(typeof t=="function")return t(r);var i=Le(n,typeof t!="boolean"?t.className:""),a=r??{},{points:o}=a,s=zre(a,Fre);return m.createElement(rN,rc({},s,{className:i}))}function Vre(e,t){return e==null?!1:t?!0:e.length===1}function Yre(e){var{points:t,dot:r,className:n,dotClassName:i,dataKey:a,baseProps:o,needClip:s,clipPathId:u,zIndex:l=ft.scatter}=e;if(!Vre(t,r))return null;var c=aN(r),f=ZH(r),d=t.map((p,b)=>{var y,v,T=Th(Th(Th({r:3},o),f),{},{index:b,cx:(y=p.x)!==null&&y!==void 0?y:void 0,cy:(v=p.y)!==null&&v!==void 0?v:void 0,dataKey:a,value:p.value,payload:p.payload,points:t});return m.createElement(Wre,{key:"dot-".concat(b),option:r,dotProps:T,className:i})}),h={};return s&&u!=null&&(h.clipPath="url(#clipPath-".concat(c?"":"dots-").concat(u,")")),m.createElement(ur,{zIndex:l},m.createElement(Zt,rc({className:n},h),d))}function OT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function NT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OT(Object(r),!0).forEach(function(n){Kre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kre(e,t,r){return(t=Gre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gre(e){var t=Xre(e,"string");return typeof t=="symbol"?t:t+""}function Xre(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mN=0,Zre={xAxis:{},yAxis:{},zAxis:{}},gN=$t({name:"cartesianAxis",initialState:Zre,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:Xe()},replaceXAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.xAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.xAxis[r.id],e.xAxis[n.id]=n)},prepare:Xe()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:Xe()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:Xe()},replaceYAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.yAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.yAxis[r.id],e.yAxis[n.id]=n)},prepare:Xe()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:Xe()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:Xe()},replaceZAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.zAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.zAxis[r.id],e.zAxis[n.id]=n)},prepare:Xe()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:Xe()},updateYAxisWidth(e,t){var{id:r,width:n}=t.payload,i=e.yAxis[r];if(i){var a,o=i.widthHistory||[];if(o.length===3&&o[0]===o[2]&&n===o[1]&&n!==i.width&&Math.abs(n-((a=o[0])!==null&&a!==void 0?a:0))<=1)return;var s=[...o,n].slice(-3);e.yAxis[r]=NT(NT({},i),{},{width:n,widthHistory:s})}}}}),{addXAxis:Qre,replaceXAxis:Jre,removeXAxis:ene,addYAxis:tne,replaceYAxis:rne,removeYAxis:nne,addZAxis:rle,replaceZAxis:nle,removeZAxis:ile,updateYAxisWidth:ine}=gN.actions,ane=gN.reducer,one=B([At],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),sne=B([one,Rn,Ln],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),Cg=()=>oe(sne),une=()=>oe(zJ);function PT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PT(Object(r),!0).forEach(function(n){lne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lne(e,t,r){return(t=cne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cne(e){var t=fne(e,"string");return typeof t=="symbol"?t:t+""}function fne(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dne=e=>{var{point:t,childIndex:r,mainColor:n,activeDot:i,dataKey:a,clipPath:o}=e;if(i===!1||t.x==null||t.y==null)return null;var s={index:r,dataKey:a,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},u=wh(wh(wh({},s),qs(i)),c0(i)),l;return m.isValidElement(i)?l=m.cloneElement(i,u):typeof i=="function"?l=i(u):l=m.createElement(rN,u),m.createElement(Zt,{className:"recharts-active-dot",clipPath:o},l)};function hne(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:i,clipPath:a,zIndex:o=ft.activeDot}=e,s=oe(Vi),u=une();if(t==null||u==null)return null;var l=t.find(c=>u.includes(c.payload));return tt(l)?null:m.createElement(ur,{zIndex:o},m.createElement(dne,{point:l,childIndex:Number(s),mainColor:r,dataKey:i,activeDot:n,clipPath:a}))}var DT=(e,t,r)=>{var n=r??e;if(!tt(n))return $r(n,t,0)},pne=(e,t,r)=>{var n={},i=e.filter(of),a=e.filter(l=>l.stackId==null),o=i.reduce((l,c)=>{var f=l[c.stackId];return f==null&&(f=[]),f.push(c),l[c.stackId]=f,l},n),s=Object.entries(o).map(l=>{var c,[f,d]=l,h=d.map(b=>b.dataKey),p=DT(t,r,(c=d[0])===null||c===void 0?void 0:c.barSize);return{stackId:f,dataKeys:h,barSize:p}}),u=a.map(l=>{var c=[l.dataKey].filter(d=>d!=null),f=DT(t,r,l.barSize);return{stackId:void 0,dataKeys:c,barSize:f}});return[...s,...u]};function RT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RT(Object(r),!0).forEach(function(n){mne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mne(e,t,r){return(t=gne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gne(e){var t=bne(e,"string");return typeof t=="symbol"?t:t+""}function bne(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yne(e,t,r,n,i){var a,o=n.length;if(!(o<1)){var s=$r(e,r,0,!0),u,l=[];if(Te((a=n[0])===null||a===void 0?void 0:a.barSize)){var c=!1,f=r/o,d=n.reduce((T,x)=>T+(x.barSize||0),0);d+=(o-1)*s,d>=r&&(d-=(o-1)*s,s=0),d>=r&&f>0&&(c=!0,f*=.9,d=o*f);var h=(r-d)/2>>0,p={offset:h-s,size:0};u=n.reduce((T,x)=>{var S,w={stackId:x.stackId,dataKeys:x.dataKeys,position:{offset:p.offset+p.size+s,size:c?f:(S=x.barSize)!==null&&S!==void 0?S:0}},A=[...T,w];return p=w.position,A},l)}else{var b=$r(t,r,0,!0);r-2*b-(o-1)*s<=0&&(s=0);var y=(r-2*b-(o-1)*s)/o;y>1&&(y>>=0);var v=Te(i)?Math.min(y,i):y;u=n.reduce((T,x,S)=>[...T,{stackId:x.stackId,dataKeys:x.dataKeys,position:{offset:b+(y+s)*S+(y-v)/2,size:v}}],l)}return u}}var vne=(e,t,r,n,i,a,o)=>{var s=tt(o)?t:o,u=yne(r,n,i!==a?i:a,e,s);return i!==a&&u!=null&&(u=u.map(l=>Mu(Mu({},l),{},{position:Mu(Mu({},l.position),{},{offset:l.position.offset-i/2})}))),u},xne=(e,t)=>{var r=L0(t);if(!(!e||r==null||t==null)){var{stackId:n}=t;if(n!=null){var i=e[n];if(i){var{stackedData:a}=i;if(a)return a.find(o=>o.key===r)}}}},Ene=(e,t)=>{if(!(e==null||t==null)){var r=e.find(n=>n.stackId===t.stackId&&t.dataKey!=null&&n.dataKeys.includes(t.dataKey));if(r!=null)return r.position}};function Tne(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&Te(e.zIndex)?e.zIndex:t}var wne=e=>{var{chartData:t}=e,r=Qe(),n=St();return m.useEffect(()=>n?()=>{}:(r(KE(t)),()=>{r(KE(void 0))}),[t,r,n]),null},LT={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},bN=$t({name:"brush",initialState:LT,reducers:{setBrushSettings(e,t){return t.payload==null?LT:t.payload}}}),{setBrushSettings:ale}=bN.actions,Ane=bN.reducer,yN=(e,t)=>{var{x:r,y:n}=e,{x:i,y:a}=t;return{x:Math.min(r,i),y:Math.min(n,a),width:Math.abs(i-r),height:Math.abs(a-n)}},Sne=e=>{var{x1:t,y1:r,x2:n,y2:i}=e;return yN({x:t,y:r},{x:n,y:i})};function kne(e){return(e%180+180)%180}var _ne=function(t){var{width:r,height:n}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=kne(i),o=a*Math.PI/180,s=Math.atan(n/r),u=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(u)},Cne={dots:[],areas:[],lines:[]},vN=$t({name:"referenceElements",initialState:Cne,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=Cr(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=Cr(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=Cr(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:ole,removeDot:sle,addArea:Ine,removeArea:One,addLine:Nne,removeLine:Pne}=vN.actions,Dne=vN.reducer,xN=m.createContext(void 0),Rne=e=>{var{children:t}=e,[r]=m.useState("".concat(ps("recharts"),"-clip")),n=Cg();if(n==null)return null;var{x:i,y:a,width:o,height:s}=n;return m.createElement(xN.Provider,{value:r},m.createElement("defs",null,m.createElement("clipPath",{id:r},m.createElement("rect",{x:i,y:a,height:s,width:o}))),t)},EN=()=>m.useContext(xN);class TN{constructor(t){var{x:r,y:n}=t;this.xAxisScale=r,this.yAxisScale=n}map(t,r){var n,i,{position:a}=r;return{x:(n=this.xAxisScale.map(t.x,{position:a}))!==null&&n!==void 0?n:0,y:(i=this.yAxisScale.map(t.y,{position:a}))!==null&&i!==void 0?i:0}}mapWithFallback(t,r){var n,i,{position:a,fallback:o}=r,s,u;return o==="rangeMin"?s=this.yAxisScale.rangeMin():o==="rangeMax"?s=this.yAxisScale.rangeMax():s=0,o==="rangeMin"?u=this.xAxisScale.rangeMin():o==="rangeMax"?u=this.xAxisScale.rangeMax():u=0,{x:(n=this.xAxisScale.map(t.x,{position:a}))!==null&&n!==void 0?n:u,y:(i=this.yAxisScale.map(t.y,{position:a}))!==null&&i!==void 0?i:s}}isInRange(t){var{x:r,y:n}=t,i=r==null||this.xAxisScale.isInRange(r),a=n==null||this.yAxisScale.isInRange(n);return i&&a}}function MT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MT(Object(r),!0).forEach(function(n){Lne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lne(e,t,r){return(t=Mne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mne(e){var t=jne(e,"string");return typeof t=="symbol"?t:t+""}function jne(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nc(){return nc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nc.apply(null,arguments)}var Bne=(e,t)=>{var r;if(m.isValidElement(e))r=m.cloneElement(e,t);else if(typeof e=="function")r=e(t);else{if(!Te(t.x1)||!Te(t.y1)||!Te(t.x2)||!Te(t.y2))return null;r=m.createElement("line",nc({},t,{className:"recharts-reference-line-line"}))}return r},Fne=(e,t,r,n,i,a)=>{var{x:o,width:s}=a,u=i.map(e,{position:r});if(!Te(u)||t==="discard"&&!i.isInRange(u))return null;var l=[{x:o+s,y:u},{x:o,y:u}];return n==="left"?l.reverse():l},$ne=(e,t,r,n,i,a)=>{var{y:o,height:s}=a,u=i.map(e,{position:r});if(!Te(u)||t==="discard"&&!i.isInRange(u))return null;var l=[{x:u,y:o+s},{x:u,y:o}];return n==="top"?l.reverse():l},Une=(e,t,r,n)=>{var i=[n.mapWithFallback(e[0],{position:r,fallback:"rangeMin"}),n.mapWithFallback(e[1],{position:r,fallback:"rangeMax"})];return t==="discard"&&i.some(a=>!n.isInRange(a))?null:i},Hne=(e,t,r,n,i,a,o)=>{var{x:s,y:u,segment:l,ifOverflow:c}=o,f=jt(s),d=jt(u);return d?Fne(u,c,n,a,t,r):f?$ne(s,c,n,i,e,r):l!=null&&l.length===2?Une(l,c,n,new TN({x:e,y:t})):null};function zne(e){var t=Qe();return m.useEffect(()=>(t(Nne(e)),()=>{t(Pne(e))})),null}function qne(e){var{xAxisId:t,yAxisId:r,shape:n,className:i,ifOverflow:a}=e,o=St(),s=EN(),u=oe(_=>dn(_,t)),l=oe(_=>hn(_,r)),c=oe(_=>ii(_,"xAxis",t,o)),f=oe(_=>ii(_,"yAxis",r,o)),d=Gs();if(!s||!d||u==null||l==null||c==null||f==null)return null;var h=Hne(c,f,d,e.position,u.orientation,l.orientation,e);if(!h)return null;var p=h[0],b=h[1];if(p==null||b==null)return null;var{x:y,y:v}=p,{x:T,y:x}=b,S=a==="hidden"?"url(#".concat(s,")"):void 0,w=jT(jT({clipPath:S},Pt(e)),{},{x1:y,y1:v,x2:T,y2:x}),A=Sne({x1:y,y1:v,x2:T,y2:x});return m.createElement(ur,{zIndex:e.zIndex},m.createElement(Zt,{className:Le("recharts-reference-line",i)},Bne(n,w),m.createElement(Sg,nc({},A,{lowerWidth:A.width,upperWidth:A.width}),m.createElement(_g,{label:e.label}),e.children)))}var Wne={ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",label:!1,stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle",zIndex:ft.line};function wN(e){var t=Dt(e,Wne);return m.createElement(m.Fragment,null,m.createElement(zne,{yAxisId:t.yAxisId,xAxisId:t.xAxisId,ifOverflow:t.ifOverflow,x:t.x,y:t.y,segment:t.segment}),m.createElement(qne,t))}wN.displayName="ReferenceLine";function BT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function FT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BT(Object(r),!0).forEach(function(n){Vne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vne(e,t,r){return(t=Yne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yne(e){var t=Kne(e,"string");return typeof t=="symbol"?t:t+""}function Kne(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ic(){return ic=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ic.apply(null,arguments)}var Gne=(e,t,r,n,i,a,o)=>{var s,u,l,c,{x1:f,x2:d,y1:h,y2:p}=o;if(i==null||a==null)return null;var b=new TN({x:i,y:a}),y={x:e?(s=i.map(f,{position:"start"}))!==null&&s!==void 0?s:null:i.rangeMin(),y:r?(u=a.map(h,{position:"start"}))!==null&&u!==void 0?u:null:a.rangeMin()},v={x:t?(l=i.map(d,{position:"end"}))!==null&&l!==void 0?l:null:i.rangeMax(),y:n?(c=a.map(p,{position:"end"}))!==null&&c!==void 0?c:null:a.rangeMax()};return o.ifOverflow==="discard"&&(!b.isInRange(y)||!b.isInRange(v))?null:yN(y,v)},Xne=(e,t)=>{var r;return m.isValidElement(e)?r=m.cloneElement(e,t):typeof e=="function"?r=e(t):r=m.createElement(A0,ic({},t,{className:"recharts-reference-area-rect"})),r};function Zne(e){var t=Qe();return m.useEffect(()=>(t(Ine(e)),()=>{t(One(e))})),null}function Qne(e){var{x1:t,x2:r,y1:n,y2:i,className:a,shape:o,xAxisId:s,yAxisId:u}=e,l=EN(),c=St(),f=oe(S=>ii(S,"xAxis",s,c)),d=oe(S=>ii(S,"yAxis",u,c));if(f==null||d==null)return null;var h=jt(t),p=jt(r),b=jt(n),y=jt(i);if(!h&&!p&&!b&&!y&&!o)return null;var v=Gne(h,p,b,y,f,d,e);if(!v&&!o)return null;var T=e.ifOverflow==="hidden",x=T?"url(#".concat(l,")"):void 0;return m.createElement(ur,{zIndex:e.zIndex},m.createElement(Zt,{className:Le("recharts-reference-area",a)},Xne(o,FT(FT({clipPath:x},Pt(e)),v)),v!=null&&m.createElement(Sg,ic({},v,{lowerWidth:v.width,upperWidth:v.width}),m.createElement(_g,{label:e.label}),e.children)))}var Jne={ifOverflow:"discard",xAxisId:0,yAxisId:0,radius:0,fill:"#ccc",label:!1,fillOpacity:.5,stroke:"none",strokeWidth:1,zIndex:ft.area};function Zp(e){var t=Dt(e,Jne);return m.createElement(m.Fragment,null,m.createElement(Zne,{yAxisId:t.yAxisId,xAxisId:t.xAxisId,ifOverflow:t.ifOverflow,x1:t.x1,x2:t.x2,y1:t.y1,y2:t.y2}),m.createElement(Qne,t))}Zp.displayName="ReferenceArea";function AN(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;n<e.length;n+=t){var i=e[n];i!==void 0&&r.push(i)}return r}function eie(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return _ne(n,r)}function tie(e,t,r){var n=r==="width",{x:i,y:a,width:o,height:s}=e;return t===1?{start:n?i:a,end:n?i+o:a+s}:{start:n?i+o:a+s,end:n?i:a}}function Cs(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function rie(e,t){return AN(e,t+1)}function nie(e,t,r,n,i){for(var a=(n||[]).slice(),{start:o,end:s}=t,u=0,l=1,c=o,f=function(){var p=n?.[u];if(p===void 0)return{v:AN(n,l)};var b=u,y,v=()=>(y===void 0&&(y=r(p,b)),y),T=p.coordinate,x=u===0||Cs(e,T,v,c,s);x||(u=0,c=o,l+=1),x&&(c=T+e*(v()/2+i),u+=l)},d;l<=a.length;)if(d=f(),d)return d.v;return[]}function iie(e,t,r,n,i){var a=(n||[]).slice(),o=a.length;if(o===0)return[];for(var{start:s,end:u}=t,l=1;l<=o;l++){for(var c=(o-1)%l,f=s,d=!0,h=function(){var S=n[b];if(S==null)return 0;var w=b,A,_=()=>(A===void 0&&(A=r(S,w)),A),O=S.coordinate,R=b===c||Cs(e,O,_,f,u);if(!R)return d=!1,1;R&&(f=O+e*(_()/2+i))},p,b=c;b<o&&(p=h(),!(p!==0&&p===1));b+=l);if(d){for(var y=[],v=c;v<o;v+=l){var T=n[v];T!=null&&y.push(T)}return y}}return[]}function $T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$T(Object(r),!0).forEach(function(n){aie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$T(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aie(e,t,r){return(t=oie(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oie(e){var t=sie(e,"string");return typeof t=="symbol"?t:t+""}function sie(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uie(e,t,r,n,i){for(var a=(n||[]).slice(),o=a.length,{start:s}=t,{end:u}=t,l=function(d){var h=a[d];if(h==null)return 1;var p=h,b,y=()=>(b===void 0&&(b=r(h,d)),b);if(d===o-1){var v=e*(p.coordinate+e*y()/2-u);a[d]=p=Rt(Rt({},p),{},{tickCoord:v>0?p.coordinate-v*e:p.coordinate})}else a[d]=p=Rt(Rt({},p),{},{tickCoord:p.coordinate});if(p.tickCoord!=null){var T=Cs(e,p.tickCoord,y,s,u);T&&(u=p.tickCoord-e*(y()/2+i),a[d]=Rt(Rt({},p),{},{isShow:!0}))}},c=o-1;c>=0;c--)l(c);return a}function lie(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,{start:u,end:l}=t;if(a){var c=n[s-1];if(c!=null){var f=r(c,s-1),d=e*(c.coordinate+e*f/2-l);if(o[s-1]=c=Rt(Rt({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate}),c.tickCoord!=null){var h=Cs(e,c.tickCoord,()=>f,u,l);h&&(l=c.tickCoord-e*(f/2+i),o[s-1]=Rt(Rt({},c),{},{isShow:!0}))}}}for(var p=a?s-1:s,b=function(T){var x=o[T];if(x==null)return 1;var S=x,w,A=()=>(w===void 0&&(w=r(x,T)),w);if(T===0){var _=e*(S.coordinate-e*A()/2-u);o[T]=S=Rt(Rt({},S),{},{tickCoord:_<0?S.coordinate-_*e:S.coordinate})}else o[T]=S=Rt(Rt({},S),{},{tickCoord:S.coordinate});if(S.tickCoord!=null){var O=Cs(e,S.tickCoord,A,u,l);O&&(u=S.tickCoord+e*(A()/2+i),o[T]=Rt(Rt({},S),{},{isShow:!0}))}},y=0;y<p;y++)b(y);return o}function Ig(e,t,r){var{tick:n,ticks:i,viewBox:a,minTickGap:o,orientation:s,interval:u,tickFormatter:l,unit:c,angle:f}=e;if(!i||!i.length||!n)return[];if(se(u)||Js.isSsr){var d;return(d=rie(i,se(u)?u:0))!==null&&d!==void 0?d:[]}var h=[],p=s==="top"||s==="bottom"?"width":"height",b=c&&p==="width"?Jo(c,{fontSize:t,letterSpacing:r}):{width:0,height:0},y=(w,A)=>{var _=typeof l=="function"?l(w.value,A):w.value;return p==="width"?eie(Jo(_,{fontSize:t,letterSpacing:r}),b,f):Jo(_,{fontSize:t,letterSpacing:r})[p]},v=i[0],T=i[1],x=i.length>=2&&v!=null&&T!=null?nr(T.coordinate-v.coordinate):1,S=tie(a,x,p);return u==="equidistantPreserveStart"?nie(x,S,y,i,o):u==="equidistantPreserveEnd"?iie(x,S,y,i,o):(u==="preserveStart"||u==="preserveStartEnd"?h=lie(x,S,y,i,o,u==="preserveStartEnd"):h=uie(x,S,y,i,o),h.filter(w=>w.isShow))}var cie=e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:i=0,tickMargin:a=0}=e,o=0;if(t){Array.from(t).forEach(c=>{if(c){var f=c.getBoundingClientRect();f.width>o&&(o=f.width)}});var s=r?r.getBoundingClientRect().width:0,u=i+a,l=o+u+s+(r?n:0);return Math.round(l)}return 0},fie={xAxis:{},yAxis:{}},SN=$t({name:"renderedTicks",initialState:fie,reducers:{setRenderedTicks:(e,t)=>{var{axisType:r,axisId:n,ticks:i}=t.payload;e[r][n]=i},removeRenderedTicks:(e,t)=>{var{axisType:r,axisId:n}=t.payload;delete e[r][n]}}}),{setRenderedTicks:die,removeRenderedTicks:hie}=SN.actions,pie=SN.reducer,mie=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function gie(e,t){if(e==null)return{};var r,n,i=bie(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function bie(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Yi(){return Yi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yi.apply(null,arguments)}function UT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UT(Object(r),!0).forEach(function(n){yie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yie(e,t,r){return(t=vie(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vie(e){var t=xie(e,"string");return typeof t=="symbol"?t:t+""}function xie(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Sn={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:ft.axis};function Eie(e){var{x:t,y:r,width:n,height:i,orientation:a,mirror:o,axisLine:s,otherSvgProps:u}=e;if(!s)return null;var l=nt(nt(nt({},u),Fr(s)),{},{fill:"none"});if(a==="top"||a==="bottom"){var c=+(a==="top"&&!o||a==="bottom"&&o);l=nt(nt({},l),{},{x1:t,y1:r+c*i,x2:t+n,y2:r+c*i})}else{var f=+(a==="left"&&!o||a==="right"&&o);l=nt(nt({},l),{},{x1:t+f*n,y1:r,x2:t+f*n,y2:r+i})}return m.createElement("line",Yi({},l,{className:Le("recharts-cartesian-axis-line",ja(s,"className"))}))}function Tie(e,t,r,n,i,a,o,s,u){var l,c,f,d,h,p,b=s?-1:1,y=e.tickSize||o,v=se(e.tickCoord)?e.tickCoord:e.coordinate;switch(a){case"top":l=c=e.coordinate,d=r+ +!s*i,f=d-b*y,p=f-b*u,h=v;break;case"left":f=d=e.coordinate,c=t+ +!s*n,l=c-b*y,h=l-b*u,p=v;break;case"right":f=d=e.coordinate,c=t+ +s*n,l=c+b*y,h=l+b*u,p=v;break;default:l=c=e.coordinate,d=r+ +s*i,f=d+b*y,p=f+b*u,h=v;break}return{line:{x1:l,y1:f,x2:c,y2:d},tick:{x:h,y:p}}}function wie(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function Aie(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function Sie(e){var{option:t,tickProps:r,value:n}=e,i,a=Le(r.className,"recharts-cartesian-axis-tick-value");if(m.isValidElement(t))i=m.cloneElement(t,nt(nt({},r),{},{className:a}));else if(typeof t=="function")i=t(nt(nt({},r),{},{className:a}));else{var o="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(o=Le(o,ore(t))),i=m.createElement(Ag,Yi({},r,{className:o}),n)}return i}function kie(e){var{ticks:t,axisType:r,axisId:n}=e,i=Qe();return m.useEffect(()=>{if(n==null||r==null)return eo;var a=t.map(o=>({value:o.value,coordinate:o.coordinate,offset:o.offset,index:o.index}));return i(die({ticks:a,axisId:n,axisType:r})),()=>{i(hie({axisId:n,axisType:r}))}},[i,t,n,r]),null}var _ie=m.forwardRef((e,t)=>{var{ticks:r=[],tick:n,tickLine:i,stroke:a,tickFormatter:o,unit:s,padding:u,tickTextProps:l,orientation:c,mirror:f,x:d,y:h,width:p,height:b,tickSize:y,tickMargin:v,fontSize:T,letterSpacing:x,getTicksConfig:S,events:w,axisType:A,axisId:_}=e,O=Ig(nt(nt({},S),{},{ticks:r}),T,x),R=Fr(S),C=qs(n),M=VO(R.textAnchor)?R.textAnchor:wie(c,f),L=Aie(c,f),Q={};typeof i=="object"&&(Q=i);var H=nt(nt({},R),{},{fill:"none"},Q),U=O.map(V=>nt({entry:V},Tie(V,d,h,p,b,c,y,f,v))),q=U.map(V=>{var{entry:re,line:P}=V;return m.createElement(Zt,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(re.value,"-").concat(re.coordinate,"-").concat(re.tickCoord)},i&&m.createElement("line",Yi({},H,P,{className:Le("recharts-cartesian-axis-tick-line",ja(i,"className"))})))}),J=U.map((V,re)=>{var P,le,{entry:he,tick:N}=V,pe=nt(nt(nt(nt({verticalAnchor:L},R),{},{textAnchor:M,stroke:"none",fill:a},N),{},{index:re,payload:he,visibleTicksCount:O.length,tickFormatter:o,padding:u},l),{},{angle:(P=(le=l?.angle)!==null&&le!==void 0?le:R.angle)!==null&&P!==void 0?P:0}),we=nt(nt({},pe),C);return m.createElement(Zt,Yi({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(he.value,"-").concat(he.coordinate,"-").concat(he.tickCoord)},f0(w,he,re)),n&&m.createElement(Sie,{option:n,tickProps:we,value:"".concat(typeof o=="function"?o(he.value,re):he.value).concat(s||"")}))});return m.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(A,"-ticks")},m.createElement(kie,{ticks:O,axisId:_,axisType:A}),J.length>0&&m.createElement(ur,{zIndex:ft.label},m.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(A,"-tick-labels"),ref:t},J)),q.length>0&&m.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(A,"-tick-lines")},q))}),Cie=m.forwardRef((e,t)=>{var{axisLine:r,width:n,height:i,className:a,hide:o,ticks:s,axisType:u,axisId:l}=e,c=gie(e,mie),[f,d]=m.useState(""),[h,p]=m.useState(""),b=m.useRef(null);m.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var v;return cie({ticks:b.current,label:(v=e.labelRef)===null||v===void 0?void 0:v.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var y=m.useCallback(v=>{if(v){var T=v.getElementsByClassName("recharts-cartesian-axis-tick-value");b.current=T;var x=T[0];if(x){var S=window.getComputedStyle(x),w=S.fontSize,A=S.letterSpacing;(w!==f||A!==h)&&(d(w),p(A))}}},[f,h]);return o||n!=null&&n<=0||i!=null&&i<=0?null:m.createElement(ur,{zIndex:e.zIndex},m.createElement(Zt,{className:Le("recharts-cartesian-axis",a)},m.createElement(Eie,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:Fr(e)}),m.createElement(_ie,{ref:y,axisType:u,events:c,fontSize:f,getTicksConfig:e,height:e.height,letterSpacing:h,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:s,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:l}),m.createElement(Sg,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},m.createElement(_g,{label:e.label,labelRef:e.labelRef}),e.children)))}),Og=m.forwardRef((e,t)=>{var r=Dt(e,Sn);return m.createElement(Cie,Yi({},r,{ref:t}))});Og.displayName="CartesianAxis";var Iie=["x1","y1","x2","y2","key"],Oie=["offset"],Nie=["xAxisId","yAxisId"],Pie=["xAxisId","yAxisId"];function HT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HT(Object(r),!0).forEach(function(n){Die(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Die(e,t,r){return(t=Rie(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rie(e){var t=Lie(e,"string");return typeof t=="symbol"?t:t+""}function Lie(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Oi(){return Oi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Oi.apply(null,arguments)}function ac(e,t){if(e==null)return{};var r,n,i=Mie(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Mie(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var jie=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:r,x:n,y:i,width:a,height:o,ry:s}=e;return m.createElement("rect",{x:n,y:i,ry:s,width:a,height:o,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function kN(e){var{option:t,lineItemProps:r}=e,n;if(m.isValidElement(t))n=m.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var i,{x1:a,y1:o,x2:s,y2:u,key:l}=r,c=ac(r,Iie),f=(i=Fr(c))!==null&&i!==void 0?i:{},{offset:d}=f,h=ac(f,Oie);n=m.createElement("line",Oi({},h,{x1:a,y1:o,x2:s,y2:u,fill:"none",key:l}))}return n}function Bie(e){var{x:t,width:r,horizontal:n=!0,horizontalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:a,yAxisId:o}=e,s=ac(e,Nie),u=i.map((l,c)=>{var f=Lt(Lt({},s),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(c),index:c});return m.createElement(kN,{key:"line-".concat(c),option:n,lineItemProps:f})});return m.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function Fie(e){var{y:t,height:r,vertical:n=!0,verticalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:a,yAxisId:o}=e,s=ac(e,Pie),u=i.map((l,c)=>{var f=Lt(Lt({},s),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(c),index:c});return m.createElement(kN,{option:n,lineItemProps:f,key:"line-".concat(c)})});return m.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function $ie(e){var{horizontalFill:t,fillOpacity:r,x:n,y:i,width:a,height:o,horizontalPoints:s,horizontal:u=!0}=e;if(!u||!t||!t.length||s==null)return null;var l=s.map(f=>Math.round(f+i-i)).sort((f,d)=>f-d);i!==l[0]&&l.unshift(0);var c=l.map((f,d)=>{var h=l[d+1],p=h==null,b=p?i+o-f:h-f;if(b<=0)return null;var y=d%t.length;return m.createElement("rect",{key:"react-".concat(d),y:f,x:n,height:b,width:a,stroke:"none",fill:t[y],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return m.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}function Uie(e){var{vertical:t=!0,verticalFill:r,fillOpacity:n,x:i,y:a,width:o,height:s,verticalPoints:u}=e;if(!t||!r||!r.length)return null;var l=u.map(f=>Math.round(f+i-i)).sort((f,d)=>f-d);i!==l[0]&&l.unshift(0);var c=l.map((f,d)=>{var h=l[d+1],p=h==null,b=p?i+o-f:h-f;if(b<=0)return null;var y=d%r.length;return m.createElement("rect",{key:"react-".concat(d),x:f,y:a,width:b,height:s,stroke:"none",fill:r[y],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return m.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var Hie=(e,t)=>{var{xAxis:r,width:n,height:i,offset:a}=e;return G_(Ig(Lt(Lt(Lt({},Sn),r),{},{ticks:X_(r),viewBox:{x:0,y:0,width:n,height:i}})),a.left,a.left+a.width,t)},zie=(e,t)=>{var{yAxis:r,width:n,height:i,offset:a}=e;return G_(Ig(Lt(Lt(Lt({},Sn),r),{},{ticks:X_(r),viewBox:{x:0,y:0,width:n,height:i}})),a.top,a.top+a.height,t)},qie={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:ft.grid};function Ng(e){var t=eC(),r=tC(),n=J_(),i=Lt(Lt({},Dt(e,qie)),{},{x:se(e.x)?e.x:n.left,y:se(e.y)?e.y:n.top,width:se(e.width)?e.width:n.width,height:se(e.height)?e.height:n.height}),{xAxisId:a,yAxisId:o,x:s,y:u,width:l,height:c,syncWithTicks:f,horizontalValues:d,verticalValues:h}=i,p=St(),b=oe(R=>LE(R,"xAxis",a,p)),y=oe(R=>LE(R,"yAxis",o,p));if(!Fa(l)||!Fa(c)||!se(s)||!se(u))return null;var v=i.verticalCoordinatesGenerator||Hie,T=i.horizontalCoordinatesGenerator||zie,{horizontalPoints:x,verticalPoints:S}=i;if((!x||!x.length)&&typeof T=="function"){var w=d&&d.length,A=T({yAxis:y?Lt(Lt({},y),{},{ticks:w?d:y.ticks}):void 0,width:t??l,height:r??c,offset:n},w?!0:f);$1(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof A,"]")),Array.isArray(A)&&(x=A)}if((!S||!S.length)&&typeof v=="function"){var _=h&&h.length,O=v({xAxis:b?Lt(Lt({},b),{},{ticks:_?h:b.ticks}):void 0,width:t??l,height:r??c,offset:n},_?!0:f);$1(Array.isArray(O),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(S=O)}return m.createElement(ur,{zIndex:i.zIndex},m.createElement("g",{className:"recharts-cartesian-grid"},m.createElement(jie,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),m.createElement($ie,Oi({},i,{horizontalPoints:x})),m.createElement(Uie,Oi({},i,{verticalPoints:S})),m.createElement(Bie,Oi({},i,{offset:n,horizontalPoints:x,xAxis:b,yAxis:y})),m.createElement(Fie,Oi({},i,{offset:n,verticalPoints:S,xAxis:b,yAxis:y}))))}Ng.displayName="CartesianGrid";var Wie={},_N=$t({name:"errorBars",initialState:Wie,reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:n,next:i}=t.payload;e[r]&&(e[r]=e[r].map(a=>a.dataKey===n.dataKey&&a.direction===n.direction?i:a))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]&&(e[r]=e[r].filter(i=>i.dataKey!==n.dataKey||i.direction!==n.direction))}}}),{addErrorBar:ule,replaceErrorBar:lle,removeErrorBar:cle}=_N.actions,Vie=_N.reducer,Yie=["children"];function Kie(e,t){if(e==null)return{};var r,n,i=Gie(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Gie(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Xie={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},Zie=m.createContext(Xie);function CN(e){var{children:t}=e,r=Kie(e,Yie);return m.createElement(Zie.Provider,{value:r},t)}function Pg(e,t){var r,n,i=oe(l=>dn(l,e)),a=oe(l=>hn(l,t)),o=(r=i?.allowDataOverflow)!==null&&r!==void 0?r:pt.allowDataOverflow,s=(n=a?.allowDataOverflow)!==null&&n!==void 0?n:mt.allowDataOverflow,u=o||s;return{needClip:u,needClipX:o,needClipY:s}}function IN(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=Cg(),{needClipX:a,needClipY:o,needClip:s}=Pg(t,r);if(!s||!i)return null;var{x:u,y:l,width:c,height:f}=i;return m.createElement("clipPath",{id:"clipPath-".concat(n)},m.createElement("rect",{x:a?u:u-c/2,y:o?l:l-f/2,width:a?c:c*2,height:o?f:f*2}))}var ON=(e,t,r,n)=>oi(e,"xAxis",t,n),NN=(e,t,r,n)=>ai(e,"xAxis",t,n),PN=(e,t,r,n)=>oi(e,"yAxis",r,n),DN=(e,t,r,n)=>ai(e,"yAxis",r,n),Qie=B([Fe,ON,PN,NN,DN],(e,t,r,n,i)=>Dn(e,"xAxis")?$a(t,n,!1):$a(r,i,!1)),Jie=(e,t,r,n,i)=>i;function eae(e){return e.type==="line"}var tae=B([mf,Jie],(e,t)=>e.filter(eae).find(r=>r.id===t)),rae=B([Fe,ON,PN,NN,DN,tae,Qie,eu],(e,t,r,n,i,a,o,s)=>{var{chartData:u,dataStartIndex:l,dataEndIndex:c}=s;if(!(a==null||t==null||r==null||n==null||i==null||n.length===0||i.length===0||o==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:f,data:d}=a,h;if(d!=null&&d.length>0?h=d:h=u?.slice(l,c+1),h!=null)return wae({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:f,bandSize:o,displayedData:h})}});function nae(e){var t=qs(e),r=3,n=2;if(t!=null){var{r:i,strokeWidth:a}=t,o=Number(i),s=Number(a);return(Number.isNaN(o)||o<0)&&(o=r),(Number.isNaN(s)||s<0)&&(s=n),{r:o,strokeWidth:s}}return{r,strokeWidth:n}}var iae=["id"],aae=["type","layout","connectNulls","needClip","shape"],oae=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Is(){return Is=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Is.apply(null,arguments)}function zT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Jr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zT(Object(r),!0).forEach(function(n){sae(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sae(e,t,r){return(t=uae(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uae(e){var t=lae(e,"string");return typeof t=="symbol"?t:t+""}function lae(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dg(e,t){if(e==null)return{};var r,n,i=cae(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function cae(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var fae=e=>{var{dataKey:t,name:r,stroke:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:qc(r,t),payload:e}]},dae=m.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:i,fill:a,name:o,hide:s,unit:u,tooltipType:l,id:c}=e,f={dataDefinedOnItem:r,getPosition:eo,settings:{stroke:n,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:qc(o,t),hide:s,type:l,color:n,unit:u,graphicalItemId:c}};return m.createElement(cN,{tooltipEntrySettings:f})}),RN=(e,t)=>"".concat(t,"px ").concat(e,"px");function hae(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],i=0;i<t;++i)n.push(...r);return n}var pae=(e,t,r)=>{var n=r.reduce((d,h)=>d+h,0);if(!n)return RN(t,e);for(var i=Math.floor(e/n),a=e%n,o=[],s=0,u=0;s<r.length;u+=(l=r[s])!==null&&l!==void 0?l:0,++s){var l,c=r[s];if(c!=null&&u+c>a){o=[...r.slice(0,s),a-u];break}}var f=o.length%2===0?[0,t]:[t];return[...hae(r,i),...o,...f].map(d=>"".concat(d,"px")).join(", ")};function mae(e){var{clipPathId:t,points:r,props:n}=e,{dot:i,dataKey:a,needClip:o}=n,{id:s}=n,u=Dg(n,iae),l=Fr(u);return m.createElement(Yre,{points:r,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:a,baseProps:l,needClip:o,clipPathId:t})}function gae(e){var{showLabels:t,children:r,points:n}=e,i=m.useMemo(()=>n?.map(a=>{var o,s,u={x:(o=a.x)!==null&&o!==void 0?o:0,y:(s=a.y)!==null&&s!==void 0?s:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Jr(Jr({},u),{},{value:a.value,payload:a.payload,viewBox:u,parentViewBox:void 0,fill:void 0})}),[n]);return m.createElement(JO,{value:t?i:void 0},r)}function qT(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:i,props:a}=e,{type:o,layout:s,connectNulls:u,needClip:l,shape:c}=a,f=Dg(a,aae),d=Jr(Jr({},Pt(f)),{},{fill:"none",className:"recharts-line-curve",clipPath:l?"url(#clipPath-".concat(t,")"):void 0,points:n,type:o,layout:s,connectNulls:u,strokeDasharray:i??a.strokeDasharray});return m.createElement(m.Fragment,null,n?.length>1&&m.createElement(oN,Is({shapeType:"curve",option:c},d,{pathRef:r})),m.createElement(mae,{points:n,clipPathId:t,props:a}))}function bae(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function yae(e){var{clipPathId:t,props:r,pathRef:n,previousPointsRef:i,longestAnimatedLengthRef:a}=e,{points:o,strokeDasharray:s,isAnimationActive:u,animationBegin:l,animationDuration:c,animationEasing:f,animateNewValues:d,width:h,height:p,onAnimationEnd:b,onAnimationStart:y}=r,v=i.current,T=Jc(o,"recharts-line-"),x=m.useRef(T),[S,w]=m.useState(!1),A=!S,_=m.useCallback(()=>{typeof b=="function"&&b(),w(!1)},[b]),O=m.useCallback(()=>{typeof y=="function"&&y(),w(!0)},[y]),R=bae(n.current),C=m.useRef(0);x.current!==T&&(C.current=a.current,x.current=T);var M=C.current;return m.createElement(gae,{points:o,showLabels:A},r.children,m.createElement(Qc,{animationId:T,begin:l,duration:c,isActive:u,easing:f,onAnimationEnd:_,onAnimationStart:O,key:T},L=>{var Q=at(M,R+M,L),H=Math.min(Q,R),U;if(u)if(s){var q="".concat(s).split(/[,\s]+/gim).map(re=>parseFloat(re));U=pae(H,R,q)}else U=RN(R,H);else U=s==null?void 0:String(s);if(L>0&&R>0&&(i.current=o,a.current=Math.max(a.current,H)),v){var J=v.length/o.length,V=L===1?o:o.map((re,P)=>{var le=Math.floor(P*J);if(v[le]){var he=v[le];return Jr(Jr({},re),{},{x:at(he.x,re.x,L),y:at(he.y,re.y,L)})}return d?Jr(Jr({},re),{},{x:at(h*2,re.x,L),y:at(p/2,re.y,L)}):Jr(Jr({},re),{},{x:re.x,y:re.y})});return i.current=V,m.createElement(qT,{props:r,points:V,clipPathId:t,pathRef:n,strokeDasharray:U})}return m.createElement(qT,{props:r,points:o,clipPathId:t,pathRef:n,strokeDasharray:U})}),m.createElement(tN,{label:r.label}))}function vae(e){var{clipPathId:t,props:r}=e,n=m.useRef(null),i=m.useRef(0),a=m.useRef(null);return m.createElement(yae,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:i,pathRef:a})}var xae=(e,t)=>{var r,n;return{x:(r=e.x)!==null&&r!==void 0?r:void 0,y:(n=e.y)!==null&&n!==void 0?n:void 0,value:e.value,errorVal:lt(e.payload,t)}};class Eae extends m.Component{render(){var{hide:t,dot:r,points:n,className:i,xAxisId:a,yAxisId:o,top:s,left:u,width:l,height:c,id:f,needClip:d,zIndex:h}=this.props;if(t)return null;var p=Le("recharts-line",i),b=f,{r:y,strokeWidth:v}=nae(r),T=aN(r),x=y*2+v,S=d?"url(#clipPath-".concat(T?"":"dots-").concat(b,")"):void 0;return m.createElement(ur,{zIndex:h},m.createElement(Zt,{className:p},d&&m.createElement("defs",null,m.createElement(IN,{clipPathId:b,xAxisId:a,yAxisId:o}),!T&&m.createElement("clipPath",{id:"clipPath-dots-".concat(b)},m.createElement("rect",{x:u-x/2,y:s-x/2,width:l+x,height:c+x}))),m.createElement(CN,{xAxisId:a,yAxisId:o,data:n,dataPointFormatter:xae,errorBarOffset:0},m.createElement(vae,{props:this.props,clipPathId:b}))),m.createElement(hne,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:S}))}}var LN={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:ft.line,type:"linear"};function Tae(e){var t=Dt(e,LN),{activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:a,animationEasing:o,connectNulls:s,dot:u,hide:l,isAnimationActive:c,label:f,legendType:d,xAxisId:h,yAxisId:p,id:b}=t,y=Dg(t,oae),{needClip:v}=Pg(h,p),T=Cg(),x=Qi(),S=St(),w=oe(C=>rae(C,h,p,S,b));if(x!=="horizontal"&&x!=="vertical"||w==null||T==null)return null;var{height:A,width:_,x:O,y:R}=T;return m.createElement(Eae,Is({},y,{id:b,connectNulls:s,dot:u,activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:a,animationEasing:o,isAnimationActive:c,hide:l,label:f,legendType:d,xAxisId:h,yAxisId:p,points:w,layout:x,height:A,width:_,left:O,top:R,needClip:v}))}function wae(e){var{layout:t,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:a,dataKey:o,bandSize:s,displayedData:u}=e;return u.map((l,c)=>{var f=lt(l,o);if(t==="horizontal"){var d=R1({axis:r,ticks:i,bandSize:s,entry:l,index:c}),h=tt(f)?null:n.scale.map(f);return{x:d,y:h??null,value:f,payload:l}}var p=tt(f)?null:r.scale.map(f),b=R1({axis:n,ticks:a,bandSize:s,entry:l,index:c});return p==null||b==null?null:{x:p,y:b,value:f,payload:l}}).filter(Boolean)}function Aae(e){var t=Dt(e,LN),r=St();return m.createElement(dN,{id:t.id,type:"line"},n=>m.createElement(m.Fragment,null,m.createElement(fN,{legendPayload:fae(t)}),m.createElement(dae,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:n}),m.createElement(pN,{type:"line",id:n,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:r}),m.createElement(Tae,Is({},t,{id:n}))))}var MN=m.memo(Aae,Qs);MN.displayName="Line";function ra(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:mN}function na(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:mN}var Sae="Invariant failed";function kae(e,t){throw new Error(Sae)}function Qp(){return Qp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qp.apply(null,arguments)}function Rg(e){return m.createElement(oN,Qp({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var _ae=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,i)=>{if(se(t))return t;var a=se(n)||tt(n);return a?t(n,i):(a||kae(),r)}},Cae=(e,t,r)=>r,Iae=(e,t)=>t,cu=B([mf,Iae],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),Oae=B([cu],e=>e?.maxBarSize),Nae=(e,t,r,n)=>n,Pae=B([Fe,mf,ra,na,Cae],(e,t,r,n,i)=>t.filter(a=>e==="horizontal"?a.xAxisId===r:a.yAxisId===n).filter(a=>a.isPanorama===i).filter(a=>a.hide===!1).filter(a=>a.type==="bar")),Dae=(e,t,r)=>{var n=Fe(e),i=ra(e,t),a=na(e,t);if(!(i==null||a==null))return n==="horizontal"?Vp(e,"yAxis",a,r):Vp(e,"xAxis",i,r)},Rae=(e,t)=>{var r=Fe(e),n=ra(e,t),i=na(e,t);if(!(n==null||i==null))return r==="horizontal"?RE(e,"xAxis",n):RE(e,"yAxis",i)},Lae=B([Pae,XK,Rae],pne),Mae=(e,t,r)=>{var n,i,a=cu(e,t);if(a==null)return 0;var o=ra(e,t),s=na(e,t);if(o==null||s==null)return 0;var u=Fe(e),l=DC(e),{maxBarSize:c}=a,f=tt(c)?l:c,d,h;return u==="horizontal"?(d=oi(e,"xAxis",o,r),h=ai(e,"xAxis",o,r)):(d=oi(e,"yAxis",s,r),h=ai(e,"yAxis",s,r)),(n=(i=$a(d,h,!0))!==null&&i!==void 0?i:f)!==null&&n!==void 0?n:0},jN=(e,t,r)=>{var n=Fe(e),i=ra(e,t),a=na(e,t);if(!(i==null||a==null)){var o,s;return n==="horizontal"?(o=oi(e,"xAxis",i,r),s=ai(e,"xAxis",i,r)):(o=oi(e,"yAxis",a,r),s=ai(e,"yAxis",a,r)),$a(o,s)}},jae=B([Lae,DC,GK,RC,Mae,jN,Oae],vne),Bae=(e,t,r)=>{var n=ra(e,t);if(n!=null)return oi(e,"xAxis",n,r)},Fae=(e,t,r)=>{var n=na(e,t);if(n!=null)return oi(e,"yAxis",n,r)},$ae=(e,t,r)=>{var n=ra(e,t);if(n!=null)return ai(e,"xAxis",n,r)},Uae=(e,t,r)=>{var n=na(e,t);if(n!=null)return ai(e,"yAxis",n,r)},Hae=B([jae,cu],Ene),zae=B([Dae,cu],xne),qae=B([At,x0,Bae,Fae,$ae,Uae,Hae,Fe,UK,jN,zae,cu,Nae],(e,t,r,n,i,a,o,s,u,l,c,f,d)=>{var{chartData:h,dataStartIndex:p,dataEndIndex:b}=u;if(!(f==null||o==null||t==null||s!=="horizontal"&&s!=="vertical"||r==null||n==null||i==null||a==null||l==null)){var{data:y}=f,v;if(y!=null&&y.length>0?v=y:v=h?.slice(p,b+1),v!=null)return yoe({layout:s,barSettings:f,pos:o,parentViewBox:t,bandSize:l,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:a,stackedData:c,displayedData:v,offset:e,cells:d,dataStartIndex:p})}}),Wae=["index"];function Jp(){return Jp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jp.apply(null,arguments)}function Vae(e,t){if(e==null)return{};var r,n,i=Yae(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Yae(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var BN=m.createContext(void 0),Kae=e=>{var t=m.useContext(BN);if(t!=null)return t.stackId;if(e!=null)return lV(e)},Gae=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),Xae=e=>{var t=m.useContext(BN);if(t!=null){var{stackId:r}=t;return"url(#".concat(Gae(r,e),")")}},FN=e=>{var{index:t}=e,r=Vae(e,Wae),n=Xae(t);return m.createElement(Zt,Jp({className:"recharts-bar-stack-layer",clipPath:n},r))},Zae=["onMouseEnter","onMouseLeave","onClick"],Qae=["value","background","tooltipPosition"],Jae=["id"],eoe=["onMouseEnter","onClick","onMouseLeave"];function si(){return si=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},si.apply(null,arguments)}function WT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Wt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WT(Object(r),!0).forEach(function(n){toe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function toe(e,t,r){return(t=roe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function roe(e){var t=noe(e,"string");return typeof t=="symbol"?t:t+""}function noe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oc(e,t){if(e==null)return{};var r,n,i=ioe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ioe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var aoe=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:qc(r,t),payload:e}]},ooe=m.memo(e=>{var{dataKey:t,stroke:r,strokeWidth:n,fill:i,name:a,hide:o,unit:s,tooltipType:u,id:l}=e,c={dataDefinedOnItem:void 0,getPosition:eo,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:t,nameKey:void 0,name:qc(a,t),hide:o,type:u,color:i,unit:s,graphicalItemId:l}};return m.createElement(cN,{tooltipEntrySettings:c})});function soe(e){var t=oe(Vi),{data:r,dataKey:n,background:i,allOtherBarProps:a}=e,{onMouseEnter:o,onMouseLeave:s,onClick:u}=a,l=oc(a,Zae),c=sN(o,n,a.id),f=uN(s),d=lN(u,n,a.id);if(!i||r==null)return null;var h=qs(i);return m.createElement(ur,{zIndex:Tne(i,ft.barBackground)},r.map((p,b)=>{var{value:y,background:v,tooltipPosition:T}=p,x=oc(p,Qae);if(!v)return null;var S=c(p,b),w=f(p,b),A=d(p,b),_=Wt(Wt(Wt(Wt(Wt({option:i,isActive:String(b)===t},x),{},{fill:"#eee"},v),h),f0(l,p,b)),{},{onMouseEnter:S,onMouseLeave:w,onClick:A,dataKey:n,index:b,className:"recharts-bar-background-rectangle"});return m.createElement(Rg,si({key:"background-bar-".concat(b)},_))}))}function uoe(e){var{showLabels:t,children:r,rects:n}=e,i=n?.map(a=>{var o={x:a.x,y:a.y,width:a.width,lowerWidth:a.width,upperWidth:a.width,height:a.height};return Wt(Wt({},o),{},{value:a.value,payload:a.payload,parentViewBox:a.parentViewBox,viewBox:o,fill:a.fill})});return m.createElement(JO,{value:t?i:void 0},r)}function loe(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:a,dataKey:o}=e,s=oe(Vi),u=oe(CO),l=r&&String(i.originalDataIndex)===s&&(u==null||o===u),[c,f]=m.useState(!1),[d,h]=m.useState(!1);m.useEffect(()=>{var x;return l?(f(!0),x=requestAnimationFrame(()=>{h(!0)})):h(!1),()=>{cancelAnimationFrame(x)}},[l]);var p=m.useCallback(()=>{l||f(!1)},[l]),b=l&&d,y=l||c,v;l?r===!0?v=t:v=r:v=t;var T=m.createElement(Rg,si({},n,{name:String(n.name)},i,{isActive:b,option:v,index:a,dataKey:o,onTransitionEnd:p}));return y?m.createElement(ur,{zIndex:ft.activeBar},m.createElement(FN,{index:i.originalDataIndex},T)):T}function coe(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:a}=e;return m.createElement(Rg,si({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:i,dataKey:a}))}function foe(e){var t,{data:r,props:n}=e,i=(t=Fr(n))!==null&&t!==void 0?t:{},{id:a}=i,o=oc(i,Jae),{shape:s,dataKey:u,activeBar:l}=n,{onMouseEnter:c,onClick:f,onMouseLeave:d}=n,h=oc(n,eoe),p=sN(c,u,a),b=uN(d),y=lN(f,u,a);return r?m.createElement(m.Fragment,null,r.map((v,T)=>m.createElement(FN,si({index:v.originalDataIndex,key:"rectangle-".concat(v?.x,"-").concat(v?.y,"-").concat(v?.value,"-").concat(T),className:"recharts-bar-rectangle"},f0(h,v,T),{onMouseEnter:p(v,T),onMouseLeave:b(v,T),onClick:y(v,T)}),l?m.createElement(loe,{shape:s,activeBar:l,baseProps:o,entry:v,index:T,dataKey:u}):m.createElement(coe,{shape:s,baseProps:o,entry:v,index:T,dataKey:u})))):null}function doe(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:i,isAnimationActive:a,animationBegin:o,animationDuration:s,animationEasing:u,onAnimationEnd:l,onAnimationStart:c}=t,f=r.current,d=Jc(t,"recharts-bar-"),[h,p]=m.useState(!1),b=!h,y=m.useCallback(()=>{typeof l=="function"&&l(),p(!1)},[l]),v=m.useCallback(()=>{typeof c=="function"&&c(),p(!0)},[c]);return m.createElement(uoe,{showLabels:b,rects:n},m.createElement(Qc,{animationId:d,begin:o,duration:s,isActive:a,easing:u,onAnimationEnd:y,onAnimationStart:v,key:d},T=>{var x=T===1?n:n?.map((S,w)=>{var A=f&&f[w];if(A)return Wt(Wt({},S),{},{x:at(A.x,S.x,T),y:at(A.y,S.y,T),width:at(A.width,S.width,T),height:at(A.height,S.height,T)});if(i==="horizontal"){var _=at(0,S.height,T),O=at(S.stackedBarStart,S.y,T);return Wt(Wt({},S),{},{y:O,height:_})}var R=at(0,S.width,T),C=at(S.stackedBarStart,S.x,T);return Wt(Wt({},S),{},{width:R,x:C})});return T>0&&(r.current=x??null),x==null?null:m.createElement(Zt,null,m.createElement(foe,{props:t,data:x}))}),m.createElement(tN,{label:t.label}),t.children)}function hoe(e){var t=m.useRef(null);return m.createElement(doe,{previousRectanglesRef:t,props:e})}var $N=0,poe=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:lt(e,t)}};class moe extends m.PureComponent{render(){var{hide:t,data:r,dataKey:n,className:i,xAxisId:a,yAxisId:o,needClip:s,background:u,id:l}=this.props;if(t||r==null)return null;var c=Le("recharts-bar",i),f=l;return m.createElement(Zt,{className:c,id:l},s&&m.createElement("defs",null,m.createElement(IN,{clipPathId:f,xAxisId:a,yAxisId:o})),m.createElement(Zt,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(f,")"):void 0},m.createElement(soe,{data:r,dataKey:n,background:u,allOtherBarProps:this.props}),m.createElement(hoe,this.props)))}}var goe={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:$N,xAxisId:0,yAxisId:0,zIndex:ft.bar};function boe(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:a,activeBar:o,animationBegin:s,animationDuration:u,animationEasing:l,isAnimationActive:c}=e,{needClip:f}=Pg(t,r),d=Qi(),h=St(),p=cre(e.children,$O),b=oe(T=>qae(T,e.id,h,p));if(d!=="vertical"&&d!=="horizontal")return null;var y,v=b?.[0];return v==null||v.height==null||v.width==null?y=0:y=d==="vertical"?v.height/2:v.width/2,m.createElement(CN,{xAxisId:t,yAxisId:r,data:b,dataPointFormatter:poe,errorBarOffset:y},m.createElement(moe,si({},e,{layout:d,needClip:f,data:b,xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:a,activeBar:o,animationBegin:s,animationDuration:u,animationEasing:l,isAnimationActive:c})))}function yoe(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n,hasCustomShape:i},pos:a,bandSize:o,xAxis:s,yAxis:u,xAxisTicks:l,yAxisTicks:c,stackedData:f,displayedData:d,offset:h,cells:p,parentViewBox:b,dataStartIndex:y}=e,v=t==="horizontal"?u:s,T=f?v.scale.domain():null,x=cV({numericAxis:v}),S=v.scale.map(x);return d.map((w,A)=>{var _,O,R,C,M,L;if(f){var Q=f[A+y];if(Q==null)return null;_=iV(Q,T)}else _=lt(w,r),Array.isArray(_)||(_=[x,_]);var H=_ae(n,$N)(_[1],A);if(t==="horizontal"){var U,q=u.scale.map(_[0]),J=u.scale.map(_[1]);if(q==null||J==null)return null;O=L1({axis:s,ticks:l,bandSize:o,offset:a.offset,entry:w,index:A}),R=(U=J??q)!==null&&U!==void 0?U:void 0,C=a.size;var V=q-J;if(M=sn(V)?0:V,L={x:O,y:h.top,width:C,height:h.height},Math.abs(H)>0&&Math.abs(M)<Math.abs(H)){var re=nr(M||H)*(Math.abs(H)-Math.abs(M));R-=re,M+=re}}else{var P=s.scale.map(_[0]),le=s.scale.map(_[1]);if(P==null||le==null)return null;if(O=P,R=L1({axis:u,ticks:c,bandSize:o,offset:a.offset,entry:w,index:A}),C=le-P,M=a.size,L={x:h.left,y:R,width:h.width,height:M},Math.abs(H)>0&&Math.abs(C)<Math.abs(H)){var he=nr(C||H)*(Math.abs(H)-Math.abs(C));C+=he}}if(O==null||R==null||C==null||M==null||!i&&(C===0||M===0))return null;var N=Wt(Wt({},w),{},{stackedBarStart:S,x:O,y:R,width:C,height:M,value:f?_:_[1],payload:w,background:L,tooltipPosition:{x:O+C/2,y:R+M/2},parentViewBox:b,originalDataIndex:A},p&&p[A]&&p[A].props);return N}).filter(Boolean)}function voe(e){var t=Dt(e,goe),r=Kae(t.stackId),n=St();return m.createElement(dN,{id:t.id,type:"bar"},i=>m.createElement(m.Fragment,null,m.createElement(fN,{legendPayload:aoe(t)}),m.createElement(ooe,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:i}),m.createElement(pN,{type:"bar",id:i,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:r,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n,hasCustomShape:t.shape!=null}),m.createElement(ur,{zIndex:t.zIndex},m.createElement(boe,si({},t,{id:i})))))}var UN=m.memo(voe,Qs);UN.displayName="Bar";var xoe=["domain","range"],Eoe=["domain","range"];function VT(e,t){if(e==null)return{};var r,n,i=Toe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Toe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function YT(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function HN(e,t){if(e===t)return!0;var{domain:r,range:n}=e,i=VT(e,xoe),{domain:a,range:o}=t,s=VT(t,Eoe);return!YT(r,a)||!YT(n,o)?!1:Qs(i,s)}var woe=["type"],Aoe=["dangerouslySetInnerHTML","ticks","scale"],Soe=["id","scale"];function em(){return em=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},em.apply(null,arguments)}function KT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function GT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KT(Object(r),!0).forEach(function(n){koe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function koe(e,t,r){return(t=_oe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _oe(e){var t=Coe(e,"string");return typeof t=="symbol"?t:t+""}function Coe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tm(e,t){if(e==null)return{};var r,n,i=Ioe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Ioe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Ooe(e){var t=Qe(),r=m.useRef(null),n=rC(),{type:i}=e,a=tm(e,woe),o=rf(n,"xAxis",i),s=m.useMemo(()=>{if(o!=null)return GT(GT({},a),{},{type:o})},[a,o]);return m.useLayoutEffect(()=>{s!=null&&(r.current===null?t(Qre(s)):r.current!==s&&t(Jre({prev:r.current,next:s})),r.current=s)},[s,t]),m.useLayoutEffect(()=>()=>{r.current&&(t(ene(r.current)),r.current=null)},[t]),null}var Noe=e=>{var{xAxisId:t,className:r}=e,n=oe(x0),i=St(),a="xAxis",o=oe(v=>oO(v,a,t,i)),s=oe(v=>nO(v,t)),u=oe(v=>NQ(v,t)),l=oe(v=>SI(v,t));if(s==null||u==null||l==null)return null;var{dangerouslySetInnerHTML:c,ticks:f,scale:d}=e,h=tm(e,Aoe),{id:p,scale:b}=l,y=tm(l,Soe);return m.createElement(Og,em({},h,y,{x:u.x,y:u.y,width:s.width,height:s.height,className:Le("recharts-".concat(a," ").concat(a),r),viewBox:n,ticks:o,axisType:a,axisId:t}))},Poe={allowDataOverflow:pt.allowDataOverflow,allowDecimals:pt.allowDecimals,allowDuplicatedCategory:pt.allowDuplicatedCategory,angle:pt.angle,axisLine:Sn.axisLine,height:pt.height,hide:!1,includeHidden:pt.includeHidden,interval:pt.interval,label:!1,minTickGap:pt.minTickGap,mirror:pt.mirror,orientation:pt.orientation,padding:pt.padding,reversed:pt.reversed,scale:pt.scale,tick:pt.tick,tickCount:pt.tickCount,tickLine:Sn.tickLine,tickSize:Sn.tickSize,type:pt.type,niceTicks:pt.niceTicks,xAxisId:0},Doe=e=>{var t=Dt(e,Poe);return m.createElement(m.Fragment,null,m.createElement(Ooe,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),m.createElement(Noe,t))},Lg=m.memo(Doe,HN);Lg.displayName="XAxis";var Roe=["type"],Loe=["dangerouslySetInnerHTML","ticks","scale"],Moe=["id","scale"];function rm(){return rm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rm.apply(null,arguments)}function XT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ZT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XT(Object(r),!0).forEach(function(n){joe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function joe(e,t,r){return(t=Boe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Boe(e){var t=Foe(e,"string");return typeof t=="symbol"?t:t+""}function Foe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nm(e,t){if(e==null)return{};var r,n,i=$oe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function $oe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Uoe(e){var t=Qe(),r=m.useRef(null),n=rC(),{type:i}=e,a=nm(e,Roe),o=rf(n,"yAxis",i),s=m.useMemo(()=>{if(o!=null)return ZT(ZT({},a),{},{type:o})},[o,a]);return m.useLayoutEffect(()=>{s!=null&&(r.current===null?t(tne(s)):r.current!==s&&t(rne({prev:r.current,next:s})),r.current=s)},[s,t]),m.useLayoutEffect(()=>()=>{r.current&&(t(nne(r.current)),r.current=null)},[t]),null}function Hoe(e){var{yAxisId:t,className:r,width:n,label:i}=e,a=m.useRef(null),o=m.useRef(null),s=oe(x0),u=St(),l=Qe(),c="yAxis",f=oe(A=>iO(A,t)),d=oe(A=>DQ(A,t)),h=oe(A=>oO(A,c,t,u)),p=oe(A=>kI(A,t));if(m.useLayoutEffect(()=>{if(!(n!=="auto"||!f||kg(i)||m.isValidElement(i)||p==null)){var A=a.current;if(A){var _=A.getCalculatedWidth();Math.round(f.width)!==Math.round(_)&&l(ine({id:t,width:_}))}}},[h,f,l,i,t,n,p]),f==null||d==null||p==null)return null;var{dangerouslySetInnerHTML:b,ticks:y,scale:v}=e,T=nm(e,Loe),{id:x,scale:S}=p,w=nm(p,Moe);return m.createElement(Og,rm({},T,w,{ref:a,labelRef:o,x:d.x,y:d.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:f.width,height:f.height,className:Le("recharts-".concat(c," ").concat(c),r),viewBox:s,ticks:h,axisType:c,axisId:t}))}var zoe={allowDataOverflow:mt.allowDataOverflow,allowDecimals:mt.allowDecimals,allowDuplicatedCategory:mt.allowDuplicatedCategory,angle:mt.angle,axisLine:Sn.axisLine,hide:!1,includeHidden:mt.includeHidden,interval:mt.interval,label:!1,minTickGap:mt.minTickGap,mirror:mt.mirror,orientation:mt.orientation,padding:mt.padding,reversed:mt.reversed,scale:mt.scale,tick:mt.tick,tickCount:mt.tickCount,tickLine:Sn.tickLine,tickSize:Sn.tickSize,type:mt.type,niceTicks:mt.niceTicks,width:mt.width,yAxisId:0},qoe=e=>{var t=Dt(e,zoe);return m.createElement(m.Fragment,null,m.createElement(Uoe,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),m.createElement(Hoe,t))},Mg=m.memo(qoe,HN);Mg.displayName="YAxis";var Woe=(e,t)=>t,jg=B([Woe,Fe,UC,_t,AO,jn,ree,At],lee);function Voe(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function Bg(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(Voe(e)){var i=e.currentTarget.getBBox();r=i.width>0?t.width/i.width:1,n=i.height>0?t.height/i.height:1}else{var a=e.currentTarget;r=a.offsetWidth>0?t.width/a.offsetWidth:1,n=a.offsetHeight>0?t.height/a.offsetHeight:1}var o=(s,u)=>({relativeX:Math.round((s-t.left)/r),relativeY:Math.round((u-t.top)/n)});return"touches"in e?Array.from(e.touches).map(s=>o(s.clientX,s.clientY)):o(e.clientX,e.clientY)}var zN=vr("mouseClick"),qN=Ys();qN.startListening({actionCreator:zN,effect:(e,t)=>{var r=e.payload,n=jg(t.getState(),Bg(r));n?.activeIndex!=null&&t.dispatch(GQ({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var im=vr("mouseMove"),WN=Ys(),ma=null,vi=null,Ah=null;WN.startListening({actionCreator:im,effect:(e,t)=>{var r=e.payload,n=t.getState(),{throttleDelay:i,throttledEvents:a}=n.eventSettings,o=a==="all"||a?.includes("mousemove");ma!==null&&(cancelAnimationFrame(ma),ma=null),vi!==null&&(typeof i!="number"||!o)&&(clearTimeout(vi),vi=null),Ah=Bg(r);var s=()=>{var u=t.getState(),l=uu(u,u.tooltip.settings.shared);if(!Ah){ma=null,vi=null;return}if(l==="axis"){var c=jg(u,Ah);c?.activeIndex!=null?t.dispatch(pO({activeIndex:c.activeIndex,activeDataKey:void 0,activeCoordinate:c.activeCoordinate})):t.dispatch(hO())}ma=null,vi=null};if(!o){s();return}i==="raf"?ma=requestAnimationFrame(s):typeof i=="number"&&vi===null&&(vi=setTimeout(s,i))}});function Yoe(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var QT={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},VN=$t({name:"rootProps",initialState:QT,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:QT.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),Koe=VN.reducer,{updateOptions:Goe}=VN.actions,Xoe=null,Zoe={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},YN=$t({name:"polarOptions",initialState:Xoe,reducers:Zoe}),{updatePolarOptions:fle}=YN.actions,Qoe=YN.reducer,KN=vr("keyDown"),GN=vr("focus"),XN=vr("blur"),yf=Ys(),ga=null,xi=null,ju=null;yf.startListening({actionCreator:KN,effect:(e,t)=>{ju=e.payload,ga!==null&&(cancelAnimationFrame(ga),ga=null);var r=t.getState(),{throttleDelay:n,throttledEvents:i}=r.eventSettings,a=i==="all"||i.includes("keydown");xi!==null&&(typeof n!="number"||!a)&&(clearTimeout(xi),xi=null);var o=()=>{try{var s=t.getState(),u=s.rootProps.accessibilityLayer!==!1;if(!u)return;var{keyboardInteraction:l}=s.tooltip,c=ju;if(c!=="ArrowRight"&&c!=="ArrowLeft"&&c!=="Enter")return;var f=Qo(l,Wi(s),Wa(s),Va(s)),d=f==null?-1:Number(f),h=!Number.isFinite(d)||d<0,p=jn(s),b=Wi(s),y=uu(s,s.tooltip.settings.shared);if(c==="Enter"){if(h)return;var v=Ql(s,y,"hover",String(l.index));t.dispatch(Zl({active:!l.active,activeIndex:l.index,activeCoordinate:v}));return}var T=BQ(s),x=T==="left-to-right"?1:-1,S=c==="ArrowRight"?1:-1,w;if(h){var A=Wa(s),_=Va(s),O=S*x,R=H=>({active:!1,index:String(H),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(w=-1,O>0){for(var C=0;C<b.length;C++)if(Qo(R(C),b,A,_)!=null){w=C;break}}else for(var M=b.length-1;M>=0;M--)if(Qo(R(M),b,A,_)!=null){w=M;break}if(w<0)return}else{w=d+S*x;var L=p?.length||b.length;if(L===0||w>=L||w<0)return}var Q=Ql(s,y,"hover",String(w));t.dispatch(Zl({active:!0,activeIndex:w.toString(),activeCoordinate:Q}))}finally{ga=null,xi=null}};if(!a){o();return}n==="raf"?ga=requestAnimationFrame(o):typeof n=="number"&&xi===null&&(o(),ju=null,xi=setTimeout(()=>{ju?o():(xi=null,ga=null)},n))}});yf.startListening({actionCreator:GN,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;if(!i.active&&i.index==null){var a="0",o=uu(r,r.tooltip.settings.shared),s=Ql(r,o,"hover",String(a));t.dispatch(Zl({active:!0,activeIndex:a,activeCoordinate:s}))}}}});yf.startListening({actionCreator:XN,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;i.active&&t.dispatch(Zl({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function ZN(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var i=Reflect.get(r,n);return typeof i=="function"?i.bind(r):i}})}var wr=vr("externalEvent"),QN=Ys(),Bu=new Map,Oo=new Map,Sh=new Map;QN.startListening({actionCreator:wr,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(r!=null){var i=n.type,a=ZN(n);Sh.set(i,{handler:r,reactEvent:a});var o=Bu.get(i);o!==void 0&&(cancelAnimationFrame(o),Bu.delete(i));var s=t.getState(),{throttleDelay:u,throttledEvents:l}=s.eventSettings,c=l,f=c==="all"||c?.includes(i),d=Oo.get(i);d!==void 0&&(typeof u!="number"||!f)&&(clearTimeout(d),Oo.delete(i));var h=()=>{var y=Sh.get(i);try{if(!y)return;var{handler:v,reactEvent:T}=y,x=t.getState(),S={activeCoordinate:$J(x),activeDataKey:CO(x),activeIndex:Vi(x),activeLabel:_O(x),activeTooltipIndex:Vi(x),isTooltipActive:UJ(x)};v&&v(S,T)}finally{Bu.delete(i),Oo.delete(i),Sh.delete(i)}};if(!f){h();return}if(u==="raf"){var p=requestAnimationFrame(h);Bu.set(i,p)}else if(typeof u=="number"){if(!Oo.has(i)){h();var b=setTimeout(h,u);Oo.set(i,b)}}else h()}}});var Joe=B([uo],e=>e.tooltipItemPayloads),ese=B([Joe,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(a=>a.settings.graphicalItemId===r);if(n!=null){var{getPosition:i}=n;if(i!=null)return i(t)}}}),JN=vr("touchMove"),eP=Ys(),Ei=null,$n=null,JT=null,No=null;eP.startListening({actionCreator:JN,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){No=ZN(r);var n=t.getState(),{throttleDelay:i,throttledEvents:a}=n.eventSettings,o=a==="all"||a.includes("touchmove");Ei!==null&&(cancelAnimationFrame(Ei),Ei=null),$n!==null&&(typeof i!="number"||!o)&&(clearTimeout($n),$n=null),JT=Array.from(r.touches).map(u=>Bg({clientX:u.clientX,clientY:u.clientY,currentTarget:r.currentTarget}));var s=()=>{if(No!=null){var u=t.getState(),l=uu(u,u.tooltip.settings.shared);if(l==="axis"){var c,f=(c=JT)===null||c===void 0?void 0:c[0];if(f==null){Ei=null,$n=null;return}var d=jg(u,f);d?.activeIndex!=null&&t.dispatch(pO({activeIndex:d.activeIndex,activeDataKey:void 0,activeCoordinate:d.activeCoordinate}))}else if(l==="item"){var h,p=No.touches[0];if(document.elementFromPoint==null||p==null)return;var b=document.elementFromPoint(p.clientX,p.clientY);if(!b||!b.getAttribute)return;var y=b.getAttribute(bV),v=(h=b.getAttribute(yV))!==null&&h!==void 0?h:void 0,T=ta(u).find(w=>w.id===v);if(y==null||T==null||v==null)return;var{dataKey:x}=T,S=ese(u,y,v);t.dispatch(dO({activeDataKey:x,activeIndex:y,activeCoordinate:S,activeGraphicalItemId:v}))}Ei=null,$n=null}};if(!o){s();return}i==="raf"?Ei=requestAnimationFrame(s):typeof i=="number"&&$n===null&&(s(),No=null,$n=setTimeout(()=>{No?s():($n=null,Ei=null)},i))}}});var tP={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},rP=$t({name:"eventSettings",initialState:tP,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:tse}=rP.actions,rse=rP.reducer,nse=x_({brush:Ane,cartesianAxis:ane,chartData:Fee,errorBars:Vie,eventSettings:rse,graphicalItems:jre,layout:JW,legend:KV,options:Ree,polarAxis:are,polarOptions:Qoe,referenceElements:Dne,renderedTicks:pie,rootProps:Koe,tooltip:XQ,zIndex:Tee}),ise=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return AW({reducer:nse,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([qN.middleware,WN.middleware,yf.middleware,QN.middleware,eP.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(L_({type:"raf"}))},devTools:{serialize:{replacer:Yoe},name:"recharts-".concat(r)}})};function ase(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=St(),a=m.useRef(null);if(i)return r;a.current==null&&(a.current=ise(t,n));var o=h0;return m.createElement(dY,{context:o,store:a.current},r)}function ose(e){var{layout:t,margin:r}=e,n=Qe(),i=St();return m.useEffect(()=>{i||(n(XW(t)),n(GW(r)))},[n,i,t,r]),null}var sse=m.memo(ose,Qs);function use(e){var t=Qe();return m.useEffect(()=>{t(Goe(e))},[t,e]),null}var lse=e=>{var t=Qe();return m.useEffect(()=>{t(tse(e))},[t,e]),null},cse=m.memo(lse,Qs);function ew(e){var{zIndex:t,isPanorama:r}=e,n=m.useRef(null),i=Qe();return m.useLayoutEffect(()=>(n.current&&i(xee({zIndex:t,element:n.current,isPanorama:r})),()=>{i(Eee({zIndex:t,isPanorama:r}))}),[i,t,r]),m.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function tw(e){var{children:t,isPanorama:r}=e,n=oe(fee);if(!n||n.length===0)return t;var i=n.filter(o=>o<0),a=n.filter(o=>o>0);return m.createElement(m.Fragment,null,i.map(o=>m.createElement(ew,{key:o,zIndex:o,isPanorama:r})),t,a.map(o=>m.createElement(ew,{key:o,zIndex:o,isPanorama:r})))}var fse=["children"];function dse(e,t){if(e==null)return{};var r,n,i=hse(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function hse(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function sc(){return sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sc.apply(null,arguments)}var pse={width:"100%",height:"100%",display:"block"},mse=m.forwardRef((e,t)=>{var r=eC(),n=tC(),i=dC();if(!Fa(r)||!Fa(n))return null;var{children:a,otherAttributes:o,title:s,desc:u}=e,l,c;return o!=null&&(typeof o.tabIndex=="number"?l=o.tabIndex:l=i?0:void 0,typeof o.role=="string"?c=o.role:c=i?"application":void 0),m.createElement(j2,sc({},o,{title:s,desc:u,role:c,tabIndex:l,width:r,height:n,style:pse,ref:t}),a)}),gse=e=>{var{children:t}=e,r=oe(Kc);if(!r)return null;var{width:n,height:i,y:a,x:o}=r;return m.createElement(j2,{width:n,height:i,x:o,y:a},t)},rw=m.forwardRef((e,t)=>{var{children:r}=e,n=dse(e,fse),i=St();return i?m.createElement(gse,null,m.createElement(tw,{isPanorama:!0},r)):m.createElement(mse,sc({ref:t},n),m.createElement(tw,{isPanorama:!1},r))});function bse(){var e=Qe(),[t,r]=m.useState(null),n=oe(gV);return m.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),a=i.width/t.offsetWidth;Te(a)&&a!==n&&e(QW(a))}},[t,e,n]),r}function nw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yse(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nw(Object(r),!0).forEach(function(n){vse(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vse(e,t,r){return(t=xse(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xse(e){var t=Ese(e,"string");return typeof t=="symbol"?t:t+""}function Ese(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ei(){return ei=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ei.apply(null,arguments)}var Tse=()=>(Kee(),null);function uc(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var wse=m.forwardRef((e,t)=>{var r,n,i=m.useRef(null),[a,o]=m.useState({containerWidth:uc((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:uc((n=e.style)===null||n===void 0?void 0:n.height)}),s=m.useCallback((l,c)=>{o(f=>{var d=Math.round(l),h=Math.round(c);return f.containerWidth===d&&f.containerHeight===h?f:{containerWidth:d,containerHeight:h}})},[]),u=m.useCallback(l=>{if(typeof t=="function"&&t(l),i.current!=null&&(i.current.disconnect(),i.current=null),l!=null&&typeof ResizeObserver<"u"){var{width:c,height:f}=l.getBoundingClientRect();s(c,f);var d=p=>{var b=p[0];if(b!=null){var{width:y,height:v}=b.contentRect;s(y,v)}},h=new ResizeObserver(d);h.observe(l),i.current=h}},[t,s]);return m.useEffect(()=>()=>{var l=i.current;l?.disconnect()},[s]),m.createElement(m.Fragment,null,m.createElement(Xs,{width:a.containerWidth,height:a.containerHeight}),m.createElement("div",ei({ref:u},e)))}),Ase=m.forwardRef((e,t)=>{var{width:r,height:n}=e,[i,a]=m.useState({containerWidth:uc(r),containerHeight:uc(n)}),o=m.useCallback((u,l)=>{a(c=>{var f=Math.round(u),d=Math.round(l);return c.containerWidth===f&&c.containerHeight===d?c:{containerWidth:f,containerHeight:d}})},[]),s=m.useCallback(u=>{if(typeof t=="function"&&t(u),u!=null){var{width:l,height:c}=u.getBoundingClientRect();o(l,c)}},[t,o]);return m.createElement(m.Fragment,null,m.createElement(Xs,{width:i.containerWidth,height:i.containerHeight}),m.createElement("div",ei({ref:s},e)))}),Sse=m.forwardRef((e,t)=>{var{width:r,height:n}=e;return m.createElement(m.Fragment,null,m.createElement(Xs,{width:r,height:n}),m.createElement("div",ei({ref:t},e)))}),kse=m.forwardRef((e,t)=>{var{width:r,height:n}=e;return typeof r=="string"||typeof n=="string"?m.createElement(Ase,ei({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?m.createElement(Sse,ei({},e,{width:r,height:n,ref:t})):m.createElement(m.Fragment,null,m.createElement(Xs,{width:r,height:n}),m.createElement("div",ei({ref:t},e)))});function _se(e){return e?wse:kse}var Cse=m.forwardRef((e,t)=>{var{children:r,className:n,height:i,onClick:a,onContextMenu:o,onDoubleClick:s,onMouseDown:u,onMouseEnter:l,onMouseLeave:c,onMouseMove:f,onMouseUp:d,onTouchEnd:h,onTouchMove:p,onTouchStart:b,style:y,width:v,responsive:T,dispatchTouchEvents:x=!0}=e,S=m.useRef(null),w=Qe(),[A,_]=m.useState(null),[O,R]=m.useState(null),C=bse(),M=Q_(),L=M?.width>0?M.width:v,Q=M?.height>0?M.height:i,H=m.useCallback(G=>{C(G),typeof t=="function"&&t(G),_(G),R(G),G!=null&&(S.current=G)},[C,t,_,R]),U=m.useCallback(G=>{w(zN(G)),w(wr({handler:a,reactEvent:G}))},[w,a]),q=m.useCallback(G=>{w(im(G)),w(wr({handler:l,reactEvent:G}))},[w,l]),J=m.useCallback(G=>{w(hO()),w(wr({handler:c,reactEvent:G}))},[w,c]),V=m.useCallback(G=>{w(im(G)),w(wr({handler:f,reactEvent:G}))},[w,f]),re=m.useCallback(()=>{w(GN())},[w]),P=m.useCallback(()=>{w(XN())},[w]),le=m.useCallback(G=>{w(KN(G.key))},[w]),he=m.useCallback(G=>{w(wr({handler:o,reactEvent:G}))},[w,o]),N=m.useCallback(G=>{w(wr({handler:s,reactEvent:G}))},[w,s]),pe=m.useCallback(G=>{w(wr({handler:u,reactEvent:G}))},[w,u]),we=m.useCallback(G=>{w(wr({handler:d,reactEvent:G}))},[w,d]),ce=m.useCallback(G=>{w(wr({handler:b,reactEvent:G}))},[w,b]),fe=m.useCallback(G=>{x&&w(JN(G)),w(wr({handler:p,reactEvent:G}))},[w,x,p]),be=m.useCallback(G=>{w(wr({handler:h,reactEvent:G}))},[w,h]),Y=_se(T);return m.createElement(LO.Provider,{value:A},m.createElement(iz.Provider,{value:O},m.createElement(Y,{width:L??y?.width,height:Q??y?.height,className:Le("recharts-wrapper",n),style:yse({position:"relative",cursor:"default",width:L,height:Q},y),onClick:U,onContextMenu:he,onDoubleClick:N,onFocus:re,onBlur:P,onKeyDown:le,onMouseDown:pe,onMouseEnter:q,onMouseLeave:J,onMouseMove:V,onMouseUp:we,onTouchEnd:be,onTouchMove:fe,onTouchStart:ce,ref:H},m.createElement(Tse,null),r)))}),Ise=["width","height","responsive","children","className","style","compact","title","desc"];function Ose(e,t){if(e==null)return{};var r,n,i=Nse(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Nse(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Pse=m.forwardRef((e,t)=>{var{width:r,height:n,responsive:i,children:a,className:o,style:s,compact:u,title:l,desc:c}=e,f=Ose(e,Ise),d=Fr(f);return u?m.createElement(m.Fragment,null,m.createElement(Xs,{width:r,height:n}),m.createElement(rw,{otherAttributes:d,title:l,desc:c},a)):m.createElement(Cse,{className:o,style:s,width:r,height:n,responsive:i??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},m.createElement(rw,{otherAttributes:d,title:l,desc:c,ref:t},m.createElement(Rne,null,a)))});function am(){return am=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},am.apply(null,arguments)}function iw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Dse(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iw(Object(r),!0).forEach(function(n){Rse(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Rse(e,t,r){return(t=Lse(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lse(e){var t=Mse(e,"string");return typeof t=="symbol"?t:t+""}function Mse(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jse={top:5,right:5,bottom:5,left:5},Bse=Dse({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:jse,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},tP),nP=m.forwardRef(function(t,r){var n,i=Dt(t.categoricalChartProps,Bse),{chartName:a,defaultTooltipEventType:o,validateTooltipEventTypes:s,tooltipPayloadSearcher:u,categoricalChartProps:l}=t,c={chartName:a,defaultTooltipEventType:o,validateTooltipEventTypes:s,tooltipPayloadSearcher:u,eventEmitter:void 0};return m.createElement(ase,{preloadedState:{options:c},reduxStoreName:(n=l.id)!==null&&n!==void 0?n:a},m.createElement(wne,{chartData:l.data}),m.createElement(sse,{layout:i.layout,margin:i.margin}),m.createElement(cse,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),m.createElement(use,{baseValue:i.baseValue,accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className,reverseStackOrder:i.reverseStackOrder}),m.createElement(Pse,am({},i,{ref:r})))}),Fse=["axis"],$se=m.forwardRef((e,t)=>m.createElement(nP,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Fse,tooltipPayloadSearcher:MO,categoricalChartProps:e,ref:t})),Use=["axis","item"],Hse=m.forwardRef((e,t)=>m.createElement(nP,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Use,tooltipPayloadSearcher:MO,categoricalChartProps:e,ref:t}));const es=new Set(["beginTimeSeconds","endTimeSeconds","inspectedCount"]);function aw(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}function Fg(e){if(e==null||typeof e!="object"||Array.isArray(e))return!1;const t=Object.keys(e);return t.length===1&&!isNaN(Number(t[0]))}function vf(e){if(typeof e=="number")return Number.isFinite(e)?e:null;if(Fg(e)){const t=Object.values(e)[0];return typeof t=="number"&&Number.isFinite(t)?t:null}return null}function Os(e,t){return e==null?"—":typeof e=="number"?t&&CP(t,e)?aw(e):t&&IP(t,e)?aw(e*1e3):Number.isInteger(e)||Math.abs(e)>1e3?e.toLocaleString():e.toFixed(2):Array.isArray(e)?e.length<=5?e.join(", "):`[${e.length} items]`:typeof e=="object"?Fg(e)?Os(Object.values(e)[0],t):JSON.stringify(e):String(e)}function kh(e){const t=[],r=e[0],n=r.facet,i=new Set;if(n!==void 0)if(Array.isArray(n))n.forEach((s,u)=>{const l=Object.keys(r).find(c=>c!=="facet"&&!es.has(c)&&r[c]===s);l&&i.add(l),t.push({key:`facet-${u}`,label:l??`Group ${u+1}`,get:c=>c.facet[u]})});else{const s=Object.keys(r).find(u=>u!=="facet"&&!es.has(u)&&r[u]===n);s&&i.add(s),t.push({key:"facet",label:s??"Name",get:u=>u.facet})}const a=[],o=new Set;for(const s of e)for(const u of Object.keys(s))o.has(u)||(o.add(u),a.push(u));for(const s of a)s==="facet"||es.has(s)||i.has(s)||t.push({key:s,label:s,get:u=>u[s]});return t}function zse(e){const t=Object.keys(e[0]).filter(l=>l!=="facet"&&l!=="comparison"&&!es.has(l)),r=e[0],n=r.facet,i=new Set;for(const l of t)(Array.isArray(n)?n.includes(r[l]):r[l]===n)&&i.add(l);const a=[...i][0]??(typeof n=="string"?"Name":"Group"),o=t.filter(l=>!i.has(l)),s=[];for(const l of e){const c=String(l.comparison);s.includes(c)||s.push(c)}const u=new Map;for(const l of e){const c=Array.isArray(l.facet)?JSON.stringify(l.facet):String(l.facet);u.has(c)||u.set(c,{label:l.facet,byPeriod:new Map}),u.get(c).byPeriod.set(String(l.comparison),l)}return{facetLabel:a,valueKeys:o,periods:s,grouped:u}}const qse=new Set(["beginTimeSeconds","endTimeSeconds","inspectedCount","facet","comparison"]);function $g(e){const[t,r]=m.useState(new Set),n=a=>r(o=>{const s=new Set(o);return s.has(a)?s.delete(a):s.add(a),s}),i=m.useMemo(()=>t.size===0?e:e.filter(a=>t.has(a.name)),[e,t]);return{selected:t,toggle:n,visible:i}}function Ug(e){const t=new Date(e*1e3),r=t.getMonth()+1,n=t.getDate(),i=t.getHours().toString().padStart(2,"0"),a=t.getMinutes().toString().padStart(2,"0");return`${r}/${n} ${i}:${a}`}function lc(e){if(e==null)return"—";const t=Number(e);return isNaN(t)?String(e):Math.abs(t)>=1e6?`${(t/1e6).toFixed(1)}M`:Math.abs(t)>=1e3?`${(t/1e3).toFixed(1)}K`:Number.isInteger(t)?t.toLocaleString():t.toFixed(2)}function Hg(e){return Object.keys(e).filter(t=>!qse.has(t)&&!Wse(e,t))}function Wse(e,t){const r=e.facet;return r===void 0?!1:Array.isArray(r)?r.includes(e[t]):e[t]===r}const iP={background:Vt.paper,border:`1px solid ${Vt.border}`,borderRadius:4,fontSize:11},Vse={color:Vt.inkMuted,marginBottom:2},Yse={color:Vt.inkLight};function zg({width:e,height:t,series:r,formatX:n,threshold:i}){const a=m.useMemo(()=>{const u=new Map(r.map(f=>[f.name,new Map(f.data.map(d=>[d.x,d.y]))])),l=new Set;for(const f of r)f.data.forEach(d=>l.add(d.x));return[...l].sort((f,d)=>f-d).map(f=>{const d={x:f};for(const h of r)d[h.name]=u.get(h.name)?.get(f)??null;return d})},[r]),o=i&&(i.operator===">"||i.operator===">="),s=i&&(i.operator==="<"||i.operator==="<=");return E.jsxs($se,{width:e,height:t,data:a,margin:{top:10,right:20,bottom:30,left:50},children:[E.jsx(Ng,{strokeDasharray:"3 3",stroke:Vt.border}),E.jsx(Lg,{dataKey:"x",tickFormatter:n,tick:{fontSize:10,fill:Vt.inkMuted},tickLine:!1,axisLine:{stroke:Vt.inkFaint}}),E.jsx(Mg,{tickFormatter:lc,tick:{fontSize:11,fill:Vt.inkMuted},tickLine:!1,axisLine:!1,width:48}),E.jsx(FO,{contentStyle:iP,labelStyle:Vse,itemStyle:Yse,labelFormatter:u=>n(u),formatter:(u,l)=>[lc(u),l]}),i&&E.jsx(wN,{y:i.value,stroke:"#b33a2a",strokeWidth:1.5,strokeDasharray:"6 4"}),o&&E.jsx(Zp,{y1:i.value,fill:"rgba(179, 58, 42, 0.12)"}),s&&E.jsx(Zp,{y2:i.value,fill:"rgba(179, 58, 42, 0.12)"}),r.map(u=>E.jsx(MN,{type:"monotone",dataKey:u.name,stroke:u.color,strokeWidth:2,strokeDasharray:u.dashed?"6 4":void 0,dot:!1,activeDot:{r:4,strokeWidth:2,stroke:"#fff"},connectNulls:!0},u.name))]})}function Kse({width:e,height:t,data:r,color:n}){return E.jsxs(Hse,{width:e,height:t,data:r,margin:{top:10,right:20,bottom:30,left:50},children:[E.jsx(Ng,{strokeDasharray:"3 3",stroke:Vt.border,vertical:!1}),E.jsx(Lg,{dataKey:"label",tick:{fontSize:10,fill:Vt.inkMuted},tickLine:!1,axisLine:{stroke:Vt.inkFaint}}),E.jsx(Mg,{tickFormatter:lc,tick:{fontSize:11,fill:Vt.inkMuted},tickLine:!1,axisLine:!1,width:48}),E.jsx(FO,{contentStyle:iP,labelStyle:{color:Vt.inkMuted},formatter:i=>[lc(i),"count"]}),E.jsx(UN,{dataKey:"value",fill:n,radius:[2,2,0,0],maxBarSize:60})]})}function qg({items:e,selectedNames:t,onToggle:r}){if(e.length<=1)return null;const n=t&&t.size>0;return E.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1 mt-2",children:e.map(i=>{const a=n&&!t.has(i.name);return E.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-sans",style:{color:Vt.inkMuted,cursor:r?"pointer":void 0,opacity:a?.35:1,textDecoration:a?"line-through":void 0,userSelect:"none"},onClick:r?()=>r(i.name):void 0,children:[E.jsx("svg",{width:16,height:2,children:E.jsx("line",{x1:0,y1:1,x2:16,y2:1,stroke:i.color,strokeWidth:2,strokeDasharray:i.dashed?"4 3":void 0})}),i.name]},i.name)})})}function xf({containerSize:e,defaultHeight:t,legendHeight:r=0,children:n}){const{ref:i,size:{width:a}}=wP();if(e){const o=Math.max(e.width-8,100),s=Math.max(e.height-r-8,80);return E.jsx(E.Fragment,{children:n({width:o,height:s})})}return E.jsx("div",{ref:i,className:z.chartContainer,children:a>0&&n({width:a-32,height:t})})}function ow({rows:e,containerSize:t,threshold:r}){const n="facet"in e[0],i="comparison"in e[0];return n?E.jsx(Xse,{rows:e,containerSize:t,threshold:r}):i?E.jsx(Zse,{rows:e,containerSize:t}):E.jsx(Gse,{rows:e,containerSize:t,threshold:r})}function Gse({rows:e,containerSize:t,threshold:r}){const n=m.useMemo(()=>Hg(e[0]),[e]),i=m.useMemo(()=>n.map((l,c)=>({name:l,color:z.chartColors[c%z.chartColors.length],data:e.map(f=>({x:f.beginTimeSeconds,y:vf(f[l])}))})),[e,n]),{selected:a,toggle:o,visible:s}=$g(i),u=i.length>1?28:0;return E.jsx(xf,{containerSize:t,defaultHeight:280,legendHeight:u,children:({width:l,height:c})=>E.jsxs("div",{children:[E.jsx(zg,{width:l,height:c,series:s,formatX:Ug,threshold:r}),E.jsx(qg,{items:i,selectedNames:a,onToggle:o})]})})}function Xse({rows:e,containerSize:t,threshold:r}){const n=m.useMemo(()=>{const l=Hg(e[0])[0];if(!l)return[];const c=[];for(const p of e){const b=Array.isArray(p.facet)?p.facet.join(", "):String(p.facet);c.includes(b)||c.push(b)}const f=new Set;for(const p of e)f.add(p.beginTimeSeconds);const d=[...f].sort((p,b)=>p-b),h=new Map;for(const p of e){const b=p.beginTimeSeconds,y=Array.isArray(p.facet)?p.facet.join(", "):String(p.facet);h.has(b)||h.set(b,new Map),h.get(b).set(y,vf(p[l]))}return c.map((p,b)=>({name:p,color:z.chartColors[b%z.chartColors.length],data:d.map(y=>({x:y,y:h.get(y)?.get(p)??null}))}))},[e]),{selected:i,toggle:a,visible:o}=$g(n),s=n.length>1?28:0;return E.jsx(xf,{containerSize:t,defaultHeight:300,legendHeight:s,children:({width:u,height:l})=>E.jsxs("div",{children:[E.jsx(zg,{width:u,height:l,series:o,formatX:Ug,threshold:r}),E.jsx(qg,{items:n,selectedNames:i,onToggle:a})]})})}function Zse({rows:e,containerSize:t}){const r=m.useMemo(()=>{const u=Hg(e[0])[0];if(!u)return[];const l=new Map,c=[];for(const h of e){const p=String(h.comparison);c.includes(p)||c.push(p),l.has(p)||l.set(p,[]),l.get(p).push(h)}let f=0;const d=l.get("current");if(d&&c.length>1){let h=1/0;for(const b of d)h=Math.min(h,b.beginTimeSeconds);const p=c.find(b=>b!=="current");if(p){let b=1/0;for(const y of l.get(p))b=Math.min(b,y.beginTimeSeconds);f=h-b}}return c.map((h,p)=>({name:`${u} (${h})`,color:z.chartColors[p%z.chartColors.length],dashed:h!=="current",data:(l.get(h)??[]).map(b=>({x:b.beginTimeSeconds+(h!=="current"?f:0),y:vf(b[u])})).sort((b,y)=>b.x-y.x)}))},[e]),{selected:n,toggle:i,visible:a}=$g(r),o=r.length>1?28:0;return E.jsx(xf,{containerSize:t,defaultHeight:280,legendHeight:o,children:({width:s,height:u})=>E.jsxs("div",{children:[E.jsx(zg,{width:s,height:u,series:a,formatX:Ug}),E.jsx(qg,{items:r,selectedNames:n,onToggle:i})]})})}function sw({row:e,containerSize:t}){const r=Object.keys(e).find(a=>a.startsWith("histogram.")),{data:n,metricName:i}=m.useMemo(()=>{if(!r)return{data:[],metricName:""};const a=e[r],o=Object.keys(a).map(Number).sort((s,u)=>s-u);return{metricName:r.replace("histogram.",""),data:o.map((s,u)=>{const l=o[u+1];return{label:l!==void 0?`${s}–${l}`:`${s}+`,value:a[String(s)]}})}},[e,r]);return r?E.jsx(xf,{containerSize:t,defaultHeight:260,legendHeight:24,children:({width:a,height:o})=>E.jsxs("div",{children:[E.jsxs("div",{className:"text-xs font-sans mb-1",style:{color:Vt.inkMuted},children:[i," distribution"]}),E.jsx(Kse,{width:a,height:o,data:n,color:"#6b9fd4"})]})}):null}function uw({columns:e,row:t}){return E.jsx("div",{className:"flex flex-wrap gap-3 my-2",children:e.map(r=>E.jsxs("div",{className:`${z.card} min-w-[120px]`,children:[E.jsx("div",{className:z.cardTitle,children:r.label}),E.jsx("div",{className:z.cardValue,children:Os(r.get(t),r.key)})]},r.key))})}function cc({value:e}){return E.jsx("span",{className:z.tableCellText,title:e,children:e})}function Gu({value:e,colKey:t}){return e!=null&&typeof e=="object"&&!Array.isArray(e)?Fg(e)?E.jsx(cc,{value:Os(e,t)}):E.jsx(r0,{data:e,collapsed:!0}):E.jsx(cc,{value:Os(e,t)})}function lw({columns:e,rows:t}){return E.jsx("div",{className:`${z.tableContainer} my-2`,children:E.jsxs("table",{className:"w-full",children:[E.jsx("thead",{className:"sticky top-0 z-10",children:E.jsx("tr",{className:z.tableHeaderRow,children:e.map(r=>E.jsx("th",{className:z.tableHeaderCell,children:r.label},r.key))})}),E.jsx("tbody",{children:t.map((r,n)=>E.jsx("tr",{className:z.tableRow,children:e.map(i=>E.jsx("td",{className:z.tableCell,children:E.jsx(Gu,{value:i.get(r),colKey:i.key})},i.key))},n))})]})})}const om=m.memo(function({data:t,containerSize:r,threshold:n,chartType:i}){if(typeof t=="string")return E.jsx("div",{className:z.analysisBlock,children:E.jsx(Fi,{linkSafety:{enabled:!1},children:t})});if(t&&typeof t=="object"&&!Array.isArray(t)&&"error"in t)return E.jsx("div",{className:z.resultErrorMessage,children:String(t.error)});if(t&&typeof t=="object"&&!Array.isArray(t))return E.jsx(r0,{data:t});if(!Array.isArray(t)||t.length===0)return E.jsx("div",{className:z.toolLoading,children:"No results returned."});if(t.every(h=>typeof h!="object"||h===null))return E.jsx("div",{className:`${z.tableContainer} my-2`,children:E.jsxs("table",{className:"w-full",children:[E.jsx("thead",{className:"sticky top-0 z-10",children:E.jsx("tr",{className:z.tableHeaderRow,children:E.jsx("th",{className:z.tableHeaderCell,children:"Value"})})}),E.jsx("tbody",{children:t.map((h,p)=>E.jsx("tr",{className:z.tableRow,children:E.jsx("td",{className:z.tableCell,children:E.jsx(cc,{value:Os(h)})})},p))})]})});const a=t;if(i&&i!=="auto"){if(i==="timeseries")return E.jsx(ow,{rows:a,containerSize:r,threshold:n});if(i==="histogram"&&a.length>=1)return E.jsx(sw,{row:a[0],containerSize:r});if(i==="scalar"){const p=kh([a[0]]).filter(b=>!b.key.startsWith("facet"));return E.jsx(uw,{columns:p,row:a[0]})}if(i==="table"){const h=kh(a);return E.jsx(lw,{columns:h,rows:a})}}const o="beginTimeSeconds"in a[0],s=a.length===1&&Object.keys(a[0]).some(h=>h.startsWith("histogram."));if(o)return E.jsx(ow,{rows:a,containerSize:r,threshold:n});if(s)return E.jsx(sw,{row:a[0],containerSize:r});if(a.length===1){const h=Object.keys(a[0]).filter(p=>!es.has(p));if(h.length===1){const p=a[0][h[0]];if(Array.isArray(p)&&p.every(b=>typeof b!="object"||b===null))return E.jsx("div",{className:`${z.tableContainer} my-2`,children:E.jsxs("table",{className:"w-full",children:[E.jsx("thead",{className:"sticky top-0 z-10",children:E.jsx("tr",{className:z.tableHeaderRow,children:E.jsx("th",{className:z.tableHeaderCell,children:h[0]})})}),E.jsx("tbody",{children:p.map((b,y)=>E.jsx("tr",{className:z.tableRow,children:E.jsx("td",{className:z.resultListItem,children:String(b)})},y))})]})})}}if("comparison"in a[0]){const{facetLabel:h,valueKeys:p,periods:b,grouped:y}=zse(a);if(!("facet"in a[0])){const T=[...y.values()][0];return E.jsx("div",{className:`${z.tableContainer} my-2`,children:E.jsxs("table",{className:"w-full",children:[E.jsx("thead",{className:"sticky top-0 z-10",children:E.jsxs("tr",{className:z.tableHeaderRow,children:[E.jsx("th",{className:z.tableHeaderCell,children:"Metric"}),b.map(x=>E.jsx("th",{className:z.tableHeaderCell,children:x},x))]})}),E.jsx("tbody",{children:p.map(x=>E.jsxs("tr",{className:z.tableRow,children:[E.jsx("td",{className:z.tableCell,children:E.jsx(cc,{value:x})}),b.map(S=>E.jsx("td",{className:z.tableCell,children:E.jsx(Gu,{value:T?.byPeriod.get(S)?.[x],colKey:x})},S))]},x))})]})})}return E.jsx("div",{className:`${z.tableContainer} my-2`,children:E.jsxs("table",{className:"w-full",children:[E.jsx("thead",{className:"sticky top-0 z-10",children:E.jsxs("tr",{className:z.tableHeaderRow,children:[E.jsx("th",{className:z.tableHeaderCell,children:h}),p.map(T=>b.map(x=>E.jsx("th",{className:z.tableHeaderCell,children:p.length>1?`${T} (${x})`:x},`${T}-${x}`)))]})}),E.jsx("tbody",{children:[...y.values()].map((T,x)=>E.jsxs("tr",{className:z.tableRow,children:[E.jsx("td",{className:z.tableCell,children:E.jsx(Gu,{value:T.label,colKey:h})}),p.map(S=>b.map(w=>E.jsx("td",{className:z.tableCell,children:E.jsx(Gu,{value:T.byPeriod.get(w)?.[S],colKey:S})},`${S}-${w}`)))]},x))})]})})}const l=kh(a),c="facet"in a[0],f=l.filter(h=>!h.key.startsWith("facet"));return a.length===1&&!c&&f.length>0&&f.every(h=>vf(h.get(a[0]))!==null)?E.jsx(uw,{columns:f,row:a[0]}):E.jsx(lw,{columns:l,rows:a})}),cw={[yn.CREATE_WIDGET]:{done:"Widget Created",loading:"Creating widget...",errorLabel:"Widget Error"},[yn.UPDATE_WIDGET]:{done:"Widget Updated",loading:"Updating widget...",errorLabel:"Widget Error"},[yn.DELETE_WIDGET]:{done:"Widget Deleted",loading:"Deleting widget...",errorLabel:"Widget Error"},[yn.CREATE_MONITOR]:{done:"Monitor Created",loading:"Creating monitor...",errorLabel:"Monitor Error"},[yn.UPDATE_MONITOR]:{done:"Monitor Updated",loading:"Updating monitor...",errorLabel:"Monitor Error"},[yn.DELETE_MONITOR]:{done:"Monitor Deleted",loading:"Deleting monitor...",errorLabel:"Monitor Error"},[yn.TOGGLE_MONITOR]:{done:"Monitor Toggled",loading:"Toggling monitor...",errorLabel:"Monitor Error"}},fw={"tool-nrql":"New Relic","tool-newrelic":"New Relic","tool-gcp":"Google Cloud"};function Qse(e){if(e in fw)return fw[e];const t=e.replace(/^tool-/,"");return t.charAt(0).toUpperCase()+t.slice(1)}function dw(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return"parts"in t||"queries"in t||"analysis"in t||"error"in t}function Jse(e){const t=[];if(e.queries)for(const r of e.queries)t.push({type:"query",query:r.query,results:r.results});return e.analysis&&t.push({type:"text",content:e.analysis}),t}function aP(e){return e.filter(t=>t.type==="query").length}const eue={execute_nrql:"Executing NRQL query"},tue=m.memo(function({toolName:t}){const r=eue[t]??t;return E.jsxs("div",{className:"flex items-center gap-2 py-2",children:[E.jsx("span",{className:"inline-block w-3.5 h-3.5 border-2 border-[#2b5ea7] border-t-transparent rounded-full animate-spin"}),E.jsx("span",{className:"text-sm text-[#2b5ea7] font-sans",children:r})]})}),rue=m.memo(function({content:t,isAnimating:r}){const n=m.useRef(null);return m.useEffect(()=>{r&&n.current&&(n.current.open=!0)},[r]),E.jsxs("details",{ref:n,className:"mb-2 border border-[#e8e3da]/30 rounded-md",children:[E.jsx("summary",{className:"cursor-pointer select-none px-3 py-1.5 text-xs text-[#9c9890] italic hover:text-[#6b6560] transition-colors",children:"Thinking"}),E.jsx("div",{className:"px-3 pb-2 text-sm text-[#9c9890] italic",children:E.jsx(Fi,{isAnimating:r,controls:{code:!0},linkSafety:{enabled:!1},children:t})})]})}),nue=m.memo(function({content:t,isAnimating:r}){return E.jsx("div",{className:z.analysisBlock,children:E.jsx(Fi,{isAnimating:r,controls:{code:!0},linkSafety:{enabled:!1},children:t})})}),iue=m.memo(function({content:t}){return E.jsxs("div",{className:z.summaryBlock,children:[E.jsx("div",{className:z.summaryLabel,children:"Analysis"}),E.jsx(Fi,{isAnimating:!1,controls:{code:!0},linkSafety:{enabled:!1},children:t})]})}),aue=m.memo(function({query:t,results:r,index:n,total:i}){return E.jsxs("div",{className:"mb-3",children:[E.jsxs("details",{className:"mb-2",open:i===1,children:[E.jsxs("summary",{className:z.toolQueryToggle,children:["Query ",i>1?`${n+1}: `:"",t.length>80?t.slice(0,80)+"...":t]}),E.jsx("div",{className:z.toolQueryCode,children:t})]}),E.jsx(om,{data:r})]})}),oue=m.memo(function({parts:t,isAnimating:r}){const n=aP(t);let i=0;return E.jsxs(E.Fragment,{children:[t.map((a,o)=>{if(a.type==="tool-call")return r?E.jsx(tue,{toolName:a.toolName},o):null;if(a.type==="reasoning")return E.jsx(rue,{content:a.content,isAnimating:r},o);if(a.type==="text")return E.jsx(nue,{content:a.content,isAnimating:r},o);if(a.type==="summary")return E.jsx(iue,{content:a.content},o);if(a.type!=="query"||!a.query)return null;const s=i++;return E.jsx(aue,{query:a.query,results:a.results,index:s,total:n},o)}),r&&E.jsx(Vg,{className:z.investigationThinking})]})}),sue=m.memo(function({part:t,progressStore:r}){if(t.type===yn.BEGIN_ANALYSIS)return null;const n=t.type.startsWith("tool-"),i=t.type in cw,a=n&&!i,o=dD(r,a?t.toolCallId:void 0);if(a){const u=Qse(t.type),l=t.state==="output-available",c=l?t.output:void 0;if(l&&dw(c)&&c.error)return E.jsxs("div",{className:z.investigationContainer,children:[E.jsxs("div",{className:z.investigationLabel,children:[u," Sub-Agent"]}),E.jsx("div",{className:z.resultErrorMessage,children:c.error})]});let f;if(l&&dw(c)?f=o?.parts?.length?o.parts:c.parts?.length?c.parts:Jse(c):o?.parts?.length?f=o.parts:l||(f=[]),f){const d=aP(f),h=l?`${u} Sub-Agent (${d} ${d===1?"query":"queries"})`:d>0?`Investigating... (${d} ${d===1?"query":"queries"})`:`Investigating via ${u}...`;return E.jsxs("div",{className:z.investigationContainer,children:[E.jsx("div",{className:z.investigationLabel,children:h}),t.input?.task&&E.jsxs("div",{className:z.investigationTask,children:["Task: ",t.input.task]}),E.jsx(oue,{parts:f,isAnimating:!l})]})}if(l&&Array.isArray(c)){const d=t.input?.query;return E.jsxs("div",{children:[E.jsxs("div",{className:z.toolLabel,children:[u," Result"]}),d&&E.jsxs("details",{className:"mb-2",children:[E.jsx("summary",{className:z.toolQueryToggle,children:"Show query"}),E.jsx("div",{className:z.toolQueryCode,children:d})]}),E.jsx(om,{data:c})]})}return l&&c!=null?E.jsxs("div",{children:[E.jsxs("div",{className:z.toolLabel,children:[u," Result"]}),E.jsx(om,{data:c})]}):null}const s=cw[t.type];if(s){if(t.state==="output-available"){const u=t.output,l=u&&"error"in u;return E.jsxs("div",{children:[E.jsx("div",{className:z.toolLabel,children:l?s.errorLabel:s.done}),E.jsxs("details",{className:"mb-2",children:[E.jsx("summary",{className:z.toolQueryToggle,children:"Show details"}),E.jsx("div",{className:z.toolQueryCode,children:E.jsx(r0,{data:u})})]})]})}return E.jsx("div",{className:z.toolLoading,children:s.loading})}return null});function uue(e){return e.replace(/^#{1,6}\s+/gm,"").replace(/\*\*(.+?)\*\*/g,"$1").replace(/__(.+?)__/g,"$1").replace(/\*(.+?)\*/g,"$1").replace(/_(.+?)_/g,"$1").replace(/~~(.+?)~~/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/!\[([^\]]*)\]\([^)]+\)/g,"$1").replace(/^>\s+/gm,"").replace(/^(\s*)[-*+]\s+/gm,"$1").replace(/^(\s*)\d+\.\s+/gm,"$1").replace(/^```\w*\n?/gm,"").replace(/^```$/gm,"").replace(/^[-*_]{3,}\s*$/gm,"")}function lue(e){const t=[];for(const r of e)if(r.type==="text")t.push(uue(r.text.replace(Xu,"")));else if(r.type!=="reasoning"){const n=r;n.input?.task&&t.push(`Task: ${n.input.task}`),n.input?.query&&t.push(`Query: ${n.input.query}`)}return t.join(`
193
+
194
+ `).trim()}function Wg({contentRef:e,parts:t,size:r=14}){const[n,i]=m.useState(!1),[a,o]=m.useState(!1),s=m.useCallback(async()=>{const l=lue(t);l&&(await navigator.clipboard.writeText(l),i(!0),setTimeout(()=>i(!1),1500))},[t]),u=m.useCallback(async()=>{const l=e.current;if(l)try{const c=await O2(l,{scale:2}),d=await(await fetch(c)).blob();await navigator.clipboard.write([new ClipboardItem({"image/png":d})]),o(!0),setTimeout(()=>o(!1),1500)}catch{}},[e]);return E.jsxs(E.Fragment,{children:[E.jsx("button",{type:"button",onClick:s,className:z.chatActionButton,title:n?"Copied!":"Copy as text","aria-label":n?"Copied":"Copy as text",children:n?E.jsx(hw,{size:r}):E.jsx(cue,{size:r})}),E.jsx("button",{type:"button",onClick:u,className:z.chatActionButton,title:a?"Copied!":"Copy as image","aria-label":a?"Copied":"Copy as image",children:a?E.jsx(hw,{size:r}):E.jsx(fue,{size:r})})]})}function hw({size:e=14}){return E.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:E.jsx("polyline",{points:"20 6 9 17 4 12"})})}function cue({size:e=14}){return E.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[E.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),E.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function fue({size:e=14}){return E.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[E.jsx("path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z"}),E.jsx("circle",{cx:"12",cy:"13",r:"3"})]})}const Na=Uint8Array.from([84,82,67,49]),due=4,ts=Na.length+due,hue=10*1024*1024;async function oP(e){const t=new Blob([e.buffer],{type:"image/png"});return createImageBitmap(t,{colorSpaceConversion:"none",premultiplyAlpha:"none"})}function sP(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d",{willReadFrequently:!0});if(!r)throw new Error("canvas 2D context unavailable");r.drawImage(e,0,0);const n=r.getImageData(0,0,t.width,t.height);return{canvas:t,ctx:r,imageData:n}}function pue(e,t){const r=t.length*8;let n=0;for(let i=0;i<e.length&&n<r;i+=4)if(e[i+3]===255)for(let a=0;a<3&&n<r;a++){const o=n>>3,s=7-(n&7),u=t[o]>>s&1;e[i+a]=e[i+a]&254|u,n++}if(n<r)throw new Error("LSB write ran out of capacity mid-stream")}function pw(e,t){const r=new Uint8Array(t),n=t*8;let i=0;for(let a=0;a<e.length&&i<n;a+=4)if(e[a+3]===255)for(let o=0;o<3&&i<n;o++){const s=i>>3,u=7-(i&7);r[s]|=(e[a+o]&1)<<u,i++}return i>=n?r:null}function mue(e){return new Promise((t,r)=>{e.toBlob(async n=>{if(!n){r(new Error("canvas.toBlob returned null"));return}t(new Uint8Array(await n.arrayBuffer()))},"image/png")})}async function gue(e,t){const r=await oP(e);try{const{canvas:n,ctx:i,imageData:a}=sP(r),o=new Uint8Array(ts+t.length);return o.set(Na,0),new DataView(o.buffer).setUint32(Na.length,t.length,!1),o.set(t,ts),pue(a.data,o),i.putImageData(a,0,0),await mue(n)}finally{r.close?.()}}async function bue(e){const t=await oP(e);try{const{imageData:{data:r}}=sP(t),n=pw(r,ts);if(!n)return null;for(let o=0;o<Na.length;o++)if(n[o]!==Na[o])return null;const i=new DataView(n.buffer,n.byteOffset,n.byteLength).getUint32(Na.length,!1);if(i<=0||i>hue)return null;const a=pw(r,ts+i);return a?a.subarray(ts):null}finally{t.close?.()}}const Xu="<analysis>";function yue({parts:e,children:t,sourceTitle:r,sourceCreatedAt:n,resolveSourceTitle:i}){const a=m.useRef(null),[o,s]=m.useState(null),u=m.useCallback(async()=>{const l=a.current;if(l)try{const c=await O2(l,{scale:2}),f=new Uint8Array(await(await fetch(c)).arrayBuffer()),d=await i?.()??r??"",h=JSON.stringify({v:1,kind:"analysis",sourceTitle:d,sourceCreatedAt:n??Math.floor(Date.now()/1e3),parts:e});if(h.length>2*1024*1024){s("Analysis too large to embed metadata"),setTimeout(()=>s(null),2500);return}const p=await gue(f,new TextEncoder().encode(h)),b=new Blob([p.buffer],{type:"image/png"}),y=URL.createObjectURL(b),v=document.createElement("a");v.href=y;const T=new Date,x=`${T.toISOString().slice(0,10)}-${String(T.getHours()).padStart(2,"0")}-${String(T.getMinutes()).padStart(2,"0")}`;v.download=`analysis-${x}.png`,v.click(),setTimeout(()=>URL.revokeObjectURL(y),5e3)}catch{}},[e,r,n,i]);return E.jsxs("div",{ref:a,className:`${z.analysisContainer} relative group/analysis`,children:[E.jsxs("div",{className:"flex items-center justify-between mb-1",children:[E.jsx("div",{className:z.summaryLabel,children:"Analysis"}),E.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover/analysis:opacity-100 transition-opacity",children:[o&&E.jsx("span",{className:"text-[10px] text-[#b33a2a] mr-1",children:o}),E.jsx(Wg,{contentRef:a,parts:e,size:12}),E.jsx("button",{type:"button",onClick:u,className:z.chatActionButton,title:"Download as image","aria-label":"Download as image",children:E.jsx(vue,{size:12})})]})]}),t]})}function vue({size:e=14}){return E.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[E.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),E.jsx("polyline",{points:"7 10 12 15 17 10"}),E.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]})}const uP=AP.memo(function({parts:t,isAnimating:r,progressStore:n,sourceTitle:i,sourceCreatedAt:a,resolveSourceTitle:o}){if(t.length===0&&!r)return E.jsx("span",{className:"text-sm italic text-[#9c9890]",children:"(interrupted)"});let s=null;for(let d=0;d<t.length;d++)if(t[d].type===yn.BEGIN_ANALYSIS){s={kind:"tool",partIdx:d};break}if(!s)for(let d=0;d<t.length;d++){const h=t[d];if(h.type==="text"){const p=h.text.indexOf(Xu);if(p!==-1){s={kind:"text",partIdx:d,charIdx:p};break}}}function u(d,h,p){if(d.type==="reasoning")return E.jsxs("details",{className:"mb-2 border border-[#e8e3da]/30 rounded-md",children:[E.jsx("summary",{className:"cursor-pointer select-none px-3 py-1.5 text-xs text-[#9c9890] italic hover:text-[#6b6560] transition-colors",children:"Thinking"}),E.jsx("div",{className:"px-3 pb-2 text-sm text-[#9c9890] italic",children:E.jsx(Fi,{isAnimating:r,controls:{code:!0},linkSafety:{enabled:!1},children:d.text})})]},h);if(d.type==="text"){const b=p??d.text;return b.trim()?E.jsx(Fi,{isAnimating:r,controls:{code:!0},linkSafety:{enabled:!1},children:b},h):null}return E.jsx(sue,{part:d,progressStore:n},h)}if(!s)return E.jsx(E.Fragment,{children:t.map((d,h)=>u(d,h))});const l=[],c=[];for(let d=0;d<t.length;d++)if(d<s.partIdx)l.push(u(t[d],d));else if(d===s.partIdx){if(s.kind==="text"){const h=t[d],p=h.text.slice(0,s.charIdx),b=h.text.slice(s.charIdx+Xu.length);p.trim()&&l.push(u(t[d],d,p)),b.trim()&&c.push(u(t[d],`${d}-after`,b))}}else c.push(u(t[d],d));const f=[];for(let d=s.partIdx;d<t.length;d++){const h=t[d];if(d===s.partIdx){if(s.kind==="text"&&h.type==="text"){const p=h.text.slice(s.charIdx+Xu.length);p.trim()&&f.push({type:"text",text:p})}}else f.push(h)}return E.jsxs(E.Fragment,{children:[l,E.jsx(yue,{parts:f,sourceTitle:i,sourceCreatedAt:a,resolveSourceTitle:o,children:c})]})},(e,t)=>{if(e.isAnimating||t.isAnimating||e.sourceTitle!==t.sourceTitle||e.sourceCreatedAt!==t.sourceCreatedAt)return!1;if(e.parts===t.parts)return!0;if(e.parts.length!==t.parts.length)return!1;for(let r=0;r<e.parts.length;r++)if(e.parts[r]!==t.parts[r])return!1;return!0});function Vg({className:e}){return E.jsx("div",{className:e,children:E.jsx("span",{className:"inline-flex items-center gap-1",children:xue.map(t=>E.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-current",style:Eue[t]},t))})})}const xue=[0,150,300],Eue={0:{animation:"dot-bounce 1.2s ease-in-out infinite",animationDelay:"0ms"},150:{animation:"dot-bounce 1.2s ease-in-out infinite",animationDelay:"150ms"},300:{animation:"dot-bounce 1.2s ease-in-out infinite",animationDelay:"300ms"}};function lP({isAtBottom:e,scrollToBottom:t}){return e?null:E.jsx("button",{type:"button",onClick:()=>t({animation:"instant"}),className:"absolute bottom-3 left-1/2 -translate-x-1/2 z-30 bg-[#2b5ea7] text-white rounded-full p-2 shadow-lg hover:bg-[#1e4a8a] transition-colors",title:"Scroll to bottom","aria-label":"Scroll to bottom",children:E.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:E.jsx("polyline",{points:"6 9 12 15 18 9"})})})}function cP(e,t){e.update(t.toolCallId,r=>{const n=[...r?.parts??[]];if(t.part.type==="tool-call")n.push({type:"tool-call",toolName:t.part.toolName});else if(t.part.type==="text-delta"){const i=n[n.length-1];i?.type==="text"?n[n.length-1]={...i,content:i.content+t.part.delta}:n.push({type:"text",content:t.part.delta})}else if(t.part.type==="reasoning-delta"){const i=n[n.length-1];i?.type==="reasoning"?n[n.length-1]={...i,content:i.content+t.part.delta}:n.push({type:"reasoning",content:t.part.delta})}else if(t.part.type==="query"){let i=-1;for(let a=n.length-1;a>=0;a--)if(n[a].type==="tool-call"){i=a;break}i!==-1&&n.splice(i,1),n.push({type:"query",query:t.part.query,results:t.part.results})}else if(t.part.type==="mark-summary"){for(let i=n.length-1;i>=0;i--)if(n[i].type==="text"){n[i]={...n[i],type:"summary"};break}}return{parts:n}})}function fP(e){const t=window.getSelection();!t||t.isCollapsed||(e.clipboardData.setData("text/plain",t.toString().trimEnd()),e.preventDefault())}function Tue({sessionId:e,initialMessages:t,onComplete:r,header:n,beforeInput:i}){const[a,o]=m.useState(t),s=m.useRef(new eA).current,u=m.useRef(t);u.current=t;const l=m.useRef(r);l.current=r;const{scrollRef:c,contentRef:f,isAtBottom:d,handleWheel:h,scrollToBottom:p}=Ew();m.useEffect(()=>{let T=!1;const x=new EventSource(`/api/chat/subscribe/${e}`);let S;const w=new ReadableStream({start(O){S=O}});let A=0,_=null;return x.addEventListener("part",O=>{if(!T){A=0;try{const R=JSON.parse(O.data);R.type==="data-provider-part"&&cP(s,R.data),S.enqueue(R)}catch{}}}),x.addEventListener("done",()=>{try{S.close()}catch{}x.close(),T||l.current()}),x.onerror=()=>{if(x.readyState===EventSource.CLOSED){try{S.close()}catch{}T||l.current();return}if(A++,A>=ns.maxSseErrors){try{S.close()}catch{}x.close(),T||l.current();return}_&&clearTimeout(_),_=setTimeout(()=>{A=0},1e4)},(async()=>{try{for await(const O of sD({stream:w})){if(T)break;o([...u.current,O])}}catch{}})(),()=>{T=!0,x.close(),_&&clearTimeout(_);try{S.close()}catch{}s.clear()}},[e,s]);const b=async()=>{try{await fetch("/api/chat/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e})})}catch{}},y=a.length>0&&a[a.length-1]?.role==="user",v=a.length-1;return E.jsxs("div",{className:z.chatContainer,children:[E.jsxs("div",{className:"relative flex-1 min-h-0",children:[E.jsx("div",{ref:c,className:"overflow-y-auto overflow-x-hidden h-full",onWheel:h,onCopy:fP,children:E.jsxs("div",{ref:f,children:[n,a.map((T,x)=>{const S=T.role==="assistant"&&x===v;return E.jsxs("div",{className:"px-10",children:[x>0&&E.jsx("div",{className:z.chatSeparator}),E.jsxs("div",{children:[E.jsx("div",{className:T.role==="user"?z.chatUserLabel:z.chatAssistantLabel,children:T.role==="user"?"you":"assistant"}),E.jsx("div",{className:T.role==="user"?z.chatUserMessage:z.chatAssistantMessage,children:E.jsx(uP,{parts:T.parts,isAnimating:S,progressStore:s})})]})]},T.id||`msg-${x}`)}),y&&E.jsxs("div",{className:"px-10",children:[E.jsx("div",{className:z.chatSeparator}),E.jsx(Vg,{className:z.chatThinking})]}),E.jsx("div",{style:{height:"40px"}})]})}),E.jsx(lP,{isAtBottom:d,scrollToBottom:p})]}),i,E.jsx("div",{className:z.chatInputArea,children:E.jsxs("div",{className:"flex gap-3 items-start",children:[E.jsx("textarea",{placeholder:"Ask a debugging question...",disabled:!0,rows:1,className:z.chatInput}),E.jsx("button",{type:"button",onClick:b,"aria-label":"Stop generating",className:z.chatStopButton,children:"Stop"})]})})]})}var _h,mw;function wue(){if(mw)return _h;mw=1;function e(t,r){if(typeof t!="function")throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof t}\`.`);let n,i=0;return function(...o){clearTimeout(n);const s=Date.now(),u=s-i,l=r-u;l<=0?(i=s,t.apply(this,o)):n=setTimeout(()=>{i=Date.now(),t.apply(this,o)},l)}}return _h=e,_h}var Aue=wue();const Sue=On(Aue);var dP=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},Ge=(e,t,r)=>(dP(e,t,"read from private field"),r?r.call(e):t.get(e)),Xr=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},qn=(e,t,r,n)=>(dP(e,t,"write to private field"),t.set(e,r),r);function kue(e,t){return t!=null?Sue(e,t):e}var Ar,Zu,Qu,Fo,$o,Uo,va,sm,um,_ue=class{constructor(e=[]){Xr(this,Ar,void 0),Xr(this,Zu,"ready"),Xr(this,Qu,void 0),Xr(this,Fo,new Set),Xr(this,$o,new Set),Xr(this,Uo,new Set),this.pushMessage=t=>{qn(this,Ar,Ge(this,Ar).concat(t)),Ge(this,va).call(this)},this.popMessage=()=>{qn(this,Ar,Ge(this,Ar).slice(0,-1)),Ge(this,va).call(this)},this.replaceMessage=(t,r)=>{qn(this,Ar,[...Ge(this,Ar).slice(0,t),this.snapshot(r),...Ge(this,Ar).slice(t+1)]),Ge(this,va).call(this)},this.snapshot=t=>structuredClone(t),this["~registerMessagesCallback"]=(t,r)=>{const n=r?kue(t,r):t;return Ge(this,Fo).add(n),()=>{Ge(this,Fo).delete(n)}},this["~registerStatusCallback"]=t=>(Ge(this,$o).add(t),()=>{Ge(this,$o).delete(t)}),this["~registerErrorCallback"]=t=>(Ge(this,Uo).add(t),()=>{Ge(this,Uo).delete(t)}),Xr(this,va,()=>{Ge(this,Fo).forEach(t=>t())}),Xr(this,sm,()=>{Ge(this,$o).forEach(t=>t())}),Xr(this,um,()=>{Ge(this,Uo).forEach(t=>t())}),qn(this,Ar,e)}get status(){return Ge(this,Zu)}set status(e){qn(this,Zu,e),Ge(this,sm).call(this)}get error(){return Ge(this,Qu)}set error(e){qn(this,Qu,e),Ge(this,um).call(this)}get messages(){return Ge(this,Ar)}set messages(e){qn(this,Ar,[...e]),Ge(this,va).call(this)}};Ar=new WeakMap;Zu=new WeakMap;Qu=new WeakMap;Fo=new WeakMap;$o=new WeakMap;Uo=new WeakMap;va=new WeakMap;sm=new WeakMap;um=new WeakMap;var xa,lm=class extends fD{constructor({messages:e,...t}){const r=new _ue(e);super({...t,state:r}),Xr(this,xa,void 0),this["~registerMessagesCallback"]=(n,i)=>Ge(this,xa)["~registerMessagesCallback"](n,i),this["~registerStatusCallback"]=n=>Ge(this,xa)["~registerStatusCallback"](n),this["~registerErrorCallback"]=n=>Ge(this,xa)["~registerErrorCallback"](n),qn(this,xa,r)}};xa=new WeakMap;function Cue({experimental_throttle:e,resume:t=!1,...r}={}){const n=m.useRef("chat"in r?{}:{onToolCall:r.onToolCall,onData:r.onData,onFinish:r.onFinish,onError:r.onError,sendAutomaticallyWhen:r.sendAutomaticallyWhen});"chat"in r||(n.current={onToolCall:r.onToolCall,onData:r.onData,onFinish:r.onFinish,onError:r.onError,sendAutomaticallyWhen:r.sendAutomaticallyWhen});const i={...r,onToolCall:d=>{var h,p;return(p=(h=n.current).onToolCall)==null?void 0:p.call(h,d)},onData:d=>{var h,p;return(p=(h=n.current).onData)==null?void 0:p.call(h,d)},onFinish:d=>{var h,p;return(p=(h=n.current).onFinish)==null?void 0:p.call(h,d)},onError:d=>{var h,p;return(p=(h=n.current).onError)==null?void 0:p.call(h,d)},sendAutomaticallyWhen:d=>{var h,p,b;return(b=(p=(h=n.current).sendAutomaticallyWhen)==null?void 0:p.call(h,d))!=null?b:!1}},a=m.useRef("chat"in r?r.chat:new lm(i));("chat"in r&&r.chat!==a.current||"id"in r&&a.current.id!==r.id)&&(a.current="chat"in r?r.chat:new lm(i));const s=m.useCallback(d=>a.current["~registerMessagesCallback"](d,e),[e,a.current.id]),u=m.useSyncExternalStore(s,()=>a.current.messages,()=>a.current.messages),l=m.useSyncExternalStore(a.current["~registerStatusCallback"],()=>a.current.status,()=>a.current.status),c=m.useSyncExternalStore(a.current["~registerErrorCallback"],()=>a.current.error,()=>a.current.error),f=m.useCallback(d=>{typeof d=="function"&&(d=d(a.current.messages)),a.current.messages=d},[a]);return m.useEffect(()=>{t&&a.current.resumeStream()},[t,a]),{id:a.current.id,messages:u,setMessages:f,sendMessage:a.current.sendMessage,regenerate:a.current.regenerate,clearError:a.current.clearError,stop:a.current.stop,error:c,resumeStream:a.current.resumeStream,status:l,addToolResult:a.current.addToolOutput,addToolOutput:a.current.addToolOutput,addToolApprovalResponse:a.current.addToolApprovalResponse}}const Iue={full:{userMessage:z.chatUserMessage,assistantMessage:z.chatAssistantMessage,separator:z.chatSeparator,thinking:z.chatThinking,emptyState:z.chatEmptyState,inputArea:z.chatInputArea,textarea:z.chatInput,sendBtn:z.chatButton,stopBtn:z.chatStopButton,continueMargin:"mt-4"},panel:{userMessage:z.panelChatUserMessage,assistantMessage:z.panelChatAssistantMessage,separator:z.panelChatSeparator,thinking:z.panelChatThinking,emptyState:z.panelChatEmptyState,inputArea:z.panelChatInputArea,textarea:z.panelChatTextarea,sendBtn:z.primaryBtn,stopBtn:z.secondaryBtn,continueMargin:"mt-3"}},hP=m.forwardRef(function({chatId:t,apiEndpoint:r,placeholder:n="Send a message...",extraBody:i,onData:a,initialMessages:o,onStatusChange:s,onBeforeStop:u,variant:l="full",header:c,scrollHeader:f,emptyStateExtras:d,beforeInput:h,afterMessages:p,renderMessage:b,readOnly:y=!1,sourceTitle:v,sourceCreatedAt:T,resolveSourceTitle:x,className:S},w){const[A,_]=m.useState(""),O=m.useRef(new eA).current,R=Iue[l],C=l==="panel"?"px-4":"px-10",M=m.useRef(null),{scrollRef:L,contentRef:Q,isAtBottom:H,handleWheel:U,scrollToBottom:q,scrollToTop:J}=Ew(),V=m.useRef(a);V.current=a;const re=m.useRef(i);re.current=i;const P=m.useMemo(()=>new lm({id:t,messages:o,transport:new Jw({api:r,prepareSendMessagesRequest:({id:_e,messages:F})=>({body:{id:_e,message:F[F.length-1],...re.current}})}),onData:_e=>{_e.type==="data-provider-part"&&cP(O,_e.data),V.current?.(_e)}}),[]),{messages:le,setMessages:he,status:N,sendMessage:pe,stop:we,error:ce}=Cue({chat:P,experimental_throttle:ns.chatThrottleMs}),fe=m.useRef(pe);fe.current=pe;const be=m.useRef(le);be.current=le;const Y=N==="submitted"||N==="streaming",G=m.useRef(N),ue=m.useRef(s);ue.current=s,m.useEffect(()=>{G.current!==N&&(N==="ready"&&(O.clear(),M.current?.focus()),ue.current?.(N,le)),G.current=N},[N,le]);const W=le[le.length-1],$e=W?.parts[W.parts.length-1],Oe=!Y&&le.length>0&&W?.role==="assistant"&&$e?.type.startsWith("tool-"),st=$e?.state,rt=$e?.type.startsWith("tool-")&&st!=="output-available",er=$e?.type==="text"||$e?.type==="reasoning",xe=N==="submitted"||N==="streaming"&&!er&&!rt,Ue=N==="streaming"?le[le.length-1]?.id:null,xt=()=>{u?.({messages:le,progressStore:O}),fetch("/api/chat/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:t})}).catch(()=>{}),we()},lr=m.useRef(xt);lr.current=xt,m.useEffect(()=>{if(!Y)return;const _e=F=>{F.key==="Escape"&&lr.current()};return document.addEventListener("keydown",_e),()=>document.removeEventListener("keydown",_e)},[Y]);const Vr=_e=>{_e.preventDefault();const F=A.trim();!F||Y||(_(""),q({animation:"instant"}),pe({text:F}),M.current?.focus())},Ef=m.useCallback(()=>{q({animation:"instant"}),fe.current({text:"Continue"})},[q]),Tf=m.useCallback(()=>{const _e=be.current;let F=-1;for(let ye=_e.length-1;ye>=0;ye--)if(_e[ye]?.role==="user"){F=ye;break}if(F===-1)return;const ge=_e[F].parts.find(ye=>ye.type==="text");!ge||ge.type!=="text"||(he(_e.slice(0,F)),fe.current({text:ge.text}))},[he]);return m.useImperativeHandle(w,()=>({messages:le,setMessages:he,sendMessage:pe,stop:we,scrollToBottom:q,scrollToTop:J,progressStore:O,status:N,isLoading:Y,error:ce}),[le,he,pe,we,q,J,O,N,Y,ce]),E.jsxs("div",{className:`flex flex-col h-full ${S??""}`,children:[c,E.jsxs("div",{className:"relative flex-1 min-h-0",children:[E.jsx("div",{ref:L,className:`overflow-y-auto overflow-x-hidden h-full${l==="panel"?" py-4":""}`,onWheel:U,onCopy:fP,children:E.jsxs("div",{ref:Q,className:"min-h-full flex flex-col",children:[f,le.length===0&&N!=="submitted"&&E.jsx("div",{className:"flex-1 flex flex-col items-center justify-center gap-6 py-16",children:d??E.jsx("span",{className:R.emptyState,children:n})}),le.map((_e,F)=>{const ee=_e.id===Ue,ge=m.createRef(),ye=E.jsx("div",{className:_e.role==="user"?z.chatUserLabel:z.chatAssistantLabel,children:_e.role==="user"?"you":"assistant"}),Me=E.jsx("div",{className:_e.role==="user"?R.userMessage:R.assistantMessage,children:E.jsx(uP,{parts:_e.parts,isAnimating:ee,progressStore:O,sourceTitle:v,sourceCreatedAt:T,resolveSourceTitle:x})}),cr=E.jsxs("div",{className:"relative group",children:[!ee&&E.jsx("div",{className:z.chatMessageActions,children:E.jsx(Wg,{contentRef:ge,parts:_e.parts})}),E.jsxs("div",{ref:ge,className:z.chatMessageCard,children:[ye,Me]})]});return E.jsxs("div",{className:C,children:[F>0&&E.jsx("div",{className:R.separator}),b?b(_e,F,{label:ye,content:Me}):cr]},_e.id||`msg-${F}`)}),xe&&E.jsxs("div",{className:C,children:[le.length>0&&E.jsx("div",{className:R.separator}),E.jsx(Vg,{className:R.thinking})]}),!y&&Oe&&E.jsxs("div",{className:`flex flex-col items-center gap-2 ${R.continueMargin} ${C}`,children:[E.jsx("span",{className:"text-xs text-[#9c9890] font-sans",children:"Response was interrupted"}),E.jsx("button",{type:"button",onClick:Ef,className:z.chatContinueButton,children:"Continue"})]}),p&&E.jsx("div",{className:C,children:p}),!y&&ce&&E.jsx("div",{className:C,children:E.jsxs("div",{className:"mt-3 text-sm text-[#b33a2a] bg-[#b33a2a]/5 border border-[#b33a2a]/20 rounded px-4 py-3 flex items-center gap-3",children:[E.jsx("span",{className:"flex-1",children:ce.message}),E.jsx("button",{type:"button",onClick:Tf,className:"text-xs underline shrink-0 font-sans",children:"Retry"})]})}),E.jsx("div",{style:{height:"40px"}})]})}),E.jsx(lP,{isAtBottom:H,scrollToBottom:q})]}),h,!y&&E.jsx("form",{onSubmit:Vr,className:R.inputArea,children:E.jsxs("div",{className:l==="full"?"flex gap-3 items-start":"flex gap-2",children:[E.jsx("textarea",{ref:M,value:A,onChange:_e=>{_(_e.target.value),_e.target.style.height="auto",_e.target.style.height=`${_e.target.scrollHeight}px`},onKeyDown:_e=>{if(_e.key==="Enter"&&!_e.shiftKey){_e.preventDefault(),Vr(_e);const F=_e.target;F.style.height="auto"}},placeholder:n,rows:1,autoFocus:!0,className:R.textarea}),Y?E.jsx("button",{type:"button",onClick:xt,"aria-label":"Stop generating",className:R.stopBtn,children:"Stop"}):E.jsx("button",{type:"submit",disabled:!A.trim(),"aria-label":"Send message",className:R.sendBtn,children:"Send"})]})})]})});function gw({projectId:e,existingConfig:t}){const[r,n]=m.useState(!1),[i,a]=m.useState(""),o=m.useRef(null),s=m.useRef(null),u=m.useRef(null),[l,c]=m.useState({bottom:0,right:0}),[f,d]=_P("gcp-projectId"),h=bt.useUtils(),{data:p,isLoading:b}=bt.provider.listGcpProjects.useQuery(void 0,{staleTime:ns.updateCheckStaleTimeMs,enabled:r}),y=bt.provider.saveConfig.useMutation({onSuccess:()=>h.provider.getConfigs.invalidate()}),v=m.useMemo(()=>(p??[]).map(w=>({value:w.projectId,label:w.name?`${w.name} (${w.projectId})`:w.projectId})),[p]),T=m.useMemo(()=>{const w=i.toLowerCase();return[...w?v.filter(_=>_.label.toLowerCase().includes(w)):v].sort((_,O)=>{const R=f.has(_.value)?0:1,C=f.has(O.value)?0:1;return R!==C?R-C:_.label.localeCompare(O.label)})},[v,i,f]);m.useEffect(()=>{if(!r)return;const w=o.current.getBoundingClientRect();c({bottom:window.innerHeight-w.top+4,right:window.innerWidth-w.right}),a(""),requestAnimationFrame(()=>u.current?.focus())},[r]),m.useEffect(()=>{if(!r)return;const w=A=>{o.current?.contains(A.target)||s.current?.contains(A.target)||n(!1)};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[r]);function x(w){y.mutate({type:"gcp",config:{...t,projectId:w}}),n(!1)}const S=r?Ps.createPortal(E.jsxs("div",{ref:s,className:"fixed z-[100] bg-white border border-[#d4d2cd] rounded shadow-lg w-72",style:{bottom:l.bottom,right:l.right},children:[E.jsx("div",{className:"p-1.5 border-b border-[#e8e6e1]",children:E.jsx("input",{ref:u,type:"text",value:i,onChange:w=>a(w.target.value),placeholder:"Search projects...",className:"w-full px-2 py-1.5 text-xs font-sans bg-[#f5f4f0] border border-[#e8e6e1] rounded focus:outline-none focus:border-[#2b5ea7] placeholder:text-[#9c9890] text-[#2c2c2c]",onKeyDown:w=>{w.key==="Escape"&&n(!1),w.key==="Enter"&&T.length>0&&x(T[0].value)}})}),E.jsx("div",{className:"max-h-[240px] overflow-y-auto",children:b?E.jsx("div",{className:"px-3 py-3 text-xs text-[#9c9890] text-center font-sans",children:"Loading…"}):T.length===0?E.jsx("div",{className:"px-3 py-3 text-xs text-[#9c9890] text-center font-sans",children:"No projects found"}):T.map(w=>{const A=w.value===e,_=f.has(w.value);return E.jsxs("div",{className:`flex items-center gap-1.5 px-2 py-1.5 text-xs font-sans cursor-pointer transition-colors ${A?"bg-[#2b5ea7]/10 text-[#2b5ea7]":"text-[#2c2c2c] hover:bg-[#f5f4f0]"}`,onClick:()=>x(w.value),children:[E.jsx("button",{type:"button",onClick:O=>{O.stopPropagation(),d(w.value)},className:`shrink-0 w-4 h-4 flex items-center justify-center text-[10px] transition-colors ${_?"text-[#d4a017]":"text-[#d4d2cd] hover:text-[#9c9890]"}`,title:_?"Unstar":"Star to pin to top",children:_?"★":"☆"}),E.jsx("span",{className:"truncate flex-1",children:w.label})]},w.value)})})]}),document.body):null;return E.jsxs(E.Fragment,{children:[E.jsx("button",{ref:o,type:"button",onClick:()=>n(w=>!w),className:`text-[10px] font-sans max-w-[16ch] truncate transition-colors ${r?"text-[#2b5ea7]":e?"text-[#9c9890] hover:text-[#6b6560]":"text-[#b0a898] hover:text-[#9c9890]"}`,title:e||"Select GCP project",children:e||"select project"}),S]})}const bw={newrelic:"NR",gcp:"GCP"},yw={gcp:0,newrelic:1};function Oue(e){return[...e].sort((t,r)=>(yw[t.type]??99)-(yw[r.type]??99))}function Yg({activeProvider:e,onToggle:t}){const{data:r,isLoading:n}=bt.provider.ping.useQuery(void 0,{staleTime:ns.sessionStaleTimeMs}),{data:i}=bt.provider.getConfigs.useQuery(void 0,{staleTime:ns.monitorPollingMs}),a=Oue(r?.filter(c=>c.ok)??[]),o=a.map(c=>c.type).join(","),s=i?.find(c=>c.type==="gcp")?.config??null,u=s?.projectId??"";if(m.useEffect(()=>{a.length!==0&&(!e||!a.some(c=>c.type===e))&&t(a[0].type)},[e,o]),!r&&n||a.length===0)return null;const l=a.some(c=>c.type==="gcp")&&s!==null;if(a.length===1){const c=a[0];return E.jsxs("div",{className:"flex items-center gap-2",children:[l?E.jsx(gw,{projectId:u,existingConfig:s}):E.jsx("span",{className:"invisible text-[10px]",children:"·"}),E.jsxs("span",{className:"flex items-center gap-1 px-2 py-0.5 text-[10px] font-sans rounded border border-[#c4c0b8] bg-[#ede9e3] text-[#4a4540]",children:[E.jsx("span",{className:`inline-block w-1.5 h-1.5 rounded-full ${z.statusDot.connected}`}),bw[c.type]??c.type.toUpperCase()]})]})}return E.jsxs("div",{className:"flex items-center gap-1.5",children:[l&&E.jsx("span",{className:`mr-0.5 transition-opacity ${e==="gcp"?"opacity-100":"opacity-0 pointer-events-none"}`,children:E.jsx(gw,{projectId:u,existingConfig:s})}),a.map(c=>{const f=e===c.type;return E.jsxs("button",{type:"button",onClick:()=>t(c.type),title:`${c.name}: ${f?"active":"click to switch"}`,className:`flex items-center gap-1 px-2 py-0.5 text-[10px] font-sans rounded border transition-all ${f?"border-[#c4c0b8] bg-[#ede9e3] text-[#4a4540] shadow-[inset_0_1px_2px_rgba(0,0,0,0.1)]":"border-[#e0dbd3] text-[#b0a898] hover:text-[#6b6560] hover:border-[#c4c0b8]"}`,children:[E.jsx("span",{className:`inline-block w-1.5 h-1.5 rounded-full ${f?z.statusDot.connected:"bg-[#d4d0c8]"}`}),bw[c.type]??c.type.toUpperCase()]},c.type)})]})}const Nue={create:{icon:"+",verb:"Saved"},update:{icon:"~",verb:"Updated"},delete:{icon:"-",verb:"Deleted"}};function Pue({sessionId:e,streaming:t,onCostDataReady:r}){const[n,i]=m.useState(!1),a=m.useRef(null),o=bt.useUtils(),s=bt.memory.bySession.useQuery({sessionId:e}),u=s.data,{startedCount:l,completedCount:c}=u?.reduce((x,S)=>(S.operation==="started"?x.startedCount++:S.operation==="completed"&&x.completedCount++,x),{startedCount:0,completedCount:0})??{startedCount:0,completedCount:0},f=l>0&&l===c,d=u?.filter(x=>x.operation!=="completed"&&x.operation!=="started")??[],[h,p]=m.useState(!1);m.useEffect(()=>{if(t){p(!1);return}const x=setTimeout(()=>p(!0),3e4);return()=>clearTimeout(x)},[t]);const b=m.useRef(t);m.useEffect(()=>{b.current&&!t&&o.memory.bySession.invalidate({sessionId:e}),b.current=t},[t,e,o]);const y=m.useRef(!1);m.useEffect(()=>{!y.current&&f&&r?.(),y.current=f},[f,r]);const v=!t&&!f&&!h&&s.status==="success"&&(u?.length??0)>0;Tw(()=>o.memory.bySession.invalidate({sessionId:e}),3e3,v),ww(a,()=>i(!1));const T=h&&!f;return d.length?E.jsxs("div",{className:"relative",ref:a,children:[E.jsxs("button",{type:"button",onClick:()=>i(x=>!x),className:`flex items-center gap-1.5 text-xs font-sans transition-colors ${T?"text-[#b0a89f] hover:text-[#9c9890]":"text-[#666666] hover:text-[#2b5ea7]"}`,title:T?"Memory agent did not respond":void 0,children:[E.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[E.jsx("path",{d:"M12 2a7 7 0 0 1 7 7c0 2.38-1.19 4.47-3 5.74V17a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-2.26C6.19 13.47 5 11.38 5 9a7 7 0 0 1 7-7z"}),E.jsx("line",{x1:"9",y1:"21",x2:"15",y2:"21"}),E.jsx("line",{x1:"10",y1:"24",x2:"14",y2:"24"})]}),E.jsx("span",{className:"inline-flex items-center justify-center min-w-[16px] h-4 px-1 rounded-full bg-[#2b5ea7]/10 text-[#2b5ea7] text-[10px] font-medium",children:d.length})]}),n&&E.jsxs("div",{className:`right-0 top-full mt-1 ${z.popoverWide}`,children:[E.jsx("div",{className:z.popoverLabel,children:"Memory Log"}),d.map(x=>{const S=Nue[x.operation]??{icon:"?",verb:x.operation};return E.jsxs("div",{className:z.popoverRow,children:[E.jsx("span",{className:"shrink-0 w-4 h-4 rounded text-center leading-4 font-mono text-[10px] bg-[#e8e3da]/30",children:S.icon}),E.jsxs("span",{children:[E.jsx("span",{className:"font-medium",children:S.verb}),x.note&&E.jsxs("span",{className:"opacity-80",children:[": ",x.note]})]})]},x.id)})]})]}):null}function pP({chatId:e,hasMessages:t,isLoading:r,onPostMortem:n,streaming:i,onCostDataReady:a,onTitleClick:o}){const s=bt.sessions.getTitle.useQuery({id:e}),u=s.data?.title,l=s.data?.titlePending??!0,c=bt.useUtils(),f=t&&l,[d,h]=m.useState(!1);m.useEffect(()=>{if(!f){h(!1);return}const b=setTimeout(()=>h(!0),6e4);return()=>clearTimeout(b)},[f]),Tw(()=>c.sessions.getTitle.invalidate({id:e}),5e3,f&&!d);const p=m.useRef(l);return m.useEffect(()=>{p.current&&!l&&a?.(),p.current=l},[l,a]),E.jsx("div",{className:z.titleBar,children:E.jsxs("div",{className:"flex items-center justify-between",children:[(()=>{const b=!l&&u,y=`${z.titleText} transition-opacity duration-500 ${b?"opacity-100":"opacity-0"}`,v=b?u:" ";return o?E.jsx("button",{type:"button",onClick:o,title:"Scroll to top",className:`${y} text-left hover:opacity-80 cursor-pointer`,children:v}):E.jsx("h2",{className:y,children:v})})(),E.jsxs("div",{className:"flex items-center gap-3",children:[t&&E.jsx(Pue,{sessionId:e,streaming:i??!1,onCostDataReady:a}),i?E.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-[#9c9890] font-sans",children:[E.jsx("span",{className:z.streamingDot}),"Streaming"]}):t&&!r&&E.jsxs("button",{type:"button",onClick:n,className:`flex items-center gap-1.5 ${z.metaLink}`,children:[E.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[E.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),E.jsx("polyline",{points:"14 2 14 8 20 8"}),E.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),E.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"}),E.jsx("polyline",{points:"10 9 9 9 8 9"})]}),"Post-Mortem"]})]})]})})}function Due(e){const t=e.map(s=>({label:s.label,model:s.model,cost:Kg(s.model,s.input,s.output,s.cached,s.cacheWrite)}));let r=0,n=0,i=0;for(const s of e)r+=s.input,n+=s.output,i+=s.cached;const a=t.reduce((s,u)=>s+u.cost,0),o=e.reduce((s,u)=>s+Kg(u.model,u.input,u.output,0,0),0);return{agents:t,totalCost:a,totalCostWithoutCache:o,totalInput:r,totalOutput:n,totalCached:i}}function Rue({breakdown:e,activeProvider:t,onToggle:r}){const[n,i]=m.useState(!1),a=m.useRef(null);return ww(a,()=>i(!1)),E.jsxs("div",{className:"relative px-10 pt-2",ref:a,children:[E.jsxs("div",{className:"flex items-center justify-between",children:[E.jsxs("button",{type:"button",className:z.tokenSummary,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onClick:()=>i(o=>!o),children:[e.totalInput.toLocaleString()," in · ",e.totalOutput.toLocaleString()," out",e.totalCost>0&&E.jsxs(E.Fragment,{children:[" · ",fu(e.totalCost)]})]}),E.jsx(Yg,{activeProvider:t,onToggle:r})]}),n&&e.agents.length>0&&E.jsxs("div",{className:`bottom-full left-10 mb-1 ${z.popoverWide}`,children:[E.jsx("div",{className:z.popoverLabel,children:"Cost Breakdown"}),e.agents.map((o,s)=>E.jsxs("div",{className:z.popoverItemRow,children:[E.jsxs("span",{className:"truncate mr-2",children:[o.label,o.model&&E.jsxs("span",{className:"text-[#9c9890] ml-1",children:["(",o.model,")"]})]}),E.jsx("span",{className:"shrink-0 tabular-nums",children:fu(o.cost)})]},s)),e.agents.length>1&&E.jsxs(E.Fragment,{children:[E.jsx("div",{className:z.popoverDivider}),E.jsxs("div",{className:"flex items-center justify-between text-[11px] text-[#4a4540] font-sans font-medium",children:[E.jsx("span",{children:"Total"}),E.jsx("span",{className:"tabular-nums",children:fu(e.totalCost)})]})]}),e.totalCached>0&&E.jsxs("div",{className:z.popoverFootnote,children:[e.totalCached.toLocaleString()," cached tokens",e.totalCostWithoutCache>e.totalCost&&E.jsxs(E.Fragment,{children:[" · saved ",fu(e.totalCostWithoutCache-e.totalCost)]})]})]})]})}function Lue({initialText:e,onSave:t,onCancel:r}){const[n,i]=m.useState(e);return E.jsxs(E.Fragment,{children:[E.jsx("textarea",{className:z.chatEditTextarea,value:n,onChange:a=>i(a.target.value),onKeyDown:a=>{a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),t(n)),a.key==="Escape"&&r()},rows:Math.max(2,n.split(`
195
+ `).length),autoFocus:!0}),E.jsxs("div",{className:z.chatEditActions,children:[E.jsx("button",{type:"button",onClick:()=>t(n),className:z.chatEditSave,disabled:!n.trim(),children:"Save & Send"}),E.jsx("button",{type:"button",onClick:r,className:z.chatEditCancel,children:"Cancel"})]})]})}function Mue({sessionId:e,onSessionChange:t}){const r=m.useMemo(()=>e??crypto.randomUUID(),[e]);m.useEffect(()=>{e||t(r)},[e,r,t]);const[n,i]=m.useState(0),[a,o]=m.useState(null),s=bt.sessions.importAnalysis.useMutation(),u=bt.useUtils(),l=m.useCallback(async _=>{_.preventDefault(),i(0);const O=_.dataTransfer.files;if(!O||O.length!==1||O[0].type!=="image/png"){o("Only single PNG files are supported.");return}const R=O[0];if(R.size>10*1024*1024){o("PNG is too large (>10 MB).");return}try{const C=new Uint8Array(await R.arrayBuffer());let M;try{M=await bue(C)}catch{o("Not a valid PNG file.");return}if(!M){o("No analysis data found in this image.");return}let L;try{L=SP.parse(JSON.parse(new TextDecoder().decode(M)))}catch{o("Analysis data is malformed or from an incompatible version.");return}const{id:Q}=await s.mutateAsync(L);u.sessions.list.setData(void 0,H=>{const U={id:Q,title:L.sourceTitle.slice(0,80)||Ch,status:"idle",kind:Gg.IMPORTED,updatedAt:Math.floor(Date.now()/1e3),titlePending:!1};return H?[U,...H]:[U]}),o(null),t(Q)}catch{o("Couldn't import analysis.")}},[s,u,t]),c={onDragEnter:_=>{Array.from(_.dataTransfer.types).includes("Files")&&(_.preventDefault(),i(O=>O+1))},onDragOver:_=>{Array.from(_.dataTransfer.types).includes("Files")&&_.preventDefault()},onDragLeave:()=>i(_=>Math.max(0,_-1)),onDrop:l},f=n>0?E.jsx("div",{className:"absolute inset-0 z-40 pointer-events-none flex items-center justify-center bg-[#2b5ea7]/10 border-2 border-dashed border-[#2b5ea7] rounded",children:E.jsx("span",{className:"text-sm font-medium text-[#2b5ea7] bg-white/90 px-4 py-2 rounded shadow-sm",children:"Drop PNG to import analysis"})}):null,d=a?E.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-40 text-sm text-[#b33a2a] bg-[#b33a2a]/5 border border-[#b33a2a]/20 rounded px-4 py-2 flex items-center gap-3 shadow-sm",children:[E.jsx("span",{children:a}),E.jsx("button",{type:"button",onClick:()=>o(null),className:"text-xs underline shrink-0 font-sans",children:"dismiss"})]}):null,[h,p]=m.useState(()=>localStorage.getItem("tracer:activeProvider")),b=m.useCallback(_=>{localStorage.setItem("tracer:activeProvider",_),p(_)},[]),y=bt.useUtils(),v=bt.sessions.markViewed.useMutation();m.useEffect(()=>{if(!e)return;const O=y.sessions.list.getData()?.find(R=>R.id===e);!O||O.status==="idle"||O.status==="streaming"||(y.sessions.list.setData(void 0,R=>R?.map(C=>C.id===e?{...C,status:"idle"}:C)),y.sessions.activeCount.setData(void 0,R=>R&&{...R,done:Math.max(0,R.done-1)}),v.mutate({id:e}))},[e]);const T=bt.sessions.get.useQuery({id:r},{enabled:!!e,gcTime:0}),x=T.data?.messages,S=bt.sessions.getCost.useQuery({id:r},{enabled:!!e}),w=m.useMemo(()=>{const _=S.data;return _?.agents?.length?Due(_.agents):null},[S.data]);let A;return e&&T.isLoading?A=E.jsx("div",{className:z.chatContainer,children:E.jsx("div",{className:"flex items-center justify-center h-full",children:E.jsx("span",{className:z.chatEmptyState,children:"Loading session..."})})}):T.data?.status==="streaming"?A=E.jsx(Tue,{sessionId:r,initialMessages:x??[],onComplete:()=>T.refetch(),header:E.jsx(pP,{chatId:r,hasMessages:!0,isLoading:!1,onPostMortem:()=>{},streaming:!0}),beforeInput:E.jsx("div",{className:"px-10 pt-2 flex justify-end",children:E.jsx(Yg,{activeProvider:h,onToggle:b})})},r):T.data?.kind===Gg.IMPORTED?A=E.jsx(jue,{sessionId:r,sessionTitle:T.data.title,initialMessages:x??[]},r):A=E.jsx(Bue,{chatId:r,initialMessages:x,costBreakdown:w,activeProvider:h,setActiveProvider:b,sessionTitle:T.data?.title,sessionUpdatedAt:T.data?.updatedAt},r),E.jsxs("div",{className:"relative h-full",...c,children:[A,d,f]})}function jue({sessionId:e,sessionTitle:t,initialMessages:r}){const n=m.useRef(null),i=r[0],a=i?.metadata?.sourceTitle??t,o=i?.metadata?.sourceCreatedAt,s=m.useMemo(()=>{if(!o)return"";try{return new Date(o*1e3).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}},[o]),u=E.jsxs("div",{className:z.titleBar,children:[a&&E.jsx("h2",{className:z.titleText,children:a}),E.jsxs("div",{className:"text-xs text-[#9c9890] mt-1",children:["Imported",s?` · originally ${s}`:""]})]});return E.jsx("div",{className:z.chatContainer,children:E.jsx(hP,{ref:n,chatId:e,apiEndpoint:"/api/chat",initialMessages:r,variant:"full",readOnly:!0,sourceTitle:a,sourceCreatedAt:o,scrollHeader:u})})}function Bue({chatId:e,initialMessages:t,costBreakdown:r,activeProvider:n,setActiveProvider:i,sessionTitle:a,sessionUpdatedAt:o}){const[s,u]=m.useState(null),[l,c]=m.useState(""),[f,d]=m.useState(null),[h,p]=m.useState(!1),[b,y]=m.useState(!!t?.length),[v,T]=m.useState(()=>t?.length?t[t.length-1]?.role==="user":!1),x=m.useRef(null),S=m.useRef(!1),w=bt.useUtils(),A=bt.sessions.markViewed.useMutation(),_=bt.sessions.truncateMessages.useMutation(),O=bt.sessions.saveMessages.useMutation(),R=m.useCallback(async()=>(await w.sessions.get.fetch({id:e}))?.title,[w,e]),C=()=>{if(!x.current)return;const ce=x.current.messages,fe=ce[ce.length-1];if(!fe||fe.role!=="user")return;const be=fe.parts.find(Y=>Y.type==="text");!be||be.type!=="text"||(x.current.setMessages(ce.slice(0,-1)),x.current.scrollToBottom({animation:"instant"}),x.current.sendMessage({text:be.text}))},M=()=>{x.current&&(x.current.scrollToBottom({animation:"instant"}),x.current.sendMessage({text:`Generate a Post-Mortem Report for this investigation session.
196
+
197
+ Structure it with these sections:
198
+ - **Summary**: Concise overview of the incident and key findings
199
+ - **Impact**: Quantified impact based on data discovered (error rates, affected services, latency, etc.)
200
+ - **Timeline**: Chronological sequence of key events and findings with timestamps
201
+ - **Root Cause**: Technical explanation of what caused the issue
202
+ - **Resolution**: What fixed the issue or recommended next steps
203
+
204
+ Base the report entirely on the investigation data and findings from this conversation. Be specific — include actual error messages, metric values, service names, and query results where relevant.`}))},L=ce=>{d(ce)},Q=async()=>{f===null||!x.current||(await _.mutateAsync({id:e,keepCount:f}),x.current.setMessages(x.current.messages.slice(0,f)),d(null))},H=ce=>{const be=x.current?.messages[ce]?.parts.find(Y=>Y.type==="text");!be||be.type!=="text"||(u(ce),c(be.text))},U=()=>{u(null)},q=async ce=>{if(s===null||!ce.trim()||!x.current)return;const fe=ce.trim();await _.mutateAsync({id:e,keepCount:s}),x.current.setMessages(x.current.messages.slice(0,s)),u(null),x.current.scrollToBottom({animation:"instant"}),x.current.sendMessage({text:fe})},J=({messages:ce,progressStore:fe})=>{const be=ce.map(Y=>{if(Y.role!=="assistant")return Y;const G=Y.parts.map(ue=>{const W=ue;if(W.toolCallId&&W.state!=="output-available"){const $e=fe.getSnapshot(W.toolCallId),Oe=$e?.parts?.length?{parts:$e.parts}:{error:"Aborted"};return{...W,state:"output-available",output:Oe}}return ue});return{...Y,parts:G}});O.mutate({id:e,messages:be})},V=m.useRef(H);V.current=H;const re=m.useRef(L);re.current=L;const P=m.useRef(q);P.current=q;const le=m.useRef(U);le.current=U;const he=m.useCallback((ce,fe,{label:be,content:Y})=>{const G=m.createRef();return E.jsxs("div",{className:"relative group",children:[!h&&s===null&&E.jsxs("div",{className:z.chatMessageActions,children:[E.jsx(Wg,{contentRef:G,parts:ce.parts}),ce.role==="user"&&E.jsx("button",{type:"button",onClick:()=>V.current(fe),className:z.chatActionButton,title:"Edit message","aria-label":"Edit message",children:E.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[E.jsx("path",{d:"M17 3a2.85 2.85 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"}),E.jsx("path",{d:"m15 5 4 4"})]})}),E.jsx("button",{type:"button",onClick:()=>re.current(fe),className:z.chatActionButton,title:"Delete this message and everything after it","aria-label":"Delete message",children:E.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[E.jsx("path",{d:"M18 6 6 18"}),E.jsx("path",{d:"m6 6 12 12"})]})})]}),s===fe?E.jsx(Lue,{initialText:l,onSave:ue=>P.current(ue),onCancel:()=>le.current()}):E.jsxs("div",{ref:G,className:z.chatMessageCard,children:[be,Y]})]})},[h,s]),N=m.useCallback(()=>{w.sessions.getCost.invalidate({id:e})},[w,e]),pe=E.jsx(pP,{chatId:e,hasMessages:b,isLoading:h,onPostMortem:M,streaming:h,onCostDataReady:N,onTitleClick:()=>x.current?.scrollToTop({animation:"smooth"})}),we=E.jsxs("ul",{className:"max-w-md space-y-4 text-sm text-[#b8b5af] font-serif text-center",children:[E.jsxs("li",{children:[E.jsx("div",{className:"text-[#9c9890]",children:"Garbage in, garbage out."}),E.jsx("div",{children:"The clearer your question, the sharper the answer — vague ones can still work."})]}),E.jsxs("li",{children:[E.jsx("div",{className:"text-[#9c9890]",children:"Models hallucinate."}),E.jsx("div",{children:"Don't take every claim at face value — verify the parts that matter."})]}),E.jsxs("li",{children:[E.jsx("div",{className:"text-[#9c9890]",children:"Self-review still matters."}),E.jsx("div",{children:"Don't share findings with teammates until you've checked them yourself."})]})]});return E.jsxs("div",{className:z.chatContainer,children:[E.jsx(hP,{ref:x,chatId:e,apiEndpoint:"/api/chat",placeholder:"Ask a debugging question...",initialMessages:t,variant:"full",sourceTitle:a,sourceCreatedAt:o,resolveSourceTitle:R,scrollHeader:pe,emptyStateExtras:we,onBeforeStop:J,onStatusChange:(ce,fe)=>{const be=ce==="submitted"||ce==="streaming";p(be),be&&(S.current=!1),fe.length>0&&y(!0);const Y=fe[fe.length-1];if(T(!be&&fe.length>0&&Y?.role==="user"),ce==="submitted"){let G=!1;w.sessions.list.setData(void 0,ue=>!ue||ue.some(W=>W.id===e)?ue:(G=!0,[{id:e,title:Ch,status:"streaming",kind:null,updatedAt:Math.floor(Date.now()/1e3),titlePending:!0},...ue])),G&&w.sessions.activeCount.setData(void 0,ue=>ue&&{...ue,streaming:ue.streaming+1})}ce==="ready"&&(S.current||(S.current=!0,A.mutate({id:e})),w.sessions.getCost.invalidate({id:e}),a===Ch&&w.sessions.get.invalidate({id:e}))},extraBody:n?{activeProvider:n}:void 0,beforeInput:r&&(r.totalInput>0||r.totalOutput>0)?E.jsx(Rue,{breakdown:r,activeProvider:n,onToggle:i}):E.jsx("div",{className:"px-10 pt-2 flex justify-end",children:E.jsx(Yg,{activeProvider:n,onToggle:i})}),afterMessages:v?E.jsx("div",{className:"flex justify-center mt-4",children:E.jsx("button",{type:"button",onClick:C,className:z.chatContinueButton,children:"Retry"})}):void 0,renderMessage:he}),E.jsx(kP,{open:f!==null,title:"Delete messages",message:"This message and all messages after it will be removed. This cannot be undone.",confirmLabel:"Delete",onConfirm:Q,onCancel:()=>d(null)})]})}const dle=Object.freeze(Object.defineProperty({__proto__:null,Debug:Mue},Symbol.toStringTag,{value:"Module"})),Fue=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:f2},Symbol.toStringTag,{value:"Module"}));export{G7 as A,dle as D,que as L,yr as R};