@joy-ride/game 0.0.0-stage → 0.25.1
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/LICENSE.md +21 -0
- package/README.md +167 -2
- package/THIRD_PARTY_NOTICES.md +136 -0
- package/bookmarklet.d.ts +11 -0
- package/bookmarklet.js +25 -0
- package/embed-assets/attractor-B0xCt_Fj.mp3 +0 -0
- package/embed-assets/audi-rs3-top-Zwm7ZQ20.webp +0 -0
- package/embed-assets/bmw-m4-top-GKSf0h28.webp +0 -0
- package/embed-assets/boost-BLJDRtPH.mp3 +0 -0
- package/embed-assets/bullet-ricochet-1-BKWD_WRI.mp3 +0 -0
- package/embed-assets/bullet-ricochet-2-CmbSTqg5.mp3 +0 -0
- package/embed-assets/bullet-ricochet-3-DV3Th6nn.mp3 +0 -0
- package/embed-assets/burning-fire--0zItqR0.mp3 +0 -0
- package/embed-assets/collision-hard-b_eauD-v.mp3 +0 -0
- package/embed-assets/collision-medium-Bhw86k_p.mp3 +0 -0
- package/embed-assets/collision-soft-DIwEkPCV.mp3 +0 -0
- package/embed-assets/collision-soft-fVT-mQmJ.mp3 +0 -0
- package/embed-assets/combustible-explosion-XvpDzpm9.mp3 +0 -0
- package/embed-assets/crush-BZKARh2Y.mp3 +0 -0
- package/embed-assets/electric-bolt-Cg9Fmi6S.mp3 +0 -0
- package/embed-assets/electric-charge-zw1IjLo4.mp3 +0 -0
- package/embed-assets/electric-gt-top-DTcvEjMR.webp +0 -0
- package/embed-assets/flamethrower-B5pUrS5p.mp3 +0 -0
- package/embed-assets/ford-mustang-gt-top-DVzZTm7G.webp +0 -0
- package/embed-assets/ghost-mode-B33_bxYX.mp3 +0 -0
- package/embed-assets/inter-latin-variable-Dx4kXJAl.woff2 +0 -0
- package/embed-assets/jeep-wrangler-top-Dr43LU9c.webp +0 -0
- package/embed-assets/lamborghini-huracan-evo-top-BCJJwrTj.webp +0 -0
- package/embed-assets/logo-backing-DQNUb3C2.svg +1 -0
- package/embed-assets/machine-gun-C4ag4X6T.mp3 +0 -0
- package/embed-assets/porsche-911-997-top-BE6uRNL4.webp +0 -0
- package/embed-assets/rocket-explosion-DKnN7_wY.mp3 +0 -0
- package/embed-assets/rocket-launch-C-Yvbb7P.mp3 +0 -0
- package/embed-assets/roof-rocket-v1-Bs4IEw-s.webp +0 -0
- package/embed-assets/side-gun-v1-BnpvZN1b.webp +0 -0
- package/embed-assets/subaru-wrx-top-dLvMFYDs.webp +0 -0
- package/embed-assets/tire-screech-DEsAg1CH.mp3 +0 -0
- package/embed-chunks/CodeBlock-DMi-BeLY.js +22 -0
- package/embed-chunks/Documentation-CI9JoAsv.js +33 -0
- package/embed-chunks/EmbedPanel-CgEZTMF7.js +1 -0
- package/embed-chunks/JoyRideView-C3AYwIPH.js +1 -0
- package/embed-chunks/X.es-d7B7rOGv.js +1 -0
- package/embed-chunks/configuration~index~embed-CG9auZKS.js +1 -0
- package/embed-chunks/configuration~index~embed~bookmarklet-C8RUCiUX.js +1 -0
- package/embed-chunks/configuration~index~embed~bookmarklet~vehicle-popover~EmbedPanel~Documentation~JoyRideView~~n76yhyet-zf1LIsS8.js +1 -0
- package/embed-chunks/configuration~index~embed~bookmarklet~vehicle-popover~EmbedPanel~JoyRideView~browser-sessio~iaaa3ndj-BBrKrH7m.js +1 -0
- package/embed-chunks/controls~index~embed-B_C92tUz.js +1 -0
- package/embed-chunks/definitions~index~embed-CDMM_m1T.js +1 -0
- package/embed-chunks/definitions~index~embed~bookmarklet-BfjknPZN.js +1 -0
- package/embed-chunks/definitions~index~embed~bookmarklet~vehicle-popover~Documentation~JoyRideView~browser-sessi~fklztn3g-Dt96jol6.js +1 -0
- package/embed-chunks/definitions~index~embed~vehicle-popover~browser-session-core~renderer-RDNEXk_b.js +1 -0
- package/embed-chunks/react-vendor~index~embed-BNCMh3YF.js +9 -0
- package/embed-chunks/rolldown-runtime-XKyaHtl9.js +1 -0
- package/embed-chunks/runtime~JoyRideView~browser-session-core-Ya-yv4PC.js +1 -0
- package/embed-chunks/runtime~browser-session-core-DUfZaJcj.js +1 -0
- package/embed-chunks/runtime~index~embed-B2Zpd22X.js +210 -0
- package/embed-chunks/runtime~index~embed~vehicle-popover~browser-session-core~renderer-OqE9OpvH.js +1 -0
- package/embed-chunks/runtime~vehicle-popover-DI44kx2W.js +1 -0
- package/embed-chunks/runtime~vehicle-popover~browser-session-core-BC-HGK32.js +1 -0
- package/embed-chunks/runtime~vehicle-popover~browser-session-core~renderer-CHG4ymHM.js +4 -0
- package/embed-chunks/runtime~vehicle-popover~renderer-DwVymD49.js +1077 -0
- package/embed-chunks/src-v4km-Xn-.js +2 -0
- package/embed-chunks/vehicle-catalog~index~embed-DcyLaPhV.js +1 -0
- package/embed-chunks/vehicle-popover-CBTIiR6Q.js +1 -0
- package/embed.js +1 -0
- package/index-BqJy85Tu.d.ts +2496 -0
- package/index.d.ts +3 -0
- package/index.js +1 -0
- package/npm-chunks/CodeBlock-35k1cnjA.js +22 -0
- package/npm-chunks/Documentation-D5RIEQza.js +33 -0
- package/npm-chunks/EmbedPanel-COgcEIgT.js +1 -0
- package/npm-chunks/JoyRideView-C2nOVKZu.js +1 -0
- package/npm-chunks/X.es-VqSWeM6N.js +1 -0
- package/npm-chunks/configuration~react-CKBQFWEF.js +1 -0
- package/npm-chunks/configuration~react~browser-session-core-CyXr42pk.js +1 -0
- package/npm-chunks/configuration~react~vehicle-popover~EmbedPanel~Documentation~JoyRideView~browser-session-co~fvauaeow-zf1LIsS8.js +1 -0
- package/npm-chunks/configuration~react~vehicle-popover~EmbedPanel~JoyRideView~browser-session-core-BQ8wO_VE.js +1 -0
- package/npm-chunks/configuration~react~vehicle-popover~EmbedPanel~JoyRideView~browser-session-core~renderer-DJhBwBho.js +1 -0
- package/npm-chunks/configuration~react~vehicle-popover~JoyRideView~browser-session-core~renderer-B70Mpi9X.js +1 -0
- package/npm-chunks/controls~react~vehicle-popover~Documentation~JoyRideView~browser-session-core-CLDwfJ48.js +1 -0
- package/npm-chunks/controls~react~vehicle-popover~JoyRideView~browser-session-core~renderer-Cnf30Q_A.js +1 -0
- package/npm-chunks/definitions~react~browser-session-core-acRq5AYt.js +1 -0
- package/npm-chunks/definitions~react~vehicle-popover~Documentation~JoyRideView~browser-session-core-BZJqthWX.js +1 -0
- package/npm-chunks/definitions~react~vehicle-popover~Documentation~JoyRideView~browser-session-core~renderer-Dt96jol6.js +1 -0
- package/npm-chunks/definitions~react~vehicle-popover~browser-session-core~renderer-RDNEXk_b.js +1 -0
- package/npm-chunks/input-DHpsGB-l.js +1 -0
- package/npm-chunks/rolldown-runtime-XKyaHtl9.js +1 -0
- package/npm-chunks/runtime~JoyRideView~browser-session-core-CuSPCh9O.js +1 -0
- package/npm-chunks/runtime~browser-session-core-BenGnDZN.js +1 -0
- package/npm-chunks/runtime~react-BKEnJfDK.js +1 -0
- package/npm-chunks/runtime~react~JoyRideView~browser-session-core-BRSYGakW.js +1 -0
- package/npm-chunks/runtime~react~browser-session-core-Cr50FE3R.js +1 -0
- package/npm-chunks/runtime~react~vehicle-popover-khBccGFq.js +1 -0
- package/npm-chunks/runtime~react~vehicle-popover~browser-session-core-BzXBN4rK.js +210 -0
- package/npm-chunks/runtime~react~vehicle-popover~browser-session-core~renderer-Be8cIaU4.js +1 -0
- package/npm-chunks/runtime~vehicle-popover-PLJOXbUU.js +1 -0
- package/npm-chunks/runtime~vehicle-popover~browser-session-core-Ddxp7Nuh.js +1 -0
- package/npm-chunks/runtime~vehicle-popover~browser-session-core~renderer-jVG7K050.js +4 -0
- package/npm-chunks/runtime~vehicle-popover~renderer-CYXkRwO4.js +1077 -0
- package/npm-chunks/sync-shadow-theme-Bqi_M9ro.js +1 -0
- package/npm-chunks/theme-C4ZE2-nQ.js +2 -0
- package/npm-chunks/vehicle-catalog~react~browser-session-core-BzB5J-Lm.js +1 -0
- package/npm-chunks/vehicle-catalog~react~vehicle-popover~browser-session-core-B1wVsjdQ.js +1 -0
- package/npm-chunks/vehicle-popover-CbBEYEjM.js +1 -0
- package/package.json +65 -4
- package/playground-DrT_x51v.d.ts +1255 -0
- package/react.d.ts +17 -0
- package/react.js +25 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import{n as e,r as t,t as n}from"./rolldown-runtime-XKyaHtl9.js";import{n as r,t as i}from"./configuration~react~vehicle-popover~EmbedPanel~Documentation~JoyRideView~browser-session-co~fvauaeow-zf1LIsS8.js";import{r as a}from"./controls~react~vehicle-popover~Documentation~JoyRideView~browser-session-core-CLDwfJ48.js";import{a as o,i as s,o as c,t as l}from"./X.es-VqSWeM6N.js";import{L as u,t as d}from"./input-DHpsGB-l.js";import{t as f}from"./CodeBlock-35k1cnjA.js";import{d as p,u as m}from"./vehicle-popover-CbBEYEjM.js";import*as h from"react";import{Children as g,isValidElement as _,memo as v,useLayoutEffect as y,useMemo as b,useRef as x,useState as S}from"react";import{createPortal as C}from"react-dom";import{Fragment as w,jsx as T,jsxs as E}from"react/jsx-runtime";var D=new Map([[`bold`,h.createElement(h.Fragment,null,h.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM40,76H216a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24ZM216,180H40a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Z`}))],[`duotone`,h.createElement(h.Fragment,null,h.createElement(`path`,{d:`M216,64V192H40V64Z`,opacity:`0.2`}),h.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z`}))],[`fill`,h.createElement(h.Fragment,null,h.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM192,184H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Z`}))],[`light`,h.createElement(h.Fragment,null,h.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128ZM40,70H216a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12ZM216,186H40a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12Z`}))],[`regular`,h.createElement(h.Fragment,null,h.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z`}))],[`thin`,h.createElement(h.Fragment,null,h.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128ZM40,68H216a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8ZM216,188H40a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8Z`}))]]),O=new Map([[`bold`,h.createElement(h.Fragment,null,h.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,h.createElement(h.Fragment,null,h.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),h.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,h.createElement(h.Fragment,null,h.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,h.createElement(h.Fragment,null,h.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,h.createElement(h.Fragment,null,h.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,h.createElement(h.Fragment,null,h.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]]),k=h.forwardRef((e,t)=>h.createElement(s,{ref:t,...e,weights:D}));k.displayName=`ListIcon`;var ee=h.forwardRef((e,t)=>h.createElement(s,{ref:t,...e,weights:O}));ee.displayName=`MagnifyingGlassIcon`;function te(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var A=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,j=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ne={};function re(e,t){return((t||ne).jsx?j:A).test(e)}var M=/[ \t\n\f\r]/g;function ie(e){return typeof e==`object`?e.type===`text`&&ae(e.value):ae(e)}function ae(e){return e.replace(M,``)===``}var oe=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};oe.prototype.normal={},oe.prototype.property={},oe.prototype.space=void 0;function se(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new oe(n,r,t)}function ce(e){return e.toLowerCase()}var N=class{constructor(e,t){this.attribute=t,this.property=e}};N.prototype.attribute=``,N.prototype.booleanish=!1,N.prototype.boolean=!1,N.prototype.commaOrSpaceSeparated=!1,N.prototype.commaSeparated=!1,N.prototype.defined=!1,N.prototype.mustUseProperty=!1,N.prototype.number=!1,N.prototype.overloadedBoolean=!1,N.prototype.property=``,N.prototype.spaceSeparated=!1,N.prototype.space=void 0;var le=e({boolean:()=>P,booleanish:()=>F,commaOrSpaceSeparated:()=>R,commaSeparated:()=>fe,number:()=>I,overloadedBoolean:()=>de,spaceSeparated:()=>L}),ue=0,P=z(),F=z(),de=z(),I=z(),L=z(),fe=z(),R=z();function z(){return 2**++ue}var pe=Object.keys(le),me=class extends N{constructor(e,t,n,r){let i=-1;if(super(e,t),he(this,`space`,r),typeof n==`number`)for(;++i<pe.length;){let e=pe[i];he(this,pe[i],(n&le[e])===le[e])}}};me.prototype.defined=!0;function he(e,t,n){n&&(e[t]=n)}function ge(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new me(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ce(r)]=r,n[ce(a.attribute)]=r}return new oe(t,n,e.space)}var _e=ge({properties:{ariaActiveDescendant:null,ariaAtomic:F,ariaAutoComplete:null,ariaBusy:F,ariaChecked:F,ariaColCount:I,ariaColIndex:I,ariaColSpan:I,ariaControls:L,ariaCurrent:null,ariaDescribedBy:L,ariaDetails:null,ariaDisabled:F,ariaDropEffect:L,ariaErrorMessage:null,ariaExpanded:F,ariaFlowTo:L,ariaGrabbed:F,ariaHasPopup:null,ariaHidden:F,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:L,ariaLevel:I,ariaLive:null,ariaModal:F,ariaMultiLine:F,ariaMultiSelectable:F,ariaOrientation:null,ariaOwns:L,ariaPlaceholder:null,ariaPosInSet:I,ariaPressed:F,ariaReadOnly:F,ariaRelevant:null,ariaRequired:F,ariaRoleDescription:L,ariaRowCount:I,ariaRowIndex:I,ariaRowSpan:I,ariaSelected:F,ariaSetSize:I,ariaSort:null,ariaValueMax:I,ariaValueMin:I,ariaValueNow:I,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function ve(e,t){return t in e?e[t]:t}function ye(e,t){return ve(e,t.toLowerCase())}var be=ge({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:fe,acceptCharset:L,accessKey:L,action:null,allow:null,allowFullScreen:P,allowPaymentRequest:P,allowUserMedia:P,alpha:P,alt:null,as:null,async:P,autoCapitalize:null,autoComplete:L,autoFocus:P,autoPlay:P,blocking:L,capture:null,charSet:null,checked:P,cite:null,className:L,closedBy:null,colorSpace:null,cols:I,colSpan:I,command:null,commandFor:null,content:null,contentEditable:F,controls:P,controlsList:L,coords:I|fe,crossOrigin:null,data:null,dateTime:null,decoding:null,default:P,defer:P,dir:null,dirName:null,disabled:P,download:de,draggable:F,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:P,formTarget:null,headers:L,height:I,hidden:de,high:I,href:null,hrefLang:null,htmlFor:L,httpEquiv:L,id:null,imageSizes:null,imageSrcSet:null,inert:P,inputMode:null,integrity:null,is:null,isMap:P,itemId:null,itemProp:L,itemRef:L,itemScope:P,itemType:L,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:P,low:I,manifest:null,max:null,maxLength:I,media:null,method:null,min:null,minLength:I,multiple:P,muted:P,name:null,nonce:null,noModule:P,noValidate:P,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:P,optimum:I,pattern:null,ping:L,placeholder:null,playsInline:P,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:P,referrerPolicy:null,rel:L,required:P,reversed:P,rows:I,rowSpan:I,sandbox:L,scope:null,scoped:P,seamless:P,selected:P,shadowRootClonable:P,shadowRootCustomElementRegistry:P,shadowRootDelegatesFocus:P,shadowRootMode:null,shadowRootSerializable:P,shape:null,size:I,sizes:null,slot:null,span:I,spellCheck:F,src:null,srcDoc:null,srcLang:null,srcSet:null,start:I,step:null,style:null,tabIndex:I,target:null,title:null,translate:null,type:null,typeMustMatch:P,useMap:null,value:F,width:I,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:L,axis:null,background:null,bgColor:null,border:I,borderColor:null,bottomMargin:I,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:P,declare:P,event:null,face:null,frame:null,frameBorder:null,hSpace:I,leftMargin:I,link:null,longDesc:null,lowSrc:null,marginHeight:I,marginWidth:I,noResize:P,noHref:P,noShade:P,noWrap:P,object:null,profile:null,prompt:null,rev:null,rightMargin:I,rules:null,scheme:null,scrolling:F,standby:null,summary:null,text:null,topMargin:I,valueType:null,version:null,vAlign:null,vLink:null,vSpace:I,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:P,disablePictureInPicture:P,disableRemotePlayback:P,exportParts:fe,part:L,prefix:null,property:null,results:I,security:null,unselectable:null},space:`html`,transform:ye}),xe=ge({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`,maskType:`mask-type`,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:R,accentHeight:I,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:I,amplitude:I,arabicForm:null,ascent:I,attributeName:null,attributeType:null,azimuth:I,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:I,by:null,calcMode:null,capHeight:I,className:L,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:I,diffuseConstant:I,direction:null,display:null,dur:null,divisor:I,dominantBaseline:null,download:P,dx:null,dy:null,edgeMode:null,editable:null,elevation:I,enableBackground:null,end:null,event:null,exponent:I,externalResourcesRequired:null,fill:null,fillOpacity:I,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:fe,g2:fe,glyphName:fe,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:I,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:I,horizOriginX:I,horizOriginY:I,id:null,ideographic:I,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:I,k:I,k1:I,k2:I,k3:I,k4:I,kernelMatrix:R,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:I,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:I,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:I,overlineThickness:I,paintOrder:null,panose1:null,path:null,pathLength:I,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:L,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:I,pointsAtY:I,pointsAtZ:I,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:R,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:R,rev:R,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:R,requiredFeatures:R,requiredFonts:R,requiredFormats:R,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:I,specularExponent:I,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:I,strikethroughThickness:I,string:null,stroke:null,strokeDashArray:R,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:I,strokeOpacity:I,strokeWidth:null,style:null,surfaceScale:I,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:R,tabIndex:I,tableValues:null,target:null,targetX:I,targetY:I,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:R,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:I,underlineThickness:I,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:I,values:null,vAlphabetic:I,vMathematical:I,vectorEffect:null,vHanging:I,vIdeographic:I,version:null,vertAdvY:I,vertOriginX:I,vertOriginY:I,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:I,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:ve}),Se=ge({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()}}),Ce=ge({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:ye}),we=ge({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Te={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`},Ee=/[A-Z]/g,De=/-[a-z]/g,Oe=/^data[-\w.:]+$/i;function ke(e,t){let n=ce(t),r=t,i=N;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Oe.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(De,je);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!De.test(e)){let n=e.replace(Ee,Ae);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=me}return new i(r,t)}function Ae(e){return`-`+e.toLowerCase()}function je(e){return e.charAt(1).toUpperCase()}var Me=se([_e,be,Se,Ce,we],`html`),Ne=se([_e,xe,Se,Ce,we],`svg`);function Pe(e){return e.join(` `).trim()}var Fe=/\/\*(?:[^*]|\*(?!\/))*\*\//g,Ie=/\n/g,Le=/^\s*/,Re=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,ze=/^:\s*/,Be=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,Ve=/^[;\s]*/,He=`
|
|
2
|
+
`,Ue=`/`,We=`*`,Ge=``,Ke=`comment`,qe=`declaration`;function Je(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(Ie);t&&(n+=t.length);var i=e.lastIndexOf(He);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(Le)}function u(e){for(var t;t=d();)e.push(t);return e}function d(){var t=a();if(Ue==e.charAt(0)&&We==e.charAt(1)){for(var n=2;Ge!=e.charAt(n)&&(We!=e.charAt(n)||Ue!=e.charAt(n+1));)++n;if(n+=2,Ge===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:Ke,comment:o})}}function f(){var e=a(),t=c(Re);if(t){if(d(),!c(ze))return s(`property missing ':'`);var n=c(Be),r=e({type:qe,property:t[0].replace(Fe,Ge).trim(),value:n?n[0].replace(Fe,Ge).trim():Ge});return c(Ve),r}}function p(){var e=[];u(e);for(var t;t=f();)e.push(t),u(e);return e}return l(),p()}function Ye(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=Je(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n??={},n[r]=a)}),n}var Xe=Qe(`end`),Ze=Qe(`start`);function Qe(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function $e(e){let t=Ze(e),n=Xe(e);if(t&&n)return{start:t,end:n}}function et(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?nt(e.position):`start`in e||`end`in e?nt(e):`line`in e||`column`in e?tt(e):``}function tt(e){return rt(e&&e.line)+`:`+rt(e&&e.column)}function nt(e){return tt(e&&e.start)+`-`+tt(e&&e.end)}function rt(e){return e&&typeof e==`number`?e:1}var B=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=et(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};B.prototype.file=``,B.prototype.name=``,B.prototype.reason=``,B.prototype.message=``,B.prototype.stack=``,B.prototype.column=void 0,B.prototype.line=void 0,B.prototype.ancestors=void 0,B.prototype.cause=void 0,B.prototype.fatal=void 0,B.prototype.place=void 0,B.prototype.ruleId=void 0,B.prototype.source=void 0;var it={}.hasOwnProperty,at=new Map,ot=/[A-Z]/g,st=/-([a-z])/g,ct=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),lt=new Set([`td`,`th`]),ut=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function dt(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=St(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=xt(n,t.jsx,t.jsxs)}let 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`?Ne:Me,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=ft(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ft(e,t,n){if(t.type===`element`)return pt(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return mt(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return gt(e,t,n);if(t.type===`mdxjsEsm`)return ht(e,t);if(t.type===`root`)return _t(e,t,n);if(t.type===`text`)return vt(e,t)}function pt(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Ne,e.schema=i),e.ancestors.push(t);let a=Ot(e,t.tagName,!1),o=Ct(e,t),s=Tt(e,t);return ct.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!ie(e)})),yt(e,o,a,t),bt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function mt(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}kt(e,t.position)}function ht(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);kt(e,t.position)}function gt(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Ne,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Ot(e,t.name,!0),o=wt(e,t),s=Tt(e,t);return yt(e,o,a,t),bt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function _t(e,t,n){let r={};return bt(r,Tt(e,t)),e.create(t,e.Fragment,r,n)}function vt(e,t){return t.value}function yt(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function bt(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function xt(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function St(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Ze(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Ct(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&it.call(t.properties,i)){let a=Et(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&<.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function wt(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else kt(e,t.position)}else{let{name:i}=r,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else kt(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Tt(e,t){let n=[],r=-1,i=e.passKeys?new Map:at;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=ft(e,a,o);s!==void 0&&n.push(s)}return n}function Et(e,t,n){if(n==null||typeof n==`number`&&Number.isNaN(n))return;let r=ke(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?te(n):Pe(n)),r.property===`style`?[`style`,typeof n==`object`?e.stylePropertyNameCase===`dom`?n:At(n):Dt(e,String(n))]:[e.elementAttributeNameCase===`react`&&r.space?Te[r.property]||r.property:r.attribute,n]}function Dt(e,t){let n={};try{Ye(t,function(t,r){if(t&&r){let i=t;i.slice(0,2)!==`--`&&(i=i.toLowerCase(),e.stylePropertyNameCase===`dom`&&(i.slice(0,4)===`-ms-`&&(i=i.slice(1)),i=i.replace(st,Nt))),n[i]=r}})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new B("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=ut+`#cannot-parse-style-attribute`,r}return n}function Ot(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=re(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=re(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return it.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);kt(e)}function kt(e,t){let n=new B("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=ut+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function At(e){let t={},n;for(n in e)it.call(e,n)&&(t[jt(n)]=e[n]);return t}function jt(e){if(e.slice(0,2)===`--`)return e;let t=e.replace(ot,Mt);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Mt(e){return`-`+e.toLowerCase()}function Nt(e,t){return t.toUpperCase()}var Pt={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`]},Ft={};function It(e,t){let n=t||Ft;return Lt(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function Lt(e,t,n){if(zt(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 Rt(e.children,t,n)}return Array.isArray(e)?Rt(e,t,n):``}function Rt(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Lt(e[i],t,n);return r.join(``)}function zt(e){return!!(e&&typeof e==`object`)}var Bt=document.createElement(`i`);function Vt(e){let t=`&`+e+`;`;Bt.innerHTML=t;let n=Bt.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function V(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function H(e,t){return e.length>0?(V(e,e.length,0,t),e):t}var Ht={}.hasOwnProperty;function Ut(e){let t={},n=-1;for(;++n<e.length;)Wt(t,e[n]);return t}function Wt(e,t){let n;for(n in t){let r=(Ht.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Ht.call(r,a)||(r[a]=[]);let e=i[a];Gt(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Gt(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);V(e,0,0,r)}function Kt(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function U(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var W=en(/[A-Za-z]/),G=en(/[\dA-Za-z]/),qt=en(/[#-'*+\--9=?A-Z^-~]/);function Jt(e){return e!==null&&(e<32||e===127)}var Yt=en(/\d/),Xt=en(/[\dA-Fa-f]/),Zt=en(/[!-/:-@[-`{-~]/);function K(e){return e!==null&&e<-2}function q(e){return e!==null&&(e<0||e===32)}function J(e){return e===-2||e===-1||e===32}var Qt=en(/\p{P}|\p{S}/u),$t=en(/\s/);function en(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function tn(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&G(e.charCodeAt(n+1))&&G(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Y(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return J(r)?(e.enter(n),s(r)):t(r)}function s(r){return J(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function nn(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&J(t)?(e.enter(r),c(t)):l(t)}function c(t){return J(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var rn={tokenize:an};function an(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Y(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return K(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var on=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){sn(this,e,t,n,!1)}addBefore(e,t,n){sn(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function sn(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var cn={tokenize:un},ln={tokenize:dn};function un(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new on;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ln,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(ln,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return K(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new on;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function dn(e,t,n){return Y(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function fn(e){if(e===null||q(e)||$t(e))return 1;if(Qt(e))return 2}function pn(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var mn={name:`attention`,resolveAll:hn,tokenize:gn};function hn(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};_n(o,-a),_n(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=H(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=H(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=H(r,pn(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=H(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=H(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),V(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function gn(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=fn(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=fn(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function _n(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var vn={name:`autolink`,tokenize:yn};function yn(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return W(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||G(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||G(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Jt(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):qt(t)?(e.consume(t),l):n(t)}function u(e){return G(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||G(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var bn={partial:!0,tokenize:xn};function xn(e,t,n){return r;function r(t){return J(t)?Y(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||K(e)?t(e):n(e)}}var Sn={continuation:{tokenize:wn},exit:Tn,name:`blockQuote`,tokenize:Cn};function Cn(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return J(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function wn(e,t,n){let r=this;return i;function i(t){return J(t)?Y(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Sn,t,n)(r)}}function Tn(e){e.exit(`blockQuote`)}var En={name:`characterEscape`,tokenize:Dn};function Dn(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Zt(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var On={name:`characterReference`,tokenize:kn};function kn(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=G,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Xt,u):(e.enter(`characterReferenceValue`),a=7,o=Yt,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===G&&!Vt(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var An={partial:!0,tokenize:jn};function jn(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Mn={concrete:!0,name:`codeFenced`,tokenize:Nn};function Nn(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),J(t)?Y(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||K(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(An,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||K(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):J(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Y(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||K(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||K(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&J(t)?Y(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||K(t)?e.check(An,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||K(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),J(t)?Y(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),J(t)?Y(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||K(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var Pn={name:`codeIndented`,tokenize:In},Fn={partial:!0,tokenize:Ln};function In(e,t,n){return r;function r(t){return e.enter(`codeIndented`),nn(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):K(t)?e.attempt(Fn,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||K(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function Ln(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):K(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):nn(e,t,a,`linePrefix`,4,4)(o)}function a(e){return K(e)?i(e):n(e)}}var Rn={name:`codeText`,previous:Bn,resolve:zn,tokenize:Vn};function zn(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 Bn(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Vn(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||K(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Hn=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Un(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Un(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Un(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);Un(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Un(this.left,t.reverse())}}}};function Un(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 Wn(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Hn(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Gn(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return V(e,0,1/0,u.slice(0)),!l}function Gn(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Kn={resolve:Jn,tokenize:Yn},qn={partial:!0,tokenize:Xn};function Jn(e){return Wn(e),e}function Yn(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):K(t)?e.check(qn,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Xn(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Y(e,a,`linePrefix`)}function a(i){if(i===null||K(i))return n(i);let 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(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Zn(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Jt(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||K(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||q(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Jt(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Qn(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):K(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||K(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!J(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function $n(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Y(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||K(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function er(e,t){let n;return r;function r(i){return K(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):J(i)?Y(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var tr={name:`definition`,tokenize:rr},nr={partial:!0,tokenize:ir};function rr(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Qn.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=U(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return q(t)?er(e,l)(t):l(t)}function l(t){return Zn(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(nr,d,d)(t)}function d(t){return J(t)?Y(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||K(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function ir(e,t,n){return r;function r(t){return q(t)?er(e,i)(t):n(t)}function i(t){return $n(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return J(t)?Y(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||K(e)?t(e):n(e)}}var ar={name:`hardBreakEscape`,tokenize:or};function or(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return K(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var sr={name:`headingAtx`,resolve:cr,tokenize:lr};function cr(e,t){let n=e.length-2,r=3;if(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){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};V(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function lr(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||q(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||K(n)?(e.exit(`atxHeading`),t(n)):J(n)?Y(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||q(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var ur=`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`.split(`.`),dr=[`pre`,`script`,`style`,`textarea`],fr={concrete:!0,name:`htmlFlow`,resolveTo:mr,tokenize:hr},pr={partial:!0,tokenize:gr};function mr(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 hr(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:M):W(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):W(a)?(e.consume(a),i=4,r.interrupt?t:M):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:M):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return W(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||q(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&dr.includes(l)?(i=1,r.interrupt?t(s):O(s)):ur.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||G(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return J(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||W(t)?(e.consume(t),b):J(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||G(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):J(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):J(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||K(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||q(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||J(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||K(t)?O(t):J(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),A):t===60&&i===1?(e.consume(t),j):t===62&&i===4?(e.consume(t),ie):t===63&&i===3?(e.consume(t),M):t===93&&i===5?(e.consume(t),re):K(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(pr,ae,k)(t)):t===null||K(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(An,ee,ae)(t)}function ee(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),te}function te(t){return t===null||K(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function A(t){return t===45?(e.consume(t),M):O(t)}function j(t){return t===47?(e.consume(t),o=``,ne):O(t)}function ne(t){if(t===62){let n=o.toLowerCase();return dr.includes(n)?(e.consume(t),ie):O(t)}return W(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ne):O(t)}function re(t){return t===93?(e.consume(t),M):O(t)}function M(t){return t===62?(e.consume(t),ie):t===45&&i===2?(e.consume(t),M):O(t)}function ie(t){return t===null||K(t)?(e.exit(`htmlFlowData`),ae(t)):(e.consume(t),ie)}function ae(n){return e.exit(`htmlFlow`),t(n)}}function gr(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(bn,t,n)}}var _r={name:`htmlText`,tokenize:vr};function vr(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):W(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):W(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):K(t)?(o=d,j(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?A(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):K(t)?(o=h,j(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?A(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?A(t):K(t)?(o=v,j(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):K(t)?(o=y,j(t)):(e.consume(t),y)}function b(e){return e===62?A(e):y(e)}function x(t){return W(t)?(e.consume(t),S):n(t)}function S(t){return t===45||G(t)?(e.consume(t),S):C(t)}function C(t){return K(t)?(o=C,j(t)):J(t)?(e.consume(t),C):A(t)}function w(t){return t===45||G(t)?(e.consume(t),w):t===47||t===62||q(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),A):t===58||t===95||W(t)?(e.consume(t),E):K(t)?(o=T,j(t)):J(t)?(e.consume(t),T):A(t)}function E(t){return t===45||t===46||t===58||t===95||G(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):K(t)?(o=D,j(t)):J(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):K(t)?(o=O,j(t)):J(t)?(e.consume(t),O):(e.consume(t),ee)}function k(t){return t===i?(e.consume(t),i=void 0,te):t===null?n(t):K(t)?(o=k,j(t)):(e.consume(t),k)}function ee(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||q(t)?T(t):(e.consume(t),ee)}function te(e){return e===47||e===62||q(e)?T(e):n(e)}function A(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function j(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return J(t)?Y(e,re,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):re(t)}function re(t){return e.enter(`htmlTextData`),o(t)}}var yr={name:`labelEnd`,resolveAll:Cr,resolveTo:wr,tokenize:Tr},br={tokenize:Er},xr={tokenize:Dr},Sr={tokenize:Or};function Cr(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&V(e,0,e.length,n),e}function wr(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=H(o,e.slice(i+1,i+r+3)),o=H(o,[[`enter`,l,t]]),o=H(o,pn(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=H(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=H(o,e.slice(a+1)),o=H(o,[[`exit`,s,t]]),V(e,i,e.length,o),e}function Tr(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(U(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(br,u,o?u:d)(t):t===91?e.attempt(xr,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Sr,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function Er(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return q(t)?er(e,a)(t):a(t)}function a(t){return t===41?u(t):Zn(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return q(t)?er(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?$n(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return q(t)?er(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Dr(e,t,n){let r=this;return i;function i(t){return Qn.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(U(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Or(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var kr={name:`labelStartImage`,resolveAll:yr.resolveAll,tokenize:Ar};function Ar(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var jr={name:`labelStartLink`,resolveAll:yr.resolveAll,tokenize:Mr};function Mr(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Nr={name:`lineEnding`,tokenize:Pr};function Pr(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Y(e,t,`linePrefix`)}}var Fr={name:`thematicBreak`,tokenize:Ir};function Ir(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||K(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),J(t)?Y(e,s,`whitespace`)(t):s(t))}}var X={continuation:{tokenize:Br},exit:Hr,name:`list`,tokenize:zr},Lr={partial:!0,tokenize:Ur},Rr={partial:!0,tokenize:Vr};function zr(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Yt(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Fr,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Yt(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(bn,r.interrupt?n:u,e.attempt(Lr,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return J(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Br(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(bn,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Y(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!J(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Rr,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Y(e,e.attempt(X,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Vr(e,t,n){let r=this;return Y(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Hr(e){e.exit(this.containerState.type)}function Ur(e,t,n){let r=this;return Y(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!J(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Wr={name:`setextUnderline`,resolveTo:Gr,tokenize:Kr};function Gr(e,t){let n=new on,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function Kr(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),J(t)?Y(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||K(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var qr={tokenize:Jr};function Jr(e){let t=this,n=e.attempt(bn,r,e.attempt(this.parser.constructs.flowInitial,i,Y(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Kn,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Yr={resolveAll:$r()},Xr=Qr(`string`),Zr=Qr(`text`);function Qr(e){return{resolveAll:$r(e===`text`?ei:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function $r(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function ei(e,t){let n=new on,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var ti=e({attentionMarkers:()=>li,contentInitial:()=>ri,disable:()=>ui,document:()=>ni,flow:()=>ai,flowInitial:()=>ii,insideSpan:()=>ci,string:()=>oi,text:()=>si}),ni={42:X,43:X,45:X,48:X,49:X,50:X,51:X,52:X,53:X,54:X,55:X,56:X,57:X,62:Sn},ri={91:tr},ii={[-2]:Pn,[-1]:Pn,32:Pn},ai={35:sr,42:Fr,45:[Wr,Fr],60:fr,61:Wr,95:Fr,96:Mn,126:Mn},oi={38:On,92:En},si={[-5]:Nr,[-4]:Nr,[-3]:Nr,33:kr,38:On,42:mn,60:[vn,_r],91:jr,92:[ar,En],93:yr,95:mn,96:Rn},ci={null:[mn,Yr]},li={null:[42,95]},ui={null:[]};function di(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=H(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=pn(a,l.events,l),l.events):[]}function f(e,t){return pi(p(e),t)}function p(e){return fi(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){K(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&V(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function fi(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function pi(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
3
|
+
`;break;case-3:o=`\r
|
|
4
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function mi(e){let t={constructs:Ut([ti,...(e||{}).extensions||[]]),content:n(rn),defined:[],document:n(cn),flow:n(qr),lazy:{},string:n(Xr),text:n(Zr)};return t;function n(e){return n;function n(n){return di(t,e,n)}}}function hi(e){for(;!Wn(e););return e}var gi=/[\0\t\n\r]/g;function _i(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){gi.lastIndex=c;let n=gi.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var vi=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function yi(e){return e.replace(vi,bi)}function bi(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Kt(n.slice(t?2:1),t?16:10)}return Vt(n)||e}var xi={}.hasOwnProperty;function Si(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Ci(n)(hi(mi(n).document().write(_i()(e,t,!0))))}function Ci(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(ge),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(z),blockQuote:o(de),characterEscape:E,characterReference:E,codeFenced:o(I),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(I,s),codeText:o(L,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(fe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(R),hardBreakEscape:o(pe),hardBreakTrailing:o(pe),htmlFlow:o(me,s),htmlFlowData:E,htmlText:o(me,s),htmlTextData:E,image:o(he),label:s,link:o(ge),listItem:o(ve),listItemValue:p,listOrdered:o(_e,f),listUnordered:o(_e),paragraph:o(ye),reference:se,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(z),strong:o(be),thematicBreak:o(Se)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:F,autolinkProtocol:P,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:N,characterReferenceMarkerNumeric:N,characterReferenceValue:le,characterReference:ue,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(A),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(ee),htmlFlowData:D,htmlText:l(te),htmlTextData:D,image:l(ne),label:M,labelText:re,lineEnding:O,link:l(j),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ce,resourceDestinationString:ie,resourceTitleString:ae,resource:oe,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};Ti(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),xi.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||Di).call(o,void 0,e[0])}for(r.position={start:wi(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:wi(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:wi(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+et({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Di).call(this,e,r[0])),n.position.end=wi(e.end)}function d(){return It(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=U(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=xe(),n.position={start:wi(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=wi(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=wi(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ne(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function re(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=yi(t),n.identifier=U(t).toLowerCase()}function M(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ie(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ae(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function oe(){this.data.inReference=void 0}function se(){this.data.referenceType=`collapsed`}function ce(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=U(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function N(e){this.data.characterReferenceType=e.type}function le(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Kt(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Vt(t);let i=this.stack[this.stack.length-1];i.value+=r}function ue(e){let t=this.stack.pop();t.position.end=wi(e.end)}function P(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function F(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function de(){return{type:`blockquote`,children:[],position:void 0}}function I(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function L(){return{type:`inlineCode`,value:``,position:void 0}}function fe(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function R(){return{type:`emphasis`,children:[],position:void 0}}function z(){return{type:`heading`,depth:0,children:[],position:void 0}}function pe(){return{type:`break`,position:void 0}}function me(){return{type:`html`,value:``,position:void 0}}function he(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function ge(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function _e(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function ve(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function ye(){return{type:`paragraph`,children:[],position:void 0}}function be(){return{type:`strong`,children:[],position:void 0}}function xe(){return{type:`text`,value:``,position:void 0}}function Se(){return{type:`thematicBreak`,position:void 0}}}function wi(e){return{line:e.line,column:e.column,offset:e.offset}}function Ti(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Ti(e,r):Ei(e,r)}}function Ei(e,t){let n;for(n in t)if(xi.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Di(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+et({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+et({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+et({start:t.start,end:t.end})+`) is still open`)}function Oi(e){let t=this;t.parser=n;function n(n){return Si(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function ki(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Ai(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
5
|
+
`}]}function ji(e,t){let n=t.value?t.value+`
|
|
6
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Mi(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ni(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pi(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=tn(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Fi(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ii(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Li(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Ri(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Li(e,t);let i={src:tn(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function zi(e,t){let n={src:tn(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Bi(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Vi(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Li(e,t);let i={href:tn(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Hi(e,t){let n={href:tn(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Ui(e,t,n){let r=e.all(t),i=n?Wi(n):Gi(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
7
|
+
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
8
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Wi(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Gi(n[r])}return t}function Gi(e){return e.spread??e.children.length>1}function Ki(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function qi(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ji(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Yi(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xi(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Ze(t.children[1]),o=Xe(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Zi(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Qi(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var $i=9,ea=32;function ta(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(na(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(na(t.slice(i),i>0,!1)),a.join(``)}function na(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===$i||t===ea;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===$i||t===ea;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function ra(e,t){let n={type:`text`,value:ta(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ia(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var aa={blockquote:ki,break:Ai,code:ji,delete:Mi,emphasis:Ni,footnoteReference:Pi,heading:Fi,html:Ii,imageReference:Ri,image:zi,inlineCode:Bi,linkReference:Vi,link:Hi,listItem:Ui,list:Ki,paragraph:qi,root:Ji,strong:Yi,table:Xi,tableCell:Qi,tableRow:Zi,text:ra,thematicBreak:ia,toml:oa,yaml:oa,definition:oa,footnoteDefinition:oa};function oa(){}var{defineProperty:sa}=Object,ca=typeof self==`object`?self:globalThis,la=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new ca[e](t)},ua=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?sa(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof ca[e]==`function`?la(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(la(a,o),i)};return r},da=e=>ua(new Map,e)(0),fa=``,{toString:pa}={},{keys:ma,is:ha}=Object,ga=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=pa.call(e).slice(8,-1);switch(n){case`Array`:return[1,fa];case`Object`:return[2,fa];case`Date`:return[3,fa];case`RegExp`:return[4,fa];case`Map`:return[5,fa];case`Set`:return[6,fa];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},_a=([e,t])=>e===0&&(t===`function`||t===`symbol`),va=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=ga(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&ha(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of ma(o))(e||!_a(ga(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?fa:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(_a(ga(n))||_a(ga(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!_a(ga(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},ya=(e,{json:t,lossy:n}={})=>{let r=[];return va(!(t||n),!!t,new Map,r)(e),r},ba=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?da(ya(e,t)):structuredClone(e):(e,t)=>da(ya(e,t));function xa(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Sa(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Ca(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||xa,r=e.options.footnoteBackLabel||Sa,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=tn(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...ba(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
9
|
+
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
10
|
+
`}]}}var wa=(function(e){if(e==null)return ka;if(typeof e==`function`)return Oa(e);if(typeof e==`object`)return Array.isArray(e)?Ta(e):Ea(e);if(typeof e==`string`)return Da(e);throw Error(`Expected function, string, or object as test`)});function Ta(e){let t=[],n=-1;for(;++n<e.length;)t[n]=wa(e[n]);return Oa(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Ea(e){let t=e;return Oa(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Da(e){return Oa(t);function t(t){return t&&t.type===e}}function Oa(e){return t;function t(t,n,r){return!!(Aa(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function ka(){return!0}function Aa(e){return typeof e==`object`&&!!e&&`type`in e}function ja(e){return e}var Ma=[],Na=`skip`;function Pa(e,t,n,r){if(!e||typeof e!=`object`)throw Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,a,o,s,c;if(typeof n==`function`||n&&typeof n==`object`?(a=t,o=n,r&&(i=!1)):(o=t,n&&(i=!1)),typeof o==`function`)s=o;else if(o&&typeof o==`object`){if(o.enter!==null&&o.enter!==void 0){if(typeof o.enter==`function`)s=o.enter;else throw Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor")}if(typeof o.exit==`function`)c=o.exit;else throw Error("Unexpected value `"+o.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw Error("Unexpected value `"+o+"` for `enter` or `visitors`, expected visitor or object with visitors");let l=wa(a),u=i?1:-1;d(e,void 0,[])();function d(e,t,n){let r=e&&typeof e==`object`?e:{};if(typeof r.type==`string`){let t=typeof r.tagName==`string`?r.tagName:typeof r.name==`string`?r.name:void 0;Object.defineProperty(o,"name",{value:`node (`+ja(e.type+(t?`<`+t+`>`:``))+`)`})}return o;function o(){let r=!a||l(e,t,n[n.length-1]||void 0),o=Ma;if(s&&r&&(o=Fa(s(e,n,t)),o[0]===!1))return o;if(`children`in e&&e.children){let t=e;if(t.children&&o[0]!==`skip`){let e=(i?-1:t.children.length)+u,r=[...n,t];for(;e>-1&&e<t.children.length;){let n=t.children[e],i=d(n,e,r)();if(i[0]===!1)return i;e=typeof i[1]==`number`?i[1]:e+u}}}if(c&&r){let r=Fa(c(e,n,t));if(r[0]===`skip`)throw Error("Unexpected value `"+r[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(r[0]===!1||typeof r[1]==`number`)return r}return o}}}function Fa(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?Ma:[e]}function Ia(e,t,n,r){let i,a,o;typeof n==`function`||n&&typeof n==`object`?(i=t,a=n,o=r):(a=t,o=n),typeof a==`function`?Pa(e,i,Ra(a),o):Pa(e,i,La(a),o)}function La(e){return!e||typeof e!=`object`?e:{enter:typeof e.enter==`function`?Ra(e.enter):e.enter,exit:typeof e.exit==`function`?Ra(e.exit):e.exit}}function Ra(e){return t;function t(t,n,r){return e(t,r,n[n.length-1])}}var za={}.hasOwnProperty,Ba={};function Va(e,t){let n=t||Ba,r=new Map,i=new Map,a={all:s,applyData:Ua,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...aa,...n.handlers},one:o,options:n,patch:Ha,wrap:Ga};return Ia(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(za.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=ba(n);return r.children=a.all(e),r}return ba(e)}return(a.options.unknownHandler||Wa)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=Ka(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=Ka(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function Ha(e,t){e.position&&(t.position=$e(e))}function Ua(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,ba(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function Wa(e,t){let n=t.data||{},r=`value`in t&&!(za.call(n,`hProperties`)||za.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 Ga(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
11
|
+
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
12
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
13
|
+
`}),n}function Ka(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function qa(e,t){let n=Va(e,t),r=n.one(e,void 0),i=Ca(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
14
|
+
`},i)),a}function Ja(e,t){return e&&`run`in e?async function(n,r){let i=qa(n,{file:r,...t});await e.run(i,r)}:function(n,r){return qa(n,{file:r,...e||t})}}function Ya(e){if(e)throw e}var Xa=n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function Za(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Qa(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?$a(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function $a(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Z={basename:eo,dirname:to,extname:no,join:ro,sep:`/`};function eo(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);oo(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function to(e){if(oo(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||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function no(e){oo(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function ro(...e){let t=-1,n;for(;++t<e.length;)oo(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:io(n)}function io(e){oo(e);let t=e.codePointAt(0)===47,n=ao(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function ao(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function oo(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var so={cwd:co};function co(){return`/`}function lo(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function uo(e){if(typeof e==`string`)e=new URL(e);else if(!lo(e)){let t=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:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return fo(e)}function fo(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var po=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],mo=class{constructor(e){let t;t=e?lo(e)?{path:e}:typeof e==`string`||vo(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:so.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<po.length;){let e=po[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)po.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Z.basename(this.path):void 0}set basename(e){go(e,`basename`),ho(e,`basename`),this.path=Z.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Z.dirname(this.path):void 0}set dirname(e){_o(this.basename,`dirname`),this.path=Z.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Z.extname(this.path):void 0}set extname(e){if(ho(e,`extname`),_o(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Z.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){lo(e)&&(e=uo(e)),go(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Z.basename(this.path,this.extname):void 0}set stem(e){go(e,`stem`),ho(e,`stem`),this.path=Z.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new B(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function ho(e,t){if(e&&e.includes(Z.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Z.sep+"`")}function go(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function _o(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function vo(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var yo=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),bo=t(Xa(),1),xo={}.hasOwnProperty,So=new class e extends yo{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=Qa()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,bo.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(To(`data`,this.frozen),this.namespace[e]=t,this):xo.call(this.namespace,e)&&this.namespace[e]||void 0:e?(To(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Oo(e),n=this.parser||this.Parser;return Co(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Co(`process`,this.parser||this.Parser),wo(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Oo(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Ao(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Co(`processSync`,this.parser||this.Parser),wo(`processSync`,this.compiler||this.Compiler),this.process(e,r),Do(`processSync`,`process`,t),n;function r(e,r){t=!0,Ya(e),n=r}}run(e,t,n){Eo(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Oo(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Do(`runSync`,`run`,n),r;function i(e,t){Ya(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Oo(t),r=this.compiler||this.Compiler;return wo(`stringify`,r),Eo(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(To(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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");o(e.plugins),e.settings&&(r.settings=(0,bo.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];Za(o)&&Za(r)&&(r=(0,bo.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Co(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function wo(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function To(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Eo(e){if(!Za(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Do(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Oo(e){return ko(e)?e:new mo(e)}function ko(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Ao(e){return typeof e==`string`||jo(e)}function jo(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Mo=[],No={allowDangerousHtml:!0},Po=/^(https?|ircs?|mailto|xmpp)$/i,Fo=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Io(e){let t=Lo(e),n=Ro(e);return zo(t.runSync(t.parse(n),n),e)}function Lo(e){let t=e.rehypePlugins||Mo,n=e.remarkPlugins||Mo,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...No}:No;return So().use(Oi).use(n).use(Ja,r).use(t)}function Ro(e){let t=e.children||``,n=new mo;return typeof t==`string`?n.value=t:``+t,n}function zo(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Bo;for(let e of Fo)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Ia(e,l),dt(e,{Fragment:w,components:i,ignoreInvalidStyle:!0,jsx:T,jsxs:E,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Pt)if(Object.hasOwn(Pt,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Pt[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Bo(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Po.test(e.slice(0,t))?e:``}function Vo(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Ho(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Uo(e,t,n){let r=wa((n||{}).ignore||[]),i=Wo(t),a=-1;for(;++a<i.length;)Pa(e,o);function o(e,t,n){if(e.type===`text`&&typeof n==`number`)return s(e,t,n);if(r(e,n,t[t.length-1]))return Na}function s(e,t,n){let r=t[t.length-1],o=i[a][0],s=i[a][1],c=0,l=!1,u=[];o.lastIndex=0;let d=o.exec(e.value);for(;d;){let n=d.index,r={index:d.index,input:d.input,stack:[...t,e]},i=s(...d,r);if(typeof i==`string`&&(i=i.length>0?{type:`text`,value:i}:void 0),i===!1)o.lastIndex=n+1;else{if(c!==n&&f({type:`text`,value:e.value.slice(c,n)}),Array.isArray(i))for(let e of i)f(e);else i&&f(i);c=n+d[0].length,l=!0}if(!o.global)break;d=o.exec(e.value)}return l?(c<e.value.length&&f({type:`text`,value:e.value.slice(c)}),r.children.splice(n,1,...u)):u=[e],n+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function Wo(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Go(e[0]),Ko(e[1])])}return t}function Go(e){return typeof e==`string`?new RegExp(Ho(e),`g`):e}function Ko(e){return typeof e==`function`?e:function(){return e}}var qo=`phrasing`,Jo=[`autolink`,`link`,`image`,`label`];function Yo(){return{transforms:[rs],enter:{literalAutolink:Zo,literalAutolinkEmail:Qo,literalAutolinkHttp:Qo,literalAutolinkWww:Qo},exit:{literalAutolink:ns,literalAutolinkEmail:ts,literalAutolinkHttp:$o,literalAutolinkWww:es}}}function Xo(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:qo,notInConstruct:Jo},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:qo,notInConstruct:Jo},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:qo,notInConstruct:Jo}]}}function Zo(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Qo(e){this.config.enter.autolinkProtocol.call(this,e)}function $o(e){this.config.exit.autolinkProtocol.call(this,e)}function es(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function ts(e){this.config.exit.autolinkEmail.call(this,e)}function ns(e){this.exit(e)}function rs(e){Uo(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,is],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,as]],{ignore:[`link`,`linkReference`]})}function is(e,t,n,r,i){let a=``;if(!cs(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!os(n)))return!1;let o=ss(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function as(e,t,n,r){return!cs(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function os(e){let 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 ss(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Vo(e,`(`),a=Vo(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function cs(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||$t(n)||Qt(n))&&(!t||n!==47)}vs.peek=_s;function ls(){this.buffer()}function us(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function ds(){this.buffer()}function fs(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function ps(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=U(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ms(e){this.exit(e)}function hs(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=U(this.sliceSerialize(e)).toLowerCase(),n.label=t}function gs(e){this.exit(e)}function _s(){return`[`}function vs(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function ys(){return{enter:{gfmFootnoteCallString:ls,gfmFootnoteCall:us,gfmFootnoteDefinitionLabelString:ds,gfmFootnoteDefinition:fs},exit:{gfmFootnoteCallString:ps,gfmFootnoteCall:ms,gfmFootnoteDefinitionLabelString:hs,gfmFootnoteDefinition:gs}}}function bs(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:vs},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
15
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Ss:xs))),s(),o}}function xs(e,t,n){return t===0?e:Ss(e,t,n)}function Ss(e,t,n){return(n?``:` `)+e}var Cs=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Os.attention=ks,Os.peek=As;function ws(){return{canContainEols:[`delete`],enter:{strikethrough:Es},exit:{strikethrough:Ds}}}function Ts(){return{handlers:{delete:Os},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Cs}]}}function Es(e){this.enter({type:`delete`,children:[],position:void 0},e)}function Ds(e){this.exit(e)}function Os(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function ks(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function As(){return`~`}function js(e){return e.length}function Ms(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||js,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Ns(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=Ps(r[d]);else{let e=Ps(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u],r=n.fillRows===!1?Math.max(1,o[u===1?0:u].length):l;d=-1;let i=[];for(;++d<r;){let o=e[d]||``,s=``,l=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];if(n===114)s=` `.repeat(e);else if(n===99){let t=e/2;e%2?(s=` `.repeat(t+.5),l=` `.repeat(t-.5)):(s=` `.repeat(t),l=s)}else l=` `.repeat(e)}n.delimiterStart!==!1&&!d&&i.push(`|`),n.padding===!1||n.alignDelimiters===!1&&o===``||n.delimiterStart===!1&&!d||i.push(` `),n.alignDelimiters!==!1&&i.push(s),i.push(o),n.alignDelimiters!==!1&&i.push(l),n.padding!==!1&&i.push(` `),(n.delimiterEnd!==!1||d!==r-1)&&i.push(`|`)}m.push(n.delimiterEnd===!1?i.join(``).replace(/ +$/,``):i.join(``))}return m.join(`
|
|
16
|
+
`)}function Ns(e){return e==null?``:String(e)}function Ps(e){let 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}var Fs=wa([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Is(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Ls);return i(),o}function Ls(e,t,n){return`>`+(n?``:` `)+e}function Rs(e,t){return zs(e,t.inConstruct,!0)&&!zs(e,t.notInConstruct,!1)}function zs(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 Bs(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
|
|
17
|
+
`&&!e.before&&!e.after&&Rs(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
|
|
18
|
+
`}function Vs(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Hs(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function Us(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Ws(e,t,n,r){let i=Us(n),a=e.value||``;if(Hs(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Gs);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(Vs(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
|
|
19
|
+
`,encode:["`"],...o.current()})),t()}return u+=o.move(`
|
|
20
|
+
`),a&&(u+=o.move(a+`
|
|
21
|
+
`)),u+=o.move(s),c(),u}function Gs(e,t,n){return(n?``:` `)+e}function Ks(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function qs(e,t,n,r){let i=Ks(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
22
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Js(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ys(e){let t=e.codePointAt(0);return t===void 0?``:String.fromCodePoint(t)}function Xs(e){let t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function Zs(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Qs(e,t,n){let r=fn(e),i=fn(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}}function $s(e){if(e.charCodeAt(0)!==60)return;let t=e.charCodeAt(1);if(t===33){let t=e.charCodeAt(2);return t===45?2:t===91?5:W(t)?4:void 0}if(t===63)return 3;let n=t===47,r=n?2:1,i=r,a=e.charCodeAt(i);if(!W(a))return;for(;a===45||G(a);)a=e.charCodeAt(++i);let o=e.slice(r,i).toLowerCase();return!n&&a!==47&&dr.includes(o)?1:ur.includes(o)?6:7}var ec=new Map([[`*`,!1],[`_`,!0]]);function tc(e,t,n){let r=new Set;for(let i of e){let e=n.get(i);if(e&&i.attention&&t.some(e=>e.attention===i.attention))for(let t of e.tokens)r.add(t.attention)}let i=[];for(let t of e)t.attention&&r.delete(t.attention)&&i.push(t.attention);return i.reverse(),i}function nc(e,t,n){let r=[],i=new Map,a=new Map,o=0;for(;o<e.length;){if(!e[o].attention){o++;continue}let s=e[o].value.charAt(0),c=ec.get(s),l=o+1;for(;l<e.length&&e[l].attention&&e[l].value.charAt(0)===s;)l++;let u=o?e[o-1].value:t,d=fn(u.charCodeAt(u.length-1)),f=fn((l<e.length?e[l].value:n).charCodeAt(0)),p=!f||f===2&&!!d,m=!d||d===2&&!!f,h={tokens:e.slice(o,l),markers:[],start:0,end:0,open:c?p&&(!!d||!m):p,close:c?m&&(!!f||!p):m,split:c!==void 0};for(let e of h.tokens){i.set(e,[...h.tokens]),a.set(e,h);let t=e.value.length;for(;t--;)h.markers.push(e)}h.end=h.markers.length,r.push(h),o=l}for(ac(r,i),o=-1;++o<e.length;){let t=i.get(e[o]);if(t)return{attention:tc(e,t,a),index:o}}}function rc(e,t){let n=e[t?0:e.length-1];if(!n||n.attention)return;let r=t?Ys(n.value):Xs(n.value),i=Zs(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let e=n.value.slice(0,n.value.length-r.length),t=0;for(;e.charCodeAt(e.length-1-t)===92;)t++;t%2&&(e+=`\\`),n.value=e+i}}function ic(e,t,n,r,i){for(let a of n.attention){let o=t.get(a)||a.sequences[0];for(let s of a.sequences){if(s===o)continue;let c=new Map(t);c.set(a,s);let l=lc(e,c,r,i),u=nc(l,r,i);if(!u||u.index>n.index)return{chosen:c,mistake:u,tokens:l}}}}function ac(e,t){let n=new Map;for(let r of e){let e=r.tokens[0].value.charAt(0),i=n.get(e);i||(i=[],n.set(e,i));let a=r.close?i.length:0;for(;a--&&r.start<r.end;){let e=i[a],n=e.end-e.start,o=r.end-r.start;if(r.split?(e.close||r.open)&&o%3&&!((n+o)%3):n!==e.markers.length||n!==o)continue;let s=r.split?n>1&&o>1?2:1:o,c=e.markers.slice(e.end-s,e.end),l=r.markers.slice(r.start,r.start+s),u=c[0],d=l[0];if(u===c[s-1]&&u.value.length===s&&d===l[s-1]&&d.value.length===s&&u.attention===d.attention)t.delete(u),t.delete(d);else{let e=[...new Set([...c,...l])];for(let n of e){let r=t.get(n);r&&r.push(...e)}}e.end-=s,r.start+=s,e.start===e.end&&i.splice(a,1),a=i.length}r.open&&r.start<r.end&&i.push(r)}}function oc(e,t,n){if(t.length===0)throw Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(let t of n)if(!Number.isSafeInteger(t)||t<1)throw Error("Cannot serialize `"+e+"` as attention with `"+t+"` as size, expected positive integer");let r=[];for(let i of t){if(i.length!==1)throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!Zt(i.charCodeAt(0)))throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(let e of n)r.push(i.repeat(e))}return r}function sc(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before;r.push(-1);let c=t.createTracker(n);for(;++o<i.length;){let l=i[o],u;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),u=n?Ys(n(i[o+1],e,t,{before:``,after:``,...c.current()})):``}else u=n.after;let d=a[a.length-1];typeof d==`string`&&(s===`\r`||s===`
|
|
23
|
+
`)&&l.type===`html`&&$s(l.value)!==7&&(a[a.length-1]=d.replace(/(\r?\n|\r)$/,` `),s=` `,c=t.createTracker(n),c.move(uc(a,n.before,n.after)));let f=t.handle.handlers[l.type];if(f&&f.attention){let e=cc(l,f.attention,t,c);a.push(e),s=Xs(e.sequences[0])}else{let n=t.handle(l,e,t,{...c.current(),after:u,before:s});if(!n)continue;c.move(n),a.push(n),s=Xs(n)}}return r.pop(),a}function cc(e,t,n,r){let{construct:i,markers:a,sizes:o}=t(e,n),s=oc(e.type,a,o),c=s[0],l=n.enter(i);r.move(c);let u=sc(e,n,{...r.current(),before:c,after:c});return r.move(uc(u,c,c)),r.move(c),l(),{children:u,sequences:s}}function lc(e,t,n,r){let i=[],a,o=Xs(n),s=-1;for(;++s<e.length;){let n=e[s];if(typeof n==`string`){let e={value:n,attention:void 0};a&&a===Ys(n)&&rc([e],!0),a=void 0,i.push(e),e.value&&(o=Xs(e.value));continue}let c=t.get(n)||n.sequences[0],l=c.charAt(0),u=e[s+1],d=o,f=Ys(u===void 0?r:typeof u==`string`?u:t.get(u)||u.sequences[0]),p=lc(n.children,t,c,c),m=p.length>0?p[0].value:``,h=Qs(d.charCodeAt(d.length-1),m.charCodeAt(0),l);h.inside&&rc(p,!0);let g=p.length>0?Xs(p[p.length-1].value):``,_=Qs(f.charCodeAt(0),g.charCodeAt(g.length-1),l);_.inside&&rc(p,!1),h.outside&&d!==`
|
|
24
|
+
`&&d!==`\r`&&rc(i,!1),_.outside&&(a=f),i.push({value:c,attention:n},...p,{value:c,attention:n}),o=c.charAt(c.length-1)}return i}function uc(e,t,n){let r=new Map,i=lc(e,r,t,n),a=i,o=nc(a,t,n);for(;o;){let s=ic(e,r,o,t,n);if(!s){a=i;break}r=s.chosen,a=s.tokens,o=s.mistake}let s=``;for(let e of a)s+=e.value;return s}dc.attention=fc,dc.peek=pc;function dc(e,t,n,r){let i=n.enter(`phrasing`),a=uc([cc(e,fc,n,n.createTracker(r))],r.before,r.after);return i(),a}function fc(e,t){return{construct:`emphasis`,markers:Js(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function pc(e,t,n){return n.options.emphasis||`*`}function mc(e,t){let n=!1;return Ia(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&It(e)&&(t.options.setext||n))}function hc(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(mc(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
25
|
+
`,after:`
|
|
26
|
+
`});return r(),t(),o+`
|
|
27
|
+
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
28
|
+
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
29
|
+
`,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=Zs(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}gc.peek=_c;function gc(e){return e.value||``}function _c(){return`<`}vc.peek=yc;function vc(e,t,n,r){let i=Ks(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function yc(){return`!`}bc.peek=xc;function bc(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function xc(){return`!`}Sc.peek=Cc;function Sc(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Cc(){return"`"}function wc(e,t){let n=It(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))}Tc.peek=Ec;function Tc(e,t,n,r){let i=Ks(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(wc(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`),u=n.containerPhrasing(e,{before:l,after:`](`,...o.current()});l+=o.move(u),c(),l+=o.move(`](`);let d=/[\0- \u007F]/.test(e.url),f=r.before.charAt(r.before.length-1),p=e.title||void 0;if(!p&&!d&&(f===`
|
|
30
|
+
`||f===`\r`)){let e=0;for(;e<u.length&&u.charCodeAt(e)!==93;)e+=u.charCodeAt(e)===92?2:1;u.charCodeAt(e+1)===58&&(p=``)}return!e.url&&typeof p==`string`||d?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:typeof p==`string`?` `:`)`,...o.current()}))),c(),typeof p==`string`&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(p,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Ec(e,t,n){return wc(e,n)?`<`:`[`}Dc.peek=Oc;function Dc(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Oc(){return`[`}function kc(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Ac(e){let t=kc(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function jc(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Mc(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Nc(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?jc(n):kc(n),s=e.ordered?o===`.`?`)`:`.`:Ac(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),Mc(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Pc(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Fc(e,t,n,r){let i=Pc(n),a=n.bulletCurrent||kc(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Ic(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function Lc(e,t,n,r){if(!e.children.some(function(e){return Fs(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function Rc(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}zc.attention=Bc,zc.peek=Vc;function zc(e,t,n,r){let i=n.enter(`phrasing`),a=uc([cc(e,Bc,n,n.createTracker(r))],r.before,r.after);return i(),a}function Bc(e,t){return{construct:`strong`,markers:Rc(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function Vc(e,t,n){return n.options.strong||`*`}function Hc(e,t,n,r){let i=t?t.children:[],a=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function Uc(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Wc(e,t,n){let r=(Mc(n)+(n.options.ruleSpaces?` `:``)).repeat(Uc(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Gc={blockquote:Is,break:Bs,code:Ws,definition:qs,emphasis:dc,hardBreak:Bs,heading:hc,html:gc,image:vc,imageReference:bc,inlineCode:Sc,link:Tc,linkReference:Dc,list:Nc,listItem:Fc,paragraph:Ic,root:Lc,strong:zc,text:Hc,thematicBreak:Wc};function Kc(){return{enter:{table:qc,tableData:Zc,tableHeader:Zc,tableRow:Yc},exit:{codeText:Qc,table:Jc,tableData:Xc,tableHeader:Xc,tableRow:Xc}}}function qc(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[],position:void 0},e),this.data.inTable=!0}function Jc(e){this.exit(e),this.data.inTable=void 0}function Yc(e){this.enter({type:`tableRow`,children:[],position:void 0},e)}function Xc(e){this.exit(e)}function Zc(e){this.enter({type:`tableCell`,children:[],position:void 0},e)}function Qc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,$c));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function $c(e,t){return t===`|`?t:e}function el(e){let{tableCellPadding:t,tablePipeAlign:n,stringLength:r}=e||{},i=t?` `:`|`;return{handlers:{inlineCode:d,table:a,tableCell:s,tableRow:o},join:[tl],unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
31
|
+
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}]};function a(e,t,n,r){let i=l(e,n,r),a=i[0];if(a){let t=e.align?e.align.length:0,n=-1;if(!t)for(;++n<i.length;)i[n].length>t&&(t=i[n].length);for(;a.length<t;)a.push(``)}return c(i,e.align)}function o(e,t,n,r){let i=c([u(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
32
|
+
`))}function s(e,t,n,r){let a=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:i,after:i});return o(),a(),s}function c(e,i){return Ms(e,{align:i,alignDelimiters:n,fillRows:!1,padding:t,stringLength:r})}function l(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=u(r[i],t,n);return o(),a}function u(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=s(r[i],e,t,n);return o(),a}function d(e,t,n){let r=Gc.inlineCode(e,t,n);if(!n.stack.includes(`tableCell`))return r;let i=[],a=0,o=r.indexOf(`|`);for(;o!==-1;){let e=o;for(;e>a&&r.charCodeAt(e-1)===92;)e--;i.push(r.slice(a,o)),(o-e)%2==0&&i.push(`\\`),a=o,o=r.indexOf(`|`,o+1)}return i.push(r.slice(a)),i.join(``)}}function tl(e,t,n,r){if(e.type===`table`&&n.type===`listItem`&&n.spread===!1&&(t.type===`definition`||t.type===`heading`&&nl(t,r)||t.type===`paragraph`||t.type===`table`))return 1}function nl(e,t){let n=!1;return Ia(e,function(e){if(e.type===`break`||`value`in e&&/\r?\n|\r/.test(e.value))return n=!0,!1}),!!((!e.depth||e.depth<3)&&It(e)&&(t.options.setext||n))}function rl(){return{exit:{taskListCheckValueChecked:al,taskListCheckValueUnchecked:al,paragraph:ol}}}function il(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:sl}}}function al(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function ol(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function sl(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Gc.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function cl(){return[Yo(),ys(),ws(),Kc(),rl()]}function ll(e){return{extensions:[Xo(),bs(e),Ts(),el(e),il()]}}var ul={tokenize:Cl,partial:!0},dl={tokenize:wl,partial:!0},fl={tokenize:Tl,partial:!0},pl={tokenize:El,partial:!0},ml={tokenize:Dl,partial:!0},hl={name:`wwwAutolink`,tokenize:xl,previous:Ol},gl={name:`protocolAutolink`,tokenize:Sl,previous:kl},_l={name:`emailAutolink`,tokenize:bl,previous:Al},Q={};function vl(){return{text:Q}}for(var yl=48;yl<123;)Q[yl]=_l,yl++,yl===58?yl=65:yl===91&&(yl=97);Q[43]=_l,Q[45]=_l,Q[46]=_l,Q[95]=_l,Q[72]=[_l,gl],Q[104]=[_l,gl],Q[87]=[_l,hl],Q[119]=[_l,hl];function bl(e,t,n){let r=this,i,a;return o;function o(t){return!jl(t)||!Al.call(r,r.previous)||Ml(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return jl(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(ml,u,l)(t):t===45||t===95||G(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&W(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function xl(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Ol.call(r,r.previous)||Ml(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(ul,e.attempt(dl,e.attempt(fl,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Sl(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&kl.call(r,r.previous)&&!Ml(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(W(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Jt(t)||q(t)||$t(t)||Qt(t)?n(t):e.attempt(dl,e.attempt(fl,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Cl(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function wl(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(pl,c,s)(t):t===null||q(t)||$t(t)||t!==45&&Qt(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Tl(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(pl,t,a)(o):o===null||q(o)||$t(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function El(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||q(o)||$t(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||q(e)||$t(e)?t(e):r(e)}function a(e){return W(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):W(t)?(e.consume(t),o):n(t)}}function Dl(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return G(e)?n(e):t(e)}}function Ol(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||q(e)}function kl(e){return!W(e)}function Al(e){return!(e===47||jl(e))}function jl(e){return e===43||e===45||e===46||e===95||G(e)}function Ml(e){let t=e.length,n=!1;for(;t--;){let 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}var Nl={tokenize:Vl,partial:!0};function Pl(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Rl,continuation:{tokenize:zl},exit:Bl}},text:{91:{name:`gfmFootnoteCall`,tokenize:Ll},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Fl,resolveTo:Il}}}}function Fl(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=U(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Il(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`;let 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++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Ll(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||q(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(U(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return q(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Rl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||q(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=U(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return q(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Y(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function zl(e,t,n){return e.check(bn,t,e.attempt(Nl,t,n))}function Bl(e){e.exit(`gfmFootnoteDefinition`)}function Vl(e,t,n){let r=this;return Y(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Hl(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&V(o,o.length,0,pn(s,e.slice(r+1,n),t)),V(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),V(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=fn(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=fn(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Ul=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){Wl(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Wl(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Gl(e,t){let n=!1,r=[];for(;t<e.length;){let 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`){let e=r.length-1;r[e]=r[e]===`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 Kl(){return{flow:{null:{name:`table`,tokenize:ql,resolveAll:Jl}}}}function ql(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):K(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):J(t)?Y(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||q(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,J(t)?Y(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return J(t)?Y(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||K(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return J(t)?Y(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||K(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||K(n)?(e.exit(`tableRow`),t(n)):J(n)?Y(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||q(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Jl(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Ul;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Xl(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Yl(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Yl(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Yl(f,t,o,i,n,d)):(o[0]=o[1],d=Yl(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Xl(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Gl(t.events,n))}return e}function Yl(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Zl(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Zl(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Zl(t.events,n[2]),a=Zl(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Zl(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Xl(e,t,n,r,i){let a=[],o=Zl(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Zl(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Ql={name:`tasklistCheck`,tokenize:eu};function $l(){return{text:{91:Ql}}}function eu(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return q(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return K(r)?t(r):J(r)?e.check({tokenize:tu},t,n)(r):n(r)}}function tu(e,t,n){return Y(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function nu(e){return Ut([vl(),Pl(),Hl(e),Kl(),$l()])}var ru={};function iu(e){let t=this,n=e||ru,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(nu(n)),a.push(cl()),o.push(ll(n))}function au({className:e,...t}){return T(`div`,{"data-slot":`input-group`,role:`group`,className:c(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input bg-transparent outline-none transition-colors dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[aria-invalid=true]]:border-destructive has-[[aria-invalid=true]]:ring-destructive/20`,e),...t})}function ou({className:e,align:t=`inline-start`,...n}){return T(`div`,{"data-slot":`input-group-addon`,"data-align":t,className:c(`flex shrink-0 cursor-text items-center justify-center gap-1.5 text-muted-foreground select-none [&>svg]:size-3.5`,t===`inline-start`?`order-first pl-2.5`:`order-last pr-2`,e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}function su({className:e,...t}){return T(d,{"data-slot":`input-group-control`,className:c(`min-w-0 flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent`,e),...t})}var cu="## Get started\n\nAdd a drivable car to your page, then choose which elements it can interact with. Start with a script or npm, and mark existing elements with `data-jr-*` attributes.\n\n### Installation\n\nChoose CDN, JavaScript, or React. All three accept the same authored configuration\nand expose the same ride controller.\n\n| Integration | Entry | React runtime | Startup |\n| ----------- | ---------------------- | ------------------------------------------- | --------------------------------------------------- |\n| CDN | `embed.js` | Included | A script with `data-jr-mount` starts automatically. |\n| JavaScript | `@joy-ride/game` | Included | Call `mount()` explicitly. |\n| React | `@joy-ride/game/react` | The application's React 19 and React DOM 19 | Render `JoyRide`; the component owns cleanup. |\n\nChoose one integration per page. The root import, `@joy-ride/game`, bundles React\nand starts only when you call `mount()`. The `/embed` entry adds globals and\ndeclarative script startup; `/react` shares the application's React runtime.\nReact and React DOM are optional package peers; the JavaScript and CDN entries do\nnot need an installed React runtime.\n\n#### CDN\n\nPaste this into an HTML page:\n\n```html\n<h1\n data-jr-breakable\n>\n Drive through this headline\n</h1>\n\n<script\n type=\"module\"\n src=\"https://unpkg.com/@joy-ride/game@latest/embed.js\"\n data-jr-mount\n><\/script>\n```\n\n`data-jr-mount` starts Joy Ride when the document is ready. Drive with **WASD** or the arrow keys; click the car to change vehicles. See [Script tag options](#jr-doc-script-tag-options) for presets, saved preferences, routing, and arrival targets.\n\n#### npm, pnpm, or Yarn\n\n```sh\nnpm install @joy-ride/game\n```\n\nUse `pnpm add` or `yarn add` instead if those manage your project. Mount after the\npage elements exist. This entry includes React and React DOM internally; no\nframework installation is needed.\n\n```ts\nimport { mount } from '@joy-ride/game';\n\nconst ride = mount();\n\nawait ride.ready;\n\n// Call ride.dispose() when the host view is removed.\n```\n\nThe package import does not mount automatically. It is safe to import during\nserver rendering, but call `mount()` only in the browser after page content exists.\n\n#### React\n\nIn an application using React 19 and React DOM 19, import the React entry so Joy\nRide shares the application's runtime. It does not include another copy of React.\n\n```tsx\n'use client';\n\nimport { JoyRide } from '@joy-ride/game/react';\n\nexport const JoyRideExperience = () => (\n <JoyRide\n initialOptions={{\n player: { vehicle: 'porsche-911-997' },\n game: { quality: 'high', masterVolume: 0 },\n }}\n />\n);\n```\n\n`JoyRide` mounts after the component reaches the browser and disposes the ride on\nunmount. It renders its controls through the host React tree, supports Strict Mode,\nand does not create a separate React root. The initial options accept the same\n`MountOptions` or saved `PlaygroundConfiguration` as `mount()`.\n\n| Prop | Meaning |\n| ---------------- | ------------------------------------------------------------------------------------------------- |\n| `preset` | Named defaults, currently `\"sfw\"`. Applied once at mount; explicit initial options override them. |\n| `initialOptions` | Initial authored configuration. Read when mounting; use a new component `key` to replace it. |\n| `settings` | Live `RuntimeOptionsPatch` for `game` and `dialog`, applied without remounting. |\n| `ref` | A React ref to `RideController` or `null`; commands that need the world still await `ride.ready`. |\n| `onReady` | Receives the initialized `RideController`. |\n| `onError` | Receives an initialization, presentation, or live settings error. |\n\nThe entry also exports the same imperative API and types for integrations that\nneed to call `mount()` in their own lifecycle. A default import remains the\nimperative API; the `JoyRide` component is a named export. Use `/react` rather than\nwrapping the root JavaScript API in a React component, which would load an additional bundled React.\n\n#### Lazy loading React with a preset\n\nThe component resolves its preset after it loads, so the host only imports the\nReact entry inside `lazy()`:\n\n```tsx\n'use client';\n\nimport { lazy, Suspense } from 'react';\n\nconst JoyRideGame = lazy(() =>\n import('@joy-ride/game/react').then(({ JoyRide }) => ({ default: JoyRide })),\n);\n\nexport const JoyRideExperience = () => (\n <Suspense fallback={null}>\n <JoyRideGame\n preset=\"sfw\"\n initialOptions={{ player: { vehicle: 'porsche-911-997' } }}\n />\n </Suspense>\n);\n```\n\n`preset` and `initialOptions` are read once when mounting. The preset supplies\n`game` and `dialog` defaults; explicit initial options win within each group.\nSaved playground configurations remain supported and their authored settings win.\nUse a new component `key` to apply a different preset or initial configuration;\n`settings` continues to apply live updates without remounting. Unknown preset\nnames report an initialization error through `onError`.\n\n### A playground in HTML\n\n```html\n<main>\n <h1\n data-jr-breakable\n data-jr-burnable\n >\n Make a mess.\n </h1>\n <div style=\"background: #fafbfc\">Your own layout</div>\n <div\n data-jr-liquid=\"paint\"\n data-jr-liquid-color=\"#5271ff\"\n >\n Blue paint\n </div>\n <button\n data-jr-trigger=\"click\"\n >\n Drive over me\n </button>\n <output\n data-jr-hud=\"speed\"\n >\n 0\n </output> mph\n</main>\n```\n\nThe script from [Installation](#jr-doc-installation) starts the ride. The module import needs an explicit `JoyRide.mount()` call.\n\nAn empty capability attribute or `true` enables it; `false` disables it. Values use the units in their names, such as seconds, metres, or CSS pixels.\n\n### A playground in JavaScript\n\n```ts\nimport JoyRide from '@joy-ride/game';\n\nconst ride = JoyRide.mount({\n game: { masterVolume: 0 },\n});\n\nconst titles = ride.bind('.playful-title', {\n breakable: { health: 80 },\n burnable: { burnSeconds: 12 },\n});\n\nawait ride.ready;\nride.player?.update({ appearance: 'auto' });\n```\n\nSelectors, attributes, and exact-element bindings share the same schema and validation. A selector binding includes future matches. An exact-element binding overrides that element's attributes.\n\nJoy Ride finds authored objects throughout the page. Add a behavior to any existing element; no playground wrapper is needed.\n\n### Lifecycle and readiness\n\n`JoyRide.mount()` returns a controller immediately. You can register bindings and listeners while it loads. Await `ride.ready` before world commands such as spawning vehicles or pouring liquid. `ride.player` and `ride.state` are `null` until ready; tours wait automatically.\n\nOnly one ride can be mounted on a page. `JoyRide.active` returns its controller, or `undefined`. Call `ride.dispose()` before mounting another; repeated disposal is safe. Disposal restores the page and releases listeners and resources. Initialization errors reject `ride.ready` and clean up. Commands fail after disposal; `ride.player` and `ride.state` return `null`.\n\nSound starts muted until a browser user gesture permits it. `ride.startAudio()` explicitly requests audio startup; browser autoplay rules still apply.\n\n### Coordinate conventions\n\nBrowser placement, vehicle snapshots, and public event positions use CSS **document pixels**, X right and Y down. `angleDeg` is clockwise. Vehicle speed is `speedMps`. A supplied element places a vehicle or pour at its centre. Vehicle state is deeply readonly.\n\nCanvas level definitions and low-level simulation positions use **metres**, X right and Y up. Do coordinate conversion at the browser/canvas boundary.\n\n## Page objects\n\nMake existing page elements block the car, move, break, burn, or crush. Use HTML attributes for simple setups and `ride.bind()` for JavaScript control.\n\n### Object capabilities\n\n`ObjectSpec` describes an existing page element. Each capability accepts a boolean or its option object, except `solid`/`pushable` which are booleans.\n\n| Property | Options / meaning |\n| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` | Stable scene ID; unique across registered objects. Otherwise generated. |\n| `object` | Named object recipe from `definitions.objects`. |\n| `enabled` | `false` suspends the resolved object's capabilities. |\n| `solid` | Blocking element bounds. |\n| `pushable` | Pushable lettering; not an arbitrary DOM rigid body. |\n| `breakable` | `true` or `{ health?: positive number }`. |\n| `burnable` | `true` or `{ burnSeconds?, ignitionSeconds?, spreadSeconds? }`; durations in seconds. Burn duration is positive; ignition/spread may be zero. |\n| `combustible` | Fuel lifecycle: `true` or `{ health?, burnSeconds?, blastRadiusPx? }`. Positive values. |\n| `crushable` | `true` or `{ scale?, opacity? }`, each between 0 and 1. |\n| `points` | Optional nonnegative points awarded when the object is destroyed, a pickup is collected, or a parking/stop zone qualifies. |\n| `liquid` | Liquid recipe and options; see Liquids in HTML. |\n| `pickupEffectColor` | Optional pickup ripple color: six-digit hex or RGB tuple. |\n| `trigger` | Zone preset/options; see Objectives and points. |\n| `hud` | One readout `{ field, unit?, precision? }`, or `false`. |\n| `meta` | JSON-compatible application metadata; available on object snapshots/events. |\n\nBreakable artwork supports text and root SVG elements. Liquid paint supports HTML and filled SVG shapes (`rect`, `circle`, `ellipse`, `path`, and polygons). Triggers, crushing, combustible fuel, and pushable text require HTML elements. Solidity and HUD readouts support more target types. Unsupported targets report a diagnostic.\n\n### Compatibility rules\n\n- `breakable` and `burnable` can be used independently or together.\n- `combustible` excludes `breakable`; `burnable` can set its fire profile.\n- `crushable` excludes `breakable` and explicit `solid: true`; crushing combustible fuel is allowed.\n- HUD readouts exclude breakable/burnable/pushable artwork and paint on the same node. Artwork traversal skips HUD-owned descendant text. Use separate sibling targets for independent content.\n- Vehicles have their own JS configuration and are never created through `ride.bind` or HTML.\n\nTypeScript catches incompatible literal configurations. Runtime validation checks complete merged results, including future DOM edits and JavaScript callers.\n\n### Composition and precedence\n\nFrom lowest to highest precedence: engine defaults, named recipe, selector registrations in registration order, explicit attributes, exact-element registrations in registration order, then internal object overrides.\n\nNested options merge, arrays replace, and `undefined` never erases a lower value. `false` disables a capability. Changing a slot action replaces incompatible old action options.\n\n```ts\nconst binding = ride.bind('.timber', {\n breakable: true,\n burnable: { burnSeconds: 10 },\n});\n\nbinding.update({ burnable: { ignitionSeconds: 0.2 } });\nbinding.replace({ breakable: true }); // this layer stops adding burning\nbinding.dispose(); // reveal attributes / lower bindings\n```\n\n### Binding handles and inspection\n\n`PlaygroundBinding` exposes `objects`, `update(patch)`, `replace(spec)`, `refresh()`, and `dispose()`.\n\n`objects` lists matching readonly snapshots: `{ id, target, spec, revision }`. Use `update` to merge this binding’s options, `replace` to replace them, and `dispose` to remove the binding. Bindings have no separate readiness promise.\n\nSelector bindings automatically track structural/attribute changes and input/change/focus events. Call `binding.refresh()` after programmatic state changes that do not produce those events, or for transient selectors such as `:hover`/`:active`. Exact-element/iterable bindings have an explicit fixed target set.\n\nInvalid JS edits throw before committing the affected configuration. Invalid DOM edits retain the last valid configuration and emit `joyride:diagnostic`.\n\n### Object HTML attributes\n\n| Attribute | Meaning |\n| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |\n| `data-jr-id` | Stable object ID. |\n| `data-jr-object` | Named object recipe. |\n| `data-jr-enabled` | Boolean suspension. |\n| `data-jr-solid` | Block the vehicle. |\n| `data-jr-pushable` | Allow the vehicle to push the element. |\n| `data-jr-points` | Optional nonnegative points for destruction, pickup collection, or a qualified parking/stop zone. |\n| `data-jr-breakable` | Enable fragmentation. |\n| `data-jr-breakable-health` | Fragmentation toughness. |\n| `data-jr-burnable` | Independent artwork burning. |\n| `data-jr-burnable-burn-seconds` | Burning duration. |\n| `data-jr-burnable-ignition-seconds` | Flame exposure before ignition. |\n| `data-jr-burnable-spread-seconds` | Artwork fire-spread duration. |\n| `data-jr-combustible` | Enable the fuel lifecycle. |\n| `data-jr-combustible-health` | Fuel health. |\n| `data-jr-combustible-burn-seconds` | Fuel burn duration. |\n| `data-jr-combustible-blast-radius-px` | Explosion radius in CSS pixels. |\n| `data-jr-crushable` | Enable crushing. |\n| `data-jr-crushable-scale` | Scale after crushing. |\n| `data-jr-crushable-opacity` | Opacity after crushing. |\n| `data-jr-meta-*` | String metadata; kebab names become camelCase metadata keys. |\n| `data-jr-ui` | Mark host controls as UI so driving input does not steal their interactions. Explicit HUD readouts can live inside UI. |\n\nUse `data-jr-foreground` on host UI that should stay above the vehicle and effects overlay. `data-jr-camera=\"fixed\"` or `data-jr-camera=\"follow\"` changes camera behavior while the car overlaps that region; `data-jr-camera-zoom` sets its zoom. `data-jr-auto-paint=\"false\"` excludes an element subtree from automatic paint. These page attributes are separate from the object capability attributes above.\n\n### Crush appearance and paint\n\nAdd `data-jr-crushable` to an HTML element. It crushes when the visible vehicle covers at least half its area, including CSS rotation and scale. Use `data-jr-crushable-crushed-class` to style the result; otherwise it squashes and fades. Add `data-jr-crushable-crushed-paint-color` for a paint spill sized to the element. Colors accept six-digit hex or JavaScript RGB tuples.\n\n```html\n<div\n data-jr-crushable\n data-jr-crushable-crushed-class=\"is-crushed\"\n data-jr-crushable-crushed-paint-color=\"#8caa27\"\n>\n Your element\n</div>\n```\n\nThe JavaScript equivalent is `ride.bind(element, { crushable: { crushedClass: 'is-crushed', crushedPaintColor: '#8caa27' } })`. Both options are optional. Reset restores the original appearance and removes engine-added classes. The ant artwork on the homepage is an example, not a built-in object type.\n\n### Debris\n\nScatter paper and leaves that react to passing cars. Paper lifts and folds; leaves skid and spin. Set a seed for a repeatable starting arrangement.\n\n```html\n<div\n data-jr-debris\n data-jr-debris-anchor=\"bottom\"\n data-jr-debris-amount=\"35\"\n data-jr-debris-kinds=\"paper leaf\"\n data-jr-debris-seed=\"42\"\n>\n Your ordinary element\n</div>\n```\n\n```js\nawait ride.ready;\nconst litter = ride.debris('.track', {\n anchor: 'center',\n amount: 40,\n // Omit kinds to include both materials.\n kinds: ['paper', 'leaf'],\n spread: 120,\n seed: 42,\n wind: { x: 7, y: -2 },\n});\nlitter.gust({ x: 300, y: -65 });\nlitter.reset();\n// litter.dispose();\n```\n\n`ride.debris(target, options?)` accepts a selector, Element, or iterable of elements. Each match gets its own collection. Selectors include future matches; removing an element removes its debris. You can also use `ride.bind('.track', { debris: { amount: 35, anchor: 'bottom' } })` or HTML attributes. HTML attributes take effect once a ride is mounted.\n\n| Option | HTML attribute | Meaning |\n| -------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `amount` | `data-jr-debris-amount` | Integer 0–600 per source, default 30; scene cap 3,000. |\n| `kinds` | `data-jr-debris-kinds` | `paper` or `leaf`; space/comma separated in HTML. Omit for both. |\n| `anchor` | `data-jr-debris-anchor` | `center`, `top`, `top-right`, `right`, `bottom-right`, `bottom`, `bottom-left`, `left`, `top-left`, or `fill` across the element. Default `center`. |\n| `spread` | `data-jr-debris-spread` | Scatter radius in scene pixels, default based on element size. `fill` uses the full bounds. |\n| `seed` | `data-jr-debris-seed` | Repeatable initial arrangement, default 31. |\n| `color` | `data-jr-debris-color` | Optional 3/6-digit hex tint for paper or leaves. |\n| `wind.x` | `data-jr-debris-wind-x` | Horizontal ambient wind in scene pixels/second; default `7`. |\n| `wind.y` | `data-jr-debris-wind-y` | Vertical ambient wind in scene pixels/second; default `-2`. Set both axes in HTML. |\n\n`reset()` restores the starting arrangement, `gust({x,y})` adds wind, and `dispose()` removes the collection. Scene reset restores authored debris; checkpoints preserve its motion. Resting pieces outside the viewport sleep to save work.\n\nDebris is explicit. Background styling never scatters physical debris. Add `data-jr-debris`, a `debris` definition, or call `ride.debris()` wherever you want a source.\n\nFor custom canvas hosts, import `Debris` from `@joy-ride/engine/debris`. Use `scatter({x,y,width,height}, options)` and `step(seconds, vehicles, viewport, walls)` with scene-pixel geometry. The normal game loop already updates `world.renderer.debris`. Custom renderers can call `drawDebris(context, particles, viewport, dark, layer)`: draw `ground` before vehicles and `air` after.\n\n## Vehicles and tools\n\nChoose a vehicle, assign its tools, or define your own preset.\n\n### Create and configure a vehicle\n\n```ts\nconst kit = JoyRide.define({\n liquids: { ink: { base: 'paint', color: '#5271ff' } },\n vehicles: {\n artist: {\n base: 'electric-gt',\n slots: { 1: { action: 'eject', liquid: 'ink' } },\n },\n },\n});\n\nconst ride = JoyRide.mount({ definitions: kit, player: { vehicle: 'artist' } });\nawait ride.ready;\nconst parkedCar = ride.spawnVehicle({\n vehicle: 'artist',\n at: { xPx: 300, yPx: 500 },\n angleDeg: 90,\n});\n```\n\n`VehicleSpawnOptions` extends `VehicleConfiguration` with `at?: PageTarget` and `angleDeg?: number`. `PageTarget` is an Element, CSS selector, or `{ xPx, yPx }` point in document CSS pixels. The same target shape is used by `ride.pour` and `ride.enterAt`. `vehicle` is a built-in or named recipe. `id?` supplies a unique ID. Spawned vehicles are parked; the mounted player remains the only drivable car. Initial `mount.player` only accepts `vehicle`, `appearance`, and `slots`.\n\nBuilt-in vehicle IDs: `porsche-911-997`, `ford-mustang-gt-2024`, `bmw-m4-2024`, `jeep-wrangler-2026`, `subaru-wrx-2024`, `audi-rs3-2024`, `lamborghini-huracan-evo-2023`, and `electric-gt`. Use `JoyRide.listVehicleOptions()` to discover the available picker IDs and labels. In the Vehicle tab, the grid button beside **Next** shows all vehicles. Selecting one returns to its preview; `dialog.showVehicleNames` controls labels in both views.\n\n### Vehicle handles and snapshots\n\n| Member | Meaning |\n| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |\n| `handle.id` | Stable vehicle identity. |\n| `handle.state` | Deeply readonly `{ id, vehicle, position, speedMps, health, maxHealth, appearance, slots }`. Materials use authored names. |\n| `handle.update(patch)` | Validate the whole candidate before changing it. Recipe switches rebase appearance/slots; option-only patches retain the current vehicle. |\n| `handle.pickupEffect(input)` | Play a contact-centered optical pickup pulse; see Pickup refraction. |\n| `handle.useSlot(number)` | Pulse an assigned slot; returns whether input was accepted. |\n| `handle.startSlot(number)` | Hold an assigned slot; returns whether input was accepted. |\n| `handle.stopSlot(number)` | Release it. |\n| `handle.dispose()` | Remove the vehicle and release held actions; idempotent. |\n\n`VehiclePatch` can edit existing slot options without repeating their action. Supplying a new action requires its complete configuration. Updating a live ID to a different ID is rejected. Handles continue to identify the same vehicle across same-world checkpoint restoration.\n\n### Appearance and automatic contrast\n\n`appearance` is `'auto'`, `'light'`, or `'dark'`. Auto samples the actual ground beneath each car, including translucent layers; explicit values override it. This is independent of the page/UI theme, background styling, and individual light switches. An explicitly disabled headlight stays disabled.\n\n### Slot assignments\n\nSlots are numbered 1–9. The default assignments are oil emission, machine gun, flamethrower, rocket, ghost, attractor, and lightning in slots 1–7. Slots 8–9 are unassigned. `false` disables an assignment. Available assignments keep their authored order, but their keyboard and `useSlot` numbers close gaps when a slot or tool is disabled. A key already held when assignments change must be released before it can activate its new tool. `handle.state.slots` retains the authored assignments.\n\n```ts\nride.player?.update({\n slots: { 1: { action: 'eject', liquid: 'mud', activation: 'hold', rate: 6, amount: 0.65 } },\n});\nride.player?.update({ slots: { 1: { rate: 3 } } });\nride.player?.useSlot(1);\n```\n\n| Field | Values |\n| ------------ | ------------------------------------------------------------------------------------------------------------ |\n| `action` | `'eject'`, `'machineGun'`, `'flamethrower'`, `'rocket'`, `'ghost'`, `'attractor'`, `'lightning'`, `'boost'`. |\n| `activation` | `'tap'` or `'hold'`; default hold. |\n| `liquid` | Required for eject; forbidden for other actions. |\n| `rate` | Eject dose per second while held; positive; default 6. |\n| `amount` | Eject pulse dose; positive; default 0.65. |\n\nLiquid doses are engine units, not litres. The `toolsEnabled` switch and ghost rules apply to player and JS-created vehicles. Tool use and liquid emission are unlimited. Direct `ride.pour` places liquid in the scene. There are no HTML vehicle/weapon-slot attributes.\n\n### Lightning and electrical fields\n\nHold **7** to charge lightning; it fires after 1.1 seconds. Releasing early cancels it. Targets include nearby breakable, burnable, or pushable objects and vehicles, with a preference for targets ahead. The default range is one third of the viewport width; set `lightning.rangeM` for a fixed range or `forwardBias: 0` to target only by distance. Hold to repeat; each discharge keeps its charge time.\n\nA hit halves a vehicle’s current speed and its speed/drive-force limits for four seconds. Another hit refreshes the duration. The shooter and ghost vehicles are excluded, and shocks do not damage vehicle health. Reset and checkpoints include this status.\n\nConfigure a vehicle's optional `lightning` profile in code:\n\n```ts\nconst definitions = JoyRide.define({\n vehicles: {\n electric: {\n base: 'porsche-911-997',\n lightning: {\n rangeM: 10,\n forwardBias: 1.5,\n chargeSeconds: 1.1,\n statusSeconds: 4,\n speedFactor: 0.5,\n impactRadiusM: 1.6,\n damage: 75,\n impulse: 1,\n ignite: true,\n },\n },\n },\n});\n```\n\n`lightningDefaults`, `lightningProfile`, and `LightningProfile` are available from `@joy-ride/engine/vehicles`. Lightning pushes movable targets and respects their damage and burning capabilities. Advanced hosts can import `AreaImpact`, `rocketAreaImpact`, and `rocketImpactDefaults` from `@joy-ride/engine/physics`, and apply them through `SceneGeometry.applyAreaImpact`. Debug view shows the lightning range.\n\nConductive liquid carries lightning to connected objects and vehicles, even beyond the initial range. Dry gaps and nonconductive material stop it. Set `conductive: true` or `false` in a liquid definition to override its base material.\n\nHold **6** to attract loose pieces. A soft electrical field follows its pull radius; existing channels stay in place as the car moves.\n\nA connected strike flashes along its path and fades over 1.5 seconds. Camera shake respects `screenShake`; customize the `lightning` entry in `screenShakeProfiles` to change it.\n\n### Vehicle definition fields\n\nA `VehicleDefinition` is a deep partial of `VehiclePreset` without its engine ID, plus required `base`, optional `appearance`, and `slots`. Inherit a built-in and override only what you need. For image and physics tuning, run `pnpm run vehicle-editor` from the Joy Ride repository. The editor opens separately from the runtime dialog.\n\n| Group | Fields |\n| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Identity | `name`, `description`, `make`, `model`, `year`. |\n| Mass and health | `massKg`, `health`, `frontWeightFraction`. |\n| Geometry | `lengthM`, `widthM`, `wheelbaseM`, `frontAxleXM`, `rearAxleXM`, `trackWidthM`, `frontTrackWidthM`, `rearTrackWidthM`, `tireLengthM`, `tireWidthM`. |\n| Driving | `engineForceN`, `reversePowerRatio`, `maxReverseSpeedMps`, `rollingResistance`, `coastDecelerationMps2`, `handbrakeDecelerationMps2`, `serviceBrakeDecelerationMps2`, `lateralResistance`, `corneringAccelerationMps2`, `maxSteerAngleRad`, `handbrakeStrength`. |\n| `drift` | `entrySpeedMps`, `slipAngleRad`. |\n| `launch` | `minRpm`, `boostMps`, `boostedBoostMps`, `assistDurationSeconds`, `burnoutRampSeconds`, `chargedSpinSeconds`, `fireLifetimeSeconds`. |\n| `driveBoost` | `gainMps`, `durationSeconds`. |\n| `exhaust` / `lights` | Exhaust layout and `headlights`/`taillights` positions `{xM,yM}`. |\n| `roofRocket` | `xM`, `yM`, `sizeM`, `panelColor`. |\n| `machineGuns` | `xM`, `revealM`, `roundsPerSecond`, `bulletSpeedMps`, `bulletLifetimeSeconds`. |\n| `flamethrower` | `rangeM`, `ignitionSeconds`, `spreadSeconds`, `spreadRadiusPx`, `burnSeconds`, `smokePerSecond`, `jetWidthM`, `flowRate`. |\n| `rockets` | `roundsPerSecond`, `launchSpeedMps`, `accelerationMps2`, `maxSpeedMps`, `lifetimeSeconds`, `smokePerSecond`. |\n| `sound` | `engineId`, `vehicleId`, `engineLabel`, `turbo`, `horn`, and electric pedestrian/motor fade ranges. |\n| `visual` | Fallback `color` and shape: `coupe`, `sedan`, `suv`, or `supercar`. |\n| `image` | `src`, normalized `crop`, `scale`, `wheelVisualScale`, `wheelEdgeHalfWidthM`. Nose points right. |\n\n`sound.horn` has `lowHz`, `highHz`, `tone` (`disc`, `trumpet`, `electronic`), and `level`. Electric sound fade fields are `fadeStartMps`, `fadeEndMps`, `motorFadeStartMps`, and `motorFadeEndMps`. Image `crop` has `x`, `y`, `width`, `height` in normalized coordinates; `wheelVisualScale` has `length`, `width`; `wheelEdgeHalfWidthM` has `front`, `rear`. Exhaust layout is `left`, `right`, `center`, or `left-right`. Lamps use mirrored `{xM,yM}` positions.\n\n## Fire and liquids\n\nSet artwork alight, leave a liquid trail, or let the tires pick up and mix paint.\n\n### Fire and explosions\n\nHold **3** to ignite burnable artwork or liquid. Fire spreads to nearby burnable surfaces. Add `combustible` when an element should also have health and explode:\n\n```html\n<h2\n data-jr-burnable\n data-jr-burnable-burn-seconds=\"12\"\n>\n Light this up\n</h2>\n<div\n data-jr-combustible\n>\n Fuel\n</div>\n```\n\nUse `burnable` for text, SVG artwork, or colored HTML surfaces. Use `combustible` for an HTML fuel object. See [Object capabilities](#jr-doc-object-capabilities) for durations, health, and compatibility rules.\n\n### Liquids in HTML\n\n```html\n<div\n data-jr-liquid=\"paint\"\n style=\"background: #5271ff\"\n>\n Take some blue\n</div>\n<div\n data-jr-liquid=\"oil\"\n></div>\n<svg viewBox=\"0 0 100 100\" width=\"100\" height=\"100\">\n <circle\n data-jr-liquid=\"paint\"\n cx=\"50\"\n cy=\"50\"\n r=\"42\"\n fill=\"#e03139\"\n />\n</svg>\n```\n\n```ts\nride.bind('.paint-pad', { liquid: { kind: 'paint', color: '#5271ff', distanceM: 30 } });\n```\n\n| JS option | HTML attribute | Meaning |\n| ------------- | ---------------------------- | ----------------------------------------------------------------------------- |\n| `kind` | `data-jr-liquid` | Any built-in or defined liquid recipe, such as `oil`, `water`, or `paint`. |\n| `color` | `data-jr-liquid-color` | Six-digit hex, JS RGB tuple, or `'auto'`; defaults to the CSS fill or recipe. |\n| `distanceM` | `data-jr-liquid-distance-m` | Nonnegative tire carry distance. |\n| `opacity` | `data-jr-liquid-opacity` | 0…1, multiplied by the recipe's opacity. |\n| `deformation` | `data-jr-liquid-deformation` | 0…4. |\n\nLiquids inherit their recipe’s handling, fire, and electrical properties. HTML liquids follow the element’s border, rounded corners, and transforms; SVG liquids follow the filled shape and supported clip paths. Tire contact can deform either without adding volume. Text and other HTML content stay above the liquid.\n\nWith `game.autoPaint: true`, eligible colored HTML backgrounds and SVG fills become paint. Named colors, HSL, OKLCH, and Display P3 are supported. Neutral colors, pale tints, and nearly black backgrounds stay unchanged. Use `data-jr-auto-paint=\"false\"` on an element or ancestor to exclude it. Unsupported SVG masks and clips remain ordinary artwork. Paint mixes with tire pigment. Use `ride.pour` or an emitter for liquid placed independently of an element.\n\n### Liquid definitions\n\nBuilt-ins include `oil`, `water`, `mud`, `paint`, `iridescent-oil`, `clear-water`, `wet-clay`, and experimental `concept-water`, `concept-oil`, `concept-syrup`, `concept-clay`, `concept-lava`, `concept-acid`, and `concept-paint`.\n\n| Field | Meaning |\n| --------------- | ----------------------------------------------------------------------------------------- |\n| `base` | Existing built-in or catalog liquid name. |\n| `color` | Six-digit hex or RGB tuple, 0…255 channels. |\n| `thickness` | Material thickness, 0…1. |\n| `deformation` | Tire-driven outline deformation, 0…4. |\n| `opacity` | Material opacity, 0…1. |\n| `burnLifetime` | Positive seconds of fuel at an ignited location. |\n| `conductive` | Boolean; inherit the base material. Water conducts; oil, paint and mud do not by default. |\n| `burnable` | Boolean; inherit the base material. Oil burns; water, paint and mud do not by default. |\n| `fireSpreadMps` | Positive connected-surface fire-front speed. |\n| `effect` | Optional status-effect definition refreshed on wheel contact. |\n\n`burnable` and `conductive` are independent and inherit from the base liquid. For example, `{ base: 'paint', burnable: true, conductive: true, burnLifetime: 8 }` both burns and carries electricity; `{ base: 'oil', burnable: false }` keeps oil's handling without catching fire. Flames, explosions, lightning heat, and connected fire spread all respect `burnable`. Newly burnable materials default to 12 seconds of fuel and 3.2 metres/second of fire spread unless overridden.\n\nBurning text, SVG artwork, painted HTML boxes, combustible objects, and burnable liquid can ignite nearby materials. Text and SVG spread through neighboring ink, liquids spread through connected wet cells, and combustible objects follow their health and explosion lifecycle. Heat crosses between those materials at nearby burning points; the same scene-fire renderer draws their flames and smoke. A colored element with `data-jr-burnable` burns as a surface; add `data-jr-combustible` when it should also have health and an explosion.\n\nAn effect specifies `lifetime` and `modifiers`, with optional `additiveModifiers` and `intensity: 'linear' | 'pulse' | 'constant'`. Lifetime uses `{ unit: 'seconds' | 'distanceM', amount }`; modifiers are factors such as grip, speed, or drive force. Additive modifiers apply finite stat changes. `StatusEffectDefinition` is exported from `@joy-ride/engine`.\n\n### Pouring liquid\n\n```ts\nride.pour('ink', { at: document.querySelector('#paint-zone')!, amount: 24 });\nride.pour('water', { at: { xPx: 300, yPx: 500 }, amount: 12 });\n```\n\n`ride.pour(liquid, {at, amount?, color?})` resolves a catalog liquid, converts document placement, and deposits it. `at` accepts the same `PageTarget` as vehicle spawning and entry. Amount must be finite and positive, default 24. `color` is an optional pigment override. Slots can emit the same liquid by its authored name. No HTML liquid fixture is required.\n\n## Objectives and points\n\nObjectives describe what to accomplish. Zones define where pickups, parking, checkpoints, and page interactions happen. Use either on its own, or combine zones into an objective.\n\n### Trigger presets\n\n```html\n<button\n data-jr-trigger=\"click\"\n>\n Click on arrival\n</button>\n<input\n type=\"checkbox\"\n data-jr-trigger=\"check\"\n/>\n<span\n data-jr-trigger=\"pickup\"\n data-jr-trigger-event=\"pickup-collected\"\n>\n ●\n</span>\n<div\n data-jr-trigger=\"parking\"\n data-jr-trigger-dwell-seconds=\"0.6\"\n>\n Park here\n</div>\n```\n\nAn empty trigger emits arrival events. `click` invokes native activation; `check` checks a checkbox/switch; `toggle` toggles it. `pickup` consumes once per scene. `parking` requires stopping for 0.45 seconds at at most 0.25 m/s with centre containment. Any ordinary HTML element can be the zone; the action target can be separate. Disabled targets are respected.\n\n### Pickup refraction\n\nAdd a color to make a pickup send a brief ripple through the car. Add `points` for a score reward; either option works on its own.\n\n```html\n<span\n data-jr-trigger=\"pickup\"\n data-jr-points=\"25\"\n data-jr-pickup-effect-color=\"#349dff\"\n>\n ✦\n</span>\n```\n\nThe JavaScript binding is `{ trigger: 'pickup', points: 25, pickupEffectColor: '#349dff' }`. Colors accept any six-digit hex or a JavaScript RGB tuple. Show the shared score with a HUD readout:\n\n```html\n<output\n data-jr-hud=\"points\"\n>\n 0\n</output>\n```\n\nRewards follow pickup repeat/consumption rules; reset restores pickups and clears points.\n\nThe ripple begins where the pickup touches the vehicle’s painted body. Its direction and speed account for driving, drifting, rotation, and moving pickups. It fades in 0.28–0.38 seconds and leaves a short trail of small colored particles. This is a visual effect; handling, health, and weapons stay unchanged.\n\nYou can also trigger it directly:\n\n```ts\nride.player?.pickupEffect({\n color: '#349dff',\n origin: { x: 0.45, y: 0.1 },\n angle: Math.PI,\n velocity: 22,\n});\n```\n\n| Input | Meaning |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `color` | Six-digit hex or RGB tuple. |\n| `origin` | Optional contact in body coordinates: each axis spans −0.5 to 0.5; +X is the nose and +Y is left. Omit to derive entry from the path. |\n| `angle` | Pickup travel direction through the body in radians: 0 toward the nose, π/2 left, π rearward. A stationary pickup moves rearward relative to a car driving forward. |\n| `velocity` | Relative contact speed in metres per second. |\n\nEach pickup gets a slightly different distortion pattern. Up to three colors can overlap. Reset and vehicle replacement clear the effect; checkpoints restore it and its particles. The effect requires WebGL2; the normal car still draws without it. Custom images need same-origin or CORS-enabled access.\n\n### Trigger options and attributes\n\nThe JS shape is `{ trigger: true | false | preset | options }`.\n\n| JS option | HTML attribute | Values / default |\n| -------------- | -------------------------------- | ------------------------------------------------------------------- |\n| `preset` | `data-jr-trigger-preset` | `click`, `check`, `toggle`, `pickup`, or `parking`. |\n| `when` | `data-jr-trigger-when` | `'enter'` (default) or `'stop'`. |\n| `dwellSeconds` | `data-jr-trigger-dwell-seconds` | Nonnegative stopped dwell. |\n| `maxSpeedMps` | `data-jr-trigger-max-speed-mps` | Nonnegative speed threshold. |\n| `action` | `data-jr-trigger-action` | `'event'` (default), `'click'`, `'check'`, `'uncheck'`, `'toggle'`. |\n| `event` | `data-jr-trigger-event` | Additional application event name. |\n| `repeat` | `data-jr-trigger-repeat` | `'visit'` (default), `'vehicle'`, `'scene'`. |\n| `vehicles` | `data-jr-trigger-vehicles` | `'player'` (default) or `'all'`. |\n| `target` | `data-jr-trigger-target` | Selector resolving exactly one action target in the document. |\n| `consume` | `data-jr-trigger-consume` | Boolean; hide after qualification and restore on reset. |\n| `exitMarginPx` | `data-jr-trigger-exit-margin-px` | Nonnegative rearm margin. |\n| `containment` | `data-jr-trigger-containment` | `'overlap'`, `'center'`, `'full'`. |\n| `requireExit` | `data-jr-trigger-require-exit` | Boolean; require departure before qualification. |\n| `suspended` | `data-jr-trigger-suspended` | Boolean; suspend progression. |\n| `reveal` | `data-jr-trigger-reveal` | `'departed'`; reveal after departure. |\n\nThe root `data-jr-trigger` attribute accepts the same preset names.\n\nStyle a zone’s entered, waiting, and completed states with optional CSS classes. The same options work in HTML or JavaScript:\n\n```html\n<div\n data-jr-trigger=\"parking\"\n data-jr-trigger-entered-class=\"is-entered\"\n data-jr-trigger-dwelling-class=\"is-dwelling\"\n data-jr-trigger-success-class=\"is-success\"\n>\n Park here\n</div>\n```\n\n```ts\nride.bind('.parking-spot', {\n trigger: {\n preset: 'parking',\n enteredClass: 'is-entered',\n dwellingClass: 'is-dwelling',\n successClass: 'is-success',\n },\n});\n```\n\n| JS option | HTML attribute | Values / default |\n| --------------- | -------------------------------- | --------------------------------------------------------------------------- |\n| `enteredClass` | `data-jr-trigger-entered-class` | Optional class tokens while inside, before qualification. |\n| `dwellingClass` | `data-jr-trigger-dwelling-class` | Optional class tokens while accumulating stopped dwell. |\n| `successClass` | `data-jr-trigger-success-class` | Optional class tokens after an accepted action or completed objective step. |\n\n`TriggerPhase` is `idle`, `entered`, `dwelling`, or `success`. Parking follows entered → dwelling → success. Moving interrupts the wait; paused time does not count toward it. Pass-through zones skip dwelling. Blocked objective steps and disabled targets cannot succeed.\n\nOnly classes for the current phase are applied. No classes are added by default; an empty string clears an option. Other classes are preserved. Reset, unbind, disable, and disposal restore the original classes. Restoring a checkpoint restores appearance without repeating actions.\n\nSuccess stays visible after leaving. A repeat-per-visit trigger rearms on the next visit; completed steps and once-per-vehicle/scene triggers stay complete until reset. With several vehicles, success takes display priority over dwelling, then entered. Events report each vehicle’s own phase.\n\nRead-only presentation markers `data-jr-trigger-state` (`idle`, `entered`, `dwelling`, `success`) and `data-jr-trigger-departed` expose interaction state for host styling. They are engine outputs, not configuration layers. `joyride:trigger:change` includes `state.phase`; `trigger:enter` reports entered and `trigger:qualify` reports success.\n\n### Parking and stop points\n\nAdd `points` / `data-jr-points` to award points after parking or a `when: 'stop'` trigger succeeds. Speed, containment, dwell, step order, and action acceptance still apply. Arriving or staying parked earns no extra points. Omit the option or use `0` for an unscored zone.\n\n```html\n<div\n data-jr-trigger=\"parking\"\n data-jr-points=\"50\"\n>\n Park here\n</div>\n<div\n data-jr-trigger\n data-jr-trigger-when=\"stop\"\n data-jr-trigger-dwell-seconds=\"1\"\n data-jr-points=\"25\"\n>\n Stop here\n</div>\n```\n\n```ts\nride.bind('.parking-spot', { trigger: 'parking', points: 50 });\nride.bind('.stop-zone', { trigger: { when: 'stop', dwellSeconds: 1 }, points: 25 });\n```\n\nThe repeat rule controls rewards: `visit` allows another after leaving and returning; `vehicle` and `scene` limit them until reset. Checkpoints restore the score without repeating rewards. Entry, click, check, and toggle triggers do not award points.\n\n### Objectives\n\nAn objective tracks a goal and reports progress until it completes. It observes gameplay; points come from pickups, destruction, or stop zones.\n\n| Goal | JavaScript | Complete when |\n| ------------------- | ------------------------------------- | ---------------------------------------------------------------------- |\n| Collect pickups | `{ type: 'collect', count: 3 }` | Three distinct pickups are collected. |\n| Crush targets | `{ type: 'crush', count: 3 }` | Three distinct objects are crushed. |\n| Break targets | `{ type: 'break', count: 3 }` | Three distinct objects break. Burning out does not count as breaking. |\n| Ignite targets | `{ type: 'ignite', count: 3 }` | Three distinct objects ignite. |\n| Reach a score | `{ type: 'score', points: 100 }` | The shared score reaches 100. Here `points` is the goal, not a reward. |\n| Complete zone steps | `{ steps: ['checkpoint', 'garage'] }` | The named zones qualify in the chosen order. |\n\n```ts\nconst supplies = ride.objective('supplies', { type: 'collect', count: 3 });\nride.objective('clear-the-road', { type: 'crush', count: 2 });\nride.objective('break-the-signs', {\n type: 'break',\n count: 2,\n targets: ['sign-a', 'sign-b'],\n});\nride.objective('light-the-targets', { type: 'ignite', count: 3 });\nride.objective('high-score', { type: 'score', points: 100 });\n\nride.on('objective:progress', ({ objective }) => {\n console.log(objective.id, objective.current, objective.target);\n});\nride.on('objective:complete', ({ objective }) => celebrate(objective.id));\n\nconsole.log(supplies.state);\nsupplies.reset();\nsupplies.dispose();\n```\n\n`count` is a positive whole number. Each object counts once, and disabled objects are ignored. Use `targets` to limit a goal to stable object IDs; omit it to accept any matching object. The count cannot exceed the number of listed targets.\n\n`progress` defaults to `scene`, sharing progress across vehicles. Use `progress: 'vehicle'` for separate pickup/target counters or zone steps per vehicle; events without a vehicle do not advance vehicle-specific counters. Score goals always use the shared scene score. Optional `event` names an additional completion event.\n\n`ObjectiveHandle` provides `id`, readonly `state` rows `{ vehicleId, current, target, complete }`, `reset()`, and `dispose()`. Shared progress uses `vehicleId: 'scene'`. Completion lasts until reset. `ride.reset()` resets every objective; checkpoints restore progress without repeating events. `dispose()` removes the objective.\n\n### Objectives in HTML\n\n```html\n<section\n data-jr-objective=\"supplies\"\n data-jr-objective-type=\"collect\"\n data-jr-objective-count=\"3\"\n>\n Collect three pickups\n</section>\n<section\n data-jr-objective=\"high-score\"\n data-jr-objective-type=\"score\"\n data-jr-objective-points=\"100\"\n>\n Reach 100 points\n</section>\n```\n\nThe element supplies the objective's name and goal. Style it yourself; use `objective:progress` to update your progress display. Definitions and portable configuration also accept an `objectives` map containing the same specs.\n\n| Attribute | Meaning |\n| ---------------------------- | ---------------------------------------------------------------------------------- |\n| `data-jr-objective` | Unique objective ID. |\n| `data-jr-objective-type` | `collect`, `crush`, `break`, `ignite`, or `score`. Omit for a group of zone steps. |\n| `data-jr-objective-count` | Number of distinct pickups or targets required. |\n| `data-jr-objective-points` | Shared score required by a score goal. |\n| `data-jr-objective-targets` | Optional space-separated object IDs for a pickup/target goal. |\n| `data-jr-objective-order` | `ordered` (default) or `any`, for zone steps. |\n| `data-jr-objective-progress` | `scene` (default) or `vehicle`; score goals use `scene`. |\n| `data-jr-objective-event` | Optional additional completion event name. |\n\n### Zone steps\n\nGroup checkpoints, parking spots, pickups, or page interactions when they form one objective:\n\n```html\n<section\n data-jr-objective=\"delivery\"\n data-jr-objective-order=\"ordered\"\n>\n <div\n data-jr-id=\"collect\"\n data-jr-trigger=\"parking\"\n >\n Collect\n </div>\n <div\n data-jr-id=\"deliver\"\n data-jr-trigger=\"parking\"\n >\n Deliver\n </div>\n</section>\n```\n\nWithout an objective type, descendant triggers become the steps, excluding nested objectives. Ordered steps qualify in sequence; `any` allows any order and requires every distinct step. A standalone zone works without an objective wrapper.\n\n```ts\nconst delivery = ride.objective('delivery', {\n order: 'ordered',\n steps: ['collect', { target: 'deliver', when: 'stop', dwellSeconds: 0.6 }],\n});\n```\n\nEach step is an object ID or `{ target, when?, dwellSeconds?, maxSpeedMps? }`. Conditions default to the zone's own configuration. Missing or disabled steps pause progress. Active objectives retain their step membership until reset or reconfiguration. Paused/hidden time does not contribute stopped dwell.\n\n### Zone sequences\n\nUse an objective with `steps` to group zone visits into a goal. For a standalone named sequence, `ride.route(id, spec)` accepts `RouteSpec` and returns a `PlaygroundRouteHandle`. Sequences can also be defined with `definitions.routes`, mount `routes`, or `data-jr-route` with `data-jr-route-order`, `data-jr-route-progress`, and `data-jr-route-event`. They emit `route:progress`, `route:complete`, and the corresponding objective events.\n\n## Settings\n\nPass `game` and `dialog` directly to `JoyRide.mount()`: `game` controls the toy, including visuals, sound, and performance; `dialog` controls its interface.\n\n### Updating options\n\n```ts\nride.updateSettings({\n game: { masterVolume: 0.5, quality: 'medium', headlights: true, viewportWalls: false },\n});\nconsole.log(ride.settings.game.masterVolume);\n```\n\nUse the same two sections directly under `mount({ game: { ... }, dialog: { ... } })`: `game` for behavior, visuals, and performance, and `dialog` for the embedded UI. Updates merge by group and validate before commit. Definitions, initial bindings, and player creation do not belong in mutable runtime settings.\n\n### Quality and appearance\n\nQuality defaults to `high`. Changing `game.quality` updates smoke, ghost vapor, fire, and liquids, including active effects.\n\n`game.surfaceTone` controls tire-mark contrast; each vehicle's `appearance` controls its body contrast. Both can adapt automatically to the page beneath the car. Smoke uses its natural color, and ghost mode uses the phantom appearance.\n\n### Tools\n\n`game.toolsEnabled` enables or disables all tools, including boost. Tool use is unlimited. Tool IDs are `eject`, `machineGun`, `flamethrower`, `rocket`, `ghost`, `attractor`, `lightning`, and `boost`. See [Slot assignments](#jr-doc-slot-assignments) to assign them to a vehicle.\n\n### Accent and dialog font\n\nSet the dialog accent and font independently of the vehicle glow:\n\n```ts\nJoyRide.mount({\n dialog: { accentColor: '#e8c344', dialogFontFamily: 'inherit' },\n game: { underglow: '#66e6ff' },\n});\n```\n\n`dialogFontFamily: 'inherit'` uses the page body's computed font. You can also supply a CSS `font-family` value such as `'\"My Font\", sans-serif'`, or set it without JavaScript:\n\n```css\n:root {\n --jr-dialog-font-family: 'My Font', sans-serif;\n}\n```\n\nThe font must already be loaded on the page. An explicit `dialogFontFamily` overrides the CSS variable. Script attributes override mount JSON. `accentColor` styles the dialog. Set `game.underglow` independently for the vehicle glow.\n\n### Settings access\n\nThe vehicle dialog has one Settings tab for visuals, sound, performance, and rules. To hide it:\n\n```ts\nJoyRide.mount({\n dialog: { showGameSettings: false },\n});\n```\n\nVehicle switching, reset, driving, and enabled tools remain available. Host code can still update game settings with `ride.updateSettings()`.\n\nThe embed editor has a separate **Dialog** section for branding, theme, visible tabs, and settings access. The following reference is generated from the shared option catalog.\n\n<!-- options:start -->\n\n### All options\n\nEvery shared setting is shown below with its default. Omit settings you do not need. Click a property name to jump to its reference. `undefined` leaves optional styling unset; `hint: false` keeps the hint off.\n\n```js\nJoyRide.mount({\n // Game settings.\n game: {\n // Set the master audio volume.\n masterVolume: 1,\n\n // Play engine audio while the vehicle is idle.\n idleSound: true,\n\n // Choose the rendering quality for smoke, fire, and liquids.\n quality: \"high\",\n\n // Show smoke from the tires.\n tireSmoke: true,\n\n // Draw shadows beneath vehicles.\n vehicleShadows: true,\n\n // Show sparks when vehicles collide.\n sparks: true,\n\n // Visual body deformation from collisions.\n deform: true,\n\n // Shake the view during impacts and tool effects.\n screenShake: true,\n\n // Adapt tire marks to light or dark page backgrounds.\n surfaceTone: \"auto\",\n\n // Show renderer diagnostics.\n debug: false,\n\n // Show vehicle health bars.\n showHealthBars: true,\n\n // Point toward vehicles outside the view.\n showVehicleMarkers: true,\n\n // Set a six-digit hex glow color, or leave unset to disable it.\n underglow: undefined,\n\n // Set the strength of the underglow.\n underglowOpacity: 0.6,\n\n // Enable the front lights.\n headlights: true,\n\n // Enable the rear lights.\n taillights: true,\n\n // Brighten the rear lights while braking.\n brakeLights: true,\n\n // Allow vehicles to take damage.\n vehicleDestructible: true,\n\n // Enable or disable all vehicle tools, including boost.\n toolsEnabled: true,\n\n // Keep vehicles inside the visible screen.\n viewportWalls: true,\n\n // Turn small colored page elements into paint.\n autoPaint: false,\n\n // Show quick controls when hovering over the vehicle.\n showToolbar: true,\n\n // Show a hint after arrival, or false to keep it hidden.\n hint: false,\n\n },\n\n // Dialog settings.\n dialog: {\n // Show the driving controls on touch devices.\n showTouchControls: true,\n\n // Match the page theme or choose light or dark.\n dialogTheme: \"auto\",\n\n // Show the settings tab. Vehicle switching, driving, and reset stay available when off.\n showGameSettings: true,\n\n // Choose which tabs appear in the vehicle dialog.\n vehicleTabs: [\"vehicle\",\"objects\",\"weapons\",\"controls\",\"settings\",\"embed\",\"documentation\"],\n\n // Show the Joy Ride logo in the dialog.\n showLogo: true,\n\n // Show the GitHub link in the dialog.\n showGithub: true,\n\n // Set the dialog accent using six-digit hex.\n accentColor: undefined,\n\n // Set a CSS font family; inherit uses the page font.\n dialogFontFamily: undefined,\n\n // Show vehicle names in the dialog.\n showVehicleNames: true,\n\n },\n\n});\n```\n\n### Game settings\n\n| Option | Default | Meaning |\n| --------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------- |\n| [`game.masterVolume`](#jr-doc-option-game-mastervolume) | `1` | Set the master audio volume. 0–1. |\n| [`game.idleSound`](#jr-doc-option-game-idlesound) | `true` | Play engine audio while the vehicle is idle. |\n| [`game.quality`](#jr-doc-option-game-quality) | `\"high\"` | Choose the rendering quality for smoke, fire, and liquids. `high`, `medium`, `low`. |\n| [`game.tireSmoke`](#jr-doc-option-game-tiresmoke) | `true` | Show smoke from the tires. |\n| [`game.vehicleShadows`](#jr-doc-option-game-vehicleshadows) | `true` | Draw shadows beneath vehicles. |\n| [`game.sparks`](#jr-doc-option-game-sparks) | `true` | Show sparks when vehicles collide. |\n| [`game.deform`](#jr-doc-option-game-deform) | `true` | Visual body deformation from collisions. |\n| [`game.screenShake`](#jr-doc-option-game-screenshake) | `true` | Shake the view during impacts and tool effects. |\n| [`game.surfaceTone`](#jr-doc-option-game-surfacetone) | `\"auto\"` | Adapt tire marks to light or dark page backgrounds. `auto`, `light`, `dark`. |\n| [`game.debug`](#jr-doc-option-game-debug) | `false` | Show renderer diagnostics. |\n| [`game.showHealthBars`](#jr-doc-option-game-showhealthbars) | `true` | Show vehicle health bars. |\n| [`game.showVehicleMarkers`](#jr-doc-option-game-showvehiclemarkers) | `true` | Point toward vehicles outside the view. |\n| [`game.underglow`](#jr-doc-option-game-underglow) | Unset | Set a six-digit hex glow color, or leave unset to disable it. |\n| [`game.underglowOpacity`](#jr-doc-option-game-underglowopacity) | `0.6` | Set the strength of the underglow. 0–1. |\n| [`game.headlights`](#jr-doc-option-game-headlights) | `true` | Enable the front lights. |\n| [`game.taillights`](#jr-doc-option-game-taillights) | `true` | Enable the rear lights. |\n| [`game.brakeLights`](#jr-doc-option-game-brakelights) | `true` | Brighten the rear lights while braking. |\n| [`game.vehicleDestructible`](#jr-doc-option-game-vehicledestructible) | `true` | Allow vehicles to take damage. |\n| [`game.toolsEnabled`](#jr-doc-option-game-toolsenabled) | `true` | Enable or disable all vehicle tools, including boost. |\n| [`game.viewportWalls`](#jr-doc-option-game-viewportwalls) | `true` | Keep vehicles inside the visible screen. |\n| [`game.autoPaint`](#jr-doc-option-game-autopaint) | `false` | Turn small colored page elements into paint. |\n| [`game.showToolbar`](#jr-doc-option-game-showtoolbar) | `true` | Show quick controls when hovering over the vehicle. |\n| [`game.hint`](#jr-doc-option-game-hint) | `false` | Show a hint after arrival, or false to keep it hidden. |\n\n### Dialog settings\n\n| Option | Default | Meaning |\n| --------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------- |\n| [`dialog.showTouchControls`](#jr-doc-option-dialog-showtouchcontrols) | `true` | Show the driving controls on touch devices. |\n| [`dialog.dialogTheme`](#jr-doc-option-dialog-dialogtheme) | `\"auto\"` | Match the page theme or choose light or dark. `auto`, `light`, `dark`. |\n| [`dialog.showGameSettings`](#jr-doc-option-dialog-showgamesettings) | `true` | Show the settings tab. Vehicle switching, driving, and reset stay available when off. |\n| [`dialog.vehicleTabs`](#jr-doc-option-dialog-vehicletabs) | All tabs | Choose which tabs appear in the vehicle dialog. |\n| [`dialog.showLogo`](#jr-doc-option-dialog-showlogo) | `true` | Show the Joy Ride logo in the dialog. |\n| [`dialog.showGithub`](#jr-doc-option-dialog-showgithub) | `true` | Show the GitHub link in the dialog. |\n| [`dialog.accentColor`](#jr-doc-option-dialog-accentcolor) | Unset | Set the dialog accent using six-digit hex. |\n| [`dialog.dialogFontFamily`](#jr-doc-option-dialog-dialogfontfamily) | Unset | Set a CSS font family; inherit uses the page font. |\n| [`dialog.showVehicleNames`](#jr-doc-option-dialog-showvehiclenames) | `true` | Show vehicle names in the dialog. |\n\n<!-- options:end -->\n\n### Safe-for-work preset and dialog tabs\n\n```ts\nconst ride = JoyRide.mount(\n JoyRide.getMountPreset('sfw', {\n game: { autoPaint: true },\n player: { vehicle: 'electric-gt' },\n }),\n);\n```\n\nThe preset keeps Vehicle and Controls visible, hides Settings, branding, and vehicle names, and disables vehicle destruction, tools, deformation, and sparks. Driving and slow motion remain available. It returns mount options; your `game` and `dialog` values override its defaults.\n\nUse `dialog.vehicleTabs` to choose dialog tabs: `vehicle`, `objects`, `weapons`, `controls`, `settings`, `embed`, and `documentation`. The Tools tab uses `weapons`; Settings uses `settings`. `dialog.showGameSettings: false` hides Settings even when it is listed.\n\n## Everything else\n\nThe smaller details: keyboard controls, lights, sound, slow motion, and the hint beside the vehicle.\n\n### Keyboard controls\n\nThese are the default bindings. Number keys 1–9 activate assigned tools. `JoyRide.keyboardControls` supplies the labels and physical key codes for host-owned controls help.\n\n### Lights and sound\n\nUse `game.headlights`, `game.taillights`, and `game.brakeLights` to control the lamps. Set `game.underglow` to a six-digit hex color, or leave it `undefined` to disable the glow; `game.underglowOpacity` sets its strength from 0 to 1.\n\nPress **H** to honk. `game.masterVolume` sets the volume from 0 to 1; `game.idleSound` controls engine sound while parked. Browsers require a user gesture before audio can start. See [Settings](#jr-doc-settings) for all defaults.\n\n### Slow motion\n\nHold **V** for slow motion and release to return to normal speed. Defaults are half speed, a 300 ms transition, and no extra zoom. Sounds slow down with the action; input remains responsive.\n\nFrom the browser controller:\n\n```ts\nawait ride.setSlowMo(true, {\n speedFactor: 0.5,\n rampMs: 300,\n zoomFactor: 1.1,\n curve: 'ease-in-out',\n});\nawait ride.setSlowMo(false);\n```\n\nReact refs, browser session handles, and `CanvasWorld` also expose `setSlowMo(active, options)`. Custom engine hosts can use `world.slowMo.start()` / `stop()` and advance time through `world.advanceTime()`.\n\n`speedFactor` is greater than 0 and at most 1; `rampMs` is nonnegative; `zoomFactor` is 0–4, with 0 disabling extra zoom. Curves are `linear`, `ease-in`, `ease-out`, and `ease-in-out`. Options persist. Changes begin a new transition from the current speed and zoom. Pausing freezes it; losing focus releases the keyboard action.\n\n### Vehicle hint\n\nThe vehicle hint is off by default. To show one after arrival, configure it under `game`:\n\n```ts\nJoyRide.mount({\n game: {\n hint: {\n // Text shown beside the vehicle.\n text: 'Drive with WASD',\n // Wait this many milliseconds after arrival.\n showAfter: 1500,\n // Place the hint above, below, left, or right.\n placement: 'top',\n // Hide the hint on click or when the vehicle moves.\n dismiss: 'click',\n },\n },\n});\n```\n\n`placement` accepts `top`, `bottom`, `left`, or `right`. `dismiss` accepts `move` or `click` (the car click). `showAfter` is milliseconds after arrival; the default is `1000` when a hint is enabled. The hint is DOM text with no pointer events, so it scrolls with the page and does not block controls.\n\n## JavaScript API\n\nMount a ride, bind page elements, and control it from your application. Use `await ride.ready` before sending world commands.\n\nThe root and `/react` entries expose the same named imperative functions and\ntypes. `mount`, `define`, `getMountPreset`, `listVehiclePresets`, `listVehicleOptions`,\n`getVehiclePreset`, `availableVehicleTools`, `keyboardControls`, `overlayLayers`,\nand `overlayZIndex` can be imported directly. `vehicleTools` and the\n`publicDataAttributes`, `publicDataAttributeNames`, and `publicDataAttributePrefixes`\ncatalogs are also named exports. `getActive()` returns the same value as the\ndefault API's `JoyRide.active` getter. Prefer named utility imports when the\nmounting runtime is not needed; they let the consuming bundler omit unused code.\n\nThe examples below use the default `JoyRide` API object where several operations\nare needed. Named functions and the default object share one runtime within the\nchosen integration.\n\n### Mount options\n\n`JoyRide.mount(options?: MountOptions | PlaygroundConfiguration): RideController` starts the browser host. It also accepts a parsed, versioned configuration returned by `ride.exportConfiguration()`.\n\n| Option | Meaning |\n| ------------- | ----------------------------------------------------------------------------------------------------------------------------------- |\n| `audioSet` | Audio sample folder; missing effects fall back to the default set. |\n| `persist` | `{ vehicle?: boolean, audio?: boolean }`; both default to `true`. Saved preferences take precedence over configured initial values. |\n| `definitions` | Optional catalog of `objects`, `liquids`, `vehicles`, and `objectives`. |\n| `player` | Initial `{ vehicle, appearance?, slots? }`. Player identity is managed by the runtime. |\n| `bindings` | Initial array of `{ target: selector, spec: ObjectPatch }`. |\n| `objectives` | Objective ID → `ObjectiveSpec` map, in addition to definitions or HTML objectives. IDs must be unique. |\n| `routes` | Optional named sequences of zone stops. Prefer `objectives` for gameplay goals. |\n| `game` | Toy behavior, visuals, sound, performance, lights, and hint. See [Settings](#jr-doc-settings). |\n| `dialog` | Interface theme, labels, tabs, touch controls, and settings access. |\n| `entry` | Initial player entrance with `target: PageTarget`; overrides a `data-jr-entry` marker. |\n| `host` | Host presentation overrides listed below. |\n\n`host.foregroundSelector` keeps matching host UI above the effects overlay. `host.screenShakeProfiles` overrides shake behavior. `host.canPlaceManually` enables placement and dragging. `host.shadowDom` defaults to `true`.\n\n`game`, `dialog`, and an entry with a selector or `{xPx,yPx}` target are portable. `host` presentation overrides and DOM element entry targets cause a strict export error; see Saving and sharing. Unknown mount properties fail rather than being ignored.\n\n### Script tag options\n\nThe CDN embed registers `window.JoyRide`. The `data-jr-mount` attribute mounts it automatically and accepts JSON options, for example `data-jr-mount='{\"game\":{\"autoPaint\":true}}'`. Use `data-jr-mount=\"false\"` to load the API without mounting.\n\n- **Preset:** `data-jr-mount-preset=\"sfw\"` applies safe-for-work defaults. It needs `data-jr-mount`; JSON options override the preset.\n- **Appearance:** `data-jr-dialog-theme=\"light\"` or `\"dark\"`, `data-jr-accent-color=\"#e8c344\"`, and `data-jr-dialog-font-family=\"inherit\"` override the same options in JSON.\n- **Saved preferences:** The selected vehicle and user-changed audio settings persist on this origin. Set `data-jr-persist-vehicle=\"false\"` or `data-jr-persist-audio=\"false\"` to disable either. The equivalent mount option is `persist: { vehicle: false, audio: false }`. Script attributes take precedence.\n- **Client-side routing:** `data-jr-unmount=\"route remove\"` disposes on URL changes and script removal. Use either word alone for one behavior. A newly inserted script mounts again; an empty attribute enables both behaviors.\n- **Arrival target:** The first `data-jr-entry` element becomes the initial destination. Add `data-jr-entry-delay-ms=\"1000\"` to wait before the skid. `mount({ entry: { target: '#parking' } })` takes precedence. Without a target, the car enters near the viewport center.\n\nThe entry marker also accepts `data-jr-entry-angle-rad`, `data-jr-entry-distance-px`, `data-jr-entry-fade-fraction`, `data-jr-entry-steer`, and `data-jr-entry-speed-mps`. Leave these out to use the vehicle's calculated entrance. After arriving, the untouched car follows the marker if page layout moves it; driving or clicking the car ends this attachment. A hidden or offscreen marker falls back to the center entrance; call `ride.enterAt(...)` later to enter somewhere else.\n\n### Controller properties\n\n| Property | Value |\n| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `ride.ready` | `Promise<RideController>` resolving after player configuration and initial setup. |\n| `ride.player` | The player `VehicleHandle`, or `null` before readiness, after player removal, or after disposal. |\n| `ride.state` | Readonly `{ playerId, focusVehicleId, player, points }`, or `null` before readiness/after disposal. Focus and player ownership are separate. |\n| `ride.settings` | Deeply readonly grouped `RuntimeOptions` snapshot. |\n\nUse `ride.getVehicle(id)` for a specific vehicle; it returns a handle or `null`. The player handle remains separate from other spawned vehicles.\n\n### Controller methods\n\n| Method | Return and behaviour |\n| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `ride.bind(target, spec)` | A `PlaygroundBinding`; target is a selector, Element, or iterable of Elements. Page objects only. |\n| `ride.inspect(element)` | A readonly object snapshot or `null` for an Element. |\n| `ride.inspectById(id)` | A readonly object snapshot or `null` for a stable `data-jr-id`. |\n| `ride.on(event, listener)` | An unsubscribe function. Events and custom typing are covered in Events and HUD. |\n| `ride.spawnVehicle(options)` | A new `VehicleHandle`; see Vehicles and tools. |\n| `ride.pour(liquid, options)` | Deposit simulated liquid; see Fire and liquids. |\n| `ride.objective(id, spec)` | An `ObjectiveHandle`; see Objectives and points. |\n| `ride.updateSettings(patch)` | Validate and merge grouped runtime options. Invalid updates leave working options intact. |\n| `ride.reset()` | Restore artwork, paint, pickups, trigger classes, native controls and vehicle health; clear effects/points and objective progress. Retains vehicle placement and authored configuration. Emits `reset` for application-owned state. |\n| `ride.exportConfiguration()` | A readonly portable configuration, or a typed dependency error. |\n| `ride.openConfigure()` | Open the settings dialog; returns whether an anchor was available. |\n| `ride.startAudio()` | `Promise<void>` requesting audio startup. |\n| `ride.getCarAnchor()` | Painted car bounds `{ x, y, width, height }` in document pixels, or `null`. |\n| `ride.enterAt(options)` | `Promise<'completed' \\| 'interrupted' \\| 'unavailable'>`; fade in an already moving player car and handbrake near an element or document point. See the arrival example below. |\n| `ride.dispose()` | Release the mounted host; safe to call repeatedly. |\n\n### Global helpers\n\nThe default module export and `window.JoyRide` expose the same object.\n\n| Helper | Purpose |\n| -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| `JoyRide.define(definitions)` | Validate and deeply freeze an optional catalog without mounting a game. References are resolved in its mounted catalog. |\n| `JoyRide.active` | Currently mounted controller or `undefined`. |\n| `JoyRide.listVehiclePresets()` | Built-in and browser-saved vehicle presets. |\n| `JoyRide.listVehicleOptions()` | Labels/IDs for preset pickers. |\n| `JoyRide.getVehiclePreset(id)` | A vehicle catalog preset or `undefined`; includes browser overrides. |\n| `JoyRide.getMountPreset(id, overrides?)` | Return ordinary mount options for a named preset such as `sfw`; supplied options override it. |\n| `JoyRide.vehicleTools` | Tool metadata for building controls. |\n| `JoyRide.availableVehicleTools(slots?, toolsEnabled?)` | Return available tools with their current consecutive keyboard shortcuts. |\n| `JoyRide.keyboardControls` | Labels, key names, and physical key codes for host-owned controls help. |\n| `JoyRide.overlayLayers` / `JoyRide.overlayZIndex(layer)` | Shared overlay-layer ordering and its z-index helper. |\n\n### Reusable definitions\n\n`JoyRide.define({ objects?, liquids?, vehicles?, objectives? })` returns deeply readonly definitions. Each map uses application-chosen names. Resolve names inside a mounted catalog; equal names in different mounts get independent material identities. Cycles, missing references, and incompatible capabilities fail validation.\n\n```ts\nconst kit = JoyRide.define({\n objects: { wood: { breakable: { health: 80 }, burnable: { burnSeconds: 12 } } },\n liquids: { ink: { base: 'paint', color: '#5271ff', thickness: 0.8 } },\n vehicles: { artist: { base: 'electric-gt', name: 'The artist' } },\n objectives: { delivery: { steps: ['collect', 'deliver'], order: 'ordered' } },\n});\n```\n\nObject recipes can reference another through `object`. Vehicle and liquid recipes require `base`. Vehicles inherit shipped physics/sound/image settings without silently applying saved browser overrides.\n\n### Layering with host menus and dialogs\n\nJoy Ride's overlay uses a small stack by default: world `1`, foreground content `2`, and\nits own backdrop and controls `3`–`4`. Host dropdowns and dialogs with a higher\nlayer in the same stacking context appear above the car and painted content. Joy Ride\npreserves an explicit z-index on elements selected by `foregroundSelector`.\n\nSet `--joy-ride-z-index` on the document root to move the whole stack for a host's\nlayer scale. The four layers use that value and the next three integers:\n\n```css\n:root {\n --joy-ride-z-index: 20;\n}\n```\n\nThis CSS variable is a host layering choice, so it applies to the canvas, auxiliary\neffects, and native painted content together, including when the embed UI uses a shadow\nroot. A z-index cannot lift a dialog out of a lower parent stacking context; use a\nportal into the document root or a native modal dialog for that case. Native modal\ndialogs and popovers use the browser's top layer and appear above ordinary z-index\nstacks.\n\n## Events and HUD\n\nConnect the toy to your page with live readouts and gameplay events.\n\n### Declarative HUD\n\n```html\n<output\n data-jr-hud=\"speed\"\n data-jr-hud-unit=\"kmh\"\n data-jr-hud-precision=\"1\"\n>\n 0\n</output>\n<output\n data-jr-hud=\"fps\"\n>\n 0\n</output>\n<output\n data-jr-hud=\"rpm\"\n>\n 0\n</output>\n<output\n data-jr-hud=\"gear\"\n>\n N\n</output>\n<output\n data-jr-hud=\"health\"\n>\n 0\n</output>\n<output\n data-jr-hud=\"points\"\n>\n 0\n</output>\n```\n\nChoose one metric per element and style it yourself. The JS equivalent is `{hud:{field:'speed',unit:'kmh',precision:1}}`. Fields are `speed`, `fps`, `rpm`, `gear`, `health`, and `points`. Only speed accepts units: `mph` (default), `kmh`, or `mps`. Precision is an integer 0…4, default 0. `hud:false` disables a lower layer.\n\nThe runtime writes changed values only and restores owned original children on cleanup. Keep HUD targets separate from fragmentation/paint targets. Place readouts inside `data-jr-ui` controls when appropriate.\n\n### Events and subscriptions\n\n```ts\nconst unsubscribe = ride.on('objective:complete', ({ objective, vehicle }) => {\n celebrate(objective.id, vehicle?.id);\n});\nride.on('object:break', ({ object }) => console.log(object.id, object.spec.meta));\nride.on('reset', () => {\n setCollectedPickups([]);\n setButtonPresses(0);\n});\nunsubscribe();\n```\n\nTargets dispatch bubbling `CustomEvent`s prefixed with `joyride:`. The JS subscription omits that prefix. Subscribe on the document or use `ride.on`. Listeners run outside simulation work and are isolated from host exceptions. Unsubscribe before discarding an integration; disposal removes subscriptions.\n\n| Event name | Detail |\n| ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |\n| `object:hit`, `object:ignite`, `object:break`, `object:burnout`, `object:explode`, `object:crush` | `{ object, vehicle?, point? }`, with points on applicable events. |\n| `trigger:enter`, `trigger:leave`, `trigger:qualify`, `trigger:change`, `trigger:stop` | `{object, vehicle:{id}, position, speedMps, state:{inside,departed,stopped,phase}}`. |\n| `objective:progress`, `objective:complete` | `{objective:{id,type,current,target,complete}, vehicle?}` and trigger context when available. |\n| `vehicle:change` | `{vehicle}` containing the readonly vehicle snapshot. |\n| `state:change` | The readonly `PlaygroundState` snapshot. |\n| `diagnostic` | `{code,message,target?}` describing rejected configuration or host errors. |\n| `reset` | No detail; scene objects and interactions have been restored. |\n| `dispose` | No detail; lifecycle notification during cleanup. |\n\n`ride.reset()`, the dialog reset, and **C / Reset screen** restore objects, pickups, zones, objectives, and native checkbox values without repeating click handlers. A car inside a zone must leave and return to trigger it again. Configuration and vehicle placement stay unchanged.\n\nListen for `joyride:reset` on the document, or `ride.on('reset', …)`, to clear your own counters and controlled inputs. `session.handle.clearEffects()` only fades visual effects.\n\n### Custom event typing\n\n```ts\ndeclare module '@joy-ride/game' {\n interface PlaygroundEventMap {\n 'pickup-collected': { object: { id: string } };\n }\n}\nride.on('pickup-collected', ({ object }) => collect(object.id));\n```\n\nConfigure `trigger.event` or an objective’s `event` with an application event name. Trigger events carry trigger details; objective completion events carry objective progress. Host code can also dispatch its own bubbling `CustomEvent('joyride:pickup-collected', {detail, bubbles:true})`. Augment `PlaygroundEventMap` to type its payload accurately.\n\n## Saving and sharing\n\n### Portable configuration\n\n```ts\nconst configuration = ride.exportConfiguration();\nconst json = JSON.stringify(configuration, null, 2);\nride.dispose();\n\nconst restored = JoyRide.mount(JSON.parse(json));\nawait restored.ready;\n```\n\nThe `joy-ride-playground` format (version 3) stores definitions, player configuration, selector bindings, objectives, initial entry, and settings. It keeps authored names rather than internal IDs. HTML and application state stay with your page. This saves setup, not a running-world checkpoint.\n\nExact-element bindings, internal object overrides, and unsupported host-only options cannot be exported. They cause `NonSerializableDependencyError` with code `JR_NON_SERIALIZABLE_DEPENDENCY`; `dependencies` lists each `{ path, reason }`.\n\n### Browser module without npm\n\nLoad the browser module when your application needs it, then mount manually:\n\n```ts\nconst { default: JoyRide } = await import('https://unpkg.com/@joy-ride/game@latest/index.js');\nconst ride = JoyRide.mount();\nawait ride.ready;\n// Call ride.dispose() when the host view is removed.\n```\n\nUse this in a browser module; install the npm package for a bundled application. This does not create a `window.JoyRide` global. The separate `/embed.js` script does. The CDN loads adjacent styles and assets; replace `@latest` with a version to pin a build.\n\n### Embed and bookmarklet helpers\n\n```ts\nimport {\n fullEmbedCode,\n asyncEmbedCode,\n npmEmbedCode,\n reactEmbedCode,\n bookmarkletUrl,\n} from '@joy-ride/game/bookmarklet';\n\nconst configuration = ride.exportConfiguration();\nconst html = fullEmbedCode(configuration);\nconst asyncCdn = asyncEmbedCode(configuration);\nconst npm = npmEmbedCode(configuration);\nconst react = reactEmbedCode(configuration);\nconst bookmark = bookmarkletUrl(configuration);\n```\n\nAll helpers use the same portable configuration. The HTML helper returns an auto-mounting module script. The CDN helper loads the runtime on demand without a package dependency; the NPM helper imports the package root, and the React helper renders the component from `/react`. The bookmarklet toggles a mounted runtime. Importing helpers does not mount the toy.\n\nThe lower-level `@joy-ride/engine/playground` entry exports `createPlaygroundConfiguration`, `parsePlaygroundConfiguration`, `NonSerializableDependencyError`, and portable configuration types. Use the factory/parser when validating stored/imported JSON.\n\n### Validation and diagnostics\n\nUnknown fields, invalid values, missing recipes, duplicate IDs, unsupported targets, and incompatible capabilities fail validation. `PlaygroundConfigurationError` has code `JR_INVALID_CONFIGURATION` and a property `path`. JavaScript updates throw before commit; invalid DOM edits retain the last valid spec and emit `joyride:diagnostic` with `{code,message,target?}`.\n\nUse `ride.ready.catch(...)` for startup errors and `ride.on('diagnostic', ...)` for integration errors. Listener failures are reported while play continues; internal simulation failures stop the clock.\n\n### Public TypeScript contracts\n\n`@joy-ride/game` exports types for `MountOptions`, `RideController`, `PlaygroundEventMap`, `PlaygroundState`, `ObjectSpec`, `ObjectPatch`, `ObjectiveSpec`, `ObjectiveHandle`, `ObjectiveType`, `ObjectiveProgress`, `ObjectiveEventDetail`, `PickupEffectInput`, `PlayerConfiguration`, `VehicleConfiguration`, `VehiclePatch`, `VehicleHandle`, `VehicleSpawnOptions`, `RuntimeOptions`, `RuntimeOptionsPatch`, `PlaygroundConfiguration`, `Appearance`, `SlotNumber`, and `DeepReadonly`.\n\nThe game schema entry additionally provides catalog, trigger, objective, HUD, paint, and capability types plus validation/merge helpers. Prefer authored input types for configuration and readonly snapshot types for observation; runtime references and saved configuration have different ownership.\n\n## Advanced integrations\n\nFor custom React interfaces, browser hosts, and canvas scenes inside the Joy Ride repository. Ordinary websites should use the public `@joy-ride/game` or `@joy-ride/game/react` entry. The workspace packages below are not subpaths of the published game package.\n\n### React browser host\n\nUse `@joy-ride/game/react` for ordinary React website setup. The following workspace packages are internal building blocks for custom hosts in this repository.\n\n`JoyRide` from `@joy-ride/ui` connects a canvas and controls to a browser session. `onReady(world, registry)` and `JoyRideHandle.getPlayground()` expose the runtime.\n\nReact hosts using `@joy-ride/browser` can call `entryFromMarker(element)` and pass its result to `session.handle.enterAt(...)` for the same arrival behavior as a `data-jr-entry` script marker.\n\nFor an Objects tab in a custom dialog, pass `objects={joyrideRef.current?.getPlayground()?.objects}` to `VehiclePopover`. The embed handles this automatically. The inspector lets users search, preview, reveal, drive to, reset, or disable objects. Pass `onDriveToObject` to enable driving to a target. Revealing an object closes the dialog and stops camera following; resetting it leaves shared trails and particles intact.\n\n`SceneObjectInspector` provides `getSnapshot()`, `subscribe(listener)`, `getTarget(id)`, `reveal(id)`, `reset(id)`, and `remove(id)`. The page runtime also has `resetObject(id)` and `removeObject(id)`. Removal disables the object without deleting its HTML. Scene reset restores removed objects; checkpoints preserve their state. Types `SceneObject`, `SceneObjectPreview`, and `SceneObjectInspector` come from `@joy-ride/browser`.\n\n`VehiclePopover` supplies the dialog, `initialTab`, and host callbacks. For embeds, `dialog.vehicleTabs` chooses the visible tabs. These React building blocks configure presentation rather than portable JSON:\n\n| Export | Purpose |\n| --------------------------- | ------------------------------------------------------------------------------ |\n| `JoyRide` | React canvas/controls adapter for a browser session; forwards `JoyRideHandle`. |\n| `VehicleHint` | DOM hint anchored to the car in document coordinates. |\n| `CanvasDrive` | Canvas-owned level host. |\n| `VehiclePopover` | Configurable dialog, tabs, and garage callbacks. |\n| `VehicleShowcase` | Vehicle picker with drive-through selection and host-owned presets. |\n| `VehiclePreview` | Inspect a preset, sprite geometry, and mounted tools. |\n| `JoyRideLogo` | Optional branded logo presentation. |\n| `joyRideLogo` | Shared SVG artwork data for host-owned logo treatments. |\n| `CodeBlock` | Escaped, copyable code examples using shadcn primitives. |\n| `Toolbar` / `ToolbarButton` | Shared host controls. |\n| `TouchControls` | Touch input overlay producing normal vehicle controls. |\n\nShared shadcn controls are available from `@joy-ride/ui/controls`. Theme helpers are in `@joy-ride/ui/theme`, with CSS at `@joy-ride/ui/theme.css`. Engine configuration and catalogs are imported from their owning `@joy-ride/engine` entrypoints rather than re-exported from UI.\n\n### Browser sessions without React\n\n```ts\nimport { BrowserSession } from '@joy-ride/browser';\n\nconst session = new BrowserSession(canvas, {\n overlay: true,\n masterVolume: 0,\n onReady(world, registry) {\n registry.bind('.playful', { breakable: true });\n },\n});\nsession.update({ paused: true });\nsession.handle.startAudio();\n// Later:\nsession.dispose();\n```\n\n`BrowserSession(canvas, options?, presentation?)` manages the world, clock, input, and browser resources without React. `handle` provides engine commands; `touchChange(controls)` supplies host input. Use `update(patch)` for live options and `dispose()` for cleanup. Overlay sessions call `onReady(world, registry)` unless disposed first.\n\n`BrowserSessionOptions` lists all settings, bindings, definitions, startup state, and callbacks. Fields excluded from `BrowserSessionUpdate` require a new session. Optional presentation hooks supply a toolbar, `onPresent(time, world, sound)`, and a safe camera frame. The session owns the frame clock.\n\n`session.handle` exposes lighting (`setLighting`, `getLighting`, `toggleLight`), audio (`startAudio`), vehicle access (`getVehicle`, `getPresetId`, `setPreset`), geometry (`getCarAnchor`, `getPose`, `getPathView`), effects (`clearEffects`, `reset`, `addLiquid`, `ejectLiquid`), distance (`getDistance`, `resetDistance`, `cycleDistanceDpi`), placement (`resetTo`, `parkAt`, `enterAt`), checkpoints (`saveState`, `restoreState`), and `getPlayground` for advanced registry/world access. These engine commands use the same units and return conventions as the corresponding browser facade commands. Placement uses `{xPx,yPx,angleRad?}`; `parkAt` requires an angle. Distance readouts include their calibrated display unit. `vehicleReadout` produces shared HUD data without owning a clock.\n\n`ride.enterAt(...)` and `session.handle.enterAt(...)` fade in a moving car and skid it to an element or document point. `delayMs` waits before arrival. The approach predicts speed from skid distance unless `initialSpeedMps` is supplied, and adds service braking when needed. `fadeFraction` controls how much of the entrance fades in. Input or disposal cancels a pending entrance. The result is `completed`, `interrupted`, or `unavailable`.\n\n```ts\nawait ride.enterAt({\n target: document.querySelector('#example')!,\n delayMs: 1000,\n approach: {\n angleRad: 0,\n distancePx: 240,\n fadeFraction: 0.5,\n },\n handbrake: { steer: 0.08 },\n});\n```\n\nThe React `JoyRide` component creates this session and forwards `JoyRideHandle` to `session.handle`. React owns the canvas and controls; it does not own physics or browser input state.\n\nThe vehicle hover toolbar provides mute and quit controls for the player.\n\n### Canvas-owned worlds\n\n```ts\nimport { CanvasWorld } from '@joy-ride/engine';\n\nconst world = new CanvasWorld(canvas, level, { muted: true, quality: 'medium' });\nworld.focus();\nworld.setPaused(false);\n// Later:\nworld.dispose();\n```\n\n`new CanvasWorld(canvas, level, options?)` hosts a canvas-owned scene. Levels use metres/Y-up and explicit shape geometry, with whole-object breakage. They share damage-capability constraints; unsupported DOM-only capabilities reject.\n\nOptions include `preset`, `quality`, `lighting`, `muted`, `paused`, `viewScale`, `safeArea`, `cameraLock`, `cameraSmoothing`, `pauseShortcut`, shared display and game settings, `drawGround`, `drawForeground`, `filterControls`, `onStep`, `onPauseChange`, `onHorn`, and `onPresent`.\n\n| CanvasWorld methods | Purpose |\n| ------------------------------------------------ | --------------------------------------------------------------- |\n| `setLevel`, `getLevel`, `reset` | Replace/inspect the level or restore its checkpoint. |\n| `setPaused`, `setMuted`, `focus`, `dispose` | Host lifecycle and input focus. |\n| `setLighting`, `getLighting`, `toggleLight` | Lamp configuration. |\n| `setViewScale`, `setSafeArea`, `getSafeViewport` | Canvas presentation and host UI insets. |\n| `setCameraSmoothing`, `setCameraLock` | Camera behaviour. |\n| `setInputEnabled`, `setAction`, `setControls` | Host input/assist. Pass `null` controls to resume normal input. |\n| `addObject`, `removeObject` | Runtime level objects. |\n| `addLiquid`, `isTouchingLiquid`, `pour` | Canvas-world liquid authoring/contact. |\n\n### Engine package boundaries\n\n`@joy-ride/engine` keeps its default entry small: `Simulation`, `GameWorld`, `CanvasWorld`, `definePlayground`, `createPlaygroundConfiguration`, and `parsePlaygroundConfiguration`, with their core configuration types. For a site playground, use `@joy-ride/game`; the internal `@joy-ride/browser` package owns the framework-independent browser session, and `@joy-ride/ui` supplies optional React presentation.\n\nAdvanced hosts import deliberate extension entries:\n\n| Entry | Responsibility |\n| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `@joy-ride/engine/engine` | World/clock/checkpoint ownership, canvas levels/scenes, geometry conversions, and host event helpers. |\n| `@joy-ride/engine/simulation` | Simulation state, controls, vector math, and driving geometry. |\n| `@joy-ride/engine/vehicles` | Vehicle presets/catalog, entities, slots, tools, stats, sprite geometry, and status effects. |\n| `@joy-ride/engine/playground` | Authored contracts, canonical validation/composition/attribute parsing, registries, zones, HUD, runtime options, and portable configuration. |\n| `@joy-ride/engine/rendering` | Renderer host integration, lighting, overlay layers, and presentation option types. |\n| `@joy-ride/engine/physics` | DOM contacts, liquid definitions, collision-mask queries, and combustible lifecycle configuration. |\n| `@joy-ride/engine/audio` | Engine audio integration. |\n| `@joy-ride/engine/input` | Keyboard controls and input bindings. |\n| `@joy-ride/engine/intro` | Opening entrance path and driver. |\n| `@joy-ride/engine/tutorial` | Optional tutorial orchestration, canvas tutorials, and callout contracts. |\n\nEngine objects hold live simulation state. Shaders, caches, source-file paths, and vendor modules are internal. Use portable configuration to save a playground.\n\n`GameWorld.configureVehicle` updates a live vehicle. `saveState()` returns a same-world `GameCheckpoint` with `restore()`, `available`, and `dispose()`. Checkpoints hold engine resources and cannot be saved as JSON; dispose them when finished. `GameLoop` updates physics at 120 Hz and presents once per frame.\n\nUse the browser API for declarative playgrounds, the React/canvas hosts for custom presentation, and the engine modules for implementing your own host. Keep host functions and DOM references outside serialized definitions.\n";function lu(e){let t=So().use(Oi).use(iu).parse(e),n=new Map,r=t.children.filter(e=>e.type===`heading`).map(e=>{let t=It(e),r=t.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,`-`).replace(/^-|-$/g,``)||`section`,i=n.get(r)??0;return n.set(r,i+1),{node:e,id:`jr-doc-${r}${i?`-${i+1}`:``}`,title:t}}),i=r.filter(({node:e})=>e.depth===2);return i.map((t,n)=>{let a=t.node.position.start.offset,o=i[n+1]?.node.position.start.offset??e.length,s=t.node.position.start.line;return Object.freeze({id:t.id,title:t.title,markdown:e.slice(a,o).trimEnd(),headings:Object.freeze(r.filter(({node:e})=>e.position.start.offset>=a&&e.position.start.offset<o).map(({node:e,id:t,title:n})=>Object.freeze({id:t,title:n,depth:e.depth,line:e.position.start.line-s+1})))})})}var $=lu(cu),uu=$.flatMap(e=>{let t=e.markdown.split(`
|
|
33
|
+
`);return e.headings.map((n,r)=>{let i=e.headings[r+1],a=t.slice(n.line,i?i.line-1:void 0).join(` `).replace(/\[([^\]]+)\]\([^)]+\)/g,`$1`).replace(/<[^>]+>/g,` `).replace(/[`*_#|>]/g,` `).replace(/\s+/g,` `).trim();return{chapter:e,heading:n,body:a,haystack:`${n.title} ${a}`.toLowerCase()}})});function du(e){let t=e.trim().toLowerCase().split(/\s+/).filter(Boolean);return t.length?uu.filter(e=>t.every(t=>e.haystack.includes(t))).map(e=>{let n=e.heading.title.toLowerCase(),r=t.reduce((e,t)=>e+(n.includes(t)?2:0),0),i=t.every(e=>n.includes(e))?0:e.body.toLowerCase().indexOf(t[0]),a=Math.max(0,i-28),o=a?e.body.indexOf(` `,a):0,s=o<0?a:o?o+1:0,c=e.body.slice(s,s+110).trim();return{score:r,chapter:e.chapter.id,anchor:e.heading.id,title:e.heading.title,chapterTitle:e.chapter.title,excerpt:`${s?`…`:``}${c}${s+110<e.body.length?`…`:``}`}}).sort((e,t)=>t.score-e.score).slice(0,10).map(({score:e,...t})=>t):[]}var fu=[iu],pu=Object.fromEntries(i.map(e=>[e.key,`#jr-doc-option-${e.category}-${e.key.toLowerCase()}`])),mu={...pu,...Object.fromEntries(Object.keys(r).map(e=>[e,`#jr-doc-vehicle-hint`]))},hu={ts:`typescript`,js:`javascript`,sh:`shell`,bash:`shell`},gu=new Set([`javascript`,`typescript`,`jsx`,`tsx`,`html`,`css`,`json`,`shell`,`text`]);function _u(){return E(`div`,{className:`joy-docs-shortcuts my-3 mb-[18px] grid grid-cols-[repeat(auto-fit,minmax(220px,1fr))] gap-x-5 gap-y-1`,"aria-label":`Default keyboard controls`,children:[a.filter(e=>!e.id.startsWith(`slot`)).map(e=>E(`div`,{className:`joy-docs-shortcut flex min-w-0 items-center justify-between gap-3 border-b border-border py-[5px] [&>[data-slot=kbd-group]]:shrink-0`,children:[T(`span`,{children:e.label}),T(p,{children:e.keys.map((e,t)=>E(`span`,{className:`inline-flex items-center gap-1`,children:[t>0&&T(`span`,{"aria-hidden":`true`,children:`/`}),T(m,{children:e})]},e))})]},e.id)),E(`div`,{className:`joy-docs-shortcut flex min-w-0 items-center justify-between gap-3 border-b border-border py-[5px] [&>[data-slot=kbd-group]]:shrink-0`,children:[T(`span`,{children:`Assigned tools`}),E(p,{children:[T(m,{children:`1`}),`–`,T(m,{children:`9`})]})]})]})}var vu=v(function({chapter:e,onLocalLink:t}){let n=b(()=>{let n=({node:t,children:n,...r})=>{let i=e.headings.find(e=>e.line===t?.position?.start.line),a=`h${i?.depth??2}`;return E(w,{children:[T(a,{...r,id:i?.id,tabIndex:-1,children:n}),i?.id===`jr-doc-keyboard-controls`&&T(_u,{})]})};return{h2:n,h3:n,h4:n,pre({children:e}){let n=g.toArray(e).find(_);if(!n)return T(`pre`,{children:e});let r=n.props,i=r.className?.replace(`language-`,``)??`text`,a=hu[i]??i;return typeof r.children==`string`?T(f,{code:r.children.replace(/\n$/,``),language:gu.has(a)?a:`text`,compact:!0,maxHeight:320,propertyLinks:/\bhint:\s*\{/.test(r.children)?mu:pu,onLocalLink:t}):T(`pre`,{children:e})},table({children:e}){return T(`div`,{className:`joy-docs-table my-[18px] overflow-x-auto rounded-lg border border-border [&_table]:w-full [&_table]:border-collapse [&_table]:text-xs [&_table]:leading-relaxed [&_:is(th,td)]:border-b [&_:is(th,td)]:border-border [&_:is(th,td)]:px-3 [&_:is(th,td)]:py-2.5 [&_:is(th,td)]:text-left [&_:is(th,td)]:align-top [&_th]:whitespace-nowrap [&_th]:bg-muted [&_th]:font-semibold [&_th]:text-foreground [&_tr:last-child_td]:border-b-0`,tabIndex:0,role:`region`,"aria-label":`API reference table`,children:T(`table`,{children:e})})},a({href:e,children:n,node:r,...i}){let a=e?.startsWith(`https://`);return T(`a`,{...i,id:e?.startsWith(`#jr-doc-option-`)?e.slice(1):void 0,href:e,target:a?`_blank`:void 0,rel:a?`noreferrer`:void 0,onClick:n=>{e?.startsWith(`#jr-doc-`)&&t&&(n.preventDefault(),t(e.slice(1)))},children:n})}}},[e,t]);return T(`div`,{className:`joy-docs-prose prose text-base leading-[1.7] text-muted-foreground [overflow-wrap:anywhere]`,children:T(Io,{remarkPlugins:fu,components:n,skipHtml:!0,children:e.markdown})})}),yu=v(function({location:e,onNavigate:t,scrollMode:n=`panel`,searchTarget:r}){let i=$.find(t=>t.id===e.chapter)??$[0],a=x(null),s=x(null),c=x(null),[d,f]=S(!1),[p,m]=S(``),[h,g]=S(!1),_=b(()=>du(p),[p]),v=x(!1),D=(e,n)=>{v.current=!0,f(!1),g(!1),m(``),t({chapter:e,anchor:n})};y(()=>{let t=a.current,r=t?.querySelector(`#${e.anchor||i.id}`);if(t&&r){if(n===`page`){if(!e.chapter)return;let t=document.querySelector(`.home-header`)?.getBoundingClientRect().height??0,n=s.current?.getBoundingClientRect().height??0;window.scrollTo({top:Math.max(0,window.scrollY+r.getBoundingClientRect().top-t-n-20)})}else t.scrollTop+=r.getBoundingClientRect().top-t.getBoundingClientRect().top-20;v.current&&r.focus({preventScroll:!0}),v.current=!1}},[e,i.id,n]);let O=E(w,{children:[E(`div`,{className:`joy-docs-search relative ml-auto w-[min(100%,280px)] shrink-0 max-[800px]:w-auto max-[800px]:flex-1`,onBlur:e=>{e.relatedTarget&&e.currentTarget.contains(e.relatedTarget)||g(!1)},children:[E(au,{children:[T(ou,{children:T(ee,{"aria-hidden":`true`})}),T(su,{className:`[&::-webkit-search-cancel-button]:hidden`,type:`search`,"aria-label":`Search documentation`,placeholder:`Search documentation`,value:p,onChange:e=>{m(e.target.value),g(!0)},onFocus:()=>g(!0),onKeyDown:e=>{e.key===`Escape`&&p?(e.preventDefault(),e.stopPropagation(),m(``),g(!1)):e.key===`Enter`&&_[0]?(e.preventDefault(),D(_[0].chapter,_[0].anchor)):e.key===`ArrowDown`&&_.length&&(e.preventDefault(),e.currentTarget.closest(`.joy-docs-search`)?.querySelector(`.joy-docs-result`)?.focus())}}),p&&T(ou,{align:`inline-end`,children:T(o,{type:`button`,variant:`ghost`,size:`icon-xs`,className:`size-5 rounded-sm`,"aria-label":`Clear documentation search`,onClick:()=>{m(``),g(!1)},children:T(l,{"aria-hidden":`true`})})})]}),p.trim()&&E(`p`,{className:`sr-only`,role:`status`,children:[_.length,` documentation results`]}),h&&p.trim()&&T(`div`,{className:`joy-docs-results absolute top-[calc(100%+6px)] right-0 z-[5] max-h-[min(420px,55vh)] w-[min(420px,calc(100vw-32px))] overflow-auto rounded-lg border border-border bg-popover p-[5px] shadow-lg`,"aria-label":`Documentation search results`,children:_.length?_.map(e=>E(`button`,{type:`button`,className:`joy-docs-result grid w-full cursor-pointer gap-0.5 overflow-hidden rounded-sm px-2.5 py-2 text-left text-foreground hover:bg-muted focus-visible:bg-muted [&_small]:truncate [&_small]:text-[11px] [&_small]:leading-[1.4] [&_small]:text-muted-foreground [&_span]:text-[11px] [&_span]:leading-[1.4] [&_span]:text-muted-foreground [&_strong]:text-xs [&_strong]:font-semibold`,onClick:()=>D(e.chapter,e.anchor),children:[T(`span`,{children:e.chapterTitle}),T(`strong`,{children:e.title}),e.excerpt&&T(`small`,{children:e.excerpt})]},e.anchor)):T(`p`,{className:`m-0 p-3 text-xs text-muted-foreground`,children:`No matching sections.`})})]}),E(o,{ref:c,variant:`outline`,size:`sm`,className:`joy-docs-browse hidden w-fit max-[800px]:flex`,"aria-expanded":d,"aria-controls":`jr-docs-navigation`,onClick:()=>f(e=>!e),children:[T(k,{}),` Browse `,T(u,{})]})]});return E(`div`,{className:`joy-docs relative grid h-full min-h-0 grid-cols-[190px_minmax(0,1fr)] ${r?`grid-rows-[minmax(0,1fr)]`:`grid-rows-[auto_minmax(0,1fr)]`} overflow-clip max-[800px]:grid-cols-[minmax(0,1fr)]`,"data-scroll-mode":n,onKeyDown:e=>{e.key===`Escape`&&d&&(e.preventDefault(),e.stopPropagation(),f(!1),c.current?.focus())},children:[r?C(O,r):T(`div`,{className:`joy-docs-toolbar z-[3] col-span-full row-start-1 flex min-w-0 items-center justify-between gap-3 border-b border-border bg-background py-3 pr-[var(--pause-inset,20px)] max-[800px]:flex-wrap max-[800px]:gap-2 max-[800px]:py-2 max-[800px]:pr-4`,ref:s,children:O}),E(`nav`,{id:`jr-docs-navigation`,className:`joy-docs-navigation col-start-1 ${r?`row-start-1 max-[800px]:row-start-1`:`row-start-2 max-[800px]:row-start-2`} min-w-0 overflow-auto px-[var(--pause-inset,20px)] pt-4 pb-6 text-xs max-[800px]:relative max-[800px]:z-[2] max-[800px]:col-start-1 max-[800px]:m-[6px_16px_0] max-[800px]:hidden max-[800px]:max-h-[min(360px,65%)] max-[800px]:self-start max-[800px]:rounded-lg max-[800px]:border max-[800px]:border-border max-[800px]:bg-popover max-[800px]:p-3 max-[800px]:shadow-lg max-[800px]:data-[open=true]:block`,"aria-label":`API documentation`,"data-open":d,children:[T(`p`,{className:`joy-docs-nav-label mb-3.5 text-[11px] font-medium text-muted-foreground`,children:`Reference`}),T(`ul`,{className:`joy-docs-chapters m-0 list-none space-y-[3px] p-0`,children:$.map(e=>T(`li`,{children:T(`a`,{className:`joy-docs-chapter relative block py-1.5 leading-normal text-muted-foreground no-underline transition-colors hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring aria-[current=page]:font-semibold aria-[current=page]:text-foreground`,href:`#${e.id}`,"aria-current":i.id===e.id?`page`:void 0,onClick:t=>{t.preventDefault(),D(e.id,e.id)},children:e.title})},e.id))})]}),E(`article`,{ref:a,className:`joy-docs-article col-start-2 ${r?`row-start-1 max-[800px]:row-start-1`:`row-start-2 max-[800px]:row-start-2`} min-h-0 min-w-0 overflow-auto px-6 pt-4 pb-6 overscroll-contain max-[800px]:col-start-1 max-[800px]:px-4`,"aria-label":i.title,children:[T(vu,{chapter:i,onLocalLink:e=>{let t=$.find(t=>t.headings.some(t=>t.id===e)||e.startsWith(`jr-doc-option-`)&&t.id===`jr-doc-settings`);t?D(t.id,e):a.current?.querySelector(`#${CSS.escape(e)}`)&&D(i.id,e)}}),T(`p`,{className:`joy-docs-next mt-7 border-t border-border pt-5`,children:$[$.indexOf(i)+1]&&E(o,{variant:`outline`,onClick:()=>{let e=$[$.indexOf(i)+1];D(e.id,e.id)},children:[`Next: `,$[$.indexOf(i)+1].title,` →`]})})]})]})});export{yu as Documentation};
|