@joy-ride/joy-ride 0.2.2 → 0.2.3

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.
@@ -1,4 +1,4 @@
1
- import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,u as c}from"./src-BLVPHV3N.js";var l=c(s(),1),u=new Map([[`bold`,l.createElement(l.Fragment,null,l.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`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M216,64V192H40V64Z`,opacity:`0.2`}),l.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`,l.createElement(l.Fragment,null,l.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`,l.createElement(l.Fragment,null,l.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`,l.createElement(l.Fragment,null,l.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`,l.createElement(l.Fragment,null,l.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`}))]]),d=l.forwardRef((e,t)=>l.createElement(n,{ref:t,...e,weights:u}));d.displayName=`ListIcon`;function f(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var p=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,m=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,h={};function g(e,t){return((t||h).jsx?m:p).test(e)}var _=/[ \t\n\f\r]/g;function v(e){return typeof e==`object`?e.type===`text`&&y(e.value):y(e)}function y(e){return e.replace(_,``)===``}var b=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};b.prototype.normal={},b.prototype.property={},b.prototype.space=void 0;function x(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new b(n,r,t)}function S(e){return e.toLowerCase()}var C=class{constructor(e,t){this.attribute=t,this.property=e}};C.prototype.attribute=``,C.prototype.booleanish=!1,C.prototype.boolean=!1,C.prototype.commaOrSpaceSeparated=!1,C.prototype.commaSeparated=!1,C.prototype.defined=!1,C.prototype.mustUseProperty=!1,C.prototype.number=!1,C.prototype.overloadedBoolean=!1,C.prototype.property=``,C.prototype.spaceSeparated=!1,C.prototype.space=void 0;var w=r({boolean:()=>E,booleanish:()=>D,commaOrSpaceSeparated:()=>M,commaSeparated:()=>j,number:()=>k,overloadedBoolean:()=>O,spaceSeparated:()=>A}),T=0,E=N(),D=N(),O=N(),k=N(),A=N(),j=N(),M=N();function N(){return 2**++T}var ee=Object.keys(w),te=class extends C{constructor(e,t,n,r){let i=-1;if(super(e,t),P(this,`space`,r),typeof n==`number`)for(;++i<ee.length;){let e=ee[i];P(this,ee[i],(n&w[e])===w[e])}}};te.prototype.defined=!0;function P(e,t,n){n&&(e[t]=n)}function F(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new te(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[S(r)]=r,n[S(a.attribute)]=r}return new b(t,n,e.space)}var ne=F({properties:{ariaActiveDescendant:null,ariaAtomic:D,ariaAutoComplete:null,ariaBusy:D,ariaChecked:D,ariaColCount:k,ariaColIndex:k,ariaColSpan:k,ariaControls:A,ariaCurrent:null,ariaDescribedBy:A,ariaDetails:null,ariaDisabled:D,ariaDropEffect:A,ariaErrorMessage:null,ariaExpanded:D,ariaFlowTo:A,ariaGrabbed:D,ariaHasPopup:null,ariaHidden:D,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:A,ariaLevel:k,ariaLive:null,ariaModal:D,ariaMultiLine:D,ariaMultiSelectable:D,ariaOrientation:null,ariaOwns:A,ariaPlaceholder:null,ariaPosInSet:k,ariaPressed:D,ariaReadOnly:D,ariaRelevant:null,ariaRequired:D,ariaRoleDescription:A,ariaRowCount:k,ariaRowIndex:k,ariaRowSpan:k,ariaSelected:D,ariaSetSize:k,ariaSort:null,ariaValueMax:k,ariaValueMin:k,ariaValueNow:k,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function re(e,t){return t in e?e[t]:t}function ie(e,t){return re(e,t.toLowerCase())}var ae=F({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:j,acceptCharset:A,accessKey:A,action:null,allow:null,allowFullScreen:E,allowPaymentRequest:E,allowUserMedia:E,alpha:E,alt:null,as:null,async:E,autoCapitalize:null,autoComplete:A,autoFocus:E,autoPlay:E,blocking:A,capture:null,charSet:null,checked:E,cite:null,className:A,closedBy:null,colorSpace:null,cols:k,colSpan:k,command:null,commandFor:null,content:null,contentEditable:D,controls:E,controlsList:A,coords:k|j,crossOrigin:null,data:null,dateTime:null,decoding:null,default:E,defer:E,dir:null,dirName:null,disabled:E,download:O,draggable:D,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:E,formTarget:null,headers:A,height:k,hidden:O,high:k,href:null,hrefLang:null,htmlFor:A,httpEquiv:A,id:null,imageSizes:null,imageSrcSet:null,inert:E,inputMode:null,integrity:null,is:null,isMap:E,itemId:null,itemProp:A,itemRef:A,itemScope:E,itemType:A,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:E,low:k,manifest:null,max:null,maxLength:k,media:null,method:null,min:null,minLength:k,multiple:E,muted:E,name:null,nonce:null,noModule:E,noValidate:E,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:E,optimum:k,pattern:null,ping:A,placeholder:null,playsInline:E,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:E,referrerPolicy:null,rel:A,required:E,reversed:E,rows:k,rowSpan:k,sandbox:A,scope:null,scoped:E,seamless:E,selected:E,shadowRootClonable:E,shadowRootCustomElementRegistry:E,shadowRootDelegatesFocus:E,shadowRootMode:null,shadowRootSerializable:E,shape:null,size:k,sizes:null,slot:null,span:k,spellCheck:D,src:null,srcDoc:null,srcLang:null,srcSet:null,start:k,step:null,style:null,tabIndex:k,target:null,title:null,translate:null,type:null,typeMustMatch:E,useMap:null,value:D,width:k,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:A,axis:null,background:null,bgColor:null,border:k,borderColor:null,bottomMargin:k,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:E,declare:E,event:null,face:null,frame:null,frameBorder:null,hSpace:k,leftMargin:k,link:null,longDesc:null,lowSrc:null,marginHeight:k,marginWidth:k,noResize:E,noHref:E,noShade:E,noWrap:E,object:null,profile:null,prompt:null,rev:null,rightMargin:k,rules:null,scheme:null,scrolling:D,standby:null,summary:null,text:null,topMargin:k,valueType:null,version:null,vAlign:null,vLink:null,vSpace:k,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:E,disablePictureInPicture:E,disableRemotePlayback:E,exportParts:j,part:A,prefix:null,property:null,results:k,security:null,unselectable:null},space:`html`,transform:ie}),oe=F({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:M,accentHeight:k,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:k,amplitude:k,arabicForm:null,ascent:k,attributeName:null,attributeType:null,azimuth:k,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:k,by:null,calcMode:null,capHeight:k,className:A,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:k,diffuseConstant:k,direction:null,display:null,dur:null,divisor:k,dominantBaseline:null,download:E,dx:null,dy:null,edgeMode:null,editable:null,elevation:k,enableBackground:null,end:null,event:null,exponent:k,externalResourcesRequired:null,fill:null,fillOpacity:k,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:j,g2:j,glyphName:j,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:k,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:k,horizOriginX:k,horizOriginY:k,id:null,ideographic:k,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:k,k,k1:k,k2:k,k3:k,k4:k,kernelMatrix:M,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:k,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:k,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:k,overlineThickness:k,paintOrder:null,panose1:null,path:null,pathLength:k,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:A,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:k,pointsAtY:k,pointsAtZ:k,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:M,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:M,rev:M,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:M,requiredFeatures:M,requiredFonts:M,requiredFormats:M,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:k,specularExponent:k,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:k,strikethroughThickness:k,string:null,stroke:null,strokeDashArray:M,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:k,strokeOpacity:k,strokeWidth:null,style:null,surfaceScale:k,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:M,tabIndex:k,tableValues:null,target:null,targetX:k,targetY:k,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:M,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:k,underlineThickness:k,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:k,values:null,vAlphabetic:k,vMathematical:k,vectorEffect:null,vHanging:k,vIdeographic:k,version:null,vertAdvY:k,vertOriginX:k,vertOriginY:k,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:k,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:re}),se=F({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=F({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:ie}),le=F({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),ue={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`},de=/[A-Z]/g,fe=/-[a-z]/g,pe=/^data[-\w.:]+$/i;function me(e,t){let n=S(t),r=t,i=C;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&pe.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(fe,ge);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!fe.test(e)){let n=e.replace(de,he);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=te}return new i(r,t)}function he(e){return`-`+e.toLowerCase()}function ge(e){return e.charAt(1).toUpperCase()}var _e=x([ne,ae,se,ce,le],`html`),ve=x([ne,oe,se,ce,le],`svg`);function ye(e){return e.join(` `).trim()}var be=/\/\*(?:[^*]|\*(?!\/))*\*\//g,xe=/\n/g,Se=/^\s*/,Ce=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,we=/^:\s*/,Te=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,Ee=/^[;\s]*/,De=`
1
+ import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,u as c}from"./src-BH3xIhRK.js";var l=c(s(),1),u=new Map([[`bold`,l.createElement(l.Fragment,null,l.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`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M216,64V192H40V64Z`,opacity:`0.2`}),l.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`,l.createElement(l.Fragment,null,l.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`,l.createElement(l.Fragment,null,l.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`,l.createElement(l.Fragment,null,l.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`,l.createElement(l.Fragment,null,l.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`}))]]),d=l.forwardRef((e,t)=>l.createElement(n,{ref:t,...e,weights:u}));d.displayName=`ListIcon`;function f(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var p=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,m=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,h={};function g(e,t){return((t||h).jsx?m:p).test(e)}var _=/[ \t\n\f\r]/g;function v(e){return typeof e==`object`?e.type===`text`&&y(e.value):y(e)}function y(e){return e.replace(_,``)===``}var b=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};b.prototype.normal={},b.prototype.property={},b.prototype.space=void 0;function x(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new b(n,r,t)}function S(e){return e.toLowerCase()}var C=class{constructor(e,t){this.attribute=t,this.property=e}};C.prototype.attribute=``,C.prototype.booleanish=!1,C.prototype.boolean=!1,C.prototype.commaOrSpaceSeparated=!1,C.prototype.commaSeparated=!1,C.prototype.defined=!1,C.prototype.mustUseProperty=!1,C.prototype.number=!1,C.prototype.overloadedBoolean=!1,C.prototype.property=``,C.prototype.spaceSeparated=!1,C.prototype.space=void 0;var w=r({boolean:()=>E,booleanish:()=>D,commaOrSpaceSeparated:()=>M,commaSeparated:()=>j,number:()=>k,overloadedBoolean:()=>O,spaceSeparated:()=>A}),T=0,E=N(),D=N(),O=N(),k=N(),A=N(),j=N(),M=N();function N(){return 2**++T}var ee=Object.keys(w),te=class extends C{constructor(e,t,n,r){let i=-1;if(super(e,t),P(this,`space`,r),typeof n==`number`)for(;++i<ee.length;){let e=ee[i];P(this,ee[i],(n&w[e])===w[e])}}};te.prototype.defined=!0;function P(e,t,n){n&&(e[t]=n)}function F(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new te(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[S(r)]=r,n[S(a.attribute)]=r}return new b(t,n,e.space)}var ne=F({properties:{ariaActiveDescendant:null,ariaAtomic:D,ariaAutoComplete:null,ariaBusy:D,ariaChecked:D,ariaColCount:k,ariaColIndex:k,ariaColSpan:k,ariaControls:A,ariaCurrent:null,ariaDescribedBy:A,ariaDetails:null,ariaDisabled:D,ariaDropEffect:A,ariaErrorMessage:null,ariaExpanded:D,ariaFlowTo:A,ariaGrabbed:D,ariaHasPopup:null,ariaHidden:D,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:A,ariaLevel:k,ariaLive:null,ariaModal:D,ariaMultiLine:D,ariaMultiSelectable:D,ariaOrientation:null,ariaOwns:A,ariaPlaceholder:null,ariaPosInSet:k,ariaPressed:D,ariaReadOnly:D,ariaRelevant:null,ariaRequired:D,ariaRoleDescription:A,ariaRowCount:k,ariaRowIndex:k,ariaRowSpan:k,ariaSelected:D,ariaSetSize:k,ariaSort:null,ariaValueMax:k,ariaValueMin:k,ariaValueNow:k,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function re(e,t){return t in e?e[t]:t}function ie(e,t){return re(e,t.toLowerCase())}var ae=F({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:j,acceptCharset:A,accessKey:A,action:null,allow:null,allowFullScreen:E,allowPaymentRequest:E,allowUserMedia:E,alpha:E,alt:null,as:null,async:E,autoCapitalize:null,autoComplete:A,autoFocus:E,autoPlay:E,blocking:A,capture:null,charSet:null,checked:E,cite:null,className:A,closedBy:null,colorSpace:null,cols:k,colSpan:k,command:null,commandFor:null,content:null,contentEditable:D,controls:E,controlsList:A,coords:k|j,crossOrigin:null,data:null,dateTime:null,decoding:null,default:E,defer:E,dir:null,dirName:null,disabled:E,download:O,draggable:D,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:E,formTarget:null,headers:A,height:k,hidden:O,high:k,href:null,hrefLang:null,htmlFor:A,httpEquiv:A,id:null,imageSizes:null,imageSrcSet:null,inert:E,inputMode:null,integrity:null,is:null,isMap:E,itemId:null,itemProp:A,itemRef:A,itemScope:E,itemType:A,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:E,low:k,manifest:null,max:null,maxLength:k,media:null,method:null,min:null,minLength:k,multiple:E,muted:E,name:null,nonce:null,noModule:E,noValidate:E,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:E,optimum:k,pattern:null,ping:A,placeholder:null,playsInline:E,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:E,referrerPolicy:null,rel:A,required:E,reversed:E,rows:k,rowSpan:k,sandbox:A,scope:null,scoped:E,seamless:E,selected:E,shadowRootClonable:E,shadowRootCustomElementRegistry:E,shadowRootDelegatesFocus:E,shadowRootMode:null,shadowRootSerializable:E,shape:null,size:k,sizes:null,slot:null,span:k,spellCheck:D,src:null,srcDoc:null,srcLang:null,srcSet:null,start:k,step:null,style:null,tabIndex:k,target:null,title:null,translate:null,type:null,typeMustMatch:E,useMap:null,value:D,width:k,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:A,axis:null,background:null,bgColor:null,border:k,borderColor:null,bottomMargin:k,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:E,declare:E,event:null,face:null,frame:null,frameBorder:null,hSpace:k,leftMargin:k,link:null,longDesc:null,lowSrc:null,marginHeight:k,marginWidth:k,noResize:E,noHref:E,noShade:E,noWrap:E,object:null,profile:null,prompt:null,rev:null,rightMargin:k,rules:null,scheme:null,scrolling:D,standby:null,summary:null,text:null,topMargin:k,valueType:null,version:null,vAlign:null,vLink:null,vSpace:k,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:E,disablePictureInPicture:E,disableRemotePlayback:E,exportParts:j,part:A,prefix:null,property:null,results:k,security:null,unselectable:null},space:`html`,transform:ie}),oe=F({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:M,accentHeight:k,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:k,amplitude:k,arabicForm:null,ascent:k,attributeName:null,attributeType:null,azimuth:k,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:k,by:null,calcMode:null,capHeight:k,className:A,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:k,diffuseConstant:k,direction:null,display:null,dur:null,divisor:k,dominantBaseline:null,download:E,dx:null,dy:null,edgeMode:null,editable:null,elevation:k,enableBackground:null,end:null,event:null,exponent:k,externalResourcesRequired:null,fill:null,fillOpacity:k,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:j,g2:j,glyphName:j,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:k,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:k,horizOriginX:k,horizOriginY:k,id:null,ideographic:k,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:k,k,k1:k,k2:k,k3:k,k4:k,kernelMatrix:M,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:k,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:k,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:k,overlineThickness:k,paintOrder:null,panose1:null,path:null,pathLength:k,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:A,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:k,pointsAtY:k,pointsAtZ:k,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:M,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:M,rev:M,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:M,requiredFeatures:M,requiredFonts:M,requiredFormats:M,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:k,specularExponent:k,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:k,strikethroughThickness:k,string:null,stroke:null,strokeDashArray:M,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:k,strokeOpacity:k,strokeWidth:null,style:null,surfaceScale:k,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:M,tabIndex:k,tableValues:null,target:null,targetX:k,targetY:k,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:M,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:k,underlineThickness:k,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:k,values:null,vAlphabetic:k,vMathematical:k,vectorEffect:null,vHanging:k,vIdeographic:k,version:null,vertAdvY:k,vertOriginX:k,vertOriginY:k,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:k,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:re}),se=F({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=F({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:ie}),le=F({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),ue={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`},de=/[A-Z]/g,fe=/-[a-z]/g,pe=/^data[-\w.:]+$/i;function me(e,t){let n=S(t),r=t,i=C;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&pe.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(fe,ge);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!fe.test(e)){let n=e.replace(de,he);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=te}return new i(r,t)}function he(e){return`-`+e.toLowerCase()}function ge(e){return e.charAt(1).toUpperCase()}var _e=x([ne,ae,se,ce,le],`html`),ve=x([ne,oe,se,ce,le],`svg`);function ye(e){return e.join(` `).trim()}var be=/\/\*(?:[^*]|\*(?!\/))*\*\//g,xe=/\n/g,Se=/^\s*/,Ce=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,we=/^:\s*/,Te=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,Ee=/^[;\s]*/,De=`
2
2
  `,Oe=`/`,ke=`*`,Ae=``,je=`comment`,Me=`declaration`;function Ne(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(xe);t&&(n+=t.length);var i=e.lastIndexOf(De);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(Se)}function u(e){for(var t;t=d();)e.push(t);return e}function d(){var t=a();if(Oe==e.charAt(0)&&ke==e.charAt(1)){for(var n=2;Ae!=e.charAt(n)&&(ke!=e.charAt(n)||Oe!=e.charAt(n+1));)++n;if(n+=2,Ae===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:je,comment:o})}}function f(){var e=a(),t=c(Ce);if(t){if(d(),!c(we))return s(`property missing ':'`);var n=c(Te),r=e({type:Me,property:t[0].replace(be,Ae).trim(),value:n?n[0].replace(be,Ae).trim():Ae});return c(Ee),r}}function p(){var e=[];u(e);for(var t;t=f();)e.push(t),u(e);return e}return l(),p()}function Pe(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=Ne(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 Fe=Le(`end`),Ie=Le(`start`);function Le(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 Re(e){let t=Ie(e),n=Fe(e);if(t&&n)return{start:t,end:n}}function ze(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Ve(e.position):`start`in e||`end`in e?Ve(e):`line`in e||`column`in e?Be(e):``}function Be(e){return He(e&&e.line)+`:`+He(e&&e.column)}function Ve(e){return Be(e&&e.start)+`-`+Be(e&&e.end)}function He(e){return e&&typeof e==`number`?e:1}var I=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=ze(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}};I.prototype.file=``,I.prototype.name=``,I.prototype.reason=``,I.prototype.message=``,I.prototype.stack=``,I.prototype.column=void 0,I.prototype.line=void 0,I.prototype.ancestors=void 0,I.prototype.cause=void 0,I.prototype.fatal=void 0,I.prototype.place=void 0,I.prototype.ruleId=void 0,I.prototype.source=void 0;var Ue={}.hasOwnProperty,We=new Map,Ge=/[A-Z]/g,Ke=/-([a-z])/g,qe=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Je=new Set([`td`,`th`]),Ye=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Xe(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=ot(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`?ve:_e,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Ze(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Ze(e,t,n){if(t.type===`element`)return Qe(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return $e(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return tt(e,t,n);if(t.type===`mdxjsEsm`)return et(e,t);if(t.type===`root`)return nt(e,t,n);if(t.type===`text`)return rt(e,t)}function Qe(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=ve,e.schema=i),e.ancestors.push(t);let a=pt(e,t.tagName,!1),o=ct(e,t),s=ut(e,t);return qe.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!v(e)})),it(e,o,a,t),at(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function $e(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)}mt(e,t.position)}function et(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);mt(e,t.position)}function tt(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=ve,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:pt(e,t.name,!0),o=lt(e,t),s=ut(e,t);return it(e,o,a,t),at(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function nt(e,t,n){let r={};return at(r,ut(e,t)),e.create(t,e.Fragment,r,n)}function rt(e,t){return t.value}function it(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function at(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function ot(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=Ie(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`&&Ue.call(t.properties,i)){let a=dt(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Je.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 lt(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 mt(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 mt(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function ut(e,t){let n=[],r=-1,i=e.passKeys?new Map:We;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=Ze(e,a,o);s!==void 0&&n.push(s)}return n}function dt(e,t,n){if(n==null||typeof n==`number`&&Number.isNaN(n))return;let r=me(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?f(n):ye(n)),r.property===`style`?[`style`,typeof n==`object`?e.stylePropertyNameCase===`dom`?n:ht(n):ft(e,String(n))]:[e.elementAttributeNameCase===`react`&&r.space?ue[r.property]||r.property:r.attribute,n]}function ft(e,t){let n={};try{Pe(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(Ke,vt))),n[i]=r}})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new I("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=Ye+`#cannot-parse-style-attribute`,r}return n}function pt(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=g(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=g(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Ue.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);mt(e)}function mt(e,t){let n=new I("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=Ye+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function ht(e){let t={},n;for(n in e)Ue.call(e,n)&&(t[gt(n)]=e[n]);return t}function gt(e){if(e.slice(0,2)===`--`)return e;let t=e.replace(Ge,_t);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function _t(e){return`-`+e.toLowerCase()}function vt(e,t){return t.toUpperCase()}var yt={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`]},bt={};function xt(e,t){let n=t||bt;return St(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function St(e,t,n){if(wt(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 Ct(e.children,t,n)}return Array.isArray(e)?Ct(e,t,n):``}function Ct(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=St(e[i],t,n);return r.join(``)}function wt(e){return!!(e&&typeof e==`object`)}var Tt=document.createElement(`i`);function Et(e){let t=`&`+e+`;`;Tt.innerHTML=t;let n=Tt.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function L(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 R(e,t){return e.length>0?(L(e,e.length,0,t),e):t}var Dt={}.hasOwnProperty;function Ot(e){let t={},n=-1;for(;++n<e.length;)kt(t,e[n]);return t}function kt(e,t){let n;for(n in t){let r=(Dt.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Dt.call(r,a)||(r[a]=[]);let e=i[a];At(r[a],Array.isArray(e)?e:e?[e]:[])}}}function At(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);L(e,0,0,r)}function jt(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 z(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var B=G(/[A-Za-z]/),V=G(/[\dA-Za-z]/),Mt=G(/[#-'*+\--9=?A-Z^-~]/);function Nt(e){return e!==null&&(e<32||e===127)}var Pt=G(/\d/),Ft=G(/[\dA-Fa-f]/),It=G(/[!-/:-@[-`{-~]/);function H(e){return e!==null&&e<-2}function U(e){return e!==null&&(e<0||e===32)}function W(e){return e===-2||e===-1||e===32}var Lt=G(/\p{P}|\p{S}/u),Rt=G(/\s/);function G(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function zt(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&V(e.charCodeAt(n+1))&&V(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 K(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return W(r)?(e.enter(n),s(r)):t(r)}function s(r){return W(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function Bt(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&W(t)?(e.enter(r),c(t)):l(t)}function c(t){return W(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var Vt={tokenize:Ht};function Ht(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`),K(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 H(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Ut=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){Wt(this,e,t,n,!1)}addBefore(e,t,n){Wt(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 Wt(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 Gt={tokenize:qt},Kt={tokenize:Jt};function qt(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 Ut;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(Kt,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(Kt,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 H(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 Ut;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 Jt(e,t,n){return K(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function q(e){if(e===null||U(e)||Rt(e))return 1;if(Lt(e))return 2}function Yt(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 Xt={name:`attention`,resolveAll:Zt,tokenize:Qt};function Zt(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};$t(o,-a),$t(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=R(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=R(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=R(r,Yt(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=R(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=R(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),L(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 Qt(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=q(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=q(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 $t(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var en={name:`autolink`,tokenize:tn};function tn(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 B(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||V(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||V(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||Nt(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Mt(t)?(e.consume(t),l):n(t)}function u(e){return V(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||V(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var nn={partial:!0,tokenize:rn};function rn(e,t,n){return r;function r(t){return W(t)?K(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||H(e)?t(e):n(e)}}var an={continuation:{tokenize:sn},exit:cn,name:`blockQuote`,tokenize:on};function on(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 W(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function sn(e,t,n){let r=this;return i;function i(t){return W(t)?K(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(an,t,n)(r)}}function cn(e){e.exit(`blockQuote`)}var ln={name:`characterEscape`,tokenize:un};function un(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 It(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var dn={name:`characterReference`,tokenize:fn};function fn(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=V,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=Ft,u):(e.enter(`characterReferenceValue`),a=7,o=Pt,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===V&&!Et(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 pn={partial:!0,tokenize:mn};function mn(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 hn={concrete:!0,name:`codeFenced`,tokenize:gn};function gn(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`),W(t)?K(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||H(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(pn,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||H(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):W(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),K(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||H(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||H(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&&W(t)?K(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||H(t)?e.check(pn,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||H(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`),W(t)?K(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`),W(t)?K(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||H(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var _n={name:`codeIndented`,tokenize:yn},vn={partial:!0,tokenize:bn};function yn(e,t,n){return r;function r(t){return e.enter(`codeIndented`),Bt(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):H(t)?e.attempt(vn,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||H(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function bn(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):H(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):Bt(e,t,a,`linePrefix`,4,4)(o)}function a(e){return H(e)?i(e):n(e)}}var xn={name:`codeText`,previous:Cn,resolve:Sn,tokenize:wn};function Sn(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 Cn(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function wn(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)):H(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||H(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 Tn=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&&En(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),En(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),En(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);En(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);En(this.left,t.reverse())}}}};function En(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 Dn(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Tn(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,On(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 L(e,0,1/0,u.slice(0)),!l}function On(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:Mn},An={partial:!0,tokenize:Nn};function jn(e){return Dn(e),e}function Mn(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):H(t)?e.check(An,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 Nn(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),K(e,a,`linePrefix`)}function a(i){if(i===null||H(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 Pn(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||Nt(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||H(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||U(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||Nt(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 Fn(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):H(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||H(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!W(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function In(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):H(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),K(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||H(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 Ln(e,t){let n;return r;function r(i){return H(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):W(i)?K(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Rn={name:`definition`,tokenize:Bn},zn={partial:!0,tokenize:Vn};function Bn(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Fn.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=z(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 U(t)?Ln(e,l)(t):l(t)}function l(t){return Pn(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(zn,d,d)(t)}function d(t){return W(t)?K(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||H(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Vn(e,t,n){return r;function r(t){return U(t)?Ln(e,i)(t):n(t)}function i(t){return In(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return W(t)?K(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||H(e)?t(e):n(e)}}var Hn={name:`hardBreakEscape`,tokenize:Un};function Un(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return H(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Wn={name:`headingAtx`,resolve:Gn,tokenize:Kn};function Gn(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`};L(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function Kn(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||U(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||H(n)?(e.exit(`atxHeading`),t(n)):W(n)?K(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||U(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var qn=`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(`.`),Jn=[`pre`,`script`,`style`,`textarea`],Yn={concrete:!0,name:`htmlFlow`,resolveTo:Zn,tokenize:Qn},Xn={partial:!0,tokenize:$n};function Zn(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 Qn(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:P):B(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):B(a)?(e.consume(a),i=4,r.interrupt?t:P):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:P):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 B(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||U(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Jn.includes(l)?(i=1,r.interrupt?t(s):O(s)):qn.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||V(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 W(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||B(t)?(e.consume(t),b):W(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||V(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):W(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):W(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||H(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||U(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||W(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||H(t)?O(t):W(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),F):t===63&&i===3?(e.consume(t),P):t===93&&i===5?(e.consume(t),te):H(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Xn,ne,k)(t)):t===null||H(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(pn,A,ne)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||H(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),P):O(t)}function N(t){return t===47?(e.consume(t),o=``,ee):O(t)}function ee(t){if(t===62){let n=o.toLowerCase();return Jn.includes(n)?(e.consume(t),F):O(t)}return B(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ee):O(t)}function te(t){return t===93?(e.consume(t),P):O(t)}function P(t){return t===62?(e.consume(t),F):t===45&&i===2?(e.consume(t),P):O(t)}function F(t){return t===null||H(t)?(e.exit(`htmlFlowData`),ne(t)):(e.consume(t),F)}function ne(n){return e.exit(`htmlFlow`),t(n)}}function $n(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(nn,t,n)}}var er={name:`htmlText`,tokenize:tr};function tr(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):B(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):B(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):H(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(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):H(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):H(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):H(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return B(t)?(e.consume(t),S):n(t)}function S(t){return t===45||V(t)?(e.consume(t),S):C(t)}function C(t){return H(t)?(o=C,N(t)):W(t)?(e.consume(t),C):M(t)}function w(t){return t===45||V(t)?(e.consume(t),w):t===47||t===62||U(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||B(t)?(e.consume(t),E):H(t)?(o=T,N(t)):W(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||V(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):H(t)?(o=D,N(t)):W(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):H(t)?(o=O,N(t)):W(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):H(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||U(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||U(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return W(t)?K(e,te,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):te(t)}function te(t){return e.enter(`htmlTextData`),o(t)}}var nr={name:`labelEnd`,resolveAll:or,resolveTo:sr,tokenize:cr},rr={tokenize:lr},ir={tokenize:ur},ar={tokenize:dr};function or(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&&L(e,0,e.length,n),e}function sr(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=R(o,e.slice(i+1,i+r+3)),o=R(o,[[`enter`,l,t]]),o=R(o,Yt(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=R(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=R(o,e.slice(a+1)),o=R(o,[[`exit`,s,t]]),L(e,i,e.length,o),e}function cr(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(z(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(rr,u,o?u:d)(t):t===91?e.attempt(ir,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(ar,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function lr(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 U(t)?Ln(e,a)(t):a(t)}function a(t){return t===41?u(t):Pn(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return U(t)?Ln(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?In(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return U(t)?Ln(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 ur(e,t,n){let r=this;return i;function i(t){return Fn.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(z(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function dr(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 fr={name:`labelStartImage`,resolveAll:nr.resolveAll,tokenize:pr};function pr(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 mr={name:`labelStartLink`,resolveAll:nr.resolveAll,tokenize:hr};function hr(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 gr={name:`lineEnding`,tokenize:_r};function _r(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),K(e,t,`linePrefix`)}}var vr={name:`thematicBreak`,tokenize:yr};function yr(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||H(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),W(t)?K(e,s,`whitespace`)(t):s(t))}}var J={continuation:{tokenize:Cr},exit:Tr,name:`list`,tokenize:Sr},br={partial:!0,tokenize:Er},xr={partial:!0,tokenize:wr};function Sr(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:Pt(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(vr,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 Pt(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(nn,r.interrupt?n:u,e.attempt(br,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return W(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 Cr(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(nn,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,K(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!W(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(xr,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,K(e,e.attempt(J,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function wr(e,t,n){let r=this;return K(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 Tr(e){e.exit(this.containerState.type)}function Er(e,t,n){let r=this;return K(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!W(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Dr={name:`setextUnderline`,resolveTo:Or,tokenize:kr};function Or(e,t){let n=new Ut,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`),W(t)?K(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||H(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Ar={tokenize:jr};function jr(e){let t=this,n=e.attempt(nn,r,e.attempt(this.parser.constructs.flowInitial,i,K(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 Mr={resolveAll:Ir()},Nr=Fr(`string`),Pr=Fr(`text`);function Fr(e){return{resolveAll:Ir(e===`text`?Lr: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 Ir(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 Lr(e,t){let n=new Ut,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 Rr=r({attentionMarkers:()=>Kr,contentInitial:()=>Br,disable:()=>qr,document:()=>zr,flow:()=>Hr,flowInitial:()=>Vr,insideSpan:()=>Gr,string:()=>Ur,text:()=>Wr}),zr={42:J,43:J,45:J,48:J,49:J,50:J,51:J,52:J,53:J,54:J,55:J,56:J,57:J,62:an},Br={91:Rn},Vr={[-2]:_n,[-1]:_n,32:_n},Hr={35:Wn,42:vr,45:[Dr,vr],60:Yn,61:Dr,95:vr,96:hn,126:hn},Ur={38:dn,92:ln},Wr={[-5]:gr,[-4]:gr,[-3]:gr,33:fr,38:dn,42:Xt,60:[en,er],91:mr,92:[Hn,ln],93:nr,95:Xt,96:xn},Gr={null:[Xt,Mr]},Kr={null:[42,95]},qr={null:[]};function Jr(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=R(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Yt(a,l.events,l),l.events):[]}function f(e,t){return Xr(p(e),t)}function p(e){return Yr(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){H(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&&L(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 Yr(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 Xr(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
3
  `;break;case-3:o=`\r
4
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 Zr(e){let t={constructs:Ot([Rr,...(e||{}).extensions||[]]),content:n(Vt),defined:[],document:n(Gt),flow:n(Ar),lazy:{},string:n(Nr),text:n(Pr)};return t;function n(e){return n;function n(n){return Jr(t,e,n)}}}function Qr(e){for(;!Dn(e););return e}var $r=/[\0\t\n\r]/g;function ei(){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;){$r.lastIndex=c;let n=$r.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 ti=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ni(e){return e.replace(ti,ri)}function ri(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return jt(n.slice(t?2:1),t?16:10)}return Et(n)||e}var ii={}.hasOwnProperty;function ai(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),oi(n)(Qr(Zr(n).document().write(ei()(e,t,!0))))}function oi(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(be),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(ge),blockQuote:o(de),characterEscape:E,characterReference:E,codeFenced:o(fe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(fe,s),codeText:o(pe,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(me),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(he),hardBreakEscape:o(_e),hardBreakTrailing:o(_e),htmlFlow:o(ve,s),htmlFlowData:E,htmlText:o(ve,s),htmlTextData:E,image:o(ye),label:s,link:o(be),listItem:o(Se),listItemValue:p,listOrdered:o(xe,f),listUnordered:o(xe),paragraph:o(Ce),reference:ie,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(ge),strong:o(we),thematicBreak:o(Ee)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:ue,autolinkProtocol:le,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:se,characterReference:ce,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(M),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(A),htmlFlowData:D,htmlText:l(j),htmlTextData:D,image:l(ee),label:P,labelText:te,lineEnding:O,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ae,resourceDestinationString:F,resourceTitleString:ne,resource:re,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};ci(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]),ii.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]||ui).call(o,void 0,e[0])}for(r.position={start:si(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:si(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:si(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+"` ("+ze({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||ui).call(this,e,r[0])),n.position.end=si(e.end)}function d(){return xt(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=z(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=Te(),n.position={start:si(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=si(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=si(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 A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function N(){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 ee(){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 te(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=ni(t),n.identifier=z(t).toLowerCase()}function P(){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 F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function re(){this.data.inReference=void 0}function ie(){this.data.referenceType=`collapsed`}function ae(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=z(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function oe(e){this.data.characterReferenceType=e.type}function se(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=jt(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Et(t);let i=this.stack[this.stack.length-1];i.value+=r}function ce(e){let t=this.stack.pop();t.position.end=si(e.end)}function le(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ue(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 fe(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function pe(){return{type:`inlineCode`,value:``,position:void 0}}function me(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function he(){return{type:`emphasis`,children:[],position:void 0}}function ge(){return{type:`heading`,depth:0,children:[],position:void 0}}function _e(){return{type:`break`,position:void 0}}function ve(){return{type:`html`,value:``,position:void 0}}function ye(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function be(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function xe(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function Se(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function Ce(){return{type:`paragraph`,children:[],position:void 0}}function we(){return{type:`strong`,children:[],position:void 0}}function Te(){return{type:`text`,value:``,position:void 0}}function Ee(){return{type:`thematicBreak`,position:void 0}}}function si(e){return{line:e.line,column:e.column,offset:e.offset}}function ci(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?ci(e,r):li(e,r)}}function li(e,t){let n;for(n in t)if(ii.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 ui(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+ze({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ze({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+ze({start:t.start,end:t.end})+`) is still open`)}function di(e){let t=this;t.parser=n;function n(n){return ai(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function fi(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 pi(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
@@ -29,4 +29,4 @@ import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,u as c}from"./src-BLVP
29
29
  `,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=Ps(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}$s.peek=ec;function $s(e){return e.value||``}function ec(){return`<`}tc.peek=nc;function tc(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 nc(){return`!`}rc.peek=ic;function rc(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 ic(){return`!`}ac.peek=oc;function ac(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 oc(){return"`"}function sc(e,t){let n=xt(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))}cc.peek=lc;function cc(e,t,n,r){let i=ks(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(sc(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
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 lc(e,t,n){return sc(e,n)?`<`:`[`}uc.peek=dc;function uc(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 dc(){return`[`}function fc(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 pc(e){let t=fc(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 mc(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function hc(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 gc(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?mc(n):fc(n),s=e.ordered?o===`.`?`)`:`.`:pc(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),hc(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 _c(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 vc(e,t,n,r){let i=_c(n),a=n.bulletCurrent||fc(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 yc(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function bc(e,t,n,r){if(!e.children.some(function(e){return vs(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function xc(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Sc.attention=Cc,Sc.peek=wc;function Sc(e,t,n,r){let i=n.enter(`phrasing`),a=qs([Gs(e,Cc,n,n.createTracker(r))],r.before,r.after);return i(),a}function Cc(e,t){return{construct:`strong`,markers:xc(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function wc(e,t,n){return n.options.strong||`*`}function Tc(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 Ec(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 Dc(e,t,n){let r=(hc(n)+(n.options.ruleSpaces?` `:``)).repeat(Ec(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Oc={blockquote:ys,break:Cs,code:Ds,definition:As,emphasis:Js,hardBreak:Cs,heading:Qs,html:$s,image:tc,imageReference:rc,inlineCode:ac,link:cc,linkReference:uc,list:gc,listItem:vc,paragraph:yc,root:bc,strong:Sc,text:Tc,thematicBreak:Dc};function kc(){return{enter:{table:Ac,tableData:Pc,tableHeader:Pc,tableRow:Mc},exit:{codeText:Fc,table:jc,tableData:Nc,tableHeader:Nc,tableRow:Nc}}}function Ac(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 Mc(e){this.enter({type:`tableRow`,children:[],position:void 0},e)}function Nc(e){this.exit(e)}function Pc(e){this.enter({type:`tableCell`,children:[],position:void 0},e)}function Fc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ic));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Ic(e,t){return t===`|`?t:e}function Lc(e){let{tableCellPadding:t,tablePipeAlign:n,stringLength:r}=e||{},i=t?` `:`|`;return{handlers:{inlineCode:d,table:a,tableCell:s,tableRow:o},join:[Rc],unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
31
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 hs(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=Oc.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 Rc(e,t,n,r){if(e.type===`table`&&n.type===`listItem`&&n.spread===!1&&(t.type===`definition`||t.type===`heading`&&zc(t,r)||t.type===`paragraph`||t.type===`table`))return 1}function zc(e,t){let n=!1;return ya(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)&&xt(e)&&(t.options.setext||n))}function Bc(){return{exit:{taskListCheckValueChecked:Hc,taskListCheckValueUnchecked:Hc,paragraph:Uc}}}function Vc(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:Wc}}}function Hc(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Uc(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 Wc(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=Oc.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 Gc(){return[Mo(),ns(),ss(),kc(),Bc()]}function Kc(e){return{extensions:[No(),rs(e),cs(),Lc(e),Vc()]}}var qc={tokenize:al,partial:!0},Jc={tokenize:ol,partial:!0},Yc={tokenize:sl,partial:!0},Xc={tokenize:cl,partial:!0},Zc={tokenize:ll,partial:!0},Qc={name:`wwwAutolink`,tokenize:rl,previous:ul},$c={name:`protocolAutolink`,tokenize:il,previous:dl},Z={name:`emailAutolink`,tokenize:nl,previous:fl},Q={};function el(){return{text:Q}}for(var tl=48;tl<123;)Q[tl]=Z,tl++,tl===58?tl=65:tl===91&&(tl=97);Q[43]=Z,Q[45]=Z,Q[46]=Z,Q[95]=Z,Q[72]=[Z,$c],Q[104]=[Z,$c],Q[87]=[Z,Qc],Q[119]=[Z,Qc];function nl(e,t,n){let r=this,i,a;return o;function o(t){return!pl(t)||!fl.call(r,r.previous)||ml(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return pl(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Zc,u,l)(t):t===45||t===95||V(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&&B(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function rl(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!ul.call(r,r.previous)||ml(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(qc,e.attempt(Jc,e.attempt(Yc,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function il(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&dl.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(B(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||Nt(t)||U(t)||Rt(t)||Lt(t)?n(t):e.attempt(Jc,e.attempt(Yc,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function al(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 ol(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Xc,c,s)(t):t===null||U(t)||Rt(t)||t!==45&&Lt(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 sl(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(Xc,t,a)(o):o===null||U(o)||Rt(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function cl(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||U(o)||Rt(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||U(e)||Rt(e)?t(e):r(e)}function a(e){return B(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):B(t)?(e.consume(t),o):n(t)}}function ll(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return V(e)?n(e):t(e)}}function ul(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||U(e)}function dl(e){return!B(e)}function fl(e){return!(e===47||pl(e))}function pl(e){return e===43||e===45||e===46||e===95||V(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 hl={tokenize:Cl,partial:!0};function gl(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:bl,continuation:{tokenize:xl},exit:Sl}},text:{91:{name:`gfmFootnoteCall`,tokenize:yl},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:_l,resolveTo:vl}}}}function _l(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=z(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 vl(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 yl(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||U(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(z(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return U(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 bl(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||U(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=z(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return U(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),K(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function xl(e,t,n){return e.check(nn,t,e.attempt(hl,t,n))}function Sl(e){e.exit(`gfmFootnoteDefinition`)}function Cl(e,t,n){let r=this;return K(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 wl(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&&L(o,o.length,0,Yt(s,e.slice(r+1,n),t)),L(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),L(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=q(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=q(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Tl=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){El(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 El(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 Dl(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 Ol(){return{flow:{null:{name:`table`,tokenize:kl,resolveAll:Al}}}}function kl(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):H(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):W(t)?K(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||U(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,W(t)?K(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 W(t)?K(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||H(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 W(t)?K(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||H(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||H(n)?(e.exit(`tableRow`),t(n)):W(n)?K(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||U(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 Al(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 Tl;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Ml(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=jl(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=jl(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=jl(f,t,o,i,n,d)):(o[0]=o[1],d=jl(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Ml(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=Dl(t.events,n))}return e}function jl(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Nl(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Nl(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=Nl(t.events,n[2]),a=Nl(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({},Nl(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Ml(e,t,n,r,i){let a=[],o=Nl(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 Nl(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Pl={name:`tasklistCheck`,tokenize:Il};function Fl(){return{text:{91:Pl}}}function Il(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 U(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 H(r)?t(r):W(r)?e.check({tokenize:Ll},t,n)(r):n(r)}}function Ll(e,t,n){return K(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Rl(e){return Ot([el(),gl(),wl(e),Ol(),Fl()])}var zl={};function Bl(e){let t=this,n=e||zl,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Rl(n)),a.push(Gc()),o.push(Kc(n))}var Vl="## Installation\n\nUse the hosted script on a plain HTML page. For bundled applications, the package setup is described below. Both integrations provide the same `JoyRide.mount()` API.\n\n### CDN\n\nAdd this script near the end of your page. No package manager or build step is needed.\n\n```html\n<script\n type=\"module\"\n src=\"https://unpkg.com/@joy-ride/joy-ride@latest/npm/embed.js\"\n data-jr-auto\n><\/script>\n```\n\n`data-jr-auto` starts the toy when the document is ready. For manual mounting, import the module entry:\n\n```html\n<script type=\"module\">\n import JoyRide from 'https://unpkg.com/@joy-ride/joy-ride@latest/npm/index.js';\n const ride = JoyRide.mount({ root: '#playground' });\n await ride.ready;\n console.log('Ready to drive');\n<\/script>\n```\n\nThe CDN module loads its adjacent styles and assets. The `@latest` URL redirects to a published version. Replace `latest` with a version number to pin a particular build; copy the complete distribution directory when self-hosting.\n\nTo load only when a client application needs the ride, use the browser module entry in a dynamic import. Put this inside an async event handler or client-side effect:\n\n```ts\nconst url = 'https://unpkg.com/@joy-ride/joy-ride@latest/npm/index.js';\nconst { default: JoyRide } = await import(/* @vite-ignore */ /* webpackIgnore: true */ url);\nconst ride = JoyRide.mount({ root: '#playground' });\n// Dispose this controller when the host view is removed.\n```\n\nThis avoids a runtime npm dependency and does not use `window.JoyRide`. Webpack and Vite each need the shown directive to leave the URL for the browser. A TypeScript-only package import, if used for types, is erased from the delivered JavaScript.\n\nFor an automatic initial entrance, mark the destination: `<div data-jr-arrive-to data-jr-arrive-to-delay-ms=\"1000\">Park here</div>`. The first marked element in document order is used after it has visible, stable layout and the optional delay has elapsed since mount. The car fades in while braking toward it. Without a marker, the embed skids into the viewport center from a random direction. A marked target that remains hidden or outside the viewport for two seconds falls back to that center entrance. Call `ride.arriveAt(...)` later for another entrance.\n\nThe marker accepts optional numeric attributes: `data-jr-arrive-to-delay-ms` (default `0`), `data-jr-arrive-to-angle-rad` (default `0`), `data-jr-arrive-to-distance-px` (default `185`), `data-jr-arrive-to-fade-fraction` (default `0.5`), `data-jr-arrive-to-steer` (default `0.04`), and `data-jr-arrive-to-speed-mps` (otherwise derived from the skid distance and vehicle). Leave the marker off when you want full control through `ride.arriveAt(...)`.\n\n### npm, pnpm, or Yarn\n\nThe root `@joy-ride/joy-ride` package is available on npm. Choose the command for your package manager:\n\n```sh\nnpm install @joy-ride/joy-ride\n```\n\n```sh\npnpm add @joy-ride/joy-ride\n```\n\n```sh\nyarn add @joy-ride/joy-ride\n```\n\nIn a client-side entry point, import the module and mount it after your page elements exist:\n\n```ts\nimport JoyRide from '@joy-ride/joy-ride';\n\nconst ride = JoyRide.mount({ root: '#playground' });\nawait ride.ready;\n\n// When your page or component is removed:\n// ride.dispose();\n```\n\nFor server-rendered applications, load and mount Joy Ride on the client. Continue with [Getting started](#jr-doc-getting-started) to author your first playground.\n\nThe `@joy-ride/joy-ride` import is the module API: it does not mount a ride or assign a browser global. `@joy-ride/joy-ride/embed` adds the browser global and optional `data-jr-auto` startup around that same API. `@joy-ride/joy-ride/bookmarklet` exports the embed and bookmarklet code helpers.\n\n## Getting started\n\nJoy Ride turns existing page elements into a driving playground. Start with a script and a few attributes, then add typed JavaScript whenever you need more control.\n\nHTML describes page objects, liquids, interaction zones, routes, and HUD readouts. JavaScript defines vehicles, liquid recipes, and slot assignments.\n\n### A playground in HTML\n\n```html\n<main id=\"playground\">\n <h1 data-jr-breakable data-jr-burnable>Make a mess.</h1>\n <div style=\"background: #fafbfc\">Your own layout</div>\n <div data-jr-liquid=\"paint\" data-jr-liquid-color=\"#5271ff\">Blue paint</div>\n <button data-jr-trigger=\"click\">Drive over me</button>\n <output data-jr-hud-speed>0</output> mph\n</main>\n\n<script\n type=\"module\"\n src=\"https://unpkg.com/@joy-ride/joy-ride@latest/npm/embed.js\"\n data-jr-auto\n><\/script>\n```\n\nThe embed entry exposes `window.JoyRide` after it loads. `data-jr-auto` explicitly mounts the toy after the document is ready. The normal module entry does neither; call `JoyRide.mount()` yourself when using it.\n\nEmpty capability attributes mean enabled. `true` enables and `false` disables. Numbers use plain decimal values. Options have explicit units where applicable: seconds, metres, metres per second, or CSS pixels.\n\n### A playground in JavaScript\n\n```ts\nimport JoyRide from '@joy-ride/joy-ride';\n\nconst ride = JoyRide.mount({\n root: '#playground',\n options: { audio: { 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\n### Lifecycle and readiness\n\n`JoyRide.mount()` returns a controller immediately. Register bindings and event subscriptions while it initializes. Await `ride.ready` before spawning, pouring, reading `ride.player`, or issuing other world commands. Tours and playback await readiness internally.\n\nThere is one mounted page runtime at a time. `JoyRide.active` is its controller, or `undefined`. Dispose it before mounting another. `ride.dispose()` is idempotent, releases owned listeners/resources, and restores owned page presentation. Initialization failure rejects readiness and releases acquired resources. Commands on a disposed playground fail; `ride.state` becomes `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## Runtime API\n\n### Mount options\n\n`JoyRide.mount(options?: EmbedOptions | PlaygroundConfiguration): EmbedController` starts the browser host. It also accepts a parsed, versioned configuration returned by `ride.exportConfiguration()`.\n\n| Option | Meaning |\n| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `root` | Selector or connected Element limiting authored objects, bindings, and action targets. Defaults to the document. An Element root cannot be exported portably. |\n| `definitions` | Optional catalog of `objects`, `liquids`, `vehicles`, and `routes`. |\n| `player` | Initial `{ vehicle, appearance?, slots? }`. Identity and driver ownership are managed by the runtime. |\n| `bindings` | Initial array of `{ target: selector, spec: ObjectPatch }`. |\n| `routes` | Explicit route ID → `RouteSpec` map, in addition to catalog or HTML routes. IDs must be unique. |\n| `options` | Grouped runtime options: `audio`, `rendering`, `policy`, `ui`, `camera`, `lighting`, and `autoPaint`. See [Runtime options](#jr-doc-runtime-options). |\n| `workMode` | SFW defaults, branding, allowed dialog tabs, and presentation/policy defaults. Explicit runtime options take precedence. |\n| `foregroundSelector` | Matching host UI stays above the vehicle/effects overlay. |\n| `screenShakeProfiles` | Per-event shake strength, duration, and frequency overrides. |\n| `canPlaceManually` | Enable manual vehicle placement/dragging. |\n| `recordingUiMode` | `'playback'` or `'record'`; defaults to playback controls. |\n| `shadowDom` | Isolate the embed UI from host styles. Defaults to `true`. |\n| `hudMode` | Optional built-in canvas HUD colour mode, `'light'` or `'dark'`. |\n| `hudLinks` | Additional built-in HUD links/actions supplied by the host. Function callbacks are host dependencies. |\n\nHost presentation overrides outside the portable configuration schema cause a strict export error; see Export and errors. Unknown mount properties fail rather than being ignored.\n\n### Controller properties\n\n| Property | Value |\n| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `ride.ready` | `Promise<EmbedController>` resolving after player configuration and initial setup. |\n| `ride.player` | The player `VehicleHandle`, or `null` after player removal. Requires readiness. |\n| `ride.state` | Readonly `{ playerId, focusVehicleId, player, points }`, or `null` before readiness/after disposal. Focus and player ownership are separate. |\n| `ride.options` | Deeply readonly grouped `RuntimeOptions` snapshot. |\n\nUse `ride.getVehicle(id)` for a specific vehicle; it returns a handle or `null`. There is no implicit AI fallback for `ride.player`.\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(target)` | A readonly object snapshot or `null`. An Element identifies its record; a string means its stable `data-jr-id`, **not a selector**. |\n| `ride.on(event, listener)` | An unsubscribe function. Events and custom typing are covered in HUD and events. |\n| `ride.spawn(options)` | A new `VehicleHandle`; see Vehicles and slots. |\n| `ride.pour(liquid, options)` | Deposit simulated liquid; see Liquids and definitions. |\n| `ride.route(id, spec)` | A `PlaygroundRouteHandle`; see Zones and routes. |\n| `ride.update(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 route 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.arriveAt(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.startTour(stops, options?)` | `Promise<boolean>`; start a player tour. |\n| `ride.stopTour()` | Cancel the player tour. |\n| `ride.driveVehicleTo(id, target, options?)` | `Promise<boolean>`; drive a specific vehicle to one target. |\n| `ride.tourVehicle(id, targets, options?)` | `Promise<boolean>`; tour with a specific vehicle. |\n| `ride.startRecording()` | `boolean`; begin capturing player input when the world is available and not paused/already recording. |\n| `ride.stopRecording()` | A `JoyRideRecording`, or `null`. |\n| `ride.playRecording(recording, options?)` | `Promise<boolean>`; validate and restore recorded vehicle/material configuration, then replay. |\n| `ride.stopPlayback()` | Stop replaying input. |\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.listPresets()` | Built-in and browser-saved editable vehicle presets. |\n| `JoyRide.listVehicleOptions()` | Labels/IDs for preset pickers. |\n| `JoyRide.getPreset(id)` | An editable catalog preset or `undefined`; includes explicit browser overrides. Mounted definition recipes resolve independently of those saved overrides. |\n| `JoyRide.resolveWorkMode(configuration?)` | Resolve standard/SFW defaults and explicit work-mode customizations. |\n| `JoyRide.options` / `JoyRide.options.presets.sfw(overrides?)` | Start with safe-for-work defaults and apply your own mount options. |\n| `JoyRide.vehicleTools` | Tool metadata for building controls. |\n| `JoyRide.availableVehicleTools(enabledTools?, weaponsEnabled?)` | Filter tool metadata for a policy. |\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## Objects and bindings\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` | Nonnegative points awarded for the object. |\n| `paint` | Paint pickup capability; see Textures and paint. |\n| `trigger` | Zone preset/options; see Zones and routes. |\n| `hud` | One readout `{ field, unit?, precision? }`, or `false`. |\n| `meta` | JSON-compatible application metadata; available on object snapshots/events. |\n\nBreakable DOM artwork supports text and SVG **root** artwork. Arbitrary SVG paths cannot individually carry fragmentation or zone behaviour. Solidity and generic HUD elements have broader target support. Liquid paint accepts HTML elements and individual filled SVG shapes (`rect`, `circle`, `ellipse`, `path`, and polygons). Trigger, crushable, combustible, and pushable adapters require HTML elements. Unsupported targets reject with a diagnostic instead of silently doing nothing.\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` is the current readonly list of matching registered snapshots. A snapshot has `id`, `target`, `spec`, and `revision`. `update` merges into this binding's local layer; `replace` replaces that entire layer. Disposing removes it. There is no separate binding 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` / `data-jr-object` | Stable ID / named object recipe. |\n| `data-jr-enabled` | Boolean suspension. |\n| `data-jr-solid` / `data-jr-pushable` | Boolean capabilities. |\n| `data-jr-points` | Nonnegative points. |\n| `data-jr-breakable` / `data-jr-breakable-health` | Fragmentation and 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` / `data-jr-combustible-health` | Fuel lifecycle and 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` / `data-jr-crushable-scale` / `data-jr-crushable-opacity` | Crushing and its appearance. |\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\n## Liquids in HTML\n\n```html\n<div data-jr-liquid=\"paint\" style=\"background: #5271ff\">Take some blue</div>\n<div data-jr-liquid=\"oil\"></div>\n<svg viewBox=\"0 0 100 100\" width=\"100\" height=\"100\">\n <circle data-jr-liquid=\"paint\" cx=\"50\" cy=\"50\" r=\"42\" fill=\"#e03139\" />\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\nEvery authored liquid uses the ground-liquid solver and the named recipe's handling, burning, and electrical properties. HTML starts at its border-box outline, including rounded corners and CSS transforms; an SVG shape starts at its actual filled outline. Both hold that outline until tire contact deforms them without adding volume. The authored fill is hidden while the liquid is active, while HTML text and other content remain native above it. With `autoPaint: true`, eligible colored SVG shape fills join colored HTML backgrounds. Paint is the liquid family that also exchanges pigment with tires. Use `ride.pour` or an emitter for liquid placed independently of an element.\n\n## Debris\n\nProcedural paper, crumpled paper, wrappers, leaves, and fine colored powder share a seeded airflow simulation. Vehicles displace nearby pieces and shed decaying wake vortices. Each material has its own lift, drag, friction, and settling rate. Paper flips and folds; crumpled pieces roll. Dust is a soft powder bed reconstructed from overlapping density volumes. Passing cars lift and roll it through the shared airflow; gravity deposits it at its new location. Powder mass persists, so clouds thin as they spread rather than fading away. Mineral glints respond to moving facets and vehicle lights.\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 all five materials.\n kinds: ['paper', 'crumpled-paper', 'trash', 'leaf', 'dust'],\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, an Element, or an iterable of elements. It places an independent collection at each matching element. It does not turn that element into a rigid body. Current and future selector matches are tracked; removed elements release their debris. `ride.bind('.track', { debris: { amount: 35, anchor: 'bottom' } })` uses the same HTML/definition system. HTML debris requires a mounted game.\n\n| Option | HTML attribute | Meaning |\n| ------------------- | ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `amount` | `data-jr-debris-amount` | Integer 0–600 per source, default 30; scene cap 3,000. For dust, counts powder patches rather than individual grains. |\n| `kinds` | `data-jr-debris-kinds` | `paper`, `crumpled-paper`, `trash`, `leaf`, `dust`; space/comma separated in HTML. Omit for all. |\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; useful for colored powder. |\n| `glint` | `data-jr-debris-glint` | Powder sparkle 0–1, default 0.12. Use 0 to disable it. Highlights catch available daylight and vehicle lights; settled powder does not twinkle on a timer. |\n| `wind.x` / `wind.y` | `data-jr-debris-wind-x` / `data-jr-debris-wind-y` | Ambient air in scene pixels/second; default `{x:7,y:-2}`. Set both axes in HTML. |\n\n`reset()` restores a source's seeded arrangement; `gust({x,y})` adds a decaying air impulse; `dispose()` removes that registration. Scene reset restores authored debris along with the initial liquids and objects. Checkpoints preserve debris motion and source ownership. Offscreen resting particles sleep; visible settled pieces use cached procedural artwork. Paper uses a curved mesh with independently sprung bending axes and torsion; edges can curl back over the sheet instead of moving as a rigid plane. Airborne folds remain dynamic vectors and every renderer honors device density.\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 a canvas world or level editor, import `Debris` from `@joy-ride/game/debris`, call `scatter({x,y,width,height}, options)`, and feed `step(seconds, vehicles, viewport, walls)` scene-pixel geometry. The game renderer exposes its shared instance at `world.renderer.debris`; its normal loop already advances and paints it. The pure simulation has no DOM dependency. `drawDebris(context, particles, viewport, dark, layer, lights?)` is available from the same export for custom Canvas hosts; draw the `ground` layer before vehicles and the `air` layer after. Optional lights use scene-pixel `SmokeLight` geometry, shared with vehicle smoke lighting.\n\n## Vehicles and slots\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 companion = ride.spawn({\n vehicle: 'artist',\n driver: 'follow',\n at: { x: 300, y: 500 },\n angleDeg: 90,\n});\n```\n\n`VehicleSpawnOptions` extends `VehicleConfiguration` with `at?: Element | {x,y}` and `angleDeg?: number`. `vehicle` is a built-in or named recipe. `id?` supplies a unique ID. `driver?` is `'player'`, `'idle'`, `'follow'`, `'flee'`, or `'pursue'`; spawned vehicles default to idle. Only one player is allowed. 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.\n\n### Vehicle handles and snapshots\n\n| Member | Meaning |\n| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `handle.id` | Stable vehicle identity. |\n| `handle.state` | Deeply readonly `{ id, vehicle, driver, position, speedMps, health, maxHealth, appearance, slots }`. Materials use authored names. Unknown host-supplied drivers report `'custom'`. |\n| `handle.update(patch)` | Validate the whole candidate before changing it. Recipe switches rebase appearance/slots; option-only patches retain the current vehicle and driver. |\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 a slot.\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. Slots are filtered through the same policy, availability, reserves, and ghost rules for player, JS, AI, and replay. Direct `ride.pour` is scene authoring, independent of vehicle reserves. There are no HTML vehicle/weapon-slot attributes.\n\n### Lightning and electrical fields\n\nSlot **7** holds the SFW lightning tool by default. Holding empties a 1.1-second reserve while an electrical field gathers around the car and narrows toward the closest breakable, burnable, pushable object or vehicle within one third of the visible viewport width by default. An explicit `lightning.rangeM` keeps a fixed metre-based reach. Targeting favors objects in front of the vehicle, with closer side/rear objects available as fallbacks; `forwardBias: 0` restores nearest-only selection. The discharge fires when the reserve empties. Releasing early cancels it. Recovery uses the ordinary weapon reserve; disabling cooldown retains the charge time with unlimited ammunition.\n\nVehicles within reach receive an `electrified` status: current speed is halved immediately, with a constant 0.5 speed/drive-force modifier for four seconds. Repeated shocks refresh the status rather than multiplying slowdowns. Ghost vehicles and the shooter are excluded; shocks never damage vehicle health. The existing status store handles expiry, resets and checkpoints.\n\nConfigure a vehicle's optional `lightning` profile in code:\n\n```ts\nconst definitions = JoyRide.definePlayground({\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/game/vehicles`. Movable targets receive a directed shove away from the firing vehicle, including objects that are pushable but not breakable. Damage, impulse and ignition enter the same `AreaImpact` response used by rockets, respecting authored breakable/burnable capabilities. Advanced hosts can use `rocketAreaImpact` / `rocketImpactDefaults` from `@joy-ride/game/physics` and `SceneGeometry.applyAreaImpact` to reuse that response. Debug rendering shows the vehicle's lightning influence circle.\n\nConductive liquids carry a discharge through connected wet cells in the same fixed step, including across patch seams. Objects at the wet edge receive the same area impact, and vehicles touching the connected water are electrified even beyond the initial range. Dry gaps and nonconductive materials block propagation. Set `conductive: true` or `false` in a liquid definition to override the base material; the connectivity graph is shared with liquid fire and sampled only at discharge.\n\nThe attractor in slot **6** uses the same electrical simulation and retains its existing pull physics. Its soft, circular atmospheric glow matches the influence radius; current and suspended mist flow inward with occasional faint electrical crackle. Channels are born in scene space and remain there as the vehicle moves through them; camera movement only changes projection. Electrified vehicles excite the surrounding medium rather than wearing a sprite-shaped electrical outline.\n\nA connected lightning strike sends a white-blue return stroke from the target back along the actual channel, flashes the complete path, then leaves a 1.5-second afterglow. Electrical fragments reuse the shared spark pool. The single camera impulse respects `screenShake`; its `lightning` profile can be overridden with `screenShakeProfiles` alongside the existing collision and explosion profiles.\n\n## Definitions and liquids\n\n### Catalogs and inheritance\n\n`JoyRide.define({ objects?, liquids?, vehicles?, routes? })` 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 routes: { delivery: { stops: ['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### 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 `<div 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/game`.\n\n### Pouring liquid\n\n```ts\nride.pour('ink', { at: document.querySelector('#paint-zone')!, amount: 24 });\nride.pour('water', { at: { x: 300, y: 500 }, amount: 12 });\n```\n\n`ride.pour(liquid, {at, amount?, color?})` resolves a catalog liquid, converts document placement, and deposits it. 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### 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. Use the garage editor for complete image/physics presets.\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`, `cooldownSeconds`. |\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`, `starter`, `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## Zones and routes\n\n### Trigger presets\n\n```html\n<button data-jr-trigger=\"click\">Click on arrival</button>\n<input type=\"checkbox\" data-jr-trigger=\"check\" />\n<span data-jr-trigger=\"pickup\" data-jr-trigger-event=\"coin-collected\">●</span>\n<div data-jr-trigger=\"parking\" data-jr-trigger-dwell-seconds=\"0.6\">Park here</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### 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`, `parking`; root `data-jr-trigger` accepts the same shorthand. |\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), `'all'`, `'ai'`. |\n| `target` | `data-jr-trigger-target` | Selector resolving exactly one action target in the root. |\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\nOptional phase classes use space-separated tokens. They work identically through HTML, selector bindings, and exact-element JS bindings:\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 credited route stop. |\n\n`TriggerPhase` is `'idle' | 'entered' | 'dwelling' | 'success'`. Parking normally moves through entered → dwelling → success. Moving or pausing interrupts dwell. A pass-through emits entered → success without dwelling. An ineligible route stop or disabled action target never reports a false success.\n\nOnly the current phase's configured tokens are applied. No classes are added by default. An empty string clears a class option. Unrelated host classes are preserved; configured tokens are restored on reset, unbind, disable, or disposal. Checkpoint restoration restores presentation without replaying actions.\n\nSuccess remains visible after departure. A new visit rearms a repeat-per-visit trigger; completed route stops and once-per-vehicle/scene triggers retain success until reset. With multiple eligible vehicles, the element shows success before dwelling before entered; each event's `state.phase` describes its own vehicle.\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### Declarative routes\n\n```html\n<section data-jr-route=\"delivery\" data-jr-route-order=\"ordered\">\n <div data-jr-id=\"collect\" data-jr-trigger=\"parking\">Collect</div>\n <div data-jr-id=\"deliver\" data-jr-trigger>Drive through to deliver</div>\n</section>\n```\n\n`data-jr-route` names the wrapper's route. Descendant triggers supply its stops, excluding nested routes. `data-jr-route-order` is `ordered` or `any`; `data-jr-route-progress` is `vehicle` or `scene`; `data-jr-route-event` adds a completion event.\n\n### JavaScript routes and handles\n\n```ts\nconst delivery = ride.route('delivery', {\n order: 'ordered',\n progress: 'vehicle',\n stops: ['collect', { target: 'deliver', when: 'stop', dwellSeconds: 0.6 }],\n});\nconsole.log(delivery.state);\ndelivery.reset();\ndelivery.dispose();\n```\n\n`RouteSpec` has `stops` (required, nonempty, unique stable IDs), `order?: 'ordered' | 'any'`, `progress?: 'vehicle' | 'scene'`, and `event?`. An individual stop is an ID or `{target, when?, dwellSeconds?, maxSpeedMps?}`. `target` here is an object ID, not a CSS selector.\n\n`PlaygroundRouteHandle` exposes `id`, readonly `state` rows `{vehicleId, completed, total, complete}`, `reset()`, and `dispose()`. Ordered routes credit the next stop; any-order routes require every distinct stop. Missing/disabled stops suspend progression. Active runs retain their membership until reset/reconfiguration. Paused/hidden time does not count toward dwell. Routes observe progress; tours drive vehicles.\n\n## HUD and events\n\n### Declarative HUD\n\n```html\n<output data-jr-hud-speed data-jr-hud-unit=\"kmh\" data-jr-hud-precision=\"1\">0</output>\n<output data-jr-hud-fps>0</output>\n<output data-jr-hud-rpm>0</output>\n<output data-jr-hud-gear>N</output>\n<output data-jr-hud-health>0</output>\n<output data-jr-hud-points>0</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('route:complete', ({ route, vehicle }) => {\n celebrate(route.id, vehicle?.id);\n});\nride.on('object:break', ({ object }) => console.log(object.id, object.spec.meta));\nride.on('reset', () => {\n setCollectedCoins([]);\n setButtonPresses(0);\n});\nunsubscribe();\n```\n\nTargets dispatch bubbling `CustomEvent`s prefixed with `joyride:`. The JS subscription omits that prefix. Subscribe at the playground root 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| `route:progress`, `route:complete` | `{route:{id,completed,total,complete}, vehicle?}` and trigger context when available. |\n| `vehicle:change` | `{vehicle}` containing the readonly vehicle snapshot. |\n| `state:change` | The readonly `PlaygroundState` snapshot. |\n| `tour:change` | `{phase,stopIndex,selector?}` for player tour progression. |\n| `recording:end` | `{recording,reason}`; reason is `manual` or `placement`. |\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 settings dialog reset, and **C / Reset screen** share the same scene reset. The runtime restores its objects, consumed pickups, trigger phases/classes, route progress, and native checkbox/switch values without replaying click handlers. A vehicle already inside a zone must leave and return before it can trigger again, so a restored pickup stays visible beneath a parked car. It then dispatches `joyride:reset` at the playground root. Use this event (or `ride.on('reset', …)`) to clear application-owned counters, controlled React inputs, and other effects of your callbacks. Authored attributes, bindings, definitions, and settings stay in place. `session.handle.clearEffects()` remains an effects-only fade.\n\n### Custom event typing\n\n```ts\ndeclare module '@joy-ride/joy-ride' {\n interface PlaygroundEventMap {\n 'coin-collected': { object: { id: string } };\n }\n}\nride.on('coin-collected', ({ object }) => collect(object.id));\n```\n\nConfigure `trigger.event` or `route.event` with an application event name. Trigger events carry trigger details; route completion events carry route details. Host code can also dispatch its own bubbling `CustomEvent('joyride:coin-collected', {detail, bubbles:true})`. Augment `PlaygroundEventMap` to type its payload accurately.\n\n## Runtime options\n\n### Updating options\n\n```ts\nride.update({\n audio: { masterVolume: 0.5 },\n rendering: { quality: 'medium' },\n camera: { speedZoom: false },\n lighting: { headlights: true },\n});\nconsole.log(ride.options.audio.masterVolume);\n```\n\nUse the same grouped shape under `mount({options})`. Updates merge by group and validate before commit. `root`, definitions, initial bindings, and player creation do not belong in mutable runtime options.\n\n### Audio, rendering, and camera\n\n| Group | Fields and defaults |\n| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `audio` | `masterVolume: 1` (0…1), `idleSound: true`. Audio activation still requires a gesture. |\n| `rendering` | `quality: 'high'` (`low`, `medium`, `high`), `smokeTint: 'natural'` (`natural`, `cyan`, `magenta`), `sparks: true`, `deform: true`, `screenShake: true`, `surfaceTone: 'auto'` (`auto`, `light`, `dark`), `debug: false`. |\n| `camera` | `viewportWalls: true`, `speedZoom: 'auto'` (`auto`, `true`, `false`). |\n| `autoPaint` | Top-level boolean, default false. Opt into bounded pickup from suitable existing coloured backgrounds. |\n\nAutomatic paint evaluates perceptual OKLCH chroma and lightness, so colored buttons\nand filled SVG shapes can become paint while neutral UI, pale tints, and nearly black backgrounds stay\nordinary elements. Absolute CSS Color 4 inputs, including named colors, HSL, OKLCH,\nand Display P3, resolve consistently in Node and browsers. Opacity and element-size\nlimits still apply.\n\n`surfaceTone` controls tire/mark contrast; per-vehicle `appearance` controls vehicle contrast. They are distinct settings.\n\n### Policy, UI, and lighting\n\nRendering defaults to high quality. Smoke, ghost vapor, fire, and liquids follow the selected `rendering.quality`; changing it updates active fluid layers. Ghost vapor also scales its silhouette emission detail with quality, without multiplying its total dye emission.\n\n| Group | Fields and defaults |\n| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `policy` | `weaponCooldown: true`, `vehicleDestructible: true`, `weaponsEnabled: true`, `enabledTools` (all standard tool IDs), `rocketBlastStrength: 1` (0…10). |\n| `ui` | `showHud: false`, `showTotalPoints: true`, `showHealthBars: true`, `showVehicleMarkers: true`, `showWeaponBar: true`. |\n| `lighting` | `underglow: false`, `underglowColor: '#66e6ff'`, `underglowOpacity: 0.6`, `headlights: true`, `taillights: true`, `brakeLights: true`. |\n\nLighting colour is six-digit hex and opacity is 0…1. Tool IDs are `eject`, `machineGun`, `flamethrower`, `rocket`, `ghost`, `attractor`, `lightning`, and `boost`. Policy changes filter actual actions rather than merely hiding buttons.\n\n### Work mode and dialog tabs\n\n```ts\nconst ride = JoyRide.mount(\n JoyRide.options.presets.sfw({\n workMode: { brandName: 'Take a drive' },\n player: { vehicle: 'electric-gt' },\n }),\n);\n```\n\n`workMode` accepts `sfw`, `showHud`, `showHealthBars`, `showWeaponBar`, `showLogo`, `showGithub`, `allowVehicleEditing`, `vehicleTabs`, `vehicleDestructible`, `weaponsEnabled`, `enabledTools`, `brandColor`, and `brandName`.\n\nSFW mode supplies passive, neutral defaults: no logo/GitHub/editing, no vehicle destruction, and a restricted tool list. Explicit work-mode fields override that preset; grouped runtime options override applicable work-mode defaults. Tab names, in display order, are `vehicle`, `objects`, `weapons`, `controls`, `ai`, `settings`, `embed`, and `documentation`. Explicit tab lists control availability; AI/embed panels additionally require their host integration.\n\n`JoyRide.options.presets.sfw(overrides)` returns ordinary mount options with `workMode.sfw: true`. Pass the result to `JoyRide.mount()` and override individual work-mode fields, definitions, player, or other mount options without repeating the preset defaults. The Tools tab retains the `weapons` API ID.\n\n## Tours and recordings\n\n### Tours and driving tasks\n\n```ts\nawait ride.startTour(\n [\n { selector: '#hello', pauseAfter: 600 },\n { selector: '#roundabout', donuts: 2 },\n ],\n { entry: 'left', speedPxPerSecond: 220 },\n);\n\nawait ride.driveVehicleTo(companion.id, '#finish', { clockwise: true });\nawait ride.tourVehicle(companion.id, ['#hello', '#finish']);\n```\n\n`TourTarget` is a selector, Element, `{selector,donuts?,pauseAfter?,padding?}`, or `{element,donuts?,pauseAfter?,padding?}`. Pauses are milliseconds; padding is CSS pixels.\n\n`TourOptions` accepts `entry`, `speedPxPerSecond`, `clockwise`, and `viewportWalls`. Entry names are `upper-left`, `upper-middle`, `upper-right`, `left`, `right`, `lower-left`, `lower-middle`, `lower-right`. Per-vehicle tours omit `entry`. Tours use physical controls and can fail when targets cannot be measured/planned; the Promise resolves to false. Manual driving can interrupt automation.\n\n### Recording and playback\n\n```ts\nride.startRecording();\n// Drive with the normal controls.\nconst recording = ride.stopRecording();\nif (recording) await ride.playRecording(recording, { startAudio: false });\nride.stopPlayback();\n```\n\nRecording format `joy-ride-recording`, version 2, captures initial pose/velocity, viewport scale and walls, timed key transitions, the full vehicle preset, appearance, slots, and required material definitions. Playback restores the recorded vehicle through the canonical configuration command and imports materials without overwriting host recipes.\n\n`RecordingPlaybackOptions` accepts `startAt?: {xPx,yPx,angleRad?}` and `startAudio?: boolean`. The recording does not capture arbitrary host application state, DOM event outcomes, or an entire webpage. Same-world checkpoints are a separate opaque engine feature.\n\n### Keyboard controls\n\nWASD/arrows drive; Space drifts; Shift boosts/charges a burnout launch. Number keys 1–9 activate the assigned slots. U toggles underglow, H horns, R invokes recording controls, C cleans effects, F highlights targets, P pauses, and Escape exits/closes controls. `JoyRide.keyboardControls` is the source for host-owned labels and key-code bindings.\n\n## Export and errors\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\nFormat `joy-ride-playground`, version 1, contains a selector root, definitions, player configuration, selector bindings, explicit routes, grouped options, and work mode. Authored names are exported instead of private engine material IDs. HTML declarations and host application state stay with the host page; exports are configuration rather than GPU/world checkpoints.\n\n`exportConfiguration()` is strict: Element roots, exact-element bindings, internal object overrides, or unsupported host-only presentation options cause `NonSerializableDependencyError`. Its `code` is `JR_NON_SERIALIZABLE_DEPENDENCY` and `dependencies` lists `{path,reason}`. No dependencies silently disappear.\n\n### Embed and bookmarklet helpers\n\n```ts\nimport {\n fullEmbedCode,\n asyncEmbedCode,\n npmEmbedCode,\n bookmarkletUrl,\n} from '@joy-ride/joy-ride/bookmarklet';\n\nconst configuration = ride.exportConfiguration();\nconst html = fullEmbedCode(configuration);\nconst asyncCdn = asyncEmbedCode(configuration);\nconst npm = npmEmbedCode(configuration);\nconst bookmark = bookmarkletUrl(configuration);\n```\n\nAll helpers use the same portable configuration. The HTML helper supplies a button that dynamically loads the module on first click and toggles the ride. The async CDN helper loads the runtime on demand without a package dependency; the npm helper shows a bundler import. The bookmarklet toggles a mounted runtime. Importing helpers does not mount the toy.\n\nThe lower-level `@joy-ride/game/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\nHost listener failures are reported without stopping physics. Internal simulation faults explicitly fail/stop the clock rather than replaying effects or leaving an apparently running loop with no scheduled frame. Use `ride.ready.catch` for initialization errors and `ride.on('diagnostic', ...)` for integration diagnostics.\n\n### Public TypeScript contracts\n\n`@joy-ride/joy-ride` exports types for `EmbedOptions`, `EmbedController`, `PlaygroundEventMap`, `PlaygroundState`, `ObjectSpec`, `ObjectPatch`, `PlayerConfiguration`, `VehicleConfiguration`, `VehiclePatch`, `VehicleHandle`, `VehicleSpawnOptions`, `RuntimeOptions`, `RuntimeOptionsPatch`, `PlaygroundConfiguration`, `Appearance`, `SlotNumber`, and `DeepReadonly`.\n\nThe game schema entry additionally provides catalog, trigger, route, 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## React and engine integrations\n\n### React browser host\n\nThe `JoyRide` export from `@joy-ride/ui` is the advanced React host. It accepts the same definitions, bindings and registry, and owns canvas UI integration. Its `onReady(world, registry)` callback and `JoyRideHandle.getPlayground()` expose the integration runtime. Prefer the browser facade for ordinary site setup.\n\nThe Objects tab is a live inspector for enabled physical objects and interaction targets. Pass `objects={joyrideRef.current?.getPlayground()?.objects}` to `VehiclePopover` (the homepage and standalone embed do this automatically). It supports search/type filters, image/SVG/text previews, Show with the same glint as the F shortcut, Drive to with the short `arriveAt` entrance, resetting one object's damage/deformation/trigger state, and removal from the simulation while retaining the host HTML. Show closes the dialog and interrupts camera following. Pass `onDriveToObject` to enable Drive to in a custom React host. Reset leaves world-wide trails and already emitted particles in place.\n\n`getPlayground().objects` implements `SceneObjectInspector`: `getSnapshot()`, `subscribe(listener)`, `getTarget(id)`, `reveal(id)`, `reset(id)`, and `remove(id)`. The underlying page runtime also exposes `resetObject(id)` and `removeObject(id)`. Removal sets an object-scoped `enabled: false` override; it does not delete the DOM node or stop the simulation. Disabled objects disappear from the inspector. Reset scene restores objects removed through the inspector; unrelated authoring overrides remain intact. Inspector removal ownership also follows same-page checkpoints. `SceneObject`, `SceneObjectPreview`, and `SceneObjectInspector` are exported types from `@joy-ride/browser`.\n\nThe `VehiclePopover` export from `@joy-ride/ui` provides the dialog, `initialTab`, and host callbacks. `workMode.vehicleTabs` controls visible tabs, including `documentation`. The React entry exposes these building blocks. Their props describe presentation rather than portable JSON.\n\n| Export | Purpose |\n| -------------------------------------------------------- | ------------------------------------------------------------------------------ |\n| `JoyRide` | React canvas/controls adapter for a browser session; forwards `JoyRideHandle`. |\n| `CanvasDrive` / `renderCanvasDriveHud` | Canvas-owned level host and optional HUD drawing helper. |\n| `VehiclePopover` | Configurable dialog, tabs, garage callbacks, recording and AI controls. |\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| `CodeBlock` | Highlighted, escaped, copyable code examples. |\n| `Toolbar` / `ToolbarButton` | Shared host controls. |\n| `RecordingBadge` / `RecordingPath` / `RecordingProgress` | Optional recording status, path preview, and playback progress. |\n| `recordingUi` | Adapt a recording session and handle into dialog actions. |\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 game 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?)` owns its world, clock, input listeners, placement, tours, recordings, and acquired resources. It imports no React or UI components. `handle` provides engine commands; `touchChange(controls)` accepts touch/host controls. `update(patch)` applies live options and `dispose()` releases the session. For overlay sessions, `onReady(world, registry)` runs after construction and is suppressed if disposal happens first.\n\nOptions include preset/mode, overlay presentation, work-mode defaults, grouped engine presentation controls, bindings/definitions, supplied playground/audio instances, spawn targets, initial marks/puddles, and lifecycle callbacks. `BrowserSessionOptions` is the complete typed contract. Mount-only fields are readonly and cannot change through `BrowserSessionUpdate`; construct another session to change its canvas/world identity. Optional presentation sinks provide a toolbar element, `onPresent(time, world, sound)`, and a safe camera frame. The browser session owns the sole frame clock.\n\n`session.handle` exposes lighting (`setLighting`, `getLighting`, `toggleLight`), audio (`startAudio`), tours (`startTour`, `stopTour`, `driveVehicleTo`, `tourVehicle`), vehicle access (`getVehicle`, `watchVehicle`, `getPresetId`, `setPreset`), geometry (`getCarAnchor`, `getPose`, `getPathView`), effects (`clearEffects`, `reset`, `addLiquid`, `ejectLiquid`), distance (`getDistance`, `resetDistance`, `cycleDistanceDpi`), recording (`startRecording`, `stopRecording`, `playRecording`, `stopPlayback`, `getRecordingState`), placement (`resetTo`, `parkAt`, `arriveAt`), checkpoints (`saveState`, `restoreState`), companions (`spawnCompanion`, `updateCompanion`, `removeCompanion`), 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. Companion offsets use metres. Distance readouts include their calibrated display unit. `vehicleReadout` produces shared HUD data without owning a clock.\n\n`arriveAt` is available on both the standalone embed controller (`ride.arriveAt`) and the browser/React session handle (`session.handle.arriveAt`). It places the player car behind an element or document point and starts the entire visible entrance with the handbrake engaged. Set `delayMs` to wait before the entrance begins; the default is immediate. The entry speed is predicted from the requested skid distance and the car's physics unless `initialSpeedMps` is supplied. When an explicit speed needs a shorter stopping distance, the arrival also applies the service brake; the handbrake remains on. `fadeFraction` makes the car and new skid marks fade together over that fraction of the predicted stop duration (`0.5` means the first half). Driver input or disposal cancels a pending entrance. The promise resolves to `completed`, `interrupted`, or `unavailable`.\n\n```ts\nawait ride.arriveAt({\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, optional HUD, and controls; it does not own physics or browser input state.\n\nThe vehicle hover toolbar quits the simulation for the player and removes only the hovered car for AI vehicles. Supply `onCompanionRemove(id)` to keep a host-owned fleet in sync; otherwise React removes the companion through the session handle. Custom presentations receive the hovered vehicle through `onToolbarTarget`. The built-in AI spawn controls choose a random preset other than the player's current car; explicitly authored vehicle presets remain supported by the JavaScript API.\n\n### Canvas-owned worlds\n\n```ts\nimport { CanvasWorld } from '@joy-ride/game';\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`, `speedZoom`, `speedZoomMinimumScale`, `cameraLock`, `cameraSmoothing`, `pauseShortcut`, work-mode 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`, `setSpeedZoom` | 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/game` keeps its default entry small: `Simulation`, `GameWorld`, `CanvasWorld`, `definePlayground`, `createPlaygroundConfiguration`, and `parsePlaygroundConfiguration`, with their core configuration types. For a site playground, use `@joy-ride/joy-ride`; 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/game/engine` | World/clock/checkpoint ownership, canvas levels/scenes, geometry conversions, work-mode defaults, and host event helpers. |\n| `@joy-ride/game/simulation` | Simulation state, controls, vector math, and driving geometry. |\n| `@joy-ride/game/vehicles` | Vehicle presets/catalog, entities, slots, tools, stats, sprite geometry, and status effects. |\n| `@joy-ride/game/playground` | Authored contracts, canonical validation/composition/attribute parsing, registries, zones, HUD, runtime options, and portable configuration. |\n| `@joy-ride/game/rendering` | Renderer host integration, lighting, overlay layers, and presentation option types. |\n| `@joy-ride/game/physics` | DOM contacts, liquid definitions, collision-mask queries, and combustible lifecycle configuration. |\n| `@joy-ride/game/audio` | Engine audio integration. |\n| `@joy-ride/game/input` | Keyboard controls, recording capture/playback, and recording sessions. |\n| `@joy-ride/game/tour` | Physical driving routes and tour contracts. |\n| `@joy-ride/game/tutorial` | Optional tutorial orchestration, canvas tutorials, and callout contracts. |\n\nThese engine objects own mutable simulation state. Shaders, artwork caches, individual source-file paths, and vendor modules are implementation details and are not exported. Use portable configuration when saving a playground.\n\n`GameWorld.configureVehicle` is the shared live configuration command. `saveState()` produces a same-world `GameCheckpoint` with `restore()`, `available`, and `dispose()`. Checkpoints include engine resources and are not JSON; dispose unused checkpoints. `GameLoop` runs physics updates at 120 Hz in real time and one presentation callback per frame, with explicit failure state/restart behaviour.\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\n## Slow motion\n\nHold **V** while driving to enter slow-mo; release to return to normal speed. The defaults are half speed, a 300 ms ramp in either direction, and no additional camera zoom. The ramp runs in real time. Physics and input keep updating at 120 Hz, including at extreme slow-mo factors; each update advances a smaller amount of game time. Rendering continues every animation frame. Engine, tire, liquid and weapon sounds lower in pitch and playback rate together.\n\nReact refs and browser sessions expose the same command:\n\n```ts\nride.current?.setSlowMo(true, {\n speedFactor: 0.5,\n rampMs: 300,\n zoomFactor: 1.1,\n curve: 'ease-in-out',\n});\nride.current?.setSlowMo(false);\n```\n\nFor the standalone embed, use `await ride.setSlowMo(true, options)`. A `CanvasWorld` exposes `setSlowMo(active, options)` too. Advanced hosts can configure `world.slowMo`, call `start()` / `stop()`, and map each fixed real-time tick through `world.advanceTime()` when constructing their `GameLoop`. Browser and canvas hosts already do this.\n\n`speedFactor` is greater than zero and at most 1; `rampMs` is nonnegative; `zoomFactor` is between 0 and 4; 0 disables extra zoom. Curves are `linear`, `ease-in`, `ease-out`, and `ease-in-out`. Options persist between uses. Changing options or reversing the effect starts a fresh ramp from the current speed and zoom. Pausing freezes the ramp; losing focus releases the keyboard action. Slow-mo is a live presentation effect; input recordings retain their simulation-step timing.\n\n### Crush appearance and paint\n\nAny ordinary HTML element can use `data-jr-crushable`. Crushing happens once the visible vehicle silhouette covers at least half of the element’s area; grazing an edge is not enough. Coverage follows CSS rotation and scale. Add `data-jr-crushed-class=\"is-crushed\"` to own its crushed appearance in CSS; omit it to retain the default squash and fade. Add `data-jr-crushed-paint-color=\"#8caa27\"` to release paint beneath it when the element is crushed. The amount follows the element’s transformed area. A compact wet core grows outward over roughly 200 ms using the normal paint mixing, tire pickup and deformation systems; rotation does not inflate the footprint. Pigments accept six-digit hex colors (or RGB tuples in JavaScript).\n\nThe full capability option names, `data-jr-crushable-crushed-class` and `data-jr-crushable-crushed-paint-color`, are also supported. They map to the same `crushedClass` and `crushedPaintColor` options as the short forms above.\n\n```html\n<div data-jr-crushable data-jr-crushed-class=\"is-crushed\" data-jr-crushed-paint-color=\"#8caa27\">\n Your element\n</div>\n```\n\nThe equivalent binding is `playground.bind(element, { crushable: { crushedClass: 'is-crushed', crushedPaintColor: '#8caa27' } })`. Both options are independent and optional. Reset restores the original styling and removes only classes added by the engine. Ant artwork and its CSS swap are site example code, not engine object types.\n";function Hl(e){let t=io().use(di).use(Bl).parse(e),n=new Map,r=t.children.filter(e=>e.type===`heading`).map(e=>{let t=xt(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 $=Hl(Vl),Ul=[Bl],Wl={ts:`typescript`,js:`javascript`,sh:`shell`,bash:`shell`},Gl=new Set([`javascript`,`typescript`,`jsx`,`tsx`,`html`,`css`,`json`,`shell`,`text`]),Kl=(0,l.memo)(function({chapter:e}){let t=(0,l.useMemo)(()=>{let t=({node:t,children:n,...r})=>{let i=e.headings.find(e=>e.line===t?.position?.start.line),a=`h${i?.depth??2}`;return(0,X.jsx)(a,{...r,id:i?.id,tabIndex:-1,children:n})};return{h2:t,h3:t,h4:t,pre({children:e}){let t=l.Children.toArray(e).find(l.isValidElement);if(!t)return(0,X.jsx)(`pre`,{children:e});let n=t.props,r=n.className?.replace(`language-`,``)??`text`,a=Wl[r]??r;return typeof n.children==`string`?(0,X.jsx)(i,{code:n.children.replace(/\n$/,``),language:Gl.has(a)?a:`text`,compact:!0,maxHeight:320}):(0,X.jsx)(`pre`,{children:e})},table({children:e}){return(0,X.jsx)(`div`,{className:`joy-docs-table`,tabIndex:0,role:`region`,"aria-label":`API reference table`,children:(0,X.jsx)(`table`,{children:e})})},a({href:e,children:t,node:n,...r}){let i=e?.startsWith(`https://`);return(0,X.jsx)(`a`,{...r,href:e,target:i?`_blank`:void 0,rel:i?`noreferrer`:void 0,children:t})}}},[e]);return(0,X.jsx)(`div`,{className:`joy-docs-prose prose`,children:(0,X.jsx)(yo,{remarkPlugins:Ul,components:t,skipHtml:!0,children:e.markdown})})}),ql=(0,l.memo)(function({location:t,onNavigate:n}){let r=$.find(e=>e.id===t.chapter)??$[0],i=(0,l.useRef)(null),a=(0,l.useRef)(null),[s,c]=(0,l.useState)(!1),[u,f]=(0,l.useState)(t.anchor||r.id),p=(0,l.useRef)(!1),m=(e,t)=>{p.current=!0,f(t),c(!1),n({chapter:e,anchor:t})};return(0,l.useLayoutEffect)(()=>{let e=i.current,n=e?.querySelector(`#${t.anchor||r.id}`);e&&n&&(e.scrollTop+=n.getBoundingClientRect().top-e.getBoundingClientRect().top-20,p.current&&n.focus({preventScroll:!0}),p.current=!1)},[t,r.id]),(0,X.jsxs)(`div`,{className:`joy-docs`,onKeyDown:e=>{e.key===`Escape`&&s&&(e.preventDefault(),e.stopPropagation(),c(!1),a.current?.focus())},children:[(0,X.jsxs)(e,{ref:a,variant:`outline`,size:`sm`,className:`joy-docs-browse`,"aria-expanded":s,"aria-controls":`jr-docs-navigation`,onClick:()=>c(e=>!e),children:[(0,X.jsx)(d,{}),` Browse API `,(0,X.jsx)(o,{})]}),(0,X.jsxs)(`nav`,{id:`jr-docs-navigation`,className:`joy-docs-navigation`,"aria-label":`API documentation`,"data-open":s,children:[(0,X.jsx)(`p`,{className:`joy-docs-nav-label`,children:`Reference`}),(0,X.jsx)(`ul`,{className:`joy-docs-chapters`,children:$.map(e=>(0,X.jsxs)(`li`,{children:[(0,X.jsx)(`a`,{className:`joy-docs-chapter`,href:`#${e.id}`,"aria-current":r.id===e.id?`page`:void 0,onClick:t=>{t.preventDefault(),m(e.id,e.id)},children:e.title}),r.id===e.id&&(0,X.jsx)(`ul`,{className:`joy-docs-sections`,children:e.headings.filter(e=>e.depth===3).map(t=>(0,X.jsx)(`li`,{children:(0,X.jsx)(`a`,{className:`joy-docs-section`,href:`#${t.id}`,"aria-current":u===t.id?`location`:void 0,onClick:n=>{n.preventDefault(),m(e.id,t.id)},children:t.title})},t.id))})]},e.id))})]}),(0,X.jsxs)(`article`,{ref:i,className:`joy-docs-article`,"aria-label":r.title,onScroll:()=>{let e=i.current;if(!e)return;let t=e.getBoundingClientRect().top+64,n=r.id;for(let i of r.headings){let r=e.querySelector(`#${i.id}`);r&&r.getBoundingClientRect().top<=t&&(n=i.id)}f(n)},onClick:e=>{let t=e.target instanceof Element?e.target.closest(`a[href^="#jr-doc-"]`):null;if(!t)return;let n=t.getAttribute(`href`).slice(1),r=$.find(e=>e.headings.some(e=>e.id===n));r&&(e.preventDefault(),m(r.id,n))},children:[(0,X.jsx)(Kl,{chapter:r}),(0,X.jsx)(`p`,{className:`joy-docs-next`,children:$[$.indexOf(r)+1]&&(0,X.jsxs)(e,{variant:`outline`,onClick:()=>{let e=$[$.indexOf(r)+1];m(e.id,e.id)},children:[`Next: `,$[$.indexOf(r)+1].title,` →`]})})]})]})});export{ql as Documentation};
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 hs(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=Oc.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 Rc(e,t,n,r){if(e.type===`table`&&n.type===`listItem`&&n.spread===!1&&(t.type===`definition`||t.type===`heading`&&zc(t,r)||t.type===`paragraph`||t.type===`table`))return 1}function zc(e,t){let n=!1;return ya(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)&&xt(e)&&(t.options.setext||n))}function Bc(){return{exit:{taskListCheckValueChecked:Hc,taskListCheckValueUnchecked:Hc,paragraph:Uc}}}function Vc(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:Wc}}}function Hc(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Uc(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 Wc(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=Oc.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 Gc(){return[Mo(),ns(),ss(),kc(),Bc()]}function Kc(e){return{extensions:[No(),rs(e),cs(),Lc(e),Vc()]}}var qc={tokenize:al,partial:!0},Jc={tokenize:ol,partial:!0},Yc={tokenize:sl,partial:!0},Xc={tokenize:cl,partial:!0},Zc={tokenize:ll,partial:!0},Qc={name:`wwwAutolink`,tokenize:rl,previous:ul},$c={name:`protocolAutolink`,tokenize:il,previous:dl},Z={name:`emailAutolink`,tokenize:nl,previous:fl},Q={};function el(){return{text:Q}}for(var tl=48;tl<123;)Q[tl]=Z,tl++,tl===58?tl=65:tl===91&&(tl=97);Q[43]=Z,Q[45]=Z,Q[46]=Z,Q[95]=Z,Q[72]=[Z,$c],Q[104]=[Z,$c],Q[87]=[Z,Qc],Q[119]=[Z,Qc];function nl(e,t,n){let r=this,i,a;return o;function o(t){return!pl(t)||!fl.call(r,r.previous)||ml(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return pl(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Zc,u,l)(t):t===45||t===95||V(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&&B(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function rl(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!ul.call(r,r.previous)||ml(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(qc,e.attempt(Jc,e.attempt(Yc,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function il(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&dl.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(B(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||Nt(t)||U(t)||Rt(t)||Lt(t)?n(t):e.attempt(Jc,e.attempt(Yc,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function al(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 ol(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Xc,c,s)(t):t===null||U(t)||Rt(t)||t!==45&&Lt(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 sl(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(Xc,t,a)(o):o===null||U(o)||Rt(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function cl(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||U(o)||Rt(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||U(e)||Rt(e)?t(e):r(e)}function a(e){return B(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):B(t)?(e.consume(t),o):n(t)}}function ll(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return V(e)?n(e):t(e)}}function ul(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||U(e)}function dl(e){return!B(e)}function fl(e){return!(e===47||pl(e))}function pl(e){return e===43||e===45||e===46||e===95||V(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 hl={tokenize:Cl,partial:!0};function gl(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:bl,continuation:{tokenize:xl},exit:Sl}},text:{91:{name:`gfmFootnoteCall`,tokenize:yl},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:_l,resolveTo:vl}}}}function _l(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=z(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 vl(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 yl(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||U(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(z(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return U(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 bl(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||U(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=z(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return U(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),K(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function xl(e,t,n){return e.check(nn,t,e.attempt(hl,t,n))}function Sl(e){e.exit(`gfmFootnoteDefinition`)}function Cl(e,t,n){let r=this;return K(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 wl(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&&L(o,o.length,0,Yt(s,e.slice(r+1,n),t)),L(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),L(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=q(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=q(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Tl=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){El(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 El(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 Dl(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 Ol(){return{flow:{null:{name:`table`,tokenize:kl,resolveAll:Al}}}}function kl(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):H(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):W(t)?K(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||U(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,W(t)?K(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 W(t)?K(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||H(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 W(t)?K(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||H(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||H(n)?(e.exit(`tableRow`),t(n)):W(n)?K(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||U(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 Al(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 Tl;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Ml(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=jl(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=jl(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=jl(f,t,o,i,n,d)):(o[0]=o[1],d=jl(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Ml(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=Dl(t.events,n))}return e}function jl(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Nl(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Nl(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=Nl(t.events,n[2]),a=Nl(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({},Nl(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Ml(e,t,n,r,i){let a=[],o=Nl(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 Nl(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Pl={name:`tasklistCheck`,tokenize:Il};function Fl(){return{text:{91:Pl}}}function Il(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 U(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 H(r)?t(r):W(r)?e.check({tokenize:Ll},t,n)(r):n(r)}}function Ll(e,t,n){return K(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Rl(e){return Ot([el(),gl(),wl(e),Ol(),Fl()])}var zl={};function Bl(e){let t=this,n=e||zl,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Rl(n)),a.push(Gc()),o.push(Kc(n))}var Vl="## Installation\n\nUse the hosted script on a plain HTML page. For bundled applications, the package setup is described below. Both integrations provide the same `JoyRide.mount()` API.\n\n### CDN\n\nAdd this script near the end of your page. No package manager or build step is needed.\n\n```html\n<script\n type=\"module\"\n src=\"https://unpkg.com/@joy-ride/joy-ride@latest/npm/embed.js\"\n data-jr-auto\n><\/script>\n```\n\n`data-jr-auto` starts the toy when the document is ready. For manual mounting, import the module entry:\n\n```html\n<script type=\"module\">\n import JoyRide from 'https://unpkg.com/@joy-ride/joy-ride@latest/npm/index.js';\n const ride = JoyRide.mount({ root: '#playground' });\n await ride.ready;\n console.log('Ready to drive');\n<\/script>\n```\n\nThe CDN module loads its adjacent styles and assets. The `@latest` URL redirects to a published version. Replace `latest` with a version number to pin a particular build; copy the complete distribution directory when self-hosting.\n\nTo load only when a client application needs the ride, use the browser module entry in a dynamic import. Put this inside an async event handler or client-side effect:\n\n```ts\nconst url = 'https://unpkg.com/@joy-ride/joy-ride@latest/npm/index.js';\nconst { default: JoyRide } = await import(/* @vite-ignore */ /* webpackIgnore: true */ url);\nconst ride = JoyRide.mount({ root: '#playground' });\n// Dispose this controller when the host view is removed.\n```\n\nThis avoids a runtime npm dependency and does not use `window.JoyRide`. Webpack and Vite each need the shown directive to leave the URL for the browser. A TypeScript-only package import, if used for types, is erased from the delivered JavaScript.\n\nFor an automatic initial entrance, mark the destination: `<div data-jr-arrive-to data-jr-arrive-to-delay-ms=\"1000\">Park here</div>`. The first marked element in document order is used after it has visible, stable layout and the optional delay has elapsed since mount. The car fades in while braking toward it. Without a marker, the embed skids into the viewport center from a random direction. A marked target that remains hidden or outside the viewport for two seconds falls back to that center entrance. Call `ride.arriveAt(...)` later for another entrance.\n\nThe marker accepts optional numeric attributes: `data-jr-arrive-to-delay-ms` (default `0`), `data-jr-arrive-to-angle-rad` (default `0`), `data-jr-arrive-to-distance-px` (default `185`), `data-jr-arrive-to-fade-fraction` (default `0.5`), `data-jr-arrive-to-steer` (default `0.04`), and `data-jr-arrive-to-speed-mps` (otherwise derived from the skid distance and vehicle). Leave the marker off when you want full control through `ride.arriveAt(...)`.\n\n### npm, pnpm, or Yarn\n\nThe root `@joy-ride/joy-ride` package is available on npm. Choose the command for your package manager:\n\n```sh\nnpm install @joy-ride/joy-ride\n```\n\n```sh\npnpm add @joy-ride/joy-ride\n```\n\n```sh\nyarn add @joy-ride/joy-ride\n```\n\nIn a client-side entry point, import the module and mount it after your page elements exist:\n\n```ts\nimport JoyRide from '@joy-ride/joy-ride';\n\nconst ride = JoyRide.mount({ root: '#playground' });\nawait ride.ready;\n\n// When your page or component is removed:\n// ride.dispose();\n```\n\nFor server-rendered applications, load and mount Joy Ride on the client. Continue with [Getting started](#jr-doc-getting-started) to author your first playground.\n\nThe `@joy-ride/joy-ride` import is the module API: it does not mount a ride or assign a browser global. `@joy-ride/joy-ride/embed` adds the browser global and optional `data-jr-auto` startup around that same API. `@joy-ride/joy-ride/bookmarklet` exports the embed and bookmarklet code helpers.\n\n## Getting started\n\nJoy Ride turns existing page elements into a driving playground. Start with a script and a few attributes, then add typed JavaScript whenever you need more control.\n\nHTML describes page objects, liquids, interaction zones, routes, and HUD readouts. JavaScript defines vehicles, liquid recipes, and slot assignments.\n\n### A playground in HTML\n\n```html\n<main id=\"playground\">\n <h1 data-jr-breakable data-jr-burnable>Make a mess.</h1>\n <div style=\"background: #fafbfc\">Your own layout</div>\n <div data-jr-liquid=\"paint\" data-jr-liquid-color=\"#5271ff\">Blue paint</div>\n <button data-jr-trigger=\"click\">Drive over me</button>\n <output data-jr-hud-speed>0</output> mph\n</main>\n\n<script\n type=\"module\"\n src=\"https://unpkg.com/@joy-ride/joy-ride@latest/npm/embed.js\"\n data-jr-auto\n><\/script>\n```\n\nThe embed entry exposes `window.JoyRide` after it loads. `data-jr-auto` explicitly mounts the toy after the document is ready. The normal module entry does neither; call `JoyRide.mount()` yourself when using it.\n\nEmpty capability attributes mean enabled. `true` enables and `false` disables. Numbers use plain decimal values. Options have explicit units where applicable: seconds, metres, metres per second, or CSS pixels.\n\n### A playground in JavaScript\n\n```ts\nimport JoyRide from '@joy-ride/joy-ride';\n\nconst ride = JoyRide.mount({\n root: '#playground',\n options: { audio: { 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\n### Lifecycle and readiness\n\n`JoyRide.mount()` returns a controller immediately. Register bindings and event subscriptions while it initializes. Await `ride.ready` before spawning, pouring, reading `ride.player`, or issuing other world commands. Tours and playback await readiness internally.\n\nThere is one mounted page runtime at a time. `JoyRide.active` is its controller, or `undefined`. Dispose it before mounting another. `ride.dispose()` is idempotent, releases owned listeners/resources, and restores owned page presentation. Initialization failure rejects readiness and releases acquired resources. Commands on a disposed playground fail; `ride.state` becomes `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## Runtime API\n\n### Mount options\n\n`JoyRide.mount(options?: EmbedOptions | PlaygroundConfiguration): EmbedController` starts the browser host. It also accepts a parsed, versioned configuration returned by `ride.exportConfiguration()`.\n\n| Option | Meaning |\n| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `root` | Selector or connected Element limiting authored objects, bindings, and action targets. Defaults to the document. An Element root cannot be exported portably. |\n| `definitions` | Optional catalog of `objects`, `liquids`, `vehicles`, and `routes`. |\n| `player` | Initial `{ vehicle, appearance?, slots? }`. Identity and driver ownership are managed by the runtime. |\n| `bindings` | Initial array of `{ target: selector, spec: ObjectPatch }`. |\n| `routes` | Explicit route ID → `RouteSpec` map, in addition to catalog or HTML routes. IDs must be unique. |\n| `options` | Grouped runtime options: `audio`, `rendering`, `policy`, `ui`, `camera`, `lighting`, and `autoPaint`. See [Runtime options](#jr-doc-runtime-options). |\n| `workMode` | SFW defaults, branding, allowed dialog tabs, and presentation/policy defaults. Explicit runtime options take precedence. |\n| `foregroundSelector` | Matching host UI stays above the vehicle/effects overlay. |\n| `screenShakeProfiles` | Per-event shake strength, duration, and frequency overrides. |\n| `canPlaceManually` | Enable manual vehicle placement/dragging. |\n| `recordingUiMode` | `'playback'` or `'record'`; defaults to playback controls. |\n| `shadowDom` | Isolate the embed UI from host styles. Defaults to `true`. |\n| `hudMode` | Optional built-in canvas HUD colour mode, `'light'` or `'dark'`. |\n| `hudLinks` | Additional built-in HUD links/actions supplied by the host. Function callbacks are host dependencies. |\n\nHost presentation overrides outside the portable configuration schema cause a strict export error; see Export and errors. Unknown mount properties fail rather than being ignored.\n\n### Controller properties\n\n| Property | Value |\n| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `ride.ready` | `Promise<EmbedController>` resolving after player configuration and initial setup. |\n| `ride.player` | The player `VehicleHandle`, or `null` after player removal. Requires readiness. |\n| `ride.state` | Readonly `{ playerId, focusVehicleId, player, points }`, or `null` before readiness/after disposal. Focus and player ownership are separate. |\n| `ride.options` | Deeply readonly grouped `RuntimeOptions` snapshot. |\n\nUse `ride.getVehicle(id)` for a specific vehicle; it returns a handle or `null`. There is no implicit AI fallback for `ride.player`.\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(target)` | A readonly object snapshot or `null`. An Element identifies its record; a string means its stable `data-jr-id`, **not a selector**. |\n| `ride.on(event, listener)` | An unsubscribe function. Events and custom typing are covered in HUD and events. |\n| `ride.spawn(options)` | A new `VehicleHandle`; see Vehicles and slots. |\n| `ride.pour(liquid, options)` | Deposit simulated liquid; see Liquids and definitions. |\n| `ride.route(id, spec)` | A `PlaygroundRouteHandle`; see Zones and routes. |\n| `ride.update(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 route 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.arriveAt(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.startTour(stops, options?)` | `Promise<boolean>`; start a player tour. |\n| `ride.stopTour()` | Cancel the player tour. |\n| `ride.driveVehicleTo(id, target, options?)` | `Promise<boolean>`; drive a specific vehicle to one target. |\n| `ride.tourVehicle(id, targets, options?)` | `Promise<boolean>`; tour with a specific vehicle. |\n| `ride.startRecording()` | `boolean`; begin capturing player input when the world is available and not paused/already recording. |\n| `ride.stopRecording()` | A `JoyRideRecording`, or `null`. |\n| `ride.playRecording(recording, options?)` | `Promise<boolean>`; validate and restore recorded vehicle/material configuration, then replay. |\n| `ride.stopPlayback()` | Stop replaying input. |\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.listPresets()` | Built-in and browser-saved editable vehicle presets. |\n| `JoyRide.listVehicleOptions()` | Labels/IDs for preset pickers. |\n| `JoyRide.getPreset(id)` | An editable catalog preset or `undefined`; includes explicit browser overrides. Mounted definition recipes resolve independently of those saved overrides. |\n| `JoyRide.resolveWorkMode(configuration?)` | Resolve standard/SFW defaults and explicit work-mode customizations. |\n| `JoyRide.options` / `JoyRide.options.presets.sfw(overrides?)` | Start with safe-for-work defaults and apply your own mount options. |\n| `JoyRide.vehicleTools` | Tool metadata for building controls. |\n| `JoyRide.availableVehicleTools(enabledTools?, weaponsEnabled?)` | Filter tool metadata for a policy. |\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## Objects and bindings\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` | Nonnegative points awarded for the object. |\n| `paint` | Paint pickup capability; see Textures and paint. |\n| `trigger` | Zone preset/options; see Zones and routes. |\n| `hud` | One readout `{ field, unit?, precision? }`, or `false`. |\n| `meta` | JSON-compatible application metadata; available on object snapshots/events. |\n\nBreakable DOM artwork supports text and SVG **root** artwork. Arbitrary SVG paths cannot individually carry fragmentation or zone behaviour. Solidity and generic HUD elements have broader target support. Liquid paint accepts HTML elements and individual filled SVG shapes (`rect`, `circle`, `ellipse`, `path`, and polygons). Trigger, crushable, combustible, and pushable adapters require HTML elements. Unsupported targets reject with a diagnostic instead of silently doing nothing.\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` is the current readonly list of matching registered snapshots. A snapshot has `id`, `target`, `spec`, and `revision`. `update` merges into this binding's local layer; `replace` replaces that entire layer. Disposing removes it. There is no separate binding 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` / `data-jr-object` | Stable ID / named object recipe. |\n| `data-jr-enabled` | Boolean suspension. |\n| `data-jr-solid` / `data-jr-pushable` | Boolean capabilities. |\n| `data-jr-points` | Nonnegative points. |\n| `data-jr-breakable` / `data-jr-breakable-health` | Fragmentation and 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` / `data-jr-combustible-health` | Fuel lifecycle and 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` / `data-jr-crushable-scale` / `data-jr-crushable-opacity` | Crushing and its appearance. |\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\n## Liquids in HTML\n\n```html\n<div data-jr-liquid=\"paint\" style=\"background: #5271ff\">Take some blue</div>\n<div data-jr-liquid=\"oil\"></div>\n<svg viewBox=\"0 0 100 100\" width=\"100\" height=\"100\">\n <circle data-jr-liquid=\"paint\" cx=\"50\" cy=\"50\" r=\"42\" fill=\"#e03139\" />\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\nEvery authored liquid uses the ground-liquid solver and the named recipe's handling, burning, and electrical properties. HTML starts at its border-box outline, including rounded corners and CSS transforms; an SVG shape starts at its actual filled outline. SVG clip paths made from filled geometry, including `objectBoundingBox` paths, also trim that starting outline. Both hold their outline until tire contact deforms them without adding volume. The authored fill is hidden while the liquid is active, while HTML text and other content remain native above it. With `autoPaint: true`, eligible colored SVG shape fills join colored HTML backgrounds. SVG masks and unsupported clips remain native artwork rather than becoming rectangular paint. Paint is the liquid family that also exchanges pigment with tires. Use `ride.pour` or an emitter for liquid placed independently of an element.\n\n## Debris\n\nProcedural paper, crumpled paper, wrappers, leaves, and fine colored powder share a seeded airflow simulation. Vehicles displace nearby pieces and shed decaying wake vortices. Each material has its own lift, drag, friction, and settling rate. Paper flips and folds; crumpled pieces roll. Dust is a soft powder bed reconstructed from overlapping density volumes. Passing cars lift and roll it through the shared airflow; gravity deposits it at its new location. Powder mass persists, so clouds thin as they spread rather than fading away. Mineral glints respond to moving facets and vehicle lights.\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 all five materials.\n kinds: ['paper', 'crumpled-paper', 'trash', 'leaf', 'dust'],\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, an Element, or an iterable of elements. It places an independent collection at each matching element. It does not turn that element into a rigid body. Current and future selector matches are tracked; removed elements release their debris. `ride.bind('.track', { debris: { amount: 35, anchor: 'bottom' } })` uses the same HTML/definition system. HTML debris requires a mounted game.\n\n| Option | HTML attribute | Meaning |\n| ------------------- | ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `amount` | `data-jr-debris-amount` | Integer 0–600 per source, default 30; scene cap 3,000. For dust, counts powder patches rather than individual grains. |\n| `kinds` | `data-jr-debris-kinds` | `paper`, `crumpled-paper`, `trash`, `leaf`, `dust`; space/comma separated in HTML. Omit for all. |\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; useful for colored powder. |\n| `glint` | `data-jr-debris-glint` | Powder sparkle 0–1, default 0.12. Use 0 to disable it. Highlights catch available daylight and vehicle lights; settled powder does not twinkle on a timer. |\n| `wind.x` / `wind.y` | `data-jr-debris-wind-x` / `data-jr-debris-wind-y` | Ambient air in scene pixels/second; default `{x:7,y:-2}`. Set both axes in HTML. |\n\n`reset()` restores a source's seeded arrangement; `gust({x,y})` adds a decaying air impulse; `dispose()` removes that registration. Scene reset restores authored debris along with the initial liquids and objects. Checkpoints preserve debris motion and source ownership. Offscreen resting particles sleep; visible settled pieces use cached procedural artwork. Paper uses a curved mesh with independently sprung bending axes and torsion; edges can curl back over the sheet instead of moving as a rigid plane. Airborne folds remain dynamic vectors and every renderer honors device density.\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 a canvas world or level editor, import `Debris` from `@joy-ride/game/debris`, call `scatter({x,y,width,height}, options)`, and feed `step(seconds, vehicles, viewport, walls)` scene-pixel geometry. The game renderer exposes its shared instance at `world.renderer.debris`; its normal loop already advances and paints it. The pure simulation has no DOM dependency. `drawDebris(context, particles, viewport, dark, layer, lights?)` is available from the same export for custom Canvas hosts; draw the `ground` layer before vehicles and the `air` layer after. Optional lights use scene-pixel `SmokeLight` geometry, shared with vehicle smoke lighting.\n\n## Vehicles and slots\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 companion = ride.spawn({\n vehicle: 'artist',\n driver: 'follow',\n at: { x: 300, y: 500 },\n angleDeg: 90,\n});\n```\n\n`VehicleSpawnOptions` extends `VehicleConfiguration` with `at?: Element | {x,y}` and `angleDeg?: number`. `vehicle` is a built-in or named recipe. `id?` supplies a unique ID. `driver?` is `'player'`, `'idle'`, `'follow'`, `'flee'`, or `'pursue'`; spawned vehicles default to idle. Only one player is allowed. 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.\n\n### Vehicle handles and snapshots\n\n| Member | Meaning |\n| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `handle.id` | Stable vehicle identity. |\n| `handle.state` | Deeply readonly `{ id, vehicle, driver, position, speedMps, health, maxHealth, appearance, slots }`. Materials use authored names. Unknown host-supplied drivers report `'custom'`. |\n| `handle.update(patch)` | Validate the whole candidate before changing it. Recipe switches rebase appearance/slots; option-only patches retain the current vehicle and driver. |\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 a slot.\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. Slots are filtered through the same policy, availability, reserves, and ghost rules for player, JS, AI, and replay. Direct `ride.pour` is scene authoring, independent of vehicle reserves. There are no HTML vehicle/weapon-slot attributes.\n\n### Lightning and electrical fields\n\nSlot **7** holds the SFW lightning tool by default. Holding empties a 1.1-second reserve while an electrical field gathers around the car and narrows toward the closest breakable, burnable, pushable object or vehicle within one third of the visible viewport width by default. An explicit `lightning.rangeM` keeps a fixed metre-based reach. Targeting favors objects in front of the vehicle, with closer side/rear objects available as fallbacks; `forwardBias: 0` restores nearest-only selection. The discharge fires when the reserve empties. Releasing early cancels it. Recovery uses the ordinary weapon reserve; disabling cooldown retains the charge time with unlimited ammunition.\n\nVehicles within reach receive an `electrified` status: current speed is halved immediately, with a constant 0.5 speed/drive-force modifier for four seconds. Repeated shocks refresh the status rather than multiplying slowdowns. Ghost vehicles and the shooter are excluded; shocks never damage vehicle health. The existing status store handles expiry, resets and checkpoints.\n\nConfigure a vehicle's optional `lightning` profile in code:\n\n```ts\nconst definitions = JoyRide.definePlayground({\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/game/vehicles`. Movable targets receive a directed shove away from the firing vehicle, including objects that are pushable but not breakable. Damage, impulse and ignition enter the same `AreaImpact` response used by rockets, respecting authored breakable/burnable capabilities. Advanced hosts can use `rocketAreaImpact` / `rocketImpactDefaults` from `@joy-ride/game/physics` and `SceneGeometry.applyAreaImpact` to reuse that response. Debug rendering shows the vehicle's lightning influence circle.\n\nConductive liquids carry a discharge through connected wet cells in the same fixed step, including across patch seams. Objects at the wet edge receive the same area impact, and vehicles touching the connected water are electrified even beyond the initial range. Dry gaps and nonconductive materials block propagation. Set `conductive: true` or `false` in a liquid definition to override the base material; the connectivity graph is shared with liquid fire and sampled only at discharge.\n\nThe attractor in slot **6** uses the same electrical simulation and retains its existing pull physics. Its soft, circular atmospheric glow matches the influence radius; current and suspended mist flow inward with occasional faint electrical crackle. Channels are born in scene space and remain there as the vehicle moves through them; camera movement only changes projection. Electrified vehicles excite the surrounding medium rather than wearing a sprite-shaped electrical outline.\n\nA connected lightning strike sends a white-blue return stroke from the target back along the actual channel, flashes the complete path, then leaves a 1.5-second afterglow. Electrical fragments reuse the shared spark pool. The single camera impulse respects `screenShake`; its `lightning` profile can be overridden with `screenShakeProfiles` alongside the existing collision and explosion profiles.\n\n## Definitions and liquids\n\n### Catalogs and inheritance\n\n`JoyRide.define({ objects?, liquids?, vehicles?, routes? })` 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 routes: { delivery: { stops: ['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### 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 `<div 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/game`.\n\n### Pouring liquid\n\n```ts\nride.pour('ink', { at: document.querySelector('#paint-zone')!, amount: 24 });\nride.pour('water', { at: { x: 300, y: 500 }, amount: 12 });\n```\n\n`ride.pour(liquid, {at, amount?, color?})` resolves a catalog liquid, converts document placement, and deposits it. 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### 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. Use the garage editor for complete image/physics presets.\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`, `cooldownSeconds`. |\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`, `starter`, `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## Zones and routes\n\n### Trigger presets\n\n```html\n<button data-jr-trigger=\"click\">Click on arrival</button>\n<input type=\"checkbox\" data-jr-trigger=\"check\" />\n<span data-jr-trigger=\"pickup\" data-jr-trigger-event=\"coin-collected\">●</span>\n<div data-jr-trigger=\"parking\" data-jr-trigger-dwell-seconds=\"0.6\">Park here</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### 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`, `parking`; root `data-jr-trigger` accepts the same shorthand. |\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), `'all'`, `'ai'`. |\n| `target` | `data-jr-trigger-target` | Selector resolving exactly one action target in the root. |\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\nOptional phase classes use space-separated tokens. They work identically through HTML, selector bindings, and exact-element JS bindings:\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 credited route stop. |\n\n`TriggerPhase` is `'idle' | 'entered' | 'dwelling' | 'success'`. Parking normally moves through entered → dwelling → success. Moving or pausing interrupts dwell. A pass-through emits entered → success without dwelling. An ineligible route stop or disabled action target never reports a false success.\n\nOnly the current phase's configured tokens are applied. No classes are added by default. An empty string clears a class option. Unrelated host classes are preserved; configured tokens are restored on reset, unbind, disable, or disposal. Checkpoint restoration restores presentation without replaying actions.\n\nSuccess remains visible after departure. A new visit rearms a repeat-per-visit trigger; completed route stops and once-per-vehicle/scene triggers retain success until reset. With multiple eligible vehicles, the element shows success before dwelling before entered; each event's `state.phase` describes its own vehicle.\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### Declarative routes\n\n```html\n<section data-jr-route=\"delivery\" data-jr-route-order=\"ordered\">\n <div data-jr-id=\"collect\" data-jr-trigger=\"parking\">Collect</div>\n <div data-jr-id=\"deliver\" data-jr-trigger>Drive through to deliver</div>\n</section>\n```\n\n`data-jr-route` names the wrapper's route. Descendant triggers supply its stops, excluding nested routes. `data-jr-route-order` is `ordered` or `any`; `data-jr-route-progress` is `vehicle` or `scene`; `data-jr-route-event` adds a completion event.\n\n### JavaScript routes and handles\n\n```ts\nconst delivery = ride.route('delivery', {\n order: 'ordered',\n progress: 'vehicle',\n stops: ['collect', { target: 'deliver', when: 'stop', dwellSeconds: 0.6 }],\n});\nconsole.log(delivery.state);\ndelivery.reset();\ndelivery.dispose();\n```\n\n`RouteSpec` has `stops` (required, nonempty, unique stable IDs), `order?: 'ordered' | 'any'`, `progress?: 'vehicle' | 'scene'`, and `event?`. An individual stop is an ID or `{target, when?, dwellSeconds?, maxSpeedMps?}`. `target` here is an object ID, not a CSS selector.\n\n`PlaygroundRouteHandle` exposes `id`, readonly `state` rows `{vehicleId, completed, total, complete}`, `reset()`, and `dispose()`. Ordered routes credit the next stop; any-order routes require every distinct stop. Missing/disabled stops suspend progression. Active runs retain their membership until reset/reconfiguration. Paused/hidden time does not count toward dwell. Routes observe progress; tours drive vehicles.\n\n## HUD and events\n\n### Declarative HUD\n\n```html\n<output data-jr-hud-speed data-jr-hud-unit=\"kmh\" data-jr-hud-precision=\"1\">0</output>\n<output data-jr-hud-fps>0</output>\n<output data-jr-hud-rpm>0</output>\n<output data-jr-hud-gear>N</output>\n<output data-jr-hud-health>0</output>\n<output data-jr-hud-points>0</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('route:complete', ({ route, vehicle }) => {\n celebrate(route.id, vehicle?.id);\n});\nride.on('object:break', ({ object }) => console.log(object.id, object.spec.meta));\nride.on('reset', () => {\n setCollectedCoins([]);\n setButtonPresses(0);\n});\nunsubscribe();\n```\n\nTargets dispatch bubbling `CustomEvent`s prefixed with `joyride:`. The JS subscription omits that prefix. Subscribe at the playground root 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| `route:progress`, `route:complete` | `{route:{id,completed,total,complete}, vehicle?}` and trigger context when available. |\n| `vehicle:change` | `{vehicle}` containing the readonly vehicle snapshot. |\n| `state:change` | The readonly `PlaygroundState` snapshot. |\n| `tour:change` | `{phase,stopIndex,selector?}` for player tour progression. |\n| `recording:end` | `{recording,reason}`; reason is `manual` or `placement`. |\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 settings dialog reset, and **C / Reset screen** share the same scene reset. The runtime restores its objects, consumed pickups, trigger phases/classes, route progress, and native checkbox/switch values without replaying click handlers. A vehicle already inside a zone must leave and return before it can trigger again, so a restored pickup stays visible beneath a parked car. It then dispatches `joyride:reset` at the playground root. Use this event (or `ride.on('reset', …)`) to clear application-owned counters, controlled React inputs, and other effects of your callbacks. Authored attributes, bindings, definitions, and settings stay in place. `session.handle.clearEffects()` remains an effects-only fade.\n\n### Custom event typing\n\n```ts\ndeclare module '@joy-ride/joy-ride' {\n interface PlaygroundEventMap {\n 'coin-collected': { object: { id: string } };\n }\n}\nride.on('coin-collected', ({ object }) => collect(object.id));\n```\n\nConfigure `trigger.event` or `route.event` with an application event name. Trigger events carry trigger details; route completion events carry route details. Host code can also dispatch its own bubbling `CustomEvent('joyride:coin-collected', {detail, bubbles:true})`. Augment `PlaygroundEventMap` to type its payload accurately.\n\n## Runtime options\n\n### Updating options\n\n```ts\nride.update({\n audio: { masterVolume: 0.5 },\n rendering: { quality: 'medium' },\n camera: { speedZoom: false },\n lighting: { headlights: true },\n});\nconsole.log(ride.options.audio.masterVolume);\n```\n\nUse the same grouped shape under `mount({options})`. Updates merge by group and validate before commit. `root`, definitions, initial bindings, and player creation do not belong in mutable runtime options.\n\n### Audio, rendering, and camera\n\n| Group | Fields and defaults |\n| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `audio` | `masterVolume: 1` (0…1), `idleSound: true`. Audio activation still requires a gesture. |\n| `rendering` | `quality: 'high'` (`low`, `medium`, `high`), `smokeTint: 'natural'` (`natural`, `cyan`, `magenta`), `sparks: true`, `deform: true`, `screenShake: true`, `surfaceTone: 'auto'` (`auto`, `light`, `dark`), `debug: false`. |\n| `camera` | `viewportWalls: true`, `speedZoom: 'auto'` (`auto`, `true`, `false`). |\n| `autoPaint` | Top-level boolean, default false. Opt into bounded pickup from suitable existing coloured backgrounds. |\n\nAutomatic paint evaluates perceptual OKLCH chroma and lightness, so colored buttons\nand filled SVG shapes can become paint while neutral UI, pale tints, and nearly black backgrounds stay\nordinary elements. Absolute CSS Color 4 inputs, including named colors, HSL, OKLCH,\nand Display P3, resolve consistently in Node and browsers. Opacity and element-size\nlimits still apply.\nAdd `data-jr-auto-paint=\"false\"` to an element or ancestor to exclude that subtree from automatic paint.\n\n`surfaceTone` controls tire/mark contrast; per-vehicle `appearance` controls vehicle contrast. They are distinct settings.\n\n### Policy, UI, and lighting\n\nRendering defaults to high quality. Smoke, ghost vapor, fire, and liquids follow the selected `rendering.quality`; changing it updates active fluid layers. Ghost vapor also scales its silhouette emission detail with quality, without multiplying its total dye emission.\n\n| Group | Fields and defaults |\n| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `policy` | `weaponCooldown: true`, `vehicleDestructible: true`, `weaponsEnabled: true`, `enabledTools` (all standard tool IDs), `rocketBlastStrength: 1` (0…10). |\n| `ui` | `showHud: false`, `showTotalPoints: true`, `showHealthBars: true`, `showVehicleMarkers: true`, `showWeaponBar: true`. |\n| `lighting` | `underglow: false`, `underglowColor: '#66e6ff'`, `underglowOpacity: 0.6`, `headlights: true`, `taillights: true`, `brakeLights: true`. |\n\nLighting colour is six-digit hex and opacity is 0…1. Tool IDs are `eject`, `machineGun`, `flamethrower`, `rocket`, `ghost`, `attractor`, `lightning`, and `boost`. Policy changes filter actual actions rather than merely hiding buttons.\n\n### Work mode and dialog tabs\n\n```ts\nconst ride = JoyRide.mount(\n JoyRide.options.presets.sfw({\n workMode: { brandName: 'Take a drive' },\n player: { vehicle: 'electric-gt' },\n }),\n);\n```\n\n`workMode` accepts `sfw`, `showHud`, `showHealthBars`, `showWeaponBar`, `showLogo`, `showGithub`, `allowVehicleEditing`, `vehicleTabs`, `vehicleDestructible`, `weaponsEnabled`, `enabledTools`, `brandColor`, and `brandName`.\n\nSFW mode supplies passive, neutral defaults: no logo/GitHub/editing, no vehicle destruction, and a restricted tool list. Explicit work-mode fields override that preset; grouped runtime options override applicable work-mode defaults. Tab names, in display order, are `vehicle`, `objects`, `weapons`, `controls`, `ai`, `settings`, `embed`, and `documentation`. Explicit tab lists control availability; AI/embed panels additionally require their host integration.\n\n`JoyRide.options.presets.sfw(overrides)` returns ordinary mount options with `workMode.sfw: true`. Pass the result to `JoyRide.mount()` and override individual work-mode fields, definitions, player, or other mount options without repeating the preset defaults. The Tools tab retains the `weapons` API ID.\n\n## Tours and recordings\n\n### Tours and driving tasks\n\n```ts\nawait ride.startTour(\n [\n { selector: '#hello', pauseAfter: 600 },\n { selector: '#roundabout', donuts: 2 },\n ],\n { entry: 'left', speedPxPerSecond: 220 },\n);\n\nawait ride.driveVehicleTo(companion.id, '#finish', { clockwise: true });\nawait ride.tourVehicle(companion.id, ['#hello', '#finish']);\n```\n\n`TourTarget` is a selector, Element, `{selector,donuts?,pauseAfter?,padding?}`, or `{element,donuts?,pauseAfter?,padding?}`. Pauses are milliseconds; padding is CSS pixels.\n\n`TourOptions` accepts `entry`, `speedPxPerSecond`, `clockwise`, and `viewportWalls`. Entry names are `upper-left`, `upper-middle`, `upper-right`, `left`, `right`, `lower-left`, `lower-middle`, `lower-right`. Per-vehicle tours omit `entry`. Tours use physical controls and can fail when targets cannot be measured/planned; the Promise resolves to false. Manual driving can interrupt automation.\n\n### Recording and playback\n\n```ts\nride.startRecording();\n// Drive with the normal controls.\nconst recording = ride.stopRecording();\nif (recording) await ride.playRecording(recording, { startAudio: false });\nride.stopPlayback();\n```\n\nRecording format `joy-ride-recording`, version 2, captures initial pose/velocity, viewport scale and walls, timed key transitions, the full vehicle preset, appearance, slots, and required material definitions. Playback restores the recorded vehicle through the canonical configuration command and imports materials without overwriting host recipes.\n\n`RecordingPlaybackOptions` accepts `startAt?: {xPx,yPx,angleRad?}` and `startAudio?: boolean`. The recording does not capture arbitrary host application state, DOM event outcomes, or an entire webpage. Same-world checkpoints are a separate opaque engine feature.\n\n### Keyboard controls\n\nWASD/arrows drive; Space drifts; Shift boosts/charges a burnout launch. Number keys 1–9 activate the assigned slots. U toggles underglow, H horns, R invokes recording controls, C cleans effects, F highlights targets, P pauses, and Escape exits/closes controls. `JoyRide.keyboardControls` is the source for host-owned labels and key-code bindings.\n\n## Export and errors\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\nFormat `joy-ride-playground`, version 1, contains a selector root, definitions, player configuration, selector bindings, explicit routes, grouped options, and work mode. Authored names are exported instead of private engine material IDs. HTML declarations and host application state stay with the host page; exports are configuration rather than GPU/world checkpoints.\n\n`exportConfiguration()` is strict: Element roots, exact-element bindings, internal object overrides, or unsupported host-only presentation options cause `NonSerializableDependencyError`. Its `code` is `JR_NON_SERIALIZABLE_DEPENDENCY` and `dependencies` lists `{path,reason}`. No dependencies silently disappear.\n\n### Embed and bookmarklet helpers\n\n```ts\nimport {\n fullEmbedCode,\n asyncEmbedCode,\n npmEmbedCode,\n bookmarkletUrl,\n} from '@joy-ride/joy-ride/bookmarklet';\n\nconst configuration = ride.exportConfiguration();\nconst html = fullEmbedCode(configuration);\nconst asyncCdn = asyncEmbedCode(configuration);\nconst npm = npmEmbedCode(configuration);\nconst bookmark = bookmarkletUrl(configuration);\n```\n\nAll helpers use the same portable configuration. The HTML helper supplies a button that dynamically loads the module on first click and toggles the ride. The async CDN helper loads the runtime on demand without a package dependency; the npm helper shows a bundler import. The bookmarklet toggles a mounted runtime. Importing helpers does not mount the toy.\n\nThe lower-level `@joy-ride/game/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\nHost listener failures are reported without stopping physics. Internal simulation faults explicitly fail/stop the clock rather than replaying effects or leaving an apparently running loop with no scheduled frame. Use `ride.ready.catch` for initialization errors and `ride.on('diagnostic', ...)` for integration diagnostics.\n\n### Public TypeScript contracts\n\n`@joy-ride/joy-ride` exports types for `EmbedOptions`, `EmbedController`, `PlaygroundEventMap`, `PlaygroundState`, `ObjectSpec`, `ObjectPatch`, `PlayerConfiguration`, `VehicleConfiguration`, `VehiclePatch`, `VehicleHandle`, `VehicleSpawnOptions`, `RuntimeOptions`, `RuntimeOptionsPatch`, `PlaygroundConfiguration`, `Appearance`, `SlotNumber`, and `DeepReadonly`.\n\nThe game schema entry additionally provides catalog, trigger, route, 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## React and engine integrations\n\n### React browser host\n\nThe `JoyRide` export from `@joy-ride/ui` is the advanced React host. It accepts the same definitions, bindings and registry, and owns canvas UI integration. Its `onReady(world, registry)` callback and `JoyRideHandle.getPlayground()` expose the integration runtime. Prefer the browser facade for ordinary site setup.\n\nThe Objects tab is a live inspector for enabled physical objects and interaction targets. Pass `objects={joyrideRef.current?.getPlayground()?.objects}` to `VehiclePopover` (the homepage and standalone embed do this automatically). It supports search/type filters, image/SVG/text previews, Show with the same glint as the F shortcut, Drive to with the short `arriveAt` entrance, resetting one object's damage/deformation/trigger state, and removal from the simulation while retaining the host HTML. Show closes the dialog and interrupts camera following. Pass `onDriveToObject` to enable Drive to in a custom React host. Reset leaves world-wide trails and already emitted particles in place.\n\n`getPlayground().objects` implements `SceneObjectInspector`: `getSnapshot()`, `subscribe(listener)`, `getTarget(id)`, `reveal(id)`, `reset(id)`, and `remove(id)`. The underlying page runtime also exposes `resetObject(id)` and `removeObject(id)`. Removal sets an object-scoped `enabled: false` override; it does not delete the DOM node or stop the simulation. Disabled objects disappear from the inspector. Reset scene restores objects removed through the inspector; unrelated authoring overrides remain intact. Inspector removal ownership also follows same-page checkpoints. `SceneObject`, `SceneObjectPreview`, and `SceneObjectInspector` are exported types from `@joy-ride/browser`.\n\nThe `VehiclePopover` export from `@joy-ride/ui` provides the dialog, `initialTab`, and host callbacks. `workMode.vehicleTabs` controls visible tabs, including `documentation`. The React entry exposes these building blocks. Their props describe presentation rather than portable JSON.\n\n| Export | Purpose |\n| -------------------------------------------------------- | ------------------------------------------------------------------------------ |\n| `JoyRide` | React canvas/controls adapter for a browser session; forwards `JoyRideHandle`. |\n| `CanvasDrive` / `renderCanvasDriveHud` | Canvas-owned level host and optional HUD drawing helper. |\n| `VehiclePopover` | Configurable dialog, tabs, garage callbacks, recording and AI controls. |\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| `CodeBlock` | Highlighted, escaped, copyable code examples. |\n| `Toolbar` / `ToolbarButton` | Shared host controls. |\n| `RecordingBadge` / `RecordingPath` / `RecordingProgress` | Optional recording status, path preview, and playback progress. |\n| `recordingUi` | Adapt a recording session and handle into dialog actions. |\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 game 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?)` owns its world, clock, input listeners, placement, tours, recordings, and acquired resources. It imports no React or UI components. `handle` provides engine commands; `touchChange(controls)` accepts touch/host controls. `update(patch)` applies live options and `dispose()` releases the session. For overlay sessions, `onReady(world, registry)` runs after construction and is suppressed if disposal happens first.\n\nOptions include preset/mode, overlay presentation, work-mode defaults, grouped engine presentation controls, bindings/definitions, supplied playground/audio instances, spawn targets, initial marks/puddles, and lifecycle callbacks. `BrowserSessionOptions` is the complete typed contract. Mount-only fields are readonly and cannot change through `BrowserSessionUpdate`; construct another session to change its canvas/world identity. Optional presentation sinks provide a toolbar element, `onPresent(time, world, sound)`, and a safe camera frame. The browser session owns the sole frame clock.\n\n`session.handle` exposes lighting (`setLighting`, `getLighting`, `toggleLight`), audio (`startAudio`), tours (`startTour`, `stopTour`, `driveVehicleTo`, `tourVehicle`), vehicle access (`getVehicle`, `watchVehicle`, `getPresetId`, `setPreset`), geometry (`getCarAnchor`, `getPose`, `getPathView`), effects (`clearEffects`, `reset`, `addLiquid`, `ejectLiquid`), distance (`getDistance`, `resetDistance`, `cycleDistanceDpi`), recording (`startRecording`, `stopRecording`, `playRecording`, `stopPlayback`, `getRecordingState`), placement (`resetTo`, `parkAt`, `arriveAt`), checkpoints (`saveState`, `restoreState`), companions (`spawnCompanion`, `updateCompanion`, `removeCompanion`), 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. Companion offsets use metres. Distance readouts include their calibrated display unit. `vehicleReadout` produces shared HUD data without owning a clock.\n\n`arriveAt` is available on both the standalone embed controller (`ride.arriveAt`) and the browser/React session handle (`session.handle.arriveAt`). It places the player car behind an element or document point and starts the entire visible entrance with the handbrake engaged. Set `delayMs` to wait before the entrance begins; the default is immediate. The entry speed is predicted from the requested skid distance and the car's physics unless `initialSpeedMps` is supplied. When an explicit speed needs a shorter stopping distance, the arrival also applies the service brake; the handbrake remains on. `fadeFraction` makes the car and new skid marks fade together over that fraction of the predicted stop duration (`0.5` means the first half). Driver input or disposal cancels a pending entrance. The promise resolves to `completed`, `interrupted`, or `unavailable`.\n\n```ts\nawait ride.arriveAt({\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, optional HUD, and controls; it does not own physics or browser input state.\n\nThe vehicle hover toolbar quits the simulation for the player and removes only the hovered car for AI vehicles. Supply `onCompanionRemove(id)` to keep a host-owned fleet in sync; otherwise React removes the companion through the session handle. Custom presentations receive the hovered vehicle through `onToolbarTarget`. The built-in AI spawn controls choose a random preset other than the player's current car; explicitly authored vehicle presets remain supported by the JavaScript API.\n\n### Canvas-owned worlds\n\n```ts\nimport { CanvasWorld } from '@joy-ride/game';\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`, `speedZoom`, `speedZoomMinimumScale`, `cameraLock`, `cameraSmoothing`, `pauseShortcut`, work-mode 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`, `setSpeedZoom` | 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/game` keeps its default entry small: `Simulation`, `GameWorld`, `CanvasWorld`, `definePlayground`, `createPlaygroundConfiguration`, and `parsePlaygroundConfiguration`, with their core configuration types. For a site playground, use `@joy-ride/joy-ride`; 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/game/engine` | World/clock/checkpoint ownership, canvas levels/scenes, geometry conversions, work-mode defaults, and host event helpers. |\n| `@joy-ride/game/simulation` | Simulation state, controls, vector math, and driving geometry. |\n| `@joy-ride/game/vehicles` | Vehicle presets/catalog, entities, slots, tools, stats, sprite geometry, and status effects. |\n| `@joy-ride/game/playground` | Authored contracts, canonical validation/composition/attribute parsing, registries, zones, HUD, runtime options, and portable configuration. |\n| `@joy-ride/game/rendering` | Renderer host integration, lighting, overlay layers, and presentation option types. |\n| `@joy-ride/game/physics` | DOM contacts, liquid definitions, collision-mask queries, and combustible lifecycle configuration. |\n| `@joy-ride/game/audio` | Engine audio integration. |\n| `@joy-ride/game/input` | Keyboard controls, recording capture/playback, and recording sessions. |\n| `@joy-ride/game/tour` | Physical driving routes and tour contracts. |\n| `@joy-ride/game/tutorial` | Optional tutorial orchestration, canvas tutorials, and callout contracts. |\n\nThese engine objects own mutable simulation state. Shaders, artwork caches, individual source-file paths, and vendor modules are implementation details and are not exported. Use portable configuration when saving a playground.\n\n`GameWorld.configureVehicle` is the shared live configuration command. `saveState()` produces a same-world `GameCheckpoint` with `restore()`, `available`, and `dispose()`. Checkpoints include engine resources and are not JSON; dispose unused checkpoints. `GameLoop` runs physics updates at 120 Hz in real time and one presentation callback per frame, with explicit failure state/restart behaviour.\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\n## Slow motion\n\nHold **V** while driving to enter slow-mo; release to return to normal speed. The defaults are half speed, a 300 ms ramp in either direction, and no additional camera zoom. The ramp runs in real time. Physics and input keep updating at 120 Hz, including at extreme slow-mo factors; each update advances a smaller amount of game time. Rendering continues every animation frame. Engine, tire, liquid and weapon sounds lower in pitch and playback rate together.\n\nReact refs and browser sessions expose the same command:\n\n```ts\nride.current?.setSlowMo(true, {\n speedFactor: 0.5,\n rampMs: 300,\n zoomFactor: 1.1,\n curve: 'ease-in-out',\n});\nride.current?.setSlowMo(false);\n```\n\nFor the standalone embed, use `await ride.setSlowMo(true, options)`. A `CanvasWorld` exposes `setSlowMo(active, options)` too. Advanced hosts can configure `world.slowMo`, call `start()` / `stop()`, and map each fixed real-time tick through `world.advanceTime()` when constructing their `GameLoop`. Browser and canvas hosts already do this.\n\n`speedFactor` is greater than zero and at most 1; `rampMs` is nonnegative; `zoomFactor` is between 0 and 4; 0 disables extra zoom. Curves are `linear`, `ease-in`, `ease-out`, and `ease-in-out`. Options persist between uses. Changing options or reversing the effect starts a fresh ramp from the current speed and zoom. Pausing freezes the ramp; losing focus releases the keyboard action. Slow-mo is a live presentation effect; input recordings retain their simulation-step timing.\n\n### Crush appearance and paint\n\nAny ordinary HTML element can use `data-jr-crushable`. Crushing happens once the visible vehicle silhouette covers at least half of the element’s area; grazing an edge is not enough. Coverage follows CSS rotation and scale. Add `data-jr-crushed-class=\"is-crushed\"` to own its crushed appearance in CSS; omit it to retain the default squash and fade. Add `data-jr-crushed-paint-color=\"#8caa27\"` to release paint beneath it when the element is crushed. The amount follows the element’s transformed area. A compact wet core grows outward over roughly 200 ms using the normal paint mixing, tire pickup and deformation systems; rotation does not inflate the footprint. Pigments accept six-digit hex colors (or RGB tuples in JavaScript).\n\nThe full capability option names, `data-jr-crushable-crushed-class` and `data-jr-crushable-crushed-paint-color`, are also supported. They map to the same `crushedClass` and `crushedPaintColor` options as the short forms above.\n\n```html\n<div data-jr-crushable data-jr-crushed-class=\"is-crushed\" data-jr-crushed-paint-color=\"#8caa27\">\n Your element\n</div>\n```\n\nThe equivalent binding is `playground.bind(element, { crushable: { crushedClass: 'is-crushed', crushedPaintColor: '#8caa27' } })`. Both options are independent and optional. Reset restores the original styling and removes only classes added by the engine. Ant artwork and its CSS swap are site example code, not engine object types.\n";function Hl(e){let t=io().use(di).use(Bl).parse(e),n=new Map,r=t.children.filter(e=>e.type===`heading`).map(e=>{let t=xt(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 $=Hl(Vl),Ul=[Bl],Wl={ts:`typescript`,js:`javascript`,sh:`shell`,bash:`shell`},Gl=new Set([`javascript`,`typescript`,`jsx`,`tsx`,`html`,`css`,`json`,`shell`,`text`]),Kl=(0,l.memo)(function({chapter:e}){let t=(0,l.useMemo)(()=>{let t=({node:t,children:n,...r})=>{let i=e.headings.find(e=>e.line===t?.position?.start.line),a=`h${i?.depth??2}`;return(0,X.jsx)(a,{...r,id:i?.id,tabIndex:-1,children:n})};return{h2:t,h3:t,h4:t,pre({children:e}){let t=l.Children.toArray(e).find(l.isValidElement);if(!t)return(0,X.jsx)(`pre`,{children:e});let n=t.props,r=n.className?.replace(`language-`,``)??`text`,a=Wl[r]??r;return typeof n.children==`string`?(0,X.jsx)(i,{code:n.children.replace(/\n$/,``),language:Gl.has(a)?a:`text`,compact:!0,maxHeight:320}):(0,X.jsx)(`pre`,{children:e})},table({children:e}){return(0,X.jsx)(`div`,{className:`joy-docs-table`,tabIndex:0,role:`region`,"aria-label":`API reference table`,children:(0,X.jsx)(`table`,{children:e})})},a({href:e,children:t,node:n,...r}){let i=e?.startsWith(`https://`);return(0,X.jsx)(`a`,{...r,href:e,target:i?`_blank`:void 0,rel:i?`noreferrer`:void 0,children:t})}}},[e]);return(0,X.jsx)(`div`,{className:`joy-docs-prose prose`,children:(0,X.jsx)(yo,{remarkPlugins:Ul,components:t,skipHtml:!0,children:e.markdown})})}),ql=(0,l.memo)(function({location:t,onNavigate:n}){let r=$.find(e=>e.id===t.chapter)??$[0],i=(0,l.useRef)(null),a=(0,l.useRef)(null),[s,c]=(0,l.useState)(!1),[u,f]=(0,l.useState)(t.anchor||r.id),p=(0,l.useRef)(!1),m=(e,t)=>{p.current=!0,f(t),c(!1),n({chapter:e,anchor:t})};return(0,l.useLayoutEffect)(()=>{let e=i.current,n=e?.querySelector(`#${t.anchor||r.id}`);e&&n&&(e.scrollTop+=n.getBoundingClientRect().top-e.getBoundingClientRect().top-20,p.current&&n.focus({preventScroll:!0}),p.current=!1)},[t,r.id]),(0,X.jsxs)(`div`,{className:`joy-docs`,onKeyDown:e=>{e.key===`Escape`&&s&&(e.preventDefault(),e.stopPropagation(),c(!1),a.current?.focus())},children:[(0,X.jsxs)(e,{ref:a,variant:`outline`,size:`sm`,className:`joy-docs-browse`,"aria-expanded":s,"aria-controls":`jr-docs-navigation`,onClick:()=>c(e=>!e),children:[(0,X.jsx)(d,{}),` Browse API `,(0,X.jsx)(o,{})]}),(0,X.jsxs)(`nav`,{id:`jr-docs-navigation`,className:`joy-docs-navigation`,"aria-label":`API documentation`,"data-open":s,children:[(0,X.jsx)(`p`,{className:`joy-docs-nav-label`,children:`Reference`}),(0,X.jsx)(`ul`,{className:`joy-docs-chapters`,children:$.map(e=>(0,X.jsxs)(`li`,{children:[(0,X.jsx)(`a`,{className:`joy-docs-chapter`,href:`#${e.id}`,"aria-current":r.id===e.id?`page`:void 0,onClick:t=>{t.preventDefault(),m(e.id,e.id)},children:e.title}),r.id===e.id&&(0,X.jsx)(`ul`,{className:`joy-docs-sections`,children:e.headings.filter(e=>e.depth===3).map(t=>(0,X.jsx)(`li`,{children:(0,X.jsx)(`a`,{className:`joy-docs-section`,href:`#${t.id}`,"aria-current":u===t.id?`location`:void 0,onClick:n=>{n.preventDefault(),m(e.id,t.id)},children:t.title})},t.id))})]},e.id))})]}),(0,X.jsxs)(`article`,{ref:i,className:`joy-docs-article`,"aria-label":r.title,onScroll:()=>{let e=i.current;if(!e)return;let t=e.getBoundingClientRect().top+64,n=r.id;for(let i of r.headings){let r=e.querySelector(`#${i.id}`);r&&r.getBoundingClientRect().top<=t&&(n=i.id)}f(n)},onClick:e=>{let t=e.target instanceof Element?e.target.closest(`a[href^="#jr-doc-"]`):null;if(!t)return;let n=t.getAttribute(`href`).slice(1),r=$.find(e=>e.headings.some(e=>e.id===n));r&&(e.preventDefault(),m(r.id,n))},children:[(0,X.jsx)(Kl,{chapter:r}),(0,X.jsx)(`p`,{className:`joy-docs-next`,children:$[$.indexOf(r)+1]&&(0,X.jsxs)(e,{variant:`outline`,onClick:()=>{let e=$[$.indexOf(r)+1];m(e.id,e.id)},children:[`Next: `,$[$.indexOf(r)+1].title,` →`]})})]})]})});export{ql as Documentation};