@workflow/web 5.0.0-beta.1 → 5.0.0-beta.2
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.
- package/README.md +1 -1
- package/build/client/assets/encryption-80GMP4r0.js +26 -0
- package/build/client/assets/entry.client-BWsSsWQm.js +11899 -0
- package/build/client/assets/highlighted-body-B3W2YXNL-DPWdt39H.js +18 -0
- package/build/client/assets/home-OcN-ARTU.js +3992 -0
- package/build/client/assets/index-DQa-BExo.js +9432 -0
- package/build/client/assets/{manifest-2d7ab41e.js → manifest-62352cd9.js} +1 -1
- package/build/client/assets/mermaid-3ZIDBTTL-B9v3aKRl.js +48141 -0
- package/build/client/assets/root-BrnNveEi.css +1 -0
- package/build/client/assets/root-ClRrWHkX.js +690 -0
- package/build/client/assets/run-detail-BdYMODbi.js +6710 -0
- package/build/client/assets/{server-build-CiTtikBY.css → server-build-DKWv59Tp.css} +1 -1
- package/build/client/assets/worker-CqHKTA7D.js +115 -0
- package/build/client/assets/workflow-graph-viewer-BdFIMYrh.js +16175 -0
- package/build/server/assets/{app-DaJqmGT8.js → app-coxrYAYu.js} +1 -1
- package/build/server/assets/{highlighted-body-B3W2YXNL-xowfciga.js → highlighted-body-B3W2YXNL-DhGWas67.js} +2 -2
- package/build/server/assets/{index-CFBIzXaR.js → index-DJ8Yt9MV.js} +30 -29
- package/build/server/assets/{mermaid-3ZIDBTTL-nU8V7hWp.js → mermaid-3ZIDBTTL-DJkW_cc4.js} +3 -3
- package/build/server/assets/{server-build-rhQJXUIP.js → server-build-dCNkWo2d.js} +420 -95
- package/build/server/assets/{token-BZ35B6LQ.js → token-Bi1ru9oe.js} +2 -2
- package/build/server/assets/{token-util-vRsmZMJV.js → token-util-Bwj_Mj31.js} +2 -2
- package/build/server/index.js +1 -1
- package/package.json +6 -6
- package/build/client/assets/encryption-8OvC6eoJ.js +0 -1
- package/build/client/assets/entry.client-BiVEcoV8.js +0 -29
- package/build/client/assets/highlighted-body-B3W2YXNL-epbVCzUZ.js +0 -1
- package/build/client/assets/home-cYqw84jW.js +0 -40
- package/build/client/assets/index-BmZS3y7B.js +0 -59
- package/build/client/assets/mermaid-3ZIDBTTL-CCXSRVd3.js +0 -210
- package/build/client/assets/root-aMfmV5uh.css +0 -1
- package/build/client/assets/root-kDmPgm4u.js +0 -26
- package/build/client/assets/run-detail-B5k2OYOu.js +0 -37
- package/build/client/assets/worker-D-HfgUMl.js +0 -1
- package/build/client/assets/workflow-graph-viewer-B5c_xYyF.js +0 -161
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-B3W2YXNL-epbVCzUZ.js","assets/index-BmZS3y7B.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var qy=Object.defineProperty;var Ky=(e,t,n)=>t in e?qy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ge=(e,t,n)=>Ky(e,typeof t!="symbol"?t+"":t,n);import{r as T,j as g,f as yc,H as Am,R as F,C as Sm,I as Cm}from"./index-BmZS3y7B.js";function pr(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function qd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function vm(...e){return t=>{let n=!1;const r=e.map(i=>{const o=qd(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():qd(e[i],null)}}}}function bi(...e){return T.useCallback(vm(...e),e)}function nU(e,t){const n=T.createContext(t),r=o=>{const{children:s,...a}=o,l=T.useMemo(()=>a,Object.values(a));return g.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function i(o){const s=T.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function Im(e,t=[]){let n=[];function r(o,s){const a=T.createContext(s),l=n.length;n=[...n,s];const u=c=>{var E;const{scope:h,children:p,...m}=c,b=((E=h==null?void 0:h[e])==null?void 0:E[l])||a,y=T.useMemo(()=>m,Object.values(m));return g.jsx(b.Provider,{value:y,children:p})};u.displayName=o+"Provider";function d(c,h){var b;const p=((b=h==null?void 0:h[e])==null?void 0:b[l])||a,m=T.useContext(p);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${o}\``)}return[u,d]}const i=()=>{const o=n.map(s=>T.createContext(s));return function(a){const l=(a==null?void 0:a[e])||o;return T.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,Xy(i,...t)]}function Xy(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:u})=>{const c=l(o)[`__scope${u}`];return{...a,...c}},{});return T.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Qy(e){const t=Jy(e),n=T.forwardRef((r,i)=>{const{children:o,...s}=r,a=T.Children.toArray(o),l=a.find(tT);if(l){const u=l.props.children,d=a.map(c=>c===l?T.Children.count(u)>1?T.Children.only(null):T.isValidElement(u)?u.props.children:null:c);return g.jsx(t,{...s,ref:i,children:T.isValidElement(u)?T.cloneElement(u,void 0,d):null})}return g.jsx(t,{...s,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function Jy(e){const t=T.forwardRef((n,r)=>{const{children:i,...o}=n;if(T.isValidElement(i)){const s=rT(i),a=nT(o,i.props);return i.type!==T.Fragment&&(a.ref=r?vm(r,s):s),T.cloneElement(i,a)}return T.Children.count(i)>1?T.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Nm=Symbol("radix.slottable");function eT(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Nm,t}function tT(e){return T.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Nm}function nT(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{const l=o(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function rT(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var iT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ei=iT.reduce((e,t)=>{const n=Qy(`Primitive.${t}`),r=T.forwardRef((i,o)=>{const{asChild:s,...a}=i,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(l,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function oT(e,t){e&&yc.flushSync(()=>e.dispatchEvent(t))}function Ga(e){const t=T.useRef(e);return T.useEffect(()=>{t.current=e}),T.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function sT(e,t=globalThis==null?void 0:globalThis.document){const n=Ga(e);T.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var aT="DismissableLayer",mu="dismissableLayer.update",lT="dismissableLayer.pointerDownOutside",uT="dismissableLayer.focusOutside",Kd,Om=T.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rm=T.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:s,onDismiss:a,...l}=e,u=T.useContext(Om),[d,c]=T.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=T.useState({}),m=bi(t,S=>c(S)),b=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),E=b.indexOf(y),x=d?b.indexOf(d):-1,_=u.layersWithOutsidePointerEventsDisabled.size>0,P=x>=E,R=fT(S=>{const O=S.target,$=[...u.branches].some(N=>N.contains(O));!P||$||(i==null||i(S),s==null||s(S),S.defaultPrevented||a==null||a())},h),C=hT(S=>{const O=S.target;[...u.branches].some(N=>N.contains(O))||(o==null||o(S),s==null||s(S),S.defaultPrevented||a==null||a())},h);return sT(S=>{x===u.layers.size-1&&(r==null||r(S),!S.defaultPrevented&&a&&(S.preventDefault(),a()))},h),T.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Kd=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Xd(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Kd)}},[d,h,n,u]),T.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Xd())},[d,u]),T.useEffect(()=>{const S=()=>p({});return document.addEventListener(mu,S),()=>document.removeEventListener(mu,S)},[]),g.jsx(Ei.div,{...l,ref:m,style:{pointerEvents:_?P?"auto":"none":void 0,...e.style},onFocusCapture:pr(e.onFocusCapture,C.onFocusCapture),onBlurCapture:pr(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:pr(e.onPointerDownCapture,R.onPointerDownCapture)})});Rm.displayName=aT;var cT="DismissableLayerBranch",dT=T.forwardRef((e,t)=>{const n=T.useContext(Om),r=T.useRef(null),i=bi(t,r);return T.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),g.jsx(Ei.div,{...e,ref:i})});dT.displayName=cT;function fT(e,t=globalThis==null?void 0:globalThis.document){const n=Ga(e),r=T.useRef(!1),i=T.useRef(()=>{});return T.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let l=function(){Lm(lT,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function hT(e,t=globalThis==null?void 0:globalThis.document){const n=Ga(e),r=T.useRef(!1);return T.useEffect(()=>{const i=o=>{o.target&&!r.current&&Lm(uT,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Xd(){const e=new CustomEvent(mu);document.dispatchEvent(e)}function Lm(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?oT(i,o):i.dispatchEvent(o)}var ui=globalThis!=null&&globalThis.document?T.useLayoutEffect:()=>{},pT=Am[" useId ".trim().toString()]||(()=>{}),mT=0;function gT(e){const[t,n]=T.useState(pT());return ui(()=>{n(r=>r??String(mT++))},[e]),t?`radix-${t}`:""}const bT=["top","right","bottom","left"],Lr=Math.min,En=Math.max,ka=Math.round,Fs=Math.floor,or=e=>({x:e,y:e}),ET={left:"right",right:"left",bottom:"top",top:"bottom"},yT={start:"end",end:"start"};function gu(e,t,n){return En(e,Lr(t,n))}function br(e,t){return typeof e=="function"?e(t):e}function Er(e){return e.split("-")[0]}function Ji(e){return e.split("-")[1]}function Tc(e){return e==="x"?"y":"x"}function xc(e){return e==="y"?"height":"width"}const TT=new Set(["top","bottom"]);function rr(e){return TT.has(Er(e))?"y":"x"}function _c(e){return Tc(rr(e))}function xT(e,t,n){n===void 0&&(n=!1);const r=Ji(e),i=_c(e),o=xc(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=wa(s)),[s,wa(s)]}function _T(e){const t=wa(e);return[bu(e),t,bu(t)]}function bu(e){return e.replace(/start|end/g,t=>yT[t])}const Qd=["left","right"],Jd=["right","left"],kT=["top","bottom"],wT=["bottom","top"];function AT(e,t,n){switch(e){case"top":case"bottom":return n?t?Jd:Qd:t?Qd:Jd;case"left":case"right":return t?kT:wT;default:return[]}}function ST(e,t,n,r){const i=Ji(e);let o=AT(Er(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(bu)))),o}function wa(e){return e.replace(/left|right|bottom|top/g,t=>ET[t])}function CT(e){return{top:0,right:0,bottom:0,left:0,...e}}function Dm(e){return typeof e!="number"?CT(e):{top:e,right:e,bottom:e,left:e}}function Aa(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ef(e,t,n){let{reference:r,floating:i}=e;const o=rr(t),s=_c(t),a=xc(s),l=Er(t),u=o==="y",d=r.x+r.width/2-i.width/2,c=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:d,y:r.y-i.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:c};break;case"left":p={x:r.x-i.width,y:c};break;default:p={x:r.x,y:r.y}}switch(Ji(t)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1);break}return p}const vT=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:c}=ef(u,r,l),h=r,p={},m=0;for(let b=0;b<a.length;b++){const{name:y,fn:E}=a[b],{x,y:_,data:P,reset:R}=await E({x:d,y:c,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});d=x??d,c=_??c,p={...p,[y]:{...p[y],...P}},R&&m<=50&&(m++,typeof R=="object"&&(R.placement&&(h=R.placement),R.rects&&(u=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):R.rects),{x:d,y:c}=ef(u,h,l)),b=-1)}return{x:d,y:c,placement:h,strategy:i,middlewareData:p}};async function Zo(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:h=!1,padding:p=0}=br(t,e),m=Dm(p),y=a[h?c==="floating"?"reference":"floating":c],E=Aa(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(y)))==null||n?y:y.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),x=c==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),P=await(o.isElement==null?void 0:o.isElement(_))?await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1}:{x:1,y:1},R=Aa(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:_,strategy:l}):x);return{top:(E.top-R.top+m.top)/P.y,bottom:(R.bottom-E.bottom+m.bottom)/P.y,left:(E.left-R.left+m.left)/P.x,right:(R.right-E.right+m.right)/P.x}}const IT=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=br(e,t)||{};if(u==null)return{};const c=Dm(d),h={x:n,y:r},p=_c(i),m=xc(p),b=await s.getDimensions(u),y=p==="y",E=y?"top":"left",x=y?"bottom":"right",_=y?"clientHeight":"clientWidth",P=o.reference[m]+o.reference[p]-h[p]-o.floating[m],R=h[p]-o.reference[p],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let S=C?C[_]:0;(!S||!await(s.isElement==null?void 0:s.isElement(C)))&&(S=a.floating[_]||o.floating[m]);const O=P/2-R/2,$=S/2-b[m]/2-1,N=Lr(c[E],$),W=Lr(c[x],$),U=N,w=S-b[m]-W,D=S/2-b[m]/2+O,M=gu(U,D,w),H=!l.arrow&&Ji(i)!=null&&D!==M&&o.reference[m]/2-(D<U?N:W)-b[m]/2<0,z=H?D<U?D-U:D-w:0;return{[p]:h[p]+z,data:{[p]:M,centerOffset:D-M-z,...H&&{alignmentOffset:z}},reset:H}}}),NT=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:c=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:b=!0,...y}=br(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const E=Er(i),x=rr(a),_=Er(a)===a,P=await(l.isRTL==null?void 0:l.isRTL(u.floating)),R=h||(_||!b?[wa(a)]:_T(a)),C=m!=="none";!h&&C&&R.push(...ST(a,b,m,P));const S=[a,...R],O=await Zo(t,y),$=[];let N=((r=o.flip)==null?void 0:r.overflows)||[];if(d&&$.push(O[E]),c){const D=xT(i,s,P);$.push(O[D[0]],O[D[1]])}if(N=[...N,{placement:i,overflows:$}],!$.every(D=>D<=0)){var W,U;const D=(((W=o.flip)==null?void 0:W.index)||0)+1,M=S[D];if(M&&(!(c==="alignment"?x!==rr(M):!1)||N.every(G=>rr(G.placement)===x?G.overflows[0]>0:!0)))return{data:{index:D,overflows:N},reset:{placement:M}};let H=(U=N.filter(z=>z.overflows[0]<=0).sort((z,G)=>z.overflows[1]-G.overflows[1])[0])==null?void 0:U.placement;if(!H)switch(p){case"bestFit":{var w;const z=(w=N.filter(G=>{if(C){const Q=rr(G.placement);return Q===x||Q==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(Q=>Q>0).reduce((Q,k)=>Q+k,0)]).sort((G,Q)=>G[1]-Q[1])[0])==null?void 0:w[0];z&&(H=z);break}case"initialPlacement":H=a;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function tf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nf(e){return bT.some(t=>e[t]>=0)}const OT=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=br(e,t);switch(r){case"referenceHidden":{const o=await Zo(t,{...i,elementContext:"reference"}),s=tf(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:nf(s)}}}case"escaped":{const o=await Zo(t,{...i,altBoundary:!0}),s=tf(o,n.floating);return{data:{escapedOffsets:s,escaped:nf(s)}}}default:return{}}}}},Pm=new Set(["left","top"]);async function RT(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=Er(n),a=Ji(n),l=rr(n)==="y",u=Pm.has(s)?-1:1,d=o&&l?-1:1,c=br(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),l?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const LT=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=t,l=await RT(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},DT=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:y=>{let{x:E,y:x}=y;return{x:E,y:x}}},...l}=br(e,t),u={x:n,y:r},d=await Zo(t,l),c=rr(Er(i)),h=Tc(c);let p=u[h],m=u[c];if(o){const y=h==="y"?"top":"left",E=h==="y"?"bottom":"right",x=p+d[y],_=p-d[E];p=gu(x,p,_)}if(s){const y=c==="y"?"top":"left",E=c==="y"?"bottom":"right",x=m+d[y],_=m-d[E];m=gu(x,m,_)}const b=a.fn({...t,[h]:p,[c]:m});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[h]:o,[c]:s}}}}}},PT=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=br(e,t),d={x:n,y:r},c=rr(i),h=Tc(c);let p=d[h],m=d[c];const b=br(a,t),y=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(l){const _=h==="y"?"height":"width",P=o.reference[h]-o.floating[_]+y.mainAxis,R=o.reference[h]+o.reference[_]-y.mainAxis;p<P?p=P:p>R&&(p=R)}if(u){var E,x;const _=h==="y"?"width":"height",P=Pm.has(Er(i)),R=o.reference[c]-o.floating[_]+(P&&((E=s.offset)==null?void 0:E[c])||0)+(P?0:y.crossAxis),C=o.reference[c]+o.reference[_]+(P?0:((x=s.offset)==null?void 0:x[c])||0)-(P?y.crossAxis:0);m<R?m=R:m>C&&(m=C)}return{[h]:p,[c]:m}}}},MT=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:l=()=>{},...u}=br(e,t),d=await Zo(t,u),c=Er(i),h=Ji(i),p=rr(i)==="y",{width:m,height:b}=o.floating;let y,E;c==="top"||c==="bottom"?(y=c,E=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(E=c,y=h==="end"?"top":"bottom");const x=b-d.top-d.bottom,_=m-d.left-d.right,P=Lr(b-d[y],x),R=Lr(m-d[E],_),C=!t.middlewareData.shift;let S=P,O=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=_),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=x),C&&!h){const N=En(d.left,0),W=En(d.right,0),U=En(d.top,0),w=En(d.bottom,0);p?O=m-2*(N!==0||W!==0?N+W:En(d.left,d.right)):S=b-2*(U!==0||w!==0?U+w:En(d.top,d.bottom))}await l({...t,availableWidth:O,availableHeight:S});const $=await s.getDimensions(a.floating);return m!==$.width||b!==$.height?{reset:{rects:!0}}:{}}}};function qa(){return typeof window<"u"}function eo(e){return Mm(e)?(e.nodeName||"").toLowerCase():"#document"}function xn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ar(e){var t;return(t=(Mm(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Mm(e){return qa()?e instanceof Node||e instanceof xn(e).Node:!1}function Yn(e){return qa()?e instanceof Element||e instanceof xn(e).Element:!1}function sr(e){return qa()?e instanceof HTMLElement||e instanceof xn(e).HTMLElement:!1}function rf(e){return!qa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xn(e).ShadowRoot}const BT=new Set(["inline","contents"]);function Es(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Zn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!BT.has(i)}const FT=new Set(["table","td","th"]);function HT(e){return FT.has(eo(e))}const zT=[":popover-open",":modal"];function Ka(e){return zT.some(t=>{try{return e.matches(t)}catch{return!1}})}const UT=["transform","translate","scale","rotate","perspective"],$T=["transform","translate","scale","rotate","perspective","filter"],jT=["paint","layout","strict","content"];function kc(e){const t=wc(),n=Yn(e)?Zn(e):e;return UT.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||$T.some(r=>(n.willChange||"").includes(r))||jT.some(r=>(n.contain||"").includes(r))}function VT(e){let t=Dr(e);for(;sr(t)&&!Zi(t);){if(kc(t))return t;if(Ka(t))return null;t=Dr(t)}return null}function wc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const WT=new Set(["html","body","#document"]);function Zi(e){return WT.has(eo(e))}function Zn(e){return xn(e).getComputedStyle(e)}function Xa(e){return Yn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Dr(e){if(eo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||rf(e)&&e.host||ar(e);return rf(t)?t.host:t}function Bm(e){const t=Dr(e);return Zi(t)?e.ownerDocument?e.ownerDocument.body:e.body:sr(t)&&Es(t)?t:Bm(t)}function Go(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Bm(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=xn(i);if(o){const a=Eu(s);return t.concat(s,s.visualViewport||[],Es(i)?i:[],a&&n?Go(a):[])}return t.concat(i,Go(i,[],n))}function Eu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Fm(e){const t=Zn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=sr(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=ka(n)!==o||ka(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function Ac(e){return Yn(e)?e:e.contextElement}function zi(e){const t=Ac(e);if(!sr(t))return or(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=Fm(t);let s=(o?ka(n.width):n.width)/r,a=(o?ka(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const YT=or(0);function Hm(e){const t=xn(e);return!wc()||!t.visualViewport?YT:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ZT(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==xn(e)?!1:t}function ci(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Ac(e);let s=or(1);t&&(r?Yn(r)&&(s=zi(r)):s=zi(e));const a=ZT(o,n,r)?Hm(o):or(0);let l=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,d=i.width/s.x,c=i.height/s.y;if(o){const h=xn(o),p=r&&Yn(r)?xn(r):r;let m=h,b=Eu(m);for(;b&&r&&p!==m;){const y=zi(b),E=b.getBoundingClientRect(),x=Zn(b),_=E.left+(b.clientLeft+parseFloat(x.paddingLeft))*y.x,P=E.top+(b.clientTop+parseFloat(x.paddingTop))*y.y;l*=y.x,u*=y.y,d*=y.x,c*=y.y,l+=_,u+=P,m=xn(b),b=Eu(m)}}return Aa({width:d,height:c,x:l,y:u})}function Qa(e,t){const n=Xa(e).scrollLeft;return t?t.left+n:ci(ar(e)).left+n}function zm(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Qa(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function GT(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=ar(r),a=t?Ka(t.floating):!1;if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=or(1);const d=or(0),c=sr(r);if((c||!c&&!o)&&((eo(r)!=="body"||Es(s))&&(l=Xa(r)),sr(r))){const p=ci(r);u=zi(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const h=s&&!c&&!o?zm(s,l):or(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-l.scrollTop*u.y+d.y+h.y}}function qT(e){return Array.from(e.getClientRects())}function KT(e){const t=ar(e),n=Xa(e),r=e.ownerDocument.body,i=En(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=En(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Qa(e);const a=-n.scrollTop;return Zn(r).direction==="rtl"&&(s+=En(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}const of=25;function XT(e,t){const n=xn(e),r=ar(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const d=wc();(!d||d&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const u=Qa(r);if(u<=0){const d=r.ownerDocument,c=d.body,h=getComputedStyle(c),p=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(r.clientWidth-c.clientWidth-p);m<=of&&(o-=m)}else u<=of&&(o+=u);return{width:o,height:s,x:a,y:l}}const QT=new Set(["absolute","fixed"]);function JT(e,t){const n=ci(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=sr(e)?zi(e):or(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=i*o.x,u=r*o.y;return{width:s,height:a,x:l,y:u}}function sf(e,t,n){let r;if(t==="viewport")r=XT(e,n);else if(t==="document")r=KT(ar(e));else if(Yn(t))r=JT(t,n);else{const i=Hm(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Aa(r)}function Um(e,t){const n=Dr(e);return n===t||!Yn(n)||Zi(n)?!1:Zn(n).position==="fixed"||Um(n,t)}function ex(e,t){const n=t.get(e);if(n)return n;let r=Go(e,[],!1).filter(a=>Yn(a)&&eo(a)!=="body"),i=null;const o=Zn(e).position==="fixed";let s=o?Dr(e):e;for(;Yn(s)&&!Zi(s);){const a=Zn(s),l=kc(s);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&QT.has(i.position)||Es(s)&&!l&&Um(e,s))?r=r.filter(d=>d!==s):i=a,s=Dr(s)}return t.set(e,r),r}function tx(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?Ka(t)?[]:ex(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((u,d)=>{const c=sf(t,d,i);return u.top=En(c.top,u.top),u.right=Lr(c.right,u.right),u.bottom=Lr(c.bottom,u.bottom),u.left=En(c.left,u.left),u},sf(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function nx(e){const{width:t,height:n}=Fm(e);return{width:t,height:n}}function rx(e,t,n){const r=sr(t),i=ar(t),o=n==="fixed",s=ci(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=or(0);function u(){l.x=Qa(i)}if(r||!r&&!o)if((eo(t)!=="body"||Es(i))&&(a=Xa(t)),r){const p=ci(t,!0,o,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&u();o&&!r&&i&&u();const d=i&&!r&&!o?zm(i,a):or(0),c=s.left+a.scrollLeft-l.x-d.x,h=s.top+a.scrollTop-l.y-d.y;return{x:c,y:h,width:s.width,height:s.height}}function Nl(e){return Zn(e).position==="static"}function af(e,t){if(!sr(e)||Zn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ar(e)===n&&(n=n.ownerDocument.body),n}function $m(e,t){const n=xn(e);if(Ka(e))return n;if(!sr(e)){let i=Dr(e);for(;i&&!Zi(i);){if(Yn(i)&&!Nl(i))return i;i=Dr(i)}return n}let r=af(e,t);for(;r&&HT(r)&&Nl(r);)r=af(r,t);return r&&Zi(r)&&Nl(r)&&!kc(r)?n:r||VT(e)||n}const ix=async function(e){const t=this.getOffsetParent||$m,n=this.getDimensions,r=await n(e.floating);return{reference:rx(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ox(e){return Zn(e).direction==="rtl"}const sx={convertOffsetParentRelativeRectToViewportRelativeRect:GT,getDocumentElement:ar,getClippingRect:tx,getOffsetParent:$m,getElementRects:ix,getClientRects:qT,getDimensions:nx,getScale:zi,isElement:Yn,isRTL:ox};function jm(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ax(e,t){let n=null,r;const i=ar(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const u=e.getBoundingClientRect(),{left:d,top:c,width:h,height:p}=u;if(a||t(),!h||!p)return;const m=Fs(c),b=Fs(i.clientWidth-(d+h)),y=Fs(i.clientHeight-(c+p)),E=Fs(d),_={rootMargin:-m+"px "+-b+"px "+-y+"px "+-E+"px",threshold:En(0,Lr(1,l))||1};let P=!0;function R(C){const S=C[0].intersectionRatio;if(S!==l){if(!P)return s();S?s(!1,S):r=setTimeout(()=>{s(!1,1e-7)},1e3)}S===1&&!jm(u,e.getBoundingClientRect())&&s(),P=!1}try{n=new IntersectionObserver(R,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(R,_)}n.observe(e)}return s(!0),o}function lx(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Ac(e),d=i||o?[...u?Go(u):[],...Go(t)]:[];d.forEach(E=>{i&&E.addEventListener("scroll",n,{passive:!0}),o&&E.addEventListener("resize",n)});const c=u&&a?ax(u,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(E=>{let[x]=E;x&&x.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var _;(_=p)==null||_.observe(t)})),n()}),u&&!l&&p.observe(u),p.observe(t));let m,b=l?ci(e):null;l&&y();function y(){const E=ci(e);b&&!jm(b,E)&&n(),b=E,m=requestAnimationFrame(y)}return n(),()=>{var E;d.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),c==null||c(),(E=p)==null||E.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const ux=LT,cx=DT,dx=NT,fx=MT,hx=OT,lf=IT,px=PT,mx=(e,t,n)=>{const r=new Map,i={platform:sx,...n},o={...i.platform,_c:r};return vT(e,t,{...i,platform:o})};var gx=typeof document<"u",bx=function(){},la=gx?T.useLayoutEffect:bx;function Sa(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Sa(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Sa(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Vm(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function uf(e,t){const n=Vm(e);return Math.round(t*n)/n}function Ol(e){const t=T.useRef(e);return la(()=>{t.current=e}),t}function Ex(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,c]=T.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=T.useState(r);Sa(h,r)||p(r);const[m,b]=T.useState(null),[y,E]=T.useState(null),x=T.useCallback(G=>{G!==C.current&&(C.current=G,b(G))},[]),_=T.useCallback(G=>{G!==S.current&&(S.current=G,E(G))},[]),P=o||m,R=s||y,C=T.useRef(null),S=T.useRef(null),O=T.useRef(d),$=l!=null,N=Ol(l),W=Ol(i),U=Ol(u),w=T.useCallback(()=>{if(!C.current||!S.current)return;const G={placement:t,strategy:n,middleware:h};W.current&&(G.platform=W.current),mx(C.current,S.current,G).then(Q=>{const k={...Q,isPositioned:U.current!==!1};D.current&&!Sa(O.current,k)&&(O.current=k,yc.flushSync(()=>{c(k)}))})},[h,t,n,W,U]);la(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,c(G=>({...G,isPositioned:!1})))},[u]);const D=T.useRef(!1);la(()=>(D.current=!0,()=>{D.current=!1}),[]),la(()=>{if(P&&(C.current=P),R&&(S.current=R),P&&R){if(N.current)return N.current(P,R,w);w()}},[P,R,w,N,$]);const M=T.useMemo(()=>({reference:C,floating:S,setReference:x,setFloating:_}),[x,_]),H=T.useMemo(()=>({reference:P,floating:R}),[P,R]),z=T.useMemo(()=>{const G={position:n,left:0,top:0};if(!H.floating)return G;const Q=uf(H.floating,d.x),k=uf(H.floating,d.y);return a?{...G,transform:"translate("+Q+"px, "+k+"px)",...Vm(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Q,top:k}},[n,a,H.floating,d.x,d.y]);return T.useMemo(()=>({...d,update:w,refs:M,elements:H,floatingStyles:z}),[d,w,M,H,z])}const yx=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?lf({element:r.current,padding:i}).fn(n):{}:r?lf({element:r,padding:i}).fn(n):{}}}},Tx=(e,t)=>({...ux(e),options:[e,t]}),xx=(e,t)=>({...cx(e),options:[e,t]}),_x=(e,t)=>({...px(e),options:[e,t]}),kx=(e,t)=>({...dx(e),options:[e,t]}),wx=(e,t)=>({...fx(e),options:[e,t]}),Ax=(e,t)=>({...hx(e),options:[e,t]}),Sx=(e,t)=>({...yx(e),options:[e,t]});var Cx="Arrow",Wm=T.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return g.jsx(Ei.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});Wm.displayName=Cx;var vx=Wm;function Ix(e){const[t,n]=T.useState(void 0);return ui(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,a;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,a=u.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Sc="Popper",[Ym,Zm]=Im(Sc),[Nx,Gm]=Ym(Sc),qm=e=>{const{__scopePopper:t,children:n}=e,[r,i]=T.useState(null);return g.jsx(Nx,{scope:t,anchor:r,onAnchorChange:i,children:n})};qm.displayName=Sc;var Km="PopperAnchor",Xm=T.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=Gm(Km,n),s=T.useRef(null),a=bi(t,s),l=T.useRef(null);return T.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||s.current,u!==l.current&&o.onAnchorChange(l.current)}),r?null:g.jsx(Ei.div,{...i,ref:a})});Xm.displayName=Km;var Cc="PopperContent",[Ox,Rx]=Ym(Cc),Qm=T.forwardRef((e,t)=>{var Qe,X,ce,Se,He,Je;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:c="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m,...b}=e,y=Gm(Cc,n),[E,x]=T.useState(null),_=bi(t,Ye=>x(Ye)),[P,R]=T.useState(null),C=Ix(P),S=(C==null?void 0:C.width)??0,O=(C==null?void 0:C.height)??0,$=r+(o!=="center"?"-"+o:""),N=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},W=Array.isArray(u)?u:[u],U=W.length>0,w={padding:N,boundary:W.filter(Dx),altBoundary:U},{refs:D,floatingStyles:M,placement:H,isPositioned:z,middlewareData:G}=Ex({strategy:"fixed",placement:$,whileElementsMounted:(...Ye)=>lx(...Ye,{animationFrame:p==="always"}),elements:{reference:y.anchor},middleware:[Tx({mainAxis:i+O,alignmentAxis:s}),l&&xx({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?_x():void 0,...w}),l&&kx({...w}),wx({...w,apply:({elements:Ye,rects:ze,availableWidth:lt,availableHeight:nt})=>{const{width:Le,height:Ze}=ze.reference,Ke=Ye.floating.style;Ke.setProperty("--radix-popper-available-width",`${lt}px`),Ke.setProperty("--radix-popper-available-height",`${nt}px`),Ke.setProperty("--radix-popper-anchor-width",`${Le}px`),Ke.setProperty("--radix-popper-anchor-height",`${Ze}px`)}}),P&&Sx({element:P,padding:a}),Px({arrowWidth:S,arrowHeight:O}),h&&Ax({strategy:"referenceHidden",...w})]}),[Q,k]=t0(H),se=Ga(m);ui(()=>{z&&(se==null||se())},[z,se]);const ne=(Qe=G.arrow)==null?void 0:Qe.x,v=(X=G.arrow)==null?void 0:X.y,ye=((ce=G.arrow)==null?void 0:ce.centerOffset)!==0,[be,Ee]=T.useState();return ui(()=>{E&&Ee(window.getComputedStyle(E).zIndex)},[E]),g.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:z?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:be,"--radix-popper-transform-origin":[(Se=G.transformOrigin)==null?void 0:Se.x,(He=G.transformOrigin)==null?void 0:He.y].join(" "),...((Je=G.hide)==null?void 0:Je.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(Ox,{scope:n,placedSide:Q,onArrowChange:R,arrowX:ne,arrowY:v,shouldHideArrow:ye,children:g.jsx(Ei.div,{"data-side":Q,"data-align":k,...b,ref:_,style:{...b.style,animation:z?void 0:"none"}})})})});Qm.displayName=Cc;var Jm="PopperArrow",Lx={top:"bottom",right:"left",bottom:"top",left:"right"},e0=T.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=Rx(Jm,r),s=Lx[o.placedSide];return g.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:g.jsx(vx,{...i,ref:n,style:{...i.style,display:"block"}})})});e0.displayName=Jm;function Dx(e){return e!==null}var Px=e=>({name:"transformOrigin",options:e,fn(t){var y,E,x;const{placement:n,rects:r,middlewareData:i}=t,s=((y=i.arrow)==null?void 0:y.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,d]=t0(n),c={start:"0%",center:"50%",end:"100%"}[d],h=(((E=i.arrow)==null?void 0:E.x)??0)+a/2,p=(((x=i.arrow)==null?void 0:x.y)??0)+l/2;let m="",b="";return u==="bottom"?(m=s?c:`${h}px`,b=`${-l}px`):u==="top"?(m=s?c:`${h}px`,b=`${r.floating.height+l}px`):u==="right"?(m=`${-l}px`,b=s?c:`${p}px`):u==="left"&&(m=`${r.floating.width+l}px`,b=s?c:`${p}px`),{data:{x:m,y:b}}}});function t0(e){const[t,n="center"]=e.split("-");return[t,n]}var Mx=qm,Bx=Xm,Fx=Qm,Hx=e0;function zx(e,t){return T.useReducer((n,r)=>t[n][r]??n,e)}var n0=e=>{const{present:t,children:n}=e,r=Ux(t),i=typeof n=="function"?n({present:r.isPresent}):T.Children.only(n),o=bi(r.ref,$x(i));return typeof n=="function"||r.isPresent?T.cloneElement(i,{ref:o}):null};n0.displayName="Presence";function Ux(e){const[t,n]=T.useState(),r=T.useRef(null),i=T.useRef(e),o=T.useRef("none"),s=e?"mounted":"unmounted",[a,l]=zx(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return T.useEffect(()=>{const u=Hs(r.current);o.current=a==="mounted"?u:"none"},[a]),ui(()=>{const u=r.current,d=i.current;if(d!==e){const h=o.current,p=Hs(u);e?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),ui(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,c=p=>{const b=Hs(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&b&&(l("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},h=p=>{p.target===t&&(o.current=Hs(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:T.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Hs(e){return(e==null?void 0:e.animationName)||"none"}function $x(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var jx=Am[" useInsertionEffect ".trim().toString()]||ui;function Vx({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,s]=Wx({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:i;{const d=T.useRef(e!==void 0);T.useEffect(()=>{const c=d.current;c!==a&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const u=T.useCallback(d=>{var c;if(a){const h=Yx(d)?d(e):d;h!==e&&((c=s.current)==null||c.call(s,h))}else o(d)},[a,e,o,s]);return[l,u]}function Wx({defaultProp:e,onChange:t}){const[n,r]=T.useState(e),i=T.useRef(n),o=T.useRef(t);return jx(()=>{o.current=t},[t]),T.useEffect(()=>{var s;i.current!==n&&((s=o.current)==null||s.call(o,n),i.current=n)},[n,i]),[n,r,o]}function Yx(e){return typeof e=="function"}var Zx=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Gx="VisuallyHidden",r0=T.forwardRef((e,t)=>g.jsx(Ei.span,{...e,ref:t,style:{...Zx,...e.style}}));r0.displayName=Gx;var qx=r0,[Ja]=Im("Tooltip",[Zm]),el=Zm(),i0="TooltipProvider",Kx=700,yu="tooltip.open",[Xx,vc]=Ja(i0),Qx=e=>{const{__scopeTooltip:t,delayDuration:n=Kx,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,s=T.useRef(!0),a=T.useRef(!1),l=T.useRef(0);return T.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),g.jsx(Xx,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:T.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:T.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:T.useCallback(u=>{a.current=u},[]),disableHoverableContent:i,children:o})};Qx.displayName=i0;var qo="Tooltip",[Jx,tl]=Ja(qo),o0=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:o,disableHoverableContent:s,delayDuration:a}=e,l=vc(qo,e.__scopeTooltip),u=el(t),[d,c]=T.useState(null),h=gT(),p=T.useRef(0),m=s??l.disableHoverableContent,b=a??l.delayDuration,y=T.useRef(!1),[E,x]=Vx({prop:r,defaultProp:i??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(yu))):l.onClose(),o==null||o(S)},caller:qo}),_=T.useMemo(()=>E?y.current?"delayed-open":"instant-open":"closed",[E]),P=T.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y.current=!1,x(!0)},[x]),R=T.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x(!1)},[x]),C=T.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{y.current=!0,x(!0),p.current=0},b)},[b,x]);return T.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),g.jsx(Mx,{...u,children:g.jsx(Jx,{scope:t,contentId:h,open:E,stateAttribute:_,trigger:d,onTriggerChange:c,onTriggerEnter:T.useCallback(()=>{l.isOpenDelayedRef.current?C():P()},[l.isOpenDelayedRef,C,P]),onTriggerLeave:T.useCallback(()=>{m?R():(window.clearTimeout(p.current),p.current=0)},[R,m]),onOpen:P,onClose:R,disableHoverableContent:m,children:n})})};o0.displayName=qo;var Tu="TooltipTrigger",s0=T.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=tl(Tu,n),o=vc(Tu,n),s=el(n),a=T.useRef(null),l=bi(t,a,i.onTriggerChange),u=T.useRef(!1),d=T.useRef(!1),c=T.useCallback(()=>u.current=!1,[]);return T.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),g.jsx(Bx,{asChild:!0,...s,children:g.jsx(Ei.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:pr(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:pr(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:pr(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:pr(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:pr(e.onBlur,i.onClose),onClick:pr(e.onClick,i.onClose)})})});s0.displayName=Tu;var e_="TooltipPortal",[rU,t_]=Ja(e_,{forceMount:void 0}),Gi="TooltipContent",a0=T.forwardRef((e,t)=>{const n=t_(Gi,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,s=tl(Gi,e.__scopeTooltip);return g.jsx(n0,{present:r||s.open,children:s.disableHoverableContent?g.jsx(l0,{side:i,...o,ref:t}):g.jsx(n_,{side:i,...o,ref:t})})}),n_=T.forwardRef((e,t)=>{const n=tl(Gi,e.__scopeTooltip),r=vc(Gi,e.__scopeTooltip),i=T.useRef(null),o=bi(t,i),[s,a]=T.useState(null),{trigger:l,onClose:u}=n,d=i.current,{onPointerInTransitChange:c}=r,h=T.useCallback(()=>{a(null),c(!1)},[c]),p=T.useCallback((m,b)=>{const y=m.currentTarget,E={x:m.clientX,y:m.clientY},x=a_(E,y.getBoundingClientRect()),_=l_(E,x),P=u_(b.getBoundingClientRect()),R=d_([..._,...P]);a(R),c(!0)},[c]);return T.useEffect(()=>()=>h(),[h]),T.useEffect(()=>{if(l&&d){const m=y=>p(y,d),b=y=>p(y,l);return l.addEventListener("pointerleave",m),d.addEventListener("pointerleave",b),()=>{l.removeEventListener("pointerleave",m),d.removeEventListener("pointerleave",b)}}},[l,d,p,h]),T.useEffect(()=>{if(s){const m=b=>{const y=b.target,E={x:b.clientX,y:b.clientY},x=(l==null?void 0:l.contains(y))||(d==null?void 0:d.contains(y)),_=!c_(E,s);x?h():_&&(h(),u())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,d,s,u,h]),g.jsx(l0,{...e,ref:o})}),[r_,i_]=Ja(qo,{isInside:!1}),o_=eT("TooltipContent"),l0=T.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:s,...a}=e,l=tl(Gi,n),u=el(n),{onClose:d}=l;return T.useEffect(()=>(document.addEventListener(yu,d),()=>document.removeEventListener(yu,d)),[d]),T.useEffect(()=>{if(l.trigger){const c=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&d()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,d]),g.jsx(Rm,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:d,children:g.jsxs(Fx,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(o_,{children:r}),g.jsx(r_,{scope:n,isInside:!0,children:g.jsx(qx,{id:l.contentId,role:"tooltip",children:i||r})})]})})});a0.displayName=Gi;var u0="TooltipArrow",s_=T.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=el(n);return i_(u0,n).isInside?null:g.jsx(Hx,{...i,...r,ref:t})});s_.displayName=u0;function a_(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function l_(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function u_(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function c_(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;o<t.length;s=o++){const a=t[o],l=t[s],u=a.x,d=a.y,c=l.x,h=l.y;d>r!=h>r&&n<(c-u)*(r-d)/(h-d)+u&&(i=!i)}return i}function d_(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),f_(t)}function f_(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const o=t[t.length-1],s=t[t.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],s=n[n.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var h_=o0,p_=s0,c0=a0;function d0(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=d0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Zt(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=d0(e))&&(r&&(r+=" "),r+=t);return r}const m_=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},g_=(e,t)=>({classGroupId:e,validator:t}),f0=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ca="-",cf=[],b_="arbitrary..",E_=e=>{const t=T_(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return y_(s);const a=s.split(Ca),l=a[0]===""&&a.length>1?1:0;return h0(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=r[s],u=n[s];return l?u?m_(u,l):l:u||cf}return n[s]||cf}}},h0=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const u=h0(e,t+1,o);if(u)return u}const s=n.validators;if(s===null)return;const a=t===0?e.join(Ca):e.slice(t).join(Ca),l=s.length;for(let u=0;u<l;u++){const d=s[u];if(d.validator(a))return d.classGroupId}},y_=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?b_+r:void 0})(),T_=e=>{const{theme:t,classGroups:n}=e;return x_(n,t)},x_=(e,t)=>{const n=f0();for(const r in e){const i=e[r];Ic(i,n,r,t)}return n},Ic=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const s=e[o];__(s,t,n,r)}},__=(e,t,n,r)=>{if(typeof e=="string"){k_(e,t,n);return}if(typeof e=="function"){w_(e,t,n,r);return}A_(e,t,n,r)},k_=(e,t,n)=>{const r=e===""?t:p0(t,e);r.classGroupId=n},w_=(e,t,n,r)=>{if(S_(e)){Ic(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(g_(n,e))},A_=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let s=0;s<o;s++){const[a,l]=i[s];Ic(l,p0(t,a),n,r)}},p0=(e,t)=>{let n=e;const r=t.split(Ca),i=r.length;for(let o=0;o<i;o++){const s=r[o];let a=n.nextPart.get(s);a||(a=f0(),n.nextPart.set(s,a)),n=a}return n},S_=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,C_=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(o,s)=>{n[o]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(o){let s=n[o];if(s!==void 0)return s;if((s=r[o])!==void 0)return i(o,s),s},set(o,s){o in n?n[o]=s:i(o,s)}}},xu="!",df=":",v_=[],ff=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),I_=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const o=[];let s=0,a=0,l=0,u;const d=i.length;for(let b=0;b<d;b++){const y=i[b];if(s===0&&a===0){if(y===df){o.push(i.slice(l,b)),l=b+1;continue}if(y==="/"){u=b;continue}}y==="["?s++:y==="]"?s--:y==="("?a++:y===")"&&a--}const c=o.length===0?i:i.slice(l);let h=c,p=!1;c.endsWith(xu)?(h=c.slice(0,-1),p=!0):c.startsWith(xu)&&(h=c.slice(1),p=!0);const m=u&&u>l?u-l:void 0;return ff(o,p,h,m)};if(t){const i=t+df,o=r;r=s=>s.startsWith(i)?o(s.slice(i.length)):ff(v_,!1,s,void 0,!0)}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},N_=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let o=0;o<n.length;o++){const s=n[o],a=s[0]==="[",l=t.has(s);a||l?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(s)):i.push(s)}return i.length>0&&(i.sort(),r.push(...i)),r}},O_=e=>({cache:C_(e.cacheSize),parseClassName:I_(e),sortModifiers:N_(e),...E_(e)}),R_=/\s+/,L_=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=t,s=[],a=e.trim().split(R_);let l="";for(let u=a.length-1;u>=0;u-=1){const d=a[u],{isExternal:c,modifiers:h,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:b}=n(d);if(c){l=d+(l.length>0?" "+l:l);continue}let y=!!b,E=r(y?m.substring(0,b):m);if(!E){if(!y){l=d+(l.length>0?" "+l:l);continue}if(E=r(m),!E){l=d+(l.length>0?" "+l:l);continue}y=!1}const x=h.length===0?"":h.length===1?h[0]:o(h).join(":"),_=p?x+xu:x,P=_+E;if(s.indexOf(P)>-1)continue;s.push(P);const R=i(E,y);for(let C=0;C<R.length;++C){const S=R[C];s.push(_+S)}l=d+(l.length>0?" "+l:l)}return l},D_=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=m0(n))&&(i&&(i+=" "),i+=r);return i},m0=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=m0(e[r]))&&(n&&(n+=" "),n+=t);return n},P_=(e,...t)=>{let n,r,i,o;const s=l=>{const u=t.reduce((d,c)=>c(d),e());return n=O_(u),r=n.cache.get,i=n.cache.set,o=a,a(l)},a=l=>{const u=r(l);if(u)return u;const d=L_(l,n);return i(l,d),d};return o=s,(...l)=>o(D_(...l))},M_=[],Nt=e=>{const t=n=>n[e]||M_;return t.isThemeGetter=!0,t},g0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,b0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,B_=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,F_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,H_=/\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$/,z_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,U_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,kr=e=>B_.test(e),De=e=>!!e&&!Number.isNaN(Number(e)),wr=e=>!!e&&Number.isInteger(Number(e)),Rl=e=>e.endsWith("%")&&De(e.slice(0,-1)),dr=e=>F_.test(e),E0=()=>!0,j_=e=>H_.test(e)&&!z_.test(e),Nc=()=>!1,V_=e=>U_.test(e),W_=e=>$_.test(e),Y_=e=>!de(e)&&!he(e),Z_=e=>zr(e,x0,Nc),de=e=>g0.test(e),Xr=e=>zr(e,_0,j_),hf=e=>zr(e,t2,De),G_=e=>zr(e,w0,E0),q_=e=>zr(e,k0,Nc),pf=e=>zr(e,y0,Nc),K_=e=>zr(e,T0,W_),zs=e=>zr(e,A0,V_),he=e=>b0.test(e),po=e=>yi(e,_0),X_=e=>yi(e,k0),mf=e=>yi(e,y0),Q_=e=>yi(e,x0),J_=e=>yi(e,T0),Us=e=>yi(e,A0,!0),e2=e=>yi(e,w0,!0),zr=(e,t,n)=>{const r=g0.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},yi=(e,t,n=!1)=>{const r=b0.exec(e);return r?r[1]?t(r[1]):n:!1},y0=e=>e==="position"||e==="percentage",T0=e=>e==="image"||e==="url",x0=e=>e==="length"||e==="size"||e==="bg-size",_0=e=>e==="length",t2=e=>e==="number",k0=e=>e==="family-name",w0=e=>e==="number"||e==="weight",A0=e=>e==="shadow",n2=()=>{const e=Nt("color"),t=Nt("font"),n=Nt("text"),r=Nt("font-weight"),i=Nt("tracking"),o=Nt("leading"),s=Nt("breakpoint"),a=Nt("container"),l=Nt("spacing"),u=Nt("radius"),d=Nt("shadow"),c=Nt("inset-shadow"),h=Nt("text-shadow"),p=Nt("drop-shadow"),m=Nt("blur"),b=Nt("perspective"),y=Nt("aspect"),E=Nt("ease"),x=Nt("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...P(),he,de],C=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],O=()=>[he,de,l],$=()=>[kr,"full","auto",...O()],N=()=>[wr,"none","subgrid",he,de],W=()=>["auto",{span:["full",wr,he,de]},wr,he,de],U=()=>[wr,"auto",he,de],w=()=>["auto","min","max","fr",he,de],D=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],M=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...O()],z=()=>[kr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],G=()=>[kr,"screen","full","dvw","lvw","svw","min","max","fit",...O()],Q=()=>[kr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...O()],k=()=>[e,he,de],se=()=>[...P(),mf,pf,{position:[he,de]}],ne=()=>["no-repeat",{repeat:["","x","y","space","round"]}],v=()=>["auto","cover","contain",Q_,Z_,{size:[he,de]}],ye=()=>[Rl,po,Xr],be=()=>["","none","full",u,he,de],Ee=()=>["",De,po,Xr],Qe=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ce=()=>[De,Rl,mf,pf],Se=()=>["","none",m,he,de],He=()=>["none",De,he,de],Je=()=>["none",De,he,de],Ye=()=>[De,he,de],ze=()=>[kr,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[dr],breakpoint:[dr],color:[E0],container:[dr],"drop-shadow":[dr],ease:["in","out","in-out"],font:[Y_],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[dr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[dr],shadow:[dr],spacing:["px",De],text:[dr],"text-shadow":[dr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",kr,de,he,y]}],container:["container"],columns:[{columns:[De,de,he,a]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"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:R()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{"inset-s":$(),start:$()}],end:[{"inset-e":$(),end:$()}],"inset-bs":[{"inset-bs":$()}],"inset-be":[{"inset-be":$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[wr,"auto",he,de]}],basis:[{basis:[kr,"full","auto",a,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[De,kr,"auto","initial","none",de]}],grow:[{grow:["",De,he,de]}],shrink:[{shrink:["",De,he,de]}],order:[{order:[wr,"first","last","none",he,de]}],"grid-cols":[{"grid-cols":N()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":N()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":w()}],"auto-rows":[{"auto-rows":w()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...M(),"normal"]}],"justify-self":[{"justify-self":["auto",...M()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...M(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...M(),{baseline:["","last"]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...M(),"baseline"]}],"place-self":[{"place-self":["auto",...M()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pbs:[{pbs:O()}],pbe:[{pbe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mbs:[{mbs:H()}],mbe:[{mbe:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...Q()]}],"min-block-size":[{"min-block":["auto",...Q()]}],"max-block-size":[{"max-block":["none",...Q()]}],w:[{w:[a,"screen",...z()]}],"min-w":[{"min-w":[a,"screen","none",...z()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",n,po,Xr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,e2,G_]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Rl,de]}],"font-family":[{font:[X_,q_,t]}],"font-features":[{"font-features":[de]}],"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,he,de]}],"line-clamp":[{"line-clamp":[De,"none",he,hf]}],leading:[{leading:[o,...O()]}],"list-image":[{"list-image":["none",he,de]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,de]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Qe(),"wavy"]}],"text-decoration-thickness":[{decoration:[De,"from-font","auto",he,Xr]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[De,"auto",he,de]}],"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",he,de]}],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",he,de]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:se()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:v()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},wr,he,de],radial:["",he,de],conic:[wr,he,de]},J_,K_]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:ye()}],"gradient-via-pos":[{via:ye()}],"gradient-to-pos":[{to:ye()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:be()}],"rounded-s":[{"rounded-s":be()}],"rounded-e":[{"rounded-e":be()}],"rounded-t":[{"rounded-t":be()}],"rounded-r":[{"rounded-r":be()}],"rounded-b":[{"rounded-b":be()}],"rounded-l":[{"rounded-l":be()}],"rounded-ss":[{"rounded-ss":be()}],"rounded-se":[{"rounded-se":be()}],"rounded-ee":[{"rounded-ee":be()}],"rounded-es":[{"rounded-es":be()}],"rounded-tl":[{"rounded-tl":be()}],"rounded-tr":[{"rounded-tr":be()}],"rounded-br":[{"rounded-br":be()}],"rounded-bl":[{"rounded-bl":be()}],"border-w":[{border:Ee()}],"border-w-x":[{"border-x":Ee()}],"border-w-y":[{"border-y":Ee()}],"border-w-s":[{"border-s":Ee()}],"border-w-e":[{"border-e":Ee()}],"border-w-bs":[{"border-bs":Ee()}],"border-w-be":[{"border-be":Ee()}],"border-w-t":[{"border-t":Ee()}],"border-w-r":[{"border-r":Ee()}],"border-w-b":[{"border-b":Ee()}],"border-w-l":[{"border-l":Ee()}],"divide-x":[{"divide-x":Ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Qe(),"hidden","none"]}],"divide-style":[{divide:[...Qe(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-bs":[{"border-bs":k()}],"border-color-be":[{"border-be":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...Qe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[De,he,de]}],"outline-w":[{outline:["",De,po,Xr]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",d,Us,zs]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",c,Us,zs]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:Ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[De,Xr]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":Ee()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",h,Us,zs]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[De,he,de]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],"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":[De]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[he,de]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"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":P()}],"mask-image-conic-pos":[{"mask-conic":[De]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:se()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:v()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,de]}],filter:[{filter:["","none",he,de]}],blur:[{blur:Se()}],brightness:[{brightness:[De,he,de]}],contrast:[{contrast:[De,he,de]}],"drop-shadow":[{"drop-shadow":["","none",p,Us,zs]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",De,he,de]}],"hue-rotate":[{"hue-rotate":[De,he,de]}],invert:[{invert:["",De,he,de]}],saturate:[{saturate:[De,he,de]}],sepia:[{sepia:["",De,he,de]}],"backdrop-filter":[{"backdrop-filter":["","none",he,de]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[De,he,de]}],"backdrop-contrast":[{"backdrop-contrast":[De,he,de]}],"backdrop-grayscale":[{"backdrop-grayscale":["",De,he,de]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[De,he,de]}],"backdrop-invert":[{"backdrop-invert":["",De,he,de]}],"backdrop-opacity":[{"backdrop-opacity":[De,he,de]}],"backdrop-saturate":[{"backdrop-saturate":[De,he,de]}],"backdrop-sepia":[{"backdrop-sepia":["",De,he,de]}],"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",he,de]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[De,"initial",he,de]}],ease:[{ease:["linear","initial",E,he,de]}],delay:[{delay:[De,he,de]}],animate:[{animate:["none",x,he,de]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,he,de]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:He()}],"rotate-x":[{"rotate-x":He()}],"rotate-y":[{"rotate-y":He()}],"rotate-z":[{"rotate-z":He()}],scale:[{scale:Je()}],"scale-x":[{"scale-x":Je()}],"scale-y":[{"scale-y":Je()}],"scale-z":[{"scale-z":Je()}],"scale-3d":["scale-3d"],skew:[{skew:Ye()}],"skew-x":[{"skew-x":Ye()}],"skew-y":[{"skew-y":Ye()}],transform:[{transform:[he,de,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ze()}],"translate-x":[{"translate-x":ze()}],"translate-y":[{"translate-y":ze()}],"translate-z":[{"translate-z":ze()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"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",he,de]}],"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-mbs":[{"scroll-mbs":O()}],"scroll-mbe":[{"scroll-mbe":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-pbs":[{"scroll-pbs":O()}],"scroll-pbe":[{"scroll-pbe":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",he,de]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[De,po,Xr,hf]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]}},Oc=P_(n2);/**
|
|
3
|
-
* @license lucide-react v0.575.0 - ISC
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the ISC license.
|
|
6
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/const S0=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
8
|
-
* @license lucide-react v0.575.0 - ISC
|
|
9
|
-
*
|
|
10
|
-
* This source code is licensed under the ISC license.
|
|
11
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/const r2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
13
|
-
* @license lucide-react v0.575.0 - ISC
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the ISC license.
|
|
16
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/const i2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
|
|
18
|
-
* @license lucide-react v0.575.0 - ISC
|
|
19
|
-
*
|
|
20
|
-
* This source code is licensed under the ISC license.
|
|
21
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
22
|
-
*/const gf=e=>{const t=i2(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
23
|
-
* @license lucide-react v0.575.0 - ISC
|
|
24
|
-
*
|
|
25
|
-
* This source code is licensed under the ISC license.
|
|
26
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/var o2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
28
|
-
* @license lucide-react v0.575.0 - ISC
|
|
29
|
-
*
|
|
30
|
-
* This source code is licensed under the ISC license.
|
|
31
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/const s2=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
|
|
33
|
-
* @license lucide-react v0.575.0 - ISC
|
|
34
|
-
*
|
|
35
|
-
* This source code is licensed under the ISC license.
|
|
36
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/const a2=T.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:s,...a},l)=>T.createElement("svg",{ref:l,...o2,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:S0("lucide",i),...!o&&!s2(a)&&{"aria-hidden":"true"},...a},[...s.map(([u,d])=>T.createElement(u,d)),...Array.isArray(o)?o:[o]]));/**
|
|
38
|
-
* @license lucide-react v0.575.0 - ISC
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the ISC license.
|
|
41
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const C0=(e,t)=>{const n=T.forwardRef(({className:r,...i},o)=>T.createElement(a2,{ref:o,iconNode:t,className:S0(`lucide-${r2(gf(e))}`,`lucide-${e}`,r),...i}));return n.displayName=gf(e),n};/**
|
|
43
|
-
* @license lucide-react v0.575.0 - ISC
|
|
44
|
-
*
|
|
45
|
-
* This source code is licensed under the ISC license.
|
|
46
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const l2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],iU=C0("loader-circle",l2);/**
|
|
48
|
-
* @license lucide-react v0.575.0 - ISC
|
|
49
|
-
*
|
|
50
|
-
* This source code is licensed under the ISC license.
|
|
51
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/const u2=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],c2=C0("lock",u2);function d2(...e){return Oc(Zt(e))}const bf=new Intl.NumberFormat(void 0,{maximumFractionDigits:2}),So=1e3,ti=60*So,Ri=60*ti,Ef=24*Ri;function _n(e,t=!1){if(e===0)return"0";if(e<So)return`${bf.format(e)}ms`;if(e<ti)return`${bf.format(e/So)}s`;if(t){if(e<Ri){const u=Math.floor(e/ti),d=Math.floor(e%ti/So);return d>0?`${u}m ${d}s`:`${u}m`}const a=Math.floor(e/Ri),l=Math.floor(e%Ri/ti);return l>0?`${a}h ${l}m`:`${a}h`}const n=Math.floor(e/Ef),r=Math.floor(e%Ef/Ri),i=Math.floor(e%Ri/ti),o=Math.floor(e%ti/So),s=[];return n>0&&s.push(`${n}d`),r>0&&s.push(`${r}h`),i>0&&s.push(`${i}m`),r<=1&&(o>0||s.length===0)&&s.push(`${o}s`),s.join(" ")}function oU(e){return e.endsWith("//doStreamStep")}function sU(e){if(!Array.isArray(e)||e.length===0)return null;const t=e[0];return!Array.isArray(t)||!t.every(n=>n&&typeof n=="object"&&"role"in n)?null:t}const nl=0,Ur=1,to=2,v0=4;function yf(e){return()=>e}function f2(e){e()}function I0(e,t){return n=>e(t(n))}function Tf(e,t){return()=>e(t)}function h2(e,t){return n=>e(t,n)}function Rc(e){return e!==void 0}function p2(...e){return()=>{e.map(f2)}}function no(){}function rl(e,t){return t(e),e}function m2(e,t){return t(e)}function dt(...e){return e}function Xe(e,t){return e(Ur,t)}function Oe(e,t){e(nl,t)}function Lc(e){e(to)}function pt(e){return e(v0)}function me(e,t){return Xe(e,h2(t,nl))}function jn(e,t){const n=e(Ur,r=>{n(),t(r)});return n}function xf(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function N0(e,t){return e===t}function ct(e=N0){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function ke(e){return t=>n=>{e(n)&&t(n)}}function ue(e){return t=>I0(t,e)}function tr(e){return t=>()=>{t(e)}}function ee(e,...t){const n=g2(...t);return((r,i)=>{switch(r){case to:Lc(e);return;case Ur:return Xe(e,n(i))}})}function ir(e,t){return n=>r=>{n(t=e(t,r))}}function di(e){return t=>n=>{e>0?e--:t(n)}}function gr(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Re(...e){const t=new Array(e.length);let n=0,r=null;const i=Math.pow(2,e.length)-1;return e.forEach((o,s)=>{const a=Math.pow(2,s);Xe(o,l=>{const u=n;n=n|a,t[s]=l,u!==i&&n===i&&r&&(r(),r=null)})}),o=>s=>{const a=()=>{o([s].concat(t))};n===i?a():r=a}}function g2(...e){return t=>e.reduceRight(m2,t)}function b2(e){let t,n;const r=()=>t==null?void 0:t();return function(i,o){switch(i){case Ur:return o?n===o?void 0:(r(),n=o,t=Xe(e,o),t):(r(),no);case to:r(),n=null;return}}}function oe(e){let t=e;const n=$e();return((r,i)=>{switch(r){case nl:t=i;break;case Ur:{i(t);break}case v0:return t}return n(r,i)})}function Wt(e,t){return rl(oe(t),n=>me(e,n))}function $e(){const e=[];return((t,n)=>{switch(t){case nl:e.slice().forEach(r=>{r(n)});return;case to:e.splice(0,e.length);return;case Ur:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}})}function kn(e){return rl($e(),t=>me(e,t))}function qe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:E2(),singleton:n}}const E2=()=>Symbol();function y2(e){const t=new Map,n=({constructor:r,dependencies:i,id:o,singleton:s})=>{if(s&&t.has(o))return t.get(o);const a=r(i.map(l=>n(l)));return s&&t.set(o,a),a};return n(e)}function vt(...e){const t=$e(),n=new Array(e.length);let r=0;const i=Math.pow(2,e.length)-1;return e.forEach((o,s)=>{const a=Math.pow(2,s);Xe(o,l=>{n[s]=l,r=r|a,r===i&&Oe(t,n)})}),function(o,s){switch(o){case to:{Lc(t);return}case Ur:return r===i&&s(n),Xe(t,s)}}}function _e(e,t=N0){return ee(e,ct(t))}function _u(...e){return function(t,n){switch(t){case to:return;case Ur:return p2(...e.map(r=>Xe(r,n)))}}}var ln=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(ln||{});const T2={0:"debug",3:"error",1:"log",2:"warn"},x2=()=>typeof globalThis>"u"?window:globalThis,$r=qe(()=>{const e=oe(3);return{log:oe((t,n,r=1)=>{var i;const o=(i=x2().VIRTUOSO_LOG_LEVEL)!=null?i:pt(e);r>=o&&console[T2[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Ti(e,t,n){return Dc(e,t,n).callbackRef}function Dc(e,t,n){const r=F.useRef(null);let i=s=>{};const o=F.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(s=>{const a=()=>{const l=s[0].target;l.offsetParent!==null&&e(l)};n?a():requestAnimationFrame(a)}):null,[e,n]);return i=s=>{s&&t?(o==null||o.observe(s),r.current=s):(r.current&&(o==null||o.unobserve(r.current)),r.current=null)},{callbackRef:i,ref:r}}function _2(e,t,n,r,i,o,s,a,l){const u=F.useCallback(d=>{const c=k2(d.children,t,a?"offsetWidth":"offsetHeight",i);let h=d.parentElement;for(;!h.dataset.virtuosoScroller;)h=h.parentElement;const p=h.lastElementChild.dataset.viewportType==="window";let m;p&&(m=h.ownerDocument.defaultView);const b=s?a?s.scrollLeft:s.scrollTop:p?a?m.scrollX||m.document.documentElement.scrollLeft:m.scrollY||m.document.documentElement.scrollTop:a?h.scrollLeft:h.scrollTop,y=s?a?s.scrollWidth:s.scrollHeight:p?a?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight:a?h.scrollWidth:h.scrollHeight,E=s?a?s.offsetWidth:s.offsetHeight:p?a?m.innerWidth:m.innerHeight:a?h.offsetWidth:h.offsetHeight;r({scrollHeight:y,scrollTop:Math.max(b,0),viewportHeight:E}),o==null||o(a?_f("column-gap",getComputedStyle(d).columnGap,i):_f("row-gap",getComputedStyle(d).rowGap,i)),c!==null&&e(c)},[e,t,i,o,s,r,a]);return Dc(u,n,l)}function k2(e,t,n,r){const i=e.length;if(i===0)return null;const o=[];for(let s=0;s<i;s++){const a=e.item(s);if(a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),u=parseFloat(a.dataset.knownSize),d=t(a,n);if(d===0&&r("Zero-sized element, this should not happen",{child:a},ln.ERROR),d===u)continue;const c=o[o.length-1];o.length===0||c.size!==d||c.endIndex!==l-1?o.push({endIndex:l,size:d,startIndex:l}):o[o.length-1].endIndex++}return o}function _f(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,ln.WARN),t==="normal"?0:parseInt(t??"0",10)}function O0(e,t,n){const r=F.useRef(null),i=F.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const u=l.getBoundingClientRect(),d=u.width;let c,h;if(t){const p=t.getBoundingClientRect(),m=u.top-p.top;h=p.height-Math.max(0,m),c=m+t.scrollTop}else{const p=s.current.ownerDocument.defaultView;h=p.innerHeight-Math.max(0,u.top),c=u.top+p.scrollY}r.current={offsetTop:c,visibleHeight:h,visibleWidth:d},e(r.current)},[e,t]),{callbackRef:o,ref:s}=Dc(i,!0,n),a=F.useCallback(()=>{i(s.current)},[i,s]);return F.useEffect(()=>{var l;if(t){t.addEventListener("scroll",a);const u=new ResizeObserver(()=>{requestAnimationFrame(a)});return u.observe(t),()=>{t.removeEventListener("scroll",a),u.unobserve(t)}}else{const u=(l=s.current)==null?void 0:l.ownerDocument.defaultView;return u==null||u.addEventListener("scroll",a),u==null||u.addEventListener("resize",a),()=>{u==null||u.removeEventListener("scroll",a),u==null||u.removeEventListener("resize",a)}}},[a,t,s]),o}const nn=qe(()=>{const e=$e(),t=$e(),n=oe(0),r=$e(),i=oe(0),o=$e(),s=$e(),a=oe(0),l=oe(0),u=oe(0),d=oe(0),c=$e(),h=$e(),p=oe(!1),m=oe(!1),b=oe(!1);return me(ee(e,ue(({scrollTop:y})=>y)),t),me(ee(e,ue(({scrollHeight:y})=>y)),s),me(t,i),{deviation:n,fixedFooterHeight:u,fixedHeaderHeight:l,footerHeight:d,headerHeight:a,horizontalDirection:m,scrollBy:h,scrollContainerState:e,scrollHeight:s,scrollingInProgress:p,scrollTo:c,scrollTop:t,skipAnimationFrameInResizeObserver:b,smoothScrollTargetReached:r,statefulScrollTop:i,viewportHeight:o}},[],{singleton:!0}),Ko={lvl:0};function R0(e,t){const n=e.length;if(n===0)return[];let{index:r,value:i}=t(e[0]);const o=[];for(let s=1;s<n;s++){const{index:a,value:l}=t(e[s]);o.push({end:a-1,start:r,value:i}),r=a,i=l}return o.push({end:1/0,start:r,value:i}),o}function it(e){return e===Ko}function Xo(e,t){if(!it(e))return t===e.k?e.v:t<e.k?Xo(e.l,t):Xo(e.r,t)}function Gn(e,t,n="k"){if(it(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Gn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Gn(e.l,t,n)}function yn(e,t,n){return it(e)?P0(t,n,1):t===e.k?Rt(e,{k:t,v:n}):t<e.k?kf(Rt(e,{l:yn(e.l,t,n)})):kf(Rt(e,{r:yn(e.r,t,n)}))}function Ui(){return Ko}function $i(e,t,n){if(it(e))return[];const r=Gn(e,t)[0];return w2(wu(e,r,n))}function ku(e,t){if(it(e))return Ko;const{k:n,l:r,r:i}=e;if(t===n){if(it(r))return i;if(it(i))return r;{const[o,s]=D0(r);return ua(Rt(e,{k:o,l:L0(r),v:s}))}}else return t<n?ua(Rt(e,{l:ku(r,t)})):ua(Rt(e,{r:ku(i,t)}))}function ii(e){return it(e)?[]:[...ii(e.l),{k:e.k,v:e.v},...ii(e.r)]}function wu(e,t,n){if(it(e))return[];const{k:r,l:i,r:o,v:s}=e;let a=[];return r>t&&(a=a.concat(wu(i,t,n))),r>=t&&r<=n&&a.push({k:r,v:s}),r<=n&&(a=a.concat(wu(o,t,n))),a}function ua(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(Ll(t))return M0(Rt(e,{lvl:n-1}));if(!it(t)&&!it(t.r))return Rt(t.r,{l:Rt(t,{r:t.r.l}),lvl:n,r:Rt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(Ll(e))return Au(Rt(e,{lvl:n-1}));if(!it(r)&&!it(r.l)){const i=r.l,o=Ll(i)?r.lvl-1:r.lvl;return Rt(i,{l:Rt(e,{lvl:n-1,r:i.l}),lvl:i.lvl+1,r:Au(Rt(r,{l:i.r,lvl:o}))})}else throw new Error("Unexpected empty nodes")}}function Rt(e,t){return P0(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function L0(e){return it(e.r)?e.l:ua(Rt(e,{r:L0(e.r)}))}function Ll(e){return it(e)||e.lvl>e.r.lvl}function D0(e){return it(e.r)?[e.k,e.v]:D0(e.r)}function P0(e,t,n,r=Ko,i=Ko){return{k:e,l:r,lvl:n,r:i,v:t}}function kf(e){return Au(M0(e))}function M0(e){const{l:t}=e;return!it(t)&&t.lvl===e.lvl?Rt(t,{r:Rt(e,{l:t.r})}):e}function Au(e){const{lvl:t,r:n}=e;return!it(n)&&!it(n.r)&&n.lvl===t&&n.r.lvl===t?Rt(n,{l:Rt(e,{r:n.l}),lvl:t+1}):e}function w2(e){return R0(e,({k:t,v:n})=>({index:t,value:n}))}function B0(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Qo(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const Pc=qe(()=>({recalcInProgress:oe(!1)}),[],{singleton:!0});function F0(e,t,n){return e[va(e,t,n)]}function va(e,t,n,r=0){let i=e.length-1;for(;r<=i;){const o=Math.floor((r+i)/2),s=e[o],a=n(s,t);if(a===0)return o;if(a===-1){if(i-r<2)return o-1;i=o-1}else{if(i===r)return o;r=o+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function A2(e,t,n,r){const i=va(e,t,r),o=va(e,n,r,i);return e.slice(i,o+1)}function Pr(e,t){return Math.round(e.getBoundingClientRect()[t])}function il(e){return!it(e.groupOffsetTree)}function Mc({index:e},t){return t===e?0:t<e?-1:1}function S2(){return{groupIndices:[],groupOffsetTree:Ui(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Ui()}}function C2(e,t){let n=it(e)?0:1/0;for(const r of t){const{endIndex:i,size:o,startIndex:s}=r;if(n=Math.min(n,s),it(e)){e=yn(e,0,o);continue}const a=$i(e,s-1,i+1);if(a.some(D2(r)))continue;let l=!1,u=!1;for(const{end:d,start:c,value:h}of a)l?(i>=c||o===h)&&(e=ku(e,c)):(u=h!==o,l=!0),d>i&&i>=c&&h!==o&&(e=yn(e,i+1,h));u&&(e=yn(e,s,o))}return[e,n]}function v2(e){return typeof e.groupIndex<"u"}function I2({offset:e},t){return t===e?0:t<e?-1:1}function Jo(e,t,n){if(t.length===0)return 0;const{index:r,offset:i,size:o}=F0(t,e,Mc),s=e-r,a=o*s+(s-1)*n+i;return a>0?a+n:a}function H0(e,t){if(!il(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function z0(e,t,n){if(v2(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let i=H0(r,t);return i=Math.max(0,i,Math.min(n,i)),i}}function N2(e,t,n,r=0){return r>0&&(t=Math.max(t,F0(e,r,Mc).offset)),R0(A2(e,t,n,I2),L2)}function O2(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,ln.DEBUG);const o=e.sizeTree;let s=o,a=0;if(n.length>0&&it(o)&&t.length===2){const h=t[0].size,p=t[1].size;s=n.reduce((m,b)=>yn(yn(m,b,h),b+1,p),s)}else[s,a]=C2(s,t);if(s===o)return e;const{lastIndex:l,lastOffset:u,lastSize:d,offsetTree:c}=Su(e.offsetTree,a,s,i);return{groupIndices:n,groupOffsetTree:n.reduce((h,p)=>yn(h,p,Jo(p,c,i)),Ui()),lastIndex:l,lastOffset:u,lastSize:d,offsetTree:c,sizeTree:s}}function R2(e){return ii(e).map(({k:t,v:n},r,i)=>{const o=i[r+1];return{endIndex:o?o.k-1:1/0,size:n,startIndex:t}})}function wf(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function Su(e,t,n,r){let i=e,o=0,s=0,a=0,l=0;if(t!==0){l=va(i,t-1,Mc),a=i[l].offset;const u=Gn(n,t-1);o=u[0],s=u[1],i.length&&i[l].size===Gn(n,t)[1]&&(l-=1),i=i.slice(0,l+1)}else i=[];for(const{start:u,value:d}of $i(n,t,1/0)){const c=u-o,h=c*s+a+c*r;i.push({index:u,offset:h,size:d}),o=u,a=h,s=d}return{lastIndex:o,lastOffset:a,lastSize:s,offsetTree:i}}function L2(e){return{index:e.index,value:e}}function D2(e){const{endIndex:t,size:n,startIndex:r}=e;return i=>i.start===r&&(i.end===t||i.end===1/0)&&i.value===n}const P2={offsetHeight:"height",offsetWidth:"width"},lr=qe(([{log:e},{recalcInProgress:t}])=>{const n=$e(),r=$e(),i=Wt(r,0),o=$e(),s=$e(),a=oe(0),l=oe([]),u=oe(void 0),d=oe(void 0),c=oe(void 0),h=oe(void 0),p=oe((S,O)=>Pr(S,P2[O])),m=oe(void 0),b=oe(0),y=S2(),E=Wt(ee(n,Re(l,e,b),ir(O2,y),ct()),y),x=Wt(ee(l,ct(),ir((S,O)=>({current:O,prev:S.current}),{current:[],prev:[]}),ue(({prev:S})=>S)),[]);me(ee(l,ke(S=>S.length>0),Re(E,b),ue(([S,O,$])=>{const N=S.reduce((W,U,w)=>yn(W,U,Jo(U,O.offsetTree,$)||w),Ui());return{...O,groupIndices:S,groupOffsetTree:N}})),E),me(ee(r,Re(E),ke(([S,{lastIndex:O}])=>S<O),ue(([S,{lastIndex:O,lastSize:$}])=>[{endIndex:O,size:$,startIndex:S}])),n),me(u,d);const _=Wt(ee(u,ue(S=>S===void 0)),!0);me(ee(d,ke(S=>S!==void 0&&it(pt(E).sizeTree)),ue(S=>{const O=pt(c),$=pt(l).length>0;return O?$?[{endIndex:0,size:O,startIndex:0},{endIndex:1,size:S,startIndex:1}]:[]:[{endIndex:0,size:S,startIndex:0}]})),n),me(ee(h,ke(S=>S!==void 0&&S.length>0&&it(pt(E).sizeTree)),ue(S=>{const O=[];let $=S[0],N=0;for(let W=1;W<S.length;W++){const U=S[W];U!==$&&(O.push({endIndex:W-1,size:$,startIndex:N}),$=U,N=W)}return O.push({endIndex:S.length-1,size:$,startIndex:N}),O})),n),me(ee(l,Re(c,d),ke(([,S,O])=>S!==void 0&&O!==void 0),ue(([S,O,$])=>{const N=[];for(let W=0;W<S.length;W++){const U=S[W],w=S[W+1];N.push({startIndex:U,endIndex:U,size:O}),w!==void 0&&N.push({startIndex:U+1,endIndex:w-1,size:$})}return N})),n);const P=kn(ee(n,Re(E),ir(({sizes:S},[O,$])=>({changed:$!==S,sizes:$}),{changed:!1,sizes:y}),ue(S=>S.changed)));Xe(ee(a,ir((S,O)=>({diff:S.prev-O,prev:O}),{diff:0,prev:0}),ue(S=>S.diff)),S=>{const{groupIndices:O}=pt(E);if(S>0)Oe(t,!0),Oe(o,S+wf(S,O));else if(S<0){const $=pt(x);$.length>0&&(S-=wf(-S,$)),Oe(s,S)}}),Xe(ee(a,Re(e)),([S,O])=>{S<0&&O("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},ln.ERROR)});const R=kn(o);me(ee(o,Re(E),ue(([S,O])=>{const $=O.groupIndices.length>0,N=[],W=O.lastSize;if($){const U=Xo(O.sizeTree,0);let w=0,D=0;for(;w<S;){const H=O.groupIndices[D],z=O.groupIndices.length===D+1?1/0:O.groupIndices[D+1]-H-1;N.push({endIndex:H,size:U,startIndex:H}),N.push({endIndex:H+1+z-1,size:W,startIndex:H+1}),D++,w+=z+1}const M=ii(O.sizeTree);return w!==S&&M.shift(),M.reduce((H,{k:z,v:G})=>{let Q=H.ranges;return H.prevSize!==0&&(Q=[...H.ranges,{endIndex:z+S-1,size:H.prevSize,startIndex:H.prevIndex}]),{prevIndex:z+S,prevSize:G,ranges:Q}},{prevIndex:S,prevSize:0,ranges:N}).ranges}return ii(O.sizeTree).reduce((U,{k:w,v:D})=>({prevIndex:w+S,prevSize:D,ranges:[...U.ranges,{endIndex:w+S-1,size:U.prevSize,startIndex:U.prevIndex}]}),{prevIndex:0,prevSize:W,ranges:[]}).ranges})),n);const C=kn(ee(s,Re(E,b),ue(([S,{offsetTree:O},$])=>{const N=-S;return Jo(N,O,$)})));return me(ee(s,Re(E,b),ue(([S,O,$])=>{if(O.groupIndices.length>0){if(it(O.sizeTree))return O;let N=Ui();const W=pt(x);let U=0,w=0,D=0;for(;U<-S;){D=W[w];const M=W[w+1]-D-1;w++,U+=M+1}if(N=ii(O.sizeTree).reduce((M,{k:H,v:z})=>yn(M,Math.max(0,H+S),z),N),U!==-S){const M=Xo(O.sizeTree,D);N=yn(N,0,M);const H=Gn(O.sizeTree,-S+1)[1];N=yn(N,1,H)}return{...O,sizeTree:N,...Su(O.offsetTree,0,N,$)}}else{const N=ii(O.sizeTree).reduce((W,{k:U,v:w})=>yn(W,Math.max(0,U+S),w),Ui());return{...O,sizeTree:N,...Su(O.offsetTree,0,N,$)}}})),E),{beforeUnshiftWith:R,data:m,defaultItemSize:d,firstItemIndex:a,fixedItemSize:u,fixedGroupSize:c,gap:b,groupIndices:l,heightEstimates:h,itemSize:p,listRefresh:P,shiftWith:s,shiftWithOffset:C,sizeRanges:n,sizes:E,statefulTotalCount:i,totalCount:r,trackItemSizes:_,unshiftWith:o}},dt($r,Pc),{singleton:!0});function M2(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const U0=qe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{const o=$e(),s=$e(),a=kn(ee(o,ue(M2)));return me(ee(a,ue(l=>l.totalCount)),n),me(ee(a,ue(l=>l.groupIndices)),e),me(ee(vt(i,t,r),ke(([l,u])=>il(u)),ue(([l,u,d])=>Gn(u.groupOffsetTree,Math.max(l-d,0),"v")[0]),ct(),ue(l=>[l])),s),{groupCounts:o,topItemsIndexes:s}},dt(lr,nn)),jr=qe(([{log:e}])=>{const t=oe(!1),n=kn(ee(t,ke(r=>r),ct()));return Xe(t,r=>{r&&pt(e)("props updated",{},ln.DEBUG)}),{didMount:n,propsReady:t}},dt($r),{singleton:!0}),B2=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function $0(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!B2)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const ys=qe(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:i,fixedHeaderHeight:o,footerHeight:s,headerHeight:a,scrollingInProgress:l,scrollTo:u,smoothScrollTargetReached:d,viewportHeight:c},{log:h}])=>{const p=$e(),m=$e(),b=oe(0);let y=null,E=null,x=null;function _(){y&&(y(),y=null),x&&(x(),x=null),E&&(clearTimeout(E),E=null),Oe(l,!1)}return me(ee(p,Re(n,c,r,b,a,s,h),Re(e,o,i),ue(([[P,R,C,S,O,$,N,W],U,w,D])=>{const M=$0(P),{align:H,behavior:z,offset:G}=M,Q=S-1,k=z0(M,R,Q);let se=Jo(k,R.offsetTree,U)+$;H==="end"?(se+=w+Gn(R.sizeTree,k)[1]-C+D,k===Q&&(se+=N)):H==="center"?se+=(w+Gn(R.sizeTree,k)[1]-C+D)/2:se-=O,G&&(se+=G);const ne=v=>{_(),v?(W("retrying to scroll to",{location:P},ln.DEBUG),Oe(p,P)):(Oe(m,!0),W("list did not change, scroll successful",{},ln.DEBUG))};if(_(),z==="smooth"){let v=!1;x=Xe(t,ye=>{v=v||ye}),y=jn(d,()=>{ne(v)})}else y=jn(ee(t,F2(150)),ne);return E=setTimeout(()=>{_()},1200),Oe(l,!0),W("scrolling from index to",{behavior:z,index:k,top:se},ln.DEBUG),{behavior:z,top:se}})),u),{scrollTargetReached:m,scrollToIndex:p,topListHeight:b}},dt(lr,nn,$r),{singleton:!0});function F2(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function Bc(e,t){e==0?t():requestAnimationFrame(()=>{Bc(e-1,t)})}function Fc(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Ts=qe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:o},{didMount:s}])=>{const a=oe(!0),l=oe(0),u=oe(!0);return me(ee(s,Re(l),ke(([d,c])=>!!c),tr(!1)),a),me(ee(s,Re(l),ke(([d,c])=>!!c),tr(!1)),u),Xe(ee(vt(t,s),Re(a,n,e,u),ke(([[,d],c,{sizeTree:h},p,m])=>d&&(!it(h)||Rc(p))&&!c&&!m),Re(l)),([,d])=>{jn(i,()=>{Oe(u,!0)}),Bc(4,()=>{jn(r,()=>{Oe(a,!0)}),Oe(o,d)})}),{initialItemFinalLocationReached:u,initialTopMostItemIndex:l,scrolledToInitialItem:a}},dt(lr,nn,ys,jr),{singleton:!0});function j0(e,t){return Math.abs(e-t)<1.01}const es="up",Lo="down",H2="none",z2={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},U2=0,xs=qe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:o}])=>{const s=oe(!1),a=oe(!0),l=$e(),u=$e(),d=oe(4),c=oe(U2),h=Wt(ee(_u(ee(_e(i),di(1),tr(!0)),ee(_e(i),di(1),tr(!1),xf(100))),ct()),!1),p=Wt(ee(_u(ee(n,tr(!0)),ee(n,tr(!1),xf(200))),ct()),!1);me(ee(vt(_e(i),_e(c)),ue(([x,_])=>x<=_),ct()),a),me(ee(a,gr(50)),u);const m=kn(ee(vt(r,_e(o),_e(t),_e(e),_e(d)),ir((x,[{scrollHeight:_,scrollTop:P},R,C,S,O])=>{const $=P+R-_>-O,N={scrollHeight:_,scrollTop:P,viewportHeight:R};if($){let U,w;return P>x.state.scrollTop?(U="SCROLLED_DOWN",w=x.state.scrollTop-P):(U="SIZE_DECREASED",w=x.state.scrollTop-P||x.scrollTopDelta),{atBottom:!0,atBottomBecause:U,scrollTopDelta:w,state:N}}let W;return N.scrollHeight>x.state.scrollHeight?W="SIZE_INCREASED":R<x.state.viewportHeight?W="VIEWPORT_HEIGHT_DECREASING":P<x.state.scrollTop?W="SCROLLING_UPWARDS":W="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:W,state:N}},z2),ct((x,_)=>x&&x.atBottom===_.atBottom))),b=Wt(ee(r,ir((x,{scrollHeight:_,scrollTop:P,viewportHeight:R})=>{if(j0(x.scrollHeight,_))return{changed:!1,jump:0,scrollHeight:_,scrollTop:P};{const C=_-(P+R)<1;return x.scrollTop!==P&&C?{changed:!0,jump:x.scrollTop-P,scrollHeight:_,scrollTop:P}:{changed:!0,jump:0,scrollHeight:_,scrollTop:P}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),ke(x=>x.changed),ue(x=>x.jump)),0);me(ee(m,ue(x=>x.atBottom)),s),me(ee(s,gr(50)),l);const y=oe(Lo);me(ee(r,ue(({scrollTop:x})=>x),ct(),ir((x,_)=>pt(p)?{direction:x.direction,prevScrollTop:_}:{direction:_<x.prevScrollTop?es:Lo,prevScrollTop:_},{direction:Lo,prevScrollTop:0}),ue(x=>x.direction)),y),me(ee(r,gr(50),tr(H2)),y);const E=oe(0);return me(ee(h,ke(x=>!x),tr(0)),E),me(ee(i,gr(100),Re(h),ke(([x,_])=>_),ir(([x,_],[P])=>[_,P],[0,0]),ue(([x,_])=>_-x)),E),{atBottomState:m,atBottomStateChange:l,atBottomThreshold:d,atTopStateChange:u,atTopThreshold:c,isAtBottom:s,isAtTop:a,isScrolling:h,lastJumpDueToItemResize:b,scrollDirection:y,scrollVelocity:E}},dt(nn)),ts="top",ns="bottom",Af="none";function Sf(e,t,n){return typeof e=="number"?n===es&&t===ts||n===Lo&&t===ns?e:0:n===es?t===ts?e.main:e.reverse:t===ns?e.main:e.reverse}function Cf(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const Hc=qe(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{const o=$e(),s=oe(0),a=oe(0),l=oe(0),u=Wt(ee(vt(_e(r),_e(i),_e(n),_e(o,Qo),_e(l),_e(s),_e(t),_e(e),_e(a)),ue(([d,c,h,[p,m],b,y,E,x,_])=>{const P=d-x,R=y+E,C=Math.max(h-P,0);let S=Af;const O=Cf(_,ts),$=Cf(_,ns);return p-=x,p+=h+E,m+=h+E,m-=x,p>d+R-O&&(S=es),m<d-C+c+$&&(S=Lo),S!==Af?[Math.max(P-h-Sf(b,ts,S)-O,0),P-C-E+c+Sf(b,ns,S)+$]:null}),ke(d=>d!=null),ct(Qo)),[0,0]);return{increaseViewportBy:a,listBoundary:o,overscan:l,topListHeight:s,visibleRange:u}},dt(nn),{singleton:!0});function $2(e,t,n){if(il(t)){const r=H0(e,t);return[{index:Gn(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n==null?void 0:n[0],index:r,offset:0,size:0}]}return[{data:n==null?void 0:n[0],index:e,offset:0,size:0}]}const Dl={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function ca(e,t,n,r,i,o){const{lastIndex:s,lastOffset:a,lastSize:l}=i;let u=0,d=0;if(e.length>0){u=e[0].offset;const b=e[e.length-1];d=b.offset+b.size}const c=n-s,h=a+c*l+(c-1)*r,p=u,m=h-d;return{bottom:d,firstItemIndex:o,items:vf(e,i,o),offsetBottom:m,offsetTop:u,top:p,topItems:vf(t,i,o),topListHeight:t.reduce((b,y)=>y.size+b,0),totalCount:n}}function V0(e,t,n,r,i,o){let s=0;if(n.groupIndices.length>0)for(const d of n.groupIndices){if(d-s>=e)break;s++}const a=e+s,l=Fc(t,a),u=Array.from({length:a}).map((d,c)=>({data:o[c+l],index:c+l,offset:0,size:0}));return ca(u,[],a,i,n,r)}function vf(e,t,n){if(e.length===0)return[];if(!il(t))return e.map(u=>({...u,index:u.index+n,originalIndex:u.index}));const r=e[0].index,i=e[e.length-1].index,o=[],s=$i(t.groupOffsetTree,r,i);let a,l=0;for(const u of e){(!a||a.end<u.index)&&(a=s.shift(),l=t.groupIndices.indexOf(a.start));let d;u.index===a.start?d={index:l,type:"group"}:d={groupIndex:l,index:u.index-(l+1)+n},o.push({...d,data:u.data,offset:u.offset,originalIndex:u.index,size:u.size})}return o}function If(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const xi=qe(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:i},o,{listBoundary:s,topListHeight:a,visibleRange:l},{initialTopMostItemIndex:u,scrolledToInitialItem:d},{topListHeight:c},h,{didMount:p},{recalcInProgress:m}])=>{const b=oe([]),y=oe(0),E=$e(),x=oe(0);me(o.topItemsIndexes,b);const _=Wt(ee(vt(p,m,_e(l,Qo),_e(i),_e(r),_e(u),d,_e(b),_e(t),_e(n),_e(x),e),ke(([S,O,,$,,,,,,,,N])=>{const W=N&&N.length!==$;return S&&!O&&!W}),ue(([,,[S,O],$,N,W,U,w,D,M,H,z])=>{var G,Q,k,se;const ne=N,{offsetTree:v,sizeTree:ye}=ne,be=pt(y);if($===0)return{...Dl,totalCount:$};if(S===0&&O===0)return be===0?{...Dl,totalCount:$}:V0(be,W,N,D,M,z||[]);if(it(ye))return be>0?null:ca($2(Fc(W,$),ne,z),[],$,M,ne,D);const Ee=[];if(w.length>0){const Ye=w[0],ze=w[w.length-1];let lt=0;for(const nt of $i(ye,Ye,ze)){const Le=nt.value,Ze=Math.max(nt.start,Ye),Ke=Math.min(nt.end,ze);for(let yt=Ze;yt<=Ke;yt++)Ee.push({data:z==null?void 0:z[yt],index:yt,offset:lt,size:Le}),lt+=Le}}if(!U)return ca([],Ee,$,M,ne,D);const Qe=w.length>0?w[w.length-1]+1:0,X=N2(v,S,O,Qe);if(X.length===0)return null;const ce=$-1,Se=rl([],Ye=>{for(const ze of X){const lt=ze.value;let nt=lt.offset,Le=ze.start;const Ze=lt.size;if(lt.offset<S){Le+=Math.floor((S-lt.offset+M)/(Ze+M));const yt=Le-ze.start;nt+=yt*Ze+yt*M}Le<Qe&&(nt+=(Qe-Le)*Ze,Le=Qe);const Ke=Math.min(ze.end,ce);for(let yt=Le;yt<=Ke&&!(nt>=O);yt++)Ye.push({data:z==null?void 0:z[yt],index:yt,offset:nt,size:Ze}),nt+=Ze+M}}),He=If(H,ts),Je=If(H,ns);if(Se.length>0&&(He>0||Je>0)){const Ye=Se[0],ze=Se[Se.length-1];if(He>0&&Ye.index>Qe){const lt=Math.min(He,Ye.index-Qe),nt=[];let Le=Ye.offset;for(let Ze=Ye.index-1;Ze>=Ye.index-lt;Ze--){const Ke=(Q=(G=$i(ye,Ze,Ze)[0])==null?void 0:G.value)!=null?Q:Ye.size;Le-=Ke+M,nt.unshift({data:z==null?void 0:z[Ze],index:Ze,offset:Le,size:Ke})}Se.unshift(...nt)}if(Je>0&&ze.index<ce){const lt=Math.min(Je,ce-ze.index);let nt=ze.offset+ze.size+M;for(let Le=ze.index+1;Le<=ze.index+lt;Le++){const Ze=(se=(k=$i(ye,Le,Le)[0])==null?void 0:k.value)!=null?se:ze.size;Se.push({data:z==null?void 0:z[Le],index:Le,offset:nt,size:Ze}),nt+=Ze+M}}}return ca(Se,Ee,$,M,ne,D)}),ke(S=>S!==null),ct()),Dl);me(ee(e,ke(Rc),ue(S=>S==null?void 0:S.length)),i),me(ee(_,ue(S=>S.topListHeight)),c),me(c,a),me(ee(_,ue(S=>[S.top,S.bottom])),s),me(ee(_,ue(S=>S.items)),E);const P=kn(ee(_,ke(({items:S})=>S.length>0),Re(i,e),ke(([{items:S},O])=>S[S.length-1].originalIndex===O-1),ue(([,S,O])=>[S-1,O]),ct(Qo),ue(([S])=>S))),R=kn(ee(_,gr(200),ke(({items:S,topItems:O})=>S.length>0&&S[0].originalIndex===O.length),ue(({items:S})=>S[0].index),ct())),C=kn(ee(_,ke(({items:S})=>S.length>0),ue(({items:S})=>{let O=0,$=S.length-1;for(;S[O].type==="group"&&O<$;)O++;for(;S[$].type==="group"&&$>O;)$--;return{endIndex:S[$].index,startIndex:S[O].index}}),ct(B0)));return{endReached:P,initialItemCount:y,itemsRendered:E,listState:_,minOverscanItemCount:x,rangeChanged:C,startReached:R,topItemsIndexes:b,...h}},dt(lr,U0,Hc,Ts,ys,xs,jr,Pc),{singleton:!0}),W0=qe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{const o=$e(),s=Wt(ee(vt(n,e,r,t,i),ue(([a,l,u,d,c])=>a+l+u+d+c.offsetBottom+c.bottom)),0);return me(_e(s),o),{totalListHeight:s,totalListHeightChanged:o}},dt(nn,xi),{singleton:!0}),j2=qe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=oe(!1),r=Wt(ee(vt(n,e,t),ke(([i])=>i),ue(([,i,o])=>Math.max(0,i-o)),gr(0),ct()),0);return{alignToBottom:n,paddingTopAddition:r}},dt(nn,W0),{singleton:!0}),Y0=qe(()=>({context:oe(null)})),V2=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:o,viewportTop:s})=>t<s?{...i,align:n??"start",behavior:r}:e>o?{...i,align:n??"end",behavior:r}:null,Z0=qe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:o,scrollingInProgress:s,scrollTop:a,viewportHeight:l},{scrollToIndex:u}])=>{const d=$e();return me(ee(d,Re(t,l,n,o,i,r,a),Re(e),ue(([[c,h,p,m,b,y,E,x],_])=>{const{align:P,behavior:R,calculateViewLocation:C=V2,done:S,...O}=c,$=z0(c,h,m-1),N=Jo($,h.offsetTree,_)+b+y,W=N+Gn(h.sizeTree,$)[1],U=x+y,w=x+p-E,D=C({itemBottom:W,itemTop:N,locationParams:{align:P,behavior:R,...O},viewportBottom:w,viewportTop:U});return D?S&&jn(ee(s,ke(M=>!M),di(pt(s)?1:2)),S):S==null||S(),D}),ke(c=>c!==null)),u),{scrollIntoView:d}},dt(lr,nn,ys,xi,$r),{singleton:!0});function Nf(e){return e?e==="smooth"?"smooth":"auto":!1}const W2=(e,t)=>typeof e=="function"?Nf(e(t)):t&&Nf(e),Y2=qe(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:i,isAtBottom:o},{scrollToIndex:s},{scrolledToInitialItem:a},{didMount:l,propsReady:u},{log:d},{scrollingInProgress:c},{context:h},{scrollIntoView:p}])=>{const m=oe(!1),b=$e();let y=null;function E(R){Oe(s,{align:"end",behavior:R,index:"LAST"})}Xe(ee(vt(ee(_e(t),di(1)),l),Re(_e(m),o,a,c),ue(([[R,C],S,O,$,N])=>{let W=C&&$,U="auto";return W&&(U=W2(S,O||N),W=W&&!!U),{followOutputBehavior:U,shouldFollow:W,totalCount:R}}),ke(({shouldFollow:R})=>R)),({followOutputBehavior:R,totalCount:C})=>{y&&(y(),y=null),pt(n)?requestAnimationFrame(()=>{pt(d)("following output to ",{totalCount:C},ln.DEBUG),E(R)}):y=jn(e,()=>{pt(d)("following output to ",{totalCount:C},ln.DEBUG),E(R),y=null})});function x(R){const C=jn(i,S=>{R&&!S.atBottom&&S.notAtBottomBecause==="SIZE_INCREASED"&&!y&&(pt(d)("scrolling to bottom due to increased size",{},ln.DEBUG),E("auto"))});setTimeout(C,100)}Xe(ee(vt(_e(m),t,u),ke(([R,,C])=>R&&C),ir(({value:R},[,C])=>({refreshed:R===C,value:C}),{refreshed:!1,value:0}),ke(({refreshed:R})=>R),Re(m,t)),([,R])=>{pt(a)&&x(R!==!1)}),Xe(b,()=>{x(pt(m)!==!1)}),Xe(vt(_e(m),i),([R,C])=>{R&&!C.atBottom&&C.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&E("auto")});const _=oe(null),P=$e();return me(_u(ee(_e(r),ue(R=>{var C;return(C=R==null?void 0:R.length)!=null?C:0})),ee(_e(t))),P),Xe(ee(vt(ee(P,di(1)),l),Re(_e(_),a,c,h),ue(([[R,C],S,O,$,N])=>C&&O&&(S==null?void 0:S({context:N,totalCount:R,scrollingInProgress:$}))),ke(R=>!!R),gr(0)),R=>{y&&(y(),y=null),pt(n)?requestAnimationFrame(()=>{pt(d)("scrolling into view",{}),Oe(p,R)}):y=jn(e,()=>{pt(d)("scrolling into view",{}),Oe(p,R),y=null})}),{autoscrollToBottom:b,followOutput:m,scrollIntoViewOnChange:_}},dt(lr,xs,ys,Ts,jr,$r,nn,Y0,Z0)),Z2=qe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:o,listState:s},{didMount:a}])=>(me(ee(a,Re(o),ke(([,l])=>l!==0),Re(i,r,t,n,e),ue(([[,l],u,d,c,h,p=[]])=>V0(l,u,d,c,h,p))),s),{}),dt(lr,Ts,xi,jr),{singleton:!0}),G2=qe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=oe(0);return Xe(ee(e,Re(r),ke(([,i])=>i!==0),ue(([,i])=>({top:i}))),i=>{jn(ee(n,di(1),ke(o=>o.items.length>1)),()=>{requestAnimationFrame(()=>{Oe(t,i)})})}),{initialScrollTop:r}},dt(jr,nn,xi),{singleton:!0}),G0=qe(([{scrollVelocity:e}])=>{const t=oe(!1),n=$e(),r=oe(!1);return me(ee(e,Re(r,t,n),ke(([i,o])=>!!o),ue(([i,o,s,a])=>{const{enter:l,exit:u}=o;if(s){if(u(i,a))return!1}else if(l(i,a))return!0;return s}),ct()),t),Xe(ee(vt(t,e,n),Re(r)),([[i,o,s],a])=>{i&&a&&a.change&&a.change(o,s)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},dt(xs),{singleton:!0}),zc=qe(([{scrollContainerState:e,scrollTo:t}])=>{const n=$e(),r=$e(),i=$e(),o=oe(!1),s=oe(void 0);return me(ee(vt(n,r),ue(([{scrollHeight:a,scrollTop:l,viewportHeight:u},{offsetTop:d}])=>({scrollHeight:a,scrollTop:Math.max(0,l-d),viewportHeight:u}))),e),me(ee(t,Re(r),ue(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),i),{customScrollParent:s,useWindowScroll:o,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},dt(nn)),q2=qe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:o},{useWindowScroll:s,windowScrollContainerState:a,windowViewportRect:l}])=>{const u=$e(),d=oe(void 0),c=oe(null),h=oe(null);return me(a,c),me(l,h),Xe(ee(u,Re(t,r,s,c,h,n)),([p,m,b,y,E,x,_])=>{const P=R2(m.sizeTree);y&&E!==null&&x!==null&&(b=E.scrollTop-x.offsetTop),b-=_,p({ranges:P,scrollTop:b})}),me(ee(d,ke(Rc),ue(K2)),i),me(ee(o,Re(d),ke(([,p])=>p!==void 0),ct(),ue(([,p])=>p.ranges)),e),{getState:u,restoreStateFrom:d}},dt(lr,nn,Ts,jr,zc));function K2(e){return{align:"start",index:0,offset:e.scrollTop}}const X2=qe(([{topItemsIndexes:e}])=>{const t=oe(0);return me(ee(t,ke(n=>n>=0),ue(n=>Array.from({length:n}).map((r,i)=>i))),e),{topItemCount:t}},dt(xi));function q0(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}const Q2=q0(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),J2=qe(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:i,isScrolling:o,lastJumpDueToItemResize:s,scrollDirection:a},{listState:l},{beforeUnshiftWith:u,gap:d,shiftWithOffset:c,sizes:h},{log:p},{recalcInProgress:m}])=>{const b=kn(ee(l,Re(s),ir(([,E,x,_],[{bottom:P,items:R,offsetBottom:C,totalCount:S},O])=>{const $=P+C;let N=0;return x===S&&E.length>0&&R.length>0&&(R[0].originalIndex===0&&E[0].originalIndex===0||(N=$-_,N!==0&&(N+=O))),[N,R,S,$]},[0,[],0,0]),ke(([E])=>E!==0),Re(r,a,n,i,p,m),ke(([,E,x,_,,,P])=>!P&&!_&&E!==0&&x===es),ue(([[E],,,,,x])=>(x("Upward scrolling compensation",{amount:E},ln.DEBUG),E))));function y(E){E>0?(Oe(t,{behavior:"auto",top:-E}),Oe(e,0)):(Oe(e,0),Oe(t,{behavior:"auto",top:-E}))}return Xe(ee(b,Re(e,o)),([E,x,_])=>{_&&Q2()?Oe(e,x-E):y(-E)}),Xe(ee(vt(Wt(o,!1),e,m),ke(([E,x,_])=>!E&&!_&&x!==0),ue(([E,x])=>x),gr(1)),y),me(ee(c,ue(E=>({top:-E}))),t),Xe(ee(u,Re(h,d),ue(([E,{groupIndices:x,lastSize:_,sizeTree:P},R])=>{function C(S){return S*(_+R)}if(x.length===0)return C(E);{let S=0;const O=Xo(P,0);let $=0,N=0;for(;$<E;){$++,S+=O;let W=x.length===N+1?1/0:x[N+1]-x[N]-1;$+W>E&&(S-=O,W=E-$+1),$+=W,S+=C(W),N++}return S}})),E=>{Oe(e,E),requestAnimationFrame(()=>{Oe(t,{top:E}),requestAnimationFrame(()=>{Oe(e,0),Oe(m,!1)})})}),{deviation:e}},dt(nn,xs,xi,lr,$r,Pc)),ek=qe(([e,t,n,r,i,o,s,a,l,u,d])=>({...e,...t,...n,...r,...i,...o,...s,...a,...l,...u,...d}),dt(Hc,Z2,jr,G0,W0,G2,j2,zc,Z0,$r,Y0)),K0=qe(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:i,gap:o,groupIndices:s,heightEstimates:a,itemSize:l,sizeRanges:u,sizes:d,statefulTotalCount:c,totalCount:h,trackItemSizes:p},{initialItemFinalLocationReached:m,initialTopMostItemIndex:b,scrolledToInitialItem:y},E,x,_,P,{scrollToIndex:R},C,{topItemCount:S},{groupCounts:O},$])=>{const{listState:N,minOverscanItemCount:W,topItemsIndexes:U,rangeChanged:w,...D}=P;return me(w,$.scrollSeekRangeChanged),me(ee($.windowViewportRect,ue(M=>M.visibleHeight)),E.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:i,gap:o,groupCounts:O,heightEstimates:a,initialItemFinalLocationReached:m,initialTopMostItemIndex:b,scrolledToInitialItem:y,sizeRanges:u,topItemCount:S,topItemsIndexes:U,totalCount:h,..._,groupIndices:s,itemSize:l,listState:N,minOverscanItemCount:W,scrollToIndex:R,statefulTotalCount:c,trackItemSizes:p,rangeChanged:w,...D,...$,...E,sizes:d,...x}},dt(lr,Ts,nn,q2,Y2,xi,ys,J2,X2,U0,ek));function tk(e,t){const n={},r={};let i=0;const o=e.length;for(;i<o;)r[e[i]]=1,i+=1;for(const s in t)Object.hasOwn(r,s)||(n[s]=t[s]);return n}const $s=typeof document<"u"?F.useLayoutEffect:F.useEffect;function X0(e,t,n){const r=Object.keys(t.required||{}),i=Object.keys(t.optional||{}),o=Object.keys(t.methods||{}),s=Object.keys(t.events||{}),a=F.createContext({});function l(y,E){y.propsReady&&Oe(y.propsReady,!1);for(const x of r){const _=y[t.required[x]];Oe(_,E[x])}for(const x of i)if(x in E){const _=y[t.optional[x]];Oe(_,E[x])}y.propsReady&&Oe(y.propsReady,!0)}function u(y){return o.reduce((E,x)=>(E[x]=_=>{const P=y[t.methods[x]];Oe(P,_)},E),{})}function d(y){return s.reduce((E,x)=>(E[x]=b2(y[t.events[x]]),E),{})}const c=F.forwardRef((y,E)=>{const{children:x,..._}=y,[P]=F.useState(()=>rl(y2(e),S=>{l(S,_)})),[R]=F.useState(Tf(d,P));$s(()=>{for(const S of s)S in _&&Xe(R[S],_[S]);return()=>{Object.values(R).map(Lc)}},[_,R,P]),$s(()=>{l(P,_)}),F.useImperativeHandle(E,yf(u(P)));const C=n;return g.jsx(a.Provider,{value:P,children:n?g.jsx(C,{...tk([...r,...i,...s],_),children:x}):x})}),h=y=>{const E=F.useContext(a);return F.useCallback(x=>{Oe(E[y],x)},[E,y])},p=y=>{const E=F.useContext(a)[y],x=F.useCallback(_=>Xe(E,_),[E]);return F.useSyncExternalStore(x,()=>pt(E),()=>pt(E))},m=y=>{const E=F.useContext(a)[y],[x,_]=F.useState(Tf(pt,E));return $s(()=>Xe(E,P=>{P!==x&&_(yf(P))}),[E,x]),x},b=F.version.startsWith("18")?p:m;return{Component:c,useEmitter:(y,E)=>{const x=F.useContext(a)[y];$s(()=>Xe(x,E),[E,x])},useEmitterValue:b,usePublisher:h}}const Q0=F.createContext(void 0),J0=F.createContext(void 0),eg=typeof document<"u"?F.useLayoutEffect:F.useEffect;function Pl(e){return"self"in e}function nk(e){return"body"in e}function tg(e,t,n,r=no,i,o){const s=F.useRef(null),a=F.useRef(null),l=F.useRef(null),u=F.useCallback(h=>{let p,m,b;const y=h.target;if(nk(y)||Pl(y)){const x=Pl(y)?y:y.defaultView;b=o?x.scrollX:x.scrollY,p=o?x.document.documentElement.scrollWidth:x.document.documentElement.scrollHeight,m=o?x.innerWidth:x.innerHeight}else b=o?y.scrollLeft:y.scrollTop,p=o?y.scrollWidth:y.scrollHeight,m=o?y.offsetWidth:y.offsetHeight;const E=()=>{e({scrollHeight:p,scrollTop:Math.max(b,0),viewportHeight:m})};h.suppressFlushSync?E():Sm.flushSync(E),a.current!==null&&(b===a.current||b<=0||b===p-m)&&(a.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,o]);F.useEffect(()=>{const h=i||s.current;return r(i||s.current),u({suppressFlushSync:!0,target:h}),h.addEventListener("scroll",u,{passive:!0}),()=>{r(null),h.removeEventListener("scroll",u)}},[s,u,n,r,i]);function d(h){const p=s.current;if(!p||(o?"offsetWidth"in p&&p.offsetWidth===0:"offsetHeight"in p&&p.offsetHeight===0))return;const m=h.behavior==="smooth";let b,y,E;Pl(p)?(y=Math.max(Pr(p.document.documentElement,o?"width":"height"),o?p.document.documentElement.scrollWidth:p.document.documentElement.scrollHeight),b=o?p.innerWidth:p.innerHeight,E=o?window.scrollX:window.scrollY):(y=p[o?"scrollWidth":"scrollHeight"],b=Pr(p,o?"width":"height"),E=p[o?"scrollLeft":"scrollTop"]);const x=y-b;if(h.top=Math.ceil(Math.max(Math.min(x,h.top),0)),j0(b,y)||h.top===E){e({scrollHeight:y,scrollTop:E,viewportHeight:b}),m&&t(!0);return}m?(a.current=h.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,a.current=null,t(!0)},1e3)):a.current=null,o&&(h={behavior:h.behavior,left:h.top}),p.scrollTo(h)}function c(h){o&&(h={behavior:h.behavior,left:h.top}),s.current.scrollBy(h)}return{scrollByCallback:c,scrollerRef:s,scrollToCallback:d}}const Ml="-webkit-sticky",Of="sticky",Uc=q0(()=>{if(typeof document>"u")return Of;const e=document.createElement("div");return e.style.position=Ml,e.style.position===Ml?Ml:Of});function $c(e){return e}const rk=qe(()=>{const e=oe(a=>`Item ${a}`),t=oe(a=>`Group ${a}`),n=oe({}),r=oe($c),i=oe("div"),o=oe(no),s=(a,l=null)=>Wt(ee(n,ue(u=>u[a]),ct()),l);return{components:n,computeItemKey:r,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:t,HeaderComponent:s("Header"),HeaderFooterTag:i,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:o,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),ik=qe(([e,t])=>({...e,...t}),dt(K0,rk)),ok=({height:e})=>g.jsx("div",{style:{height:e}}),sk={overflowAnchor:"none",position:Uc(),zIndex:1},ng={overflowAnchor:"none"},ak={...ng,display:"inline-block",height:"100%"},Rf=F.memo(function({showTopList:e=!1}){const t=Ae("listState"),n=Rn("sizeRanges"),r=Ae("useWindowScroll"),i=Ae("customScrollParent"),o=Rn("windowScrollContainerState"),s=Rn("scrollContainerState"),a=i||r?o:s,l=Ae("itemContent"),u=Ae("context"),d=Ae("groupContent"),c=Ae("trackItemSizes"),h=Ae("itemSize"),p=Ae("log"),m=Rn("gap"),b=Ae("horizontalDirection"),{callbackRef:y}=_2(n,h,c,e?no:a,p,m,i,b,Ae("skipAnimationFrameInResizeObserver")),[E,x]=F.useState(0);jc("deviation",D=>{E!==D&&x(D)});const _=Ae("EmptyPlaceholder"),P=Ae("ScrollSeekPlaceholder")||ok,R=Ae("ListComponent"),C=Ae("ItemComponent"),S=Ae("GroupComponent"),O=Ae("computeItemKey"),$=Ae("isSeeking"),N=Ae("groupIndices").length>0,W=Ae("alignToBottom"),U=Ae("initialItemFinalLocationReached"),w=e?{}:{boxSizing:"border-box",...b?{display:"inline-block",height:"100%",marginLeft:E!==0?E:W?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:E!==0?E:W?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...U?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&_?g.jsx(_,{...Vt(_,u)}):g.jsx(R,{...Vt(R,u),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:y,style:w,children:(e?t.topItems:t.items).map(D=>{const M=D.originalIndex,H=O(M+t.firstItemIndex,D.data,u);return $?T.createElement(P,{...Vt(P,u),height:D.size,index:D.index,key:H,type:D.type||"item",...D.type==="group"?{}:{groupIndex:D.groupIndex}}):D.type==="group"?T.createElement(S,{...Vt(S,u),"data-index":M,"data-item-index":D.index,"data-known-size":D.size,key:H,style:sk},d(D.index,u)):T.createElement(C,{...Vt(C,u),...dk(C,D.data),"data-index":M,"data-item-group-index":D.groupIndex,"data-item-index":D.index,"data-known-size":D.size,key:H,style:b?ak:ng},N?l(D.index,D.groupIndex,D.data,u):l(D.index,D.data,u))})})}),lk={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},uk={outline:"none",overflowX:"auto",position:"relative"},ol=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),ck={position:Uc(),top:0,width:"100%",zIndex:1};function Vt(e,t){if(typeof e!="string")return{context:t}}function dk(e,t){return{item:typeof e=="string"?void 0:t}}const fk=F.memo(function(){const e=Ae("HeaderComponent"),t=Rn("headerHeight"),n=Ae("HeaderFooterTag"),r=Ti(F.useMemo(()=>o=>{t(Pr(o,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),i=Ae("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...Vt(e,i)})}):null}),hk=F.memo(function(){const e=Ae("FooterComponent"),t=Rn("footerHeight"),n=Ae("HeaderFooterTag"),r=Ti(F.useMemo(()=>o=>{t(Pr(o,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),i=Ae("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...Vt(e,i)})}):null});function rg({useEmitter:e,useEmitterValue:t,usePublisher:n}){return F.memo(function({children:r,style:i,context:o,...s}){const a=n("scrollContainerState"),l=t("ScrollerComponent"),u=n("smoothScrollTargetReached"),d=t("scrollerRef"),c=t("horizontalDirection")||!1,{scrollByCallback:h,scrollerRef:p,scrollToCallback:m}=tg(a,u,l,d,void 0,c);return e("scrollTo",m),e("scrollBy",h),g.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...c?uk:lk,...i},tabIndex:0,...s,...Vt(l,o),children:r})})}function ig({useEmitter:e,useEmitterValue:t,usePublisher:n}){return F.memo(function({children:r,style:i,context:o,...s}){const a=n("windowScrollContainerState"),l=t("ScrollerComponent"),u=n("smoothScrollTargetReached"),d=t("totalListHeight"),c=t("deviation"),h=t("customScrollParent"),p=F.useRef(null),m=t("scrollerRef"),{scrollByCallback:b,scrollerRef:y,scrollToCallback:E}=tg(a,u,l,m,h);return eg(()=>{var x;return y.current=h||((x=p.current)==null?void 0:x.ownerDocument.defaultView),()=>{y.current=null}},[y,h]),e("windowScrollTo",E),e("scrollBy",b),g.jsx(l,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...i,...d!==0?{height:d+c}:{}},...s,...Vt(l,o),children:r})})}const pk=({children:e})=>{const t=F.useContext(Q0),n=Rn("viewportHeight"),r=Rn("fixedItemHeight"),i=Ae("alignToBottom"),o=Ae("horizontalDirection"),s=F.useMemo(()=>I0(n,l=>Pr(l,o?"width":"height")),[n,o]),a=Ti(s,!0,Ae("skipAnimationFrameInResizeObserver"));return F.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),g.jsx("div",{"data-viewport-type":"element",ref:a,style:ol(i),children:e})},mk=({children:e})=>{const t=F.useContext(Q0),n=Rn("windowViewportRect"),r=Rn("fixedItemHeight"),i=Ae("customScrollParent"),o=O0(n,i,Ae("skipAnimationFrameInResizeObserver")),s=Ae("alignToBottom");return F.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),g.jsx("div",{"data-viewport-type":"window",ref:o,style:ol(s),children:e})},gk=({children:e})=>{const t=Ae("TopItemListComponent")||"div",n=Ae("headerHeight"),r={...ck,marginTop:`${n}px`},i=Ae("context");return g.jsx(t,{style:r,...Vt(t,i),children:e})},bk=F.memo(function(e){const t=Ae("useWindowScroll"),n=Ae("topItemsIndexes").length>0,r=Ae("customScrollParent"),i=Ae("context");return g.jsxs(r||t?Tk:yk,{...e,context:i,children:[n&&g.jsx(gk,{children:g.jsx(Rf,{showTopList:!0})}),g.jsxs(r||t?mk:pk,{children:[g.jsx(fk,{}),g.jsx(Rf,{}),g.jsx(hk,{})]})]})}),{Component:Ek,useEmitter:jc,useEmitterValue:Ae,usePublisher:Rn}=X0(ik,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},bk),yk=rg({useEmitter:jc,useEmitterValue:Ae,usePublisher:Rn}),Tk=ig({useEmitter:jc,useEmitterValue:Ae,usePublisher:Rn}),xk=Ek,_k=qe(()=>{const e=oe(u=>g.jsxs("td",{children:["Item $",u]})),t=oe(null),n=oe(u=>g.jsxs("td",{colSpan:1e3,children:["Group ",u]})),r=oe(null),i=oe(null),o=oe({}),s=oe($c),a=oe(no),l=(u,d=null)=>Wt(ee(o,ue(c=>c[u]),ct()),d);return{components:o,computeItemKey:s,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:i,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}});dt(K0,_k);Uc();const Lf={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},kk={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:Df,floor:Ia,max:Do,min:Bl,round:Pf}=Math;function Mf(e,t,n){return Array.from({length:t-e+1}).map((r,i)=>({data:n===null?null:n[i+e],index:i+e}))}function wk(e){return{...kk,items:e}}function js(e,t){return e&&e.width===t.width&&e.height===t.height}function Ak(e,t){return e&&e.column===t.column&&e.row===t.row}const Sk=qe(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:i,headerHeight:o,scrollBy:s,scrollContainerState:a,scrollTo:l,scrollTop:u,smoothScrollTargetReached:d,viewportHeight:c},h,p,{didMount:m,propsReady:b},{customScrollParent:y,useWindowScroll:E,windowScrollContainerState:x,windowScrollTo:_,windowViewportRect:P},R])=>{const C=oe(0),S=oe(0),O=oe(Lf),$=oe({height:0,width:0}),N=oe({height:0,width:0}),W=$e(),U=$e(),w=oe(0),D=oe(null),M=oe({column:0,row:0}),H=$e(),z=$e(),G=oe(!1),Q=oe(0),k=oe(!0),se=oe(!1),ne=oe(!1);Xe(ee(m,Re(Q),ke(([X,ce])=>!!ce)),()=>{Oe(k,!1)}),Xe(ee(vt(m,k,N,$,Q,se),ke(([X,ce,Se,He,,Je])=>X&&!ce&&Se.height!==0&&He.height!==0&&!Je)),([,,,,X])=>{Oe(se,!0),Bc(1,()=>{Oe(W,X)}),jn(ee(u),()=>{Oe(t,[0,0]),Oe(k,!0)})}),me(ee(z,ke(X=>X!=null&&X.scrollTop>0),tr(0)),S),Xe(ee(m,Re(z),ke(([,X])=>X!=null)),([,X])=>{X&&(Oe($,X.viewport),Oe(N,X.item),Oe(M,X.gap),X.scrollTop>0&&(Oe(G,!0),jn(ee(u,di(1)),ce=>{Oe(G,!1)}),Oe(l,{top:X.scrollTop})))}),me(ee($,ue(({height:X})=>X)),c),me(ee(vt(_e($,js),_e(N,js),_e(M,(X,ce)=>X&&X.column===ce.column&&X.row===ce.row),_e(u)),ue(([X,ce,Se,He])=>({gap:Se,item:ce,scrollTop:He,viewport:X}))),H),me(ee(vt(_e(C),r,_e(M,Ak),_e(N,js),_e($,js),_e(D),_e(S),_e(G),_e(k),_e(Q)),ke(([,,,,,,,X])=>!X),ue(([X,[ce,Se],He,Je,Ye,ze,lt,,nt,Le])=>{const{column:Ze,row:Ke}=He,{height:yt,width:Gr}=Je,{width:Dt}=Ye;if(lt===0&&(X===0||Dt===0))return Lf;if(Gr===0){const Ht=Fc(Le,X),Ut=Ht+Math.max(lt-1,0);return wk(Mf(Ht,Ut,ze))}const dn=og(Dt,Gr,Ze);let Kn,Fn;nt?ce===0&&Se===0&<>0?(Kn=0,Fn=lt-1):(Kn=dn*Ia((ce+Ke)/(yt+Ke)),Fn=dn*Df((Se+Ke)/(yt+Ke))-1,Fn=Bl(X-1,Do(Fn,dn-1)),Kn=Bl(Fn,Do(0,Kn))):(Kn=0,Fn=-1);const q=Mf(Kn,Fn,ze),{bottom:ae,top:xe}=Bf(Ye,He,Je,q),Ce=Df(X/dn),Be=Ce*yt+(Ce-1)*Ke-ae;return{bottom:ae,itemHeight:yt,items:q,itemWidth:Gr,offsetBottom:Be,offsetTop:xe,top:xe}})),O),me(ee(D,ke(X=>X!==null),ue(X=>X.length)),C),me(ee(vt($,N,O,M),ke(([X,ce,{items:Se}])=>Se.length>0&&ce.height!==0&&X.height!==0),ue(([X,ce,{items:Se},He])=>{const{bottom:Je,top:Ye}=Bf(X,He,ce,Se);return[Ye,Je]}),ct(Qo)),t);const v=oe(!1);me(ee(u,Re(v),ue(([X,ce])=>ce||X!==0)),v);const ye=kn(ee(vt(O,C),ke(([{items:X}])=>X.length>0),Re(v),ke(([[X,ce],Se])=>{const He=X.items[X.items.length-1].index===ce-1;return(Se||X.bottom>0&&X.itemHeight>0&&X.offsetBottom===0&&X.items.length===ce)&&He}),ue(([[,X]])=>X-1),ct())),be=kn(ee(_e(O),ke(({items:X})=>X.length>0&&X[0].index===0),tr(0),ct())),Ee=kn(ee(_e(O),Re(G),ke(([{items:X},ce])=>X.length>0&&!ce),ue(([{items:X}])=>({endIndex:X[X.length-1].index,startIndex:X[0].index})),ct(B0),gr(0)));me(Ee,p.scrollSeekRangeChanged),me(ee(W,Re($,N,C,M),ue(([X,ce,Se,He,Je])=>{const Ye=$0(X),{align:ze,behavior:lt,offset:nt}=Ye;let Le=Ye.index;Le==="LAST"&&(Le=He-1),Le=Do(0,Le,Bl(He-1,Le));let Ze=Cu(ce,Je,Se,Le);return ze==="end"?Ze=Pf(Ze-ce.height+Se.height):ze==="center"&&(Ze=Pf(Ze-ce.height/2+Se.height/2)),nt&&(Ze+=nt),{behavior:lt,top:Ze}})),l);const Qe=Wt(ee(O,ue(X=>X.offsetBottom+X.bottom)),0);return me(ee(P,ue(X=>({height:X.visibleHeight,width:X.visibleWidth}))),$),{customScrollParent:y,data:D,deviation:w,footerHeight:i,gap:M,headerHeight:o,increaseViewportBy:e,initialItemCount:S,itemDimensions:N,overscan:n,restoreStateFrom:z,scrollBy:s,scrollContainerState:a,scrollHeight:U,scrollTo:l,scrollToIndex:W,scrollTop:u,smoothScrollTargetReached:d,totalCount:C,useWindowScroll:E,viewportDimensions:$,windowScrollContainerState:x,windowScrollTo:_,windowViewportRect:P,...p,gridState:O,horizontalDirection:ne,initialTopMostItemIndex:Q,totalListHeight:Qe,...h,endReached:ye,propsReady:b,rangeChanged:Ee,startReached:be,stateChanged:H,stateRestoreInProgress:G,...R}},dt(Hc,nn,xs,G0,jr,zc,$r));function og(e,t,n){return Do(1,Ia((e+n)/(Ia(t)+n)))}function Bf(e,t,n,r){const{height:i}=n;if(i===void 0||r.length===0)return{bottom:0,top:0};const o=Cu(e,t,n,r[0].index);return{bottom:Cu(e,t,n,r[r.length-1].index)+i,top:o}}function Cu(e,t,n,r){const i=og(e.width,n.width,t.column),o=Ia(r/i),s=o*n.height+Do(0,o-1)*t.row;return s>0?s+t.row:s}const Ck=qe(()=>{const e=oe(c=>`Item ${c}`),t=oe({}),n=oe(null),r=oe("virtuoso-grid-item"),i=oe("virtuoso-grid-list"),o=oe($c),s=oe("div"),a=oe(no),l=(c,h=null)=>Wt(ee(t,ue(p=>p[c]),ct()),h),u=oe(!1),d=oe(!1);return me(_e(d),u),{components:t,computeItemKey:o,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:s,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:i,ListComponent:l("List","div"),readyStateChanged:u,reportReadyState:d,ScrollerComponent:l("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),vk=qe(([e,t])=>({...e,...t}),dt(Sk,Ck)),Ik=F.memo(function(){const e=ht("gridState"),t=ht("listClassName"),n=ht("itemClassName"),r=ht("itemContent"),i=ht("computeItemKey"),o=ht("isSeeking"),s=Ln("scrollHeight"),a=ht("ItemComponent"),l=ht("ListComponent"),u=ht("ScrollSeekPlaceholder"),d=ht("context"),c=Ln("itemDimensions"),h=Ln("gap"),p=ht("log"),m=ht("stateRestoreInProgress"),b=Ln("reportReadyState"),y=Ti(F.useMemo(()=>E=>{const x=E.parentElement.parentElement.scrollHeight;s(x);const _=E.firstChild;if(_){const{height:P,width:R}=_.getBoundingClientRect();c({height:P,width:R})}h({column:Ff("column-gap",getComputedStyle(E).columnGap,p),row:Ff("row-gap",getComputedStyle(E).rowGap,p)})},[s,c,h,p]),!0,!1);return eg(()=>{e.itemHeight>0&&e.itemWidth>0&&b(!0)},[e]),m?null:g.jsx(l,{className:t,ref:y,...Vt(l,d),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(E=>{const x=i(E.index,E.data,d);return o?g.jsx(u,{...Vt(u,d),height:e.itemHeight,index:E.index,width:e.itemWidth},x):T.createElement(a,{...Vt(a,d),className:n,"data-index":E.index,key:x},r(E.index,E.data,d))})})}),Nk=F.memo(function(){const e=ht("HeaderComponent"),t=Ln("headerHeight"),n=ht("headerFooterTag"),r=Ti(F.useMemo(()=>o=>{t(Pr(o,"height"))},[t]),!0,!1),i=ht("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...Vt(e,i)})}):null}),Ok=F.memo(function(){const e=ht("FooterComponent"),t=Ln("footerHeight"),n=ht("headerFooterTag"),r=Ti(F.useMemo(()=>o=>{t(Pr(o,"height"))},[t]),!0,!1),i=ht("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...Vt(e,i)})}):null}),Rk=({children:e})=>{const t=F.useContext(J0),n=Ln("itemDimensions"),r=Ln("viewportDimensions"),i=Ti(F.useMemo(()=>o=>{r(o.getBoundingClientRect())},[r]),!0,!1);return F.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),g.jsx("div",{ref:i,style:ol(!1),children:e})},Lk=({children:e})=>{const t=F.useContext(J0),n=Ln("windowViewportRect"),r=Ln("itemDimensions"),i=ht("customScrollParent"),o=O0(n,i,!1);return F.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),g.jsx("div",{ref:o,style:ol(!1),children:e})},Dk=F.memo(function({...e}){const t=ht("useWindowScroll"),n=ht("customScrollParent"),r=n||t?Mk:Pk,i=n||t?Lk:Rk,o=ht("context");return g.jsx(r,{...e,...Vt(r,o),children:g.jsxs(i,{children:[g.jsx(Nk,{}),g.jsx(Ik,{}),g.jsx(Ok,{})]})})}),{useEmitter:sg,useEmitterValue:ht,usePublisher:Ln}=X0(vk,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},Dk),Pk=rg({useEmitter:sg,useEmitterValue:ht,usePublisher:Ln}),Mk=ig({useEmitter:sg,useEmitterValue:ht,usePublisher:Ln});function Ff(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,ln.WARN),t==="normal"?0:parseInt(t??"0",10)}const Bk="modulepreload",Fk=function(e){return"/"+e},Hf={},rs=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let s=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(c=>({status:"fulfilled",value:c}),c=>({status:"rejected",reason:c}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=s(n.map(u=>{if(u=Fk(u),u in Hf)return;Hf[u]=!0;const d=u.endsWith(".css"),c=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${c}`))return;const h=document.createElement("link");if(h.rel=d?"stylesheet":Bk,d||(h.as="script"),h.crossOrigin="",h.href=u,l&&h.setAttribute("nonce",l),document.head.appendChild(h),d)return new Promise((p,m)=>{h.addEventListener("load",p),h.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return i.then(s=>{for(const a of s||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})};function Hk(e){const t=Uk(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let i=0;i<n.byteLength;i++)r.setUint8(i,t.charCodeAt(i));return n}const zk="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Uk(e){e.length%4===0&&(e=e.replace(/==?$/,""));let t="",n=0,r=0;for(let i=0;i<e.length;i++)n<<=6,n|=zk.indexOf(e[i]),r+=6,r===24&&(t+=String.fromCharCode((n&16711680)>>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}const $k=-1,jk=-2,Vk=-3,Wk=-4,Yk=-5,Zk=-6,Gk=-7;function qk(e,t){return ag(JSON.parse(e),t)}function ag(e,t){if(typeof e=="number")return o(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);let i=null;function o(s,a=!1){if(s===$k)return;if(s===Vk)return NaN;if(s===Wk)return 1/0;if(s===Yk)return-1/0;if(s===Zk)return-0;if(a||typeof s!="number")throw new Error("Invalid input");if(s in r)return r[s];const l=n[s];if(!l||typeof l!="object")r[s]=l;else if(Array.isArray(l))if(typeof l[0]=="string"){const u=l[0],d=t&&Object.hasOwn(t,u)?t[u]:void 0;if(d){let c=l[1];if(typeof c!="number"&&(c=n.push(l[1])-1),i??(i=new Set),i.has(c))throw new Error("Invalid circular reference");return i.add(c),r[s]=d(o(c)),i.delete(c),r[s]}switch(u){case"Date":r[s]=new Date(l[1]);break;case"Set":const c=new Set;r[s]=c;for(let m=1;m<l.length;m+=1)c.add(o(l[m]));break;case"Map":const h=new Map;r[s]=h;for(let m=1;m<l.length;m+=2)h.set(o(l[m]),o(l[m+1]));break;case"RegExp":r[s]=new RegExp(l[1],l[2]);break;case"Object":r[s]=Object(l[1]);break;case"BigInt":r[s]=BigInt(l[1]);break;case"null":const p=Object.create(null);r[s]=p;for(let m=1;m<l.length;m+=2)p[l[m]]=o(l[m+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{if(n[l[1]][0]!=="ArrayBuffer")throw new Error("Invalid data");const m=globalThis[u],b=o(l[1]),y=new m(b);r[s]=l[2]!==void 0?y.subarray(l[2],l[3]):y;break}case"ArrayBuffer":{const m=l[1];if(typeof m!="string")throw new Error("Invalid ArrayBuffer encoding");const b=Hk(m);r[s]=b;break}case"Temporal.Duration":case"Temporal.Instant":case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.PlainMonthDay":case"Temporal.PlainYearMonth":case"Temporal.ZonedDateTime":{const m=u.slice(9);r[s]=Temporal[m].from(l[1]);break}case"URL":{const m=new URL(l[1]);r[s]=m;break}case"URLSearchParams":{const m=new URLSearchParams(l[1]);r[s]=m;break}default:throw new Error(`Unknown type ${u}`)}}else if(l[0]===Gk){const u=l[1],d=new Array(u);r[s]=d;for(let c=2;c<l.length;c+=2){const h=l[c];d[h]=o(l[c+1])}}else{const u=new Array(l.length);r[s]=u;for(let d=0;d<l.length;d+=1){const c=l[d];c!==jk&&(u[d]=o(c))}}else{const u={};r[s]=u;for(const d of Object.keys(l)){if(d==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");const c=l[d];u[d]=o(c)}}return r[s]}return o(0)}const is={DEVALUE_V1:"devl",ENCRYPTED:"encr"},Pi=4;new TextEncoder;const lg=new TextDecoder;function Vc(e){if(!(e instanceof Uint8Array))return{format:is.DEVALUE_V1,payload:new TextEncoder().encode(JSON.stringify(e))};if(e.length<Pi)throw new Error(`Data too short to contain format prefix: expected at least ${Pi} bytes, got ${e.length}`);const t=e.subarray(0,Pi),n=lg.decode(t),r=Object.values(is);if(!r.includes(n))throw new Error(`Unknown serialization format: "${n}". Known formats: ${r.join(", ")}`);const i=e.subarray(Pi);return{format:n,payload:i}}function zf(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;const t=Object.keys(e);return t.length===1&&t[0]==="expiredAt"&&typeof e.expiredAt=="string"}function ug(e){return!!(zf(e)||Array.isArray(e)&&e.length===1&&zf(e[0]))}function sl(e){return!(e instanceof Uint8Array)||e.length<Pi?!1:lg.decode(e.subarray(0,Pi))===is.ENCRYPTED}function Tn(e,t){if(e instanceof Uint8Array){if(sl(e))return e;const{format:n,payload:r}=Vc(e);if(n===is.DEVALUE_V1){const i=new TextDecoder().decode(r);return qk(i,t)}throw new Error(`Unsupported serialization format: ${n}`)}return Array.isArray(e)?ag(e,t):e}async function Kk(e,t,n){if(e instanceof Uint8Array&&sl(e)&&n){const{decrypt:r}=await rs(async()=>{const{decrypt:s}=await import("./encryption-8OvC6eoJ.js");return{decrypt:s}},[]),{payload:i}=Vc(e),o=await r(n,i);return Tn(o,t)}return Tn(e,t)}const Fl="strm_",cg="__workflow_stream_ref__",dg="__workflow_class_instance_ref__";class fg{constructor(t,n,r){Ge(this,"className");Ge(this,"classId");Ge(this,"data");Ge(this,"__type",dg);this.className=t,this.classId=n,this.data=r}toJSON(){return{__type:this.__type,className:this.className,classId:this.classId,data:this.data}}}const da=e=>{let t;if("name"in e){const n=String(e.name);n.startsWith(Fl)?t=n:t=`${Fl}${n}`}else t=`${Fl}null`;return{__type:cg,streamId:t}},hg=e=>!e||typeof e!="object"?"null":"stepId"in e?`<step:${e.stepId}>`:"<function>",os=e=>{if(!e)return"Unknown";const t=e.split("/");return t[t.length-1]||e},pg=e=>new fg(os(e.classId),e.classId,e.data),mg=e=>`<class:${os(e.classId)}>`,gg={ReadableStream:da,WritableStream:da,TransformStream:da,StepFunction:hg,WorkflowFunction:e=>`<workflow:${e.workflowId}>`,Instance:pg,Class:mg};function Xk(e,t){let n=e.input,r=e.output;if(e.input!=null)try{n=Tn(e.input,t)}catch{}if(e.output!=null)try{r=Tn(e.output,t)}catch{}return{...e,input:n,output:r}}function Qk(e,t){let n=e.input,r=e.output;if(e.input!=null)try{n=Tn(e.input,t)}catch{}if(e.output!=null)try{r=Tn(e.output,t)}catch{}return{...e,input:n,output:r}}function Jk(e,t){if(!e.eventData)return e;const n={...e.eventData};if("result"in n&&n.result!=null)try{n.result=Tn(n.result,t)}catch{}if("input"in n&&n.input!=null)try{n.input=Tn(n.input,t)}catch{}if("output"in n&&n.output!=null)try{n.output=Tn(n.output,t)}catch{}if("metadata"in n&&n.metadata!=null)try{n.metadata=Tn(n.metadata,t)}catch{}if("payload"in n&&n.payload!=null)try{n.payload=Tn(n.payload,t)}catch{}return{...e,eventData:n}}function ew(e,t){if(e.metadata==null)return e;let n=e.metadata;try{n=Tn(e.metadata,t)}catch{}return{...e,metadata:n}}function bg(e,t){if(!e)return e;let n;if("stepId"in e?n=Xk(e,t):"hookId"in e?n=ew(e,t):"eventId"in e?n=Jk(e,t):n=Qk(e,t),"executionContext"in n){const{executionContext:r,...i}=n,o=r&&typeof r=="object"&&"workflowCoreVersion"in r?r.workflowCoreVersion:void 0;return o?{...i,workflowCoreVersion:o}:i}return n}const tw=Object.freeze(Object.defineProperty({__proto__:null,CLASS_INSTANCE_REF_TYPE:dg,ClassInstanceRef:fg,STREAM_REF_TYPE:cg,SerializationFormat:is,decodeFormatPrefix:Vc,extractClassName:os,hydrateData:Tn,hydrateDataWithKey:Kk,hydrateResourceIO:bg,isEncryptedData:sl,isExpiredStub:ug,observabilityRevivers:gg,serializedClassToString:mg,serializedInstanceToRef:pg,serializedStepFunctionToString:hg,streamToStreamRef:da},Symbol.toStringTag,{value:"Module"}));function Z(e,t,n){function r(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,l);const u=s.prototype,d=Object.keys(u);for(let c=0;c<d.length;c++){const h=d[c];h in a||(a[h]=u[h].bind(a))}}const i=(n==null?void 0:n.Parent)??Object;class o extends i{}Object.defineProperty(o,"name",{value:e});function s(a){var l;const u=n!=null&&n.Parent?new o:this;r(u,a),(l=u._zod).deferred??(l.deferred=[]);for(const d of u._zod.deferred)d();return u}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>{var l,u;return n!=null&&n.Parent&&a instanceof n.Parent?!0:(u=(l=a==null?void 0:a._zod)==null?void 0:l.traits)==null?void 0:u.has(e)}}),Object.defineProperty(s,"name",{value:e}),s}class ji extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Eg extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const yg={};function Mr(e){return yg}function Tg(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}function vu(e,t){return typeof t=="bigint"?t.toString():t}function al(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Wc(e){return e==null}function Yc(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function nw(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let i=(r.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(r)){const l=r.match(/\d?e-(\d?)/);l!=null&&l[1]&&(i=Number.parseInt(l[1]))}const o=n>i?n:i,s=Number.parseInt(e.toFixed(o).replace(".","")),a=Number.parseInt(t.toFixed(o).replace(".",""));return s%a/10**o}const Uf=Symbol("evaluating");function je(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Uf)return r===void 0&&(r=Uf,r=n()),r},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function _i(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Vr(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function $f(e){return JSON.stringify(e)}function rw(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const xg="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ss(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const iw=al(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function qi(e){if(ss(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(ss(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function _g(e){return qi(e)?{...e}:Array.isArray(e)?[...e]:e}const ow=new Set(["string","number","symbol"]),sw=new Set(["string","number","bigint","boolean","symbol","undefined"]);function fi(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Wr(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function pe(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function aw(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const lw={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function uw(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=Vr(e._zod.def,{get shape(){const s={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=n.shape[a])}return _i(this,"shape",s),s},checks:[]});return Wr(e,o)}function cw(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=Vr(e._zod.def,{get shape(){const s={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return _i(this,"shape",s),s},checks:[]});return Wr(e,o)}function dw(e,t){if(!qi(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=e._zod.def.shape;for(const s in t)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=Vr(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return _i(this,"shape",o),o}});return Wr(e,i)}function fw(e,t){if(!qi(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Vr(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return _i(this,"shape",r),r}});return Wr(e,n)}function hw(e,t){const n=Vr(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return _i(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Wr(e,n)}function pw(e,t,n){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const s=Vr(t._zod.def,{get shape(){const a=t._zod.def.shape,l={...a};if(n)for(const u in n){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(l[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(const u in a)l[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return _i(this,"shape",l),l},checks:[]});return Wr(t,s)}function mw(e,t,n){const r=Vr(t._zod.def,{get shape(){const i=t._zod.def.shape,o={...i};if(n)for(const s in n){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(o[s]=new e({type:"nonoptional",innerType:i[s]}))}else for(const s in i)o[s]=new e({type:"nonoptional",innerType:i[s]});return _i(this,"shape",o),o}});return Wr(t,r)}function Mi(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function Bi(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Vs(e){return typeof e=="string"?e:e==null?void 0:e.message}function Br(e,t,n){var i,o,s,a,l,u;const r={...e,path:e.path??[]};if(!e.message){const d=Vs((s=(o=(i=e.inst)==null?void 0:i._zod.def)==null?void 0:o.error)==null?void 0:s.call(o,e))??Vs((a=t==null?void 0:t.error)==null?void 0:a.call(t,e))??Vs((l=n.customError)==null?void 0:l.call(n,e))??Vs((u=n.localeError)==null?void 0:u.call(n,e))??"Invalid input";r.message=d}return delete r.inst,delete r.continue,t!=null&&t.reportInput||delete r.input,r}function Zc(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function as(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const kg=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,vu,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},wg=Z("$ZodError",kg),Ag=Z("$ZodError",kg,{Parent:Error});function gw(e,t=n=>n.message){const n={},r=[];for(const i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function bw(e,t=n=>n.message){const n={_errors:[]},r=i=>{for(const o of i.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(s=>r({issues:s}));else if(o.code==="invalid_key")r({issues:o.issues});else if(o.code==="invalid_element")r({issues:o.issues});else if(o.path.length===0)n._errors.push(t(o));else{let s=n,a=0;for(;a<o.path.length;){const l=o.path[a];a===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(t(o))):s[l]=s[l]||{_errors:[]},s=s[l],a++}}};return r(e),n}const Gc=e=>(t,n,r,i)=>{const o=r?Object.assign(r,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new ji;if(s.issues.length){const a=new((i==null?void 0:i.Err)??e)(s.issues.map(l=>Br(l,o,Mr())));throw xg(a,i==null?void 0:i.callee),a}return s.value},qc=e=>async(t,n,r,i)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){const a=new((i==null?void 0:i.Err)??e)(s.issues.map(l=>Br(l,o,Mr())));throw xg(a,i==null?void 0:i.callee),a}return s.value},ll=e=>(t,n,r)=>{const i=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new ji;return o.issues.length?{success:!1,error:new(e??wg)(o.issues.map(s=>Br(s,i,Mr())))}:{success:!0,data:o.value}},Ew=ll(Ag),ul=e=>async(t,n,r)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(s=>Br(s,i,Mr())))}:{success:!0,data:o.value}},yw=ul(Ag),Tw=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Gc(e)(t,n,i)},xw=e=>(t,n,r)=>Gc(e)(t,n,r),_w=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return qc(e)(t,n,i)},kw=e=>async(t,n,r)=>qc(e)(t,n,r),ww=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ll(e)(t,n,i)},Aw=e=>(t,n,r)=>ll(e)(t,n,r),Sw=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ul(e)(t,n,i)},Cw=e=>async(t,n,r)=>ul(e)(t,n,r),vw=/^[cC][^\s-]{8,}$/,Iw=/^[0-9a-z]+$/,Nw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ow=/^[0-9a-vA-V]{20}$/,Rw=/^[A-Za-z0-9]{27}$/,Lw=/^[a-zA-Z0-9_-]{21}$/,Dw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Pw=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,jf=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Mw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Bw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Fw(){return new RegExp(Bw,"u")}const Hw=/^(?:(?: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])$/,zw=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,Uw=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,$w=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,jw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Sg=/^[A-Za-z0-9_-]*$/,Vw=/^\+[1-9]\d{6,14}$/,Cg="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Ww=new RegExp(`^${Cg}$`);function vg(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Yw(e){return new RegExp(`^${vg(e)}$`)}function Zw(e){const t=vg({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${Cg}T(?:${r})$`)}const Gw=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},qw=/^-?\d+$/,Ig=/^-?\d+(?:\.\d+)?$/,Kw=/^(?:true|false)$/i,Xw=/^null$/i,Qw=/^undefined$/i,Jw=/^[^A-Z]*$/,eA=/^[^a-z]*$/,un=Z("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Ng={number:"number",bigint:"bigint",object:"date"},Og=Z("$ZodCheckLessThan",(e,t)=>{un.init(e,t);const n=Ng[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,o=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Rg=Z("$ZodCheckGreaterThan",(e,t)=>{un.init(e,t);const n=Ng[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,o=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tA=Z("$ZodCheckMultipleOf",(e,t)=>{un.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):nw(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),nA=Z("$ZodCheckNumberFormat",(e,t)=>{var s;un.init(e,t),t.format=t.format||"float64";const n=(s=t.format)==null?void 0:s.includes("int"),r=n?"int":"number",[i,o]=lw[t.format];e._zod.onattach.push(a=>{const l=a._zod.bag;l.format=t.format,l.minimum=i,l.maximum=o,n&&(l.pattern=qw)}),e._zod.check=a=>{const l=a.value;if(n){if(!Number.isInteger(l)){a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?a.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}l<i&&a.issues.push({origin:"number",input:l,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),l>o&&a.issues.push({origin:"number",input:l,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),rA=Z("$ZodCheckMaxLength",(e,t)=>{var n;un.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!Wc(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const i=r.value;if(i.length<=t.maximum)return;const s=Zc(i);r.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),iA=Z("$ZodCheckMinLength",(e,t)=>{var n;un.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!Wc(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const i=r.value;if(i.length>=t.minimum)return;const s=Zc(i);r.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),oA=Z("$ZodCheckLengthEquals",(e,t)=>{var n;un.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!Wc(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=r=>{const i=r.value,o=i.length;if(o===t.length)return;const s=Zc(i),a=o>t.length;r.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),cl=Z("$ZodCheckStringFormat",(e,t)=>{var n,r;un.init(e,t),e._zod.onattach.push(i=>{const o=i._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),sA=Z("$ZodCheckRegex",(e,t)=>{cl.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),aA=Z("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Jw),cl.init(e,t)}),lA=Z("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=eA),cl.init(e,t)}),uA=Z("$ZodCheckIncludes",(e,t)=>{un.init(e,t);const n=fi(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),cA=Z("$ZodCheckStartsWith",(e,t)=>{un.init(e,t);const n=new RegExp(`^${fi(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),dA=Z("$ZodCheckEndsWith",(e,t)=>{un.init(e,t);const n=new RegExp(`.*${fi(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),fA=Z("$ZodCheckOverwrite",(e,t)=>{un.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class hA{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
53
|
-
`).filter(s=>s),i=Math.min(...r.map(s=>s.length-s.trimStart().length)),o=r.map(s=>s.slice(i)).map(s=>" ".repeat(this.indent*2)+s);for(const s of o)this.content.push(s)}compile(){const t=Function,n=this==null?void 0:this.args,i=[...((this==null?void 0:this.content)??[""]).map(o=>` ${o}`)];return new t(...n,i.join(`
|
|
54
|
-
`))}}const pA={major:4,minor:3,patch:6},et=Z("$ZodType",(e,t)=>{var i;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=pA;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const s of o._zod.onattach)s(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),(i=e._zod.deferred)==null||i.push(()=>{e._zod.run=e._zod.parse});else{const o=(a,l,u)=>{let d=Mi(a),c;for(const h of l){if(h._zod.def.when){if(!h._zod.def.when(a))continue}else if(d)continue;const p=a.issues.length,m=h._zod.check(a);if(m instanceof Promise&&(u==null?void 0:u.async)===!1)throw new ji;if(c||m instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await m,a.issues.length!==p&&(d||(d=Mi(a,p)))});else{if(a.issues.length===p)continue;d||(d=Mi(a,p))}}return c?c.then(()=>a):a},s=(a,l,u)=>{if(Mi(a))return a.aborted=!0,a;const d=o(l,r,u);if(d instanceof Promise){if(u.async===!1)throw new ji;return d.then(c=>e._zod.parse(c,u))}return e._zod.parse(d,u)};e._zod.run=(a,l)=>{if(l.skipChecks)return e._zod.parse(a,l);if(l.direction==="backward"){const d=e._zod.parse({value:a.value,issues:[]},{...l,skipChecks:!0});return d instanceof Promise?d.then(c=>s(c,a,l)):s(d,a,l)}const u=e._zod.parse(a,l);if(u instanceof Promise){if(l.async===!1)throw new ji;return u.then(d=>o(d,r,l))}return o(u,r,l)}}je(e,"~standard",()=>({validate:o=>{var s;try{const a=Ew(e,o);return a.success?{value:a.data}:{issues:(s=a.error)==null?void 0:s.issues}}catch{return yw(e,o).then(l=>{var u;return l.success?{value:l.data}:{issues:(u=l.error)==null?void 0:u.issues}})}},vendor:"zod",version:1}))}),Kc=Z("$ZodString",(e,t)=>{var n;et.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??Gw(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),mt=Z("$ZodStringFormat",(e,t)=>{cl.init(e,t),Kc.init(e,t)}),mA=Z("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Pw),mt.init(e,t)}),gA=Z("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=jf(r))}else t.pattern??(t.pattern=jf());mt.init(e,t)}),bA=Z("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Mw),mt.init(e,t)}),EA=Z("$ZodURL",(e,t)=>{mt.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),yA=Z("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Fw()),mt.init(e,t)}),TA=Z("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Lw),mt.init(e,t)}),xA=Z("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=vw),mt.init(e,t)}),_A=Z("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Iw),mt.init(e,t)}),kA=Z("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Nw),mt.init(e,t)}),wA=Z("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ow),mt.init(e,t)}),AA=Z("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Rw),mt.init(e,t)}),SA=Z("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Zw(t)),mt.init(e,t)}),CA=Z("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Ww),mt.init(e,t)}),vA=Z("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Yw(t)),mt.init(e,t)}),IA=Z("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Dw),mt.init(e,t)}),NA=Z("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Hw),mt.init(e,t),e._zod.bag.format="ipv4"}),OA=Z("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=zw),mt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),RA=Z("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Uw),mt.init(e,t)}),LA=Z("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=$w),mt.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[i,o]=r;if(!o)throw new Error;const s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Lg(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const DA=Z("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=jw),mt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Lg(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function PA(e){if(!Sg.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Lg(n)}const MA=Z("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Sg),mt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{PA(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),BA=Z("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Vw),mt.init(e,t)});function FA(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const HA=Z("$ZodJWT",(e,t)=>{mt.init(e,t),e._zod.check=n=>{FA(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Dg=Z("$ZodNumber",(e,t)=>{et.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ig,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const o=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...o?{received:o}:{}}),n}}),zA=Z("$ZodNumberFormat",(e,t)=>{nA.init(e,t),Dg.init(e,t)}),UA=Z("$ZodBoolean",(e,t)=>{et.init(e,t),e._zod.pattern=Kw,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const i=n.value;return typeof i=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),$A=Z("$ZodUndefined",(e,t)=>{et.init(e,t),e._zod.pattern=Qw,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,r)=>{const i=n.value;return typeof i>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),n}}),jA=Z("$ZodNull",(e,t)=>{et.init(e,t),e._zod.pattern=Xw,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const i=n.value;return i===null||n.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),n}}),VA=Z("$ZodAny",(e,t)=>{et.init(e,t),e._zod.parse=n=>n}),WA=Z("$ZodUnknown",(e,t)=>{et.init(e,t),e._zod.parse=n=>n}),YA=Z("$ZodNever",(e,t)=>{et.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),ZA=Z("$ZodDate",(e,t)=>{et.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}const i=n.value,o=i instanceof Date;return o&&!Number.isNaN(i.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:i,...o?{received:"Invalid Date"}:{},inst:e}),n}});function Vf(e,t,n){e.issues.length&&t.issues.push(...Bi(n,e.issues)),t.value[n]=e.value}const GA=Z("$ZodArray",(e,t)=>{et.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);const o=[];for(let s=0;s<i.length;s++){const a=i[s],l=t.element._zod.run({value:a,issues:[]},r);l instanceof Promise?o.push(l.then(u=>Vf(u,n,s))):Vf(l,n,s)}return o.length?Promise.all(o).then(()=>n):n}});function Na(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...Bi(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Pg(e){var r,i,o,s;const t=Object.keys(e.shape);for(const a of t)if(!((s=(o=(i=(r=e.shape)==null?void 0:r[a])==null?void 0:i._zod)==null?void 0:o.traits)!=null&&s.has("$ZodType")))throw new Error(`Invalid element at key "${a}": expected a Zod schema`);const n=aw(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Mg(e,t,n,r,i,o){const s=[],a=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optout==="optional";for(const c in t){if(a.has(c))continue;if(u==="never"){s.push(c);continue}const h=l.run({value:t[c],issues:[]},r);h instanceof Promise?e.push(h.then(p=>Na(p,n,c,t,d))):Na(h,n,c,t,d)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const qA=Z("$ZodObject",(e,t)=>{et.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!(n!=null&&n.get)){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const l={...a};return Object.defineProperty(t,"shape",{value:l}),l}})}const r=al(()=>Pg(t));je(e._zod,"propValues",()=>{const a=t.shape,l={};for(const u in a){const d=a[u]._zod;if(d.values){l[u]??(l[u]=new Set);for(const c of d.values)l[u].add(c)}}return l});const i=ss,o=t.catchall;let s;e._zod.parse=(a,l)=>{s??(s=r.value);const u=a.value;if(!i(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};const d=[],c=s.shape;for(const h of s.keys){const p=c[h],m=p._zod.optout==="optional",b=p._zod.run({value:u[h],issues:[]},l);b instanceof Promise?d.push(b.then(y=>Na(y,a,h,u,m))):Na(b,a,h,u,m)}return o?Mg(d,u,a,l,r.value,e):d.length?Promise.all(d).then(()=>a):a}}),KA=Z("$ZodObjectJIT",(e,t)=>{qA.init(e,t);const n=e._zod.parse,r=al(()=>Pg(t)),i=h=>{var _;const p=new hA(["shape","payload","ctx"]),m=r.value,b=P=>{const R=$f(P);return`shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`};p.write("const input = payload.value;");const y=Object.create(null);let E=0;for(const P of m.keys)y[P]=`key_${E++}`;p.write("const newResult = {};");for(const P of m.keys){const R=y[P],C=$f(P),S=h[P],O=((_=S==null?void 0:S._zod)==null?void 0:_.optout)==="optional";p.write(`const ${R} = ${b(P)};`),O?p.write(`
|
|
55
|
-
if (${R}.issues.length) {
|
|
56
|
-
if (${C} in input) {
|
|
57
|
-
payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
|
|
58
|
-
...iss,
|
|
59
|
-
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
60
|
-
})));
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
if (${R}.value === undefined) {
|
|
65
|
-
if (${C} in input) {
|
|
66
|
-
newResult[${C}] = undefined;
|
|
67
|
-
}
|
|
68
|
-
} else {
|
|
69
|
-
newResult[${C}] = ${R}.value;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
`):p.write(`
|
|
73
|
-
if (${R}.issues.length) {
|
|
74
|
-
payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
|
|
75
|
-
...iss,
|
|
76
|
-
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
77
|
-
})));
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if (${R}.value === undefined) {
|
|
81
|
-
if (${C} in input) {
|
|
82
|
-
newResult[${C}] = undefined;
|
|
83
|
-
}
|
|
84
|
-
} else {
|
|
85
|
-
newResult[${C}] = ${R}.value;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
`)}p.write("payload.value = newResult;"),p.write("return payload;");const x=p.compile();return(P,R)=>x(h,P,R)};let o;const s=ss,a=!yg.jitless,u=a&&iw.value,d=t.catchall;let c;e._zod.parse=(h,p)=>{c??(c=r.value);const m=h.value;return s(m)?a&&u&&(p==null?void 0:p.async)===!1&&p.jitless!==!0?(o||(o=i(t.shape)),h=o(h,p),d?Mg([],m,h,p,c,e):h):n(h,p):(h.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),h)}});function Wf(e,t,n,r){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const i=e.filter(o=>!Mi(o));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(s=>Br(s,r,Mr())))}),t)}const Bg=Z("$ZodUnion",(e,t)=>{et.init(e,t),je(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),je(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),je(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),je(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${i.map(o=>Yc(o.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,o)=>{if(n)return r(i,o);let s=!1;const a=[];for(const l of t.options){const u=l._zod.run({value:i.value,issues:[]},o);if(u instanceof Promise)a.push(u),s=!0;else{if(u.issues.length===0)return u;a.push(u)}}return s?Promise.all(a).then(l=>Wf(l,i,e,o)):Wf(a,i,e,o)}}),XA=Z("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Bg.init(e,t);const n=e._zod.parse;je(e._zod,"propValues",()=>{const i={};for(const o of t.options){const s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[a,l]of Object.entries(s)){i[a]||(i[a]=new Set);for(const u of l)i[a].add(u)}}return i});const r=al(()=>{var s;const i=t.options,o=new Map;for(const a of i){const l=(s=a._zod.propValues)==null?void 0:s[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(const u of l){if(o.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);o.set(u,a)}}return o});e._zod.parse=(i,o)=>{const s=i.value;if(!ss(s))return i.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),i;const a=r.value.get(s==null?void 0:s[t.discriminator]);return a?a._zod.run(i,o):t.unionFallback?n(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),i)}}),QA=Z("$ZodIntersection",(e,t)=>{et.init(e,t),e._zod.parse=(n,r)=>{const i=n.value,o=t.left._zod.run({value:i,issues:[]},r),s=t.right._zod.run({value:i,issues:[]},r);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([l,u])=>Yf(n,l,u)):Yf(n,o,s)}});function Iu(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(qi(e)&&qi(t)){const n=Object.keys(t),r=Object.keys(e).filter(o=>n.indexOf(o)!==-1),i={...e,...t};for(const o of r){const s=Iu(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};i[o]=s.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const i=e[r],o=t[r],s=Iu(i,o);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Yf(e,t,n){const r=new Map;let i;for(const a of t.issues)if(a.code==="unrecognized_keys"){i??(i=a);for(const l of a.keys)r.has(l)||r.set(l,{}),r.get(l).l=!0}else e.issues.push(a);for(const a of n.issues)if(a.code==="unrecognized_keys")for(const l of a.keys)r.has(l)||r.set(l,{}),r.get(l).r=!0;else e.issues.push(a);const o=[...r].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(o.length&&i&&e.issues.push({...i,keys:o}),Mi(e))return e;const s=Iu(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const JA=Z("$ZodRecord",(e,t)=>{et.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!qi(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;const o=[],s=t.keyType._zod.values;if(s){n.value={};const a=new Set;for(const u of s)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){a.add(typeof u=="number"?u.toString():u);const d=t.valueType._zod.run({value:i[u],issues:[]},r);d instanceof Promise?o.push(d.then(c=>{c.issues.length&&n.issues.push(...Bi(u,c.issues)),n.value[u]=c.value})):(d.issues.length&&n.issues.push(...Bi(u,d.issues)),n.value[u]=d.value)}let l;for(const u in i)a.has(u)||(l=l??[],l.push(u));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:l})}else{n.value={};for(const a of Reflect.ownKeys(i)){if(a==="__proto__")continue;let l=t.keyType._zod.run({value:a,issues:[]},r);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&Ig.test(a)&&l.issues.length){const c=t.keyType._zod.run({value:Number(a),issues:[]},r);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");c.issues.length===0&&(l=c)}if(l.issues.length){t.mode==="loose"?n.value[a]=i[a]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(c=>Br(c,r,Mr())),input:a,path:[a],inst:e});continue}const d=t.valueType._zod.run({value:i[a],issues:[]},r);d instanceof Promise?o.push(d.then(c=>{c.issues.length&&n.issues.push(...Bi(a,c.issues)),n.value[l.value]=c.value})):(d.issues.length&&n.issues.push(...Bi(a,d.issues)),n.value[l.value]=d.value)}}return o.length?Promise.all(o).then(()=>n):n}}),eS=Z("$ZodEnum",(e,t)=>{et.init(e,t);const n=Tg(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(i=>ow.has(typeof i)).map(i=>typeof i=="string"?fi(i):i.toString()).join("|")})$`),e._zod.parse=(i,o)=>{const s=i.value;return r.has(s)||i.issues.push({code:"invalid_value",values:n,input:s,inst:e}),i}}),tS=Z("$ZodLiteral",(e,t)=>{if(et.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?fi(r):r?fi(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,i)=>{const o=r.value;return n.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),nS=Z("$ZodTransform",(e,t)=>{et.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Eg(e.constructor.name);const i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(s=>(n.value=s,n));if(i instanceof Promise)throw new ji;return n.value=i,n}});function Zf(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Fg=Z("$ZodOptional",(e,t)=>{et.init(e,t),e._zod.optin="optional",e._zod.optout="optional",je(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),je(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Yc(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>Zf(o,n.value)):Zf(i,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),rS=Z("$ZodExactOptional",(e,t)=>{Fg.init(e,t),je(e._zod,"values",()=>t.innerType._zod.values),je(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),iS=Z("$ZodNullable",(e,t)=>{et.init(e,t),je(e._zod,"optin",()=>t.innerType._zod.optin),je(e._zod,"optout",()=>t.innerType._zod.optout),je(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Yc(n.source)}|null)$`):void 0}),je(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),oS=Z("$ZodDefault",(e,t)=>{et.init(e,t),e._zod.optin="optional",je(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>Gf(o,t)):Gf(i,t)}});function Gf(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const sS=Z("$ZodPrefault",(e,t)=>{et.init(e,t),e._zod.optin="optional",je(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),aS=Z("$ZodNonOptional",(e,t)=>{et.init(e,t),je(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>qf(o,e)):qf(i,e)}});function qf(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const lS=Z("$ZodCatch",(e,t)=>{et.init(e,t),je(e._zod,"optin",()=>t.innerType._zod.optin),je(e._zod,"optout",()=>t.innerType._zod.optout),je(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(s=>Br(s,r,Mr()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(o=>Br(o,r,Mr()))},input:n.value}),n.issues=[]),n)}}),uS=Z("$ZodPipe",(e,t)=>{et.init(e,t),je(e._zod,"values",()=>t.in._zod.values),je(e._zod,"optin",()=>t.in._zod.optin),je(e._zod,"optout",()=>t.out._zod.optout),je(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const o=t.out._zod.run(n,r);return o instanceof Promise?o.then(s=>Ws(s,t.in,r)):Ws(o,t.in,r)}const i=t.in._zod.run(n,r);return i instanceof Promise?i.then(o=>Ws(o,t.out,r)):Ws(i,t.out,r)}});function Ws(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const cS=Z("$ZodReadonly",(e,t)=>{et.init(e,t),je(e._zod,"propValues",()=>t.innerType._zod.propValues),je(e._zod,"values",()=>t.innerType._zod.values),je(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),je(e._zod,"optout",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optout}),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(Kf):Kf(i)}});function Kf(e){return e.value=Object.freeze(e.value),e}const dS=Z("$ZodTemplateLiteral",(e,t)=>{et.init(e,t);const n=[];for(const r of t.parts)if(typeof r=="object"&&r!==null){if(!r._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...r._zod.traits].shift()}`);const i=r._zod.pattern instanceof RegExp?r._zod.pattern.source:r._zod.pattern;if(!i)throw new Error(`Invalid template literal part: ${r._zod.traits}`);const o=i.startsWith("^")?1:0,s=i.endsWith("$")?i.length-1:i.length;n.push(i.slice(o,s))}else if(r===null||sw.has(typeof r))n.push(fi(`${r}`));else throw new Error(`Invalid template literal part: ${r}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(r,i)=>typeof r.value!="string"?(r.issues.push({input:r.value,inst:e,expected:"string",code:"invalid_type"}),r):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(r.value)||r.issues.push({input:r.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),r)}),fS=Z("$ZodLazy",(e,t)=>{et.init(e,t),je(e._zod,"innerType",()=>t.getter()),je(e._zod,"pattern",()=>{var n,r;return(r=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:r.pattern}),je(e._zod,"propValues",()=>{var n,r;return(r=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:r.propValues}),je(e._zod,"optin",()=>{var n,r;return((r=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:r.optin)??void 0}),je(e._zod,"optout",()=>{var n,r;return((r=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:r.optout)??void 0}),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),hS=Z("$ZodCustom",(e,t)=>{un.init(e,t),et.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(o=>Xf(o,n,r,e));Xf(i,n,r,e)}});function Xf(e,t,n,r){if(!e){const i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),t.issues.push(as(i))}}var Qf;class pS{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const i={...r,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function mS(){return new pS}(Qf=globalThis).__zod_globalRegistry??(Qf.__zod_globalRegistry=mS());const Co=globalThis.__zod_globalRegistry;function gS(e,t){return new e({type:"string",...pe(t)})}function bS(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...pe(t)})}function Jf(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...pe(t)})}function ES(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...pe(t)})}function yS(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...pe(t)})}function TS(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...pe(t)})}function xS(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...pe(t)})}function _S(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...pe(t)})}function kS(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...pe(t)})}function wS(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...pe(t)})}function AS(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...pe(t)})}function SS(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...pe(t)})}function CS(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...pe(t)})}function vS(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...pe(t)})}function IS(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...pe(t)})}function NS(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...pe(t)})}function OS(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...pe(t)})}function RS(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...pe(t)})}function LS(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...pe(t)})}function DS(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...pe(t)})}function PS(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...pe(t)})}function MS(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...pe(t)})}function BS(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...pe(t)})}function FS(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...pe(t)})}function HS(e,t){return new e({type:"string",format:"date",check:"string_format",...pe(t)})}function zS(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...pe(t)})}function US(e,t){return new e({type:"string",format:"duration",check:"string_format",...pe(t)})}function $S(e,t){return new e({type:"number",checks:[],...pe(t)})}function jS(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...pe(t)})}function VS(e,t){return new e({type:"boolean",...pe(t)})}function WS(e,t){return new e({type:"undefined",...pe(t)})}function YS(e,t){return new e({type:"null",...pe(t)})}function ZS(e){return new e({type:"any"})}function GS(e){return new e({type:"unknown"})}function qS(e,t){return new e({type:"never",...pe(t)})}function KS(e,t){return new e({type:"date",coerce:!0,...pe(t)})}function eh(e,t){return new Og({check:"less_than",...pe(t),value:e,inclusive:!1})}function fa(e,t){return new Og({check:"less_than",...pe(t),value:e,inclusive:!0})}function th(e,t){return new Rg({check:"greater_than",...pe(t),value:e,inclusive:!1})}function ha(e,t){return new Rg({check:"greater_than",...pe(t),value:e,inclusive:!0})}function nh(e,t){return new tA({check:"multiple_of",...pe(t),value:e})}function Hg(e,t){return new rA({check:"max_length",...pe(t),maximum:e})}function Oa(e,t){return new iA({check:"min_length",...pe(t),minimum:e})}function zg(e,t){return new oA({check:"length_equals",...pe(t),length:e})}function XS(e,t){return new sA({check:"string_format",format:"regex",...pe(t),pattern:e})}function QS(e){return new aA({check:"string_format",format:"lowercase",...pe(e)})}function JS(e){return new lA({check:"string_format",format:"uppercase",...pe(e)})}function eC(e,t){return new uA({check:"string_format",format:"includes",...pe(t),includes:e})}function tC(e,t){return new cA({check:"string_format",format:"starts_with",...pe(t),prefix:e})}function nC(e,t){return new dA({check:"string_format",format:"ends_with",...pe(t),suffix:e})}function ro(e){return new fA({check:"overwrite",tx:e})}function rC(e){return ro(t=>t.normalize(e))}function iC(){return ro(e=>e.trim())}function oC(){return ro(e=>e.toLowerCase())}function sC(){return ro(e=>e.toUpperCase())}function aC(){return ro(e=>rw(e))}function lC(e,t,n){return new e({type:"array",element:t,...pe(n)})}function uC(e,t,n){return new e({type:"custom",check:"custom",fn:t,...pe(n)})}function cC(e){const t=dC(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(as(r,n.value,t._zod.def));else{const i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(as(i))}},e(n.value,n)));return t}function dC(e,t){const n=new un({check:"custom",...pe(t)});return n._zod.check=e,n}function Ug(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??Co,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function At(e,t,n={path:[],schemaPath:[]}){var d,c;var r;const i=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;const s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);const a=(c=(d=e._zod).toJSONSchema)==null?void 0:c.call(d);if(a)s.schema=a;else{const h={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,h);else{const m=s.schema,b=t.processors[i.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);b(e,t,m,h)}const p=e._zod.parent;p&&(s.ref||(s.ref=p),At(p,t,h),t.seen.get(p).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(s.schema,l),t.io==="input"&&Qt(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((r=s.schema).default??(r.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function $g(e,t){var s,a,l,u;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const d of e.seen.entries()){const c=(s=e.metadataRegistry.get(d[0]))==null?void 0:s.id;if(c){const h=r.get(c);if(h&&h!==d[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(c,d[0])}}const i=d=>{var b;const c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=(b=e.external.registry.get(d[0]))==null?void 0:b.id,E=e.external.uri??(_=>_);if(y)return{ref:E(y)};const x=d[1].defId??d[1].schema.id??`schema${e.counter++}`;return d[1].defId=x,{defId:x,ref:`${E("__shared")}#/${c}/${x}`}}if(d[1]===n)return{ref:"#"};const p=`#/${c}/`,m=d[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:p+m}},o=d=>{if(d[1].schema.$ref)return;const c=d[1],{ref:h,defId:p}=i(d);c.def={...c.schema},p&&(c.defId=p);const m=c.schema;for(const b in m)delete m[b];m.$ref=h};if(e.cycles==="throw")for(const d of e.seen.entries()){const c=d[1];if(c.cycle)throw new Error(`Cycle detected: #/${(a=c.cycle)==null?void 0:a.join("/")}/<root>
|
|
89
|
-
|
|
90
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of e.seen.entries()){const c=d[1];if(t===d[0]){o(d);continue}if(e.external){const p=(l=e.external.registry.get(d[0]))==null?void 0:l.id;if(t!==d[0]&&p){o(d);continue}}if((u=e.metadataRegistry.get(d[0]))==null?void 0:u.id){o(d);continue}if(c.cycle){o(d);continue}if(c.count>1&&e.reused==="ref"){o(d);continue}}}function jg(e,t){var s,a,l;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=u=>{const d=e.seen.get(u);if(d.ref===null)return;const c=d.def??d.schema,h={...c},p=d.ref;if(d.ref=null,p){r(p);const b=e.seen.get(p),y=b.schema;if(y.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(y)):Object.assign(c,y),Object.assign(c,h),u._zod.parent===p)for(const x in c)x==="$ref"||x==="allOf"||x in h||delete c[x];if(y.$ref&&b.def)for(const x in c)x==="$ref"||x==="allOf"||x in b.def&&JSON.stringify(c[x])===JSON.stringify(b.def[x])&&delete c[x]}const m=u._zod.parent;if(m&&m!==p){r(m);const b=e.seen.get(m);if(b!=null&&b.schema.$ref&&(c.$ref=b.schema.$ref,b.def))for(const y in c)y==="$ref"||y==="allOf"||y in b.def&&JSON.stringify(c[y])===JSON.stringify(b.def[y])&&delete c[y]}e.override({zodSchema:u,jsonSchema:c,path:d.path??[]})};for(const u of[...e.seen.entries()].reverse())r(u[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,(s=e.external)!=null&&s.uri){const u=(a=e.external.registry.get(t))==null?void 0:a.id;if(!u)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(u)}Object.assign(i,n.def??n.schema);const o=((l=e.external)==null?void 0:l.defs)??{};for(const u of e.seen.entries()){const d=u[1];d.def&&d.defId&&(o[d.defId]=d.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?i.$defs=o:i.definitions=o);try{const u=JSON.parse(JSON.stringify(i));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ra(t,"input",e.processors),output:Ra(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function Qt(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Qt(r.element,n);if(r.type==="set")return Qt(r.valueType,n);if(r.type==="lazy")return Qt(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Qt(r.innerType,n);if(r.type==="intersection")return Qt(r.left,n)||Qt(r.right,n);if(r.type==="record"||r.type==="map")return Qt(r.keyType,n)||Qt(r.valueType,n);if(r.type==="pipe")return Qt(r.in,n)||Qt(r.out,n);if(r.type==="object"){for(const i in r.shape)if(Qt(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(const i of r.options)if(Qt(i,n))return!0;return!1}if(r.type==="tuple"){for(const i of r.items)if(Qt(i,n))return!0;return!!(r.rest&&Qt(r.rest,n))}return!1}const fC=(e,t={})=>n=>{const r=Ug({...n,processors:t});return At(e,r),$g(r,e),jg(r,e)},Ra=(e,t,n={})=>r=>{const{libraryOptions:i,target:o}=r??{},s=Ug({...i??{},target:o,io:t,processors:n});return At(e,s),$g(s,e),jg(s,e)},hC={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},pC=(e,t,n,r)=>{const i=n;i.type="string";const{minimum:o,maximum:s,format:a,patterns:l,contentEncoding:u}=e._zod.bag;if(typeof o=="number"&&(i.minLength=o),typeof s=="number"&&(i.maxLength=s),a&&(i.format=hC[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),u&&(i.contentEncoding=u),l&&l.size>0){const d=[...l];d.length===1?i.pattern=d[0].source:d.length>1&&(i.allOf=[...d.map(c=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:c.source}))])}},mC=(e,t,n,r)=>{const i=n,{minimum:o,maximum:s,format:a,multipleOf:l,exclusiveMaximum:u,exclusiveMinimum:d}=e._zod.bag;typeof a=="string"&&a.includes("int")?i.type="integer":i.type="number",typeof d=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=d,i.exclusiveMinimum=!0):i.exclusiveMinimum=d),typeof o=="number"&&(i.minimum=o,typeof d=="number"&&t.target!=="draft-04"&&(d>=o?delete i.minimum:delete i.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=u,i.exclusiveMaximum=!0):i.exclusiveMaximum=u),typeof s=="number"&&(i.maximum=s,typeof u=="number"&&t.target!=="draft-04"&&(u<=s?delete i.maximum:delete i.exclusiveMaximum)),typeof l=="number"&&(i.multipleOf=l)},gC=(e,t,n,r)=>{n.type="boolean"},bC=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},EC=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},yC=(e,t,n,r)=>{n.not={}},TC=(e,t,n,r)=>{},xC=(e,t,n,r)=>{},_C=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},kC=(e,t,n,r)=>{const i=e._zod.def,o=Tg(i.entries);o.every(s=>typeof s=="number")&&(n.type="number"),o.every(s=>typeof s=="string")&&(n.type="string"),n.enum=o},wC=(e,t,n,r)=>{const i=e._zod.def,o=[];for(const s of i.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(s))}else o.push(s);if(o.length!==0)if(o.length===1){const s=o[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s}else o.every(s=>typeof s=="number")&&(n.type="number"),o.every(s=>typeof s=="string")&&(n.type="string"),o.every(s=>typeof s=="boolean")&&(n.type="boolean"),o.every(s=>s===null)&&(n.type="null"),n.enum=o},AC=(e,t,n,r)=>{const i=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=o.source},SC=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},CC=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},vC=(e,t,n,r)=>{const i=n,o=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(i.minItems=s),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=At(o.element,t,{...r,path:[...r.path,"items"]})},IC=(e,t,n,r)=>{var u;const i=n,o=e._zod.def;i.type="object",i.properties={};const s=o.shape;for(const d in s)i.properties[d]=At(s[d],t,{...r,path:[...r.path,"properties",d]});const a=new Set(Object.keys(s)),l=new Set([...a].filter(d=>{const c=o.shape[d]._zod;return t.io==="input"?c.optin===void 0:c.optout===void 0}));l.size>0&&(i.required=Array.from(l)),((u=o.catchall)==null?void 0:u._zod.def.type)==="never"?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=At(o.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},NC=(e,t,n,r)=>{const i=e._zod.def,o=i.inclusive===!1,s=i.options.map((a,l)=>At(a,t,{...r,path:[...r.path,o?"oneOf":"anyOf",l]}));o?n.oneOf=s:n.anyOf=s},OC=(e,t,n,r)=>{const i=e._zod.def,o=At(i.left,t,{...r,path:[...r.path,"allOf",0]}),s=At(i.right,t,{...r,path:[...r.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,l=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];n.allOf=l},RC=(e,t,n,r)=>{const i=n,o=e._zod.def;i.type="object";const s=o.keyType,a=s._zod.bag,l=a==null?void 0:a.patterns;if(o.mode==="loose"&&l&&l.size>0){const d=At(o.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});i.patternProperties={};for(const c of l)i.patternProperties[c.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=At(o.keyType,t,{...r,path:[...r.path,"propertyNames"]})),i.additionalProperties=At(o.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const u=s._zod.values;if(u){const d=[...u].filter(c=>typeof c=="string"||typeof c=="number");d.length>0&&(i.required=d)}},LC=(e,t,n,r)=>{const i=e._zod.def,o=At(i.innerType,t,r),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=i.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},DC=(e,t,n,r)=>{const i=e._zod.def;At(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType},PC=(e,t,n,r)=>{const i=e._zod.def;At(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},MC=(e,t,n,r)=>{const i=e._zod.def;At(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},BC=(e,t,n,r)=>{const i=e._zod.def;At(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType;let s;try{s=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},FC=(e,t,n,r)=>{const i=e._zod.def,o=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;At(o,t,r);const s=t.seen.get(e);s.ref=o},HC=(e,t,n,r)=>{const i=e._zod.def;At(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType,n.readOnly=!0},Vg=(e,t,n,r)=>{const i=e._zod.def;At(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType},zC=(e,t,n,r)=>{const i=e._zod.innerType;At(i,t,r);const o=t.seen.get(e);o.ref=i},UC=Z("ZodISODateTime",(e,t)=>{SA.init(e,t),Et.init(e,t)});function $C(e){return FS(UC,e)}const jC=Z("ZodISODate",(e,t)=>{CA.init(e,t),Et.init(e,t)});function VC(e){return HS(jC,e)}const WC=Z("ZodISOTime",(e,t)=>{vA.init(e,t),Et.init(e,t)});function YC(e){return zS(WC,e)}const ZC=Z("ZodISODuration",(e,t)=>{IA.init(e,t),Et.init(e,t)});function GC(e){return US(ZC,e)}const qC=(e,t)=>{wg.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>bw(e,n)},flatten:{value:n=>gw(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,vu,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,vu,2)}},isEmpty:{get(){return e.issues.length===0}}})},Mn=Z("ZodError",qC,{Parent:Error}),KC=Gc(Mn),XC=qc(Mn),QC=ll(Mn),JC=ul(Mn),ev=Tw(Mn),tv=xw(Mn),nv=_w(Mn),rv=kw(Mn),iv=ww(Mn),ov=Aw(Mn),sv=Sw(Mn),av=Cw(Mn),tt=Z("ZodType",(e,t)=>(et.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ra(e,"input"),output:Ra(e,"output")}}),e.toJSONSchema=fC(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Vr(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>Wr(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>KC(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>QC(e,n,r),e.parseAsync=async(n,r)=>XC(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>JC(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>ev(e,n,r),e.decode=(n,r)=>tv(e,n,r),e.encodeAsync=async(n,r)=>nv(e,n,r),e.decodeAsync=async(n,r)=>rv(e,n,r),e.safeEncode=(n,r)=>iv(e,n,r),e.safeDecode=(n,r)=>ov(e,n,r),e.safeEncodeAsync=async(n,r)=>sv(e,n,r),e.safeDecodeAsync=async(n,r)=>av(e,n,r),e.refine=(n,r)=>e.check(lI(n,r)),e.superRefine=n=>e.check(uI(n)),e.overwrite=n=>e.check(ro(n)),e.optional=()=>oh(e),e.exactOptional=()=>Yv(e),e.nullable=()=>sh(e),e.nullish=()=>oh(sh(e)),e.nonoptional=n=>Qv(e,n),e.array=()=>Gg(e),e.or=n=>_s([e,n]),e.and=n=>zv(e,n),e.transform=n=>ah(e,Vv(n)),e.default=n=>qv(e,n),e.prefault=n=>Xv(e,n),e.catch=n=>eI(e,n),e.pipe=n=>ah(e,n),e.readonly=()=>rI(e),e.describe=n=>{const r=e.clone();return Co.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=Co.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Co.get(e);const r=e.clone();return Co.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),Wg=Z("_ZodString",(e,t)=>{Kc.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(r,i,o)=>pC(e,r,i);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(XS(...r)),e.includes=(...r)=>e.check(eC(...r)),e.startsWith=(...r)=>e.check(tC(...r)),e.endsWith=(...r)=>e.check(nC(...r)),e.min=(...r)=>e.check(Oa(...r)),e.max=(...r)=>e.check(Hg(...r)),e.length=(...r)=>e.check(zg(...r)),e.nonempty=(...r)=>e.check(Oa(1,...r)),e.lowercase=r=>e.check(QS(r)),e.uppercase=r=>e.check(JS(r)),e.trim=()=>e.check(iC()),e.normalize=(...r)=>e.check(rC(...r)),e.toLowerCase=()=>e.check(oC()),e.toUpperCase=()=>e.check(sC()),e.slugify=()=>e.check(aC())}),lv=Z("ZodString",(e,t)=>{Kc.init(e,t),Wg.init(e,t),e.email=n=>e.check(bS(uv,n)),e.url=n=>e.check(_S(cv,n)),e.jwt=n=>e.check(BS(Av,n)),e.emoji=n=>e.check(kS(dv,n)),e.guid=n=>e.check(Jf(rh,n)),e.uuid=n=>e.check(ES(Ys,n)),e.uuidv4=n=>e.check(yS(Ys,n)),e.uuidv6=n=>e.check(TS(Ys,n)),e.uuidv7=n=>e.check(xS(Ys,n)),e.nanoid=n=>e.check(wS(fv,n)),e.guid=n=>e.check(Jf(rh,n)),e.cuid=n=>e.check(AS(hv,n)),e.cuid2=n=>e.check(SS(pv,n)),e.ulid=n=>e.check(CS(mv,n)),e.base64=n=>e.check(DS(_v,n)),e.base64url=n=>e.check(PS(kv,n)),e.xid=n=>e.check(vS(gv,n)),e.ksuid=n=>e.check(IS(bv,n)),e.ipv4=n=>e.check(NS(Ev,n)),e.ipv6=n=>e.check(OS(yv,n)),e.cidrv4=n=>e.check(RS(Tv,n)),e.cidrv6=n=>e.check(LS(xv,n)),e.e164=n=>e.check(MS(wv,n)),e.datetime=n=>e.check($C(n)),e.date=n=>e.check(VC(n)),e.time=n=>e.check(YC(n)),e.duration=n=>e.check(GC(n))});function ge(e){return gS(lv,e)}const Et=Z("ZodStringFormat",(e,t)=>{mt.init(e,t),Wg.init(e,t)}),uv=Z("ZodEmail",(e,t)=>{bA.init(e,t),Et.init(e,t)}),rh=Z("ZodGUID",(e,t)=>{mA.init(e,t),Et.init(e,t)}),Ys=Z("ZodUUID",(e,t)=>{gA.init(e,t),Et.init(e,t)}),cv=Z("ZodURL",(e,t)=>{EA.init(e,t),Et.init(e,t)}),dv=Z("ZodEmoji",(e,t)=>{yA.init(e,t),Et.init(e,t)}),fv=Z("ZodNanoID",(e,t)=>{TA.init(e,t),Et.init(e,t)}),hv=Z("ZodCUID",(e,t)=>{xA.init(e,t),Et.init(e,t)}),pv=Z("ZodCUID2",(e,t)=>{_A.init(e,t),Et.init(e,t)}),mv=Z("ZodULID",(e,t)=>{kA.init(e,t),Et.init(e,t)}),gv=Z("ZodXID",(e,t)=>{wA.init(e,t),Et.init(e,t)}),bv=Z("ZodKSUID",(e,t)=>{AA.init(e,t),Et.init(e,t)}),Ev=Z("ZodIPv4",(e,t)=>{NA.init(e,t),Et.init(e,t)}),yv=Z("ZodIPv6",(e,t)=>{OA.init(e,t),Et.init(e,t)}),Tv=Z("ZodCIDRv4",(e,t)=>{RA.init(e,t),Et.init(e,t)}),xv=Z("ZodCIDRv6",(e,t)=>{LA.init(e,t),Et.init(e,t)}),_v=Z("ZodBase64",(e,t)=>{DA.init(e,t),Et.init(e,t)}),kv=Z("ZodBase64URL",(e,t)=>{MA.init(e,t),Et.init(e,t)}),wv=Z("ZodE164",(e,t)=>{BA.init(e,t),Et.init(e,t)}),Av=Z("ZodJWT",(e,t)=>{HA.init(e,t),Et.init(e,t)}),Yg=Z("ZodNumber",(e,t)=>{Dg.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(r,i,o)=>mC(e,r,i),e.gt=(r,i)=>e.check(th(r,i)),e.gte=(r,i)=>e.check(ha(r,i)),e.min=(r,i)=>e.check(ha(r,i)),e.lt=(r,i)=>e.check(eh(r,i)),e.lte=(r,i)=>e.check(fa(r,i)),e.max=(r,i)=>e.check(fa(r,i)),e.int=r=>e.check(ih(r)),e.safe=r=>e.check(ih(r)),e.positive=r=>e.check(th(0,r)),e.nonnegative=r=>e.check(ha(0,r)),e.negative=r=>e.check(eh(0,r)),e.nonpositive=r=>e.check(fa(0,r)),e.multipleOf=(r,i)=>e.check(nh(r,i)),e.step=(r,i)=>e.check(nh(r,i)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Dn(e){return $S(Yg,e)}const Sv=Z("ZodNumberFormat",(e,t)=>{zA.init(e,t),Yg.init(e,t)});function ih(e){return jS(Sv,e)}const Cv=Z("ZodBoolean",(e,t)=>{UA.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>gC(e,n,r)});function Zg(e){return VS(Cv,e)}const vv=Z("ZodUndefined",(e,t)=>{$A.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>EC(e,n)});function Qr(e){return WS(vv,e)}const Iv=Z("ZodNull",(e,t)=>{jA.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>bC(e,n,r)});function Nv(e){return YS(Iv,e)}const Ov=Z("ZodAny",(e,t)=>{VA.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>TC()});function Yr(){return ZS(Ov)}const Rv=Z("ZodUnknown",(e,t)=>{WA.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>xC()});function Nu(){return GS(Rv)}const Lv=Z("ZodNever",(e,t)=>{YA.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>yC(e,n,r)});function Dv(e){return qS(Lv,e)}const Pv=Z("ZodDate",(e,t)=>{ZA.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(r,i,o)=>_C(e,r),e.min=(r,i)=>e.check(ha(r,i)),e.max=(r,i)=>e.check(fa(r,i));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null}),Mv=Z("ZodArray",(e,t)=>{GA.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>vC(e,n,r,i),e.element=t.element,e.min=(n,r)=>e.check(Oa(n,r)),e.nonempty=n=>e.check(Oa(1,n)),e.max=(n,r)=>e.check(Hg(n,r)),e.length=(n,r)=>e.check(zg(n,r)),e.unwrap=()=>e.element});function Gg(e,t){return lC(Mv,e,t)}const Bv=Z("ZodObject",(e,t)=>{KA.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>IC(e,n,r,i),je(e,"shape",()=>t.shape),e.keyof=()=>oo(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Nu()}),e.loose=()=>e.clone({...e._zod.def,catchall:Nu()}),e.strict=()=>e.clone({...e._zod.def,catchall:Dv()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>dw(e,n),e.safeExtend=n=>fw(e,n),e.merge=n=>hw(e,n),e.pick=n=>uw(e,n),e.omit=n=>cw(e,n),e.partial=(...n)=>pw(Kg,e,n[0]),e.required=(...n)=>mw(Xg,e,n[0])});function gt(e,t){const n={type:"object",shape:e??{},...pe(t)};return new Bv(n)}const qg=Z("ZodUnion",(e,t)=>{Bg.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>NC(e,n,r,i),e.options=t.options});function _s(e,t){return new qg({type:"union",options:e,...pe(t)})}const Fv=Z("ZodDiscriminatedUnion",(e,t)=>{qg.init(e,t),XA.init(e,t)});function Xc(e,t,n){return new Fv({type:"union",options:t,discriminator:e,...pe(n)})}const Hv=Z("ZodIntersection",(e,t)=>{QA.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>OC(e,n,r,i)});function zv(e,t){return new Hv({type:"intersection",left:e,right:t})}const Uv=Z("ZodRecord",(e,t)=>{JA.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>RC(e,n,r,i),e.keyType=t.keyType,e.valueType=t.valueType});function io(e,t,n){return new Uv({type:"record",keyType:e,valueType:t,...pe(n)})}const Ou=Z("ZodEnum",(e,t)=>{eS.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(r,i,o)=>kC(e,r,i),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{const o={};for(const s of r)if(n.has(s))o[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Ou({...t,checks:[],...pe(i),entries:o})},e.exclude=(r,i)=>{const o={...t.entries};for(const s of r)if(n.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new Ou({...t,checks:[],...pe(i),entries:o})}});function oo(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Ou({type:"enum",entries:n,...pe(t)})}const $v=Z("ZodLiteral",(e,t)=>{tS.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>wC(e,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function xt(e,t){return new $v({type:"literal",values:Array.isArray(e)?e:[e],...pe(t)})}const jv=Z("ZodTransform",(e,t)=>{nS.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>CC(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Eg(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(as(o,n.value,t));else{const s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(as(s))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(o=>(n.value=o,n)):(n.value=i,n)}});function Vv(e){return new jv({type:"transform",transform:e})}const Kg=Z("ZodOptional",(e,t)=>{Fg.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Vg(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function oh(e){return new Kg({type:"optional",innerType:e})}const Wv=Z("ZodExactOptional",(e,t)=>{rS.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Vg(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Yv(e){return new Wv({type:"optional",innerType:e})}const Zv=Z("ZodNullable",(e,t)=>{iS.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>LC(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function sh(e){return new Zv({type:"nullable",innerType:e})}const Gv=Z("ZodDefault",(e,t)=>{oS.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>PC(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function qv(e,t){return new Gv({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():_g(t)}})}const Kv=Z("ZodPrefault",(e,t)=>{sS.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>MC(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Xv(e,t){return new Kv({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():_g(t)}})}const Xg=Z("ZodNonOptional",(e,t)=>{aS.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>DC(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Qv(e,t){return new Xg({type:"nonoptional",innerType:e,...pe(t)})}const Jv=Z("ZodCatch",(e,t)=>{lS.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>BC(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function eI(e,t){return new Jv({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const tI=Z("ZodPipe",(e,t)=>{uS.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>FC(e,n,r,i),e.in=t.in,e.out=t.out});function ah(e,t){return new tI({type:"pipe",in:e,out:t})}const nI=Z("ZodReadonly",(e,t)=>{cS.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>HC(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function rI(e){return new nI({type:"readonly",innerType:e})}const iI=Z("ZodTemplateLiteral",(e,t)=>{dS.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>AC(e,n,r)});function oI(e,t){return new iI({type:"template_literal",parts:e,...pe(t)})}const sI=Z("ZodLazy",(e,t)=>{fS.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>zC(e,n,r,i),e.unwrap=()=>e._zod.def.getter()});function aI(e){return new sI({type:"lazy",getter:e})}const Qg=Z("ZodCustom",(e,t)=>{hS.init(e,t),tt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>SC(e,n)});function lI(e,t={}){return uC(Qg,e,t)}function uI(e){return cC(e)}function cI(e,t={}){const n=new Qg({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...pe(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}function bt(e){return KS(Pv,e)}const dI=cI(Uint8Array),fI=Yr(),An=_s([dI,fI]),Jg={run_created:["input"],run_completed:["output"],run_failed:["error"],step_created:["input"],step_completed:["result"],step_failed:["error"],step_retrying:["error"],hook_created:["metadata"],hook_received:["payload"]},hI=oo(["run_created","run_started","run_completed","run_failed","run_cancelled","step_created","step_completed","step_failed","step_retrying","step_started","hook_created","hook_received","hook_disposed","hook_conflict","wait_created","wait_completed"]),Gt=gt({eventType:hI,correlationId:ge().optional(),specVersion:Dn().optional()}),e1=Gt.extend({eventType:xt("step_completed"),correlationId:ge(),eventData:gt({result:An})}),t1=Gt.extend({eventType:xt("step_failed"),correlationId:ge(),eventData:gt({error:Yr(),stack:ge().optional()})}),n1=Gt.extend({eventType:xt("step_retrying"),correlationId:ge(),eventData:gt({error:Yr(),stack:ge().optional(),retryAfter:bt().optional()})}),r1=Gt.extend({eventType:xt("step_started"),correlationId:ge(),eventData:gt({attempt:Dn().optional()}).optional()}),i1=Gt.extend({eventType:xt("step_created"),correlationId:ge(),eventData:gt({stepName:ge(),input:An})}),o1=Gt.extend({eventType:xt("hook_created"),correlationId:ge(),eventData:gt({token:ge(),metadata:An.optional()})}),s1=Gt.extend({eventType:xt("hook_received"),correlationId:ge(),eventData:gt({payload:An})}),a1=Gt.extend({eventType:xt("hook_disposed"),correlationId:ge()}),pI=Gt.extend({eventType:xt("hook_conflict"),correlationId:ge(),eventData:gt({token:ge()})}),l1=Gt.extend({eventType:xt("wait_created"),correlationId:ge(),eventData:gt({resumeAt:bt()})}),u1=Gt.extend({eventType:xt("wait_completed"),correlationId:ge()}),c1=Gt.extend({eventType:xt("run_created"),eventData:gt({deploymentId:ge(),workflowName:ge(),input:An,executionContext:io(ge(),Yr()).optional()})}),d1=Gt.extend({eventType:xt("run_started"),eventData:gt({input:An.optional(),deploymentId:ge().optional(),workflowName:ge().optional(),executionContext:io(ge(),Yr()).optional()}).optional()}),f1=Gt.extend({eventType:xt("run_completed"),eventData:gt({output:An.optional()})}),h1=Gt.extend({eventType:xt("run_failed"),eventData:gt({error:Yr(),errorCode:ge().optional()})}),p1=Gt.extend({eventType:xt("run_cancelled")});Xc("eventType",[c1,d1,f1,h1,p1,i1,e1,t1,n1,r1,o1,s1,a1,l1,u1]);const mI=Xc("eventType",[c1,d1,f1,h1,p1,i1,e1,t1,n1,r1,o1,s1,a1,pI,l1,u1]);mI.and(gt({runId:ge(),eventId:ge(),createdAt:bt(),specVersion:Dn().optional()}));gt({runId:ge(),hookId:ge(),token:ge(),ownerId:ge(),projectId:ge(),environment:ge(),metadata:An.optional(),createdAt:bt(),specVersion:Dn().optional(),isWebhook:Zg().optional()});const gI=_s([xt("__wkf_step_"),xt("__wkf_workflow_")]);oI([gI,ge()]);ge().brand().describe("A stored queue message ID");const m1=io(ge(),ge()),bI=gt({input:Nu(),deploymentId:ge(),workflowName:ge(),specVersion:Dn(),executionContext:io(ge(),Yr()).optional()}),EI=gt({runId:ge(),traceCarrier:m1.optional(),requestedAt:bt().optional(),serverErrorRetryCount:Dn().int().optional(),runInput:bI.optional()}),yI=gt({workflowName:ge(),workflowRunId:ge(),workflowStartedAt:Dn(),stepId:ge(),traceCarrier:m1.optional(),requestedAt:bt().optional()}),TI=gt({__healthCheck:xt(!0),correlationId:ge()});_s([EI,yI,TI]);const lh=aI(()=>_s([ge(),Dn(),Zg(),Nv(),Gg(lh),io(ge(),lh)])),Qc=gt({message:ge(),stack:ge().optional(),code:ge().optional()}),xI=oo(["pending","running","completed","failed","cancelled"]),Zs=gt({runId:ge(),status:xI,deploymentId:ge(),workflowName:ge(),specVersion:Dn().optional(),executionContext:io(ge(),Yr()).optional(),input:An,output:An.optional(),error:Qc.optional(),expiredAt:bt().optional(),startedAt:bt().optional(),completedAt:bt().optional(),createdAt:bt(),updatedAt:bt()});Xc("status",[Zs.extend({status:oo(["pending","running"]),output:Qr(),error:Qr(),completedAt:Qr()}),Zs.extend({status:xt("cancelled"),output:Qr(),error:Qr(),completedAt:bt()}),Zs.extend({status:xt("completed"),output:An,error:Qr(),completedAt:bt()}),Zs.extend({status:xt("failed"),output:Qr(),error:Qc,completedAt:bt()})]);const _I=oo(["pending","running","completed","failed","cancelled"]);gt({runId:ge(),stepId:ge(),stepName:ge(),status:_I,input:An,output:An.optional(),error:Qc.optional(),attempt:Dn(),startedAt:bt().optional(),completedAt:bt().optional(),createdAt:bt(),updatedAt:bt(),retryAfter:bt().optional(),specVersion:Dn().optional()});ge().ulid();const kI=oo(["waiting","completed"]);gt({waitId:ge(),runId:ge(),status:kI,resumeAt:bt().optional(),completedAt:bt().optional(),createdAt:bt(),updatedAt:bt(),specVersion:Dn().optional()});function wI(e){if(e===""||e===".")return new ArrayBuffer(0);const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n.buffer}function AI(){function e(t){return wI(t)}return{...gg,ArrayBuffer:e,BigInt:t=>BigInt(t),BigInt64Array:t=>new BigInt64Array(e(t)),BigUint64Array:t=>new BigUint64Array(e(t)),Date:t=>new Date(t),Error:t=>{const n=new Error(t.message);return n.name=t.name,n.stack=t.stack,n},Float32Array:t=>new Float32Array(e(t)),Float64Array:t=>new Float64Array(e(t)),Int8Array:t=>new Int8Array(e(t)),Int16Array:t=>new Int16Array(e(t)),Int32Array:t=>new Int32Array(e(t)),Map:t=>new Map(t),RegExp:t=>new RegExp(t.source,t.flags),Set:t=>new Set(t),Uint8Array:t=>new Uint8Array(e(t)),Uint8ClampedArray:t=>new Uint8ClampedArray(e(t)),Uint16Array:t=>new Uint16Array(e(t)),Uint32Array:t=>new Uint32Array(e(t)),Headers:t=>new Headers(t),Request:t=>{const r=Object.create((function(){}).prototype);return Object.assign(r,{method:t.method,url:t.url,headers:new Headers(t.headers),body:t.body,duplex:t.duplex,...t.responseWritable?{responseWritable:t.responseWritable}:{}}),r},Response:t=>{const r=Object.create((function(){}).prototype);return Object.assign(r,{status:t.status,statusText:t.statusText,url:t.url,headers:new Headers(t.headers),body:t.body,redirected:t.redirected,type:t.type}),r},URL:t=>new URL(t),URLSearchParams:t=>new URLSearchParams(t==="."?"":t),Class:t=>`<class:${os(t.classId)}>`,Instance:t=>{const n=os(t.classId),r=t.data,i=r&&typeof r=="object"?{...r}:{value:r},o={[n]:function(){}}[n],s=Object.create(o.prototype);return Object.assign(s,i),s}}}let Hl=null;function g1(){return Hl||(Hl=AI()),Hl}function aU(e){const t=bg(e,g1());return II(t)}const La="Encrypted";function SI(e){const t={[La]:function(){}}[La],n=Object.create(t.prototype);return Object.defineProperty(n,"__encryptedData",{value:e,enumerable:!1,configurable:!1}),n}function CI(e){var t;return e!==null&&typeof e=="object"&&((t=e.constructor)==null?void 0:t.name)===La}const Ru="Expired Data";function vI(){const e={[Ru]:function(){}}[Ru];return Object.create(e.prototype)}function lU(e){var t;return e!==null&&typeof e=="object"&&((t=e.constructor)==null?void 0:t.name)===Ru}function uh(e){return sl(e)?SI(e):ug(e)?vI():e}function II(e){if(!e||typeof e!="object")return e;const n={...e};for(const r of["input","output","metadata","error"])n[r]=uh(n[r]);if(n.eventData&&typeof n.eventData=="object"){const r=typeof n.eventType=="string"?n.eventType:"",i=Jg[r]??[],o={...n.eventData};for(const s of i)s in o&&(o[s]=uh(o[s]));n.eventData=o}return n}async function uU(e,t){const{hydrateDataWithKey:n}=await rs(async()=>{const{hydrateDataWithKey:u}=await Promise.resolve().then(()=>tw);return{hydrateDataWithKey:u}},void 0),{importKey:r}=await rs(async()=>{const{importKey:u}=await import("./encryption-8OvC6eoJ.js");return{importKey:u}},[]),i=await r(t),o=g1();async function s(u,d,c){if(CI(u)){const h=u.__encryptedData;return n(h,d,c)}return u instanceof Uint8Array?n(u,d,c):u}const l={...e};for(const u of["input","output","metadata","error"])u in l&&(l[u]=await s(l[u],o,i));if(l.eventData&&typeof l.eventData=="object"){const u=typeof l.eventType=="string"?l.eventType:"",d=Jg[u]??[],c={...l.eventData};for(const h of d)h in c&&(c[h]=await s(c[h],o,i));l.eventData=c}return l}var NI=Object.create,Jc=Object.defineProperty,OI=Object.getOwnPropertyDescriptor,b1=Object.getOwnPropertyNames,RI=Object.getPrototypeOf,LI=Object.prototype.hasOwnProperty,ed=(e,t)=>function(){return t||(0,e[b1(e)[0]])((t={exports:{}}).exports,t),t.exports},DI=(e,t)=>{for(var n in t)Jc(e,n,{get:t[n],enumerable:!0})},PI=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of b1(t))!LI.call(e,i)&&i!==n&&Jc(e,i,{get:()=>t[i],enumerable:!(r=OI(t,i))||r.enumerable});return e},MI=(e,t,n)=>(n=e!=null?NI(RI(e)):{},PI(Jc(n,"default",{value:e,enumerable:!0}),e)),BI=ed({"node_modules/is-object/index.js"(e,t){t.exports=function(r){return typeof r=="object"&&r!==null}}}),FI=ed({"node_modules/is-window/index.js"(e,t){t.exports=function(n){if(n==null)return!1;var r=Object(n);return r===r.window}}}),HI=ed({"node_modules/is-dom/index.js"(e,t){var n=BI(),r=FI();function i(o){return!n(o)||!r(window)||typeof window.Node!="function"?!1:typeof o.nodeType=="number"&&typeof o.nodeName=="string"}t.exports=i}}),Da={};DI(Da,{chromeDark:()=>zI,chromeLight:()=>UI});var zI={BASE_FONT_FAMILY:"Menlo, monospace",BASE_FONT_SIZE:"11px",BASE_LINE_HEIGHT:1.2,BASE_BACKGROUND_COLOR:"rgb(36, 36, 36)",BASE_COLOR:"rgb(213, 213, 213)",OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES:10,OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES:5,OBJECT_NAME_COLOR:"rgb(227, 110, 236)",OBJECT_VALUE_NULL_COLOR:"rgb(127, 127, 127)",OBJECT_VALUE_UNDEFINED_COLOR:"rgb(127, 127, 127)",OBJECT_VALUE_REGEXP_COLOR:"rgb(233, 63, 59)",OBJECT_VALUE_STRING_COLOR:"rgb(233, 63, 59)",OBJECT_VALUE_SYMBOL_COLOR:"rgb(233, 63, 59)",OBJECT_VALUE_NUMBER_COLOR:"hsl(252, 100%, 75%)",OBJECT_VALUE_BOOLEAN_COLOR:"hsl(252, 100%, 75%)",OBJECT_VALUE_FUNCTION_PREFIX_COLOR:"rgb(85, 106, 242)",HTML_TAG_COLOR:"rgb(93, 176, 215)",HTML_TAGNAME_COLOR:"rgb(93, 176, 215)",HTML_TAGNAME_TEXT_TRANSFORM:"lowercase",HTML_ATTRIBUTE_NAME_COLOR:"rgb(155, 187, 220)",HTML_ATTRIBUTE_VALUE_COLOR:"rgb(242, 151, 102)",HTML_COMMENT_COLOR:"rgb(137, 137, 137)",HTML_DOCTYPE_COLOR:"rgb(192, 192, 192)",ARROW_COLOR:"rgb(145, 145, 145)",ARROW_MARGIN_RIGHT:3,ARROW_FONT_SIZE:12,ARROW_ANIMATION_DURATION:"0",TREENODE_FONT_FAMILY:"Menlo, monospace",TREENODE_FONT_SIZE:"11px",TREENODE_LINE_HEIGHT:1.2,TREENODE_PADDING_LEFT:12,TABLE_BORDER_COLOR:"rgb(85, 85, 85)",TABLE_TH_BACKGROUND_COLOR:"rgb(44, 44, 44)",TABLE_TH_HOVER_COLOR:"rgb(48, 48, 48)",TABLE_SORT_ICON_COLOR:"black",TABLE_DATA_BACKGROUND_IMAGE:"linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 50%, rgba(51, 139, 255, 0.0980392) 50%, rgba(51, 139, 255, 0.0980392))",TABLE_DATA_BACKGROUND_SIZE:"128px 32px"},UI={BASE_FONT_FAMILY:"Menlo, monospace",BASE_FONT_SIZE:"11px",BASE_LINE_HEIGHT:1.2,BASE_BACKGROUND_COLOR:"white",BASE_COLOR:"black",OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES:10,OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES:5,OBJECT_NAME_COLOR:"rgb(136, 19, 145)",OBJECT_VALUE_NULL_COLOR:"rgb(128, 128, 128)",OBJECT_VALUE_UNDEFINED_COLOR:"rgb(128, 128, 128)",OBJECT_VALUE_REGEXP_COLOR:"rgb(196, 26, 22)",OBJECT_VALUE_STRING_COLOR:"rgb(196, 26, 22)",OBJECT_VALUE_SYMBOL_COLOR:"rgb(196, 26, 22)",OBJECT_VALUE_NUMBER_COLOR:"rgb(28, 0, 207)",OBJECT_VALUE_BOOLEAN_COLOR:"rgb(28, 0, 207)",OBJECT_VALUE_FUNCTION_PREFIX_COLOR:"rgb(13, 34, 170)",HTML_TAG_COLOR:"rgb(168, 148, 166)",HTML_TAGNAME_COLOR:"rgb(136, 18, 128)",HTML_TAGNAME_TEXT_TRANSFORM:"lowercase",HTML_ATTRIBUTE_NAME_COLOR:"rgb(153, 69, 0)",HTML_ATTRIBUTE_VALUE_COLOR:"rgb(26, 26, 166)",HTML_COMMENT_COLOR:"rgb(35, 110, 37)",HTML_DOCTYPE_COLOR:"rgb(192, 192, 192)",ARROW_COLOR:"#6e6e6e",ARROW_MARGIN_RIGHT:3,ARROW_FONT_SIZE:12,ARROW_ANIMATION_DURATION:"0",TREENODE_FONT_FAMILY:"Menlo, monospace",TREENODE_FONT_SIZE:"11px",TREENODE_LINE_HEIGHT:1.2,TREENODE_PADDING_LEFT:12,TABLE_BORDER_COLOR:"#aaa",TABLE_TH_BACKGROUND_COLOR:"#eee",TABLE_TH_HOVER_COLOR:"hsla(0, 0%, 90%, 1)",TABLE_SORT_ICON_COLOR:"#6e6e6e",TABLE_DATA_BACKGROUND_IMAGE:"linear-gradient(to bottom, white, white 50%, rgb(234, 243, 255) 50%, rgb(234, 243, 255))",TABLE_DATA_BACKGROUND_SIZE:"128px 32px"},E1=T.createContext([{},()=>{}]),zl={WebkitTouchCallout:"none",WebkitUserSelect:"none",KhtmlUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",OUserSelect:"none",userSelect:"none"},pa=e=>({DOMNodePreview:{htmlOpenTag:{base:{color:e.HTML_TAG_COLOR},tagName:{color:e.HTML_TAGNAME_COLOR,textTransform:e.HTML_TAGNAME_TEXT_TRANSFORM},htmlAttributeName:{color:e.HTML_ATTRIBUTE_NAME_COLOR},htmlAttributeValue:{color:e.HTML_ATTRIBUTE_VALUE_COLOR}},htmlCloseTag:{base:{color:e.HTML_TAG_COLOR},offsetLeft:{marginLeft:-e.TREENODE_PADDING_LEFT},tagName:{color:e.HTML_TAGNAME_COLOR,textTransform:e.HTML_TAGNAME_TEXT_TRANSFORM}},htmlComment:{color:e.HTML_COMMENT_COLOR},htmlDoctype:{color:e.HTML_DOCTYPE_COLOR}},ObjectPreview:{objectDescription:{fontStyle:"italic"},preview:{fontStyle:"italic"},arrayMaxProperties:e.OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES,objectMaxProperties:e.OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES},ObjectName:{base:{color:e.OBJECT_NAME_COLOR},dimmed:{opacity:.6}},ObjectValue:{objectValueNull:{color:e.OBJECT_VALUE_NULL_COLOR},objectValueUndefined:{color:e.OBJECT_VALUE_UNDEFINED_COLOR},objectValueRegExp:{color:e.OBJECT_VALUE_REGEXP_COLOR},objectValueString:{color:e.OBJECT_VALUE_STRING_COLOR},objectValueSymbol:{color:e.OBJECT_VALUE_SYMBOL_COLOR},objectValueNumber:{color:e.OBJECT_VALUE_NUMBER_COLOR},objectValueBoolean:{color:e.OBJECT_VALUE_BOOLEAN_COLOR},objectValueFunctionPrefix:{color:e.OBJECT_VALUE_FUNCTION_PREFIX_COLOR,fontStyle:"italic"},objectValueFunctionName:{fontStyle:"italic"}},TreeView:{treeViewOutline:{padding:0,margin:0,listStyleType:"none"}},TreeNode:{treeNodeBase:{color:e.BASE_COLOR,backgroundColor:e.BASE_BACKGROUND_COLOR,lineHeight:e.TREENODE_LINE_HEIGHT,cursor:"default",boxSizing:"border-box",listStyle:"none",fontFamily:e.TREENODE_FONT_FAMILY,fontSize:e.TREENODE_FONT_SIZE},treeNodePreviewContainer:{},treeNodePlaceholder:{whiteSpace:"pre",fontSize:e.ARROW_FONT_SIZE,marginRight:e.ARROW_MARGIN_RIGHT,...zl},treeNodeArrow:{base:{color:e.ARROW_COLOR,display:"inline-block",fontSize:e.ARROW_FONT_SIZE,marginRight:e.ARROW_MARGIN_RIGHT,...parseFloat(e.ARROW_ANIMATION_DURATION)>0?{transition:`transform ${e.ARROW_ANIMATION_DURATION} ease 0s`}:{},...zl},expanded:{WebkitTransform:"rotateZ(90deg)",MozTransform:"rotateZ(90deg)",transform:"rotateZ(90deg)"},collapsed:{WebkitTransform:"rotateZ(0deg)",MozTransform:"rotateZ(0deg)",transform:"rotateZ(0deg)"}},treeNodeChildNodesContainer:{margin:0,paddingLeft:e.TREENODE_PADDING_LEFT}},TableInspector:{base:{color:e.BASE_COLOR,position:"relative",border:`1px solid ${e.TABLE_BORDER_COLOR}`,fontFamily:e.BASE_FONT_FAMILY,fontSize:e.BASE_FONT_SIZE,lineHeight:"120%",boxSizing:"border-box",cursor:"default"}},TableInspectorHeaderContainer:{base:{top:0,height:"17px",left:0,right:0,overflowX:"hidden"},table:{tableLayout:"fixed",borderSpacing:0,borderCollapse:"separate",height:"100%",width:"100%",margin:0}},TableInspectorDataContainer:{tr:{display:"table-row"},td:{boxSizing:"border-box",border:"none",height:"16px",verticalAlign:"top",padding:"1px 4px",WebkitUserSelect:"text",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",lineHeight:"14px"},div:{position:"static",top:"17px",bottom:0,overflowY:"overlay",transform:"translateZ(0)",left:0,right:0,overflowX:"hidden"},table:{positon:"static",left:0,top:0,right:0,bottom:0,borderTop:"0 none transparent",margin:0,backgroundImage:e.TABLE_DATA_BACKGROUND_IMAGE,backgroundSize:e.TABLE_DATA_BACKGROUND_SIZE,tableLayout:"fixed",borderSpacing:0,borderCollapse:"separate",width:"100%",fontSize:e.BASE_FONT_SIZE,lineHeight:"120%"}},TableInspectorTH:{base:{position:"relative",height:"auto",textAlign:"left",backgroundColor:e.TABLE_TH_BACKGROUND_COLOR,borderBottom:`1px solid ${e.TABLE_BORDER_COLOR}`,fontWeight:"normal",verticalAlign:"middle",padding:"0 4px",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",lineHeight:"14px",":hover":{backgroundColor:e.TABLE_TH_HOVER_COLOR}},div:{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",fontSize:e.BASE_FONT_SIZE,lineHeight:"120%"}},TableInspectorLeftBorder:{none:{borderLeft:"none"},solid:{borderLeft:`1px solid ${e.TABLE_BORDER_COLOR}`}},TableInspectorSortIcon:{display:"block",marginRight:3,width:8,height:7,marginTop:-7,color:e.TABLE_SORT_ICON_COLOR,fontSize:12,...zl}}),Lu="chromeLight",y1=T.createContext(pa(Da[Lu])),ks=e=>T.useContext(y1)[e],$I=e=>({theme:n=Lu,...r})=>{const i=T.useMemo(()=>{switch(Object.prototype.toString.call(n)){case"[object String]":return pa(Da[n]);case"[object Object]":return pa(n);default:return pa(Da[Lu])}},[n]);return F.createElement(y1.Provider,{value:i},F.createElement(e,{...r}))},jI=({expanded:e,styles:t})=>F.createElement("span",{style:{...t.base,...e?t.expanded:t.collapsed}},"▶"),VI=T.memo(e=>{e={expanded:!0,nodeRenderer:({name:d})=>F.createElement("span",null,d),onClick:()=>{},shouldShowArrow:!1,shouldShowPlaceholder:!0,...e};const{expanded:t,onClick:n,children:r,nodeRenderer:i,title:o,shouldShowArrow:s,shouldShowPlaceholder:a}=e,l=ks("TreeNode"),u=i;return F.createElement("li",{"aria-expanded":t,role:"treeitem",style:l.treeNodeBase,title:o},F.createElement("div",{style:l.treeNodePreviewContainer,onClick:n},s||T.Children.count(r)>0?F.createElement(jI,{expanded:t,styles:l.treeNodeArrow}):a&&F.createElement("span",{style:l.treeNodePlaceholder}," "),F.createElement(u,{...e})),F.createElement("ol",{role:"group",style:l.treeNodeChildNodesContainer},t?r:void 0))}),Pa="$",ch="*";function ma(e,t){return!t(e).next().done}var WI=e=>Array.from({length:e},(t,n)=>[Pa].concat(Array.from({length:n},()=>"*")).join(".")),YI=(e,t,n,r,i)=>{const o=[].concat(WI(r)).concat(n).filter(a=>typeof a=="string"),s=[];return o.forEach(a=>{const l=a.split("."),u=(d,c,h)=>{if(h===l.length){s.push(c);return}const p=l[h];if(h===0)ma(d,t)&&(p===Pa||p===ch)&&u(d,Pa,h+1);else if(p===ch)for(const{name:m,data:b}of t(d))ma(b,t)&&u(b,`${c}.${m}`,h+1);else{const m=d[p];ma(m,t)&&u(m,`${c}.${p}`,h+1)}};u(e,"",0)}),s.reduce((a,l)=>(a[l]=!0,a),{...i})},T1=T.memo(e=>{const{data:t,dataIterator:n,path:r,depth:i,nodeRenderer:o}=e,[s,a]=T.useContext(E1),l=ma(t,n),u=!!s[r],d=T.useCallback(()=>l&&a(c=>({...c,[r]:!u})),[l,a,r,u]);return F.createElement(VI,{expanded:u,onClick:d,shouldShowArrow:l,shouldShowPlaceholder:i>0,nodeRenderer:o,...e},u?[...n(t)].map(({name:c,data:h,...p})=>F.createElement(T1,{name:c,data:h,depth:i+1,path:`${r}.${c}`,key:c,dataIterator:n,nodeRenderer:o,...p})):null)}),ZI=T.memo(({name:e,data:t,dataIterator:n,nodeRenderer:r,expandPaths:i,expandLevel:o})=>{const s=ks("TreeView"),a=T.useState({}),[,l]=a;return T.useLayoutEffect(()=>l(u=>YI(t,n,i,o,u)),[t,n,i,o]),F.createElement(E1.Provider,{value:a},F.createElement("ol",{role:"tree",style:s.treeViewOutline},F.createElement(T1,{name:e,data:t,dataIterator:n,depth:0,path:Pa,nodeRenderer:r})))}),oi=({name:e,dimmed:t=!1,styles:n={}})=>{const r=ks("ObjectName"),i={...r.base,...t?r.dimmed:{},...n};return F.createElement("span",{style:i},e)},Po=({object:e,styles:t})=>{const n=ks("ObjectValue"),r=i=>({...n[i],...t});switch(typeof e){case"bigint":return F.createElement("span",{style:r("objectValueNumber")},String(e),"n");case"number":return F.createElement("span",{style:r("objectValueNumber")},String(e));case"string":return F.createElement("span",{style:r("objectValueString")},'"',e,'"');case"boolean":return F.createElement("span",{style:r("objectValueBoolean")},String(e));case"undefined":return F.createElement("span",{style:r("objectValueUndefined")},"undefined");case"object":return e===null?F.createElement("span",{style:r("objectValueNull")},"null"):e instanceof Date?F.createElement("span",null,e.toString()):e instanceof RegExp?F.createElement("span",{style:r("objectValueRegExp")},e.toString()):Array.isArray(e)?F.createElement("span",null,`Array(${e.length})`):e.constructor?typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)?F.createElement("span",null,`Buffer[${e.length}]`):F.createElement("span",null,e.constructor.name):F.createElement("span",null,"Object");case"function":return F.createElement("span",null,F.createElement("span",{style:r("objectValueFunctionPrefix")},"ƒ "),F.createElement("span",{style:r("objectValueFunctionName")},e.name,"()"));case"symbol":return F.createElement("span",{style:r("objectValueSymbol")},e.toString());default:return F.createElement("span",null)}},GI=Object.prototype.hasOwnProperty,qI=Object.prototype.propertyIsEnumerable;function Du(e,t){const n=Object.getOwnPropertyDescriptor(e,t);if(n.get)try{return n.get()}catch{return n.get}return e[t]}function dh(e,t){return e.length===0?[]:e.slice(1).reduce((n,r)=>n.concat([t,r]),[e[0]])}var Pu=({data:e})=>{const t=ks("ObjectPreview"),n=e;if(typeof n!="object"||n===null||n instanceof Date||n instanceof RegExp)return F.createElement(Po,{object:n});if(Array.isArray(n)){const r=t.arrayMaxProperties,i=n.slice(0,r).map((s,a)=>F.createElement(Po,{key:a,object:s}));n.length>r&&i.push(F.createElement("span",{key:"ellipsis"},"…"));const o=n.length;return F.createElement(F.Fragment,null,F.createElement("span",{style:t.objectDescription},o===0?"":`(${o}) `),F.createElement("span",{style:t.preview},"[",dh(i,", "),"]"))}else{const r=t.objectMaxProperties,i=[];for(const s in n)if(GI.call(n,s)){let a;i.length===r-1&&Object.keys(n).length>r&&(a=F.createElement("span",{key:"ellipsis"},"…"));const l=Du(n,s);if(i.push(F.createElement("span",{key:s},F.createElement(oi,{name:s||'""'}),": ",F.createElement(Po,{object:l}),a)),a)break}const o=n.constructor?n.constructor.name:"Object";return F.createElement(F.Fragment,null,F.createElement("span",{style:t.objectDescription},o==="Object"?"":`${o} `),F.createElement("span",{style:t.preview},"{",dh(i,", "),"}"))}},Mu=({name:e,data:t})=>typeof e=="string"?F.createElement("span",null,F.createElement(oi,{name:e}),F.createElement("span",null,": "),F.createElement(Pu,{data:t})):F.createElement(Pu,{data:t}),x1=({name:e,data:t,isNonenumerable:n=!1})=>{const r=t;return F.createElement("span",null,typeof e=="string"?F.createElement(oi,{name:e,dimmed:n}):F.createElement(Pu,{data:e}),F.createElement("span",null,": "),F.createElement(Po,{object:r}))},KI=(e,t)=>function*(r){if(!(typeof r=="object"&&r!==null||typeof r=="function"))return;const o=Array.isArray(r);if(!o&&r[Symbol.iterator]){let s=0;for(const a of r){if(Array.isArray(a)&&a.length===2){const[l,u]=a;yield{name:l,data:u}}else yield{name:s.toString(),data:a};s++}}else{const s=Object.getOwnPropertyNames(r);t===!0&&!o?s.sort():typeof t=="function"&&s.sort(t);for(const a of s)if(qI.call(r,a)){const l=Du(r,a);yield{name:a||'""',data:l}}else if(e){let l;try{l=Du(r,a)}catch{}l!==void 0&&(yield{name:a,data:l,isNonenumerable:!0})}e&&r!==Object.prototype&&(yield{name:"__proto__",data:Object.getPrototypeOf(r),isNonenumerable:!0})}},XI=({depth:e,name:t,data:n,isNonenumerable:r})=>e===0?F.createElement(Mu,{name:t,data:n}):F.createElement(x1,{name:t,data:n,isNonenumerable:r}),QI=({showNonenumerable:e=!1,sortObjectKeys:t,nodeRenderer:n,...r})=>{const i=KI(e,t),o=n||XI;return F.createElement(ZI,{nodeRenderer:o,dataIterator:i,...r})},JI=$I(QI);MI(HI());const e3=()=>{const[e,t]=T.useState(()=>typeof document>"u"?!1:document.documentElement.classList.contains("dark"));return T.useEffect(()=>{if(typeof document>"u")return;const n=new MutationObserver(()=>{t(document.documentElement.classList.contains("dark"))});return n.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()},[]),e},_1={OBJECT_VALUE_DATE_COLOR:"#a21caf"},t3={OBJECT_VALUE_DATE_COLOR:"#e879f9"},k1={BASE_FONT_SIZE:"11px",BASE_LINE_HEIGHT:1.4,BASE_BACKGROUND_COLOR:"transparent",OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES:10,OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES:5,HTML_TAGNAME_TEXT_TRANSFORM:"lowercase",ARROW_MARGIN_RIGHT:3,ARROW_FONT_SIZE:12,TREENODE_FONT_FAMILY:"var(--font-mono)",TREENODE_FONT_SIZE:"11px",TREENODE_LINE_HEIGHT:1.4,TREENODE_PADDING_LEFT:12,TABLE_DATA_BACKGROUND_IMAGE:"none",TABLE_DATA_BACKGROUND_SIZE:"0"},n3={...k1,BASE_COLOR:"var(--ds-gray-1000)",OBJECT_NAME_COLOR:"var(--ds-gray-900)",OBJECT_VALUE_STRING_COLOR:"#16a34a",OBJECT_VALUE_SYMBOL_COLOR:"#16a34a",OBJECT_VALUE_NUMBER_COLOR:"#b45309",OBJECT_VALUE_BOOLEAN_COLOR:"#b45309",OBJECT_VALUE_NULL_COLOR:"var(--ds-gray-900)",OBJECT_VALUE_UNDEFINED_COLOR:"var(--ds-gray-500)",OBJECT_VALUE_REGEXP_COLOR:"#dc2626",OBJECT_VALUE_FUNCTION_PREFIX_COLOR:"#0891b2",HTML_TAG_COLOR:"var(--ds-gray-500)",HTML_TAGNAME_COLOR:"#0891b2",HTML_ATTRIBUTE_NAME_COLOR:"#b45309",HTML_ATTRIBUTE_VALUE_COLOR:"#16a34a",HTML_COMMENT_COLOR:"var(--ds-gray-400)",HTML_DOCTYPE_COLOR:"var(--ds-gray-400)",ARROW_COLOR:"var(--ds-gray-500)",TABLE_BORDER_COLOR:"var(--ds-gray-300)",TABLE_TH_BACKGROUND_COLOR:"var(--ds-gray-100)",TABLE_TH_HOVER_COLOR:"var(--ds-gray-200)",TABLE_SORT_ICON_COLOR:"var(--ds-gray-500)"},r3={...k1,BASE_COLOR:"var(--ds-gray-1000)",OBJECT_NAME_COLOR:"var(--ds-gray-900)",OBJECT_VALUE_STRING_COLOR:"#4ade80",OBJECT_VALUE_SYMBOL_COLOR:"#4ade80",OBJECT_VALUE_NUMBER_COLOR:"#facc15",OBJECT_VALUE_BOOLEAN_COLOR:"#facc15",OBJECT_VALUE_NULL_COLOR:"var(--ds-gray-1000)",OBJECT_VALUE_UNDEFINED_COLOR:"var(--ds-gray-500)",OBJECT_VALUE_REGEXP_COLOR:"#f87171",OBJECT_VALUE_FUNCTION_PREFIX_COLOR:"#22d3ee",HTML_TAG_COLOR:"var(--ds-gray-500)",HTML_TAGNAME_COLOR:"#22d3ee",HTML_ATTRIBUTE_NAME_COLOR:"#facc15",HTML_ATTRIBUTE_VALUE_COLOR:"#4ade80",HTML_COMMENT_COLOR:"var(--ds-gray-500)",HTML_DOCTYPE_COLOR:"var(--ds-gray-500)",ARROW_COLOR:"var(--ds-gray-500)",TABLE_BORDER_COLOR:"var(--ds-gray-300)",TABLE_TH_BACKGROUND_COLOR:"var(--ds-gray-100)",TABLE_TH_HOVER_COLOR:"var(--ds-gray-200)",TABLE_SORT_ICON_COLOR:"var(--ds-gray-500)"},i3="__workflow_stream_ref__",o3="__workflow_class_instance_ref__";function s3(e){return e!==null&&typeof e=="object"&&"__type"in e&&e.__type===i3}function a3(e){return e!==null&&typeof e=="object"&&"__type"in e&&e.__type===o3}const w1=T.createContext(void 0);function l3({streamRef:e}){const t=T.useContext(w1);return g.jsxs("button",{type:"button",className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-mono cursor-pointer",style:{backgroundColor:"var(--ds-blue-100)",color:"var(--ds-blue-800)",border:"1px solid var(--ds-blue-300)"},onClick:()=>t==null?void 0:t(e.streamId),title:`View stream: ${e.streamId}`,children:[g.jsx("span",{children:"📡"}),g.jsx("span",{children:e.streamId})]})}const A1=T.createContext(_1);function u3({depth:e,name:t,data:n,isNonenumerable:r}){var o;const i=T.useContext(A1);if(n!==null&&typeof n=="object"&&((o=n.constructor)==null?void 0:o.name)===La){const s=g.jsxs("span",{style:{color:"var(--ds-gray-600)",fontStyle:"italic"},children:[g.jsx(c2,{className:"h-3 w-3",style:{display:"inline",verticalAlign:"middle",marginRight:"3px",marginTop:"-1px"}}),"Encrypted"]});return e===0?s:g.jsxs("span",{children:[t!=null&&g.jsx(oi,{name:t}),t!=null&&g.jsx("span",{children:": "}),s]})}if(s3(n))return g.jsxs("span",{children:[t!=null&&g.jsx(oi,{name:t}),t!=null&&g.jsx("span",{children:": "}),g.jsx(l3,{streamRef:n})]});if(a3(n))return e===0?g.jsx(Mu,{name:n.className,data:n.data}):g.jsxs("span",{children:[t!=null&&g.jsx(oi,{name:t}),t!=null&&g.jsx("span",{children:": "}),g.jsxs("span",{style:{fontStyle:"italic"},children:[n.className," "]}),g.jsx(Po,{object:n.data})]});if(n instanceof Date){const s=n.toISOString();return e===0?g.jsx("span",{style:{color:i.OBJECT_VALUE_DATE_COLOR},children:s}):g.jsxs("span",{children:[t!=null&&g.jsx(oi,{name:t}),t!=null&&g.jsx("span",{children:": "}),g.jsx("span",{style:{color:i.OBJECT_VALUE_DATE_COLOR},children:s})]})}return e===0?g.jsx(Mu,{name:t,data:n}):g.jsx(x1,{name:t,data:n,isNonenumerable:r})}function c3({data:e,expandLevel:t=2,name:n,onStreamClick:r}){const i=d3(e),[o,s]=T.useState(t),a=e3(),l=a?t3:_1;T.useEffect(()=>{s(0)},[]);const u=g.jsx(A1.Provider,{value:l,children:g.jsx(JI,{data:i,name:n,theme:a?r3:n3,expandLevel:o,nodeRenderer:u3})});return r?g.jsx(w1.Provider,{value:r,children:u}):u}function d3(e){const t=T.useRef(e);return ga(t.current,e)||(t.current=e),t.current}function fh(e){return typeof e=="object"&&e!==null}function ga(e,t,n=new WeakMap){if(Object.is(e,t))return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.flags===t.flags;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[a,l]of e.entries())if(!t.has(a)||!ga(l,t.get(a),n))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const a of e.values())if(!t.has(a))return!1;return!0}if(!fh(e)||!fh(t))return!1;if(n.get(e)===t)return!0;n.set(e,t);const r=Array.isArray(e),i=Array.isArray(t);if(r!==i)return!1;if(r&&i){if(e.length!==t.length)return!1;for(let a=0;a<e.length;a+=1)if(!ga(e[a],t[a],n))return!1;return!0}const o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return!1;for(const a of o)if(!Object.hasOwn(t,a)||!ga(e[a],t[a],n))return!1;return!0}function f3(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const h3=e=>{switch(e){case"success":return g3;case"info":return E3;case"warning":return b3;case"error":return y3;default:return null}},p3=Array(12).fill(0),m3=({visible:e,className:t})=>F.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},F.createElement("div",{className:"sonner-spinner"},p3.map((n,r)=>F.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),g3=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),b3=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),E3=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),y3=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),T3=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},F.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),F.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),x3=()=>{const[e,t]=F.useState(document.hidden);return F.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Bu=1;class _3{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,o=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Bu++,s=this.toasts.find(l=>l.id===o),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),s?this.toasts=this.toasts.map(l=>l.id===o?(this.publish({...l,...t,id:o,title:r}),{...l,...t,id:o,dismissible:a,title:r}):l):this.addToast({title:r,...i,dismissible:a,id:o}),o},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let o=r!==void 0,s;const a=i.then(async u=>{if(s=["resolve",u],F.isValidElement(u))o=!1,this.create({id:r,type:"default",message:u});else if(w3(u)&&!u.ok){o=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,h=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,m=typeof c=="object"&&!F.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...m})}else if(u instanceof Error){o=!1;const c=typeof n.error=="function"?await n.error(u):n.error,h=typeof n.description=="function"?await n.description(u):n.description,m=typeof c=="object"&&!F.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...m})}else if(n.success!==void 0){o=!1;const c=typeof n.success=="function"?await n.success(u):n.success,h=typeof n.description=="function"?await n.description(u):n.description,m=typeof c=="object"&&!F.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:h,...m})}}).catch(async u=>{if(s=["reject",u],n.error!==void 0){o=!1;const d=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,p=typeof d=="object"&&!F.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:c,...p})}}).finally(()=>{o&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,d)=>a.then(()=>s[0]==="reject"?d(s[1]):u(s[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Bu++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const sn=new _3,k3=(e,t)=>{const n=(t==null?void 0:t.id)||Bu++;return sn.addToast({title:e,...t,id:n}),n},w3=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",A3=k3,S3=()=>sn.toasts,C3=()=>sn.getActiveToasts(),Ul=Object.assign(A3,{success:sn.success,info:sn.info,warning:sn.warning,error:sn.error,custom:sn.custom,message:sn.message,promise:sn.promise,dismiss:sn.dismiss,loading:sn.loading},{getHistory:S3,getToasts:C3});f3("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Gs(e){return e.label!==void 0}const v3=3,I3="24px",N3="16px",hh=4e3,O3=356,R3=14,L3=45,D3=200;function Xn(...e){return e.filter(Boolean).join(" ")}function P3(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const M3=e=>{var t,n,r,i,o,s,a,l,u;const{invert:d,toast:c,unstyled:h,interacting:p,setHeights:m,visibleToasts:b,heights:y,index:E,toasts:x,expanded:_,removeToast:P,defaultRichColors:R,closeButton:C,style:S,cancelButtonStyle:O,actionButtonStyle:$,className:N="",descriptionClassName:W="",duration:U,position:w,gap:D,expandByDefault:M,classNames:H,icons:z,closeButtonAriaLabel:G="Close toast"}=e,[Q,k]=F.useState(null),[se,ne]=F.useState(null),[v,ye]=F.useState(!1),[be,Ee]=F.useState(!1),[Qe,X]=F.useState(!1),[ce,Se]=F.useState(!1),[He,Je]=F.useState(!1),[Ye,ze]=F.useState(0),[lt,nt]=F.useState(0),Le=F.useRef(c.duration||U||hh),Ze=F.useRef(null),Ke=F.useRef(null),yt=E===0,Gr=E+1<=b,Dt=c.type,dn=c.dismissible!==!1,Kn=c.className||"",Fn=c.descriptionClassName||"",q=F.useMemo(()=>y.findIndex(Ie=>Ie.toastId===c.id)||0,[y,c.id]),ae=F.useMemo(()=>{var Ie;return(Ie=c.closeButton)!=null?Ie:C},[c.closeButton,C]),xe=F.useMemo(()=>c.duration||U||hh,[c.duration,U]),Ce=F.useRef(0),Be=F.useRef(0),Ht=F.useRef(0),Ut=F.useRef(null),[Hn,qr]=w.split("-"),Tr=F.useMemo(()=>y.reduce((Ie,Pt,jt)=>jt>=q?Ie:Ie+Pt.height,0),[y,q]),$t=x3(),xr=c.invert||d,fn=Dt==="loading";Be.current=F.useMemo(()=>q*D+Tr,[q,Tr]),F.useEffect(()=>{Le.current=xe},[xe]),F.useEffect(()=>{ye(!0)},[]),F.useEffect(()=>{const Ie=Ke.current;if(Ie){const Pt=Ie.getBoundingClientRect().height;return nt(Pt),m(jt=>[{toastId:c.id,height:Pt,position:c.position},...jt]),()=>m(jt=>jt.filter(hn=>hn.toastId!==c.id))}},[m,c.id]),F.useLayoutEffect(()=>{if(!v)return;const Ie=Ke.current,Pt=Ie.style.height;Ie.style.height="auto";const jt=Ie.getBoundingClientRect().height;Ie.style.height=Pt,nt(jt),m(hn=>hn.find(zt=>zt.toastId===c.id)?hn.map(zt=>zt.toastId===c.id?{...zt,height:jt}:zt):[{toastId:c.id,height:jt,position:c.position},...hn])},[v,c.title,c.description,m,c.id,c.jsx,c.action,c.cancel]);const _r=F.useCallback(()=>{Ee(!0),ze(Be.current),m(Ie=>Ie.filter(Pt=>Pt.toastId!==c.id)),setTimeout(()=>{P(c)},D3)},[c,P,m,Be]);F.useEffect(()=>{if(c.promise&&Dt==="loading"||c.duration===1/0||c.type==="loading")return;let Ie;return _||p||$t?(()=>{if(Ht.current<Ce.current){const hn=new Date().getTime()-Ce.current;Le.current=Le.current-hn}Ht.current=new Date().getTime()})():(()=>{Le.current!==1/0&&(Ce.current=new Date().getTime(),Ie=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),_r()},Le.current))})(),()=>clearTimeout(Ie)},[_,p,c,Dt,$t,_r]),F.useEffect(()=>{c.delete&&(_r(),c.onDismiss==null||c.onDismiss.call(c,c))},[_r,c.delete]);function Zy(){var Ie;if(z!=null&&z.loading){var Pt;return F.createElement("div",{className:Xn(H==null?void 0:H.loader,c==null||(Pt=c.classNames)==null?void 0:Pt.loader,"sonner-loader"),"data-visible":Dt==="loading"},z.loading)}return F.createElement(m3,{className:Xn(H==null?void 0:H.loader,c==null||(Ie=c.classNames)==null?void 0:Ie.loader),visible:Dt==="loading"})}const Gy=c.icon||(z==null?void 0:z[Dt])||h3(Dt);var Yd,Zd;return F.createElement("li",{tabIndex:0,ref:Ke,className:Xn(N,Kn,H==null?void 0:H.toast,c==null||(t=c.classNames)==null?void 0:t.toast,H==null?void 0:H.default,H==null?void 0:H[Dt],c==null||(n=c.classNames)==null?void 0:n[Dt]),"data-sonner-toast":"","data-rich-colors":(Yd=c.richColors)!=null?Yd:R,"data-styled":!(c.jsx||c.unstyled||h),"data-mounted":v,"data-promise":!!c.promise,"data-swiped":He,"data-removed":be,"data-visible":Gr,"data-y-position":Hn,"data-x-position":qr,"data-index":E,"data-front":yt,"data-swiping":Qe,"data-dismissible":dn,"data-type":Dt,"data-invert":xr,"data-swipe-out":ce,"data-swipe-direction":se,"data-expanded":!!(_||M&&v),"data-testid":c.testId,style:{"--index":E,"--toasts-before":E,"--z-index":x.length-E,"--offset":`${be?Ye:Be.current}px`,"--initial-height":M?"auto":`${lt}px`,...S,...c.style},onDragEnd:()=>{X(!1),k(null),Ut.current=null},onPointerDown:Ie=>{Ie.button!==2&&(fn||!dn||(Ze.current=new Date,ze(Be.current),Ie.target.setPointerCapture(Ie.pointerId),Ie.target.tagName!=="BUTTON"&&(X(!0),Ut.current={x:Ie.clientX,y:Ie.clientY})))},onPointerUp:()=>{var Ie,Pt,jt;if(ce||!dn)return;Ut.current=null;const hn=Number(((Ie=Ke.current)==null?void 0:Ie.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ms=Number(((Pt=Ke.current)==null?void 0:Pt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),zt=new Date().getTime()-((jt=Ze.current)==null?void 0:jt.getTime()),Sn=Q==="x"?hn:Ms,Bs=Math.abs(Sn)/zt;if(Math.abs(Sn)>=L3||Bs>.11){ze(Be.current),c.onDismiss==null||c.onDismiss.call(c,c),ne(Q==="x"?hn>0?"right":"left":Ms>0?"down":"up"),_r(),Se(!0);return}else{var zn,Un;(zn=Ke.current)==null||zn.style.setProperty("--swipe-amount-x","0px"),(Un=Ke.current)==null||Un.style.setProperty("--swipe-amount-y","0px")}Je(!1),X(!1),k(null)},onPointerMove:Ie=>{var Pt,jt,hn;if(!Ut.current||!dn||((Pt=window.getSelection())==null?void 0:Pt.toString().length)>0)return;const zt=Ie.clientY-Ut.current.y,Sn=Ie.clientX-Ut.current.x;var Bs;const zn=(Bs=e.swipeDirections)!=null?Bs:P3(w);!Q&&(Math.abs(Sn)>1||Math.abs(zt)>1)&&k(Math.abs(Sn)>Math.abs(zt)?"x":"y");let Un={x:0,y:0};const Gd=Kr=>1/(1.5+Math.abs(Kr)/20);if(Q==="y"){if(zn.includes("top")||zn.includes("bottom"))if(zn.includes("top")&&zt<0||zn.includes("bottom")&&zt>0)Un.y=zt;else{const Kr=zt*Gd(zt);Un.y=Math.abs(Kr)<Math.abs(zt)?Kr:zt}}else if(Q==="x"&&(zn.includes("left")||zn.includes("right")))if(zn.includes("left")&&Sn<0||zn.includes("right")&&Sn>0)Un.x=Sn;else{const Kr=Sn*Gd(Sn);Un.x=Math.abs(Kr)<Math.abs(Sn)?Kr:Sn}(Math.abs(Un.x)>0||Math.abs(Un.y)>0)&&Je(!0),(jt=Ke.current)==null||jt.style.setProperty("--swipe-amount-x",`${Un.x}px`),(hn=Ke.current)==null||hn.style.setProperty("--swipe-amount-y",`${Un.y}px`)}},ae&&!c.jsx&&Dt!=="loading"?F.createElement("button",{"aria-label":G,"data-disabled":fn,"data-close-button":!0,onClick:fn||!dn?()=>{}:()=>{_r(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Xn(H==null?void 0:H.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(Zd=z==null?void 0:z.close)!=null?Zd:T3):null,(Dt||c.icon||c.promise)&&c.icon!==null&&((z==null?void 0:z[Dt])!==null||c.icon)?F.createElement("div",{"data-icon":"",className:Xn(H==null?void 0:H.icon,c==null||(i=c.classNames)==null?void 0:i.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||Zy():null,c.type!=="loading"?Gy:null):null,F.createElement("div",{"data-content":"",className:Xn(H==null?void 0:H.content,c==null||(o=c.classNames)==null?void 0:o.content)},F.createElement("div",{"data-title":"",className:Xn(H==null?void 0:H.title,c==null||(s=c.classNames)==null?void 0:s.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?F.createElement("div",{"data-description":"",className:Xn(W,Fn,H==null?void 0:H.description,c==null||(a=c.classNames)==null?void 0:a.description)},typeof c.description=="function"?c.description():c.description):null),F.isValidElement(c.cancel)?c.cancel:c.cancel&&Gs(c.cancel)?F.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||O,onClick:Ie=>{Gs(c.cancel)&&dn&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,Ie),_r())},className:Xn(H==null?void 0:H.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,F.isValidElement(c.action)?c.action:c.action&&Gs(c.action)?F.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||$,onClick:Ie=>{Gs(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,Ie),!Ie.defaultPrevented&&_r())},className:Xn(H==null?void 0:H.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function ph(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function B3(e,t){const n={};return[e,t].forEach((r,i)=>{const o=i===1,s=o?"--mobile-offset":"--offset",a=o?N3:I3;function l(u){["top","right","bottom","left"].forEach(d=>{n[`${s}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=a:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}const cU=F.forwardRef(function(t,n){const{id:r,invert:i,position:o="bottom-right",hotkey:s=["altKey","KeyT"],expand:a,closeButton:l,className:u,offset:d,mobileOffset:c,theme:h="light",richColors:p,duration:m,style:b,visibleToasts:y=v3,toastOptions:E,dir:x=ph(),gap:_=R3,icons:P,containerAriaLabel:R="Notifications"}=t,[C,S]=F.useState([]),O=F.useMemo(()=>r?C.filter(v=>v.toasterId===r):C.filter(v=>!v.toasterId),[C,r]),$=F.useMemo(()=>Array.from(new Set([o].concat(O.filter(v=>v.position).map(v=>v.position)))),[O,o]),[N,W]=F.useState([]),[U,w]=F.useState(!1),[D,M]=F.useState(!1),[H,z]=F.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=F.useRef(null),Q=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=F.useRef(null),se=F.useRef(!1),ne=F.useCallback(v=>{S(ye=>{var be;return(be=ye.find(Ee=>Ee.id===v.id))!=null&&be.delete||sn.dismiss(v.id),ye.filter(({id:Ee})=>Ee!==v.id)})},[]);return F.useEffect(()=>sn.subscribe(v=>{if(v.dismiss){requestAnimationFrame(()=>{S(ye=>ye.map(be=>be.id===v.id?{...be,delete:!0}:be))});return}setTimeout(()=>{Sm.flushSync(()=>{S(ye=>{const be=ye.findIndex(Ee=>Ee.id===v.id);return be!==-1?[...ye.slice(0,be),{...ye[be],...v},...ye.slice(be+1)]:[v,...ye]})})})}),[C]),F.useEffect(()=>{if(h!=="system"){z(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?z("dark"):z("light")),typeof window>"u")return;const v=window.matchMedia("(prefers-color-scheme: dark)");try{v.addEventListener("change",({matches:ye})=>{z(ye?"dark":"light")})}catch{v.addListener(({matches:be})=>{try{z(be?"dark":"light")}catch(Ee){console.error(Ee)}})}},[h]),F.useEffect(()=>{C.length<=1&&w(!1)},[C]),F.useEffect(()=>{const v=ye=>{var be;if(s.every(X=>ye[X]||ye.code===X)){var Qe;w(!0),(Qe=G.current)==null||Qe.focus()}ye.code==="Escape"&&(document.activeElement===G.current||(be=G.current)!=null&&be.contains(document.activeElement))&&w(!1)};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[s]),F.useEffect(()=>{if(G.current)return()=>{k.current&&(k.current.focus({preventScroll:!0}),k.current=null,se.current=!1)}},[G.current]),F.createElement("section",{ref:n,"aria-label":`${R} ${Q}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},$.map((v,ye)=>{var be;const[Ee,Qe]=v.split("-");return O.length?F.createElement("ol",{key:v,dir:x==="auto"?ph():x,tabIndex:-1,ref:G,className:u,"data-sonner-toaster":!0,"data-sonner-theme":H,"data-y-position":Ee,"data-x-position":Qe,style:{"--front-toast-height":`${((be=N[0])==null?void 0:be.height)||0}px`,"--width":`${O3}px`,"--gap":`${_}px`,...b,...B3(d,c)},onBlur:X=>{se.current&&!X.currentTarget.contains(X.relatedTarget)&&(se.current=!1,k.current&&(k.current.focus({preventScroll:!0}),k.current=null))},onFocus:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||se.current||(se.current=!0,k.current=X.relatedTarget)},onMouseEnter:()=>w(!0),onMouseMove:()=>w(!0),onMouseLeave:()=>{D||w(!1)},onDragEnd:()=>w(!1),onPointerDown:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||M(!0)},onPointerUp:()=>M(!1)},O.filter(X=>!X.position&&ye===0||X.position===v).map((X,ce)=>{var Se,He;return F.createElement(M3,{key:X.id,icons:P,index:ce,toast:X,defaultRichColors:p,duration:(Se=E==null?void 0:E.duration)!=null?Se:m,className:E==null?void 0:E.className,descriptionClassName:E==null?void 0:E.descriptionClassName,invert:i,visibleToasts:y,closeButton:(He=E==null?void 0:E.closeButton)!=null?He:l,interacting:D,position:v,style:E==null?void 0:E.style,unstyled:E==null?void 0:E.unstyled,classNames:E==null?void 0:E.classNames,cancelButtonStyle:E==null?void 0:E.cancelButtonStyle,actionButtonStyle:E==null?void 0:E.actionButtonStyle,closeButtonAriaLabel:E==null?void 0:E.closeButtonAriaLabel,removeToast:ne,toasts:O.filter(Je=>Je.position==X.position),heights:N.filter(Je=>Je.position==X.position),setHeights:W,expandByDefault:a,gap:_,expanded:U,swipeDirections:t.swipeDirections})})):null}))}),F3={success:(e,t)=>Ul.success(e,t),error:(e,t)=>Ul.error(e,t),info:(e,t)=>Ul.info(e,t)},H3=T.createContext(F3);function dU(){return T.useContext(H3)}function mh({className:e,style:t,...n}){return g.jsx("div",{...n,className:d2("rounded-md",e),style:{backgroundColor:"var(--ds-gray-200)",...t}})}const ws=(function(e){if(e==null)return j3;if(typeof e=="function")return dl(e);if(typeof e=="object")return Array.isArray(e)?z3(e):U3(e);if(typeof e=="string")return $3(e);throw new Error("Expected function, string, or object as test")});function z3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ws(e[n]);return dl(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function U3(e){const t=e;return dl(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function $3(e){return dl(t);function t(n){return n&&n.type===e}}function dl(e){return t;function t(n,r,i){return!!(V3(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function j3(){return!0}function V3(e){return e!==null&&typeof e=="object"&&"type"in e}const S1=[],vo=!0,Fu=!1,Io="skip";function W3(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=ws(i),s=r?-1:1;a(e,void 0,[])();function a(l,u,d){const c=l&&typeof l=="object"?l:{};if(typeof c.type=="string"){const p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=S1,m,b,y;if((!t||o(l,u,d[d.length-1]||void 0))&&(p=Y3(n(l,d)),p[0]===Fu))return p;if("children"in l&&l.children){const E=l;if(E.children&&p[0]!==Io)for(b=(r?E.children.length:-1)+s,y=d.concat(E);b>-1&&b<E.children.length;){const x=E.children[b];if(m=a(x,b,y)(),m[0]===Fu)return m;b=typeof m[1]=="number"?m[1]:b+s}}return p}}}function Y3(e){return Array.isArray(e)?e:typeof e=="number"?[vo,e]:e==null?S1:[e]}function Fr(e,t,n,r){let i,o,s;typeof t=="function"&&typeof n!="function"?(o=void 0,s=t,i=n):(o=t,s=n,i=r),W3(e,o,a,i);function a(l,u){const d=u[u.length-1],c=d?d.children.indexOf(l):void 0;return s(l,c,d)}}const Ki={indicator:"indicator",textOnly:"text-only",remove:"remove"};function Z3({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:o="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:s="text-gray-500",linkBlockPolicy:a=Ki.indicator,imageBlockPolicy:l=Ki.indicator}){const u=t.length&&!t.every(c=>c==="*"),d=n.length&&!n.every(c=>c==="*");if(!e&&(u||d))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return c=>{const h=J3(e,t,n,r,i,o,s,a,l);C1(c),Fr(c,h)}}function gh(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 G3(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const q3=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),K3=new Set(["javascript:","data:","file:","vbscript:"]);function bh(e,t,n,r=!1,i=!1,o=[]){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&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const d=e.substring(5);if(d&&d.length>0&&d!=="invalid")return e}}catch{return null}return null}const s=gh(e,n);if(!s||K3.has(s.protocol)||!(q3.has(s.protocol)||o.includes(s.protocol)||o.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const l=G3(e);return s&&t.some(u=>{const d=gh(u,n);return!d||d.origin!==s.origin?!1:s.href.startsWith(d.href)})?l?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:l?s.pathname+s.search+s.hash:s.href:null}function C1(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)C1(t)}}const $l=Symbol("node-seen");function X3(e,t,n){return t===Ki.remove?{type:"remove"}:t===Ki.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:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function Q3(e,t,n){if(t===Ki.remove)return{type:"remove"};if(t===Ki.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const J3=(e,t,n,r,i,o,s,a,l)=>{const u=(d,c,h)=>{if(d.type!=="element"||d[$l])return vo;if(d.tagName==="a"){const p=bh(d.properties.href,t,e,!1,!1,i);if(p===null){if(d[$l]=!0,Fr(d,u),h&&typeof c=="number"){const m=X3(d,a,s);if(m.type==="remove")return h.children.splice(c,1),[Io,c];h.children[c]=m.element}return Io}else return d.properties.href=p,d.properties.target="_blank",d.properties.rel="noopener noreferrer",vo}if(d.tagName==="img"){const p=bh(d.properties.src,n,e,r,!0,i);if(p===null){if(d[$l]=!0,Fr(d,u),h&&typeof c=="number"){const m=Q3(d,l,o);if(m.type==="remove")return h.children.splice(c,1),[Io,c];h.children[c]=m.element}return Io}else return d.properties.src=p,vo}return vo};return u},v1=-1,fl=0,Mo=1,Ma=2,td=3,nd=4,rd=5,id=6,I1=7,N1=8,Eh=typeof self=="object"?self:globalThis,eN=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case fl:case v1:return n(s,i);case Mo:{const a=n([],i);for(const l of s)a.push(r(l));return a}case Ma:{const a=n({},i);for(const[l,u]of s)a[r(l)]=r(u);return a}case td:return n(new Date(s),i);case nd:{const{source:a,flags:l}=s;return n(new RegExp(a,l),i)}case rd:{const a=n(new Map,i);for(const[l,u]of s)a.set(r(l),r(u));return a}case id:{const a=n(new Set,i);for(const l of s)a.add(r(l));return a}case I1:{const{name:a,message:l}=s;return n(new Eh[a](l),i)}case N1:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:a}=new Uint8Array(s);return n(new DataView(a),s)}}return n(new Eh[o](s),i)};return r},yh=e=>eN(new Map,e)(0),vi="",{toString:tN}={},{keys:nN}=Object,mo=e=>{const t=typeof e;if(t!=="object"||!e)return[fl,t];const n=tN.call(e).slice(8,-1);switch(n){case"Array":return[Mo,vi];case"Object":return[Ma,vi];case"Date":return[td,vi];case"RegExp":return[nd,vi];case"Map":return[rd,vi];case"Set":return[id,vi];case"DataView":return[Mo,n]}return n.includes("Array")?[Mo,n]:n.includes("Error")?[I1,n]:[Ma,n]},qs=([e,t])=>e===fl&&(t==="function"||t==="symbol"),rN=(e,t,n,r)=>{const i=(s,a)=>{const l=r.push(s)-1;return n.set(a,l),l},o=s=>{if(n.has(s))return n.get(s);let[a,l]=mo(s);switch(a){case fl:{let d=s;switch(l){case"bigint":a=N1,d=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);d=null;break;case"undefined":return i([v1],s)}return i([a,d],s)}case Mo:{if(l){let h=s;return l==="DataView"?h=new Uint8Array(s.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(s)),i([l,[...h]],s)}const d=[],c=i([a,d],s);for(const h of s)d.push(o(h));return c}case Ma:{if(l)switch(l){case"BigInt":return i([l,s.toString()],s);case"Boolean":case"Number":case"String":return i([l,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const d=[],c=i([a,d],s);for(const h of nN(s))(e||!qs(mo(s[h])))&&d.push([o(h),o(s[h])]);return c}case td:return i([a,s.toISOString()],s);case nd:{const{source:d,flags:c}=s;return i([a,{source:d,flags:c}],s)}case rd:{const d=[],c=i([a,d],s);for(const[h,p]of s)(e||!(qs(mo(h))||qs(mo(p))))&&d.push([o(h),o(p)]);return c}case id:{const d=[],c=i([a,d],s);for(const h of s)(e||!qs(mo(h)))&&d.push(o(h));return c}}const{message:u}=s;return i([a,{name:l,message:u}],s)};return o},Th=(e,{json:t,lossy:n}={})=>{const r=[];return rN(!(t||n),!!t,new Map,r)(e),r},hi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?yh(Th(e,t)):structuredClone(e):(e,t)=>yh(Th(e,t));let As=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};As.prototype.normal={};As.prototype.property={};As.prototype.space=void 0;function O1(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new As(n,r,t)}function ls(e){return e.toLowerCase()}let cn=class{constructor(t,n){this.attribute=n,this.property=t}};cn.prototype.attribute="";cn.prototype.booleanish=!1;cn.prototype.boolean=!1;cn.prototype.commaOrSpaceSeparated=!1;cn.prototype.commaSeparated=!1;cn.prototype.defined=!1;cn.prototype.mustUseProperty=!1;cn.prototype.number=!1;cn.prototype.overloadedBoolean=!1;cn.prototype.property="";cn.prototype.spaceSeparated=!1;cn.prototype.space=void 0;let iN=0;const Ne=ki(),St=ki(),Hu=ki(),re=ki(),st=ki(),Vi=ki(),mn=ki();function ki(){return 2**++iN}const zu=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ne,booleanish:St,commaOrSpaceSeparated:mn,commaSeparated:Vi,number:re,overloadedBoolean:Hu,spaceSeparated:st},Symbol.toStringTag,{value:"Module"})),jl=Object.keys(zu);let od=class extends cn{constructor(t,n,r,i){let o=-1;if(super(t,n),xh(this,"space",i),typeof r=="number")for(;++o<jl.length;){const s=jl[o];xh(this,jl[o],(r&zu[s])===zu[s])}}};od.prototype.defined=!0;function xh(e,t,n){n&&(e[t]=n)}function so(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new od(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[ls(r)]=r,n[ls(o.attribute)]=r}return new As(t,n,e.space)}const R1=so({properties:{ariaActiveDescendant:null,ariaAtomic:St,ariaAutoComplete:null,ariaBusy:St,ariaChecked:St,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:st,ariaCurrent:null,ariaDescribedBy:st,ariaDetails:null,ariaDisabled:St,ariaDropEffect:st,ariaErrorMessage:null,ariaExpanded:St,ariaFlowTo:st,ariaGrabbed:St,ariaHasPopup:null,ariaHidden:St,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:st,ariaLevel:re,ariaLive:null,ariaModal:St,ariaMultiLine:St,ariaMultiSelectable:St,ariaOrientation:null,ariaOwns:st,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:St,ariaReadOnly:St,ariaRelevant:null,ariaRequired:St,ariaRoleDescription:st,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:St,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function L1(e,t){return t in e?e[t]:t}function D1(e,t){return L1(e,t.toLowerCase())}const oN=so({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Vi,acceptCharset:st,accessKey:st,action:null,allow:null,allowFullScreen:Ne,allowPaymentRequest:Ne,allowUserMedia:Ne,alt:null,as:null,async:Ne,autoCapitalize:null,autoComplete:st,autoFocus:Ne,autoPlay:Ne,blocking:st,capture:null,charSet:null,checked:Ne,cite:null,className:st,cols:re,colSpan:null,content:null,contentEditable:St,controls:Ne,controlsList:st,coords:re|Vi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ne,defer:Ne,dir:null,dirName:null,disabled:Ne,download:Hu,draggable:St,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ne,formTarget:null,headers:st,height:re,hidden:Hu,high:re,href:null,hrefLang:null,htmlFor:st,httpEquiv:st,id:null,imageSizes:null,imageSrcSet:null,inert:Ne,inputMode:null,integrity:null,is:null,isMap:Ne,itemId:null,itemProp:st,itemRef:st,itemScope:Ne,itemType:st,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ne,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:Ne,muted:Ne,name:null,nonce:null,noModule:Ne,noValidate:Ne,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:Ne,optimum:re,pattern:null,ping:st,placeholder:null,playsInline:Ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ne,referrerPolicy:null,rel:st,required:Ne,reversed:Ne,rows:re,rowSpan:re,sandbox:st,scope:null,scoped:Ne,seamless:Ne,selected:Ne,shadowRootClonable:Ne,shadowRootDelegatesFocus:Ne,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:St,src:null,srcDoc:null,srcLang:null,srcSet:null,start:re,step:null,style:null,tabIndex:re,target:null,title:null,translate:null,type:null,typeMustMatch:Ne,useMap:null,value:St,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:st,axis:null,background:null,bgColor:null,border:re,borderColor:null,bottomMargin:re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ne,declare:Ne,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:Ne,noHref:Ne,noShade:Ne,noWrap:Ne,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:St,standby:null,summary:null,text:null,topMargin:re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ne,disableRemotePlayback:Ne,prefix:null,property:null,results:re,security:null,unselectable:null},space:"html",transform:D1}),sN=so({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:mn,accentHeight:re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:re,amplitude:re,arabicForm:null,ascent:re,attributeName:null,attributeType:null,azimuth:re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:re,by:null,calcMode:null,capHeight:re,className:st,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:re,diffuseConstant:re,direction:null,display:null,dur:null,divisor:re,dominantBaseline:null,download:Ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:re,enableBackground:null,end:null,event:null,exponent:re,externalResourcesRequired:null,fill:null,fillOpacity:re,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:Vi,g2:Vi,glyphName:Vi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:re,horizOriginX:re,horizOriginY:re,id:null,ideographic:re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:re,k:re,k1:re,k2:re,k3:re,k4:re,kernelMatrix:mn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:re,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:re,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:re,overlineThickness:re,paintOrder:null,panose1:null,path:null,pathLength:re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:st,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:mn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:mn,rev:mn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:mn,requiredFeatures:mn,requiredFonts:mn,requiredFormats:mn,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:re,specularExponent:re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:re,strikethroughThickness:re,string:null,stroke:null,strokeDashArray:mn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:re,strokeOpacity:re,strokeWidth:null,style:null,surfaceScale:re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:mn,tabIndex:re,tableValues:null,target:null,targetX:re,targetY:re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:mn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:re,underlineThickness:re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:re,values:null,vAlphabetic:re,vMathematical:re,vectorEffect:null,vHanging:re,vIdeographic:re,version:null,vertAdvY:re,vertOriginX:re,vertOriginY:re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:L1}),P1=so({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()}}),M1=so({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:D1}),B1=so({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),aN={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"},lN=/[A-Z]/g,_h=/-[a-z]/g,uN=/^data[-\w.:]+$/i;function sd(e,t){const n=ls(t);let r=t,i=cn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&uN.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(_h,dN);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!_h.test(o)){let s=o.replace(lN,cN);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=od}return new i(r,t)}function cN(e){return"-"+e.toLowerCase()}function dN(e){return e.charAt(1).toUpperCase()}const hl=O1([R1,oN,P1,M1,B1],"html"),ao=O1([R1,sN,P1,M1,B1],"svg");function kh(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const s=n.slice(i,r).trim();(s||!o)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function F1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const wh=/[#.]/g;function fN(e,t){const n=e||"",r={};let i=0,o,s;for(;i<n.length;){wh.lastIndex=i;const a=wh.exec(n),l=n.slice(i,a?a.index:n.length);l&&(o?o==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:s=l,i+=l.length),a&&(o=a[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function Ah(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function H1(e){return e.join(" ").trim()}function z1(e,t,n){const r=n?gN(n):void 0;function i(o,s,...a){let l;if(o==null){l={type:"root",children:[]};const u=s;a.unshift(u)}else{l=fN(o,t);const u=l.tagName.toLowerCase(),d=r?r.get(u):void 0;if(l.tagName=d||u,hN(s))a.unshift(s);else for(const[c,h]of Object.entries(s))pN(e,l.properties,c,h)}for(const u of a)Uu(l.children,u);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function hN(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const o=i;for(const s of o)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function pN(e,t,n,r){const i=sd(e,n);let o;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;o=r}else typeof r=="boolean"?o=r:typeof r=="string"?i.spaceSeparated?o=Ah(r):i.commaSeparated?o=kh(r):i.commaOrSpaceSeparated?o=Ah(kh(r).join(" ")):o=Sh(i,i.property,r):Array.isArray(r)?o=[...r]:o=i.property==="style"?mN(r):String(r);if(Array.isArray(o)){const s=[];for(const a of o)s.push(Sh(i,i.property,a));o=s}i.property==="className"&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[i.property]=o}}function Uu(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 n of t)Uu(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Uu(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Sh(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ls(n)===ls(t)))return!0}return n}function mN(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function gN(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const bN=["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"],EN=z1(hl,"div"),yN=z1(ao,"g",bN);function TN(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(o){if(typeof o=="number"&&o>-1&&o<=t.length){let s=0;for(;;){let a=n[s];if(a===void 0){const l=Ch(t,n[s-1]);a=l===-1?t.length+1:l+1,n[s]=a}if(a>o)return{line:s+1,column:o-(s>0?n[s-1]:0)+1,offset:o};s++}}}function i(o){if(o&&typeof o.line=="number"&&typeof o.column=="number"&&!Number.isNaN(o.line)&&!Number.isNaN(o.column)){for(;n.length<o.line;){const a=n[n.length-1],l=Ch(t,a),u=l===-1?t.length+1:l+1;if(a===u)break;n.push(u)}const s=(o.line>1?n[o.line-2]:0)+o.column-1;if(s<n[o.line-1])return s}}}function Ch(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
91
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const si={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/"},U1={}.hasOwnProperty,xN=Object.prototype;function _N(e,t){const n=t||{};return ad({file:n.file||void 0,location:!1,schema:n.space==="svg"?ao:hl,verbose:n.verbose||!1},e)}function ad(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},ba(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:$1(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const o=String(e.file),s=TN(o),a=s.toPoint(0),l=s.toPoint(o.length);n.position={start:a,end:l}}return n}case"#documentType":{const r=t;return n={type:"doctype"},ba(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},ba(e,r,n),n}default:return n=kN(e,t),n}}function $1(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=ad(e,t[n]);r.push(i)}return r}function kN(e,t){const n=e.schema;e.schema=t.namespaceURI===si.svg?ao:hl;let r=-1;const i={};for(;++r<t.attrs.length;){const a=t.attrs[r],l=(a.prefix?a.prefix+":":"")+a.name;U1.call(xN,l)||(i[l]=a.value)}const s=(e.schema.space==="svg"?yN:EN)(t.tagName,i,$1(e,t.childNodes));if(ba(e,t,s),s.tagName==="template"){const a=t,l=a.sourceCodeLocation,u=l&&l.startTag&&Fi(l.startTag),d=l&&l.endTag&&Fi(l.endTag),c=ad(e,a.content);u&&d&&e.file&&(c.position={start:u.end,end:d.start}),s.content=c}return e.schema=n,s}function ba(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=wN(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function wN(e,t,n){const r=Fi(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const o={};let s;if(n.attrs)for(s in n.attrs)U1.call(n.attrs,s)&&(o[sd(e.schema,s).property]=Fi(n.attrs[s]));n.startTag;const a=Fi(n.startTag),l=n.endTag?Fi(n.endTag):void 0,u={opening:a};l&&(u.closing=l),u.properties=o,t.data={position:u}}}return r}function Fi(e){const t=vh({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=vh({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function vh(e){return e.line&&e.column?e:void 0}class Ss{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ss.prototype.property={};Ss.prototype.normal={};Ss.prototype.space=null;function j1(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Ss(n,r,t)}function $u(e){return e.toLowerCase()}class Bn{constructor(t,n){this.property=t,this.attribute=n}}Bn.prototype.space=null;Bn.prototype.boolean=!1;Bn.prototype.booleanish=!1;Bn.prototype.overloadedBoolean=!1;Bn.prototype.number=!1;Bn.prototype.commaSeparated=!1;Bn.prototype.spaceSeparated=!1;Bn.prototype.commaOrSpaceSeparated=!1;Bn.prototype.mustUseProperty=!1;Bn.prototype.defined=!1;let AN=0;const ve=wi(),Ct=wi(),V1=wi(),ie=wi(),at=wi(),Wi=wi(),gn=wi();function wi(){return 2**++AN}const ju=Object.freeze(Object.defineProperty({__proto__:null,boolean:ve,booleanish:Ct,commaOrSpaceSeparated:gn,commaSeparated:Wi,number:ie,overloadedBoolean:V1,spaceSeparated:at},Symbol.toStringTag,{value:"Module"})),Vl=Object.keys(ju);class ld extends Bn{constructor(t,n,r,i){let o=-1;if(super(t,n),Ih(this,"space",i),typeof r=="number")for(;++o<Vl.length;){const s=Vl[o];Ih(this,Vl[o],(r&ju[s])===ju[s])}}}ld.prototype.defined=!0;function Ih(e,t,n){n&&(e[t]=n)}const SN={}.hasOwnProperty;function lo(e){const t={},n={};let r;for(r in e.properties)if(SN.call(e.properties,r)){const i=e.properties[r],o=new ld(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[$u(r)]=r,n[$u(o.attribute)]=r}return new Ss(t,n,e.space)}const W1=lo({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Y1=lo({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Z1(e,t){return t in e?e[t]:t}function G1(e,t){return Z1(e,t.toLowerCase())}const q1=lo({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:G1,properties:{xmlns:null,xmlnsXLink:null}}),K1=lo({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ct,ariaAutoComplete:null,ariaBusy:Ct,ariaChecked:Ct,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:at,ariaCurrent:null,ariaDescribedBy:at,ariaDetails:null,ariaDisabled:Ct,ariaDropEffect:at,ariaErrorMessage:null,ariaExpanded:Ct,ariaFlowTo:at,ariaGrabbed:Ct,ariaHasPopup:null,ariaHidden:Ct,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:at,ariaLevel:ie,ariaLive:null,ariaModal:Ct,ariaMultiLine:Ct,ariaMultiSelectable:Ct,ariaOrientation:null,ariaOwns:at,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:Ct,ariaReadOnly:Ct,ariaRelevant:null,ariaRequired:Ct,ariaRoleDescription:at,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:Ct,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null}}),CN=lo({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:G1,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Wi,acceptCharset:at,accessKey:at,action:null,allow:null,allowFullScreen:ve,allowPaymentRequest:ve,allowUserMedia:ve,alt:null,as:null,async:ve,autoCapitalize:null,autoComplete:at,autoFocus:ve,autoPlay:ve,blocking:at,capture:null,charSet:null,checked:ve,cite:null,className:at,cols:ie,colSpan:null,content:null,contentEditable:Ct,controls:ve,controlsList:at,coords:ie|Wi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ve,defer:ve,dir:null,dirName:null,disabled:ve,download:V1,draggable:Ct,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ve,formTarget:null,headers:at,height:ie,hidden:ve,high:ie,href:null,hrefLang:null,htmlFor:at,httpEquiv:at,id:null,imageSizes:null,imageSrcSet:null,inert:ve,inputMode:null,integrity:null,is:null,isMap:ve,itemId:null,itemProp:at,itemRef:at,itemScope:ve,itemType:at,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ve,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:ve,muted:ve,name:null,nonce:null,noModule:ve,noValidate:ve,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:ve,optimum:ie,pattern:null,ping:at,placeholder:null,playsInline:ve,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ve,referrerPolicy:null,rel:at,required:ve,reversed:ve,rows:ie,rowSpan:ie,sandbox:at,scope:null,scoped:ve,seamless:ve,selected:ve,shadowRootClonable:ve,shadowRootDelegatesFocus:ve,shadowRootMode:null,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:Ct,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:ve,useMap:null,value:Ct,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:at,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ve,declare:ve,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:ve,noHref:ve,noShade:ve,noWrap:ve,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:Ct,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ve,disableRemotePlayback:ve,prefix:null,property:null,results:ie,security:null,unselectable:null}}),vN=lo({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",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"},transform:Z1,properties:{about:gn,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:at,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:ve,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Wi,g2:Wi,glyphName:Wi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:gn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ie,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:at,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gn,rev:gn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gn,requiredFeatures:gn,requiredFonts:gn,requiredFormats:gn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:gn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gn,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),IN=/^data[-\w.:]+$/i,Nh=/-[a-z]/g,NN=/[A-Z]/g;function ON(e,t){const n=$u(t);let r=t,i=Bn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&IN.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Nh,LN);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Nh.test(o)){let s=o.replace(NN,RN);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=ld}return new i(r,t)}function RN(e){return"-"+e.toLowerCase()}function LN(e){return e.charAt(1).toUpperCase()}const DN=j1([Y1,W1,q1,K1,CN],"html"),X1=j1([Y1,W1,q1,K1,vN],"svg"),Oh={}.hasOwnProperty;function Q1(e,t){const n=t||{};function r(i,...o){let s=r.invalid;const a=r.handlers;if(i&&Oh.call(i,e)){const l=String(i[e]);s=Oh.call(a,l)?a[l]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const PN={},MN={}.hasOwnProperty,J1=Q1("type",{handlers:{root:FN,element:jN,text:UN,comment:$N,doctype:zN}});function BN(e,t){const r=(t||PN).space;return J1(e,r==="svg"?X1:DN)}function FN(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=ud(e.children,n,t),uo(e,n),n}function HN(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=ud(e.children,n,t),uo(e,n),n}function zN(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return uo(e,t),t}function UN(e){const t={nodeName:"#text",value:e.value,parentNode:null};return uo(e,t),t}function $N(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return uo(e,t),t}function jN(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=X1);const i=[];let o;if(e.properties){for(o in e.properties)if(o!=="children"&&MN.call(e.properties,o)){const l=VN(r,o,e.properties[o]);l&&i.push(l)}}const s=r.space,a={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:si[s],childNodes:[],parentNode:null};return a.childNodes=ud(e.children,a,r),uo(e,a),e.tagName==="template"&&e.content&&(a.content=HN(e.content,r)),a}function VN(e,t,n){const r=ON(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?F1(n):H1(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const o=i.name.indexOf(":");o<0?i.prefix="":(i.name=i.name.slice(o+1),i.prefix=r.attribute.slice(0,o)),i.namespace=si[r.space]}return i}function ud(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const o=J1(e[r],n);o.parentNode=t,i.push(o)}return i}function uo(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const WN=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],YN=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]),ft="�";var A;(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"})(A||(A={}));const rn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function eb(e){return e>=55296&&e<=57343}function ZN(e){return e>=56320&&e<=57343}function GN(e,t){return(e-55296)*1024+9216+t}function tb(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function nb(e){return e>=64976&&e<=65007||YN.has(e)}var Y;(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"})(Y||(Y={}));const qN=65536;class KN{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=qN,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,n){const{line:r,col:i,offset:o}=this,s=i+n,a=o+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:a,endOffset:a}}_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 n=this.html.charCodeAt(this.pos+1);if(ZN(n))return this.pos++,this._addGap(),GN(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,A.EOF;return this._err(Y.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,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,A.EOF;const r=this.html.charCodeAt(n);return r===A.CARRIAGE_RETURN?A.LINE_FEED:r}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,A.EOF;let t=this.html.charCodeAt(this.pos);return t===A.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,A.LINE_FEED):t===A.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,eb(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===A.LINE_FEED||t===A.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){tb(t)?this._err(Y.controlCharacterInInputStream):nb(t)&&this._err(Y.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Pe;(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"})(Pe||(Pe={}));function rb(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const XN=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୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢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;怳Ādpuct;戏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ǣጓ\0y;䐎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Ā;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀ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Ā;elƀ;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\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»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ↄⅪ←ٖ↛ǰ↉\0proø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;䅓Ācrir;榿;쀀𝔬ͯ\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\0m;櫳;櫽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))),QN=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 JN(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=QN.get(e))!==null&&t!==void 0?t:e}var Ft;(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"})(Ft||(Ft={}));const eO=32;var Or;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Or||(Or={}));function Vu(e){return e>=Ft.ZERO&&e<=Ft.NINE}function tO(e){return e>=Ft.UPPER_A&&e<=Ft.UPPER_F||e>=Ft.LOWER_A&&e<=Ft.LOWER_F}function nO(e){return e>=Ft.UPPER_A&&e<=Ft.UPPER_Z||e>=Ft.LOWER_A&&e<=Ft.LOWER_Z||Vu(e)}function rO(e){return e===Ft.EQUALS||nO(e)}var Mt;(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"})(Mt||(Mt={}));var mr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(mr||(mr={}));class iO{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Mt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=mr.Strict}startEntity(t){this.decodeMode=t,this.state=Mt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Mt.EntityStart:return t.charCodeAt(n)===Ft.NUM?(this.state=Mt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Mt.NamedEntity,this.stateNamedEntity(t,n));case Mt.NumericStart:return this.stateNumericStart(t,n);case Mt.NumericDecimal:return this.stateNumericDecimal(t,n);case Mt.NumericHex:return this.stateNumericHex(t,n);case Mt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|eO)===Ft.LOWER_X?(this.state=Mt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Mt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const o=r-n;this.result=this.result*Math.pow(i,o)+Number.parseInt(t.substr(n,o),i),this.consumed+=o}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Vu(i)||tO(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Vu(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Ft.SEMI)this.consumed+=1;else if(this.decodeMode===mr.Strict)return 0;return this.emitCodePoint(JN(this.result),this.consumed),this.errors&&(t!==Ft.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],o=(i&Or.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=oO(r,i,this.treeIndex+Math.max(1,o),s),this.treeIndex<0)return this.result===0||this.decodeMode===mr.Attribute&&(o===0||rO(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],o=(i&Or.VALUE_LENGTH)>>14,o!==0){if(s===Ft.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==mr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&Or.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Or.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Mt.NamedEntity:return this.result!==0&&(this.decodeMode!==mr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Mt.NumericDecimal:return this.emitNumericEntity(0,2);case Mt.NumericHex:return this.emitNumericEntity(0,3);case Mt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Mt.EntityStart:return 0}}}function oO(e,t,n,r){const i=(t&Or.BRANCH_LENGTH)>>7,o=t&Or.JUMP_TABLE;if(i===0)return o!==0&&r===o?n:-1;if(o){const l=r-o;return l<0||l>=i?-1:e[n+l]-1}let s=n,a=s+i-1;for(;s<=a;){const l=s+a>>>1,u=e[l];if(u<r)s=l+1;else if(u>r)a=l-1;else return e[l+i]}return-1}var J;(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/"})(J||(J={}));var ai;(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"})(ai||(ai={}));var Cn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Cn||(Cn={}));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 f;(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"})(f||(f={}));const sO=new Map([[j.A,f.A],[j.ADDRESS,f.ADDRESS],[j.ANNOTATION_XML,f.ANNOTATION_XML],[j.APPLET,f.APPLET],[j.AREA,f.AREA],[j.ARTICLE,f.ARTICLE],[j.ASIDE,f.ASIDE],[j.B,f.B],[j.BASE,f.BASE],[j.BASEFONT,f.BASEFONT],[j.BGSOUND,f.BGSOUND],[j.BIG,f.BIG],[j.BLOCKQUOTE,f.BLOCKQUOTE],[j.BODY,f.BODY],[j.BR,f.BR],[j.BUTTON,f.BUTTON],[j.CAPTION,f.CAPTION],[j.CENTER,f.CENTER],[j.CODE,f.CODE],[j.COL,f.COL],[j.COLGROUP,f.COLGROUP],[j.DD,f.DD],[j.DESC,f.DESC],[j.DETAILS,f.DETAILS],[j.DIALOG,f.DIALOG],[j.DIR,f.DIR],[j.DIV,f.DIV],[j.DL,f.DL],[j.DT,f.DT],[j.EM,f.EM],[j.EMBED,f.EMBED],[j.FIELDSET,f.FIELDSET],[j.FIGCAPTION,f.FIGCAPTION],[j.FIGURE,f.FIGURE],[j.FONT,f.FONT],[j.FOOTER,f.FOOTER],[j.FOREIGN_OBJECT,f.FOREIGN_OBJECT],[j.FORM,f.FORM],[j.FRAME,f.FRAME],[j.FRAMESET,f.FRAMESET],[j.H1,f.H1],[j.H2,f.H2],[j.H3,f.H3],[j.H4,f.H4],[j.H5,f.H5],[j.H6,f.H6],[j.HEAD,f.HEAD],[j.HEADER,f.HEADER],[j.HGROUP,f.HGROUP],[j.HR,f.HR],[j.HTML,f.HTML],[j.I,f.I],[j.IMG,f.IMG],[j.IMAGE,f.IMAGE],[j.INPUT,f.INPUT],[j.IFRAME,f.IFRAME],[j.KEYGEN,f.KEYGEN],[j.LABEL,f.LABEL],[j.LI,f.LI],[j.LINK,f.LINK],[j.LISTING,f.LISTING],[j.MAIN,f.MAIN],[j.MALIGNMARK,f.MALIGNMARK],[j.MARQUEE,f.MARQUEE],[j.MATH,f.MATH],[j.MENU,f.MENU],[j.META,f.META],[j.MGLYPH,f.MGLYPH],[j.MI,f.MI],[j.MO,f.MO],[j.MN,f.MN],[j.MS,f.MS],[j.MTEXT,f.MTEXT],[j.NAV,f.NAV],[j.NOBR,f.NOBR],[j.NOFRAMES,f.NOFRAMES],[j.NOEMBED,f.NOEMBED],[j.NOSCRIPT,f.NOSCRIPT],[j.OBJECT,f.OBJECT],[j.OL,f.OL],[j.OPTGROUP,f.OPTGROUP],[j.OPTION,f.OPTION],[j.P,f.P],[j.PARAM,f.PARAM],[j.PLAINTEXT,f.PLAINTEXT],[j.PRE,f.PRE],[j.RB,f.RB],[j.RP,f.RP],[j.RT,f.RT],[j.RTC,f.RTC],[j.RUBY,f.RUBY],[j.S,f.S],[j.SCRIPT,f.SCRIPT],[j.SEARCH,f.SEARCH],[j.SECTION,f.SECTION],[j.SELECT,f.SELECT],[j.SOURCE,f.SOURCE],[j.SMALL,f.SMALL],[j.SPAN,f.SPAN],[j.STRIKE,f.STRIKE],[j.STRONG,f.STRONG],[j.STYLE,f.STYLE],[j.SUB,f.SUB],[j.SUMMARY,f.SUMMARY],[j.SUP,f.SUP],[j.TABLE,f.TABLE],[j.TBODY,f.TBODY],[j.TEMPLATE,f.TEMPLATE],[j.TEXTAREA,f.TEXTAREA],[j.TFOOT,f.TFOOT],[j.TD,f.TD],[j.TH,f.TH],[j.THEAD,f.THEAD],[j.TITLE,f.TITLE],[j.TR,f.TR],[j.TRACK,f.TRACK],[j.TT,f.TT],[j.U,f.U],[j.UL,f.UL],[j.SVG,f.SVG],[j.VAR,f.VAR],[j.WBR,f.WBR],[j.XMP,f.XMP]]);function co(e){var t;return(t=sO.get(e))!==null&&t!==void 0?t:f.UNKNOWN}const te=f,aO={[J.HTML]:new Set([te.ADDRESS,te.APPLET,te.AREA,te.ARTICLE,te.ASIDE,te.BASE,te.BASEFONT,te.BGSOUND,te.BLOCKQUOTE,te.BODY,te.BR,te.BUTTON,te.CAPTION,te.CENTER,te.COL,te.COLGROUP,te.DD,te.DETAILS,te.DIR,te.DIV,te.DL,te.DT,te.EMBED,te.FIELDSET,te.FIGCAPTION,te.FIGURE,te.FOOTER,te.FORM,te.FRAME,te.FRAMESET,te.H1,te.H2,te.H3,te.H4,te.H5,te.H6,te.HEAD,te.HEADER,te.HGROUP,te.HR,te.HTML,te.IFRAME,te.IMG,te.INPUT,te.LI,te.LINK,te.LISTING,te.MAIN,te.MARQUEE,te.MENU,te.META,te.NAV,te.NOEMBED,te.NOFRAMES,te.NOSCRIPT,te.OBJECT,te.OL,te.P,te.PARAM,te.PLAINTEXT,te.PRE,te.SCRIPT,te.SECTION,te.SELECT,te.SOURCE,te.STYLE,te.SUMMARY,te.TABLE,te.TBODY,te.TD,te.TEMPLATE,te.TEXTAREA,te.TFOOT,te.TH,te.THEAD,te.TITLE,te.TR,te.TRACK,te.UL,te.WBR,te.XMP]),[J.MATHML]:new Set([te.MI,te.MO,te.MN,te.MS,te.MTEXT,te.ANNOTATION_XML]),[J.SVG]:new Set([te.TITLE,te.FOREIGN_OBJECT,te.DESC]),[J.XLINK]:new Set,[J.XML]:new Set,[J.XMLNS]:new Set},Wu=new Set([te.H1,te.H2,te.H3,te.H4,te.H5,te.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 wt={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function lO(e){return e>=A.DIGIT_0&&e<=A.DIGIT_9}function No(e){return e>=A.LATIN_CAPITAL_A&&e<=A.LATIN_CAPITAL_Z}function uO(e){return e>=A.LATIN_SMALL_A&&e<=A.LATIN_SMALL_Z}function Cr(e){return uO(e)||No(e)}function Rh(e){return Cr(e)||lO(e)}function Ks(e){return e+32}function ib(e){return e===A.SPACE||e===A.LINE_FEED||e===A.TABULATION||e===A.FORM_FEED}function Lh(e){return ib(e)||e===A.SOLIDUS||e===A.GREATER_THAN_SIGN}function cO(e){return e===A.NULL?Y.nullCharacterReference:e>1114111?Y.characterReferenceOutsideUnicodeRange:eb(e)?Y.surrogateCharacterReference:nb(e)?Y.noncharacterCharacterReference:tb(e)||e===A.CARRIAGE_RETURN?Y.controlCharacterReference:null}class dO{constructor(t,n){this.options=t,this.handler=n,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 KN(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new iO(XN,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Y.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(Y.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=cO(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}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==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}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 n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Pe.START_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Pe.END_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Pe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Pe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(rb(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(Y.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=co(t.tagName),t.type===Pe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(Y.endTagWithAttributes),t.selfClosing&&this._err(Y.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 Pe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Pe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Pe.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:Pe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=ib(t)?Pe.WHITESPACE_CHARACTER:t===A.NULL?Pe.NULL_CHARACTER:Pe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Pe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=I.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?mr.Attribute:mr.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 A.LESS_THAN_SIGN:{this.state=I.TAG_OPEN;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(Y.unexpectedNullCharacter),this._emitCodePoint(t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case A.AMPERSAND:{this._startCharacterReference();break}case A.LESS_THAN_SIGN:{this.state=I.RCDATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(ft);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case A.LESS_THAN_SIGN:{this.state=I.RAWTEXT_LESS_THAN_SIGN;break}case A.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(ft);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case A.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(ft);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case A.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(ft);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Cr(t))this._createStartTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case A.EXCLAMATION_MARK:{this.state=I.MARKUP_DECLARATION_OPEN;break}case A.SOLIDUS:{this.state=I.END_TAG_OPEN;break}case A.QUESTION_MARK:{this._err(Y.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t);break}case A.EOF:{this._err(Y.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Y.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=I.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Cr(t))this._createEndTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case A.GREATER_THAN_SIGN:{this._err(Y.missingEndTagName),this.state=I.DATA;break}case A.EOF:{this._err(Y.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(Y.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=I.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(Y.unexpectedNullCharacter),n.tagName+=ft;break}case A.EOF:{this._err(Y.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(No(t)?Ks(t):t)}}_stateRcdataLessThanSign(t){t===A.SOLIDUS?this.state=I.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Cr(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 n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=I.BEFORE_ATTRIBUTE_NAME,!1;case A.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=I.SELF_CLOSING_START_TAG,!1;case A.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===A.SOLIDUS?this.state=I.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Cr(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 A.SOLIDUS:{this.state=I.SCRIPT_DATA_END_TAG_OPEN;break}case A.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){Cr(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===A.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===A.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 A.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(ft);break}case A.EOF:{this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(Y.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(ft);break}case A.EOF:{this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(Y.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(ft);break}case A.EOF:{this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===A.SOLIDUS?this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Cr(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){Cr(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(rn.SCRIPT,!1)&&Lh(this.preprocessor.peek(rn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<rn.SCRIPT.length;n++)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 A.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(ft);break}case A.EOF:{this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(Y.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ft);break}case A.EOF:{this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(Y.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ft);break}case A.EOF:{this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===A.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(rn.SCRIPT,!1)&&Lh(this.preprocessor.peek(rn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<rn.SCRIPT.length;n++)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 A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._err(Y.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 A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this._leaveAttrName(),this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._leaveAttrName(),this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:{this._err(Y.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case A.NULL:{this._err(Y.unexpectedNullCharacter),this.currentAttr.name+=ft;break}default:this.currentAttr.name+=String.fromCodePoint(No(t)?Ks(t):t)}}_stateAfterAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case A.EQUALS_SIGN:{this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case A.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(Y.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{this.state=I.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this.state=I.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Y.missingAttributeValue),this.state=I.DATA,this.emitCurrentTagToken();break}default:this.state=I.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case A.QUOTATION_MARK:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(Y.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case A.EOF:{this._err(Y.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case A.APOSTROPHE:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(Y.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case A.EOF:{this._err(Y.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(Y.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:case A.EQUALS_SIGN:case A.GRAVE_ACCENT:{this._err(Y.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case A.EOF:{this._err(Y.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this._leaveAttrValue(),this.state=I.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(Y.eofInTag),this._emitEOFToken();break}default:this._err(Y.missingWhitespaceBetweenAttributes),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case A.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=I.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(Y.eofInTag),this._emitEOFToken();break}default:this._err(Y.unexpectedSolidusInTag),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case A.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case A.NULL:{this._err(Y.unexpectedNullCharacter),n.data+=ft;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(rn.DASH_DASH,!0)?(this._createCommentToken(rn.DASH_DASH.length+1),this.state=I.COMMENT_START):this._consumeSequenceIfMatch(rn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(rn.DOCTYPE.length+1),this.state=I.DOCTYPE):this._consumeSequenceIfMatch(rn.CDATA_START,!0)?this.inForeignNode?this.state=I.CDATA_SECTION:(this._err(Y.cdataInHtmlContent),this._createCommentToken(rn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=I.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Y.incorrectlyOpenedComment),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case A.HYPHEN_MINUS:{this.state=I.COMMENT_START_DASH;break}case A.GREATER_THAN_SIGN:{this._err(Y.abruptClosingOfEmptyComment),this.state=I.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case A.GREATER_THAN_SIGN:{this._err(Y.abruptClosingOfEmptyComment),this.state=I.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(Y.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=I.COMMENT_END_DASH;break}case A.LESS_THAN_SIGN:{n.data+="<",this.state=I.COMMENT_LESS_THAN_SIGN;break}case A.NULL:{this._err(Y.unexpectedNullCharacter),n.data+=ft;break}case A.EOF:{this._err(Y.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case A.EXCLAMATION_MARK:{n.data+="!",this.state=I.COMMENT_LESS_THAN_SIGN_BANG;break}case A.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===A.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=I.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===A.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=I.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==A.GREATER_THAN_SIGN&&t!==A.EOF&&this._err(Y.nestedComment),this.state=I.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case A.EOF:{this._err(Y.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case A.EXCLAMATION_MARK:{this.state=I.COMMENT_END_BANG;break}case A.HYPHEN_MINUS:{n.data+="-";break}case A.EOF:{this._err(Y.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{n.data+="--!",this.state=I.COMMENT_END_DASH;break}case A.GREATER_THAN_SIGN:{this._err(Y.incorrectlyClosedComment),this.state=I.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(Y.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=I.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case A.EOF:{this._err(Y.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.missingWhitespaceBeforeDoctypeName),this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(No(t))this._createDoctypeToken(String.fromCharCode(Ks(t))),this.state=I.DOCTYPE_NAME;else switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.NULL:{this._err(Y.unexpectedNullCharacter),this._createDoctypeToken(ft),this.state=I.DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this._err(Y.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case A.EOF:{this._err(Y.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=I.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=I.AFTER_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case A.NULL:{this._err(Y.unexpectedNullCharacter),n.name+=ft;break}case A.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(No(t)?Ks(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(rn.PUBLIC,!1)?this.state=I.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(rn.SYSTEM,!1)?this.state=I.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Y.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(Y.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(Y.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Y.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Y.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(Y.unexpectedNullCharacter),n.publicId+=ft;break}case A.GREATER_THAN_SIGN:{this._err(Y.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case A.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case A.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(Y.unexpectedNullCharacter),n.publicId+=ft;break}case A.GREATER_THAN_SIGN:{this._err(Y.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case A.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case A.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case A.QUOTATION_MARK:{this._err(Y.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(Y.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case A.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(Y.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(Y.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Y.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Y.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(Y.unexpectedNullCharacter),n.systemId+=ft;break}case A.GREATER_THAN_SIGN:{this._err(Y.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case A.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case A.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(Y.unexpectedNullCharacter),n.systemId+=ft;break}case A.GREATER_THAN_SIGN:{this._err(Y.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case A.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case A.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case A.NULL:{this._err(Y.unexpectedNullCharacter);break}case A.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case A.RIGHT_SQUARE_BRACKET:{this.state=I.CDATA_SECTION_BRACKET;break}case A.EOF:{this._err(Y.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===A.RIGHT_SQUARE_BRACKET?this.state=I.CDATA_SECTION_END:(this._emitChars("]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case A.GREATER_THAN_SIGN:{this.state=I.DATA;break}case A.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(A.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Rh(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Rh(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===A.SEMICOLON&&this._err(Y.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const ob=new Set([f.DD,f.DT,f.LI,f.OPTGROUP,f.OPTION,f.P,f.RB,f.RP,f.RT,f.RTC]),Dh=new Set([...ob,f.CAPTION,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]),Ba=new Set([f.APPLET,f.CAPTION,f.HTML,f.MARQUEE,f.OBJECT,f.TABLE,f.TD,f.TEMPLATE,f.TH]),fO=new Set([...Ba,f.OL,f.UL]),hO=new Set([...Ba,f.BUTTON]),Ph=new Set([f.ANNOTATION_XML,f.MI,f.MN,f.MO,f.MS,f.MTEXT]),Mh=new Set([f.DESC,f.FOREIGN_OBJECT,f.TITLE]),pO=new Set([f.TR,f.TEMPLATE,f.HTML]),mO=new Set([f.TBODY,f.TFOOT,f.THEAD,f.TEMPLATE,f.HTML]),gO=new Set([f.TABLE,f.TEMPLATE,f.HTML]),bO=new Set([f.TD,f.TH]);class EO{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=f.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===f.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===J.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),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 n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==J.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Wu,J.HTML)}popUntilTableCellPopped(){this.popUntilPopped(bO,J.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(gO,J.HTML)}clearBackToTableBodyContext(){this.clearBackTo(mO,J.HTML)}clearBackToTableRowContext(){this.clearBackTo(pO,J.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===f.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===f.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case J.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case J.SVG:{if(Mh.has(i))return!1;break}case J.MATHML:{if(Ph.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ba)}hasInListItemScope(t){return this.hasInDynamicScope(t,fO)}hasInButtonScope(t){return this.hasInDynamicScope(t,hO)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case J.HTML:{if(Wu.has(n))return!0;if(Ba.has(n))return!1;break}case J.SVG:{if(Mh.has(n))return!1;break}case J.MATHML:{if(Ph.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===J.HTML)switch(this.tagIDs[n]){case t:return!0;case f.TABLE:case f.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===J.HTML)switch(this.tagIDs[t]){case f.TBODY:case f.THEAD:case f.TFOOT:return!0;case f.TABLE:case f.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===J.HTML)switch(this.tagIDs[n]){case t:return!0;case f.OPTION:case f.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&ob.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Dh.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Dh.has(this.currentTagId);)this.pop()}}const Wl=3;var nr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(nr||(nr={}));const Bh={type:nr.Marker};class yO{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,o=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let a=0;a<this.entries.length;a++){const l=this.entries[a];if(l.type===nr.Marker)break;const{element:u}=l;if(this.treeAdapter.getTagName(u)===o&&this.treeAdapter.getNamespaceURI(u)===s){const d=this.treeAdapter.getAttrList(u);d.length===i&&r.push({idx:a,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Wl)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Wl)return;const i=new Map(n.map(s=>[s.name,s.value]));let o=0;for(let s=0;s<r.length;s++){const a=r[s];a.attrs.every(l=>i.get(l.name)===l.value)&&(o+=1,o>=Wl&&this.entries.splice(a.idx,1))}}insertMarker(){this.entries.unshift(Bh)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:nr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:nr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Bh);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===nr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===nr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===nr.Element&&n.element===t)}}const vr={createDocument(){return{nodeName:"#document",mode:Cn.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,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,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(o=>o.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const o={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};vr.appendChild(e,o)}},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 n=e.childNodes[e.childNodes.length-1];if(vr.isTextNode(n)){n.value+=t;return}}vr.appendChild(e,vr.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&vr.isTextNode(r)?r.value+=t:vr.insertBefore(e,vr.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},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}}},sb="html",TO="about:legacy-compat",xO="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",ab=["+//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//"],_O=[...ab,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],kO=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),lb=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],wO=[...lb,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Fh(e,t){return t.some(n=>e.startsWith(n))}function AO(e){return e.name===sb&&e.publicId===null&&(e.systemId===null||e.systemId===TO)}function SO(e){if(e.name!==sb)return Cn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===xO)return Cn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),kO.has(n))return Cn.QUIRKS;let r=t===null?_O:ab;if(Fh(n,r))return Cn.QUIRKS;if(r=t===null?lb:wO,Fh(n,r))return Cn.LIMITED_QUIRKS}return Cn.NO_QUIRKS}const Hh={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},CO="definitionurl",vO="definitionURL",IO=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])),NO=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:J.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:J.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:J.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:J.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:J.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:J.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:J.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:J.XML}],["xml:space",{prefix:"xml",name:"space",namespace:J.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:J.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:J.XMLNS}]]),OO=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])),RO=new Set([f.B,f.BIG,f.BLOCKQUOTE,f.BODY,f.BR,f.CENTER,f.CODE,f.DD,f.DIV,f.DL,f.DT,f.EM,f.EMBED,f.H1,f.H2,f.H3,f.H4,f.H5,f.H6,f.HEAD,f.HR,f.I,f.IMG,f.LI,f.LISTING,f.MENU,f.META,f.NOBR,f.OL,f.P,f.PRE,f.RUBY,f.S,f.SMALL,f.SPAN,f.STRONG,f.STRIKE,f.SUB,f.SUP,f.TABLE,f.TT,f.U,f.UL,f.VAR]);function LO(e){const t=e.tagID;return t===f.FONT&&e.attrs.some(({name:r})=>r===ai.COLOR||r===ai.SIZE||r===ai.FACE)||RO.has(t)}function ub(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===CO){e.attrs[t].name=vO;break}}function cb(e){for(let t=0;t<e.attrs.length;t++){const n=IO.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function cd(e){for(let t=0;t<e.attrs.length;t++){const n=NO.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function DO(e){const t=OO.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=co(e.tagName))}function PO(e,t){return t===J.MATHML&&(e===f.MI||e===f.MO||e===f.MN||e===f.MS||e===f.MTEXT)}function MO(e,t,n){if(t===J.MATHML&&e===f.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ai.ENCODING){const i=n[r].value.toLowerCase();return i===Hh.TEXT_HTML||i===Hh.APPLICATION_XML}}return t===J.SVG&&(e===f.FOREIGN_OBJECT||e===f.DESC||e===f.TITLE)}function BO(e,t,n,r){return(!r||r===J.HTML)&&MO(e,t,n)||(!r||r===J.MATHML)&&PO(e,t)}const FO="hidden",HO=8,zO=3;var L;(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"})(L||(L={}));const UO={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},db=new Set([f.TABLE,f.TBODY,f.TFOOT,f.THEAD,f.TR]),zh={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:vr,onParseError:null};class Uh{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=L.INITIAL,this.originalInsertionMode=L.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={...zh,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new dO(this.options,this),this.activeFormattingElements=new yO(this.treeAdapter),this.fragmentContextID=r?co(this.treeAdapter.getTagName(r)):f.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new EO(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...zh,...n};t??(t=r.treeAdapter.createElement(j.TEMPLATE,J.HTML,[]));const i=r.treeAdapter.createElement("documentmock",J.HTML,[]),o=new this(r,i,t);return o.fragmentContextID===f.TEMPLATE&&o.tmplInsertionModeStack.unshift(L.IN_TEMPLATE),o._initTokenizerForFragmentParsing(),o._insertFakeRootElement(),o._resetInsertionMode(),o._findFormInFragmentContext(),o}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const o=(i=t.location)!==null&&i!==void 0?i:UO,s={code:n,startLine:o.startLine,startCol:o.startCol,startOffset:o.startOffset,endLine:r?o.startLine:o.endLine,endCol:r?o.startCol:o.endCol,endOffset:r?o.startOffset:o.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,o;(o=(i=this.treeAdapter).onItemPush)===null||o===void 0||o.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let o,s;this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,s=this.fragmentContextID):{current:o,currentTagId:s}=this.openElements,this._setContextModes(o,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===J.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,J.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=L.TEXT}switchToPlaintextParsing(){this.insertionMode=L.TEXT,this.originalInsertionMode=L.IN_BODY,this.tokenizer.state=wt.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)!==J.HTML))switch(this.fragmentContextID){case f.TITLE:case f.TEXTAREA:{this.tokenizer.state=wt.RCDATA;break}case f.STYLE:case f.XMP:case f.IFRAME:case f.NOEMBED:case f.NOFRAMES:case f.NOSCRIPT:{this.tokenizer.state=wt.RAWTEXT;break}case f.SCRIPT:{this.tokenizer.state=wt.SCRIPT_DATA;break}case f.PLAINTEXT:{this.tokenizer.state=wt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(a=>this.treeAdapter.isDocumentTypeNode(a));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,J.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,J.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(j.HTML,J.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,f.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),o=r?i.lastIndexOf(r):i.length,s=i[o-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:l,endCol:u,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:l,endCol:u,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),o=n.type===Pe.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,o)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===f.SVG&&this.treeAdapter.getTagName(n)===j.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===J.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===f.MGLYPH||t.tagID===f.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,J.HTML)}_processToken(t){switch(t.type){case Pe.CHARACTER:{this.onCharacter(t);break}case Pe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Pe.COMMENT:{this.onComment(t);break}case Pe.DOCTYPE:{this.onDoctype(t);break}case Pe.START_TAG:{this._processStartTag(t);break}case Pe.END_TAG:{this.onEndTag(t);break}case Pe.EOF:{this.onEof(t);break}case Pe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),o=this.treeAdapter.getAttrList(n);return BO(t,i,o,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===nr.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const o=this.activeFormattingElements.entries[i];this._insertElement(o.token,this.treeAdapter.getNamespaceURI(o.element)),o.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=L.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(f.P),this.openElements.popUntilTagNamePopped(f.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case f.TR:{this.insertionMode=L.IN_ROW;return}case f.TBODY:case f.THEAD:case f.TFOOT:{this.insertionMode=L.IN_TABLE_BODY;return}case f.CAPTION:{this.insertionMode=L.IN_CAPTION;return}case f.COLGROUP:{this.insertionMode=L.IN_COLUMN_GROUP;return}case f.TABLE:{this.insertionMode=L.IN_TABLE;return}case f.BODY:{this.insertionMode=L.IN_BODY;return}case f.FRAMESET:{this.insertionMode=L.IN_FRAMESET;return}case f.SELECT:{this._resetInsertionModeForSelect(t);return}case f.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case f.HTML:{this.insertionMode=this.headElement?L.AFTER_HEAD:L.BEFORE_HEAD;return}case f.TD:case f.TH:{if(t>0){this.insertionMode=L.IN_CELL;return}break}case f.HEAD:{if(t>0){this.insertionMode=L.IN_HEAD;return}break}}this.insertionMode=L.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===f.TEMPLATE)break;if(r===f.TABLE){this.insertionMode=L.IN_SELECT_IN_TABLE;return}}this.insertionMode=L.IN_SELECT}_isElementCausesFosterParenting(t){return db.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 n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case f.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===J.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case f.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return aO[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){bL(this,t);return}switch(this.insertionMode){case L.INITIAL:{go(this,t);break}case L.BEFORE_HTML:{Bo(this,t);break}case L.BEFORE_HEAD:{Fo(this,t);break}case L.IN_HEAD:{Ho(this,t);break}case L.IN_HEAD_NO_SCRIPT:{zo(this,t);break}case L.AFTER_HEAD:{Uo(this,t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:{hb(this,t);break}case L.TEXT:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Yl(this,t);break}case L.IN_TABLE_TEXT:{yb(this,t);break}case L.IN_COLUMN_GROUP:{Fa(this,t);break}case L.AFTER_BODY:{Ha(this,t);break}case L.AFTER_AFTER_BODY:{Ea(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){gL(this,t);return}switch(this.insertionMode){case L.INITIAL:{go(this,t);break}case L.BEFORE_HTML:{Bo(this,t);break}case L.BEFORE_HEAD:{Fo(this,t);break}case L.IN_HEAD:{Ho(this,t);break}case L.IN_HEAD_NO_SCRIPT:{zo(this,t);break}case L.AFTER_HEAD:{Uo(this,t);break}case L.TEXT:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Yl(this,t);break}case L.IN_COLUMN_GROUP:{Fa(this,t);break}case L.AFTER_BODY:{Ha(this,t);break}case L.AFTER_AFTER_BODY:{Ea(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Yu(this,t);return}switch(this.insertionMode){case L.INITIAL:case L.BEFORE_HTML:case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_TEMPLATE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{Yu(this,t);break}case L.IN_TABLE_TEXT:{bo(this,t);break}case L.AFTER_BODY:{GO(this,t);break}case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{qO(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case L.INITIAL:{KO(this,t);break}case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:{this._err(t,Y.misplacedDoctype);break}case L.IN_TABLE_TEXT:{bo(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,Y.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?EL(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{go(this,t);break}case L.BEFORE_HTML:{XO(this,t);break}case L.BEFORE_HEAD:{JO(this,t);break}case L.IN_HEAD:{qn(this,t);break}case L.IN_HEAD_NO_SCRIPT:{nR(this,t);break}case L.AFTER_HEAD:{iR(this,t);break}case L.IN_BODY:{qt(this,t);break}case L.IN_TABLE:{Xi(this,t);break}case L.IN_TABLE_TEXT:{bo(this,t);break}case L.IN_CAPTION:{eL(this,t);break}case L.IN_COLUMN_GROUP:{hd(this,t);break}case L.IN_TABLE_BODY:{gl(this,t);break}case L.IN_ROW:{bl(this,t);break}case L.IN_CELL:{rL(this,t);break}case L.IN_SELECT:{_b(this,t);break}case L.IN_SELECT_IN_TABLE:{oL(this,t);break}case L.IN_TEMPLATE:{aL(this,t);break}case L.AFTER_BODY:{uL(this,t);break}case L.IN_FRAMESET:{cL(this,t);break}case L.AFTER_FRAMESET:{fL(this,t);break}case L.AFTER_AFTER_BODY:{pL(this,t);break}case L.AFTER_AFTER_FRAMESET:{mL(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?yL(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{go(this,t);break}case L.BEFORE_HTML:{QO(this,t);break}case L.BEFORE_HEAD:{eR(this,t);break}case L.IN_HEAD:{tR(this,t);break}case L.IN_HEAD_NO_SCRIPT:{rR(this,t);break}case L.AFTER_HEAD:{oR(this,t);break}case L.IN_BODY:{ml(this,t);break}case L.TEXT:{VR(this,t);break}case L.IN_TABLE:{us(this,t);break}case L.IN_TABLE_TEXT:{bo(this,t);break}case L.IN_CAPTION:{tL(this,t);break}case L.IN_COLUMN_GROUP:{nL(this,t);break}case L.IN_TABLE_BODY:{Zu(this,t);break}case L.IN_ROW:{xb(this,t);break}case L.IN_CELL:{iL(this,t);break}case L.IN_SELECT:{kb(this,t);break}case L.IN_SELECT_IN_TABLE:{sL(this,t);break}case L.IN_TEMPLATE:{lL(this,t);break}case L.AFTER_BODY:{Ab(this,t);break}case L.IN_FRAMESET:{dL(this,t);break}case L.AFTER_FRAMESET:{hL(this,t);break}case L.AFTER_AFTER_BODY:{Ea(this,t);break}}}onEof(t){switch(this.insertionMode){case L.INITIAL:{go(this,t);break}case L.BEFORE_HTML:{Bo(this,t);break}case L.BEFORE_HEAD:{Fo(this,t);break}case L.IN_HEAD:{Ho(this,t);break}case L.IN_HEAD_NO_SCRIPT:{zo(this,t);break}case L.AFTER_HEAD:{Uo(this,t);break}case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{bb(this,t);break}case L.TEXT:{WR(this,t);break}case L.IN_TABLE_TEXT:{bo(this,t);break}case L.IN_TEMPLATE:{wb(this,t);break}case L.AFTER_BODY:case L.IN_FRAMESET:case L.AFTER_FRAMESET:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{fd(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===A.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 L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.TEXT:case L.IN_COLUMN_GROUP:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{this._insertCharacters(t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:case L.AFTER_BODY:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{fb(this,t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Yl(this,t);break}case L.IN_TABLE_TEXT:{Eb(this,t);break}}}}function $O(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):gb(e,t),n}function jO(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function VO(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let o=0,s=i;s!==n;o++,s=i){i=e.openElements.getCommonAncestor(s);const a=e.activeFormattingElements.getElementEntry(s),l=a&&o>=zO;!a||l?(l&&e.activeFormattingElements.removeEntry(a),e.openElements.remove(s)):(s=WO(e,a),r===t&&(e.activeFormattingElements.bookmark=a),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function WO(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function YO(e,t,n){const r=e.treeAdapter.getTagName(t),i=co(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const o=e.treeAdapter.getNamespaceURI(t);i===f.TEMPLATE&&o===J.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function ZO(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,o=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,i.tagID)}function dd(e,t){for(let n=0;n<HO;n++){const r=$O(e,t);if(!r)break;const i=jO(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const o=VO(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(o),s&&YO(e,s,o),ZO(e,i,r)}}function Yu(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function GO(e,t){e._appendCommentNode(t,e.openElements.items[0])}function qO(e,t){e._appendCommentNode(t,e.document)}function fd(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const o=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(o);s&&!s.endTag&&e._setEndLocation(o,t)}}}}function KO(e,t){e._setDocumentType(t);const n=t.forceQuirks?Cn.QUIRKS:SO(t);AO(t)||e._err(t,Y.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=L.BEFORE_HTML}function go(e,t){e._err(t,Y.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Cn.QUIRKS),e.insertionMode=L.BEFORE_HTML,e._processToken(t)}function XO(e,t){t.tagID===f.HTML?(e._insertElement(t,J.HTML),e.insertionMode=L.BEFORE_HEAD):Bo(e,t)}function QO(e,t){const n=t.tagID;(n===f.HTML||n===f.HEAD||n===f.BODY||n===f.BR)&&Bo(e,t)}function Bo(e,t){e._insertFakeRootElement(),e.insertionMode=L.BEFORE_HEAD,e._processToken(t)}function JO(e,t){switch(t.tagID){case f.HTML:{qt(e,t);break}case f.HEAD:{e._insertElement(t,J.HTML),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD;break}default:Fo(e,t)}}function eR(e,t){const n=t.tagID;n===f.HEAD||n===f.BODY||n===f.HTML||n===f.BR?Fo(e,t):e._err(t,Y.endTagWithoutMatchingOpenElement)}function Fo(e,t){e._insertFakeElement(j.HEAD,f.HEAD),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD,e._processToken(t)}function qn(e,t){switch(t.tagID){case f.HTML:{qt(e,t);break}case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:{e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break}case f.TITLE:{e._switchToTextParsing(t,wt.RCDATA);break}case f.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,wt.RAWTEXT):(e._insertElement(t,J.HTML),e.insertionMode=L.IN_HEAD_NO_SCRIPT);break}case f.NOFRAMES:case f.STYLE:{e._switchToTextParsing(t,wt.RAWTEXT);break}case f.SCRIPT:{e._switchToTextParsing(t,wt.SCRIPT_DATA);break}case f.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=L.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(L.IN_TEMPLATE);break}case f.HEAD:{e._err(t,Y.misplacedStartTagForHeadElement);break}default:Ho(e,t)}}function tR(e,t){switch(t.tagID){case f.HEAD:{e.openElements.pop(),e.insertionMode=L.AFTER_HEAD;break}case f.BODY:case f.BR:case f.HTML:{Ho(e,t);break}case f.TEMPLATE:{Ai(e,t);break}default:e._err(t,Y.endTagWithoutMatchingOpenElement)}}function Ai(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==f.TEMPLATE&&e._err(t,Y.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Y.endTagWithoutMatchingOpenElement)}function Ho(e,t){e.openElements.pop(),e.insertionMode=L.AFTER_HEAD,e._processToken(t)}function nR(e,t){switch(t.tagID){case f.HTML:{qt(e,t);break}case f.BASEFONT:case f.BGSOUND:case f.HEAD:case f.LINK:case f.META:case f.NOFRAMES:case f.STYLE:{qn(e,t);break}case f.NOSCRIPT:{e._err(t,Y.nestedNoscriptInHead);break}default:zo(e,t)}}function rR(e,t){switch(t.tagID){case f.NOSCRIPT:{e.openElements.pop(),e.insertionMode=L.IN_HEAD;break}case f.BR:{zo(e,t);break}default:e._err(t,Y.endTagWithoutMatchingOpenElement)}}function zo(e,t){const n=t.type===Pe.EOF?Y.openElementsLeftAfterEof:Y.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=L.IN_HEAD,e._processToken(t)}function iR(e,t){switch(t.tagID){case f.HTML:{qt(e,t);break}case f.BODY:{e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=L.IN_BODY;break}case f.FRAMESET:{e._insertElement(t,J.HTML),e.insertionMode=L.IN_FRAMESET;break}case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:case f.NOFRAMES:case f.SCRIPT:case f.STYLE:case f.TEMPLATE:case f.TITLE:{e._err(t,Y.abandonedHeadElementChild),e.openElements.push(e.headElement,f.HEAD),qn(e,t),e.openElements.remove(e.headElement);break}case f.HEAD:{e._err(t,Y.misplacedStartTagForHeadElement);break}default:Uo(e,t)}}function oR(e,t){switch(t.tagID){case f.BODY:case f.HTML:case f.BR:{Uo(e,t);break}case f.TEMPLATE:{Ai(e,t);break}default:e._err(t,Y.endTagWithoutMatchingOpenElement)}}function Uo(e,t){e._insertFakeElement(j.BODY,f.BODY),e.insertionMode=L.IN_BODY,pl(e,t)}function pl(e,t){switch(t.type){case Pe.CHARACTER:{hb(e,t);break}case Pe.WHITESPACE_CHARACTER:{fb(e,t);break}case Pe.COMMENT:{Yu(e,t);break}case Pe.START_TAG:{qt(e,t);break}case Pe.END_TAG:{ml(e,t);break}case Pe.EOF:{bb(e,t);break}}}function fb(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function hb(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function sR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function aR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function lR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,J.HTML),e.insertionMode=L.IN_FRAMESET)}function uR(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function cR(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Wu.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,J.HTML)}function dR(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function fR(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,J.HTML),n||(e.formElement=e.openElements.current))}function hR(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===f.LI&&i===f.LI||(n===f.DD||n===f.DT)&&(i===f.DD||i===f.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==f.ADDRESS&&i!==f.DIV&&i!==f.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function pR(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.tokenizer.state=wt.PLAINTEXT}function mR(e,t){e.openElements.hasInScope(f.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1}function gR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(j.A);n&&(dd(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function bR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ER(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(f.NOBR)&&(dd(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function yR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function TR(e,t){e.treeAdapter.getDocumentMode(e.document)!==Cn.QUIRKS&&e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=L.IN_TABLE}function pb(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function mb(e){const t=rb(e,ai.TYPE);return t!=null&&t.toLowerCase()===FO}function xR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),mb(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function _R(e,t){e._appendElement(t,J.HTML),t.ackSelfClosing=!0}function kR(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function wR(e,t){t.tagName=j.IMG,t.tagID=f.IMG,pb(e,t)}function AR(e,t){e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.tokenizer.state=wt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=L.TEXT}function SR(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,wt.RAWTEXT)}function CR(e,t){e.framesetOk=!1,e._switchToTextParsing(t,wt.RAWTEXT)}function $h(e,t){e._switchToTextParsing(t,wt.RAWTEXT)}function vR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===L.IN_TABLE||e.insertionMode===L.IN_CAPTION||e.insertionMode===L.IN_TABLE_BODY||e.insertionMode===L.IN_ROW||e.insertionMode===L.IN_CELL?L.IN_SELECT_IN_TABLE:L.IN_SELECT}function IR(e,t){e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function NR(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,J.HTML)}function OR(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(f.RTC),e._insertElement(t,J.HTML)}function RR(e,t){e._reconstructActiveFormattingElements(),ub(t),cd(t),t.selfClosing?e._appendElement(t,J.MATHML):e._insertElement(t,J.MATHML),t.ackSelfClosing=!0}function LR(e,t){e._reconstructActiveFormattingElements(),cb(t),cd(t),t.selfClosing?e._appendElement(t,J.SVG):e._insertElement(t,J.SVG),t.ackSelfClosing=!0}function jh(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function qt(e,t){switch(t.tagID){case f.I:case f.S:case f.B:case f.U:case f.EM:case f.TT:case f.BIG:case f.CODE:case f.FONT:case f.SMALL:case f.STRIKE:case f.STRONG:{bR(e,t);break}case f.A:{gR(e,t);break}case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:{cR(e,t);break}case f.P:case f.DL:case f.OL:case f.UL:case f.DIV:case f.DIR:case f.NAV:case f.MAIN:case f.MENU:case f.ASIDE:case f.CENTER:case f.FIGURE:case f.FOOTER:case f.HEADER:case f.HGROUP:case f.DIALOG:case f.DETAILS:case f.ADDRESS:case f.ARTICLE:case f.SEARCH:case f.SECTION:case f.SUMMARY:case f.FIELDSET:case f.BLOCKQUOTE:case f.FIGCAPTION:{uR(e,t);break}case f.LI:case f.DD:case f.DT:{hR(e,t);break}case f.BR:case f.IMG:case f.WBR:case f.AREA:case f.EMBED:case f.KEYGEN:{pb(e,t);break}case f.HR:{kR(e,t);break}case f.RB:case f.RTC:{NR(e,t);break}case f.RT:case f.RP:{OR(e,t);break}case f.PRE:case f.LISTING:{dR(e,t);break}case f.XMP:{SR(e,t);break}case f.SVG:{LR(e,t);break}case f.HTML:{sR(e,t);break}case f.BASE:case f.LINK:case f.META:case f.STYLE:case f.TITLE:case f.SCRIPT:case f.BGSOUND:case f.BASEFONT:case f.TEMPLATE:{qn(e,t);break}case f.BODY:{aR(e,t);break}case f.FORM:{fR(e,t);break}case f.NOBR:{ER(e,t);break}case f.MATH:{RR(e,t);break}case f.TABLE:{TR(e,t);break}case f.INPUT:{xR(e,t);break}case f.PARAM:case f.TRACK:case f.SOURCE:{_R(e,t);break}case f.IMAGE:{wR(e,t);break}case f.BUTTON:{mR(e,t);break}case f.APPLET:case f.OBJECT:case f.MARQUEE:{yR(e,t);break}case f.IFRAME:{CR(e,t);break}case f.SELECT:{vR(e,t);break}case f.OPTION:case f.OPTGROUP:{IR(e,t);break}case f.NOEMBED:case f.NOFRAMES:{$h(e,t);break}case f.FRAMESET:{lR(e,t);break}case f.TEXTAREA:{AR(e,t);break}case f.NOSCRIPT:{e.options.scriptingEnabled?$h(e,t):jh(e,t);break}case f.PLAINTEXT:{pR(e,t);break}case f.COL:case f.TH:case f.TD:case f.TR:case f.HEAD:case f.FRAME:case f.TBODY:case f.TFOOT:case f.THEAD:case f.CAPTION:case f.COLGROUP:break;default:jh(e,t)}}function DR(e,t){if(e.openElements.hasInScope(f.BODY)&&(e.insertionMode=L.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function PR(e,t){e.openElements.hasInScope(f.BODY)&&(e.insertionMode=L.AFTER_BODY,Ab(e,t))}function MR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function BR(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(f.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(f.FORM):n&&e.openElements.remove(n))}function FR(e){e.openElements.hasInButtonScope(f.P)||e._insertFakeElement(j.P,f.P),e._closePElement()}function HR(e){e.openElements.hasInListItemScope(f.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(f.LI),e.openElements.popUntilTagNamePopped(f.LI))}function zR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function UR(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function $R(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function jR(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(j.BR,f.BR),e.openElements.pop(),e.framesetOk=!1}function gb(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const o=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==f.UNKNOWN||e.treeAdapter.getTagName(o)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(o,s))break}}function ml(e,t){switch(t.tagID){case f.A:case f.B:case f.I:case f.S:case f.U:case f.EM:case f.TT:case f.BIG:case f.CODE:case f.FONT:case f.NOBR:case f.SMALL:case f.STRIKE:case f.STRONG:{dd(e,t);break}case f.P:{FR(e);break}case f.DL:case f.UL:case f.OL:case f.DIR:case f.DIV:case f.NAV:case f.PRE:case f.MAIN:case f.MENU:case f.ASIDE:case f.BUTTON:case f.CENTER:case f.FIGURE:case f.FOOTER:case f.HEADER:case f.HGROUP:case f.DIALOG:case f.ADDRESS:case f.ARTICLE:case f.DETAILS:case f.SEARCH:case f.SECTION:case f.SUMMARY:case f.LISTING:case f.FIELDSET:case f.BLOCKQUOTE:case f.FIGCAPTION:{MR(e,t);break}case f.LI:{HR(e);break}case f.DD:case f.DT:{zR(e,t);break}case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:{UR(e);break}case f.BR:{jR(e);break}case f.BODY:{DR(e,t);break}case f.HTML:{PR(e,t);break}case f.FORM:{BR(e);break}case f.APPLET:case f.OBJECT:case f.MARQUEE:{$R(e,t);break}case f.TEMPLATE:{Ai(e,t);break}default:gb(e,t)}}function bb(e,t){e.tmplInsertionModeStack.length>0?wb(e,t):fd(e,t)}function VR(e,t){var n;t.tagID===f.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function WR(e,t){e._err(t,Y.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Yl(e,t){if(e.openElements.currentTagId!==void 0&&db.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=L.IN_TABLE_TEXT,t.type){case Pe.CHARACTER:{yb(e,t);break}case Pe.WHITESPACE_CHARACTER:{Eb(e,t);break}}else Cs(e,t)}function YR(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,J.HTML),e.insertionMode=L.IN_CAPTION}function ZR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=L.IN_COLUMN_GROUP}function GR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.COLGROUP,f.COLGROUP),e.insertionMode=L.IN_COLUMN_GROUP,hd(e,t)}function qR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=L.IN_TABLE_BODY}function KR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.TBODY,f.TBODY),e.insertionMode=L.IN_TABLE_BODY,gl(e,t)}function XR(e,t){e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function QR(e,t){mb(t)?e._appendElement(t,J.HTML):Cs(e,t),t.ackSelfClosing=!0}function JR(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,J.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Xi(e,t){switch(t.tagID){case f.TD:case f.TH:case f.TR:{KR(e,t);break}case f.STYLE:case f.SCRIPT:case f.TEMPLATE:{qn(e,t);break}case f.COL:{GR(e,t);break}case f.FORM:{JR(e,t);break}case f.TABLE:{XR(e,t);break}case f.TBODY:case f.TFOOT:case f.THEAD:{qR(e,t);break}case f.INPUT:{QR(e,t);break}case f.CAPTION:{YR(e,t);break}case f.COLGROUP:{ZR(e,t);break}default:Cs(e,t)}}function us(e,t){switch(t.tagID){case f.TABLE:{e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode());break}case f.TEMPLATE:{Ai(e,t);break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TBODY:case f.TD:case f.TFOOT:case f.TH:case f.THEAD:case f.TR:break;default:Cs(e,t)}}function Cs(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,pl(e,t),e.fosterParentingEnabled=n}function Eb(e,t){e.pendingCharacterTokens.push(t)}function yb(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function bo(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Cs(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Tb=new Set([f.CAPTION,f.COL,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]);function eL(e,t){const n=t.tagID;Tb.has(n)?e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,Xi(e,t)):qt(e,t)}function tL(e,t){const n=t.tagID;switch(n){case f.CAPTION:case f.TABLE:{e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,n===f.TABLE&&us(e,t));break}case f.BODY:case f.COL:case f.COLGROUP:case f.HTML:case f.TBODY:case f.TD:case f.TFOOT:case f.TH:case f.THEAD:case f.TR:break;default:ml(e,t)}}function hd(e,t){switch(t.tagID){case f.HTML:{qt(e,t);break}case f.COL:{e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break}case f.TEMPLATE:{qn(e,t);break}default:Fa(e,t)}}function nL(e,t){switch(t.tagID){case f.COLGROUP:{e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case f.TEMPLATE:{Ai(e,t);break}case f.COL:break;default:Fa(e,t)}}function Fa(e,t){e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE,e._processToken(t))}function gl(e,t){switch(t.tagID){case f.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,J.HTML),e.insertionMode=L.IN_ROW;break}case f.TH:case f.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(j.TR,f.TR),e.insertionMode=L.IN_ROW,bl(e,t);break}case f.CAPTION:case f.COL:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,Xi(e,t));break}default:Xi(e,t)}}function Zu(e,t){const n=t.tagID;switch(t.tagID){case f.TBODY:case f.TFOOT:case f.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case f.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,us(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TD:case f.TH:case f.TR:break;default:us(e,t)}}function bl(e,t){switch(t.tagID){case f.TH:case f.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,J.HTML),e.insertionMode=L.IN_CELL,e.activeFormattingElements.insertMarker();break}case f.CAPTION:case f.COL:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:case f.TR:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,gl(e,t));break}default:Xi(e,t)}}function xb(e,t){switch(t.tagID){case f.TR:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY);break}case f.TABLE:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,Zu(e,t));break}case f.TBODY:case f.TFOOT:case f.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(f.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,Zu(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TD:case f.TH:break;default:us(e,t)}}function rL(e,t){const n=t.tagID;Tb.has(n)?(e.openElements.hasInTableScope(f.TD)||e.openElements.hasInTableScope(f.TH))&&(e._closeTableCell(),bl(e,t)):qt(e,t)}function iL(e,t){const n=t.tagID;switch(n){case f.TD:case f.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_ROW);break}case f.TABLE:case f.TBODY:case f.TFOOT:case f.THEAD:case f.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),xb(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:break;default:ml(e,t)}}function _b(e,t){switch(t.tagID){case f.HTML:{qt(e,t);break}case f.OPTION:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._insertElement(t,J.HTML);break}case f.OPTGROUP:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._insertElement(t,J.HTML);break}case f.HR:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break}case f.INPUT:case f.KEYGEN:case f.TEXTAREA:case f.SELECT:{e.openElements.hasInSelectScope(f.SELECT)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),t.tagID!==f.SELECT&&e._processStartTag(t));break}case f.SCRIPT:case f.TEMPLATE:{qn(e,t);break}}}function kb(e,t){switch(t.tagID){case f.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===f.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===f.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop();break}case f.OPTION:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop();break}case f.SELECT:{e.openElements.hasInSelectScope(f.SELECT)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode());break}case f.TEMPLATE:{Ai(e,t);break}}}function oL(e,t){const n=t.tagID;n===f.CAPTION||n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR||n===f.TD||n===f.TH?(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e._processStartTag(t)):_b(e,t)}function sL(e,t){const n=t.tagID;n===f.CAPTION||n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR||n===f.TD||n===f.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e.onEndTag(t)):kb(e,t)}function aL(e,t){switch(t.tagID){case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:case f.NOFRAMES:case f.SCRIPT:case f.STYLE:case f.TEMPLATE:case f.TITLE:{qn(e,t);break}case f.CAPTION:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:{e.tmplInsertionModeStack[0]=L.IN_TABLE,e.insertionMode=L.IN_TABLE,Xi(e,t);break}case f.COL:{e.tmplInsertionModeStack[0]=L.IN_COLUMN_GROUP,e.insertionMode=L.IN_COLUMN_GROUP,hd(e,t);break}case f.TR:{e.tmplInsertionModeStack[0]=L.IN_TABLE_BODY,e.insertionMode=L.IN_TABLE_BODY,gl(e,t);break}case f.TD:case f.TH:{e.tmplInsertionModeStack[0]=L.IN_ROW,e.insertionMode=L.IN_ROW,bl(e,t);break}default:e.tmplInsertionModeStack[0]=L.IN_BODY,e.insertionMode=L.IN_BODY,qt(e,t)}}function lL(e,t){t.tagID===f.TEMPLATE&&Ai(e,t)}function wb(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):fd(e,t)}function uL(e,t){t.tagID===f.HTML?qt(e,t):Ha(e,t)}function Ab(e,t){var n;if(t.tagID===f.HTML){if(e.fragmentContext||(e.insertionMode=L.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===f.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Ha(e,t)}function Ha(e,t){e.insertionMode=L.IN_BODY,pl(e,t)}function cL(e,t){switch(t.tagID){case f.HTML:{qt(e,t);break}case f.FRAMESET:{e._insertElement(t,J.HTML);break}case f.FRAME:{e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break}case f.NOFRAMES:{qn(e,t);break}}}function dL(e,t){t.tagID===f.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==f.FRAMESET&&(e.insertionMode=L.AFTER_FRAMESET))}function fL(e,t){switch(t.tagID){case f.HTML:{qt(e,t);break}case f.NOFRAMES:{qn(e,t);break}}}function hL(e,t){t.tagID===f.HTML&&(e.insertionMode=L.AFTER_AFTER_FRAMESET)}function pL(e,t){t.tagID===f.HTML?qt(e,t):Ea(e,t)}function Ea(e,t){e.insertionMode=L.IN_BODY,pl(e,t)}function mL(e,t){switch(t.tagID){case f.HTML:{qt(e,t);break}case f.NOFRAMES:{qn(e,t);break}}}function gL(e,t){t.chars=ft,e._insertCharacters(t)}function bL(e,t){e._insertCharacters(t),e.framesetOk=!1}function Sb(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==J.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function EL(e,t){if(LO(t))Sb(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===J.MATHML?ub(t):r===J.SVG&&(DO(t),cb(t)),cd(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function yL(e,t){if(t.tagID===f.P||t.tagID===f.BR){Sb(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===J.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);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 El=Cb("end"),ur=Cb("start");function Cb(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function vb(e){const t=ur(e),n=El(e);if(t&&n)return{start:t,end:n}}const TL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,xL=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Vh={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Ib(e,t){const n=OL(e),r=Q1("type",{handlers:{root:_L,element:kL,text:wL,comment:Ob,doctype:AL,raw:CL},unknown:vL}),i={parser:n?new Uh(Vh):Uh.getFragmentParser(void 0,Vh),handle(a){r(a,i)},stitches:!1,options:t||{}};r(e,i),fo(i,ur());const o=n?i.parser.document:i.parser.getFragment(),s=_N(o,{file:i.options.file});return i.stitches&&Fr(s,"comment",function(a,l,u){const d=a;if(d.value.stitch&&u&&l!==void 0){const c=u.children;return c[l]=d.value.stitch,l}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Nb(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function _L(e,t){Nb(e.children,t)}function kL(e,t){IL(e,t),Nb(e.children,t),NL(e,t)}function wL(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Pe.CHARACTER,chars:e.value,location:vs(e)};fo(t,ur(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function AL(e,t){const n={type:Pe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:vs(e)};fo(t,ur(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function SL(e,t){t.stitches=!0;const n=RL(e);if("children"in e&&"children"in n){const r=Ib({type:"root",children:e.children},t.options);n.children=r.children}Ob({type:"comment",value:{stitch:n}},t)}function Ob(e,t){const n=e.value,r={type:Pe.COMMENT,data:n,location:vs(e)};fo(t,ur(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function CL(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,Rb(t,ur(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(TL,"<$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 n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function vL(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))SL(n,t);else{let r="";throw xL.has(n.type)&&(r=". 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 `"+n.type+"` node"+r)}}function fo(e,t){Rb(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,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=wt.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 Rb(e,t){if(t&&t.offset!==void 0){const n={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=n}}function IL(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===wt.PLAINTEXT)return;fo(t,ur(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:si.html;i===si.html&&n==="svg"&&(i=si.svg);const o=BN({...e,children:[]},{space:i===si.svg?"svg":"html"}),s={type:Pe.START_TAG,tagName:n,tagID:co(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:vs(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function NL(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&WN.includes(n)||t.parser.tokenizer.state===wt.PLAINTEXT)return;fo(t,El(e));const r={type:Pe.END_TAG,tagName:n,tagID:co(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:vs(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===wt.RCDATA||t.parser.tokenizer.state===wt.RAWTEXT||t.parser.tokenizer.state===wt.SCRIPT_DATA)&&(t.parser.tokenizer.state=wt.DATA)}function OL(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function vs(e){const t=ur(e)||{line:void 0,column:void 0,offset:void 0},n=El(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function RL(e){return"children"in e?hi({...e,children:[]}):hi(e)}function Gu(e){return function(t,n){return Ib(t,{...e,file:n})}}const Jr=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],$o={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Jr,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Jr],h2:[["className","sr-only"]],img:[...Jr,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Jr,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Jr],table:[...Jr],ul:[...Jr,["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"]},Ir={}.hasOwnProperty;function LL(e,t){let n={type:"root",children:[]};const r={schema:t?{...$o,...t}:$o,stack:[]},i=Lb(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function Lb(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return DL(e,n);case"doctype":return PL(e,n);case"element":return ML(e,n);case"root":return BL(e,n);case"text":return FL(e,n)}}}function DL(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),o={type:"comment",value:r<0?n:n.slice(0,r)};return Is(o,t),o}}function PL(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Is(n,t),n}}function ML(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Db(e,t.children),i=HL(e,t.properties);e.stack.pop();let o=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(o=!0,e.schema.ancestors&&Ir.call(e.schema.ancestors,n))){const a=e.schema.ancestors[n];let l=-1;for(o=!1;++l<a.length;)e.stack.includes(a[l])&&(o=!0)}if(!o)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const s={type:"element",tagName:n,properties:i,children:r};return Is(s,t),s}function BL(e,t){const r={type:"root",children:Db(e,t.children)};return Is(r,t),r}function FL(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Is(r,t),r}function Db(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const o=Lb(e,r[i]);o&&(Array.isArray(o)?n.push(...o):n.push(o))}}return n}function HL(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,o=r&&Ir.call(r,n)?r[n]:void 0,s=r&&Ir.call(r,"*")?r["*"]:void 0,a=t&&typeof t=="object"?t:{},l={};let u;for(u in a)if(Ir.call(a,u)){const d=a[u];let c=Wh(e,Yh(o,u),u,d);c==null&&(c=Wh(e,Yh(s,u),u,d)),c!=null&&(l[u]=c)}if(i&&Ir.call(i,n)){const d=i[n];for(u in d)Ir.call(d,u)&&!Ir.call(l,u)&&(l[u]=d[u])}return l}function Wh(e,t,n,r){return t?Array.isArray(r)?zL(e,t,n,r):Pb(e,t,n,r):void 0}function zL(e,t,n,r){let i=-1;const o=[];for(;++i<r.length;){const s=Pb(e,t,n,r[i]);(typeof s=="number"||typeof s=="string")&&o.push(s)}return o}function Pb(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&UL(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,o=0;for(;++o<t.length;){const s=t[o];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(r))){i=!0;break}}else if(s===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function UL(e,t,n){const r=e.schema.protocols&&Ir.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),o=i.indexOf(":"),s=i.indexOf("?"),a=i.indexOf("#"),l=i.indexOf("/");if(o<0||l>-1&&o>l||s>-1&&o>s||a>-1&&o>a)return!0;let u=-1;for(;++u<r.length;){const d=r[u];if(o===d.length&&i.slice(0,d.length)===d)return!0}return!1}function Is(e,t){const n=vb(t);t.data&&(e.data=hi(t.data)),n&&(e.position=n)}function Yh(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],o=typeof i=="string"?i:i[0];if(o===t)return i;o==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function Mb(e){return function(t){return LL(t,e)}}function Zh(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const en=Zr(/[A-Za-z]/),Yt=Zr(/[\dA-Za-z]/),$L=Zr(/[#-'*+\--9=?A-Z^-~]/);function za(e){return e!==null&&(e<32||e===127)}const qu=Zr(/\d/),jL=Zr(/[\dA-Fa-f]/),VL=Zr(/[!-/:-@[-`{-~]/);function Te(e){return e!==null&&e<-2}function ot(e){return e!==null&&(e<0||e===32)}function Me(e){return e===-2||e===-1||e===32}const yl=Zr(new RegExp("\\p{P}|\\p{S}","u")),pi=Zr(/\s/);function Zr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function WL(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Bb=[],YL=!0,Gh=!1,Fb="skip";function Hb(e,t,n,r){let i;i=t;const o=ws(i),s=1;a(e,void 0,[])();function a(l,u,d){const c=l&&typeof l=="object"?l:{};if(typeof c.type=="string"){const p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=Bb,m,b,y;if(o(l,u,d[d.length-1]||void 0)&&(p=ZL(n(l,d)),p[0]===Gh))return p;if("children"in l&&l.children){const E=l;if(E.children&&p[0]!==Fb)for(b=-1+s,y=d.concat(E);b>-1&&b<E.children.length;){const x=E.children[b];if(m=a(x,b,y)(),m[0]===Gh)return m;b=typeof m[1]=="number"?m[1]:b+s}}return p}}}function ZL(e){return Array.isArray(e)?e:typeof e=="number"?[YL,e]:e==null?Bb:[e]}function GL(e,t,n){const i=ws((n||{}).ignore||[]),o=qL(t);let s=-1;for(;++s<o.length;)Hb(e,"text",a);function a(u,d){let c=-1,h;for(;++c<d.length;){const p=d[c],m=h?h.children:void 0;if(i(p,m?m.indexOf(p):void 0,h))return;h=p}if(h)return l(u,d)}function l(u,d){const c=d[d.length-1],h=o[s][0],p=o[s][1];let m=0;const y=c.children.indexOf(u);let E=!1,x=[];h.lastIndex=0;let _=h.exec(u.value);for(;_;){const P=_.index,R={index:_.index,input:_.input,stack:[...d,u]};let C=p(..._,R);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?h.lastIndex=P+1:(m!==P&&x.push({type:"text",value:u.value.slice(m,P)}),Array.isArray(C)?x.push(...C):C&&x.push(C),m=P+_[0].length,E=!0),!h.global)break;_=h.exec(u.value)}return E?(m<u.value.length&&x.push({type:"text",value:u.value.slice(m)}),c.children.splice(y,1,...x)):x=[u],y+x.length}}function qL(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([KL(i[0]),XL(i[1])])}return t}function KL(e){return typeof e=="string"?new RegExp(WL(e),"g"):e}function XL(e){return typeof e=="function"?e:function(){return e}}const Zl="phrasing",Gl=["autolink","link","image","label"];function QL(){return{transforms:[o6],enter:{literalAutolink:e6,literalAutolinkEmail:ql,literalAutolinkHttp:ql,literalAutolinkWww:ql},exit:{literalAutolink:i6,literalAutolinkEmail:r6,literalAutolinkHttp:t6,literalAutolinkWww:n6}}}function JL(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Zl,notInConstruct:Gl},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Zl,notInConstruct:Gl},{character:":",before:"[ps]",after:"\\/",inConstruct:Zl,notInConstruct:Gl}]}}function e6(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ql(e){this.config.enter.autolinkProtocol.call(this,e)}function t6(e){this.config.exit.autolinkProtocol.call(this,e)}function n6(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 r6(e){this.config.exit.autolinkEmail.call(this,e)}function i6(e){this.exit(e)}function o6(e){GL(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,s6],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),a6]],{ignore:["link","linkReference"]})}function s6(e,t,n,r,i){let o="";if(!zb(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!l6(n)))return!1;const s=u6(n+r);if(!s[0])return!1;const a={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function a6(e,t,n,r){return!zb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function l6(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 u6(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Zh(e,"(");let o=Zh(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function zb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||pi(n)||yl(n))&&(!t||n!==47)}function Vn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Ub.peek=E6;function c6(){this.buffer()}function d6(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function f6(){this.buffer()}function h6(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function p6(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Vn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function m6(e){this.exit(e)}function g6(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Vn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function b6(e){this.exit(e)}function E6(){return"["}function Ub(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),s(),o+=i.move("]"),o}function y6(){return{enter:{gfmFootnoteCallString:c6,gfmFootnoteCall:d6,gfmFootnoteDefinitionLabelString:f6,gfmFootnoteDefinition:h6},exit:{gfmFootnoteCallString:p6,gfmFootnoteCall:m6,gfmFootnoteDefinitionLabelString:g6,gfmFootnoteDefinition:b6}}}function T6(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ub},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,s){const a=o.createTracker(s);let l=a.move("[^");const u=o.enter("footnoteDefinition"),d=o.enter("label");return l+=a.move(o.safe(o.associationId(r),{before:l,after:"]"})),d(),l+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),l+=a.move((t?`
|
|
92
|
-
`:" ")+o.indentLines(o.containerFlow(r,a.current()),t?$b:x6))),u(),l}}function x6(e,t,n){return t===0?e:$b(e,t,n)}function $b(e,t,n){return(n?"":" ")+e}const _6=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];jb.peek=C6;function k6(){return{canContainEols:["delete"],enter:{strikethrough:A6},exit:{strikethrough:S6}}}function w6(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:_6}],handlers:{delete:jb}}}function A6(e){this.enter({type:"delete",children:[]},e)}function S6(e){this.exit(e)}function jb(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function C6(){return"~"}function v6(e){return e.length}function I6(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||v6,o=[],s=[],a=[],l=[];let u=0,d=-1;for(;++d<e.length;){const b=[],y=[];let E=-1;for(e[d].length>u&&(u=e[d].length);++E<e[d].length;){const x=N6(e[d][E]);if(n.alignDelimiters!==!1){const _=i(x);y[E]=_,(l[E]===void 0||_>l[E])&&(l[E]=_)}b.push(x)}s[d]=b,a[d]=y}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)o[c]=qh(r[c]);else{const b=qh(r);for(;++c<u;)o[c]=b}c=-1;const h=[],p=[];for(;++c<u;){const b=o[c];let y="",E="";b===99?(y=":",E=":"):b===108?y=":":b===114&&(E=":");let x=n.alignDelimiters===!1?1:Math.max(1,l[c]-y.length-E.length);const _=y+"-".repeat(x)+E;n.alignDelimiters!==!1&&(x=y.length+x+E.length,x>l[c]&&(l[c]=x),p[c]=x),h[c]=_}s.splice(1,0,h),a.splice(1,0,p),d=-1;const m=[];for(;++d<s.length;){const b=s[d],y=a[d];c=-1;const E=[];for(;++c<u;){const x=b[c]||"";let _="",P="";if(n.alignDelimiters!==!1){const R=l[c]-(y[c]||0),C=o[c];C===114?_=" ".repeat(R):C===99?R%2?(_=" ".repeat(R/2+.5),P=" ".repeat(R/2-.5)):(_=" ".repeat(R/2),P=_):P=" ".repeat(R)}n.delimiterStart!==!1&&!c&&E.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&x==="")&&(n.delimiterStart!==!1||c)&&E.push(" "),n.alignDelimiters!==!1&&E.push(_),E.push(x),n.alignDelimiters!==!1&&E.push(P),n.padding!==!1&&E.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&E.push("|")}m.push(n.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return m.join(`
|
|
93
|
-
`)}function N6(e){return e==null?"":String(e)}function qh(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 O6(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),R6);return i(),s}function R6(e,t,n){return">"+(n?"":" ")+e}function L6(e,t){return Kh(e,t.inConstruct,!0)&&!Kh(e,t.notInConstruct,!1)}function Kh(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Xh(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
94
|
-
`&&L6(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
95
|
-
`}function D6(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function P6(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 M6(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 B6(e,t,n,r){const i=M6(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(P6(e,n)){const c=n.enter("codeIndented"),h=n.indentLines(o,F6);return c(),h}const a=n.createTracker(r),l=i.repeat(Math.max(D6(o,i)+1,3)),u=n.enter("codeFenced");let d=a.move(l);if(e.lang){const c=n.enter(`codeFencedLang${s}`);d+=a.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...a.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${s}`);d+=a.move(" "),d+=a.move(n.safe(e.meta,{before:d,after:`
|
|
96
|
-
`,encode:["`"],...a.current()})),c()}return d+=a.move(`
|
|
97
|
-
`),o&&(d+=a.move(o+`
|
|
98
|
-
`)),d+=a.move(l),u(),d}function F6(e,t,n){return(n?"":" ")+e}function pd(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 H6(e,t,n,r){const i=pd(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let a=n.enter("label");const l=n.createTracker(r);let u=l.move("[");return u+=l.move(n.safe(n.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(a=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
99
|
-
`,...l.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),a()),s(),u}function z6(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 cs(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Qi(e){if(e===null||ot(e)||pi(e))return 1;if(yl(e))return 2}function Ua(e,t,n){const r=Qi(e),i=Qi(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===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}}Vb.peek=U6;function Vb(e,t,n,r){const i=z6(n),o=n.enter("emphasis"),s=n.createTracker(r),a=s.move(i);let l=s.move(n.containerPhrasing(e,{after:i,before:a,...s.current()}));const u=l.charCodeAt(0),d=Ua(r.before.charCodeAt(r.before.length-1),u,i);d.inside&&(l=cs(u)+l.slice(1));const c=l.charCodeAt(l.length-1),h=Ua(r.after.charCodeAt(0),c,i);h.inside&&(l=l.slice(0,-1)+cs(c));const p=s.move(i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},a+l+p}function U6(e,t,n){return n.options.emphasis||"*"}const $6={};function md(e,t){const n=$6,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Wb(e,r,i)}function Wb(e,t,n){if(j6(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Qh(e.children,t,n)}return Array.isArray(e)?Qh(e,t,n):""}function Qh(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Wb(e[i],t,n);return r.join("")}function j6(e){return!!(e&&typeof e=="object")}function V6(e,t){let n=!1;return Fr(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Fu}),!!((!e.depth||e.depth<3)&&md(e)&&(t.options.setext||n))}function W6(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(V6(e,n)){const d=n.enter("headingSetext"),c=n.enter("phrasing"),h=n.containerPhrasing(e,{...o.current(),before:`
|
|
100
|
-
`,after:`
|
|
101
|
-
`});return c(),d(),h+`
|
|
102
|
-
`+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
|
|
103
|
-
`))+1))}const s="#".repeat(i),a=n.enter("headingAtx"),l=n.enter("phrasing");o.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
104
|
-
`,...o.current()});return/^[\t ]/.test(u)&&(u=cs(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),l(),a(),u}Yb.peek=Y6;function Yb(e){return e.value||""}function Y6(){return"<"}Zb.peek=Z6;function Zb(e,t,n,r){const i=pd(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let a=n.enter("label");const l=n.createTracker(r);let u=l.move("![");return u+=l.move(n.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(a=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),a()),u+=l.move(")"),s(),u}function Z6(){return"!"}Gb.peek=G6;function Gb(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const a=n.createTracker(r);let l=a.move("![");const u=n.safe(e.alt,{before:l,after:"]",...a.current()});l+=a.move(u+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const c=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=d,o(),i==="full"||!u||u!==c?l+=a.move(c+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function G6(){return"!"}qb.peek=q6;function qb(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],a=n.compilePattern(s);let l;if(s.atBreak)for(;l=a.exec(r);){let u=l.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(l.index+1)}}return i+r+i}function q6(){return"`"}function Kb(e,t){const n=md(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Xb.peek=K6;function Xb(e,t,n,r){const i=pd(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let a,l;if(Kb(e,n)){const d=n.stack;n.stack=[],a=n.enter("autolink");let c=s.move("<");return c+=s.move(n.containerPhrasing(e,{before:c,after:">",...s.current()})),c+=s.move(">"),a(),n.stack=d,c}a=n.enter("link"),l=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(l=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),l()),u+=s.move(")"),a(),u}function K6(e,t,n){return Kb(e,n)?"<":"["}Qb.peek=X6;function Qb(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const a=n.createTracker(r);let l=a.move("[");const u=n.containerPhrasing(e,{before:l,after:"]",...a.current()});l+=a.move(u+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const c=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=d,o(),i==="full"||!u||u!==c?l+=a.move(c+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function X6(){return"["}function gd(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 Q6(e){const t=gd(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function J6(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 Jb(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 e4(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?J6(n):gd(n);const a=e.ordered?s==="."?")":".":Q6(n);let l=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Jb(n)===s&&d){let c=-1;for(;++c<e.children.length;){const h=e.children[c];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(s=a),n.bulletCurrent=s;const u=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),u}function t4(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 n4(e,t,n,r){const i=t4(n);let o=n.bulletCurrent||gd(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(s-o.length)),a.shift(s);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),d);return l(),u;function d(c,h,p){return h?(p?"":" ".repeat(s))+c:(p?o:o+" ".repeat(s-o.length))+c}}function r4(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const i4=ws(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function o4(e,t,n,r){return(e.children.some(function(s){return i4(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function s4(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}eE.peek=a4;function eE(e,t,n,r){const i=s4(n),o=n.enter("strong"),s=n.createTracker(r),a=s.move(i+i);let l=s.move(n.containerPhrasing(e,{after:i,before:a,...s.current()}));const u=l.charCodeAt(0),d=Ua(r.before.charCodeAt(r.before.length-1),u,i);d.inside&&(l=cs(u)+l.slice(1));const c=l.charCodeAt(l.length-1),h=Ua(r.after.charCodeAt(0),c,i);h.inside&&(l=l.slice(0,-1)+cs(c));const p=s.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},a+l+p}function a4(e,t,n){return n.options.strong||"*"}function l4(e,t,n,r){return n.safe(e.value,r)}function u4(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 c4(e,t,n){const r=(Jb(n)+(n.options.ruleSpaces?" ":"")).repeat(u4(n));return n.options.ruleSpaces?r.slice(0,-1):r}const tE={blockquote:O6,break:Xh,code:B6,definition:H6,emphasis:Vb,hardBreak:Xh,heading:W6,html:Yb,image:Zb,imageReference:Gb,inlineCode:qb,link:Xb,linkReference:Qb,list:e4,listItem:n4,paragraph:r4,root:o4,strong:eE,text:l4,thematicBreak:c4},Jh=document.createElement("i");function bd(e){const t="&"+e+";";Jh.innerHTML=t;const n=Jh.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function nE(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const d4=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function f4(e){return e.replace(d4,h4)}function h4(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return nE(n.slice(o?2:1),o?16:10)}return bd(n)||e}function p4(){return{enter:{table:m4,tableData:ep,tableHeader:ep,tableRow:b4},exit:{codeText:E4,table:g4,tableData:Kl,tableHeader:Kl,tableRow:Kl}}}function m4(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function g4(e){this.exit(e),this.data.inTable=void 0}function b4(e){this.enter({type:"tableRow",children:[]},e)}function Kl(e){this.exit(e)}function ep(e){this.enter({type:"tableCell",children:[]},e)}function E4(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,y4));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function y4(e,t){return t==="|"?t:e}function T4(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
105
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:s,tableCell:l,tableRow:a}};function s(p,m,b,y){return u(d(p,b,y),p.align)}function a(p,m,b,y){const E=c(p,b,y),x=u([E]);return x.slice(0,x.indexOf(`
|
|
106
|
-
`))}function l(p,m,b,y){const E=b.enter("tableCell"),x=b.enter("phrasing"),_=b.containerPhrasing(p,{...y,before:o,after:o});return x(),E(),_}function u(p,m){return I6(p,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function d(p,m,b){const y=p.children;let E=-1;const x=[],_=m.enter("table");for(;++E<y.length;)x[E]=c(y[E],m,b);return _(),x}function c(p,m,b){const y=p.children;let E=-1;const x=[],_=m.enter("tableRow");for(;++E<y.length;)x[E]=l(y[E],p,m,b);return _(),x}function h(p,m,b){let y=tE.inlineCode(p,m,b);return b.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function x4(){return{exit:{taskListCheckValueChecked:tp,taskListCheckValueUnchecked:tp,paragraph:k4}}}function _4(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:w4}}}function tp(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function k4(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,s;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){s=a;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function w4(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(s);let l=tE.listItem(e,t,n,{...r,...a.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(d){return d+s}}function A4(){return[QL(),y6(),k6(),p4(),x4()]}function S4(e){return{extensions:[JL(),T6(e),w6(),T4(e),_4()]}}function wn(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function vn(e,t){return e.length>0?(wn(e,e.length,0,t),e):t}const np={}.hasOwnProperty;function rE(e){const t={};let n=-1;for(;++n<e.length;)C4(t,e[n]);return t}function C4(e,t){let n;for(n in t){const i=(np.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){np.call(i,s)||(i[s]=[]);const a=o[s];v4(i[s],Array.isArray(a)?a:a?[a]:[])}}}function v4(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);wn(e,0,0,r)}const I4={tokenize:P4,partial:!0},iE={tokenize:M4,partial:!0},oE={tokenize:B4,partial:!0},sE={tokenize:F4,partial:!0},N4={tokenize:H4,partial:!0},aE={name:"wwwAutolink",tokenize:L4,previous:uE},lE={name:"protocolAutolink",tokenize:D4,previous:cE},yr={name:"emailAutolink",tokenize:R4,previous:dE},cr={};function O4(){return{text:cr}}let ei=48;for(;ei<123;)cr[ei]=yr,ei++,ei===58?ei=65:ei===91&&(ei=97);cr[43]=yr;cr[45]=yr;cr[46]=yr;cr[95]=yr;cr[72]=[yr,lE];cr[104]=[yr,lE];cr[87]=[yr,aE];cr[119]=[yr,aE];function R4(e,t,n){const r=this;let i,o;return s;function s(c){return!Ku(c)||!dE.call(r,r.previous)||Ed(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return Ku(c)?(e.consume(c),a):c===64?(e.consume(c),l):n(c)}function l(c){return c===46?e.check(N4,d,u)(c):c===45||c===95||Yt(c)?(o=!0,e.consume(c),l):d(c)}function u(c){return e.consume(c),i=!0,l}function d(c){return o&&i&&en(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function L4(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!uE.call(r,r.previous)||Ed(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(I4,e.attempt(iE,e.attempt(oE,o),n),n)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function D4(e,t,n){const r=this;let i="",o=!1;return s;function s(c){return(c===72||c===104)&&cE.call(r,r.previous)&&!Ed(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),a):n(c)}function a(c){if(en(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(c),l}return n(c)}function l(c){return c===47?(e.consume(c),o?u:(o=!0,l)):n(c)}function u(c){return c===null||za(c)||ot(c)||pi(c)||yl(c)?n(c):e.attempt(iE,e.attempt(oE,d),n)(c)}function d(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function P4(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),o):n(s)}function o(s){return s===null?n(s):t(s)}}function M4(e,t,n){let r,i,o;return s;function s(u){return u===46||u===95?e.check(sE,l,a)(u):u===null||ot(u)||pi(u)||u!==45&&yl(u)?l(u):(o=!0,e.consume(u),s)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),s}function l(u){return i||r||!o?n(u):t(u)}}function B4(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(sE,t,o)(s):s===null||ot(s)||pi(s)?t(s):(e.consume(s),i)}function o(s){return s===41&&r++,e.consume(s),i}}function F4(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||ot(a)||pi(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||ot(a)||pi(a)?t(a):r(a)}function o(a){return en(a)?s(a):n(a)}function s(a){return a===59?(e.consume(a),r):en(a)?(e.consume(a),s):n(a)}}function H4(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return Yt(o)?n(o):t(o)}}function uE(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ot(e)}function cE(e){return!en(e)}function dE(e){return!(e===47||Ku(e))}function Ku(e){return e===43||e===45||e===46||e===95||Yt(e)}function Ed(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function ho(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&Yt(e.charCodeAt(n+1))&&Yt(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Tl(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Xu={name:"attention",resolveAll:z4,tokenize:U4};function z4(e,t){let n=-1,r,i,o,s,a,l,u,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},h={...e[n][1].start};rp(c,-l),rp(h,l),s={type:l>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},o={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},e[r][1].end={...s.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=vn(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=vn(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),u=vn(u,Tl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=vn(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=vn(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,wn(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function U4(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Qi(r);let o;return s;function s(l){return o=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===o)return e.consume(l),a;const u=e.exit("attentionSequence"),d=Qi(l),c=!d||d===2&&i||n.includes(l),h=!i||i===2&&d||n.includes(r);return u._open=!!(o===42?c:c&&(i||!h)),u._close=!!(o===42?h:h&&(d||!c)),t(l)}}function rp(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const $4={name:"autolink",tokenize:j4};function j4(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return en(p)?(e.consume(p),s):p===64?n(p):u(p)}function s(p){return p===43||p===45||p===46||Yt(p)?(r=1,a(p)):u(p)}function a(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||Yt(p))&&r++<32?(e.consume(p),a):(r=0,u(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||za(p)?n(p):(e.consume(p),l)}function u(p){return p===64?(e.consume(p),d):$L(p)?(e.consume(p),u):n(p)}function d(p){return Yt(p)?c(p):n(p)}function c(p){return p===46?(e.consume(p),r=0,d):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||Yt(p))&&r++<63){const m=p===45?h:c;return e.consume(p),m}return n(p)}}function Ve(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(l){return Me(l)?(e.enter(n),a(l)):t(l)}function a(l){return Me(l)&&o++<i?(e.consume(l),a):(e.exit(n),t(l))}}const Ns={partial:!0,tokenize:V4};function V4(e,t,n){return r;function r(o){return Me(o)?Ve(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Te(o)?t(o):n(o)}}const fE={continuation:{tokenize:Y4},exit:Z4,name:"blockQuote",tokenize:W4};function W4(e,t,n){const r=this;return i;function i(s){if(s===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return Me(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Y4(e,t,n){const r=this;return i;function i(s){return Me(s)?Ve(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(fE,t,n)(s)}}function Z4(e){e.exit("blockQuote")}const hE={name:"characterEscape",tokenize:G4};function G4(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return VL(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const pE={name:"characterReference",tokenize:q4};function q4(e,t,n){const r=this;let i=0,o,s;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),l}function l(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,s=Yt,d(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=jL,d):(e.enter("characterReferenceValue"),o=7,s=qu,d(c))}function d(c){if(c===59&&i){const h=e.exit("characterReferenceValue");return s===Yt&&!bd(r.sliceSerialize(h))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(c)&&i++<o?(e.consume(c),d):n(c)}}const ip={partial:!0,tokenize:X4},op={concrete:!0,name:"codeFenced",tokenize:K4};function K4(e,t,n){const r=this,i={partial:!0,tokenize:R};let o=0,s=0,a;return l;function l(C){return u(C)}function u(C){const S=r.events[r.events.length-1];return o=S&&S[1].type==="linePrefix"?S[2].sliceSerialize(S[1],!0).length:0,a=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(C)}function d(C){return C===a?(s++,e.consume(C),d):s<3?n(C):(e.exit("codeFencedFenceSequence"),Me(C)?Ve(e,c,"whitespace")(C):c(C))}function c(C){return C===null||Te(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(ip,b,P)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(C))}function h(C){return C===null||Te(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(C)):Me(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ve(e,p,"whitespace")(C)):C===96&&C===a?n(C):(e.consume(C),h)}function p(C){return C===null||Te(C)?c(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(C))}function m(C){return C===null||Te(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(C)):C===96&&C===a?n(C):(e.consume(C),m)}function b(C){return e.attempt(i,P,y)(C)}function y(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),E}function E(C){return o>0&&Me(C)?Ve(e,x,"linePrefix",o+1)(C):x(C)}function x(C){return C===null||Te(C)?e.check(ip,b,P)(C):(e.enter("codeFlowValue"),_(C))}function _(C){return C===null||Te(C)?(e.exit("codeFlowValue"),x(C)):(e.consume(C),_)}function P(C){return e.exit("codeFenced"),t(C)}function R(C,S,O){let $=0;return N;function N(M){return C.enter("lineEnding"),C.consume(M),C.exit("lineEnding"),W}function W(M){return C.enter("codeFencedFence"),Me(M)?Ve(C,U,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):U(M)}function U(M){return M===a?(C.enter("codeFencedFenceSequence"),w(M)):O(M)}function w(M){return M===a?($++,C.consume(M),w):$>=s?(C.exit("codeFencedFenceSequence"),Me(M)?Ve(C,D,"whitespace")(M):D(M)):O(M)}function D(M){return M===null||Te(M)?(C.exit("codeFencedFence"),S(M)):O(M)}}}function X4(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Xl={name:"codeIndented",tokenize:J4},Q4={partial:!0,tokenize:eD};function J4(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),Ve(e,o,"linePrefix",5)(u)}function o(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?l(u):Te(u)?e.attempt(Q4,s,l)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||Te(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),a)}function l(u){return e.exit("codeIndented"),t(u)}}function eD(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Te(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Ve(e,o,"linePrefix",5)(s)}function o(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):Te(s)?i(s):n(s)}}const tD={name:"codeText",previous:rD,resolve:nD,tokenize:iD};function nD(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function rD(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function iD(e,t,n){let r=0,i,o;return s;function s(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),l(c))}function l(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),l):c===96?(o=e.enter("codeTextSequence"),i=0,d(c)):Te(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||Te(c)?(e.exit("codeTextData"),l(c)):(e.consume(c),u)}function d(c){return c===96?(e.consume(c),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",u(c))}}class oD{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,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Eo(this.left,r),o.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),Eo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Eo(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 n=this.left.splice(t,Number.POSITIVE_INFINITY);Eo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Eo(this.left,n.reverse())}}}function Eo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function mE(e){const t={};let n=-1,r,i,o,s,a,l,u;const d=new oD(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,sD(d,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=d.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},a=d.slice(i,n),a.unshift(r),d.splice(i,n-i+1,a))}}return wn(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function sD(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const a=s.events,l=[],u={};let d,c,h=-1,p=n,m=0,b=0;const y=[b];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(d=r.sliceStream(p),p.next||d.push(null),c&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(b=h+1,y.push(b),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):y.pop(),h=y.length;h--;){const E=a.slice(y[h],y[h+1]),x=o.pop();l.push([x,x+E.length-1]),e.splice(x,2,E)}for(l.reverse(),h=-1;++h<l.length;)u[m+l[h][0]]=m+l[h][1],m+=l[h][1]-l[h][0]-1;return u}const aD={resolve:uD,tokenize:cD},lD={partial:!0,tokenize:dD};function uD(e){return mE(e),e}function cD(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):Te(a)?e.check(lD,s,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function s(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function dD(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ve(e,o,"linePrefix")}function o(s){if(s===null||Te(s))return n(s);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function gE(e,t,n,r,i,o,s,a,l){const u=l||Number.POSITIVE_INFINITY;let d=0;return c;function c(E){return E===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(E),e.exit(o),h):E===null||E===32||E===41||za(E)?n(E):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),b(E))}function h(E){return E===62?(e.enter(o),e.consume(E),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===62?(e.exit("chunkString"),e.exit(a),h(E)):E===null||E===60||Te(E)?n(E):(e.consume(E),E===92?m:p)}function m(E){return E===60||E===62||E===92?(e.consume(E),p):p(E)}function b(E){return!d&&(E===null||E===41||ot(E))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(E)):d<u&&E===40?(e.consume(E),d++,b):E===41?(e.consume(E),d--,b):E===null||E===32||E===40||za(E)?n(E):(e.consume(E),E===92?y:b)}function y(E){return E===40||E===41||E===92?(e.consume(E),b):b(E)}}function bE(e,t,n,r,i,o){const s=this;let a=0,l;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),d}function d(p){return a>999||p===null||p===91||p===93&&!l||p===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):Te(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===null||p===91||p===93||Te(p)||a++>999?(e.exit("chunkString"),d(p)):(e.consume(p),l||(l=!Me(p)),p===92?h:c)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,c):c(p)}}function EE(e,t,n,r,i,o){let s;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),s=h===40?41:h,l):n(h)}function l(h){return h===s?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),u(h))}function u(h){return h===s?(e.exit(o),l(s)):h===null?n(h):Te(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Ve(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===s||h===null||Te(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?c:d)}function c(h){return h===s||h===92?(e.consume(h),d):d(h)}}function jo(e,t){let n;return r;function r(i){return Te(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Me(i)?Ve(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const fD={name:"definition",tokenize:pD},hD={partial:!0,tokenize:mD};function pD(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),s(p)}function s(p){return bE.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=Vn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return ot(p)?jo(e,u)(p):u(p)}function u(p){return gE(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(hD,c,c)(p)}function c(p){return Me(p)?Ve(e,h,"whitespace")(p):h(p)}function h(p){return p===null||Te(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function mD(e,t,n){return r;function r(a){return ot(a)?jo(e,i)(a):n(a)}function i(a){return EE(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return Me(a)?Ve(e,s,"whitespace")(a):s(a)}function s(a){return a===null||Te(a)?t(a):n(a)}}const gD={name:"hardBreakEscape",tokenize:bD};function bD(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Te(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const ED={name:"headingAtx",resolve:yD,tokenize:TD};function yD(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},wn(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function TD(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),o(d)}function o(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&r++<6?(e.consume(d),s):d===null||ot(d)?(e.exit("atxHeadingSequence"),a(d)):n(d)}function a(d){return d===35?(e.enter("atxHeadingSequence"),l(d)):d===null||Te(d)?(e.exit("atxHeading"),t(d)):Me(d)?Ve(e,a,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function l(d){return d===35?(e.consume(d),l):(e.exit("atxHeadingSequence"),a(d))}function u(d){return d===null||d===35||ot(d)?(e.exit("atxHeadingText"),a(d)):(e.consume(d),u)}}const xD=["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"],sp=["pre","script","style","textarea"],_D={concrete:!0,name:"htmlFlow",resolveTo:AD,tokenize:SD},kD={partial:!0,tokenize:vD},wD={partial:!0,tokenize:CD};function AD(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 SD(e,t,n){const r=this;let i,o,s,a,l;return u;function u(v){return d(v)}function d(v){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(v),c}function c(v){return v===33?(e.consume(v),h):v===47?(e.consume(v),o=!0,b):v===63?(e.consume(v),i=3,r.interrupt?t:k):en(v)?(e.consume(v),s=String.fromCharCode(v),y):n(v)}function h(v){return v===45?(e.consume(v),i=2,p):v===91?(e.consume(v),i=5,a=0,m):en(v)?(e.consume(v),i=4,r.interrupt?t:k):n(v)}function p(v){return v===45?(e.consume(v),r.interrupt?t:k):n(v)}function m(v){const ye="CDATA[";return v===ye.charCodeAt(a++)?(e.consume(v),a===ye.length?r.interrupt?t:U:m):n(v)}function b(v){return en(v)?(e.consume(v),s=String.fromCharCode(v),y):n(v)}function y(v){if(v===null||v===47||v===62||ot(v)){const ye=v===47,be=s.toLowerCase();return!ye&&!o&&sp.includes(be)?(i=1,r.interrupt?t(v):U(v)):xD.includes(s.toLowerCase())?(i=6,ye?(e.consume(v),E):r.interrupt?t(v):U(v)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(v):o?x(v):_(v))}return v===45||Yt(v)?(e.consume(v),s+=String.fromCharCode(v),y):n(v)}function E(v){return v===62?(e.consume(v),r.interrupt?t:U):n(v)}function x(v){return Me(v)?(e.consume(v),x):N(v)}function _(v){return v===47?(e.consume(v),N):v===58||v===95||en(v)?(e.consume(v),P):Me(v)?(e.consume(v),_):N(v)}function P(v){return v===45||v===46||v===58||v===95||Yt(v)?(e.consume(v),P):R(v)}function R(v){return v===61?(e.consume(v),C):Me(v)?(e.consume(v),R):_(v)}function C(v){return v===null||v===60||v===61||v===62||v===96?n(v):v===34||v===39?(e.consume(v),l=v,S):Me(v)?(e.consume(v),C):O(v)}function S(v){return v===l?(e.consume(v),l=null,$):v===null||Te(v)?n(v):(e.consume(v),S)}function O(v){return v===null||v===34||v===39||v===47||v===60||v===61||v===62||v===96||ot(v)?R(v):(e.consume(v),O)}function $(v){return v===47||v===62||Me(v)?_(v):n(v)}function N(v){return v===62?(e.consume(v),W):n(v)}function W(v){return v===null||Te(v)?U(v):Me(v)?(e.consume(v),W):n(v)}function U(v){return v===45&&i===2?(e.consume(v),H):v===60&&i===1?(e.consume(v),z):v===62&&i===4?(e.consume(v),se):v===63&&i===3?(e.consume(v),k):v===93&&i===5?(e.consume(v),Q):Te(v)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(kD,ne,w)(v)):v===null||Te(v)?(e.exit("htmlFlowData"),w(v)):(e.consume(v),U)}function w(v){return e.check(wD,D,ne)(v)}function D(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),M}function M(v){return v===null||Te(v)?w(v):(e.enter("htmlFlowData"),U(v))}function H(v){return v===45?(e.consume(v),k):U(v)}function z(v){return v===47?(e.consume(v),s="",G):U(v)}function G(v){if(v===62){const ye=s.toLowerCase();return sp.includes(ye)?(e.consume(v),se):U(v)}return en(v)&&s.length<8?(e.consume(v),s+=String.fromCharCode(v),G):U(v)}function Q(v){return v===93?(e.consume(v),k):U(v)}function k(v){return v===62?(e.consume(v),se):v===45&&i===2?(e.consume(v),k):U(v)}function se(v){return v===null||Te(v)?(e.exit("htmlFlowData"),ne(v)):(e.consume(v),se)}function ne(v){return e.exit("htmlFlow"),t(v)}}function CD(e,t,n){const r=this;return i;function i(s){return Te(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function vD(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ns,t,n)}}const ID={name:"htmlText",tokenize:ND};function ND(e,t,n){const r=this;let i,o,s;return a;function a(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),l}function l(k){return k===33?(e.consume(k),u):k===47?(e.consume(k),R):k===63?(e.consume(k),_):en(k)?(e.consume(k),O):n(k)}function u(k){return k===45?(e.consume(k),d):k===91?(e.consume(k),o=0,m):en(k)?(e.consume(k),x):n(k)}function d(k){return k===45?(e.consume(k),p):n(k)}function c(k){return k===null?n(k):k===45?(e.consume(k),h):Te(k)?(s=c,z(k)):(e.consume(k),c)}function h(k){return k===45?(e.consume(k),p):c(k)}function p(k){return k===62?H(k):k===45?h(k):c(k)}function m(k){const se="CDATA[";return k===se.charCodeAt(o++)?(e.consume(k),o===se.length?b:m):n(k)}function b(k){return k===null?n(k):k===93?(e.consume(k),y):Te(k)?(s=b,z(k)):(e.consume(k),b)}function y(k){return k===93?(e.consume(k),E):b(k)}function E(k){return k===62?H(k):k===93?(e.consume(k),E):b(k)}function x(k){return k===null||k===62?H(k):Te(k)?(s=x,z(k)):(e.consume(k),x)}function _(k){return k===null?n(k):k===63?(e.consume(k),P):Te(k)?(s=_,z(k)):(e.consume(k),_)}function P(k){return k===62?H(k):_(k)}function R(k){return en(k)?(e.consume(k),C):n(k)}function C(k){return k===45||Yt(k)?(e.consume(k),C):S(k)}function S(k){return Te(k)?(s=S,z(k)):Me(k)?(e.consume(k),S):H(k)}function O(k){return k===45||Yt(k)?(e.consume(k),O):k===47||k===62||ot(k)?$(k):n(k)}function $(k){return k===47?(e.consume(k),H):k===58||k===95||en(k)?(e.consume(k),N):Te(k)?(s=$,z(k)):Me(k)?(e.consume(k),$):H(k)}function N(k){return k===45||k===46||k===58||k===95||Yt(k)?(e.consume(k),N):W(k)}function W(k){return k===61?(e.consume(k),U):Te(k)?(s=W,z(k)):Me(k)?(e.consume(k),W):$(k)}function U(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),i=k,w):Te(k)?(s=U,z(k)):Me(k)?(e.consume(k),U):(e.consume(k),D)}function w(k){return k===i?(e.consume(k),i=void 0,M):k===null?n(k):Te(k)?(s=w,z(k)):(e.consume(k),w)}function D(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||ot(k)?$(k):(e.consume(k),D)}function M(k){return k===47||k===62||ot(k)?$(k):n(k)}function H(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function z(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),G}function G(k){return Me(k)?Ve(e,Q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):Q(k)}function Q(k){return e.enter("htmlTextData"),s(k)}}const yd={name:"labelEnd",resolveAll:DD,resolveTo:PD,tokenize:MD},OD={tokenize:BD},RD={tokenize:FD},LD={tokenize:HD};function DD(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&wn(e,0,e.length,n),e}function PD(e,t){let n=e.length,r=0,i,o,s,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const l={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},d={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return a=[["enter",l,t],["enter",u,t]],a=vn(a,e.slice(o+1,o+r+3)),a=vn(a,[["enter",d,t]]),a=vn(a,Tl(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),a=vn(a,[["exit",d,t],e[s-2],e[s-1],["exit",u,t]]),a=vn(a,e.slice(s+1)),a=vn(a,[["exit",l,t]]),wn(e,o,e.length,a),e}function MD(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(h){return o?o._inactive?c(h):(s=r.parser.defined.includes(Vn(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),l):n(h)}function l(h){return h===40?e.attempt(OD,d,s?d:c)(h):h===91?e.attempt(RD,d,s?u:c)(h):s?d(h):c(h)}function u(h){return e.attempt(LD,d,c)(h)}function d(h){return t(h)}function c(h){return o._balanced=!0,n(h)}}function BD(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return ot(c)?jo(e,o)(c):o(c)}function o(c){return c===41?d(c):gE(e,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function s(c){return ot(c)?jo(e,l)(c):d(c)}function a(c){return n(c)}function l(c){return c===34||c===39||c===40?EE(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):d(c)}function u(c){return ot(c)?jo(e,d)(c):d(c)}function d(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function FD(e,t,n){const r=this;return i;function i(a){return bE.call(r,e,o,s,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(Vn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function s(a){return n(a)}}function HD(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const zD={name:"labelStartImage",resolveAll:yd.resolveAll,tokenize:UD};function UD(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const $D={name:"labelStartLink",resolveAll:yd.resolveAll,tokenize:jD};function jD(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Ql={name:"lineEnding",tokenize:VD};function VD(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ve(e,t,"linePrefix")}}const ya={name:"thematicBreak",tokenize:WD};function WD(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||Te(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),Me(u)?Ve(e,a,"whitespace")(u):a(u))}}const on={continuation:{tokenize:qD},exit:XD,name:"list",tokenize:GD},YD={partial:!0,tokenize:QD},ZD={partial:!0,tokenize:KD};function GD(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:qu(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(ya,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return qu(p)&&++s<10?(e.consume(p),l):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Ns,r.interrupt?n:d,e.attempt(YD,h,c))}function d(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function c(p){return Me(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function qD(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ns,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ve(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!Me(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ZD,t,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ve(e,e.attempt(on,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function KD(e,t,n){const r=this;return Ve(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function XD(e){e.exit(this.containerState.type)}function QD(e,t,n){const r=this;return Ve(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!Me(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const ap={name:"setextUnderline",resolveTo:JD,tokenize:eP};function JD(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function eP(e,t,n){const r=this;let i;return o;function o(u){let d=r.events.length,c;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){c=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),Me(u)?Ve(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||Te(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const tP={tokenize:uP,partial:!0};function nP(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:sP,continuation:{tokenize:aP},exit:lP}},text:{91:{name:"gfmFootnoteCall",tokenize:oP},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:rP,resolveTo:iP}}}}function rP(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!s||!s._balanced)return n(l);const u=Vn(r.sliceSerialize({start:s.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function iP(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function oP(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),l}function l(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(o>999||c===93&&!s||c===null||c===91||ot(c))return n(c);if(c===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(Vn(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return ot(c)||(s=!0),o++,e.consume(c),c===92?d:u}function d(c){return c===91||c===92||c===93?(e.consume(c),o++,u):u(c)}}function sP(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,a;return l;function l(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(m)}function d(m){if(s>999||m===93&&!a||m===null||m===91||ot(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return o=Vn(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return ot(m)||(a=!0),s++,e.consume(m),m===92?c:d}function c(m){return m===91||m===92||m===93?(e.consume(m),s++,d):d(m)}function h(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(o)||i.push(o),Ve(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function aP(e,t,n){return e.check(Ns,t,e.attempt(tP,t,n))}function lP(e){e.exit("gfmFootnoteDefinition")}function uP(e,t,n){const r=this;return Ve(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(o):n(o)}}function cP(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,a){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let u=l;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[l][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[l][1].end)},c={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[l][1].start)},h=[["enter",d,a],["enter",s[u][1],a],["exit",s[u][1],a],["enter",c,a]],p=a.parser.constructs.insideSpan.null;p&&wn(h,h.length,0,Tl(p,s.slice(u+1,l),a)),wn(h,h.length,0,[["exit",c,a],["enter",s[l][1],a],["exit",s[l][1],a],["exit",d,a]]),wn(s,u-1,l-u+3,h),l=u+h.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type="data");return s}function o(s,a,l){const u=this.previous,d=this.events;let c=0;return h;function h(m){return u===126&&d[d.length-1][1].type!=="characterEscape"?l(m):(s.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const b=Qi(u);if(m===126)return c>1?l(m):(s.consume(m),c++,p);if(c<2&&!n)return l(m);const y=s.exit("strikethroughSequenceTemporary"),E=Qi(m);return y._open=!E||E===2&&!!b,y._close=!b||b===2&&!!E,a(m)}}}class dP{constructor(){this.map=[]}add(t,n,r){fP(this,t,n,r)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function fP(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function hP(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function pP(){return{flow:{null:{name:"table",tokenize:mP,resolveAll:gP}}}}function mP(e,t,n){const r=this;let i=0,o=0,s;return a;function a(N){let W=r.events.length-1;for(;W>-1;){const D=r.events[W][1].type;if(D==="lineEnding"||D==="linePrefix")W--;else break}const U=W>-1?r.events[W][1].type:null,w=U==="tableHead"||U==="tableRow"?C:l;return w===C&&r.parser.lazy[r.now().line]?n(N):w(N)}function l(N){return e.enter("tableHead"),e.enter("tableRow"),u(N)}function u(N){return N===124||(s=!0,o+=1),d(N)}function d(N){return N===null?n(N):Te(N)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),p):n(N):Me(N)?Ve(e,d,"whitespace")(N):(o+=1,s&&(s=!1,i+=1),N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),s=!0,d):(e.enter("data"),c(N)))}function c(N){return N===null||N===124||ot(N)?(e.exit("data"),d(N)):(e.consume(N),N===92?h:c)}function h(N){return N===92||N===124?(e.consume(N),c):c(N)}function p(N){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(N):(e.enter("tableDelimiterRow"),s=!1,Me(N)?Ve(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):m(N))}function m(N){return N===45||N===58?y(N):N===124?(s=!0,e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),b):R(N)}function b(N){return Me(N)?Ve(e,y,"whitespace")(N):y(N)}function y(N){return N===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),E):N===45?(o+=1,E(N)):N===null||Te(N)?P(N):R(N)}function E(N){return N===45?(e.enter("tableDelimiterFiller"),x(N)):R(N)}function x(N){return N===45?(e.consume(N),x):N===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),_):(e.exit("tableDelimiterFiller"),_(N))}function _(N){return Me(N)?Ve(e,P,"whitespace")(N):P(N)}function P(N){return N===124?m(N):N===null||Te(N)?!s||i!==o?R(N):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(N)):R(N)}function R(N){return n(N)}function C(N){return e.enter("tableRow"),S(N)}function S(N){return N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),S):N===null||Te(N)?(e.exit("tableRow"),t(N)):Me(N)?Ve(e,S,"whitespace")(N):(e.enter("data"),O(N))}function O(N){return N===null||N===124||ot(N)?(e.exit("data"),S(N)):(e.consume(N),N===92?$:O)}function $(N){return N===92||N===124?(e.consume(N),O):O(N)}}function gP(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,l=0,u,d,c;const h=new dP;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(a=!1,l!==0&&(lp(h,t,l,u,d),d=void 0,l=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],s=[0,n+1,0,0],a&&(a=!1,d={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",d,t]])),i=m.type==="tableDelimiterRow"?2:d?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],c=Xs(h,t,o,i,void 0,c),o=[0,0,0,0]),s[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],c=Xs(h,t,o,i,void 0,c)),o=s,s=[o[1],n,0,0])):m.type==="tableHead"?(a=!0,l=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=n,o[1]!==0?(s[0]=s[1],c=Xs(h,t,o,i,n,c)):s[1]!==0&&(c=Xs(h,t,s,i,n,c)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=n)}for(l!==0&&lp(h,t,l,u,d),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=hP(t.events,n))}return e}function Xs(e,t,n,r,i,o){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},Li(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const l=Li(t.events,n[1]);if(o={type:s,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Li(t.events,n[2]),d=Li(t.events,n[3]),c={type:a,start:Object.assign({},u),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,b=n[3]-n[2]-1;e.add(m,b,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(o.end=Object.assign({},Li(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function lp(e,t,n,r,i){const o=[],s=Li(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function Li(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const bP={name:"tasklistCheck",tokenize:yP};function EP(){return{text:{91:bP}}}function yP(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),o)}function o(l){return ot(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),s):n(l)}function s(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(l)}function a(l){return Te(l)?t(l):Me(l)?e.check({tokenize:TP},t,n)(l):n(l)}}function TP(e,t,n){return Ve(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function xP(e){return rE([O4(),nP(),cP(e),pP(),EP()])}const _P={};function kP(e){const t=this,n=e||_P,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(xP(n)),o.push(A4()),s.push(S4(n))}var wP=Object.defineProperty,AP=Object.defineProperties,SP=Object.getOwnPropertyDescriptors,up=Object.getOwnPropertySymbols,CP=Object.prototype.hasOwnProperty,vP=Object.prototype.propertyIsEnumerable,cp=(e,t,n)=>t in e?wP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yE=(e,t)=>{for(var n in t||(t={}))CP.call(t,n)&&cp(e,n,t[n]);if(up)for(var n of up(t))vP.call(t,n)&&cp(e,n,t[n]);return e},TE=(e,t)=>AP(e,SP(t)),IP=/(\*\*)([^*]*\*?)$/,NP=/(__)([^_]*?)$/,OP=/(\*\*\*)([^*]*?)$/,RP=/(\*)([^*]*?)$/,LP=/(_)([^_]*?)$/,DP=/(`)([^`]*?)$/,PP=/(~~)([^~]*?)$/,Si=/^[\s_~*`]*$/,xE=/^[\s]*[-*+][\s]+$/,MP=/[\p{L}\p{N}_]/u,BP=/^```[^`\n]*```?$/,FP=/^\*{4,}$/,HP=/(__)([^_]+)_$/,zP=/(~~)([^~]+)~$/,dp=/~~/g,Hr=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:MP.test(e)},ds=(e,t)=>{let n=!1;for(let r=0;r<t;r+=1)e[r]==="`"&&e[r+1]==="`"&&e[r+2]==="`"&&(n=!n,r+=2);return n},UP=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},_E=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},xl=(e,t)=>{let n=!1,r=!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]==="$"?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},$P=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
|
|
107
|
-
`)return!1}return!1},kE=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?$P(e,t):!1;if(e[n]===`
|
|
108
|
-
`)return!1}return!1},jP=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let r=n+1<e.length?e[n+1]:"";return r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="/"}if(e[n]===`
|
|
109
|
-
`)return!1}return!1},Td=(e,t,n)=>{let r=0;for(let l=t-1;l>=0;l-=1)if(e[l]===`
|
|
110
|
-
`){r=l+1;break}let i=e.length;for(let l=t;l<e.length;l+=1)if(e[l]===`
|
|
111
|
-
`){i=l;break}let o=e.substring(r,i),s=0,a=!1;for(let l of o)if(l===n)s+=1;else if(l!==" "&&l!==" "){a=!0;break}return s>=3&&!a},VP=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,WP=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(VP,(t,n,r,i)=>ds(e,i)?t:`${n}\\>${r}`),YP=(e,t,n,r)=>n==="\\"||e.includes("$")&&xl(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&Hr(n)&&Hr(r)||(!n||n===" "||n===" "||n===`
|
|
112
|
-
`)&&(!r||r===" "||r===" "||r===`
|
|
113
|
-
`)),wE=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="*")continue;let o=i>0?e[i-1]:"",s=i<r-1?e[i+1]:"";YP(e,i,o,s)||(t+=1)}return t},ZP=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&xl(e,t)||kE(e,t)||jP(e,t)||n==="_"||r==="_"||n&&r&&Hr(n)&&Hr(r)),GP=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="_")continue;let o=i>0?e[i-1]:"",s=i<r-1?e[i+1]:"";ZP(e,i,o,s)||(t+=1)}return t},qP=e=>{let t=0,n=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},xd=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="*"&&r+1<e.length&&e[r+1]==="*"&&(t+=1,r+=1)}return t},fp=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="_"&&r+1<e.length&&e[r+1]==="_"&&(t+=1,r+=1)}return t},KP=(e,t,n)=>{if(!t||Si.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
114
|
-
`),i=r===-1?0:r+1,o=e.substring(i,n);return xE.test(o)&&t.includes(`
|
|
115
|
-
`)?!0:Td(e,n,"*")},XP=e=>{let t=e.match(IP);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return ds(e,r)||KP(e,n,r)?e:xd(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},QP=(e,t,n)=>{if(!t||Si.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
116
|
-
`),i=r===-1?0:r+1,o=e.substring(i,n);return xE.test(o)&&t.includes(`
|
|
117
|
-
`)?!0:Td(e,n,"_")},JP=e=>{let t=e.match(NP);if(!t){let i=e.match(HP);if(i){let o=e.lastIndexOf(i[1]);if(!ds(e,o)&&fp(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return ds(e,r)||QP(e,n,r)?e:fp(e)%2===1?`${e}__`:e},e5=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!xl(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if((!r||r===" "||r===" "||r===`
|
|
118
|
-
`)&&(!i||i===" "||i===" "||i===`
|
|
119
|
-
`)||r&&i&&Hr(r)&&Hr(i))continue;return n}}return-1},t5=e=>{if(!e.match(RP))return e;let t=e5(e);if(t===-1)return e;let n=e.substring(t+1);return!n||Si.test(n)?e:wE(e)%2===1?`${e}*`:e},AE=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!xl(e,n)&&!kE(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if(r&&i&&Hr(r)&&Hr(i))continue;return n}}return-1},n5=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
120
|
-
`;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},r5=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(xd(t)%2!==1)return null;let n=t.indexOf("**"),r=AE(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},i5=e=>{if(!e.match(LP))return e;let t=AE(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||Si.test(n))return e;if(GP(e)%2===1){let r=r5(e);return r!==null?r:n5(e)}return e},o5=e=>{let t=xd(e),n=wE(e);return t%2===0&&n%2===0},s5=(e,t,n)=>!t||Si.test(t)||ds(e,n)?!0:Td(e,n,"*"),a5=e=>{if(FP.test(e))return e;let t=e.match(OP);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return s5(e,n,r)?e:qP(e)%2===1?o5(e)?e:`${e}***`:e},fs=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},l5=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},u5=e=>{let t=0;for(let n=0;n<e.length;n+=1)e[n]==="`"&&!l5(e,n)&&(t+=1);return t},c5=/<[a-zA-Z/][^>]*$/,d5=e=>{let t=e.match(c5);return!t||t.index===void 0||fs(e,t.index)?e:e.substring(0,t.index).trimEnd()},f5=e=>!e.match(BP)||e.includes(`
|
|
121
|
-
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,h5=e=>(e.match(/```/g)||[]).length%2===1,p5=e=>{let t=f5(e);if(t!==null)return t;let n=e.match(DP);if(n&&!h5(e)){let r=n[2];if(!r||Si.test(r))return e;if(u5(e)%2===1)return`${e}\``}return e},m5=(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)==="```",g5=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!m5(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},b5=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
122
|
-
`,t)!==-1&&!e.endsWith(`
|
|
123
|
-
`)?`${e}
|
|
124
|
-
$$`:`${e}$$`},E5=e=>g5(e)%2===0?e:b5(e),y5=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=UP(e,t);if(r===-1||fs(e,r))return null;let i=r>0&&e[r-1]==="!",o=i?r-1:r,s=e.substring(0,o);if(i)return s;let a=e.substring(r+1,t);return n==="text-only"?`${s}${a}`:`${s}[${a}](streamdown:incomplete-link)`},hp=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!fs(e,n)){if(n>0&&e[n-1]==="!")continue;let r=_E(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(n=i)}}return t},T5=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t;if(!e.substring(t+1).includes("]")){let o=e.substring(0,i);if(r)return o;if(n==="text-only"){let s=hp(e,t);return e.substring(0,s)+e.substring(s+1)}return`${e}](streamdown:incomplete-link)`}if(_E(e,t)===-1){let o=e.substring(0,i);if(r)return o;if(n==="text-only"){let s=hp(e,t);return e.substring(0,s)+e.substring(s+1)}return`${e}](streamdown:incomplete-link)`}return null},SE=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!fs(e,n)){let r=y5(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!fs(e,r)){let i=T5(e,r,t);if(i!==null)return i}return e},x5=/^-{1,2}$/,_5=/^[\s]*-{1,2}[\s]+$/,k5=/^={1,2}$/,w5=/^[\s]*={1,2}[\s]+$/,A5=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
|
|
125
|
-
`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(x5.test(i)&&!n.match(_5)){let o=r.split(`
|
|
126
|
-
`).at(-1);if(o&&o.trim().length>0)return`${e}`}if(k5.test(i)&&!n.match(w5)){let o=r.split(`
|
|
127
|
-
`).at(-1);if(o&&o.trim().length>0)return`${e}`}return e},S5=e=>{var t,n;let r=e.match(PP);if(r){let i=r[2];if(!i||Si.test(i))return e;if(((t=e.match(dp))==null?void 0:t.length)%2===1)return`${e}~~`}else if(e.match(zP)&&((n=e.match(dp))==null?void 0:n.length)%2===1)return`${e}~`;return e},Jl=e=>e!==!1,bn={COMPARISON_OPERATORS:-10,HTML_TAGS:-5,SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},C5=[{handler:{name:"comparisonOperators",handle:WP,priority:bn.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:d5,priority:bn.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:A5,priority:bn.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:SE,priority:bn.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:a5,priority:bn.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:XP,priority:bn.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:JP,priority:bn.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:t5,priority:bn.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:i5,priority:bn.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:p5,priority:bn.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:S5,priority:bn.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:E5,priority:bn.KATEX},optionKey:"katex"}],v5=e=>{var t;let n=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return C5.filter(({handler:r,optionKey:i})=>r.name==="links"?Jl(e==null?void 0:e.links)||Jl(e==null?void 0:e.images):Jl(e==null?void 0:e[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:TE(yE({},r),{handle:o=>SE(o,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},I5=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=v5(t),o=((n=t==null?void 0:t.handlers)!=null?n:[]).map(a=>{var l;return{handler:TE(yE({},a),{priority:(l=a.priority)!=null?l:bn.DEFAULT}),earlyReturn:void 0}}),s=[...i,...o].sort((a,l)=>{var u,d;return((u=a.handler.priority)!=null?u:0)-((d=l.handler.priority)!=null?d:0)});for(let{handler:a,earlyReturn:l}of s)if(r=a.handle(r),l!=null&&l(r))return r;return r},N5=I5;const O5=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,R5=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,L5={};function pp(e,t){return(L5.jsx?R5:O5).test(e)}const D5=/[ \t\n\f\r]/g;function P5(e){return typeof e=="object"?e.type==="text"?mp(e.value):!1:mp(e)}function mp(e){return e.replace(D5,"")===""}var Ii={},eu,gp;function M5(){if(gp)return eu;gp=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,a=/^\s+|\s+$/g,l=`
|
|
128
|
-
`,u="/",d="*",c="",h="comment",p="declaration";eu=function(b,y){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];y=y||{};var E=1,x=1;function _(w){var D=w.match(t);D&&(E+=D.length);var M=w.lastIndexOf(l);x=~M?w.length-M:x+w.length}function P(){var w={line:E,column:x};return function(D){return D.position=new R(w),O(),D}}function R(w){this.start=w,this.end={line:E,column:x},this.source=y.source}R.prototype.content=b;function C(w){var D=new Error(y.source+":"+E+":"+x+": "+w);if(D.reason=w,D.filename=y.source,D.line=E,D.column=x,D.source=b,!y.silent)throw D}function S(w){var D=w.exec(b);if(D){var M=D[0];return _(M),b=b.slice(M.length),D}}function O(){S(n)}function $(w){var D;for(w=w||[];D=N();)D!==!1&&w.push(D);return w}function N(){var w=P();if(!(u!=b.charAt(0)||d!=b.charAt(1))){for(var D=2;c!=b.charAt(D)&&(d!=b.charAt(D)||u!=b.charAt(D+1));)++D;if(D+=2,c===b.charAt(D-1))return C("End of comment missing");var M=b.slice(2,D-2);return x+=2,_(M),b=b.slice(D),x+=2,w({type:h,comment:M})}}function W(){var w=P(),D=S(r);if(D){if(N(),!S(i))return C("property missing ':'");var M=S(o),H=w({type:p,property:m(D[0].replace(e,c)),value:M?m(M[0].replace(e,c)):c});return S(s),H}}function U(){var w=[];$(w);for(var D;D=W();)D!==!1&&(w.push(D),$(w));return w}return O(),U()};function m(b){return b?b.replace(a,c):c}return eu}var bp;function B5(){if(bp)return Ii;bp=1;var e=Ii&&Ii.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.default=n;var t=e(M5());function n(r,i){var o=null;if(!r||typeof r!="string")return o;var s=(0,t.default)(r),a=typeof i=="function";return s.forEach(function(l){if(l.type==="declaration"){var u=l.property,d=l.value;a?i(u,d,l):d&&(o=o||{},o[u]=d)}}),o}return Ii}var yo={},Ep;function F5(){if(Ep)return yo;Ep=1,Object.defineProperty(yo,"__esModule",{value:!0}),yo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(u){return!u||n.test(u)||e.test(u)},s=function(u,d){return d.toUpperCase()},a=function(u,d){return"".concat(d,"-")},l=function(u,d){return d===void 0&&(d={}),o(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(t,s))};return yo.camelCase=l,yo}var To,yp;function H5(){if(yp)return To;yp=1;var e=To&&To.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(B5()),n=F5();function r(i,o){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(a,l){a&&l&&(s[(0,n.camelCase)(a,o)]=l)}),s}return r.default=r,To=r,To}var z5=H5();const U5=Cm(z5);function Vo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Tp(e.position):"start"in e||"end"in e?Tp(e):"line"in e||"column"in e?Qu(e):""}function Qu(e){return xp(e&&e.line)+":"+xp(e&&e.column)}function Tp(e){return Qu(e&&e.start)+"-"+Qu(e&&e.end)}function xp(e){return e&&typeof e=="number"?e:1}class Kt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=a?a.line:void 0,this.name=Vo(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Kt.prototype.file="";Kt.prototype.name="";Kt.prototype.reason="";Kt.prototype.message="";Kt.prototype.stack="";Kt.prototype.column=void 0;Kt.prototype.line=void 0;Kt.prototype.ancestors=void 0;Kt.prototype.cause=void 0;Kt.prototype.fatal=void 0;Kt.prototype.place=void 0;Kt.prototype.ruleId=void 0;Kt.prototype.source=void 0;const _d={}.hasOwnProperty,$5=new Map,j5=/[A-Z]/g,V5=new Set(["table","tbody","thead","tfoot","tr"]),W5=new Set(["td","th"]),CE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Y5(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=eM(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=J5(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ao:hl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=vE(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function vE(e,t,n){if(t.type==="element")return Z5(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return G5(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return K5(e,t,n);if(t.type==="mdxjsEsm")return q5(e,t);if(t.type==="root")return X5(e,t,n);if(t.type==="text")return Q5(e,t)}function Z5(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ao,e.schema=i),e.ancestors.push(t);const o=NE(e,t.tagName,!1),s=tM(e,t);let a=wd(e,t);return V5.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!P5(l):!0})),IE(e,s,o,t),kd(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function G5(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}hs(e,t.position)}function q5(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);hs(e,t.position)}function K5(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ao,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:NE(e,t.name,!0),s=nM(e,t),a=wd(e,t);return IE(e,s,o,t),kd(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function X5(e,t,n){const r={};return kd(r,wd(e,t)),e.create(t,e.Fragment,r,n)}function Q5(e,t){return t.value}function IE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function kd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function J5(e,t,n){return r;function r(i,o,s,a){const u=Array.isArray(s.children)?n:t;return a?u(o,s,a):u(o,s)}}function eM(e,t){return n;function n(r,i,o,s){const a=Array.isArray(o.children),l=ur(r);return t(i,o,s,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function tM(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&_d.call(t.properties,i)){const o=rM(e,i,t.properties[i]);if(o){const[s,a]=o;e.tableCellAlignToStyle&&s==="align"&&typeof a=="string"&&W5.has(t.tagName)?r=a:n[s]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function nM(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const a=s.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else hs(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else hs(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function wd(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:$5;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const l=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(l){const u=i.get(l)||0;s=l+"-"+u,i.set(l,u+1)}}const a=vE(e,o,s);a!==void 0&&n.push(a)}return n}function rM(e,t,n){const r=sd(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?F1(n):H1(n)),r.property==="style"){let i=typeof n=="object"?n:iM(e,String(n));return e.stylePropertyNameCase==="css"&&(i=oM(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?aN[r.property]||r.property:r.attribute,n]}}function iM(e,t){try{return U5(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Kt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=CE+"#cannot-parse-style-attribute",i}}function NE(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,s;for(;++o<i.length;){const a=pp(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};s=s?{type:"MemberExpression",object:s,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=s}else r=pp(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return _d.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);hs(e)}function hs(e,t){const n=new Kt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=CE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function oM(e){const t={};let n;for(n in e)_d.call(e,n)&&(t[sM(n)]=e[n]);return t}function sM(e){let t=e.replace(j5,aM);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function aM(e){return"-"+e.toLowerCase()}const tu={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"]},lM={tokenize:uM};function uM(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ve(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,s(a)}function s(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return Te(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),s)}}const cM={tokenize:dM},_p={tokenize:fM};function dM(e){const t=this,n=[];let r=0,i,o,s;return a;function a(_){if(r<n.length){const P=n[r];return t.containerState=P[1],e.attempt(P[0].continuation,l,u)(_)}return u(_)}function l(_){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&x();const P=t.events.length;let R=P,C;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){C=t.events[R][1].end;break}E(r);let S=P;for(;S<t.events.length;)t.events[S][1].end={...C},S++;return wn(t.events,R+1,0,t.events.slice(P)),t.events.length=S,u(_)}return a(_)}function u(_){if(r===n.length){if(!i)return h(_);if(i.currentConstruct&&i.currentConstruct.concrete)return m(_);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(_p,d,c)(_)}function d(_){return i&&x(),E(r),h(_)}function c(_){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,m(_)}function h(_){return t.containerState={},e.attempt(_p,p,m)(_)}function p(_){return r++,n.push([t.currentConstruct,t.containerState]),h(_)}function m(_){if(_===null){i&&x(),E(0),e.consume(_);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),b(_)}function b(_){if(_===null){y(e.exit("chunkFlow"),!0),E(0),e.consume(_);return}return Te(_)?(e.consume(_),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(_),b)}function y(_,P){const R=t.sliceStream(_);if(P&&R.push(null),_.previous=o,o&&(o.next=_),o=_,i.defineSkip(_.start),i.write(R),t.parser.lazy[_.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<s&&(!i.events[C][1].end||i.events[C][1].end.offset>s))return;const S=t.events.length;let O=S,$,N;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if($){N=t.events[O][1].end;break}$=!0}for(E(r),C=S;C<t.events.length;)t.events[C][1].end={...N},C++;wn(t.events,O+1,0,t.events.slice(S)),t.events.length=C}}function E(_){let P=n.length;for(;P-- >_;){const R=n[P];t.containerState=R[1],R[0].exit.call(t,e)}n.length=_}function x(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function fM(e,t,n){return Ve(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const hM={tokenize:pM};function pM(e){const t=this,n=e.attempt(Ns,r,e.attempt(this.parser.constructs.flowInitial,i,Ve(e,e.attempt(this.parser.constructs.flow,i,e.attempt(aD,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const mM={resolveAll:RE()},gM=OE("string"),bM=OE("text");function OE(e){return{resolveAll:RE(e==="text"?EM:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,a);return s;function s(d){return u(d)?o(d):a(d)}function a(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),l}function l(d){return u(d)?(n.exit("data"),o(d)):(n.consume(d),l)}function u(d){if(d===null)return!0;const c=i[d];let h=-1;if(c)for(;++h<c.length;){const p=c[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function RE(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function EM(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,a=0,l;for(;o--;){const u=i[o];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(u===-2)l=!0,a++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const yM={42:on,43:on,45:on,48:on,49:on,50:on,51:on,52:on,53:on,54:on,55:on,56:on,57:on,62:fE},TM={91:fD},xM={[-2]:Xl,[-1]:Xl,32:Xl},_M={35:ED,42:ya,45:[ap,ya],60:_D,61:ap,95:ya,96:op,126:op},kM={38:pE,92:hE},wM={[-5]:Ql,[-4]:Ql,[-3]:Ql,33:zD,38:pE,42:Xu,60:[$4,ID],91:$D,92:[gD,hE],93:yd,95:Xu,96:tD},AM={null:[Xu,mM]},SM={null:[42,95]},CM={null:[]},vM=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:SM,contentInitial:TM,disable:CM,document:yM,flow:_M,flowInitial:xM,insideSpan:AM,string:kM,text:wM},Symbol.toStringTag,{value:"Module"}));function IM(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],a=[];const l={attempt:S(R),check:S(C),consume:x,enter:_,exit:P,interrupt:S(C,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:m,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:c};let d=t.tokenize.call(u,l);return t.resolveAll&&o.push(t),u;function c(W){return s=vn(s,W),y(),s[s.length-1]!==null?[]:(O(t,0),u.events=Tl(o,u.events,u),u.events)}function h(W,U){return OM(p(W),U)}function p(W){return NM(s,W)}function m(){const{_bufferIndex:W,_index:U,line:w,column:D,offset:M}=r;return{_bufferIndex:W,_index:U,line:w,column:D,offset:M}}function b(W){i[W.line]=W.column,N()}function y(){let W;for(;r._index<s.length;){const U=s[r._index];if(typeof U=="string")for(W=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===W&&r._bufferIndex<U.length;)E(U.charCodeAt(r._bufferIndex));else E(U)}}function E(W){d=d(W)}function x(W){Te(W)?(r.line++,r.column=1,r.offset+=W===-3?2:1,N()):W!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=W}function _(W,U){const w=U||{};return w.type=W,w.start=m(),u.events.push(["enter",w,u]),a.push(w),w}function P(W){const U=a.pop();return U.end=m(),u.events.push(["exit",U,u]),U}function R(W,U){O(W,U.from)}function C(W,U){U.restore()}function S(W,U){return w;function w(D,M,H){let z,G,Q,k;return Array.isArray(D)?ne(D):"tokenize"in D?ne([D]):se(D);function se(Ee){return Qe;function Qe(X){const ce=X!==null&&Ee[X],Se=X!==null&&Ee.null,He=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(Se)?Se:Se?[Se]:[]];return ne(He)(X)}}function ne(Ee){return z=Ee,G=0,Ee.length===0?H:v(Ee[G])}function v(Ee){return Qe;function Qe(X){return k=$(),Q=Ee,Ee.partial||(u.currentConstruct=Ee),Ee.name&&u.parser.constructs.disable.null.includes(Ee.name)?be():Ee.tokenize.call(U?Object.assign(Object.create(u),U):u,l,ye,be)(X)}}function ye(Ee){return W(Q,k),M}function be(Ee){return k.restore(),++G<z.length?v(z[G]):H}}}function O(W,U){W.resolveAll&&!o.includes(W)&&o.push(W),W.resolve&&wn(u.events,U,u.events.length-U,W.resolve(u.events.slice(U),u)),W.resolveTo&&(u.events=W.resolveTo(u.events,u))}function $(){const W=m(),U=u.previous,w=u.currentConstruct,D=u.events.length,M=Array.from(a);return{from:D,restore:H};function H(){r=W,u.previous=U,u.currentConstruct=w,u.events.length=D,a=M,N()}}function N(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function NM(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function OM(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
|
|
129
|
-
`;break}case-3:{s=`\r
|
|
130
|
-
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function RM(e){const r={constructs:rE([vM,...(e||{}).extensions||[]]),content:i(lM),defined:[],document:i(cM),flow:i(hM),lazy:{},string:i(gM),text:i(bM)};return r;function i(o){return s;function s(a){return IM(r,o,a)}}}function LM(e){for(;!mE(e););return e}const kp=/[\0\t\n\r]/g;function DM(){let e=1,t="",n=!0,r;return i;function i(o,s,a){const l=[];let u,d,c,h,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if(kp.lastIndex=c,u=kp.exec(o),h=u&&u.index!==void 0?u.index:o.length,p=o.charCodeAt(h),!u){t=o.slice(c);break}if(p===10&&c===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),c<h&&(l.push(o.slice(c,h)),e+=h-c),p){case 0:{l.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,l.push(-2);e++<d;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}c=h+1}return a&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const LE={}.hasOwnProperty;function PM(e,t,n){return typeof t!="string"&&(n=t,t=void 0),MM(n)(LM(RM(n).document().write(DM()(e,t,!0))))}function MM(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ke),autolinkProtocol:$,autolinkEmail:$,atxHeading:o(lt),blockQuote:o(Se),characterEscape:$,characterReference:$,codeFenced:o(He),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(He,s),codeText:o(Je,s),codeTextData:$,data:$,codeFlowValue:$,definition:o(Ye),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(ze),hardBreakEscape:o(nt),hardBreakTrailing:o(nt),htmlFlow:o(Le,s),htmlFlowData:$,htmlText:o(Le,s),htmlTextData:$,image:o(Ze),label:s,link:o(Ke),listItem:o(Gr),listItemValue:h,listOrdered:o(yt,c),listUnordered:o(yt),paragraph:o(Dt),reference:v,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(lt),strong:o(dn),thematicBreak:o(Fn)},exit:{atxHeading:l(),atxHeadingSequence:R,autolink:l(),autolinkEmail:ce,autolinkProtocol:X,blockQuote:l(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:Ee,characterReference:Qe,codeFenced:l(y),codeFencedFence:b,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:N,codeIndented:l(E),codeText:l(M),codeTextData:N,data:N,definition:l(),definitionDestinationString:P,definitionLabelString:x,definitionTitleString:_,emphasis:l(),hardBreakEscape:l(U),hardBreakTrailing:l(U),htmlFlow:l(w),htmlFlowData:N,htmlText:l(D),htmlTextData:N,image:l(z),label:Q,labelText:G,lineEnding:W,link:l(H),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ye,resourceDestinationString:k,resourceTitleString:se,resource:ne,setextHeading:l(O),setextHeadingLineSequence:S,setextHeadingText:C,strong:l(),thematicBreak:l()}};DE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(q){let ae={type:"root",children:[]};const xe={stack:[ae],tokenStack:[],config:t,enter:a,exit:u,buffer:s,resume:d,data:n},Ce=[];let Be=-1;for(;++Be<q.length;)if(q[Be][1].type==="listOrdered"||q[Be][1].type==="listUnordered")if(q[Be][0]==="enter")Ce.push(Be);else{const Ht=Ce.pop();Be=i(q,Ht,Be)}for(Be=-1;++Be<q.length;){const Ht=t[q[Be][0]];LE.call(Ht,q[Be][1].type)&&Ht[q[Be][1].type].call(Object.assign({sliceSerialize:q[Be][2].sliceSerialize},xe),q[Be][1])}if(xe.tokenStack.length>0){const Ht=xe.tokenStack[xe.tokenStack.length-1];(Ht[1]||wp).call(xe,void 0,Ht[0])}for(ae.position={start:Ar(q.length>0?q[0][1].start:{line:1,column:1,offset:0}),end:Ar(q.length>0?q[q.length-2][1].end:{line:1,column:1,offset:0})},Be=-1;++Be<t.transforms.length;)ae=t.transforms[Be](ae)||ae;return ae}function i(q,ae,xe){let Ce=ae-1,Be=-1,Ht=!1,Ut,Hn,qr,Tr;for(;++Ce<=xe;){const $t=q[Ce];switch($t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{$t[0]==="enter"?Be++:Be--,Tr=void 0;break}case"lineEndingBlank":{$t[0]==="enter"&&(Ut&&!Tr&&!Be&&!qr&&(qr=Ce),Tr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tr=void 0}if(!Be&&$t[0]==="enter"&&$t[1].type==="listItemPrefix"||Be===-1&&$t[0]==="exit"&&($t[1].type==="listUnordered"||$t[1].type==="listOrdered")){if(Ut){let xr=Ce;for(Hn=void 0;xr--;){const fn=q[xr];if(fn[1].type==="lineEnding"||fn[1].type==="lineEndingBlank"){if(fn[0]==="exit")continue;Hn&&(q[Hn][1].type="lineEndingBlank",Ht=!0),fn[1].type="lineEnding",Hn=xr}else if(!(fn[1].type==="linePrefix"||fn[1].type==="blockQuotePrefix"||fn[1].type==="blockQuotePrefixWhitespace"||fn[1].type==="blockQuoteMarker"||fn[1].type==="listItemIndent"))break}qr&&(!Hn||qr<Hn)&&(Ut._spread=!0),Ut.end=Object.assign({},Hn?q[Hn][1].start:$t[1].end),q.splice(Hn||Ce,0,["exit",Ut,$t[2]]),Ce++,xe++}if($t[1].type==="listItemPrefix"){const xr={type:"listItem",_spread:!1,start:Object.assign({},$t[1].start),end:void 0};Ut=xr,q.splice(Ce,0,["enter",xr,$t[2]]),Ce++,xe++,qr=void 0,Tr=!0}}}return q[ae][1]._spread=Ht,xe}function o(q,ae){return xe;function xe(Ce){a.call(this,q(Ce),Ce),ae&&ae.call(this,Ce)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(q,ae,xe){this.stack[this.stack.length-1].children.push(q),this.stack.push(q),this.tokenStack.push([ae,xe||void 0]),q.position={start:Ar(ae.start),end:void 0}}function l(q){return ae;function ae(xe){q&&q.call(this,xe),u.call(this,xe)}}function u(q,ae){const xe=this.stack.pop(),Ce=this.tokenStack.pop();if(Ce)Ce[0].type!==q.type&&(ae?ae.call(this,q,Ce[0]):(Ce[1]||wp).call(this,q,Ce[0]));else throw new Error("Cannot close `"+q.type+"` ("+Vo({start:q.start,end:q.end})+"): it’s not open");xe.position.end=Ar(q.end)}function d(){return md(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function h(q){if(this.data.expectingFirstListItemValue){const ae=this.stack[this.stack.length-2];ae.start=Number.parseInt(this.sliceSerialize(q),10),this.data.expectingFirstListItemValue=void 0}}function p(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.lang=q}function m(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.meta=q}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.value=q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.value=q.replace(/(\r?\n|\r)$/g,"")}function x(q){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ae,xe.identifier=Vn(this.sliceSerialize(q)).toLowerCase()}function _(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.title=q}function P(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.url=q}function R(q){const ae=this.stack[this.stack.length-1];if(!ae.depth){const xe=this.sliceSerialize(q).length;ae.depth=xe}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function S(q){const ae=this.stack[this.stack.length-1];ae.depth=this.sliceSerialize(q).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function $(q){const xe=this.stack[this.stack.length-1].children;let Ce=xe[xe.length-1];(!Ce||Ce.type!=="text")&&(Ce=Kn(),Ce.position={start:Ar(q.start),end:void 0},xe.push(Ce)),this.stack.push(Ce)}function N(q){const ae=this.stack.pop();ae.value+=this.sliceSerialize(q),ae.position.end=Ar(q.end)}function W(q){const ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=ae.children[ae.children.length-1];xe.position.end=Ar(q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ae.type)&&($.call(this,q),N.call(this,q))}function U(){this.data.atHardBreak=!0}function w(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.value=q}function D(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.value=q}function M(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.value=q}function H(){const q=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=ae,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function z(){const q=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=ae,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function G(q){const ae=this.sliceSerialize(q),xe=this.stack[this.stack.length-2];xe.label=f4(ae),xe.identifier=Vn(ae).toLowerCase()}function Q(){const q=this.stack[this.stack.length-1],ae=this.resume(),xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,xe.type==="link"){const Ce=q.children;xe.children=Ce}else xe.alt=ae}function k(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.url=q}function se(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.title=q}function ne(){this.data.inReference=void 0}function v(){this.data.referenceType="collapsed"}function ye(q){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ae,xe.identifier=Vn(this.sliceSerialize(q)).toLowerCase(),this.data.referenceType="full"}function be(q){this.data.characterReferenceType=q.type}function Ee(q){const ae=this.sliceSerialize(q),xe=this.data.characterReferenceType;let Ce;xe?(Ce=nE(ae,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ce=bd(ae);const Be=this.stack[this.stack.length-1];Be.value+=Ce}function Qe(q){const ae=this.stack.pop();ae.position.end=Ar(q.end)}function X(q){N.call(this,q);const ae=this.stack[this.stack.length-1];ae.url=this.sliceSerialize(q)}function ce(q){N.call(this,q);const ae=this.stack[this.stack.length-1];ae.url="mailto:"+this.sliceSerialize(q)}function Se(){return{type:"blockquote",children:[]}}function He(){return{type:"code",lang:null,meta:null,value:""}}function Je(){return{type:"inlineCode",value:""}}function Ye(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ze(){return{type:"emphasis",children:[]}}function lt(){return{type:"heading",depth:0,children:[]}}function nt(){return{type:"break"}}function Le(){return{type:"html",value:""}}function Ze(){return{type:"image",title:null,url:"",alt:null}}function Ke(){return{type:"link",title:null,url:"",children:[]}}function yt(q){return{type:"list",ordered:q.type==="listOrdered",start:null,spread:q._spread,children:[]}}function Gr(q){return{type:"listItem",spread:q._spread,checked:null,children:[]}}function Dt(){return{type:"paragraph",children:[]}}function dn(){return{type:"strong",children:[]}}function Kn(){return{type:"text",value:""}}function Fn(){return{type:"thematicBreak"}}}function Ar(e){return{line:e.line,column:e.column,offset:e.offset}}function DE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?DE(e,r):BM(e,r)}}function BM(e,t){let n;for(n in t)if(LE.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function wp(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Vo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Vo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Vo({start:t.start,end:t.end})+") is still open")}function FM(e){const t=this;t.parser=n;function n(r){return PM(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function HM(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function zM(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
131
|
-
`}]}function UM(e,t){const n=t.value?t.value+`
|
|
132
|
-
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function $M(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jM(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VM(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=ho(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let s,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=o+1,a+=1,e.footnoteCounts.set(r,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function WM(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function YM(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function PE(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function ZM(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return PE(e,t);const i={src:ho(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function GM(e,t){const n={src:ho(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function qM(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function KM(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return PE(e,t);const i={href:ho(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function XM(e,t){const n={href:ho(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function QM(e,t,n){const r=e.all(t),i=n?JM(n):ME(t),o={},s=[];if(typeof t.checked=="boolean"){const d=r[0];let c;d&&d.type==="element"&&d.tagName==="p"?c=d:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const d=r[a];(i||a!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
|
|
133
|
-
`}),d.type==="element"&&d.tagName==="p"&&!i?s.push(...d.children):s.push(d)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&s.push({type:"text",value:`
|
|
134
|
-
`});const u={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,u),e.applyData(t,u)}function JM(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=ME(n[r])}return t}function ME(e){const t=e.spread;return t??e.children.length>1}function e8(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function t8(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function n8(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function r8(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function i8(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=ur(t.children[1]),l=El(t.children[t.children.length-1]);a&&l&&(s.position={start:a,end:l}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function o8(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,a=s?s.length:t.children.length;let l=-1;const u=[];for(;++l<a;){const c=t.children[l],h={},p=s?s[l]:void 0;p&&(h.align=p);let m={type:"element",tagName:o,properties:h,children:[]};c&&(m.children=e.all(c),e.patch(c,m),m=e.applyData(c,m)),u.push(m)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function s8(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Ap=9,Sp=32;function a8(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Cp(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Cp(t.slice(i),i>0,!1)),o.join("")}function Cp(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Ap||o===Sp;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Ap||o===Sp;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function l8(e,t){const n={type:"text",value:a8(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function u8(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const c8={blockquote:HM,break:zM,code:UM,delete:$M,emphasis:jM,footnoteReference:VM,heading:WM,html:YM,imageReference:ZM,image:GM,inlineCode:qM,linkReference:KM,link:XM,listItem:QM,list:e8,paragraph:t8,root:n8,strong:r8,table:i8,tableCell:s8,tableRow:o8,text:l8,thematicBreak:u8,toml:Qs,yaml:Qs,definition:Qs,footnoteDefinition:Qs};function Qs(){}function d8(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function f8(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function h8(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||d8,r=e.options.footnoteBackLabel||f8,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const d=e.all(u),c=String(u.identifier).toUpperCase(),h=ho(c.toLowerCase());let p=0;const m=[],b=e.footnoteCounts.get(c);for(;b!==void 0&&++p<=b;){m.length>0&&m.push({type:"text",value:" "});let x=typeof n=="string"?n:n(l,p);typeof x=="string"&&(x={type:"text",value:x}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const y=d[d.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const x=y.children[y.children.length-1];x&&x.type==="text"?x.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...m)}else d.push(...m);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(d,!0)};e.patch(u,E),a.push(E)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...hi(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
135
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
|
|
136
|
-
`}]}}const Ju={}.hasOwnProperty,p8={};function m8(e,t){const n=t||p8,r=new Map,i=new Map,o=new Map,s={...c8,...n.handlers},a={all:u,applyData:b8,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:l,options:n,patch:g8,wrap:y8};return Fr(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const c=d.type==="definition"?r:i,h=String(d.identifier).toUpperCase();c.has(h)||c.set(h,d)}}),a;function l(d,c){const h=d.type,p=a.handlers[h];if(Ju.call(a.handlers,h)&&p)return p(a,d,c);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in d){const{children:b,...y}=d,E=hi(y);return E.children=a.all(d),E}return hi(d)}return(a.options.unknownHandler||E8)(a,d,c)}function u(d){const c=[];if("children"in d){const h=d.children;let p=-1;for(;++p<h.length;){const m=a.one(h[p],d);if(m){if(p&&h[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=vp(m.value)),!Array.isArray(m)&&m.type==="element")){const b=m.children[0];b&&b.type==="text"&&(b.value=vp(b.value))}Array.isArray(m)?c.push(...m):c.push(m)}}}return c}}function g8(e,t){e.position&&(t.position=vb(e))}function b8(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&o&&Object.assign(n.properties,hi(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function E8(e,t){const n=t.data||{},r="value"in t&&!(Ju.call(n,"hProperties")||Ju.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function y8(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
137
|
-
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
138
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
139
|
-
`}),n}function vp(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ip(e,t){const n=m8(e,t),r=n.one(e,void 0),i=h8(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
140
|
-
`},i),o}function T8(e,t){return e&&"run"in e?async function(n,r){const i=Ip(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ip(n,{file:r,...e||t})}}function Np(e){if(e)throw e}var nu,Op;function x8(){if(Op)return nu;Op=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},o=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),c=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!c)return!1;var h;for(h in u);return typeof h>"u"||e.call(u,h)},s=function(u,d){n&&d.name==="__proto__"?n(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},a=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(r)return r(u,d).value}else return;return u[d]};return nu=function l(){var u,d,c,h,p,m,b=arguments[0],y=1,E=arguments.length,x=!1;for(typeof b=="boolean"&&(x=b,b=arguments[1]||{},y=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});y<E;++y)if(u=arguments[y],u!=null)for(d in u)c=a(b,d),h=a(u,d),b!==h&&(x&&h&&(o(h)||(p=i(h)))?(p?(p=!1,m=c&&i(c)?c:[]):m=c&&o(c)?c:{},s(b,{name:d,newValue:l(x,m,h)})):typeof h<"u"&&s(b,{name:d,newValue:h}));return b},nu}var _8=x8();const ru=Cm(_8);function ec(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 k8(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(l,...u){const d=e[++o];let c=-1;if(l){s(l);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,d?w8(d,a)(...u):s(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function w8(e,t){let n;return r;function r(...s){const a=e.length>s.length;let l;a&&s.push(i);try{l=e.apply(this,s)}catch(u){const d=u;if(a&&n)throw d;return i(d)}a||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(s,...a){n||(n=!0,t(s,...a))}function o(s){i(null,s)}}const Jn={basename:A8,dirname:S8,extname:C8,join:v8,sep:"/"};function A8(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Os(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function S8(e){if(Os(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function C8(e){Os(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const a=e.codePointAt(t);if(a===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function v8(...e){let t=-1,n;for(;++t<e.length;)Os(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":I8(n)}function I8(e){Os(e);const t=e.codePointAt(0)===47;let n=N8(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function N8(e,t){let n="",r=0,i=-1,o=0,s=-1,a,l;for(;++s<=e.length;){if(s<e.length)a=e.codePointAt(s);else{if(a===47)break;a=47}if(a===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else a===46&&o>-1?o++:o=-1}return n}function Os(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const O8={cwd:R8};function R8(){return"/"}function tc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function L8(e){if(typeof e=="string")e=new URL(e);else if(!tc(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 D8(e)}function D8(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const iu=["history","path","basename","stem","extname","dirname"];class P8{constructor(t){let n;t?tc(t)?n={path:t}:typeof t=="string"||M8(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":O8.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<iu.length;){const o=iu[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)iu.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Jn.basename(this.path):void 0}set basename(t){su(t,"basename"),ou(t,"basename"),this.path=Jn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Jn.dirname(this.path):void 0}set dirname(t){Rp(this.basename,"dirname"),this.path=Jn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Jn.extname(this.path):void 0}set extname(t){if(ou(t,"extname"),Rp(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=Jn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){tc(t)&&(t=L8(t)),su(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Jn.basename(this.path,this.extname):void 0}set stem(t){su(t,"stem"),ou(t,"stem"),this.path=Jn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Kt(t,n,r);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 ou(e,t){if(e&&e.includes(Jn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Jn.sep+"`")}function su(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Rp(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function M8(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const B8=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),F8={}.hasOwnProperty;class Ad extends B8{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=k8()}copy(){const t=new Ad;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ru(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(uu("data",this.frozen),this.namespace[t]=n,this):F8.call(this.namespace,t)&&this.namespace[t]||void 0:t?(uu("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Js(t),r=this.parser||this.Parser;return au("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),au("process",this.parser||this.Parser),lu("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const a=Js(t),l=r.parse(a);r.run(l,a,function(d,c,h){if(d||!c||!h)return u(d);const p=c,m=r.stringify(p,h);U8(m)?h.value=m:h.result=m,u(d,h)});function u(d,c){d||!c?s(d):o?o(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),au("processSync",this.parser||this.Parser),lu("processSync",this.compiler||this.Compiler),this.process(t,i),Dp("processSync","process",n),r;function i(o,s){n=!0,Np(o),r=s}}run(t,n,r){Lp(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,a){const l=Js(n);i.run(t,l,u);function u(d,c,h){const p=c||t;d?a(d):s?s(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Dp("runSync","run",r),i;function o(s,a){Np(s),i=a,r=!0}}stringify(t,n){this.freeze();const r=Js(n),i=this.compiler||this.Compiler;return lu("stringify",i),Lp(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(uu("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...c]=u;l(d,c)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(u){if(!("plugins"in u)&&!("settings"in u))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");a(u.plugins),u.settings&&(i.settings=ru(!0,i.settings,u.settings))}function a(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const c=u[d];o(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,d){let c=-1,h=-1;for(;++c<r.length;)if(r[c][0]===u){h=c;break}if(h===-1)r.push([u,...d]);else if(d.length>0){let[p,...m]=d;const b=r[h][1];ec(b)&&ec(p)&&(p=ru(!0,b,p)),r[h]=[u,p,...m]}}}}const H8=new Ad().freeze();function au(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function lu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function uu(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 Lp(e){if(!ec(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Dp(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Js(e){return z8(e)?e:new P8(e)}function z8(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function U8(e){return typeof e=="string"||$8(e)}function $8(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Sd(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ci=Sd();function BE(e){Ci=e}var ri={exec:()=>null};function We(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(tn.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,t)};return r}var j8=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),tn={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,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"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},V8=/^(?:[ \t]*(?:\n|$))+/,W8=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Y8=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Rs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Z8=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Cd=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,FE=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,HE=We(FE).replace(/bull/g,Cd).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(),G8=We(FE).replace(/bull/g,Cd).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(),vd=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,q8=/^[^\n]+/,Id=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,K8=We(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Id).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),X8=We(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Cd).getRegex(),_l="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",Nd=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Q8=We("^ {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",Nd).replace("tag",_l).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),zE=We(vd).replace("hr",Rs).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[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_l).getRegex(),J8=We(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",zE).getRegex(),Od={blockquote:J8,code:W8,def:K8,fences:Y8,heading:Z8,hr:Rs,html:Q8,lheading:HE,list:X8,newline:V8,paragraph:zE,table:ri,text:q8},Pp=We("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Rs).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[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_l).getRegex(),e9={...Od,lheading:G8,table:Pp,paragraph:We(vd).replace("hr",Rs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Pp).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_l).getRegex()},t9={...Od,html:We(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Nd).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:ri,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:We(vd).replace("hr",Rs).replace("heading",` *#{1,6} *[^
|
|
141
|
-
]`).replace("lheading",HE).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},n9=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,r9=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,UE=/^( {2,}|\\)\n(?!\s*$)/,i9=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,kl=/[\p{P}\p{S}]/u,Rd=/[\s\p{P}\p{S}]/u,$E=/[^\s\p{P}\p{S}]/u,o9=We(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Rd).getRegex(),jE=/(?!~)[\p{P}\p{S}]/u,s9=/(?!~)[\s\p{P}\p{S}]/u,a9=/(?:[^\s\p{P}\p{S}]|~)/u,VE=/(?![*_])[\p{P}\p{S}]/u,l9=/(?![*_])[\s\p{P}\p{S}]/u,u9=/(?:[^\s\p{P}\p{S}]|[*_])/u,c9=We(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",j8?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),WE=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,d9=We(WE,"u").replace(/punct/g,kl).getRegex(),f9=We(WE,"u").replace(/punct/g,jE).getRegex(),YE="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",h9=We(YE,"gu").replace(/notPunctSpace/g,$E).replace(/punctSpace/g,Rd).replace(/punct/g,kl).getRegex(),p9=We(YE,"gu").replace(/notPunctSpace/g,a9).replace(/punctSpace/g,s9).replace(/punct/g,jE).getRegex(),m9=We("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,$E).replace(/punctSpace/g,Rd).replace(/punct/g,kl).getRegex(),g9=We(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,VE).getRegex(),b9="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",E9=We(b9,"gu").replace(/notPunctSpace/g,u9).replace(/punctSpace/g,l9).replace(/punct/g,VE).getRegex(),y9=We(/\\(punct)/,"gu").replace(/punct/g,kl).getRegex(),T9=We(/^<(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(),x9=We(Nd).replace("(?:-->|$)","-->").getRegex(),_9=We("^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",x9).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),$a=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,k9=We(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",$a).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ZE=We(/^!?\[(label)\]\[(ref)\]/).replace("label",$a).replace("ref",Id).getRegex(),GE=We(/^!?\[(ref)\](?:\[\])?/).replace("ref",Id).getRegex(),w9=We("reflink|nolink(?!\\()","g").replace("reflink",ZE).replace("nolink",GE).getRegex(),Mp=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ld={_backpedal:ri,anyPunctuation:y9,autolink:T9,blockSkip:c9,br:UE,code:r9,del:ri,delLDelim:ri,delRDelim:ri,emStrongLDelim:d9,emStrongRDelimAst:h9,emStrongRDelimUnd:m9,escape:n9,link:k9,nolink:GE,punctuation:o9,reflink:ZE,reflinkSearch:w9,tag:_9,text:i9,url:ri},A9={...Ld,link:We(/^!?\[(label)\]\((.*?)\)/).replace("label",$a).getRegex(),reflink:We(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$a).getRegex()},nc={...Ld,emStrongRDelimAst:p9,emStrongLDelim:f9,delLDelim:g9,delRDelim:E9,url:We(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Mp).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:We(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Mp).getRegex()},S9={...nc,br:We(UE).replace("{2,}","*").getRegex(),text:We(nc.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ea={normal:Od,gfm:e9,pedantic:t9},xo={normal:Ld,gfm:nc,breaks:S9,pedantic:A9},C9={"&":"&","<":"<",">":">",'"':""","'":"'"},Bp=e=>C9[e];function hr(e,t){if(t){if(tn.escapeTest.test(e))return e.replace(tn.escapeReplace,Bp)}else if(tn.escapeTestNoEncode.test(e))return e.replace(tn.escapeReplaceNoEncode,Bp);return e}function Fp(e){try{e=encodeURI(e).replace(tn.percentDecode,"%")}catch{return null}return e}function Hp(e,t){var o;let n=e.replace(tn.findPipe,(s,a,l)=>{let u=!1,d=a;for(;--d>=0&&l[d]==="\\";)u=!u;return u?"|":" |"}),r=n.split(tn.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!((o=r.at(-1))!=null&&o.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(tn.slashPipe,"|");return r}function _o(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function v9(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function I9(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let o=4-n%4;r+=" ".repeat(o),n+=o}else r+=i,n++;return r}function zp(e,t,n,r,i){let o=t.href,s=t.title||null,a=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:s,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}function N9(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
142
|
-
`).map(o=>{let s=o.match(n.other.beginningSpace);if(s===null)return o;let[a]=s;return a.length>=i.length?o.slice(i.length):o}).join(`
|
|
143
|
-
`)}var ja=class{constructor(e){Ge(this,"options");Ge(this,"rules");Ge(this,"lexer");this.options=e||Ci}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:_o(n,`
|
|
144
|
-
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=N9(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=_o(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:_o(t[0],`
|
|
145
|
-
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=_o(t[0],`
|
|
146
|
-
`).split(`
|
|
147
|
-
`),r="",i="",o=[];for(;n.length>0;){let s=!1,a=[],l;for(l=0;l<n.length;l++)if(this.rules.other.blockquoteStart.test(n[l]))a.push(n[l]),s=!0;else if(!s)a.push(n[l]);else break;n=n.slice(l);let u=a.join(`
|
|
148
|
-
`),d=u.replace(this.rules.other.blockquoteSetextReplace,`
|
|
149
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
150
|
-
${u}`:u,i=i?`${i}
|
|
151
|
-
${d}`:d;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,o,!0),this.lexer.state.top=c,n.length===0)break;let h=o.at(-1);if((h==null?void 0:h.type)==="code")break;if((h==null?void 0:h.type)==="blockquote"){let p=h,m=p.raw+`
|
|
152
|
-
`+n.join(`
|
|
153
|
-
`),b=this.blockquote(m);o[o.length-1]=b,r=r.substring(0,r.length-p.raw.length)+b.raw,i=i.substring(0,i.length-p.text.length)+b.text;break}else if((h==null?void 0:h.type)==="list"){let p=h,m=p.raw+`
|
|
154
|
-
`+n.join(`
|
|
155
|
-
`),b=this.list(m);o[o.length-1]=b,r=r.substring(0,r.length-h.raw.length)+b.raw,i=i.substring(0,i.length-p.raw.length)+b.raw,n=m.substring(o.at(-1).raw.length).split(`
|
|
156
|
-
`);continue}}return{type:"blockquote",raw:r,tokens:o,text:i}}}list(e){var n,r;let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim(),o=i.length>1,s={type:"list",raw:"",ordered:o,start:o?+i.slice(0,-1):"",loose:!1,items:[]};i=o?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=o?i:"[*+-]");let a=this.rules.other.listItemRegex(i),l=!1;for(;e;){let d=!1,c="",h="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let p=I9(t[2].split(`
|
|
157
|
-
`,1)[0],t[1].length),m=e.split(`
|
|
158
|
-
`,1)[0],b=!p.trim(),y=0;if(this.options.pedantic?(y=2,h=p.trimStart()):b?y=t[1].length+1:(y=p.search(this.rules.other.nonSpaceChar),y=y>4?1:y,h=p.slice(y),y+=t[1].length),b&&this.rules.other.blankLine.test(m)&&(c+=m+`
|
|
159
|
-
`,e=e.substring(m.length+1),d=!0),!d){let E=this.rules.other.nextBulletRegex(y),x=this.rules.other.hrRegex(y),_=this.rules.other.fencesBeginRegex(y),P=this.rules.other.headingBeginRegex(y),R=this.rules.other.htmlBeginRegex(y),C=this.rules.other.blockquoteBeginRegex(y);for(;e;){let S=e.split(`
|
|
160
|
-
`,1)[0],O;if(m=S,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),O=m):O=m.replace(this.rules.other.tabCharGlobal," "),_.test(m)||P.test(m)||R.test(m)||C.test(m)||E.test(m)||x.test(m))break;if(O.search(this.rules.other.nonSpaceChar)>=y||!m.trim())h+=`
|
|
161
|
-
`+O.slice(y);else{if(b||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(p)||P.test(p)||x.test(p))break;h+=`
|
|
162
|
-
`+m}b=!m.trim(),c+=S+`
|
|
163
|
-
`,e=e.substring(S.length+1),p=O.slice(y)}}s.loose||(l?s.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(l=!0)),s.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]}),s.raw+=c}let u=s.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let d of s.items){if(this.lexer.state.top=!1,d.tokens=this.lexer.blockTokens(d.text,[]),d.task){if(d.text=d.text.replace(this.rules.other.listReplaceTask,""),((n=d.tokens[0])==null?void 0:n.type)==="text"||((r=d.tokens[0])==null?void 0:r.type)==="paragraph"){d.tokens[0].raw=d.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),d.tokens[0].text=d.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}}let c=this.rules.other.listTaskCheckbox.exec(d.raw);if(c){let h={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};d.checked=h.checked,s.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=h.raw+d.tokens[0].raw,d.tokens[0].text=h.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(h)):d.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):d.tokens.unshift(h)}}if(!s.loose){let c=d.tokens.filter(p=>p.type==="space"),h=c.length>0&&c.some(p=>this.rules.other.anyLine.test(p.raw));s.loose=h}}if(s.loose)for(let d of s.items){d.loose=!0;for(let c of d.tokens)c.type==="text"&&(c.type="paragraph")}return s}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:i}}}table(e){var s;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Hp(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(s=t[3])!=null&&s.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
164
|
-
`):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let a of r)this.rules.other.tableAlignRight.test(a)?o.align.push("right"):this.rules.other.tableAlignCenter.test(a)?o.align.push("center"):this.rules.other.tableAlignLeft.test(a)?o.align.push("left"):o.align.push(null);for(let a=0;a<n.length;a++)o.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:o.align[a]});for(let a of i)o.rows.push(Hp(a,o.header.length).map((l,u)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[u]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
|
|
165
|
-
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let o=_o(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=v9(t[2],"()");if(o===-2)return;if(o>-1){let s=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(r);o&&(r=o[1],i=o[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),zp(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[r.toLowerCase()];if(!i){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return zp(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,o,s,a=i,l=0,u=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+i);(r=u.exec(t))!=null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(s=[...o].length,r[3]||r[4]){a+=s;continue}else if((r[5]||r[6])&&i%3&&!((i+s)%3)){l+=s;continue}if(a-=s,a>0)continue;s=Math.min(s,s+a+l);let d=[...r[0]][0].length,c=e.slice(0,i+r.index+d+s);if(Math.min(i,s)%2){let p=c.slice(1,-1);return{type:"em",raw:c,text:p,tokens:this.lexer.inlineTokens(p)}}let h=c.slice(2,-2);return{type:"strong",raw:c,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,o,s,a=i,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+i);(r=l.exec(t))!=null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o||(s=[...o].length,s!==i))continue;if(r[3]||r[4]){a+=s;continue}if(a-=s,a>0)continue;s=Math.min(s,s+a);let u=[...r[0]][0].length,d=e.slice(0,i+r.index+u+s),c=d.slice(i,-i);return{type:"del",raw:d,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let r,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let o;do o=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(o!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},In=class rc{constructor(t){Ge(this,"tokens");Ge(this,"options");Ge(this,"state");Ge(this,"inlineQueue");Ge(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ci,this.options.tokenizer=this.options.tokenizer||new ja,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 n={other:tn,block:ea.normal,inline:xo.normal};this.options.pedantic?(n.block=ea.pedantic,n.inline=xo.pedantic):this.options.gfm&&(n.block=ea.gfm,this.options.breaks?n.inline=xo.breaks:n.inline=xo.gfm),this.tokenizer.rules=n}static get rules(){return{block:ea,inline:xo}}static lex(t,n){return new rc(n).lex(t)}static lexInline(t,n){return new rc(n).inlineTokens(t)}lex(t){t=t.replace(tn.carriageReturn,`
|
|
166
|
-
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){var i,o,s;for(this.options.pedantic&&(t=t.replace(tn.tabCharGlobal," ").replace(tn.spaceLine,""));t;){let a;if((o=(i=this.options.extensions)==null?void 0:i.block)!=null&&o.some(u=>(a=u.call({lexer:this},t,n))?(t=t.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.space(t)){t=t.substring(a.raw.length);let u=n.at(-1);a.raw.length===1&&u!==void 0?u.raw+=`
|
|
167
|
-
`:n.push(a);continue}if(a=this.tokenizer.code(t)){t=t.substring(a.raw.length);let u=n.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
|
|
168
|
-
`)?"":`
|
|
169
|
-
`)+a.raw,u.text+=`
|
|
170
|
-
`+a.text,this.inlineQueue.at(-1).src=u.text):n.push(a);continue}if(a=this.tokenizer.fences(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.heading(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.hr(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.blockquote(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.list(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.html(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.def(t)){t=t.substring(a.raw.length);let u=n.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
|
|
171
|
-
`)?"":`
|
|
172
|
-
`)+a.raw,u.text+=`
|
|
173
|
-
`+a.raw,this.inlineQueue.at(-1).src=u.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},n.push(a));continue}if(a=this.tokenizer.table(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.lheading(t)){t=t.substring(a.raw.length),n.push(a);continue}let l=t;if((s=this.options.extensions)!=null&&s.startBlock){let u=1/0,d=t.slice(1),c;this.options.extensions.startBlock.forEach(h=>{c=h.call({lexer:this},d),typeof c=="number"&&c>=0&&(u=Math.min(u,c))}),u<1/0&&u>=0&&(l=t.substring(0,u+1))}if(this.state.top&&(a=this.tokenizer.paragraph(l))){let u=n.at(-1);r&&(u==null?void 0:u.type)==="paragraph"?(u.raw+=(u.raw.endsWith(`
|
|
174
|
-
`)?"":`
|
|
175
|
-
`)+a.raw,u.text+=`
|
|
176
|
-
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):n.push(a),r=l.length!==t.length,t=t.substring(a.raw.length);continue}if(a=this.tokenizer.text(t)){t=t.substring(a.raw.length);let u=n.at(-1);(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
|
|
177
|
-
`)?"":`
|
|
178
|
-
`)+a.raw,u.text+=`
|
|
179
|
-
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):n.push(a);continue}if(t){let u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var l,u,d,c,h;let r=t,i=null;if(this.tokens.links){let p=Object.keys(this.tokens.links);if(p.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)p.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)o=i[2]?i[2].length:0,r=r.slice(0,i.index+o)+"["+"a".repeat(i[0].length-o-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=((u=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:u.call({lexer:this},r))??r;let s=!1,a="";for(;t;){s||(a=""),s=!1;let p;if((c=(d=this.options.extensions)==null?void 0:d.inline)!=null&&c.some(b=>(p=b.call({lexer:this},t,n))?(t=t.substring(p.raw.length),n.push(p),!0):!1))continue;if(p=this.tokenizer.escape(t)){t=t.substring(p.raw.length),n.push(p);continue}if(p=this.tokenizer.tag(t)){t=t.substring(p.raw.length),n.push(p);continue}if(p=this.tokenizer.link(t)){t=t.substring(p.raw.length),n.push(p);continue}if(p=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(p.raw.length);let b=n.at(-1);p.type==="text"&&(b==null?void 0:b.type)==="text"?(b.raw+=p.raw,b.text+=p.text):n.push(p);continue}if(p=this.tokenizer.emStrong(t,r,a)){t=t.substring(p.raw.length),n.push(p);continue}if(p=this.tokenizer.codespan(t)){t=t.substring(p.raw.length),n.push(p);continue}if(p=this.tokenizer.br(t)){t=t.substring(p.raw.length),n.push(p);continue}if(p=this.tokenizer.del(t,r,a)){t=t.substring(p.raw.length),n.push(p);continue}if(p=this.tokenizer.autolink(t)){t=t.substring(p.raw.length),n.push(p);continue}if(!this.state.inLink&&(p=this.tokenizer.url(t))){t=t.substring(p.raw.length),n.push(p);continue}let m=t;if((h=this.options.extensions)!=null&&h.startInline){let b=1/0,y=t.slice(1),E;this.options.extensions.startInline.forEach(x=>{E=x.call({lexer:this},y),typeof E=="number"&&E>=0&&(b=Math.min(b,E))}),b<1/0&&b>=0&&(m=t.substring(0,b+1))}if(p=this.tokenizer.inlineText(m)){t=t.substring(p.raw.length),p.raw.slice(-1)!=="_"&&(a=p.raw.slice(-1)),s=!0;let b=n.at(-1);(b==null?void 0:b.type)==="text"?(b.raw+=p.raw,b.text+=p.text):n.push(p);continue}if(t){let b="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(b);break}else throw new Error(b)}}return n}},Va=class{constructor(e){Ge(this,"options");Ge(this,"parser");this.options=e||Ci}space(e){return""}code({text:e,lang:t,escaped:n}){var o;let r=(o=(t||"").match(tn.notSpaceStart))==null?void 0:o[0],i=e.replace(tn.endingNewline,"")+`
|
|
180
|
-
`;return r?'<pre><code class="language-'+hr(r)+'">'+(n?i:hr(i,!0))+`</code></pre>
|
|
181
|
-
`:"<pre><code>"+(n?i:hr(i,!0))+`</code></pre>
|
|
182
|
-
`}blockquote({tokens:e}){return`<blockquote>
|
|
183
|
-
${this.parser.parse(e)}</blockquote>
|
|
184
|
-
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
185
|
-
`}hr(e){return`<hr>
|
|
186
|
-
`}list(e){let t=e.ordered,n=e.start,r="";for(let s=0;s<e.items.length;s++){let a=e.items[s];r+=this.listitem(a)}let i=t?"ol":"ul",o=t&&n!==1?' start="'+n+'"':"";return"<"+i+o+`>
|
|
187
|
-
`+r+"</"+i+`>
|
|
188
|
-
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
189
|
-
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
190
|
-
`}table(e){let t="",n="";for(let i=0;i<e.header.length;i++)n+=this.tablecell(e.header[i]);t+=this.tablerow({text:n});let r="";for(let i=0;i<e.rows.length;i++){let o=e.rows[i];n="";for(let s=0;s<o.length;s++)n+=this.tablecell(o[s]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
|
191
|
-
<thead>
|
|
192
|
-
`+t+`</thead>
|
|
193
|
-
`+r+`</table>
|
|
194
|
-
`}tablerow({text:e}){return`<tr>
|
|
195
|
-
${e}</tr>
|
|
196
|
-
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
197
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${hr(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Fp(e);if(i===null)return r;e=i;let o='<a href="'+e+'"';return t&&(o+=' title="'+hr(t)+'"'),o+=">"+r+"</a>",o}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Fp(e);if(i===null)return hr(n);e=i;let o=`<img src="${e}" alt="${n}"`;return t&&(o+=` title="${hr(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:hr(e.text)}},Dd=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}},$n=class ic{constructor(t){Ge(this,"options");Ge(this,"renderer");Ge(this,"textRenderer");this.options=t||Ci,this.options.renderer=this.options.renderer||new Va,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Dd}static parse(t,n){return new ic(n).parse(t)}static parseInline(t,n){return new ic(n).parseInline(t)}parse(t){var r,i;let n="";for(let o=0;o<t.length;o++){let s=t[o];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[s.type]){let l=s,u=this.options.extensions.renderers[l.type].call({parser:this},l);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){n+=u||"";continue}}let a=s;switch(a.type){case"space":{n+=this.renderer.space(a);break}case"hr":{n+=this.renderer.hr(a);break}case"heading":{n+=this.renderer.heading(a);break}case"code":{n+=this.renderer.code(a);break}case"table":{n+=this.renderer.table(a);break}case"blockquote":{n+=this.renderer.blockquote(a);break}case"list":{n+=this.renderer.list(a);break}case"checkbox":{n+=this.renderer.checkbox(a);break}case"html":{n+=this.renderer.html(a);break}case"def":{n+=this.renderer.def(a);break}case"paragraph":{n+=this.renderer.paragraph(a);break}case"text":{n+=this.renderer.text(a);break}default:{let l='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(t,n=this.renderer){var i,o;let r="";for(let s=0;s<t.length;s++){let a=t[s];if((o=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&o[a.type]){let u=this.options.extensions.renderers[a.type].call({parser:this},a);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=u||"";continue}}let l=a;switch(l.type){case"escape":{r+=n.text(l);break}case"html":{r+=n.html(l);break}case"link":{r+=n.link(l);break}case"image":{r+=n.image(l);break}case"checkbox":{r+=n.checkbox(l);break}case"strong":{r+=n.strong(l);break}case"em":{r+=n.em(l);break}case"codespan":{r+=n.codespan(l);break}case"br":{r+=n.br(l);break}case"del":{r+=n.del(l);break}case"text":{r+=n.text(l);break}default:{let u='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}},aa,Oo=(aa=class{constructor(e){Ge(this,"options");Ge(this,"block");this.options=e||Ci}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?In.lex:In.lexInline}provideParser(){return this.block?$n.parse:$n.parseInline}},Ge(aa,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Ge(aa,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),aa),O9=class{constructor(...e){Ge(this,"defaults",Sd());Ge(this,"options",this.setOptions);Ge(this,"parse",this.parseMarkdown(!0));Ge(this,"parseInline",this.parseMarkdown(!1));Ge(this,"Parser",$n);Ge(this,"Renderer",Va);Ge(this,"TextRenderer",Dd);Ge(this,"Lexer",In);Ge(this,"Tokenizer",ja);Ge(this,"Hooks",Oo);this.use(...e)}walkTokens(e,t){var r,i;let n=[];for(let o of e)switch(n=n.concat(t.call(this,o)),o.type){case"table":{let s=o;for(let a of s.header)n=n.concat(this.walkTokens(a.tokens,t));for(let a of s.rows)for(let l of a)n=n.concat(this.walkTokens(l.tokens,t));break}case"list":{let s=o;n=n.concat(this.walkTokens(s.items,t));break}default:{let s=o;(i=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&i[s.type]?this.defaults.extensions.childTokens[s.type].forEach(a=>{let l=s[a].flat(1/0);n=n.concat(this.walkTokens(l,t))}):s.tokens&&(n=n.concat(this.walkTokens(s.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let o=t.renderers[i.name];o?t.renderers[i.name]=function(...s){let a=i.renderer.apply(this,s);return a===!1&&(a=o.apply(this,s)),a}: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 o=t[i.level];o?o.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)}),r.extensions=t),n.renderer){let i=this.defaults.renderer||new Va(this.defaults);for(let o in n.renderer){if(!(o in i))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let s=o,a=n.renderer[s],l=i[s];i[s]=(...u)=>{let d=a.apply(i,u);return d===!1&&(d=l.apply(i,u)),d||""}}r.renderer=i}if(n.tokenizer){let i=this.defaults.tokenizer||new ja(this.defaults);for(let o in n.tokenizer){if(!(o in i))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let s=o,a=n.tokenizer[s],l=i[s];i[s]=(...u)=>{let d=a.apply(i,u);return d===!1&&(d=l.apply(i,u)),d}}r.tokenizer=i}if(n.hooks){let i=this.defaults.hooks||new Oo;for(let o in n.hooks){if(!(o in i))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let s=o,a=n.hooks[s],l=i[s];Oo.passThroughHooks.has(o)?i[s]=u=>{if(this.defaults.async&&Oo.passThroughHooksRespectAsync.has(o))return(async()=>{let c=await a.call(i,u);return l.call(i,c)})();let d=a.call(i,u);return l.call(i,d)}:i[s]=(...u)=>{if(this.defaults.async)return(async()=>{let c=await a.apply(i,u);return c===!1&&(c=await l.apply(i,u)),c})();let d=a.apply(i,u);return d===!1&&(d=l.apply(i,u)),d}}r.hooks=i}if(n.walkTokens){let i=this.defaults.walkTokens,o=n.walkTokens;r.walkTokens=function(s){let a=[];return a.push(o.call(this,s)),i&&(a=a.concat(i.call(this,s))),a}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return In.lex(e,t??this.defaults)}parser(e,t){return $n.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},o=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return o(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 o(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return o(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 s=i.hooks?await i.hooks.preprocess(t):t,a=await(i.hooks?await i.hooks.provideLexer():e?In.lex:In.lexInline)(s,i),l=i.hooks?await i.hooks.processAllTokens(a):a;i.walkTokens&&await Promise.all(this.walkTokens(l,i.walkTokens));let u=await(i.hooks?await i.hooks.provideParser():e?$n.parse:$n.parseInline)(l,i);return i.hooks?await i.hooks.postprocess(u):u})().catch(o);try{i.hooks&&(t=i.hooks.preprocess(t));let s=(i.hooks?i.hooks.provideLexer():e?In.lex:In.lexInline)(t,i);i.hooks&&(s=i.hooks.processAllTokens(s)),i.walkTokens&&this.walkTokens(s,i.walkTokens);let a=(i.hooks?i.hooks.provideParser():e?$n.parse:$n.parseInline)(s,i);return i.hooks&&(a=i.hooks.postprocess(a)),a}catch(s){return o(s)}}}onError(e,t){return n=>{if(n.message+=`
|
|
198
|
-
Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+hr(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},mi=new O9;function rt(e,t){return mi.parse(e,t)}rt.options=rt.setOptions=function(e){return mi.setOptions(e),rt.defaults=mi.defaults,BE(rt.defaults),rt};rt.getDefaults=Sd;rt.defaults=Ci;rt.use=function(...e){return mi.use(...e),rt.defaults=mi.defaults,BE(rt.defaults),rt};rt.walkTokens=function(e,t){return mi.walkTokens(e,t)};rt.parseInline=mi.parseInline;rt.Parser=$n;rt.parser=$n.parse;rt.Renderer=Va;rt.TextRenderer=Dd;rt.Lexer=In;rt.lexer=In.lex;rt.Tokenizer=ja;rt.Hooks=Oo;rt.parse=rt;rt.options;rt.setOptions;rt.use;rt.walkTokens;rt.parseInline;$n.parse;In.lex;var R9=300,L9="300px",D9=500;function P9(e={}){let{immediate:t=!1,debounceDelay:n=R9,rootMargin:r=L9,idleTimeout:i=D9}=e,[o,s]=T.useState(!1),a=T.useRef(null),l=T.useRef(null),u=T.useRef(null),d=T.useMemo(()=>p=>{let m=Date.now();return window.setTimeout(()=>{p({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-m))})},1)},[]),c=T.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(p,m)=>window.requestIdleCallback(p,m):d,[d]),h=T.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?p=>window.cancelIdleCallback(p):p=>{clearTimeout(p)},[]);return T.useEffect(()=>{if(t){s(!0);return}let p=a.current;if(!p)return;l.current&&(clearTimeout(l.current),l.current=null),u.current&&(h(u.current),u.current=null);let m=()=>{l.current&&(clearTimeout(l.current),l.current=null),u.current&&(h(u.current),u.current=null)},b=_=>{u.current=c(P=>{P.timeRemaining()>0||P.didTimeout?(s(!0),_.disconnect()):u.current=c(()=>{s(!0),_.disconnect()},{timeout:i/2})},{timeout:i})},y=_=>{m(),l.current=window.setTimeout(()=>{var P,R;let C=_.takeRecords();(C.length===0||(R=(P=C.at(-1))==null?void 0:P.isIntersecting)!=null&&R)&&b(_)},n)},E=(_,P)=>{_.isIntersecting?y(P):m()},x=new IntersectionObserver(_=>{for(let P of _)E(P,x)},{rootMargin:r,threshold:0});return x.observe(p),()=>{l.current&&clearTimeout(l.current),u.current&&h(u.current),x.disconnect()}},[t,n,r,i,h,c]),{shouldRender:o,containerRef:a}}var qE=/\s/,M9=/^\s+$/,B9=new Set(["code","pre","svg","math","annotation"]),F9=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",H9=e=>e.some(t=>F9(t)&&B9.has(t.tagName)),z9=e=>{let t=[],n="",r=!1;for(let i of e){let o=qE.test(i);o!==r&&n&&(t.push(n),n=""),n+=i,r=o}return n&&t.push(n),t},U9=e=>{let t=[],n="";for(let r of e)qE.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},$9=(e,t,n,r)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${r}`},children:[{type:"text",value:e}]}),j9=(e,t,n)=>{let r=t.at(-1);if(!(r&&"children"in r))return;if(H9(t))return Fb;let i=r,o=i.children.indexOf(e);if(o===-1)return;let s=e.value;if(!s.trim())return;let a=(n.sep==="char"?U9(s):z9(s)).map(l=>M9.test(l)?{type:"text",value:l}:$9(l,n.animation,n.duration,n.easing));return i.children.splice(o,1,...a),o+a.length};function oc(e){var t,n,r,i;let o={animation:(t=e==null?void 0:e.animation)!=null?t:"fadeIn",duration:(n=e==null?void 0:e.duration)!=null?n:150,easing:(r=e==null?void 0:e.easing)!=null?r:"ease",sep:(i=e==null?void 0:e.sep)!=null?i:"word"};return{name:"animate",type:"animate",rehypePlugin:()=>s=>{Hb(s,"text",(a,l)=>j9(a,l,o))}}}oc();var KE=T.createContext(!1),V9=()=>T.useContext(KE),we=(...e)=>Oc(Zt(e)),Yi=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),o=document.createElement("a");o.href=i,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(i)},W9=we("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"),Y9=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),o=n.slice(r+1).trim();i&&o&&(t[i]=o)}}return t},Z9=T.memo(({children:e,result:t,language:n,className:r,...i})=>{let o=T.useMemo(()=>{let s={};return t.bg&&(s["--sdm-bg"]=t.bg),t.fg&&(s["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(s,Y9(t.rootStyle)),s},[t.bg,t.fg,t.rootStyle]);return g.jsx("div",{className:we(r,"overflow-hidden rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...i,children:g.jsx("pre",{className:we(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:o,children:g.jsx("code",{className:"[counter-increment:line_0] [counter-reset:line]",children:t.tokens.map((s,a)=>g.jsx("span",{className:W9,children:s.map((l,u)=>{let d={},c=!!l.bgColor;if(l.color&&(d["--sdm-c"]=l.color),l.bgColor&&(d["--sdm-tbg"]=l.bgColor),l.htmlStyle)for(let[h,p]of Object.entries(l.htmlStyle))h==="color"?d["--sdm-c"]=p:h==="background-color"?(d["--sdm-tbg"]=p,c=!0):d[h]=p;return g.jsx("span",{className:we("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",c&&"bg-[var(--sdm-tbg)]",c&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:d,...l.htmlAttrs,children:l.content},u)})},a))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className),G9=({className:e,language:t,style:n,isIncomplete:r,...i})=>g.jsx("div",{className:we("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...i}),XE=T.createContext({code:""}),QE=()=>T.useContext(XE),q9=({language:e})=>g.jsx("div",{className:"flex h-8 items-center text-muted-foreground text-xs","data-language":e,"data-streamdown":"code-block-header",children:g.jsx("span",{className:"ml-1 font-mono lowercase",children:e})}),K9=/\n+$/,X9=T.lazy(()=>rs(()=>import("./highlighted-body-B3W2YXNL-epbVCzUZ.js"),__vite__mapDeps([0,1])).then(e=>({default:e.HighlightedCodeBlockBody}))),Q9=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,...o})=>{let s=T.useMemo(()=>e.replace(K9,""),[e]),a=T.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:s.split(`
|
|
199
|
-
`).map(l=>[{content:l,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[s]);return g.jsx(XE.Provider,{value:{code:e},children:g.jsxs(G9,{isIncomplete:i,language:t,children:[g.jsx(q9,{language:t}),r?g.jsx("div",{className:"pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end",children:g.jsx("div",{className:"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:r})}):null,g.jsx(T.Suspense,{fallback:g.jsx(Z9,{className:n,language:t,result:a,...o}),children:g.jsx(X9,{className:n,code:s,language:t,raw:a,...o})})]})})},Pd=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),Md=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),wl=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),J9=e=>g.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[g.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),eB=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),tB=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),JE=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),Up=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),nB=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),rB=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),$p=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:o,...s})=>{let[a,l]=T.useState(!1),u=T.useRef(0),{code:d}=QE(),{isAnimating:c}=T.useContext(Pn),h=o??d,p=async()=>{var b;if(typeof window>"u"||!((b=navigator==null?void 0:navigator.clipboard)!=null&&b.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{a||(await navigator.clipboard.writeText(h),l(!0),e==null||e(),u.current=window.setTimeout(()=>l(!1),n))}catch(y){t==null||t(y)}};T.useEffect(()=>()=>{window.clearTimeout(u.current)},[]);let m=a?Pd:Md;return g.jsx("button",{className:we("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:c,onClick:p,title:"Copy Code",type:"button",...s,children:r??g.jsx(m,{size:14})})},jp={"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"},iB=({onDownload:e,onError:t,language:n,children:r,className:i,code:o,...s})=>{let{code:a}=QE(),{isAnimating:l}=T.useContext(Pn),u=o??a,d=`file.${n&&n in jp?jp[n]:"txt"}`,c="text/plain",h=()=>{try{Yi(d,u,c),e==null||e()}catch(p){t==null||t(p)}};return g.jsx("button",{className:we("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:h,title:"Download file",type:"button",...s,children:r??g.jsx(wl,{size:14})})},oB=()=>g.jsxs("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[g.jsx("div",{className:"h-[46px] w-full bg-muted/80"}),g.jsx("div",{className:"flex w-full items-center justify-center p-4",children:g.jsx(J9,{className:"size-4 animate-spin"})})]}),sB=/\.[^/.]+$/,aB=({node:e,className:t,src:n,alt:r,onLoad:i,onError:o,...s})=>{let a=T.useRef(null),[l,u]=T.useState(!1),[d,c]=T.useState(!1),h=s.width!=null||s.height!=null,p=(l||h)&&!d,m=d&&!h;T.useEffect(()=>{let x=a.current;if(x!=null&&x.complete){let _=x.naturalWidth>0;u(_),c(!_)}},[]);let b=T.useCallback(x=>{u(!0),c(!1),i==null||i(x)},[i]),y=T.useCallback(x=>{u(!1),c(!0),o==null||o(x)},[o]),E=async()=>{if(n)try{let x=await(await fetch(n)).blob(),_=new URL(n,window.location.origin).pathname.split("/").pop()||"",P=_.split(".").pop(),R=_.includes(".")&&P!==void 0&&P.length<=4,C="";if(R)C=_;else{let S=x.type,O="png";S.includes("jpeg")||S.includes("jpg")?O="jpg":S.includes("png")?O="png":S.includes("svg")?O="svg":S.includes("gif")?O="gif":S.includes("webp")&&(O="webp"),C=`${(r||_||"image").replace(sB,"")}.${O}`}Yi(C,x,x.type)}catch{window.open(n,"_blank")}};return n?g.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[g.jsx("img",{alt:r,className:we("max-w-full rounded-lg",m&&"hidden",t),"data-streamdown":"image",onError:y,onLoad:b,ref:a,src:n,...s}),m&&g.jsx("span",{className:"text-muted-foreground text-xs italic","data-streamdown":"image-fallback",children:"Image not available"}),g.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),p&&g.jsx("button",{className:we("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:E,title:"Download image",type:"button",children:g.jsx(wl,{size:14})})]}):null},Wo=0,lB=()=>{Wo+=1,Wo===1&&(document.body.style.overflow="hidden")},uB=()=>{Wo=Math.max(0,Wo-1),Wo===0&&(document.body.style.overflow="")},cB=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[i,o]=T.useState(!1),s=T.useCallback(async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)}catch{}},[e]),a=T.useCallback(()=>{r(),n()},[r,n]);return T.useEffect(()=>{if(t){lB();let l=u=>{u.key==="Escape"&&n()};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l),uB()}}},[t,n]),t?g.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:n,onKeyDown:l=>{l.key==="Escape"&&n()},role:"button",tabIndex:0,children:g.jsxs("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:l=>l.stopPropagation(),onKeyDown:l=>l.stopPropagation(),role:"presentation",children:[g.jsx("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:n,title:"Close",type:"button",children:g.jsx(JE,{size:16})}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsxs("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[g.jsx(Up,{size:20}),g.jsx("span",{children:"Open external link?"})]}),g.jsx("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),g.jsx("div",{className:we("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("button",{className:"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:s,type:"button",children:i?g.jsxs(g.Fragment,{children:[g.jsx(Pd,{size:14}),g.jsx("span",{children:"Copied"})]}):g.jsxs(g.Fragment,{children:[g.jsx(Md,{size:14}),g.jsx("span",{children:"Copy link"})]})}),g.jsxs("button",{className:"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:a,type:"button",children:[g.jsx(Up,{size:14}),g.jsx("span",{children:"Open link"})]})]})]})}):null},sc=T.createContext(null),ey=()=>T.useContext(sc),mU=()=>{var e;let t=ey();return(e=t==null?void 0:t.code)!=null?e:null},Bd=()=>{var e;let t=ey();return(e=t==null?void 0:t.mermaid)!=null?e:null},dB=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,o)=>{let s="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),a=new Image;a.crossOrigin="anonymous",a.onload=()=>{let l=document.createElement("canvas"),u=a.width*r,d=a.height*r;l.width=u,l.height=d;let c=l.getContext("2d");if(!c){o(new Error("Failed to create 2D canvas context for PNG export"));return}c.drawImage(a,0,0,u,d),l.toBlob(h=>{if(!h){o(new Error("Failed to create PNG blob"));return}i(h)},"image/png")},a.onerror=()=>o(new Error("Failed to load SVG image")),a.src=s})},fB=({chart:e,children:t,className:n,onDownload:r,config:i,onError:o})=>{let[s,a]=T.useState(!1),l=T.useRef(null),{isAnimating:u}=T.useContext(Pn),d=Bd(),c=async h=>{try{if(h==="mmd"){Yi("diagram.mmd",e,"text/plain"),a(!1),r==null||r(h);return}if(!d){o==null||o(new Error("Mermaid plugin not available"));return}let p=d.getMermaid(i),m=e.split("").reduce((E,x)=>(E<<5)-E+x.charCodeAt(0)|0,0),b=`mermaid-${Math.abs(m)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:y}=await p.render(b,e);if(!y){o==null||o(new Error("SVG not found. Please wait for the diagram to render."));return}if(h==="svg"){Yi("diagram.svg",y,"image/svg+xml"),a(!1),r==null||r(h);return}if(h==="png"){let E=await dB(y);Yi("diagram.png",E,"image/png"),r==null||r(h),a(!1);return}}catch(p){o==null||o(p)}};return T.useEffect(()=>{let h=p=>{let m=p.composedPath();l.current&&!m.includes(l.current)&&a(!1)};return document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)}},[]),g.jsxs("div",{className:"relative",ref:l,children:[g.jsx("button",{className:we("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:u,onClick:()=>a(!s),title:"Download diagram",type:"button",children:t??g.jsx(wl,{size:14})}),s?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>c("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>c("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>c("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},Yo=0,hB=()=>{Yo+=1,Yo===1&&(document.body.style.overflow="hidden")},pB=()=>{Yo=Math.max(0,Yo-1),Yo===0&&(document.body.style.overflow="")},mB=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...o})=>{let[s,a]=T.useState(!1),{isAnimating:l,controls:u}=T.useContext(Pn),d=(()=>{if(typeof u=="boolean")return u;let h=u.mermaid;return h===!1?!1:h===!0||h===void 0?!0:h.panZoom!==!1})(),c=()=>{a(!s)};return T.useEffect(()=>{if(s){hB();let h=p=>{p.key==="Escape"&&a(!1)};return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h),pB()}}},[s]),T.useEffect(()=>{s?n==null||n():r&&r()},[s,n,r]),g.jsxs(g.Fragment,{children:[g.jsx("button",{className:we("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:l,onClick:c,title:"View fullscreen",type:"button",...o,children:g.jsx(eB,{size:14})}),s?yc.createPortal(g.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:c,onKeyDown:h=>{h.key==="Escape"&&c()},role:"button",tabIndex:0,children:[g.jsx("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:c,title:"Exit fullscreen",type:"button",children:g.jsx(JE,{size:20})}),g.jsx("div",{className:"flex size-full items-center justify-center p-4",onClick:h=>h.stopPropagation(),onKeyDown:h=>h.stopPropagation(),role:"presentation",children:g.jsx(Iy,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:d})})]}),document.body):null]})},ty=e=>{var t,n;let r=[],i=[],o=e.querySelectorAll("thead th");for(let a of o)r.push(((t=a.textContent)==null?void 0:t.trim())||"");let s=e.querySelectorAll("tbody tr");for(let a of s){let l=[],u=a.querySelectorAll("td");for(let d of u)l.push(((n=d.textContent)==null?void 0:n.trim())||"");i.push(l)}return{headers:r,rows:i}},ny=e=>{let{headers:t,rows:n}=e,r=a=>{let l=!1,u=!1;for(let d of a){if(d==='"'){l=!0,u=!0;break}(d===","||d===`
|
|
200
|
-
`)&&(l=!0)}return l?u?`"${a.replace(/"/g,'""')}"`:`"${a}"`:a},i=t.length>0?n.length+1:n.length,o=new Array(i),s=0;t.length>0&&(o[s]=t.map(r).join(","),s+=1);for(let a of n)o[s]=a.map(r).join(","),s+=1;return o.join(`
|
|
201
|
-
`)},gB=e=>{let{headers:t,rows:n}=e,r=a=>{let l=!1;for(let d of a)if(d===" "||d===`
|
|
202
|
-
`||d==="\r"){l=!0;break}if(!l)return a;let u=[];for(let d of a)d===" "?u.push("\\t"):d===`
|
|
203
|
-
`?u.push("\\n"):d==="\r"?u.push("\\r"):u.push(d);return u.join("")},i=t.length>0?n.length+1:n.length,o=new Array(i),s=0;t.length>0&&(o[s]=t.map(r).join(" "),s+=1);for(let a of n)o[s]=a.map(r).join(" "),s+=1;return o.join(`
|
|
204
|
-
`)},cu=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},ac=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,o=t.map(a=>cu(a));r[i]=`| ${o.join(" | ")} |`,i+=1;let s=new Array(t.length);for(let a=0;a<t.length;a+=1)s[a]="---";r[i]=`| ${s.join(" | ")} |`,i+=1;for(let a of n)if(a.length<t.length){let l=new Array(t.length);for(let u=0;u<t.length;u+=1)l[u]=u<a.length?cu(a[u]):"";r[i]=`| ${l.join(" | ")} |`,i+=1}else{let l=a.map(u=>cu(u));r[i]=`| ${l.join(" | ")} |`,i+=1}return r.join(`
|
|
205
|
-
`)},bB=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[o,s]=T.useState(!1),[a,l]=T.useState(!1),u=T.useRef(null),d=T.useRef(0),{isAnimating:c}=T.useContext(Pn),h=async m=>{var b,y;if(typeof window>"u"||!((b=navigator==null?void 0:navigator.clipboard)!=null&&b.write)){r==null||r(new Error("Clipboard API not available"));return}try{let E=(y=u.current)==null?void 0:y.closest('[data-streamdown="table-wrapper"]'),x=E==null?void 0:E.querySelector("table");if(!x){r==null||r(new Error("Table not found"));return}let _=ty(x),P=({csv:ny,tsv:gB,md:ac}[m]||ac)(_),R=new ClipboardItem({"text/plain":new Blob([P],{type:"text/plain"}),"text/html":new Blob([x.outerHTML],{type:"text/html"})});await navigator.clipboard.write([R]),l(!0),s(!1),n==null||n(m),d.current=window.setTimeout(()=>l(!1),i)}catch(E){r==null||r(E)}};T.useEffect(()=>{let m=b=>{let y=b.composedPath();u.current&&!y.includes(u.current)&&s(!1)};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m),window.clearTimeout(d.current)}},[]);let p=a?Pd:Md;return g.jsxs("div",{className:"relative",ref:u,children:[g.jsx("button",{className:we("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:c,onClick:()=>s(!o),title:"Copy table",type:"button",children:e??g.jsx(p,{size:14})}),o?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>h("md"),title:"Copy table as Markdown",type:"button",children:"Markdown"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>h("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>h("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},EB=({children:e,className:t,onDownload:n,onError:r})=>{let[i,o]=T.useState(!1),s=T.useRef(null),{isAnimating:a}=T.useContext(Pn),l=u=>{var d;try{let c=(d=s.current)==null?void 0:d.closest('[data-streamdown="table-wrapper"]'),h=c==null?void 0:c.querySelector("table");if(!h){r==null||r(new Error("Table not found"));return}let p=ty(h),m=u==="csv"?ny(p):ac(p);Yi(`table.${u==="csv"?"csv":"md"}`,m,u==="csv"?"text/csv":"text/markdown"),o(!1),n==null||n(u)}catch(c){r==null||r(c)}};return T.useEffect(()=>{let u=d=>{let c=d.composedPath();s.current&&!c.includes(s.current)&&o(!1)};return document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u)}},[]),g.jsxs("div",{className:"relative",ref:s,children:[g.jsx("button",{className:we("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:a,onClick:()=>o(!i),title:"Download table",type:"button",children:e??g.jsx(wl,{size:14})}),i?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>l("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>l("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},yB=({children:e,className:t,showControls:n,...r})=>g.jsxs("div",{className:"my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2","data-streamdown":"table-wrapper",children:[n?g.jsxs("div",{className:"flex items-center justify-end gap-1",children:[g.jsx(bB,{}),g.jsx(EB,{})]}):null,g.jsx("div",{className:"border-collapse overflow-x-auto overscroll-y-auto rounded-md border border-border bg-background",children:g.jsx("table",{className:we("w-full divide-y divide-border",t),"data-streamdown":"table",...r,children:e})})]}),TB=T.lazy(()=>rs(()=>Promise.resolve().then(()=>Qz),void 0).then(e=>({default:e.Mermaid}))),xB=/language-([^\s]+)/;function Al(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 n=e.position.start,r=t.position.start,i=e.position.end,o=t.position.end;return(n==null?void 0:n.line)===(r==null?void 0:r.line)&&(n==null?void 0:n.column)===(r==null?void 0:r.column)&&(i==null?void 0:i.line)===(o==null?void 0:o.line)&&(i==null?void 0:i.column)===(o==null?void 0:o.column)}function _t(e,t){return e.className===t.className&&Al(e.node,t.node)}var lc=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,ta=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Fd=T.memo(({children:e,className:t,node:n,...r})=>g.jsx("ol",{className:we("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>_t(e,t));Fd.displayName="MarkdownOl";var ry=T.memo(({children:e,className:t,node:n,...r})=>g.jsx("li",{className:we("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&Al(e.node,t.node));ry.displayName="MarkdownLi";var iy=T.memo(({children:e,className:t,node:n,...r})=>g.jsx("ul",{className:we("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>_t(e,t));iy.displayName="MarkdownUl";var oy=T.memo(({className:e,node:t,...n})=>g.jsx("hr",{className:we("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>_t(e,t));oy.displayName="MarkdownHr";var sy=T.memo(({children:e,className:t,node:n,...r})=>g.jsx("span",{className:we("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>_t(e,t));sy.displayName="MarkdownStrong";var _B=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:o}=T.useContext(Pn),[s,a]=T.useState(!1),l=n==="streamdown:incomplete-link",u=T.useCallback(async p=>{if(!(!(o!=null&&o.enabled&&n)||l)){if(p.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}a(!0)}},[o,n,l]),d=T.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),c=T.useCallback(()=>{a(!1)},[]),h={url:n??"",isOpen:s,onClose:c,onConfirm:d};return o!=null&&o.enabled&&n?g.jsxs(g.Fragment,{children:[g.jsx("button",{className:we("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",onClick:u,type:"button",children:e}),o.renderModal?o.renderModal(h):g.jsx(cB,{...h})]}):g.jsx("a",{className:we("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},ay=T.memo(_B,(e,t)=>_t(e,t)&&e.href===t.href);ay.displayName="MarkdownA";var ly=T.memo(({children:e,className:t,node:n,...r})=>g.jsx("h1",{className:we("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>_t(e,t));ly.displayName="MarkdownH1";var uy=T.memo(({children:e,className:t,node:n,...r})=>g.jsx("h2",{className:we("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>_t(e,t));uy.displayName="MarkdownH2";var cy=T.memo(({children:e,className:t,node:n,...r})=>g.jsx("h3",{className:we("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>_t(e,t));cy.displayName="MarkdownH3";var dy=T.memo(({children:e,className:t,node:n,...r})=>g.jsx("h4",{className:we("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>_t(e,t));dy.displayName="MarkdownH4";var fy=T.memo(({children:e,className:t,node:n,...r})=>g.jsx("h5",{className:we("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>_t(e,t));fy.displayName="MarkdownH5";var hy=T.memo(({children:e,className:t,node:n,...r})=>g.jsx("h6",{className:we("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>_t(e,t));hy.displayName="MarkdownH6";var py=T.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=T.useContext(Pn),o=lc(i,"table");return g.jsx(yB,{className:t,showControls:o,...r,children:e})},(e,t)=>_t(e,t));py.displayName="MarkdownTable";var my=T.memo(({children:e,className:t,node:n,...r})=>g.jsx("thead",{className:we("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>_t(e,t));my.displayName="MarkdownThead";var gy=T.memo(({children:e,className:t,node:n,...r})=>g.jsx("tbody",{className:we("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>_t(e,t));gy.displayName="MarkdownTbody";var by=T.memo(({children:e,className:t,node:n,...r})=>g.jsx("tr",{className:we("border-border",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>_t(e,t));by.displayName="MarkdownTr";var Ey=T.memo(({children:e,className:t,node:n,...r})=>g.jsx("th",{className:we("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>_t(e,t));Ey.displayName="MarkdownTh";var yy=T.memo(({children:e,className:t,node:n,...r})=>g.jsx("td",{className:we("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>_t(e,t));yy.displayName="MarkdownTd";var Ty=T.memo(({children:e,className:t,node:n,...r})=>g.jsx("blockquote",{className:we("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>_t(e,t));Ty.displayName="MarkdownBlockquote";var xy=T.memo(({children:e,className:t,node:n,...r})=>g.jsx("sup",{className:we("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>_t(e,t));xy.displayName="MarkdownSup";var _y=T.memo(({children:e,className:t,node:n,...r})=>g.jsx("sub",{className:we("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>_t(e,t));_y.displayName="MarkdownSub";var ky=T.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var a,l;if(!T.isValidElement(s))return!1;let u=Array.isArray(s.props.children)?s.props.children:[s.props.children],d=!1,c=!1;for(let h of u)if(h){if(typeof h=="string")h.trim()!==""&&(d=!0);else if(T.isValidElement(h))if(((a=h.props)==null?void 0:a["data-footnote-backref"])!==void 0)c=!0;else{let p=Array.isArray(h.props.children)?h.props.children:[h.props.children];for(let m of p){if(typeof m=="string"&&m.trim()!==""){d=!0;break}if(T.isValidElement(m)&&((l=m.props)==null?void 0:l["data-footnote-backref"])===void 0){d=!0;break}}}}return c&&!d},o=Array.isArray(e)?e.map(s=>{if(!T.isValidElement(s))return s;if(s.type===Fd){let a=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(l=>!i(l));return a.length===0?null:{...s,props:{...s.props,children:a}}}return s}):e;return(Array.isArray(o)?o.some(s=>s!==null):o!==null)?g.jsx("section",{className:t,...r,children:o}):null}return g.jsx("section",{className:t,...r,children:e})},(e,t)=>_t(e,t));ky.displayName="MarkdownSection";var kB=({node:e,className:t,children:n,...r})=>{var i;let o=!("data-block"in r),{mermaid:s,controls:a}=T.useContext(Pn),l=Bd(),u=V9();if(o)return g.jsx("code",{className:we("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let d=t==null?void 0:t.match(xB),c=(i=d==null?void 0:d.at(1))!=null?i:"",h="";if(T.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?h=n.props.children:typeof n=="string"&&(h=n),c==="mermaid"&&l){let m=lc(a,"mermaid"),b=ta(a,"download"),y=ta(a,"copy"),E=ta(a,"fullscreen"),x=ta(a,"panZoom"),_=m&&(b||y||E);return g.jsx(T.Suspense,{fallback:g.jsx(oB,{}),children:g.jsxs("div",{className:we("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:[g.jsx("div",{className:"flex h-8 items-center text-muted-foreground text-xs",children:g.jsx("span",{className:"ml-1 font-mono lowercase",children:"mermaid"})}),_?g.jsx("div",{className:"pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end",children:g.jsxs("div",{className:"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:[b?g.jsx(fB,{chart:h,config:s==null?void 0:s.config}):null,y?g.jsx($p,{code:h}):null,E?g.jsx(mB,{chart:h,config:s==null?void 0:s.config}):null]})}):null,g.jsx("div",{className:"rounded-md border border-border bg-background",children:g.jsx(TB,{chart:h,config:s==null?void 0:s.config,showControls:x})})]})})}let p=lc(a,"code");return g.jsx(Q9,{className:t,code:h,isIncomplete:u,language:c,children:p?g.jsxs(g.Fragment,{children:[g.jsx(iB,{code:h,language:c}),g.jsx($p,{})]}):null})},wy=T.memo(kB,(e,t)=>e.className===t.className&&Al(e.node,t.node));wy.displayName="MarkdownCode";var Ay=T.memo(aB,(e,t)=>e.className===t.className&&Al(e.node,t.node));Ay.displayName="MarkdownImg";var Sy=T.memo(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&T.isValidElement(r[0])){let i=r[0].props.node,o=i==null?void 0:i.tagName;if(o==="img")return g.jsx(g.Fragment,{children:e});if(o==="code"&&"data-block"in r[0].props)return g.jsx(g.Fragment,{children:e})}return g.jsx("p",{...n,children:e})},(e,t)=>_t(e,t));Sy.displayName="MarkdownParagraph";var wB={ol:Fd,li:ry,ul:iy,hr:oy,strong:sy,a:ay,h1:ly,h2:uy,h3:cy,h4:dy,h5:fy,h6:hy,table:py,thead:my,tbody:gy,tr:by,th:Ey,td:yy,blockquote:Ty,code:wy,img:Ay,pre:({children:e})=>T.isValidElement(e)?T.cloneElement(e,{"data-block":"true"}):e,sup:xy,sub:_y,p:Sy,section:ky},AB=/^[ \t]{0,3}(`{3,}|~{3,})/,SB=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,Vp=e=>{let t=e.split(`
|
|
206
|
-
`),n=null,r=0;for(let i of t){let o=AB.exec(i);if(n===null){if(o){let s=o[1];n=s[0],r=s.length}}else if(o){let s=o[1],a=s[0],l=s.length;a===n&&l>=r&&(n=null,r=0)}}return n!==null},CB=e=>{let t=e.split(`
|
|
207
|
-
`);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&SB.test(r))return!0}return!1},vB=()=>e=>{Fr(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},Wp=[],Yp={allowDangerousHtml:!0},na=new WeakMap,IB=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 n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let d="default";return this.keyCache.set(e,d),d}let o=d=>{if(!d||d.length===0)return"";let c="";for(let h=0;h<d.length;h+=1){let p=d[h];if(h>0&&(c+=","),Array.isArray(p)){let[m,b]=p;if(typeof m=="function"){let y=na.get(m);y||(y=m.name,na.set(m,y)),c+=y}else c+=String(m);c+=":",c+=JSON.stringify(b)}else if(typeof p=="function"){let m=na.get(p);m||(m=p.name,na.set(p,m)),c+=m}else c+=String(p)}return c},s=o(n),a=o(r),l=i?JSON.stringify(i):"",u=`${a}::${s}::${l}`;return this.keyCache.set(e,u),u}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},Zp=new IB,Cy=e=>{let t=NB(e),n=e.children||"";return BB(t.runSync(t.parse(n),n),e)},NB=e=>{let t=Zp.get(e);if(t)return t;let n=RB(e);return Zp.set(e,n),n},OB=e=>e.some(t=>Array.isArray(t)?t[0]===Gu:t===Gu),RB=e=>{let t=e.rehypePlugins||Wp,n=e.remarkPlugins||Wp,r=OB(t)?n:[...n,vB],i=e.remarkRehypeOptions?{...Yp,...e.remarkRehypeOptions}:Yp;return H8().use(FM).use(r).use(T8,i).use(t)},LB=e=>e,DB=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},PB=(e,t)=>{var n;for(let r in tu)if(Object.hasOwn(tu,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],o=tu[r];(o===null||o.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},MB=(e,t,n,r,i,o)=>{let s=!1;return r?s=!r.includes(e.tagName):i&&(s=i.includes(e.tagName)),!s&&o&&typeof t=="number"&&(s=!o(e,t,n)),s},BB=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:o,unwrapDisallowed:s,urlTransform:a}=t;if(n||r||i||o||a){let l=a||LB;Fr(e,(u,d,c)=>{if(u.type==="raw"&&c&&typeof d=="number")return DB(c,d,o,u.value),d;if(u.type==="element"&&(PB(u,l),MB(u,d,c,r,i,n)&&c&&typeof d=="number"))return s&&u.children?c.children.splice(d,1,...u.children):c.children.splice(d,1),d})}return Y5(e,{Fragment:g.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0})},FB=/\[\^[\w-]{1,200}\](?!:)/,HB=/\[\^[\w-]{1,200}\]:/,zB=/<(\w+)[\s>]/,UB=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Gp=new Map,qp=new Map,$B=e=>{let t=e.toLowerCase(),n=Gp.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return Gp.set(t,r),r},jB=e=>{let t=e.toLowerCase(),n=qp.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return qp.set(t,r),r},Kp=(e,t)=>{if(UB.has(t.toLowerCase()))return 0;let n=e.match($B(t));if(!n)return 0;let r=0;for(let i of n)i.trimEnd().endsWith("/>")||(r+=1);return r},Xp=(e,t)=>{let n=e.match(jB(t));return n?n.length:0},VB=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},WB=e=>{let t=FB.test(e),n=HB.test(e);if(t||n)return[e];let r=In.lex(e,{gfm:!0}),i=[],o=[],s=!1;for(let a of r){let l=a.raw,u=i.length;if(o.length>0){i[u-1]+=l;let d=o.at(-1),c=Kp(l,d),h=Xp(l,d);for(let p=0;p<c;p+=1)o.push(d);for(let p=0;p<h;p+=1)o.length>0&&o.at(-1)===d&&o.pop();continue}if(a.type==="html"&&a.block){let d=l.match(zB);if(d){let c=d[1],h=Kp(l,c),p=Xp(l,c);h>p&&o.push(c)}}if(u>0&&!s){let d=i[u-1];if(VB(d)%2===1){i[u-1]=d+l;continue}}i.push(l),a.type!=="space"&&(s=a.type==="code")}return i},YB=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(o,s,a,l)=>{let u=a.replace(/\n\n/g,`
|
|
208
|
-
<!---->
|
|
209
|
-
`);return s+u+l})}return n},ZB=/^[ \t]*<[\w!/?-]/,GB=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,qB=e=>typeof e!="string"||e.length===0||!ZB.test(e)?e:e.replace(GB,"$1"),Qp,Jp,Ta={...$o,protocols:{...$o.protocols,href:[...(Jp=(Qp=$o.protocols)==null?void 0:Qp.href)!=null?Jp:[],"tel"]}},uc={raw:Gu,sanitize:[Mb,Ta],harden:[Z3,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},KB={gfm:[kP,{}]},em=Object.values(uc),XB=Object.values(KB),QB={block:" ▋",circle:" ●"},JB={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Pn=T.createContext(JB),vy=T.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,...o})=>{let s=typeof e=="string"&&n?qB(e):e;return g.jsx(KE.Provider,{value:i,children:g.jsx(Cy,{...o,children:s})})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var o,s;return((o=e.components)==null?void 0:o[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});vy.displayName="Block";var eF=["github-light","github-dark"],tF=T.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,normalizeHtmlIndentation:r=!1,components:i,rehypePlugins:o=em,remarkPlugins:s=XB,className:a,shikiTheme:l=eF,mermaid:u,controls:d=!0,isAnimating:c=!1,animated:h,BlockComponent:p=vy,parseMarkdownIntoBlocksFn:m=WB,caret:b,plugins:y,remend:E,linkSafety:x={enabled:!0},allowedTags:_,...P})=>{let R=T.useId(),[C,S]=T.useTransition(),O=T.useMemo(()=>_?Object.keys(_):[],[_]),$=T.useMemo(()=>{if(typeof e!="string")return"";let ne=t==="streaming"&&n?N5(e,E):e;return O.length>0&&(ne=YB(ne,O)),ne},[e,t,n,E,O]),N=T.useMemo(()=>m($),[$,m]),[W,U]=T.useState(N);T.useEffect(()=>{t==="streaming"?S(()=>{U(N)}):U(N)},[N,t]);let w=t==="streaming"?W:N,D=T.useMemo(()=>w.map((ne,v)=>`${R}-${v}`),[w.length,R]),M=T.useMemo(()=>h?h===!0?oc():oc(h):null,[h]),H=T.useMemo(()=>{var ne,v;return{shikiTheme:(v=(ne=y==null?void 0:y.code)==null?void 0:ne.getThemes())!=null?v:l,controls:d,isAnimating:c,mode:t,mermaid:u,linkSafety:x}},[l,d,c,t,u,x,y==null?void 0:y.code]),z=T.useMemo(()=>({...wB,...i}),[i]),G=T.useMemo(()=>{let ne=[];return y!=null&&y.cjk&&(ne=[...ne,...y.cjk.remarkPluginsBefore]),ne=[...ne,...s],y!=null&&y.cjk&&(ne=[...ne,...y.cjk.remarkPluginsAfter]),y!=null&&y.math&&(ne=[...ne,y.math.remarkPlugin]),ne},[s,y==null?void 0:y.math,y==null?void 0:y.cjk]),Q=T.useMemo(()=>{var ne;let v=o;if(_&&Object.keys(_).length>0&&o===em){let ye={...Ta,tagNames:[...(ne=Ta.tagNames)!=null?ne:[],...Object.keys(_)],attributes:{...Ta.attributes,..._}};v=[uc.raw,[Mb,ye],uc.harden]}return y!=null&&y.math&&(v=[...v,y.math.rehypePlugin]),M&&c&&(v=[...v,M.rehypePlugin]),v},[o,y==null?void 0:y.math,M,c,_]),k=T.useMemo(()=>{if(!c||w.length===0)return!1;let ne=w.at(-1);return Vp(ne)||CB(ne)},[c,w]),se=T.useMemo(()=>b&&c&&!k?{"--streamdown-caret":`"${QB[b]}"`}:void 0,[b,c,k]);return t==="static"?g.jsx(sc.Provider,{value:y??null,children:g.jsx(Pn.Provider,{value:H,children:g.jsx("div",{className:we("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",a),children:g.jsx(Cy,{components:z,rehypePlugins:Q,remarkPlugins:G,...P,children:$})})})}):g.jsx(sc.Provider,{value:y??null,children:g.jsx(Pn.Provider,{value:H,children:g.jsxs("div",{className:we("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",b&&!k?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,a),style:se,children:[w.length===0&&b&&c&&g.jsx("span",{}),w.map((ne,v)=>{let ye=v===w.length-1,be=c&&ye&&Vp(ne);return g.jsx(p,{components:z,content:ne,index:v,isIncomplete:be,rehypePlugins:Q,remarkPlugins:G,shouldNormalizeHtmlIndentation:r,shouldParseIncompleteMarkdown:n,...P},D[v])})]})})})},(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.normalizeHtmlIndentation===t.normalizeHtmlIndentation);tF.displayName="Streamdown";var nF=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:o=!0,initialZoom:s=1,fullscreen:a=!1})=>{let l=T.useRef(null),u=T.useRef(null),[d,c]=T.useState(s),[h,p]=T.useState({x:0,y:0}),[m,b]=T.useState(!1),[y,E]=T.useState({x:0,y:0}),[x,_]=T.useState({x:0,y:0}),P=T.useCallback(U=>{c(w=>Math.max(n,Math.min(r,w+U)))},[n,r]),R=T.useCallback(()=>{P(i)},[P,i]),C=T.useCallback(()=>{P(-i)},[P,i]),S=T.useCallback(()=>{c(s),p({x:0,y:0})},[s]),O=T.useCallback(U=>{U.preventDefault();let w=U.deltaY>0?-i:i;P(w)},[P,i]),$=T.useCallback(U=>{if(U.button!==0||U.isPrimary===!1)return;b(!0),E({x:U.clientX,y:U.clientY}),_(h);let w=U.currentTarget;w instanceof HTMLElement&&w.setPointerCapture(U.pointerId)},[h]),N=T.useCallback(U=>{if(!m)return;U.preventDefault();let w=U.clientX-y.x,D=U.clientY-y.y;p({x:x.x+w,y:x.y+D})},[m,y,x]),W=T.useCallback(U=>{b(!1);let w=U.currentTarget;w instanceof HTMLElement&&w.releasePointerCapture(U.pointerId)},[]);return T.useEffect(()=>{let U=l.current;if(U)return U.addEventListener("wheel",O,{passive:!1}),()=>{U.removeEventListener("wheel",O)}},[O]),T.useEffect(()=>{let U=u.current;if(U&&m)return document.body.style.userSelect="none",U.addEventListener("pointermove",N,{passive:!1}),U.addEventListener("pointerup",W),U.addEventListener("pointercancel",W),()=>{document.body.style.userSelect="",U.removeEventListener("pointermove",N),U.removeEventListener("pointerup",W),U.removeEventListener("pointercancel",W)}},[m,N,W]),g.jsxs("div",{className:we("relative flex flex-col",a?"h-full w-full":"min-h-28 w-full",t),ref:l,style:{cursor:m?"grabbing":"grab"},children:[o?g.jsxs("div",{className:we("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",a?"bottom-4 left-4":"bottom-2 left-2"),children:[g.jsx("button",{className:"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:d>=r,onClick:R,title:"Zoom in",type:"button",children:g.jsx(nB,{size:16})}),g.jsx("button",{className:"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:d<=n,onClick:C,title:"Zoom out",type:"button",children:g.jsx(rB,{size:16})}),g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:S,title:"Reset zoom and pan",type:"button",children:g.jsx(tB,{size:16})})]}):null,g.jsx("div",{className:we("flex-1 origin-center transition-transform duration-150 ease-out",a?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:$,ref:u,role:"application",style:{transform:`translate(${h.x}px, ${h.y}px) scale(${d})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},Iy=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[o,s]=T.useState(null),[a,l]=T.useState(!1),[u,d]=T.useState(""),[c,h]=T.useState(""),[p,m]=T.useState(0),{mermaid:b}=T.useContext(Pn),y=Bd(),E=b==null?void 0:b.errorComponent,{shouldRender:x,containerRef:_}=P9({immediate:r});if(T.useEffect(()=>{if(x){if(!y){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),l(!0);let R=y.getMermaid(n),C=e.split("").reduce(($,N)=>($<<5)-$+N.charCodeAt(0)|0,0),S=`mermaid-${Math.abs(C)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:O}=await R.render(S,e);d(O),h(O)}catch(R){if(!(c||u)){let C=R instanceof Error?R.message:"Failed to render Mermaid chart";s(C)}}finally{l(!1)}})()}},[e,n,p,x,y]),!(x||u||c))return g.jsx("div",{className:we("my-4 min-h-[200px]",t),ref:_});if(a&&!u&&!c)return g.jsx("div",{className:we("my-4 flex justify-center p-4",t),ref:_,children:g.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[g.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),g.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(o&&!u&&!c){let R=()=>m(C=>C+1);return E?g.jsx("div",{ref:_,children:g.jsx(E,{chart:e,error:o,retry:R})}):g.jsxs("div",{className:we("rounded-md bg-red-50 p-4",t),ref:_,children:[g.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",o]}),g.jsxs("details",{className:"mt-2",children:[g.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),g.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]})}let P=u||c;return g.jsx("div",{className:we("size-full",t),"data-streamdown":"mermaid",ref:_,children:g.jsx(nF,{className:we(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:g.jsx("div",{"aria-label":"Mermaid chart",className:we("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:P},role:"img"})})})};const rF=40,iF=8,Di=56,Wa=8,ps=2,Rr=24,Sl=24,gU=8,oF=()=>{if(!("document"in globalThis))return 0;const e=400,t=document.createElement("div");t.style.width=`${e}px`,t.style.height=`${e}px`,t.style.overflow="scroll",document.body.appendChild(t);const n=e-t.scrollWidth;return t.remove(),n},Hd={root:{startTime:0,endTime:1,duration:1,depth:0,children:[]},spanMap:{},resourceMap:{},filter:"",selected:null,baseScale:1,scaleRatio:1,scale:1,width:640,height:480,timelineWidth:640,timelineHeight:480,panelWidth:380,panelHeight:480,scrollbarWidth:0,timelineRef:{current:null},scrollSnapshotRef:{current:void 0},memoCacheRef:{current:new Map},getQuickLinks:()=>[],withPanel:!1,isMobile:!1},tm=e=>(e.timelineWidth-e.scrollbarWidth)/e.root.duration,zd=T.createContext({state:Hd,dispatch:()=>{}});zd.displayName="TraceViewerContext";const kt=(e,t)=>{var n;switch(t.type){case"setRoot":return e.scrollSnapshotRef.current=void 0,e.memoCacheRef.current.clear(),kt({...e,root:t.root,spanMap:t.spanMap,resourceMap:Object.fromEntries(t.resources.map(({name:r,attributes:i})=>[r,i]))},{type:"detectBaseScale"});case"setSize":{const r=t.height-Di-rF-3*iF,i=e.withPanel&&t.width<=768;let o={...e,width:t.width,height:t.height,timelineWidth:t.width-+!!(e.selected&&e.withPanel&&!i)*e.panelWidth,timelineHeight:r,panelHeight:r,isMobile:i};return o.width!==e.width&&(o=kt(o,{type:"detectBaseScale"})),o}case"setPanelWidth":{const r=Math.max(240,Math.min(t.width,e.width-240)),i=e.withPanel&&e.selected&&!e.isMobile?e.width-r:e.width;return kt({...e,timelineWidth:i,panelWidth:r},{type:"detectBaseScale"})}case"setFilter":return{...e,filter:t.filter};case"deselect":return kt({...e,selected:null,timelineWidth:e.width},{type:"detectBaseScale"});case"select":{const r=e.spanMap[t.id];return r?kt({...e,selected:r,timelineWidth:e.width-(e.withPanel&&!e.isMobile?e.panelWidth:0)},{type:"detectBaseScale"}):e}case"escape":return e.selected?kt(e,{type:"deselect"}):kt(e,{type:"resetScale"});case"toggleSelection":{let r=e;return e.selected&&(r=kt(r,{type:"deselect"})),((n=e.selected)==null?void 0:n.span.spanId)===t.id?r:kt(r,{type:"select",id:t.id})}case"detectBaseScale":{const r=(e.timelineWidth-e.scrollbarWidth)/e.root.duration;return kt({...e,baseScale:r,scale:r*e.scaleRatio},{type:"minScale"})}case"setScale":return{...e,scaleRatio:t.scale,scale:e.baseScale*t.scale};case"resetScale":return kt(e,{type:"scaleToRange",t1:e.root.startTime,t2:e.root.endTime});case"scaleToNode":{const r=e.spanMap[t.id];return r?kt(kt(e,{type:"setScale",scale:(e.width-e.scrollbarWidth-(e.withPanel&&!e.isMobile?e.panelWidth:0))/r.duration/e.baseScale}),{type:"setScrollSnapshot",anchorT:r.startTime-e.root.startTime,anchorX:0}):e}case"scaleToRange":{const r=Math.abs(t.t1-t.t2);return kt(kt(e,{type:"setScale",scale:(e.width-e.scrollbarWidth-(e.selected&&e.withPanel?e.panelWidth:0))/r/e.baseScale}),{type:"setScrollSnapshot",anchorT:Math.min(t.t1,t.t2)-e.root.startTime,anchorX:0})}case"adjustScaleRatio":{let{scaleRatio:r}=e;switch(t.direction){case-1:r*=.8;break;case 1:r*=1.25;break;default:r=1;break}const i=e.timelineRef.current;if(!i)return console.warn("timelineRef is null"),e;const{clientWidth:o,scrollLeft:s}=i;return kt(kt({...e,scaleRatio:r,scale:e.baseScale*r},{type:"minScale"}),{type:"setScrollSnapshot",anchorT:(s+o*.5)/e.scale,anchorX:o*.5})}case"trackpadScale":{const r=tm(e)/e.baseScale,i=Math.max(r,e.scaleRatio*(1+.2*Math.sign(t.delta)*Math.sqrt(Math.abs(t.delta))));return kt({...e,scaleRatio:i,scale:e.baseScale*i},{type:"setScrollSnapshot",anchorT:t.anchorT,anchorX:t.anchorX})}case"minScale":{const r=tm(e);return e.scale>=r?e:{...e,scale:r,scaleRatio:r/e.baseScale}}case"setScrollSnapshot":{const r=e.timelineRef.current;if(!r)return e;const{anchorT:i,anchorX:o}=t,s=i*e.scale-o,{scrollTop:a}=r,l=(a-Sl-Wa)/(Rr+ps),u=l+Math.ceil(e.timelineHeight/(Rr+ps));return e.scrollSnapshotRef.current={anchorT:i,anchorX:o,scrollLeft:s,scrollTop:a,startTime:e.root.startTime+s/e.scale,endTime:e.root.startTime+(s+e.timelineWidth)/e.scale,startRow:l,endRow:u,scale:e.scale},e}case"setWithPanel":{if(e.withPanel===t.withPanel)return e;const r=t.withPanel&&e.selected&&!e.isMobile?e.width-e.panelWidth:e.width;return kt({...e,withPanel:t.withPanel,timelineWidth:r},{type:"detectBaseScale"})}case"forceRender":return e.memoCacheRef.current.set("",{}),{...e};case"updateRoot":return e.memoCacheRef.current.set("",{}),kt({...e,root:t.root,spanMap:t.spanMap,resourceMap:Object.fromEntries(t.resources.map(({name:r,attributes:i})=>[r,i]))},{type:"detectBaseScale"})}};function bU({getQuickLinks:e,withPanel:t=!1,children:n,customSpanClassNameFunc:r,customSpanEventClassNameFunc:i,customPanelComponent:o=null}){const s=T.useRef(null),a=T.useRef(void 0),l=T.useRef(e);l.current=e;const u=T.useRef(new Map),d=T.useRef(new Map),[c,h]=T.useReducer(kt,Hd,m=>({...m,scrollbarWidth:oF(),timelineRef:s,scrollSnapshotRef:a,customSpanClassNameFunc:r,customSpanEventClassNameFunc:i,memoCacheRef:u,withPanel:t,getQuickLinks:b=>{var _;const y=b.spanId,E=d.current.get(y);if(E)return E;const x=((_=l.current)==null?void 0:_.call(l,b))||[];return d.current.set(y,x),x}}));T.useEffect(()=>h({type:"setWithPanel",withPanel:t}),[t]);const p=T.useMemo(()=>({state:c,dispatch:h}),[c,h]);return g.jsx(Ny.Provider,{value:o,children:g.jsx(zd.Provider,{value:p,children:n})})}const Cl=()=>T.useContext(zd),Ny=T.createContext(null),sF=()=>T.useContext(Ny),aF="_traceNode_1fmf2_1",lF="_childRow_1fmf2_5",uF="_spanNode_1fmf2_11",cF="_huge_1fmf2_31",dF="_spanName_1fmf2_34",fF="_spanSpacer_1fmf2_40",hF="_spanDuration_1fmf2_44",pF="_small_1fmf2_62",mF="_xHover_1fmf2_62",gF="_spanNodeEvent_1fmf2_118",bF="_eventDiamond_1fmf2_124",EF="_customEventColor_1fmf2_140",yF="_hoverInfo_1fmf2_145",TF="_eventName_1fmf2_149",xF="_eventTimestamp_1fmf2_153",_F="_alignStart_1fmf2_174",kF="_alignEnd_1fmf2_178",wF="_colorVercel_1fmf2_205",AF="_color0_1fmf2_213",SF="_color1_1fmf2_220",CF="_color2_1fmf2_227",vF="_color3_1fmf2_234",IF="_color4_1fmf2_241",NF="_colorHighlight_1fmf2_248",OF="_unlit_1fmf2_256",RF="_mapContainer_1fmf2_262",LF="_spanDetailPanel_1fmf2_329",DF="_spanDetailPanelResizer_1fmf2_338",PF="_spanDetailPanelTop_1fmf2_353",MF="_spanDetailPanelBody_1fmf2_362",BF="_spanDetailPanelTopInfo_1fmf2_375",FF="_spanNameDetailPanel_1fmf2_389",HF="_spanDetailPanelTruncatedHeading_1fmf2_395",zF="_spanDetailPanelName_1fmf2_405",UF="_spanDetailPanelDuration_1fmf2_416",$F="_spanDetailPanelCorner_1fmf2_427",jF="_spanDetailPanelCornerInner_1fmf2_437",VF="_spanDetailPanelCloseVerticalRule_1fmf2_445",WF="_spanDetailPanelClose_1fmf2_445",YF="_spanDetailPanelAttribute_1fmf2_467",ZF="_spanDetailPanelAttributeKey_1fmf2_484",GF="_spanDetailPanelAttributeValue_1fmf2_492",qF="_spanDetailPanelQuickLink_1fmf2_503",KF="_spanDetailPanelQuickLinkLabel_1fmf2_506",XF="_detailGroup_1fmf2_519",QF="_expanded_1fmf2_533",JF="_collapsed_1fmf2_534",e7="_ancestorGroup_1fmf2_535",t7="_detailHeading_1fmf2_539",n7="_buttonLink_1fmf2_562",r7="_note_1fmf2_581",i7="_skeleton_1fmf2_589",o7="_skeletonRounded_1fmf2_595",s7="_detailHeadingIcon_1fmf2_599",a7="_infraSpanDescription_1fmf2_603",l7="_ancestorNode_1fmf2_613",u7="_ancestorText_1fmf2_629",c7="_ancestorName_1fmf2_639",d7="_ancestorDuration_1fmf2_644",f7="_ancestorLineContainer_1fmf2_649",h7="_ancestorLine_1fmf2_649",p7="_zoomButtonGroup_1fmf2_701",m7="_zoomButton_1fmf2_701",g7="_divider_1fmf2_751",b7="_markersContainer_1fmf2_758",E7="_markers_1fmf2_758",y7="_marker_1fmf2_758",T7="_notch_1fmf2_792",x7="_markerLabel_1fmf2_798",_7="_markerClockTime_1fmf2_807",k7="_eventMarkersContainer_1fmf2_816",w7="_eventMarkers_1fmf2_816",A7="_eventMarker_1fmf2_816",S7="_cursorMarkerStickyParent_1fmf2_839",C7="_cursorMarkerLabelContainer_1fmf2_848",v7="_cursorMarkerLabel_1fmf2_848",I7="_cursorMarkerContainer_1fmf2_898",N7="_cursorMarker_1fmf2_839",O7="_cursorSelection_1fmf2_916",R7="_traceViewer_1fmf2_966",L7="_mapCanvas_1fmf2_972",D7="_zoomButtonTraceViewer_1fmf2_988",P7="_timeline_1fmf2_1011",M7="_searchBar_1fmf2_1019",B7="_searchInput_1fmf2_1031",F7="_searchInputLabel_1fmf2_1038",H7="_searchInputPrefix_1fmf2_1063",z7="_mapThumb_1fmf2_1101",U7="_spanDetailPanelTraceViewer_1fmf2_1115",$7="_traceViewerContent_1fmf2_1134",j7="_inert_1fmf2_1144",V7="_hidden_1fmf2_1180",W7="_mobile_1fmf2_1184",Y7="_spanRunning_1fmf2_1194",Z7="_spanPending_1fmf2_1195",G7="_spanCompleted_1fmf2_1203",q7="_spanCancelled_1fmf2_1211",K7="_spanFailed_1fmf2_1219",X7="_spanPendingStriped_1fmf2_1228",Q7="_hasQueuedTime_1fmf2_1242",J7="_spanSleep_1fmf2_1254",eH="_spanHook_1fmf2_1263",tH="_segmentLayer_1fmf2_1275",nH="_segment_1fmf2_1275",rH="_segmentLabel_1fmf2_1291",iH="_segmentTag_1fmf2_1306",oH="_segQueued_1fmf2_1314",sH="_segRunning_1fmf2_1325",aH="_segFailed_1fmf2_1330",lH="_segRetrying_1fmf2_1335",uH="_segSucceeded_1fmf2_1346",cH="_segWaiting_1fmf2_1351",dH="_segSleeping_1fmf2_1362",fH="_segReceived_1fmf2_1367",hH="_boundaryMarker_1fmf2_1372",pH="_boundaryLine_1fmf2_1373",mH="_hasSegments_1fmf2_1395",gH="_eventFailed_1fmf2_1432",bH="_eventRetrying_1fmf2_1441",EH="_eventHook_1fmf2_1450",yH="_eventDefault_1fmf2_1459",le={traceNode:aF,childRow:lF,spanNode:uF,huge:cF,spanName:dF,spanSpacer:fF,spanDuration:hF,small:pF,xHover:mF,spanNodeEvent:gF,eventDiamond:bF,customEventColor:EF,hoverInfo:yF,eventName:TF,eventTimestamp:xF,alignStart:_F,alignEnd:kF,colorVercel:wF,color0:AF,color1:SF,color2:CF,color3:vF,color4:IF,colorHighlight:NF,unlit:OF,mapContainer:RF,spanDetailPanel:LF,spanDetailPanelResizer:DF,spanDetailPanelTop:PF,spanDetailPanelBody:MF,spanDetailPanelTopInfo:BF,spanNameDetailPanel:FF,spanDetailPanelTruncatedHeading:HF,spanDetailPanelName:zF,spanDetailPanelDuration:UF,spanDetailPanelCorner:$F,spanDetailPanelCornerInner:jF,spanDetailPanelCloseVerticalRule:VF,spanDetailPanelClose:WF,spanDetailPanelAttribute:YF,spanDetailPanelAttributeKey:ZF,spanDetailPanelAttributeValue:GF,spanDetailPanelQuickLink:qF,spanDetailPanelQuickLinkLabel:KF,detailGroup:XF,expanded:QF,collapsed:JF,ancestorGroup:e7,detailHeading:t7,buttonLink:n7,note:r7,skeleton:i7,skeletonRounded:o7,detailHeadingIcon:s7,infraSpanDescription:a7,ancestorNode:l7,ancestorText:u7,ancestorName:c7,ancestorDuration:d7,ancestorLineContainer:f7,ancestorLine:h7,zoomButtonGroup:p7,"zoom-buttons-fade-in":"_zoom-buttons-fade-in_1fmf2_1",zoomButton:m7,divider:g7,markersContainer:b7,markers:E7,marker:y7,notch:T7,markerLabel:x7,markerClockTime:_7,eventMarkersContainer:k7,eventMarkers:w7,eventMarker:A7,cursorMarkerStickyParent:S7,cursorMarkerLabelContainer:C7,cursorMarkerLabel:v7,cursorMarkerContainer:I7,cursorMarker:N7,cursorSelection:O7,traceViewer:R7,"span-skeleton":"_span-skeleton_1fmf2_1",mapCanvas:L7,zoomButtonTraceViewer:D7,timeline:P7,searchBar:M7,searchInput:B7,searchInputLabel:F7,searchInputPrefix:H7,mapThumb:z7,spanDetailPanelTraceViewer:U7,traceViewerContent:$7,inert:j7,hidden:V7,mobile:W7,spanRunning:Y7,spanPending:Z7,spanCompleted:G7,spanCancelled:q7,spanFailed:K7,spanPendingStriped:X7,hasQueuedTime:Q7,spanSleep:J7,spanHook:eH,segmentLayer:tH,segment:nH,segmentLabel:rH,segmentTag:iH,segQueued:oH,segRunning:sH,segFailed:aH,segRetrying:lH,segSucceeded:uH,segWaiting:cH,segSleeping:dH,segReceived:fH,boundaryMarker:hH,boundaryLine:pH,hasSegments:mH,eventFailed:gH,eventRetrying:bH,eventHook:EH,eventDefault:yH};function ra([e,t]){return e*1e3+t/1e6}function EU(e){return[Math.floor(e/1e3),e%1e3*1e3]}const yU=e=>_n(e,!0),nm=new Intl.NumberFormat(void 0,{minimumFractionDigits:2,maximumFractionDigits:2});function TU(e){return e>=1e3?`${nm.format(e/1e3)}s`:`${nm.format(e)}ms`}function xU(e){const t=new Date(e),n=String(t.getHours()).padStart(2,"0"),r=String(t.getMinutes()).padStart(2,"0"),i=String(t.getSeconds()).padStart(2,"0");return`${n}:${r}:${i}`}const TH={queued:"segQueued",running:"segRunning",failed:"segFailed",retrying:"segRetrying",succeeded:"segSucceeded",waiting:"segWaiting",sleeping:"segSleeping",received:"segReceived"};function xH(e){return Math.max(0,Math.min(1,e))}function Wn(e,t,n){return n<=0?0:xH((e-t)/n)}function Ls(e){return[...e].sort((t,n)=>t.timestamp-n.timestamp)}function _H(e){const t=e.events?Ls(e.events):[],{startTime:n,duration:r}=e,i=[];if(r<=0)return i;const o=t.filter(l=>["step_started","step_retrying","step_failed","step_completed"].includes(l.event.name)).map(l=>({time:l.timestamp,type:l.event.name}));if(o.length===0)return i.push({startFraction:0,endFraction:1,status:"running"}),i;const s=o[0],a=Wn(s.time,n,r);a>.001&&i.push({startFraction:0,endFraction:a,status:"queued"});for(let l=0;l<o.length;l++){const u=o[l],d=Wn(u.time,n,r),c=o[l+1],h=c?Wn(c.time,n,r):1;if(u.type==="step_started")if(l===o.length-1)i.push({startFraction:d,endFraction:1,status:"succeeded"});else{const m=c.type,b=m==="step_retrying"||m==="step_failed"?"failed":m==="step_completed"?"succeeded":"running";i.push({startFraction:d,endFraction:h,status:b})}else u.type==="step_retrying"?i.push({startFraction:d,endFraction:h,status:"retrying"}):u.type==="step_failed"?d<.999&&i.push({startFraction:d,endFraction:1,status:"failed"}):u.type}return i}function kH(e){const t=e.events?Ls(e.events):[],{startTime:n,duration:r}=e,i=[];if(r<=0)return i;const o=t.find(u=>u.event.name==="hook_received"),s=t.find(u=>u.event.name==="hook_disposed");if(!o&&!s)return i.push({startFraction:0,endFraction:1,status:"waiting"}),i;const a=o?Wn(o.timestamp,n,r):null,l=s?Wn(s.timestamp,n,r):null;if(a!==null&&a>.001?i.push({startFraction:0,endFraction:a,status:"waiting"}):a===null&&l!==null&&i.push({startFraction:0,endFraction:l,status:"waiting"}),a!==null){const u=l??1;i.push({startFraction:a,endFraction:u,status:"received"})}return l!==null&&l<.999&&i.push({startFraction:l,endFraction:1,status:"succeeded"}),i}function wH(e){const t=e.events?Ls(e.events):[],{startTime:n,duration:r}=e,i=[];if(r<=0)return i;const o=t.find(a=>a.event.name==="wait_completed");if(!o)return i.push({startFraction:0,endFraction:1,status:"sleeping"}),i;const s=Wn(o.timestamp,n,r);return s>.001&&i.push({startFraction:0,endFraction:s,status:"sleeping"}),i.push({startFraction:s,endFraction:1,status:"succeeded"}),i}function AH(e){var d;const t=e.events?Ls(e.events):[],{startTime:n,duration:r,activeStartTime:i}=e,o=[];if(r<=0)return o;if(!t.some(c=>c.event.name==="run_created")){const c=(d=e.span.attributes)==null?void 0:d.data,h=c==null?void 0:c.status;return SH(n,r,i,h)}const a=t.find(c=>c.event.name==="run_failed"),l=t.find(c=>c.event.name==="run_completed");let u=0;if(i&&i>n){const c=Wn(i,n,r);c>.001&&(o.push({startFraction:0,endFraction:c,status:"queued"}),u=c)}if(a){const c=Wn(a.timestamp,n,r);c>u+.001&&o.push({startFraction:u,endFraction:c,status:"running"}),o.push({startFraction:c,endFraction:1,status:"failed"})}else if(l){const c=Wn(l.timestamp,n,r);c>u+.001&&o.push({startFraction:u,endFraction:c,status:"running"}),o.push({startFraction:c,endFraction:1,status:"succeeded"})}else o.push({startFraction:u,endFraction:1,status:"running"});return o}function SH(e,t,n,r){const i=[];let o=0;if(n&&n>e){const s=Wn(n,e,t);s>.001&&(i.push({startFraction:0,endFraction:s,status:"queued"}),o=s)}return r==="failed"?i.push({startFraction:o,endFraction:1,status:"failed"}):r==="completed"||r==="cancelled"?i.push({startFraction:o,endFraction:1,status:"succeeded"}):i.push({startFraction:o,endFraction:1,status:"running"}),i}const CH={step_started:"Started",step_retrying:"Retrying",step_failed:"Failed",hook_created:"Created",hook_received:"Received",hook_disposed:"Resolved",wait_created:"Sleep started",wait_completed:"Sleep completed",run_completed:"Completed",run_failed:"Run failed",step_completed:"Completed"};function ia(e,t){const n=e.events?Ls(e.events):[],{startTime:r,duration:i}=e;if(i<=0)return[];const o=[];for(const s of n){if(!t.includes(s.event.name))continue;const a=Wn(s.timestamp,r,i);a<.01||a>.99||o.push({fraction:a,label:CH[s.event.name]??s.event.name,offsetMs:s.timestamp-r})}return o}function Oy(e,t){switch(e){case"step":return{segments:_H(t),boundaries:ia(t,["step_started","step_retrying","step_failed","step_completed"])};case"hook":return{segments:kH(t),boundaries:ia(t,["hook_created","hook_received","hook_disposed"])};case"sleep":return{segments:wH(t),boundaries:ia(t,["wait_created","wait_completed"])};case"run":return{segments:AH(t),boundaries:ia(t,["run_completed","run_failed"])};default:return{segments:[],boundaries:[]}}}function vH(e){return e.isInstrumentationHint?"Get Started":_n(e.duration)}const Ry={queued:"Queued",running:"",failed:"Failed",retrying:"Retry wait",succeeded:"Executed",waiting:"Waiting",sleeping:"Sleeping",received:"Received"};function IH({segments:e,spanDuration:t}){return e.length===0?null:g.jsx("div",{className:le.segmentLayer,children:e.map((n,r)=>{const i=le[TH[n.status]],o=(n.endFraction-n.startFraction)*t,s=Ry[n.status],a={left:`${n.startFraction*100}%`,width:`${(n.endFraction-n.startFraction)*100}%`};return g.jsx("div",{className:`${le.segment} ${String(i)}`,style:a,title:s?`${s} ${_n(o)}`:_n(o)},`seg-${n.status}-${String(r)}`)})})}function NH(e,t){const n=[];for(let r=0;r<e.length;r++){const i=e[r],o=Ry[i.status];if(!o)continue;let s=(i.endFraction-i.startFraction)*t;if(s<1&&(i.status==="succeeded"||i.status==="failed")&&r>0){const a=e[r-1];a.status==="running"&&(s=(a.endFraction-a.startFraction)*t)}s<1||n.push({label:o,duration:_n(s)})}return n}function Ly({node:e,layout:t,durationMs:n,segmentTags:r}){const i=e.isInstrumentationHint?vH(e):_n(n??e.duration);if(t.isSmall&&!t.isHovered)return null;const o=r&&r.length>0&&(t.isHovered||t.width>200);return g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:le.spanName,children:[e.label||e.span.name,o?r.map((s,a)=>g.jsxs("span",{className:le.segmentTag,children:[" · ",s.label," ",s.duration]},a)):null]}),t.isHuge?g.jsx("span",{className:le.spanSpacer}):null,t.isHovered||t.width>128?g.jsx("span",{className:le.spanDuration,children:i}):null]})}function OH({node:e,layout:t}){return g.jsx(Ly,{node:e,layout:t})}function vl({resourceType:e,node:t,layout:n,durationMs:r}){const i=r??t.duration,{segments:o}=Oy(e,t),s=NH(o,i);return g.jsxs(g.Fragment,{children:[g.jsx(IH,{segments:o,spanDuration:i}),g.jsx(Ly,{durationMs:i,node:t,layout:n,segmentTags:s})]})}function RH(e){return g.jsx(vl,{resourceType:"run",...e})}function LH(e){return g.jsx(vl,{resourceType:"step",...e})}function DH(e){return g.jsx(vl,{resourceType:"hook",...e})}function PH(e){return g.jsx(vl,{resourceType:"sleep",...e})}function MH({resourceType:e,...t}){switch(e){case"run":return g.jsx(RH,{...t});case"step":return g.jsx(LH,{...t});case"hook":return g.jsx(DH,{...t});case"sleep":return g.jsx(PH,{...t});default:return g.jsx(OH,{...t})}}const BH=4;function FH(e){var n;const t=(n=e.span.attributes)==null?void 0:n.resource;return t==="run"||t==="step"||t==="hook"||t==="sleep"?t:"default"}function HH(e){return e<64}function zH(e){return e>=500}function UH(e,t){return e.isHovered&&!t&&e.isHighlighted!==!1}function $H(e,t,n,r){if(!r)return!1;let i=t.duration,o=t.endTime;const s=n.current;return s&&(i=s.endTime-s.startTime,o=s.endTime),o-e.startTime<.25*i}function Ds(e,t,n,r){const i=(e.startTime-t.startTime)*n;let o=Sl+(Rr+ps)*e.row;const s=e.duration*n,a=Math.max(s,BH);let l=Rr;const u=zH(s),d=HH(s),c=UH(e,u),h=c||!!e.isSelected;d&&!h&&(l*=.4,o+=(Rr-l)*.5);const p=$H(e,t,r,h);return{width:a,actualWidth:s,height:l,top:o,left:i,isSmall:d,isHuge:u,isHovered:c,isExpanded:h,isNearRightSide:p}}function jH(e,t,n,r){return Ds(e,t,n,r)}function VH(e,t,n,r){return Ds(e,t,n,r)}function WH(e,t,n,r){return Ds(e,t,n,r)}function YH(e,t,n,r){return Ds(e,t,n,r)}function ZH(e,t,n,r,i){switch(e){case"run":return jH(t,n,r,i);case"step":return VH(t,n,r,i);case"hook":return WH(t,n,r,i);case"sleep":return YH(t,n,r,i);default:return Ds(t,n,r,i)}}const Ud=e=>e.isVercel?String(le.colorVercel):String(le[`color${e.resourceIndex%5}`]);function GH(e,t){const n=t.events;if(n!=null&&n.length)switch(e){case"hook":for(let r=n.length;r--;)if(n[r].event.name==="hook_disposed")return n[r].timestamp;return;case"sleep":for(let r=n.length;r--;)if(n[r].event.name==="wait_completed")return n[r].timestamp;return;case"run":for(let r=n.length;r--;){const i=n[r].event.name;if(i==="run_completed"||i==="run_failed"||i==="run_cancelled")return n[r].timestamp}return;case"step":for(let r=n.length;r--;){const i=n[r].event.name;if(i==="step_completed"||i==="step_failed")return n[r].timestamp;if(i==="step_started"||i==="step_retrying")return}return;default:return}}const _U=T.memo(function({root:t,scale:n,spans:r,isLive:i=!1,scrollSnapshotRef:o,cache:s,customSpanClassNameFunc:a,customSpanEventClassNameFunc:l}){return r.map(u=>g.jsx(KH,{cacheKey:s.get(u.span.spanId),customSpanEventClassNameFunc:l,customSpanClassNameFunc:a,node:u,root:t,scale:n,traceIsLive:i,scrollSnapshotRef:o},u.span.spanId))});function qH(e,t,n,r){const i=e.isExpanded;return{"--span-width":`${Math.max(e.actualWidth,1)}px`,minWidth:i?e.width:void 0,width:i?void 0:e.width,height:e.height,maxWidth:i&&!e.isNearRightSide?(n.endTime-t.startTime)*r:void 0,containIntrinsicWidth:i?void 0:e.width,containIntrinsicHeight:e.height,left:e.isNearRightSide?void 0:e.left,right:e.isNearRightSide?(n.endTime-t.endTime)*r:void 0,top:e.top}}const KH=T.memo(function({node:t,root:n,scale:r,traceIsLive:i=!1,scrollSnapshotRef:o,customSpanClassNameFunc:s,customSpanEventClassNameFunc:a}){var H;const l=T.useRef(null);T.useEffect(()=>(t.ref=l,()=>{t.ref=void 0}),[t]);const{span:u}=t,d=FH(t),[c,h]=T.useState(0),p=s?s(t):"",m=d!=="default",b=(H=u.attributes)==null?void 0:H.data,y=GH(d,t),E=y!=null,_=(d==="hook"?!!(b!=null&&b.disposedAt):!!(b!=null&&b.completedAt))||E,P=i&&m&&!_;T.useEffect(()=>{if(!P)return;h(Date.now());const z=setInterval(()=>{h(Date.now())},250);return()=>clearInterval(z)},[P]);const R=ra(u.startTime),C=ra(u.endTime),S=ra(u.duration),O=u.activeStartTime?ra(u.activeStartTime):void 0,$=y!=null?Math.max(0,y-R):P?Math.max(0,(c||Date.now())-R):S,N=t.isInstrumentationHint?"Get Started":_n($),W={...t,startTime:R,endTime:C,duration:S,activeStartTime:O},U=P?{...W,duration:$,endTime:R+$}:W,w=m&&Oy(d,U).segments.length>0,D=ZH(d,U,n,r,o);if(P){const G=$*r,Q=Math.max(G,4);D.actualWidth=G,D.width=Q,D.isSmall=G<64,D.isHuge=G>=500,D.isSmall||(D.height=Rr,D.top=Sl+(Rr+ps)*U.row)}T.useEffect(()=>{if(!P||!l.current)return;let z=0;const G=()=>{const Q=l.current;if(!Q)return;const k=Date.now()-R,se=Math.max(k*r,2);Q.style.width=`${se}px`,Q.style.setProperty("--span-width",`${se}px`),z=requestAnimationFrame(G)};return z=requestAnimationFrame(G),()=>cancelAnimationFrame(z)},[P,R,r]);const M=U;return g.jsxs(g.Fragment,{children:[g.jsx("button",{"aria-label":`${u.name} - ${N}`,className:Zt(le.spanNode,D.isHuge&&le.huge,D.isSmall&&le.small,D.isExpanded&&le.xHover,t.isHighlighted?le.colorHighlight:Ud(t),t.isHighlighted===!1&&le.unlit,p,w&&le.hasSegments),"data-span-id":u.spanId,"data-start-time":U.startTime-n.startTime,"data-right-side":D.isNearRightSide,"data-selected":t.isSelected?"":void 0,ref:l,style:qH(D,U,n,r),type:"button",children:g.jsx(MH,{durationMs:$,resourceType:d,node:M,layout:D})}),U.events&&!D.isSmall?U.events.map(z=>g.jsx(QH,{customSpanEventClassNameFunc:a,event:z,node:U,root:n,scale:r,asBoundary:m},z.key)):null]})}),XH={step_started:"Started",step_retrying:"Retrying",step_failed:"Failed",hook_created:"Created",hook_received:"Received",hook_disposed:"Resolved",wait_created:"Sleep started",wait_completed:"Sleep completed",run_started:"Started",run_completed:"Completed",run_failed:"Run failed",step_completed:"Completed"},QH=T.memo(function({event:t,node:n,root:r,scale:i,customSpanEventClassNameFunc:o,asBoundary:s=!1}){const a=T.useRef(null);T.useEffect(()=>(t.ref=a,()=>{t.ref=void 0}),[t]);const{event:{name:l}}=t,u=_n(t.timestamp-r.startTime),d=s?XH[l]??l:l,c=s&&(l==="step_started"||l==="run_started"||l==="step_retrying"),h=s&&(l==="step_completed"||l==="run_completed");let p=null,m=null;if((c||h)&&n.events){const _=[...n.events].sort((R,C)=>R.timestamp-C.timestamp),P=_.findIndex(R=>R.key===t.key);if(h){let R=null;for(let C=P-1;C>=0;C--)if(_[C].event.name==="step_started"){R=_[C].timestamp;break}R!==null&&(p=_n(t.timestamp-R),m="Executed")}else{const R=_[P+1],C=R?R.timestamp:n.endTime;p=_n(C-t.timestamp),m=l==="step_retrying"?"Waited":"Executed"}}const b=(t.timestamp-r.startTime)*i,y=Sl+(Rr+ps)*n.row,E=n.duration<=0||(t.timestamp-n.startTime)/n.duration<.5,x=o?o(t):"";return g.jsxs("div",{title:p?`${d} ${u}
|
|
210
|
-
${m} ${p}`:`${d} ${u}`,className:Zt(le.spanNodeEvent,x,s&&le.boundaryMarker,n.isHighlighted?le.colorHighlight:Ud(n),n.isHighlighted===!1&&le.unlit),"data-hovered":t.isHovered,ref:a,style:{left:b,top:y},children:[g.jsx("div",{className:Zt(le.hoverInfo,E?le.alignStart:le.alignEnd),children:s?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:le.eventName,children:d}),g.jsx("span",{className:le.eventTimestamp,children:u}),p?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:le.eventName,children:m}),g.jsx("span",{className:le.eventTimestamp,children:p})]}):null]}):g.jsxs(g.Fragment,{children:[g.jsx("span",{className:le.eventName,children:l}),g.jsx("span",{className:le.eventTimestamp,children:u})]})}),s?g.jsx("div",{className:le.boundaryLine}):g.jsx("div",{className:le.eventDiamond})]})}),Dy={"gray-700":"var(--ds-gray-700)","gray-900":"var(--ds-gray-900)"};function JH({size:e=16,color:t="gray-700"}){const n={color:Dy[t]||t};return g.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",style:n,"aria-hidden":!0,children:[g.jsx("title",{children:"Cross"}),g.jsx("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function ez({size:e=16}){return g.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,className:le.detailHeadingIcon,children:[g.jsx("title",{children:"Chevron Down"}),g.jsx("path",{d:"M6 9l6 6 6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function tz({size:e=16,color:t="gray-900"}){const n={color:Dy[t]||t};return g.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",style:n,"aria-hidden":!0,children:[g.jsx("title",{children:"External Small"}),g.jsx("path",{d:"M14 4h6m0 0v6m0-6L10 14",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M20 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function nz(e){const{as:t,className:n,href:r,children:i,...o}=e;return(t||"a")==="span"||!r?g.jsx("span",{className:n,...o,children:i}):g.jsx("a",{className:n,href:r,...o,children:i})}function rz(e){const{className:t,children:n,size:r,...i}=e;return g.jsx("a",{...i,className:Zt(le.buttonLink,t),children:n})}function iz({children:e,className:t}){return g.jsx("div",{className:Zt(le.note,t),children:e})}function rm({width:e,height:t,rounded:n}){return g.jsx("span",{className:Zt(le.skeleton,n&&le.skeletonRounded),style:{width:e,height:t},"aria-hidden":!0})}const im=e=>`${(100*e).toFixed(3)}%`,om=(e,t)=>e<t?-1:e>t?1:0,sm=e=>{const t={};for(const[r,i]of Object.entries(e)){const o=r.indexOf(".");let s="",a="";o!==-1?(s=r.substring(0,o),a=r.substring(o+1)):a=r;let l=t[s];l||(l={prefix:s,attributes:[]},t[s]=l),l.attributes.push({key:r,suffix:a,value:String(i)})}const n=Array.from(Object.values(t)).sort((r,i)=>om(r.prefix,i.prefix));for(const r of n)r.attributes.sort((i,o)=>om(i.suffix,o.suffix));return n},oz=(e,t)=>{const n=[];if(!t)return n;for(let r=t;"parent"in r;r=r.parent)n.unshift(r);return n},sz=()=>{var d;const{state:{root:e,selected:t,resourceMap:n,getQuickLinks:r},dispatch:i}=Cl(),o=T.useMemo(()=>oz(e,t),[e,t]),s=T.useMemo(()=>sm((t==null?void 0:t.span.attributes)??{}),[t]),a=T.useMemo(()=>{const c=t==null?void 0:t.span.resource;if(!c)return[];const h=n[c];return h?sm(h):[]},[n,t]);if(!t)return null;const{span:l}=t,u=Py(t);return g.jsxs(g.Fragment,{children:[t.isVercel?g.jsx(cz,{node:t}):null,t.isInstrumentationHint?g.jsx(pz,{}):null,!t.isInstrumentationHint&&o.length?g.jsx(Nr,{className:le.ancestorGroup,name:"Location",children:o.map(c=>g.jsxs("button",{className:le.ancestorNode,onClick:()=>i({type:"select",id:c.span.spanId}),type:"button",children:[g.jsxs("div",{className:le.ancestorText,children:[g.jsx("span",{className:le.ancestorName,children:c.label||c.span.name}),g.jsx("span",{className:le.ancestorDuration,children:_n(c.duration)})]}),g.jsx("span",{"aria-hidden":!0,className:le.ancestorLineContainer,children:g.jsx("span",{className:Zt(le.ancestorLine,Ud(c)),style:{left:im((c.startTime-e.startTime)/e.duration),width:im(c.duration/e.duration)}})})]},`${t.span.spanId}.${c.span.spanId}`))}):null,u?g.jsx(dz,{getQuickLinks:r,span:t.span}):null,(d=t.events)!=null&&d.length?g.jsx(Nr,{name:"Events",children:t.events.map(c=>g.jsxs(T.Fragment,{children:[g.jsxs("dl",{className:le.spanDetailPanelAttribute,children:[g.jsx("dt",{className:le.spanDetailPanelAttributeKey,children:c.event.name}),g.jsx("dd",{className:le.spanDetailPanelAttributeValue,children:_n(c.timestamp-e.startTime)})]}),Object.entries(c.event.attributes).map(([h,p])=>g.jsx(ko,{name:`${c.event.name}.${h}`,value:p},h))]},c.key))}):null,s.length?g.jsx(Nr,{name:"Attributes",children:s.map(c=>g.jsx(T.Fragment,{children:c.attributes.map(({key:h,value:p})=>g.jsx(ko,{name:h,value:p},h))},c.prefix))}):null,a.length?g.jsx(Nr,{name:"Resource",children:a.map(c=>g.jsx(T.Fragment,{children:c.attributes.map(({key:h,value:p})=>g.jsx(ko,{name:h,value:p},h))},c.prefix))}):null,t.isInstrumentationHint?null:g.jsxs(Nr,{name:"Library",children:[g.jsx(ko,{name:"name",value:l.library.name}),l.library.version?g.jsx(ko,{name:"version",value:l.library.version}):null]})]})};function kU({attached:e=!1}){const{state:{selected:t,isMobile:n},dispatch:r}=Cl(),i=sF();if(!t)return null;const{span:o}=t;return g.jsxs("div",{className:Zt(le.spanDetailPanel,n&&le.mobile),children:[e&&!n?g.jsx(mz,{}):null,g.jsx("div",{className:le.spanDetailPanelTop,children:g.jsxs("div",{className:le.spanDetailPanelTopInfo,children:[g.jsx("span",{className:le.spanDetailPanelName,title:o.name,children:o.name}),g.jsxs("div",{className:le.spanDetailPanelCorner,children:[t.isInstrumentationHint?null:g.jsx("span",{className:le.spanDetailPanelDuration,children:_n(t.duration)}),g.jsx("div",{className:le.spanDetailPanelCloseVerticalRule}),g.jsx("button",{"aria-label":"Close Span Details",className:le.spanDetailPanelClose,onClick:()=>r({type:"deselect"}),type:"button",children:g.jsx(JH,{color:"gray-700",size:20})})]})]})}),g.jsx("div",{className:Zt("flex gap-3",le.spanDetailPanelBody),children:i||g.jsx(sz,{})})]})}const am="vc-trace-span-exp:";function Nr({name:e,className:t="",children:n}){const[r,i]=T.useState(()=>"localStorage"in globalThis?localStorage.getItem(`${am}${e}`)!=="0":!0),o=T.useCallback(()=>{i(s=>{const a=!s;return localStorage.setItem(`${am}${e}`,String(Number(a))),a})},[e]);return g.jsxs("div",{className:Zt(le.detailGroup,r?le.expanded:le.collapsed,t),children:[g.jsxs("button",{className:le.detailHeading,onClick:o,type:"button",children:[g.jsx("span",{children:e}),g.jsx(ez,{})]}),r?n:null]})}const az=new Set(["OPTIONS","HEAD","GET","PUT","POST","DELETE"]),lz={"Resolve Deployment":"How long it took Vercel's routing layer to retrieve details for the deployment.","Resolve Cache":"How long it took Vercel's routing layer to check for a cached function invocation.","Resolve Route":"How long it took Vercel's routing layer to resolve routing rules, including redirects and rewrites.","Invoke Middleware":"How long it took this middleware to start and run user code.","Invoke Function":"How long it took this Vercel Function to start and run user code.",waitUntil:"How long it took to run user code inside of waitUntil.","Start VM":"How long it took to start the Virtual Machine which contains the Vercel Function.","Spawn Node.js":"How long it took the Virtual Machine to start the Node.js runtime.","Spawn Python":"How long it took the Virtual Machine to start the Python runtime.","Init User Code":"How long it took to import the user code and run any globally-scoped code."},lm=new Set(["Start VM","Spawn Node.js","Spawn Python","Init User Code"]),um=e=>{if(!e||!("span"in e))return null;const t=e.span.attributes,n=t["vercel.region"]||t["vercel.function.region"];return n?String(n):null},uz=e=>{const{name:t}=e.span,n=um(e),r=um(e.parent);return e.span.attributes["vercel.middleware.internal"]==="true"?"The Vercel Toolbar created this middleware.":lm.has(t)||t==="Invoke Function"&&e.children.some(i=>lm.has(i.span.name))?"This function encountered a cold start.":n&&r&&n!==r?"This request was routed across regions.":null},Py=e=>{if(!e.isVercel)return!1;const{name:t}=e.span,n=t.indexOf(" ");if(n===-1)return!1;const r=t.substring(0,n);return az.has(r)};function cz({node:e}){const{name:t}=e.span;let n=lz[t];if(!n&&Py(e)&&(n="How long it took for Vercel to process the request and send the response."),!n)return null;const r=uz(e);return g.jsx(Nr,{name:"What is this?",children:g.jsxs("div",{className:le.infraSpanDescription,children:[g.jsx("span",{children:n}),r&&g.jsx(iz,{children:r})]})})}const dz=T.memo(function({getQuickLinks:t,span:n}){const r=t(n);return r.length?g.jsx(Nr,{name:"Links",children:r.map(({key:i,value:o})=>g.jsx(hz,{link:o,name:i},i))}):null});function fz(e){const[t,n]=T.useState({}),r=e.__resolvedValue!==void 0||e.__rejectedValue!==void 0;return T.useEffect(()=>{r||e.then(i=>{e.__resolvedValue=i}).catch(i=>{e.__rejectedValue=i}).finally(()=>n({}))},[e,r]),e.__resolvedValue}function hz({name:e,link:t}){const n=fz(t);return g.jsxs(nz,{as:n?void 0:"span",className:Zt(le.spanDetailPanelAttribute,le.spanDetailPanelQuickLink),href:(n==null?void 0:n.href)||"",children:[g.jsx("span",{className:le.spanDetailPanelAttributeKey,children:e}),g.jsx("span",{className:Zt(le.spanDetailPanelAttributeValue,le.spanDetailPanelQuickLinkLabel),children:n?g.jsxs(g.Fragment,{children:[n.label,n.icon||g.jsx(tz,{color:"gray-900"})]}):g.jsxs(g.Fragment,{children:[g.jsx(rm,{height:18,width:32+e.length*8}),g.jsx(rm,{height:18,rounded:!0,width:18})]})})]})}function pz(){return g.jsx(Nr,{name:"What is this?",children:g.jsxs("div",{className:le.infraSpanDescription,children:[g.jsx("span",{children:"You can visualize your application's spans alongside Vercel's spans in this viewer."}),g.jsx(rz,{href:"https://vercel.com/docs/session-tracing#adding-custom-spans",size:"small",target:"_blank",children:"Get Started"})]})})}function ko({name:e,value:t}){return g.jsxs("dl",{className:le.spanDetailPanelAttribute,children:[g.jsx("dt",{className:le.spanDetailPanelAttributeKey,children:e}),g.jsx("dd",{className:le.spanDetailPanelAttributeValue,title:String(t),children:String(t)})]})}function mz(){const{state:{panelWidth:e},dispatch:t}=Cl(),n=T.useRef({start:{x:0,width:e},x:0,width:e,isHeld:!1});n.current.width=e;const r=T.useCallback(o=>{if(o.pointerType!=="mouse")return;o.preventDefault();const s=n.current;s.start.x=o.clientX,s.x=o.clientX,s.start.width=s.width,s.isHeld=!0},[]),i=T.useCallback(()=>{t({type:"setPanelWidth",width:Hd.panelWidth})},[t]);return T.useEffect(()=>{let o=0;const s=()=>{const u=n.current,d=u.start.width+u.start.x-u.x;t({type:"setPanelWidth",width:d})},a=u=>{n.current.isHeld&&(u.preventDefault(),n.current.x=u.clientX,cancelAnimationFrame(o),o=requestAnimationFrame(s))},l=()=>{n.current.isHeld=!1};return window.addEventListener("pointermove",a),window.addEventListener("pointerup",l),()=>{window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",l)}},[t]),g.jsx("div",{"aria-hidden":!0,className:le.spanDetailPanelResizer,onDoubleClick:i,onPointerDown:r})}function gz(e){const t=T.useRef({});return{setStyle:T.useCallback((r,i)=>{if(t.current[r]=i,!!e.current){if(!i){e.current.style.removeProperty(r);return}e.current.style.setProperty(r,i)}},[e]),styleRef:t,style:{...t.current}}}const bz=()=>"devicePixelRatio"in globalThis&&globalThis.devicePixelRatio||1,Ez=()=>{const[e,t]=T.useState(1);return T.useLayoutEffect(()=>{const n=()=>t(bz()),r=matchMedia(`(resolution: ${e}dppx)`);return r.addEventListener("change",n),n(),()=>{r.removeEventListener("change",n)}},[e]),e},wo=Wa,wU=T.memo(function({timelineRef:t,rows:n,scale:r}){const{state:{root:i,baseScale:o,timelineWidth:s,width:a,scrollbarWidth:l}}=Cl(),u=a+Wa*2,d=Ez(),c=T.useRef(null),h=T.useRef(null),p=a/(a-l)*Math.min(a/s,o/r),m=Math.min(a,(s-l)*p);T.useEffect(()=>{let x=!1,_=0,P;const R=w=>{var D;return!!((D=c.current)!=null&&D.contains(w))};let C=0;const S=()=>{if(!x||!P)return;const w=t.current;if(!w)return;const D=_-m*.5-P.left;w.scrollLeft=D/p},O=w=>{({clientX:_}=w),cancelAnimationFrame(C),C=requestAnimationFrame(S)},$=w=>{var D;R(w.target)&&(x=!0,P=(D=c.current)==null?void 0:D.getBoundingClientRect(),O(w))},N=()=>{x=!1,P=void 0},W=w=>{R(w.target)&&w.cancelable&&w.preventDefault()},U=w=>{x&&w.cancelable&&w.preventDefault()};return window.addEventListener("pointerdown",$),window.addEventListener("pointermove",O),window.addEventListener("pointerup",N),window.addEventListener("blur",N),window.addEventListener("touchstart",W,{passive:!1}),window.addEventListener("touchmove",U,{passive:!1}),()=>{window.removeEventListener("pointerdown",$),window.removeEventListener("pointermove",O),window.removeEventListener("pointerup",N),window.removeEventListener("blur",N),window.removeEventListener("touchstart",W),window.removeEventListener("touchmove",U),cancelAnimationFrame(C)}},[t,p,m]),T.useEffect(()=>{const x=h.current,_=x==null?void 0:x.getContext("2d");if(!x||!_)return;const R=requestAnimationFrame(()=>{_.resetTransform(),_.clearRect(0,0,x.width,x.height),_.scale(d,d);const C=1,S=3,O=(u-wo*2)/i.duration;_.fillStyle="#ccc",_.beginPath();for(const $ of n)for(const N of $){const W=wo-C+(C+S)*N.row;if(W>=Di-S-wo)break;const U=wo+(N.startTime-i.startTime)*O,w=N.duration*O;_.roundRect(U,W,w,S,S)}_.fill()});return()=>cancelAnimationFrame(R)},[d,i,u,n]);const b=T.useRef(null),{style:y,setStyle:E}=gz(b);return T.useLayoutEffect(()=>{const x=t.current;if(!x)return;let _=0;const P=()=>{E("transform",`translateX(${wo+x.scrollLeft*p}px)`)};P();const R=()=>{cancelAnimationFrame(_),_=requestAnimationFrame(P)};return x.addEventListener("scroll",R),()=>{cancelAnimationFrame(_),x.removeEventListener("scroll",R)}},[t,p,E]),g.jsxs("div",{className:le.mapContainer,ref:c,style:{width:m>0?u:"100%",height:Di},children:[g.jsx("canvas",{className:le.mapCanvas,height:Di*d,ref:h,style:{width:u,height:Di},width:u*d}),g.jsx("div",{className:le.mapThumb,ref:b,style:{transform:y.transform,width:m>0?m:`calc(100% - ${Wa*2}px)`,top:2,height:Di-4}})]})});function yz(e){try{const t=JSON.parse(e);return typeof t=="string"?t:JSON.stringify(t,null,2)}catch{return e}}function Tz(e){try{return JSON.parse(e)}catch{return e}}const xz=F.memo(function({chunk:t,index:n}){const r=Tz(t.text);return g.jsxs("div",{className:"text-[11px] rounded-md border p-3",style:{borderColor:"var(--ds-gray-300)",backgroundColor:"var(--ds-gray-100)"},children:[g.jsxs("span",{className:"select-none mr-2",style:{color:"var(--ds-gray-500)"},children:["[",n,"]"]}),typeof r=="string"?g.jsx("span",{className:"whitespace-pre-wrap break-words",style:{color:"var(--ds-gray-1000)"},children:yz(r)}):g.jsx(c3,{data:r,expandLevel:1})]})});function _z(){return g.jsxs("div",{className:"flex flex-col gap-3 animate-in fade-in",children:[g.jsx(mh,{style:{width:120,height:16,borderRadius:4}}),[1,2,3,4].map(e=>g.jsx(mh,{style:{height:56,borderRadius:6}},e))]})}function AU({streamId:e,chunks:t,isLive:n,error:r,isLoading:i,onScrollEnd:o}){const s=T.useRef(null),a=T.useRef(0);return T.useEffect(()=>{var l;t.length>a.current&&t.length>0&&((l=s.current)==null||l.scrollToIndex({index:t.length-1,align:"end"})),a.current=t.length},[t.length]),i&&t.length===0?g.jsx("div",{className:"flex flex-col h-full",children:g.jsx(_z,{})}):g.jsxs("div",{className:"flex flex-col h-full",children:[n&&g.jsxs("div",{className:"flex items-center gap-1.5 mb-2 px-1",children:[g.jsx("span",{className:"inline-block w-2 h-2 rounded-full",style:{backgroundColor:"var(--ds-green-600)"}}),g.jsx("span",{className:"text-xs",style:{color:"var(--ds-green-700)"},children:"Live"})]}),t.length>0&&g.jsxs("div",{className:"flex items-center gap-2 mb-2 px-1",children:[g.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--ds-gray-900)"},children:"Stream Chunks"}),g.jsxs("span",{className:"text-xs tabular-nums",style:{color:"var(--ds-gray-600)"},children:["(",t.length,")"]})]}),g.jsx("div",{className:"flex-1 min-h-0",children:r?g.jsxs("div",{className:"text-[11px] rounded-md border p-3",style:{borderColor:"var(--ds-red-300)",backgroundColor:"var(--ds-red-100)",color:"var(--ds-red-700)"},children:[g.jsx("div",{children:"Error reading stream:"}),g.jsx("div",{children:r})]}):t.length===0?g.jsx("div",{className:"text-[11px] rounded-md border p-3",style:{borderColor:"var(--ds-gray-300)",backgroundColor:"var(--ds-gray-100)",color:"var(--ds-gray-600)"},children:n?"Waiting for stream data...":"Stream is empty"}):g.jsx(xk,{ref:s,totalCount:t.length,overscan:10,endReached:()=>o==null?void 0:o(),itemContent:l=>g.jsx("div",{style:{paddingBottom:8},children:g.jsx(xz,{chunk:t[l],index:l})}),style:{flex:1,minHeight:0}})})]})}const SU=10;function My(...e){return Oc(Zt(e))}const CU=5e3;function vU(e,t,n){return n?`Page ${e} of ${t}+`:`Page ${e} of ${t}`}const IU=h_,NU=p_,kz=T.forwardRef(({className:e,sideOffset:t=4,...n},r)=>g.jsx(c0,{ref:r,sideOffset:t,className:My("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));kz.displayName=c0.displayName;const By=T.createContext(null);function OU({children:e,serverConfig:t}){const n={serverConfig:t};return g.jsx(By.Provider,{value:n,children:e})}function RU(){const e=T.useContext(By);if(!e)throw new Error("useServerConfig must be used within a ServerConfigProvider");return e}function cm(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Fy(...e){return t=>{let n=!1;const r=e.map(i=>{const o=cm(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():cm(e[i],null)}}}}function LU(...e){return T.useCallback(Fy(...e),e)}var Hy=T.forwardRef((e,t)=>{const{children:n,...r}=e,i=T.Children.toArray(n),o=i.find(Az);if(o){const s=o.props.children,a=i.map(l=>l===o?T.Children.count(s)>1?T.Children.only(null):T.isValidElement(s)?s.props.children:null:l);return g.jsx(cc,{...r,ref:t,children:T.isValidElement(s)?T.cloneElement(s,void 0,a):null})}return g.jsx(cc,{...r,ref:t,children:n})});Hy.displayName="Slot";var cc=T.forwardRef((e,t)=>{const{children:n,...r}=e;if(T.isValidElement(n)){const i=Cz(n);return T.cloneElement(n,{...Sz(r,n.props),ref:t?Fy(t,i):i})}return T.Children.count(n)>1?T.Children.only(null):null});cc.displayName="SlotClone";var wz=({children:e})=>g.jsx(g.Fragment,{children:e});function Az(e){return T.isValidElement(e)&&e.type===wz}function Sz(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Cz(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const dm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,fm=Zt,vz=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return fm(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(u=>{const d=n==null?void 0:n[u],c=o==null?void 0:o[u];if(d===null)return null;const h=dm(d)||dm(c);return i[u][h]}),a=n&&Object.entries(n).reduce((u,d)=>{let[c,h]=d;return h===void 0||(u[c]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:c,className:h,...p}=d;return Object.entries(p).every(m=>{let[b,y]=m;return Array.isArray(y)?y.includes({...o,...a}[b]):{...o,...a}[b]===y})?[...u,c,h]:u},[]);return fm(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},Iz=vz("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Nz=T.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},o)=>{const s=r?Hy:"button";return g.jsx(s,{className:My(Iz({variant:t,size:n,className:e})),ref:o,...i})});Nz.displayName="Button";let dc;try{dc=new TextDecoder}catch{}let fe,li,K=0;const Oz=105,Rz=57342,Lz=57343,hm=57337,pm=6,Ni={};let Ao=11281e4,fr=1681e4,Fe={},Tt,Ya,Za=0,ms=0,Lt,Nn,It=[],fc=[],an,Jt,Ro,mm={useRecords:!1,mapsAsObjects:!0},gs=!1,zy=2;try{new Function("")}catch{zy=1/0}class bs{constructor(t){if(t&&((t.keyMap||t._keyMap)&&!t.useRecords&&(t.useRecords=!1,t.mapsAsObjects=!0),t.useRecords===!1&&t.mapsAsObjects===void 0&&(t.mapsAsObjects=!0),t.getStructures&&(t.getShared=t.getStructures),t.getShared&&!t.structures&&((t.structures=[]).uninitialized=!0),t.keyMap)){this.mapKey=new Map;for(let[n,r]of Object.entries(t.keyMap))this.mapKey.set(r,n)}Object.assign(this,t)}decodeKey(t){return this.keyMap&&this.mapKey.get(t)||t}encodeKey(t){return this.keyMap&&this.keyMap.hasOwnProperty(t)?this.keyMap[t]:t}encodeKeys(t){if(!this._keyMap)return t;let n=new Map;for(let[r,i]of Object.entries(t))n.set(this._keyMap.hasOwnProperty(r)?this._keyMap[r]:r,i);return n}decodeKeys(t){if(!this._keyMap||t.constructor.name!="Map")return t;if(!this._mapKey){this._mapKey=new Map;for(let[r,i]of Object.entries(this._keyMap))this._mapKey.set(i,r)}let n={};return t.forEach((r,i)=>n[On(this._mapKey.has(i)?this._mapKey.get(i):i)]=r),n}mapDecode(t,n){let r=this.decode(t);if(this._keyMap)switch(r.constructor.name){case"Array":return r.map(i=>this.decodeKeys(i))}return r}decode(t,n){if(fe)return Vy(()=>(gc(),this?this.decode(t,n):bs.prototype.decode.call(mm,t,n)));li=n>-1?n:t.length,K=0,ms=0,Ya=null,Lt=null,fe=t;try{Jt=t.dataView||(t.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength))}catch(r){throw fe=null,t instanceof Uint8Array?r:new Error("Source must be a Uint8Array or Buffer but was a "+(t&&typeof t=="object"?t.constructor.name:typeof t))}if(this instanceof bs){if(Fe=this,an=this.sharedValues&&(this.pack?new Array(this.maxPrivatePackedValues||16).concat(this.sharedValues):this.sharedValues),this.structures)return Tt=this.structures,oa();(!Tt||Tt.length>0)&&(Tt=[])}else Fe=mm,(!Tt||Tt.length>0)&&(Tt=[]),an=null;return oa()}decodeMultiple(t,n){let r,i=0;try{let o=t.length;gs=!0;let s=this?this.decode(t,o):Vd.decode(t,o);if(n){if(n(s)===!1)return;for(;K<o;)if(i=K,n(oa())===!1)return}else{for(r=[s];K<o;)i=K,r.push(oa());return r}}catch(o){throw o.lastPosition=i,o.values=r,o}finally{gs=!1,gc()}}}function oa(){try{let e=Ue();if(Lt){if(K>=Lt.postBundlePosition){let t=new Error("Unexpected bundle position");throw t.incomplete=!0,t}K=Lt.postBundlePosition,Lt=null}if(K==li)Tt=null,fe=null,Nn&&(Nn=null);else if(K>li){let t=new Error("Unexpected end of CBOR data");throw t.incomplete=!0,t}else if(!gs)throw new Error("Data read, but end of buffer not reached");return e}catch(e){throw gc(),(e instanceof RangeError||e.message.startsWith("Unexpected end of buffer"))&&(e.incomplete=!0),e}}function Ue(){let e=fe[K++],t=e>>5;if(e=e&31,e>23)switch(e){case 24:e=fe[K++];break;case 25:if(t==7)return Bz();e=Jt.getUint16(K),K+=2;break;case 26:if(t==7){let n=Jt.getFloat32(K);if(Fe.useFloat32>2){let r=jd[(fe[K]&127)<<1|fe[K+1]>>7];return K+=4,(r*n+(n>0?.5:-.5)>>0)/r}return K+=4,n}e=Jt.getUint32(K),K+=4;break;case 27:if(t==7){let n=Jt.getFloat64(K);return K+=8,n}if(t>1){if(Jt.getUint32(K)>0)throw new Error("JavaScript does not support arrays, maps, or strings with length over 4294967295");e=Jt.getUint32(K+4)}else Fe.int64AsNumber?(e=Jt.getUint32(K)*4294967296,e+=Jt.getUint32(K+4)):e=Jt.getBigUint64(K);K+=8;break;case 31:switch(t){case 2:case 3:throw new Error("Indefinite length not supported for byte or text strings");case 4:let n=[],r,i=0;for(;(r=Ue())!=Ni;){if(i>=Ao)throw new Error(`Array length exceeds ${Ao}`);n[i++]=r}return t==4?n:t==3?n.join(""):Buffer.concat(n);case 5:let o;if(Fe.mapsAsObjects){let s={},a=0;if(Fe.keyMap)for(;(o=Ue())!=Ni;){if(a++>=fr)throw new Error(`Property count exceeds ${fr}`);s[On(Fe.decodeKey(o))]=Ue()}else for(;(o=Ue())!=Ni;){if(a++>=fr)throw new Error(`Property count exceeds ${fr}`);s[On(o)]=Ue()}return s}else{Ro&&(Fe.mapsAsObjects=!0,Ro=!1);let s=new Map;if(Fe.keyMap){let a=0;for(;(o=Ue())!=Ni;){if(a++>=fr)throw new Error(`Map size exceeds ${fr}`);s.set(Fe.decodeKey(o),Ue())}}else{let a=0;for(;(o=Ue())!=Ni;){if(a++>=fr)throw new Error(`Map size exceeds ${fr}`);s.set(o,Ue())}}return s}case 7:return Ni;default:throw new Error("Invalid major type for indefinite length "+t)}default:throw new Error("Unknown token "+e)}switch(t){case 0:return e;case 1:return~e;case 2:return Mz(e);case 3:if(ms>=K)return Ya.slice(K-Za,(K+=e)-Za);if(ms==0&&li<140&&e<32){let i=e<16?Uy(e):Pz(e);if(i!=null)return i}return Dz(e);case 4:if(e>=Ao)throw new Error(`Array length exceeds ${Ao}`);let n=new Array(e);for(let i=0;i<e;i++)n[i]=Ue();return n;case 5:if(e>=fr)throw new Error(`Map size exceeds ${Ao}`);if(Fe.mapsAsObjects){let i={};if(Fe.keyMap)for(let o=0;o<e;o++)i[On(Fe.decodeKey(Ue()))]=Ue();else for(let o=0;o<e;o++)i[On(Ue())]=Ue();return i}else{Ro&&(Fe.mapsAsObjects=!0,Ro=!1);let i=new Map;if(Fe.keyMap)for(let o=0;o<e;o++)i.set(Fe.decodeKey(Ue()),Ue());else for(let o=0;o<e;o++)i.set(Ue(),Ue());return i}case 6:if(e>=hm){let i=Tt[e&8191];if(i)return i.read||(i.read=hc(i)),i.read();if(e<65536){if(e==Lz){let o=Hi(),s=Ue(),a=Ue();mc(s,a);let l={};if(Fe.keyMap)for(let u=2;u<o;u++){let d=Fe.decodeKey(a[u-2]);l[On(d)]=Ue()}else for(let u=2;u<o;u++){let d=a[u-2];l[On(d)]=Ue()}return l}else if(e==Rz){let o=Hi(),s=Ue();for(let a=2;a<o;a++)mc(s++,Ue());return Ue()}else if(e==hm)return jz();if(Fe.getShared&&($d(),i=Tt[e&8191],i))return i.read||(i.read=hc(i)),i.read()}}let r=It[e];if(r)return r.handlesRead?r(Ue):r(Ue());{let i=Ue();for(let o=0;o<fc.length;o++){let s=fc[o](e,i);if(s!==void 0)return s}return new gi(i,e)}case 7:switch(e){case 20:return!1;case 21:return!0;case 22:return null;case 23:return;case 31:default:let i=(an||ni())[e];if(i!==void 0)return i;throw new Error("Unknown token "+e)}default:if(isNaN(e)){let i=new Error("Unexpected end of CBOR data");throw i.incomplete=!0,i}throw new Error("Unknown CBOR token "+e)}}const gm=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function hc(e){if(!e)throw new Error("Structure is required in record definition");function t(){let n=fe[K++];if(n=n&31,n>23)switch(n){case 24:n=fe[K++];break;case 25:n=Jt.getUint16(K),K+=2;break;case 26:n=Jt.getUint32(K),K+=4;break;default:throw new Error("Expected array header, but got "+fe[K-1])}let r=this.compiledReader;for(;r;){if(r.propertyCount===n)return r(Ue);r=r.next}if(this.slowReads++>=zy){let o=this.length==n?this:this.slice(0,n);return r=Fe.keyMap?new Function("r","return {"+o.map(s=>Fe.decodeKey(s)).map(s=>gm.test(s)?On(s)+":r()":"["+JSON.stringify(s)+"]:r()").join(",")+"}"):new Function("r","return {"+o.map(s=>gm.test(s)?On(s)+":r()":"["+JSON.stringify(s)+"]:r()").join(",")+"}"),this.compiledReader&&(r.next=this.compiledReader),r.propertyCount=n,this.compiledReader=r,r(Ue)}let i={};if(Fe.keyMap)for(let o=0;o<n;o++)i[On(Fe.decodeKey(this[o]))]=Ue();else for(let o=0;o<n;o++)i[On(this[o])]=Ue();return i}return e.slowReads=0,t}function On(e){if(typeof e=="string")return e==="__proto__"?"__proto_":e;if(typeof e=="number"||typeof e=="boolean"||typeof e=="bigint")return e.toString();if(e==null)return e+"";throw new Error("Invalid property name type "+typeof e)}let Dz=pc;function pc(e){let t;if(e<16&&(t=Uy(e)))return t;if(e>64&&dc)return dc.decode(fe.subarray(K,K+=e));const n=K+e,r=[];for(t="";K<n;){const i=fe[K++];if((i&128)===0)r.push(i);else if((i&224)===192){const o=fe[K++]&63;r.push((i&31)<<6|o)}else if((i&240)===224){const o=fe[K++]&63,s=fe[K++]&63;r.push((i&31)<<12|o<<6|s)}else if((i&248)===240){const o=fe[K++]&63,s=fe[K++]&63,a=fe[K++]&63;let l=(i&7)<<18|o<<12|s<<6|a;l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|l&1023),r.push(l)}else r.push(i);r.length>=4096&&(t+=Bt.apply(String,r),r.length=0)}return r.length>0&&(t+=Bt.apply(String,r)),t}let Bt=String.fromCharCode;function Pz(e){let t=K,n=new Array(e);for(let r=0;r<e;r++){const i=fe[K++];if((i&128)>0){K=t;return}n[r]=i}return Bt.apply(String,n)}function Uy(e){if(e<4)if(e<2){if(e===0)return"";{let t=fe[K++];if((t&128)>1){K-=1;return}return Bt(t)}}else{let t=fe[K++],n=fe[K++];if((t&128)>0||(n&128)>0){K-=2;return}if(e<3)return Bt(t,n);let r=fe[K++];if((r&128)>0){K-=3;return}return Bt(t,n,r)}else{let t=fe[K++],n=fe[K++],r=fe[K++],i=fe[K++];if((t&128)>0||(n&128)>0||(r&128)>0||(i&128)>0){K-=4;return}if(e<6){if(e===4)return Bt(t,n,r,i);{let o=fe[K++];if((o&128)>0){K-=5;return}return Bt(t,n,r,i,o)}}else if(e<8){let o=fe[K++],s=fe[K++];if((o&128)>0||(s&128)>0){K-=6;return}if(e<7)return Bt(t,n,r,i,o,s);let a=fe[K++];if((a&128)>0){K-=7;return}return Bt(t,n,r,i,o,s,a)}else{let o=fe[K++],s=fe[K++],a=fe[K++],l=fe[K++];if((o&128)>0||(s&128)>0||(a&128)>0||(l&128)>0){K-=8;return}if(e<10){if(e===8)return Bt(t,n,r,i,o,s,a,l);{let u=fe[K++];if((u&128)>0){K-=9;return}return Bt(t,n,r,i,o,s,a,l,u)}}else if(e<12){let u=fe[K++],d=fe[K++];if((u&128)>0||(d&128)>0){K-=10;return}if(e<11)return Bt(t,n,r,i,o,s,a,l,u,d);let c=fe[K++];if((c&128)>0){K-=11;return}return Bt(t,n,r,i,o,s,a,l,u,d,c)}else{let u=fe[K++],d=fe[K++],c=fe[K++],h=fe[K++];if((u&128)>0||(d&128)>0||(c&128)>0||(h&128)>0){K-=12;return}if(e<14){if(e===12)return Bt(t,n,r,i,o,s,a,l,u,d,c,h);{let p=fe[K++];if((p&128)>0){K-=13;return}return Bt(t,n,r,i,o,s,a,l,u,d,c,h,p)}}else{let p=fe[K++],m=fe[K++];if((p&128)>0||(m&128)>0){K-=14;return}if(e<15)return Bt(t,n,r,i,o,s,a,l,u,d,c,h,p,m);let b=fe[K++];if((b&128)>0){K-=15;return}return Bt(t,n,r,i,o,s,a,l,u,d,c,h,p,m,b)}}}}}function Mz(e){return Fe.copyBuffers?Uint8Array.prototype.slice.call(fe,K,K+=e):fe.subarray(K,K+=e)}let $y=new Float32Array(1),sa=new Uint8Array($y.buffer,0,4);function Bz(){let e=fe[K++],t=fe[K++],n=(e&127)>>2;if(n===31)return t||e&3?NaN:e&128?-1/0:1/0;if(n===0){let r=((e&3)<<8|t)/16777216;return e&128?-r:r}return sa[3]=e&128|(n>>1)+56,sa[2]=(e&7)<<5|t>>3,sa[1]=t<<5,sa[0]=0,$y[0]}new Array(4096);class gi{constructor(t,n){this.value=t,this.tag=n}}It[0]=e=>new Date(e);It[1]=e=>new Date(Math.round(e*1e3));It[2]=e=>{let t=BigInt(0);for(let n=0,r=e.byteLength;n<r;n++)t=BigInt(e[n])+(t<<BigInt(8));return t};It[3]=e=>BigInt(-1)-It[2](e);It[4]=e=>+(e[1]+"e"+e[0]);It[5]=e=>e[1]*Math.exp(e[0]*Math.log(2));const mc=(e,t)=>{e=e-57344;let n=Tt[e];n&&n.isShared&&((Tt.restoreStructures||(Tt.restoreStructures=[]))[e]=n),Tt[e]=t,t.read=hc(t)};It[Oz]=e=>{let t=e.length,n=e[1];mc(e[0],n);let r={};for(let i=2;i<t;i++){let o=n[i-2];r[On(o)]=e[i]}return r};It[14]=e=>Lt?Lt[0].slice(Lt.position0,Lt.position0+=e):new gi(e,14);It[15]=e=>Lt?Lt[1].slice(Lt.position1,Lt.position1+=e):new gi(e,15);let Fz={Error,RegExp};It[27]=e=>(Fz[e[0]]||Error)(e[1],e[2]);const jy=e=>{if(fe[K++]!=132){let n=new Error("Packed values structure must be followed by a 4 element array");throw fe.length<K&&(n.incomplete=!0),n}let t=e();if(!t||!t.length){let n=new Error("Packed values structure must be followed by a 4 element array");throw n.incomplete=!0,n}return an=an?t.concat(an.slice(t.length)):t,an.prefixes=e(),an.suffixes=e(),e()};jy.handlesRead=!0;It[51]=jy;It[pm]=e=>{if(!an)if(Fe.getShared)$d();else return new gi(e,pm);if(typeof e=="number")return an[16+(e>=0?2*e:-2*e-1)];let t=new Error("No support for non-integer packed references yet");throw e===void 0&&(t.incomplete=!0),t};It[28]=e=>{Nn||(Nn=new Map,Nn.id=0);let t=Nn.id++,n=K,r=fe[K],i;r>>5==4?i=[]:i={};let o={target:i};Nn.set(t,o);let s=e();return o.used?(Object.getPrototypeOf(i)!==Object.getPrototypeOf(s)&&(K=n,i=s,Nn.set(t,{target:i}),s=e()),Object.assign(i,s)):(o.target=s,s)};It[28].handlesRead=!0;It[29]=e=>{let t=Nn.get(e);return t.used=!0,t.target};It[258]=e=>new Set(e);(It[259]=e=>(Fe.mapsAsObjects&&(Fe.mapsAsObjects=!1,Ro=!0),e())).handlesRead=!0;function Oi(e,t){return typeof e=="string"?e+t:e instanceof Array?e.concat(t):Object.assign({},e,t)}function ni(){if(!an)if(Fe.getShared)$d();else throw new Error("No packed values available");return an}const Hz=1399353956;fc.push((e,t)=>{if(e>=225&&e<=255)return Oi(ni().prefixes[e-224],t);if(e>=28704&&e<=32767)return Oi(ni().prefixes[e-28672],t);if(e>=1879052288&&e<=2147483647)return Oi(ni().prefixes[e-1879048192],t);if(e>=216&&e<=223)return Oi(t,ni().suffixes[e-216]);if(e>=27647&&e<=28671)return Oi(t,ni().suffixes[e-27639]);if(e>=1811940352&&e<=1879048191)return Oi(t,ni().suffixes[e-1811939328]);if(e==Hz)return{packedValues:an,structures:Tt.slice(0),version:t};if(e==55799)return t});const zz=new Uint8Array(new Uint16Array([1]).buffer)[0]==1,bm=[Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,typeof BigUint64Array>"u"?{name:"BigUint64Array"}:BigUint64Array,Int8Array,Int16Array,Int32Array,typeof BigInt64Array>"u"?{name:"BigInt64Array"}:BigInt64Array,Float32Array,Float64Array],Uz=[64,68,69,70,71,72,77,78,79,85,86];for(let e=0;e<bm.length;e++)$z(bm[e],Uz[e]);function $z(e,t){let n="get"+e.name.slice(0,-5),r;typeof e=="function"?r=e.BYTES_PER_ELEMENT:e=null;for(let i=0;i<2;i++){if(!i&&r==1)continue;let o=r==2?1:r==4?2:r==8?3:0;It[i?t:t-4]=r==1||i==zz?s=>{if(!e)throw new Error("Could not find typed array for code "+t);return!Fe.copyBuffers&&(r===1||r===2&&!(s.byteOffset&1)||r===4&&!(s.byteOffset&3)||r===8&&!(s.byteOffset&7))?new e(s.buffer,s.byteOffset,s.byteLength>>o):new e(Uint8Array.prototype.slice.call(s,0).buffer)}:s=>{if(!e)throw new Error("Could not find typed array for code "+t);let a=new DataView(s.buffer,s.byteOffset,s.byteLength),l=s.length>>o,u=new e(l),d=a[n];for(let c=0;c<l;c++)u[c]=d.call(a,c<<o,i);return u}}}function jz(){let e=Hi(),t=K+Ue();for(let r=2;r<e;r++){let i=Hi();K+=i}let n=K;return K=t,Lt=[pc(Hi()),pc(Hi())],Lt.position0=0,Lt.position1=0,Lt.postBundlePosition=K,K=n,Ue()}function Hi(){let e=fe[K++]&31;if(e>23)switch(e){case 24:e=fe[K++];break;case 25:e=Jt.getUint16(K),K+=2;break;case 26:e=Jt.getUint32(K),K+=4;break}return e}function $d(){if(Fe.getShared){let e=Vy(()=>(fe=null,Fe.getShared()))||{},t=e.structures||[];Fe.sharedVersion=e.version,an=Fe.sharedValues=e.packedValues,Tt===!0?Fe.structures=Tt=t:Tt.splice.apply(Tt,[0,t.length].concat(t))}}function Vy(e){let t=li,n=K,r=Za,i=ms,o=Ya,s=Nn,a=Lt,l=new Uint8Array(fe.slice(0,li)),u=Tt,d=Fe,c=gs,h=e();return li=t,K=n,Za=r,ms=i,Ya=o,Nn=s,Lt=a,fe=l,gs=c,Tt=u,Fe=d,Jt=new DataView(fe.buffer,fe.byteOffset,fe.byteLength),h}function gc(){fe=null,Nn=null,Tt=null}const jd=new Array(147);for(let e=0;e<256;e++)jd[e]=+("1e"+Math.floor(45.15-e*.30103));let Vd=new bs({useRecords:!1});const Em=Vd.decode;Vd.decodeMultiple;let xa;try{xa=new TextEncoder}catch{}let bc,Wy;const Il=typeof globalThis=="object"&&globalThis.Buffer,Ps=typeof Il<"u",du=Ps?Il.allocUnsafeSlow:Uint8Array,ym=Ps?Il:Uint8Array,Tm=256,xm=Ps?4294967296:2144337920;let fu,V,ut,B=0,Sr,Ot=null;const Vz=61440,Wz=/[\u0080-\uFFFF]/,pn=Symbol("record-id");class Yz extends bs{constructor(t){super(t),this.offset=0;let n,r,i,o,s;t=t||{};let a=ym.prototype.utf8Write?function(w,D,M){return V.utf8Write(w,D,M)}:xa&&xa.encodeInto?function(w,D){return xa.encodeInto(w,V.subarray(D)).written}:!1,l=this,u=t.structures||t.saveStructures,d=t.maxSharedStructures;if(d==null&&(d=u?128:0),d>8190)throw new Error("Maximum maxSharedStructure is 8190");let c=t.sequential;c&&(d=0),this.structures||(this.structures=[]),this.saveStructures&&(this.saveShared=this.saveStructures);let h,p,m=t.sharedValues,b;if(m){b=Object.create(null);for(let w=0,D=m.length;w<D;w++)b[m[w]]=w}let y=[],E=0,x=0;this.mapEncode=function(w,D){if(this._keyMap&&!this._mapped)switch(w.constructor.name){case"Array":w=w.map(M=>this.encodeKeys(M));break}return this.encode(w,D)},this.encode=function(w,D){if(V||(V=new du(8192),ut=new DataView(V.buffer,0,8192),B=0),Sr=V.length-10,Sr-B<2048?(V=new du(V.length),ut=new DataView(V.buffer,0,V.length),Sr=V.length-10,B=0):D===wm&&(B=B+7&2147483640),n=B,l.useSelfDescribedHeader&&(ut.setUint32(B,3654940416),B+=3),s=l.structuredClone?new Map:null,l.bundleStrings&&typeof w!="string"?(Ot=[],Ot.size=1/0):Ot=null,r=l.structures,r){if(r.uninitialized){let H=l.getShared()||{};l.structures=r=H.structures||[],l.sharedVersion=H.version;let z=l.sharedValues=H.packedValues;if(z){b={};for(let G=0,Q=z.length;G<Q;G++)b[z[G]]=G}}let M=r.length;if(M>d&&!c&&(M=d),!r.transitions){r.transitions=Object.create(null);for(let H=0;H<M;H++){let z=r[H];if(!z)continue;let G,Q=r.transitions;for(let k=0,se=z.length;k<se;k++){Q[pn]===void 0&&(Q[pn]=H);let ne=z[k];G=Q[ne],G||(G=Q[ne]=Object.create(null)),Q=G}Q[pn]=H|1048576}}c||(r.nextId=M)}if(i&&(i=!1),o=r||[],p=b,t.pack){let M=new Map;if(M.values=[],M.encoder=l,M.maxValues=t.maxPrivatePackedValues||(b?16:1/0),M.objectMap=b||!1,M.samplingPackedValues=h,_a(w,M),M.values.length>0){V[B++]=216,V[B++]=51,er(4);let H=M.values;_(H),er(0),er(0),p=Object.create(b||null);for(let z=0,G=H.length;z<G;z++)p[H[z]]=z}}fu=D&pu;try{if(fu)return;if(_(w),Ot&&km(n,_),l.offset=B,s&&s.idsToInsert){B+=s.idsToInsert.length*2,B>Sr&&R(B),l.offset=B;let M=qz(V.subarray(n,B),s.idsToInsert);return s=null,M}return D&wm?(V.start=n,V.end=B,V):V.subarray(n,B)}finally{if(r){if(x<10&&x++,r.length>d&&(r.length=d),E>1e4)r.transitions=null,x=0,E=0,y.length>0&&(y=[]);else if(y.length>0&&!c){for(let M=0,H=y.length;M<H;M++)y[M][pn]=void 0;y=[]}}if(i&&l.saveShared){l.structures.length>d&&(l.structures=l.structures.slice(0,d));let M=V.subarray(n,B);return l.updateSharedData()===!1?l.encode(w):M}D&Xz&&(B=n)}},this.findCommonStringsToPack=()=>(h=new Map,b||(b=Object.create(null)),w=>{let D=w&&w.threshold||4,M=this.pack?w.maxPrivatePackedValues||16:0;m||(m=this.sharedValues=[]);for(let[H,z]of h)z.count>D&&(b[H]=M++,m.push(H),i=!0);for(;this.saveShared&&this.updateSharedData()===!1;);h=null});const _=w=>{B>Sr&&(V=R(B));var D=typeof w,M;if(D==="string"){if(p){let Q=p[w];if(Q>=0){Q<16?V[B++]=Q+224:(V[B++]=198,Q&1?_(15-Q>>1):_(Q-16>>1));return}else if(h&&!t.pack){let k=h.get(w);k?k.count++:h.set(w,{count:1})}}let H=w.length;if(Ot&&H>=4&&H<1024){if((Ot.size+=H)>Vz){let k,se=(Ot[0]?Ot[0].length*3+Ot[1].length:0)+10;B+se>Sr&&(V=R(B+se)),V[B++]=217,V[B++]=223,V[B++]=249,V[B++]=Ot.position?132:130,V[B++]=26,k=B-n,B+=4,Ot.position&&km(n,_),Ot=["",""],Ot.size=0,Ot.position=k}let Q=Wz.test(w);Ot[Q?0:1]+=w,V[B++]=Q?206:207,_(H);return}let z;H<32?z=1:H<256?z=2:H<65536?z=3:z=5;let G=H*3;if(B+G>Sr&&(V=R(B+G)),H<64||!a){let Q,k,se,ne=B+z;for(Q=0;Q<H;Q++)k=w.charCodeAt(Q),k<128?V[ne++]=k:k<2048?(V[ne++]=k>>6|192,V[ne++]=k&63|128):(k&64512)===55296&&((se=w.charCodeAt(Q+1))&64512)===56320?(k=65536+((k&1023)<<10)+(se&1023),Q++,V[ne++]=k>>18|240,V[ne++]=k>>12&63|128,V[ne++]=k>>6&63|128,V[ne++]=k&63|128):(V[ne++]=k>>12|224,V[ne++]=k>>6&63|128,V[ne++]=k&63|128);M=ne-B-z}else M=a(w,B+z,G);M<24?V[B++]=96|M:M<256?(z<2&&V.copyWithin(B+2,B+1,B+1+M),V[B++]=120,V[B++]=M):M<65536?(z<3&&V.copyWithin(B+3,B+2,B+2+M),V[B++]=121,V[B++]=M>>8,V[B++]=M&255):(z<5&&V.copyWithin(B+5,B+3,B+3+M),V[B++]=122,ut.setUint32(B,M),B+=4),B+=M}else if(D==="number")if(!this.alwaysUseFloat&&w>>>0===w)w<24?V[B++]=w:w<256?(V[B++]=24,V[B++]=w):w<65536?(V[B++]=25,V[B++]=w>>8,V[B++]=w&255):(V[B++]=26,ut.setUint32(B,w),B+=4);else if(!this.alwaysUseFloat&&w>>0===w)w>=-24?V[B++]=31-w:w>=-256?(V[B++]=56,V[B++]=~w):w>=-65536?(V[B++]=57,ut.setUint16(B,~w),B+=2):(V[B++]=58,ut.setUint32(B,~w),B+=4);else{let H;if((H=this.useFloat32)>0&&w<4294967296&&w>=-2147483648){V[B++]=250,ut.setFloat32(B,w);let z;if(H<4||(z=w*jd[(V[B]&127)<<1|V[B+1]>>7])>>0===z){B+=4;return}else B--}V[B++]=251,ut.setFloat64(B,w),B+=8}else if(D==="object")if(!w)V[B++]=246;else{if(s){let z=s.get(w);if(z){if(V[B++]=216,V[B++]=29,V[B++]=25,!z.references){let G=s.idsToInsert||(s.idsToInsert=[]);z.references=[],G.push(z)}z.references.push(B-n),B+=2;return}else s.set(w,{offset:B-n})}let H=w.constructor;if(H===Object)P(w);else if(H===Array){M=w.length,M<24?V[B++]=128|M:er(M);for(let z=0;z<M;z++)_(w[z])}else if(H===Map)if((this.mapsAsObjects?this.useTag259ForMaps!==!1:this.useTag259ForMaps)&&(V[B++]=217,V[B++]=1,V[B++]=3),M=w.size,M<24?V[B++]=160|M:M<256?(V[B++]=184,V[B++]=M):M<65536?(V[B++]=185,V[B++]=M>>8,V[B++]=M&255):(V[B++]=186,ut.setUint32(B,M),B+=4),l.keyMap)for(let[z,G]of w)_(l.encodeKey(z)),_(G);else for(let[z,G]of w)_(z),_(G);else{for(let z=0,G=bc.length;z<G;z++){let Q=Wy[z];if(w instanceof Q){let k=bc[z],se=k.tag;se==null&&(se=k.getTag&&k.getTag.call(this,w)),se<24?V[B++]=192|se:se<256?(V[B++]=216,V[B++]=se):se<65536?(V[B++]=217,V[B++]=se>>8,V[B++]=se&255):se>-1&&(V[B++]=218,ut.setUint32(B,se),B+=4),k.encode.call(this,w,_,R);return}}if(w[Symbol.iterator]){if(fu){let z=new Error("Iterable should be serialized as iterator");throw z.iteratorNotHandled=!0,z}V[B++]=159;for(let z of w)_(z);V[B++]=255;return}if(w[Symbol.asyncIterator]||hu(w)){let z=new Error("Iterable/blob should be serialized as iterator");throw z.iteratorNotHandled=!0,z}if(this.useToJSON&&w.toJSON){const z=w.toJSON();if(z!==w)return _(z)}P(w)}}else if(D==="boolean")V[B++]=w?245:244;else if(D==="bigint"){if(w<BigInt(1)<<BigInt(64)&&w>=0)V[B++]=27,ut.setBigUint64(B,w);else if(w>-(BigInt(1)<<BigInt(64))&&w<0)V[B++]=59,ut.setBigUint64(B,-w-BigInt(1));else if(this.largeBigIntToFloat)V[B++]=251,ut.setFloat64(B,Number(w));else{w>=BigInt(0)?V[B++]=194:(V[B++]=195,w=BigInt(-1)-w);let H=[];for(;w;)H.push(Number(w&BigInt(255))),w>>=BigInt(8);Ec(new Uint8Array(H.reverse()),R);return}B+=8}else if(D==="undefined")V[B++]=247;else throw new Error("Unknown type: "+D)},P=this.useRecords===!1?this.variableMapSize?w=>{let D=Object.keys(w),M=Object.values(w),H=D.length;if(H<24?V[B++]=160|H:H<256?(V[B++]=184,V[B++]=H):H<65536?(V[B++]=185,V[B++]=H>>8,V[B++]=H&255):(V[B++]=186,ut.setUint32(B,H),B+=4),l.keyMap)for(let z=0;z<H;z++)_(l.encodeKey(D[z])),_(M[z]);else for(let z=0;z<H;z++)_(D[z]),_(M[z])}:w=>{V[B++]=185;let D=B-n;B+=2;let M=0;if(l.keyMap)for(let H in w)(typeof w.hasOwnProperty!="function"||w.hasOwnProperty(H))&&(_(l.encodeKey(H)),_(w[H]),M++);else for(let H in w)(typeof w.hasOwnProperty!="function"||w.hasOwnProperty(H))&&(_(H),_(w[H]),M++);V[D+++n]=M>>8,V[D+n]=M&255}:(w,D)=>{let M,H=o.transitions||(o.transitions=Object.create(null)),z=0,G=0,Q,k;if(this.keyMap){k=Object.keys(w).map(ne=>this.encodeKey(ne)),G=k.length;for(let ne=0;ne<G;ne++){let v=k[ne];M=H[v],M||(M=H[v]=Object.create(null),z++),H=M}}else for(let ne in w)(typeof w.hasOwnProperty!="function"||w.hasOwnProperty(ne))&&(M=H[ne],M||(H[pn]&1048576&&(Q=H[pn]&65535),M=H[ne]=Object.create(null),z++),H=M,G++);let se=H[pn];if(se!==void 0)se&=65535,V[B++]=217,V[B++]=se>>8|224,V[B++]=se&255;else if(k||(k=H.__keys__||(H.__keys__=Object.keys(w))),Q===void 0?(se=o.nextId++,se||(se=0,o.nextId=1),se>=Tm&&(o.nextId=(se=d)+1)):se=Q,o[se]=k,se<d){V[B++]=217,V[B++]=se>>8|224,V[B++]=se&255,H=o.transitions;for(let ne=0;ne<G;ne++)(H[pn]===void 0||H[pn]&1048576)&&(H[pn]=se),H=H[k[ne]];H[pn]=se|1048576,i=!0}else{if(H[pn]=se,ut.setUint32(B,3655335680),B+=3,z&&(E+=x*z),y.length>=Tm-d&&(y.shift()[pn]=void 0),y.push(H),er(G+2),_(57344+se),_(k),D)return;for(let ne in w)(typeof w.hasOwnProperty!="function"||w.hasOwnProperty(ne))&&_(w[ne]);return}if(G<24?V[B++]=128|G:er(G),!D)for(let ne in w)(typeof w.hasOwnProperty!="function"||w.hasOwnProperty(ne))&&_(w[ne])},R=w=>{let D;if(w>16777216){if(w-n>xm)throw new Error("Encoded buffer would be larger than maximum buffer size");D=Math.min(xm,Math.round(Math.max((w-n)*(w>67108864?1.25:2),4194304)/4096)*4096)}else D=(Math.max(w-n<<2,V.length-1)>>12)+1<<12;let M=new du(D);return ut=new DataView(M.buffer,0,D),V.copy?V.copy(M,0,n,w):M.set(V.slice(n,w)),B-=n,n=0,Sr=M.length-10,V=M};let C=100,S=1e3;this.encodeAsIterable=function(w,D){return W(w,D,O)},this.encodeAsAsyncIterable=function(w,D){return W(w,D,U)};function*O(w,D,M){let H=w.constructor;if(H===Object){let z=l.useRecords!==!1;z?P(w,!0):_m(Object.keys(w).length,160);for(let G in w){let Q=w[G];z||_(G),Q&&typeof Q=="object"?D[G]?yield*O(Q,D[G]):yield*$(Q,D,G):_(Q)}}else if(H===Array){let z=w.length;er(z);for(let G=0;G<z;G++){let Q=w[G];Q&&(typeof Q=="object"||B-n>C)?D.element?yield*O(Q,D.element):yield*$(Q,D,"element"):_(Q)}}else if(w[Symbol.iterator]&&!w.buffer){V[B++]=159;for(let z of w)z&&(typeof z=="object"||B-n>C)?D.element?yield*O(z,D.element):yield*$(z,D,"element"):_(z);V[B++]=255}else hu(w)?(_m(w.size,64),yield V.subarray(n,B),yield w,N()):w[Symbol.asyncIterator]?(V[B++]=159,yield V.subarray(n,B),yield w,N(),V[B++]=255):_(w);M&&B>n?yield V.subarray(n,B):B-n>C&&(yield V.subarray(n,B),N())}function*$(w,D,M){let H=B-n;try{_(w),B-n>C&&(yield V.subarray(n,B),N())}catch(z){if(z.iteratorNotHandled)D[M]={},B=n+H,yield*O.call(this,w,D[M]);else throw z}}function N(){C=S,l.encode(null,pu)}function W(w,D,M){return D&&D.chunkThreshold?C=S=D.chunkThreshold:C=100,w&&typeof w=="object"?(l.encode(null,pu),M(w,l.iterateProperties||(l.iterateProperties={}),!0)):[l.encode(w)]}async function*U(w,D){for(let M of O(w,D,!0)){let H=M.constructor;if(H===ym||H===Uint8Array)yield M;else if(hu(M)){let z=M.stream().getReader(),G;for(;!(G=await z.read()).done;)yield G.value}else if(M[Symbol.asyncIterator])for await(let z of M)N(),z?yield*U(z,D.async||(D.async={})):yield l.encode(z);else yield M}}}useBuffer(t){V=t,ut=new DataView(V.buffer,V.byteOffset,V.byteLength),B=0}clearSharedData(){this.structures&&(this.structures=[]),this.sharedValues&&(this.sharedValues=void 0)}updateSharedData(){let t=this.sharedVersion||0;this.sharedVersion=t+1;let n=this.structures.slice(0),r=new Yy(n,this.sharedValues,this.sharedVersion),i=this.saveShared(r,o=>(o&&o.version||0)==t);return i===!1?(r=this.getShared()||{},this.structures=r.structures||[],this.sharedValues=r.packedValues,this.sharedVersion=r.version,this.structures.nextId=this.structures.length):n.forEach((o,s)=>this.structures[s]=o),i}}function _m(e,t){e<24?V[B++]=t|e:e<256?(V[B++]=t|24,V[B++]=e):e<65536?(V[B++]=t|25,V[B++]=e>>8,V[B++]=e&255):(V[B++]=t|26,ut.setUint32(B,e),B+=4)}class Yy{constructor(t,n,r){this.structures=t,this.packedValues=n,this.version=r}}function er(e){e<24?V[B++]=128|e:e<256?(V[B++]=152,V[B++]=e):e<65536?(V[B++]=153,V[B++]=e>>8,V[B++]=e&255):(V[B++]=154,ut.setUint32(B,e),B+=4)}const Zz=typeof Blob>"u"?function(){}:Blob;function hu(e){if(e instanceof Zz)return!0;let t=e[Symbol.toStringTag];return t==="Blob"||t==="File"}function _a(e,t){switch(typeof e){case"string":if(e.length>3){if(t.objectMap[e]>-1||t.values.length>=t.maxValues)return;let r=t.get(e);if(r)++r.count==2&&t.values.push(e);else if(t.set(e,{count:1}),t.samplingPackedValues){let i=t.samplingPackedValues.get(e);i?i.count++:t.samplingPackedValues.set(e,{count:1})}}break;case"object":if(e)if(e instanceof Array)for(let r=0,i=e.length;r<i;r++)_a(e[r],t);else{let r=!t.encoder.useRecords;for(var n in e)e.hasOwnProperty(n)&&(r&&_a(n,t),_a(e[n],t))}break;case"function":console.log(e)}}const Gz=new Uint8Array(new Uint16Array([1]).buffer)[0]==1;Wy=[Date,Set,Error,RegExp,gi,ArrayBuffer,Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,typeof BigUint64Array>"u"?function(){}:BigUint64Array,Int8Array,Int16Array,Int32Array,typeof BigInt64Array>"u"?function(){}:BigInt64Array,Float32Array,Float64Array,Yy];bc=[{tag:1,encode(e,t){let n=e.getTime()/1e3;(this.useTimestamp32||e.getMilliseconds()===0)&&n>=0&&n<4294967296?(V[B++]=26,ut.setUint32(B,n),B+=4):(V[B++]=251,ut.setFloat64(B,n),B+=8)}},{tag:258,encode(e,t){let n=Array.from(e);t(n)}},{tag:27,encode(e,t){t([e.name,e.message])}},{tag:27,encode(e,t){t(["RegExp",e.source,e.flags])}},{getTag(e){return e.tag},encode(e,t){t(e.value)}},{encode(e,t,n){Ec(e,n)}},{getTag(e){if(e.constructor===Uint8Array&&(this.tagUint8Array||Ps&&this.tagUint8Array!==!1))return 64},encode(e,t,n){Ec(e,n)}},Qn(68,1),Qn(69,2),Qn(70,4),Qn(71,8),Qn(72,1),Qn(77,2),Qn(78,4),Qn(79,8),Qn(85,4),Qn(86,8),{encode(e,t){let n=e.packedValues||[],r=e.structures||[];if(n.values.length>0){V[B++]=216,V[B++]=51,er(4);let i=n.values;t(i),er(0),er(0),packedObjectMap=Object.create(sharedPackedObjectMap||null);for(let o=0,s=i.length;o<s;o++)packedObjectMap[i[o]]=o}if(r){ut.setUint32(B,3655335424),B+=3;let i=r.slice(0);i.unshift(57344),i.push(new gi(e.version,1399353956)),t(i)}else t(new gi(e.version,1399353956))}}];function Qn(e,t){return!Gz&&t>1&&(e-=4),{tag:e,encode:function(r,i){let o=r.byteLength,s=r.byteOffset||0,a=r.buffer||r;i(Ps?Il.from(a,s,o):new Uint8Array(a,s,o))}}}function Ec(e,t){let n=e.byteLength;n<24?V[B++]=64+n:n<256?(V[B++]=88,V[B++]=n):n<65536?(V[B++]=89,V[B++]=n>>8,V[B++]=n&255):(V[B++]=90,ut.setUint32(B,n),B+=4),B+n>=V.length&&t(B+n),V.set(e.buffer?e:new Uint8Array(e),B),B+=n}function qz(e,t){let n,r=t.length*2,i=e.length-r;t.sort((o,s)=>o.offset>s.offset?1:-1);for(let o=0;o<t.length;o++){let s=t[o];s.id=o;for(let a of s.references)e[a++]=o>>8,e[a]=o&255}for(;n=t.pop();){let o=n.offset;e.copyWithin(o+r,o,i),r-=2;let s=o+r;e[s++]=216,e[s++]=28,i=o}return e}function km(e,t){ut.setUint32(Ot.position+e,B-Ot.position-e+1);let n=Ot;Ot=null,t(n[0]),t(n[1])}let Wd=new Yz({useRecords:!1});const Kz=Wd.encode;Wd.encodeAsIterable;Wd.encodeAsAsyncIterable;const wm=512,Xz=1024,pu=2048;async function Xt(e,t){var i;const n=await fetch("/api/rpc",{method:"POST",headers:{"Content-Type":"application/cbor",Accept:"application/cbor"},body:new Uint8Array(Kz({method:e,params:t??{}}))});if(!n.ok){try{const o=await n.arrayBuffer(),s=Em(new Uint8Array(o));if((i=s==null?void 0:s.error)!=null&&i.message)throw new Error(s.error.message)}catch(o){if(o instanceof Error&&o.message!==`RPC call ${e} failed`)throw o}throw new Error(`RPC call ${e} failed: ${n.status} ${n.statusText}`)}const r=await n.arrayBuffer();return Em(new Uint8Array(r))}async function DU(e,t){return Xt("fetchRuns",{worldEnv:e,params:t})}async function PU(e,t,n="all"){return Xt("fetchRun",{worldEnv:e,runId:t,resolveData:n})}async function MU(e,t,n,r="all"){return Xt("fetchStep",{worldEnv:e,runId:t,stepId:n,resolveData:r})}async function BU(e,t,n){return Xt("fetchEvents",{worldEnv:e,runId:t,params:n})}async function FU(e,t,n,r="all"){return Xt("fetchEvent",{worldEnv:e,runId:t,eventId:n,resolveData:r})}async function HU(e,t){return Xt("fetchHooks",{worldEnv:e,params:t})}async function zU(e,t,n="all"){return Xt("fetchHook",{worldEnv:e,hookId:t,resolveData:n})}async function UU(e,t){return Xt("cancelRun",{worldEnv:e,runId:t})}async function $U(e,t,n){return Xt("recreateRun",{worldEnv:e,runId:t,deploymentId:n})}async function jU(e,t){return Xt("reenqueueRun",{worldEnv:e,runId:t})}async function VU(e,t,n){return Xt("wakeUpRun",{worldEnv:e,runId:t,options:n})}async function WU(e,t,n){return Xt("resumeHook",{worldEnv:e,token:t,payload:n})}async function YU(e,t){return Xt("fetchStreams",{worldEnv:e,runId:t})}async function ZU(e){return Xt("fetchWorkflowsManifest",{worldEnv:e})}async function GU(e,t,n){return Xt("runHealthCheck",{worldEnv:e,endpoint:t,options:n})}async function qU(e,t){return Xt("getEncryptionKeyForRun",{worldEnv:e,runId:t})}const Qz=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:Iy},Symbol.toStringTag,{value:"Module"}));export{sU as $,Bx as A,Nz as B,Fx as C,SU as D,LU as E,PU as F,vz as G,n0 as H,nU as I,ZU as J,mU as K,iU as L,mh as M,CI as N,_n as O,Ei as P,Z9 as Q,Pn as R,OU as S,IU as T,c3 as U,Zx as V,w1 as W,lU as X,xk as Y,oU as Z,tF as _,NU as a,c2 as a0,Jg as a1,Zt as a2,Cl as a3,le as a4,yU as a5,xU as a6,gz as a7,Wa as a8,TU as a9,qU as aA,AU as aB,d2 as aC,Fy as aD,Ex as aE,Tx as aF,xx as aG,kx as aH,wx as aI,Sx as aJ,Ax as aK,_x as aL,lx as aM,UU as aN,jU as aO,VU as aP,WU as aQ,$U as aR,Sl as aa,Rr as ab,ps as ac,rF as ad,ra as ae,EU as af,gU as ag,Di as ah,iF as ai,wU as aj,_U as ak,kU as al,bU as am,uU as an,aU as ao,zU as ap,MU as aq,YU as ar,Hy as as,wz as at,Iz as au,sl as av,Tn as aw,AI as ax,CU as ay,FU as az,kz as b,C0 as c,My as d,cU as e,Qx as f,ui as g,dU as h,DU as i,HU as j,vU as k,BU as l,Ga as m,bi as n,Zm as o,Im as p,pr as q,GU as r,gT as s,Ul as t,RU as u,Qy as v,Rm as w,Vx as x,Mx as y,Hx as z};
|