vvplot 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -1
- package/dist/vvplot.d.ts +51 -42
- package/dist/vvplot.esm.js +9558 -1607
- package/dist/vvplot.esm.min.js +25 -2
- package/dist/vvplot.global.js +9557 -1606
- package/dist/vvplot.global.min.js +25 -2
- package/package.json +2 -1
package/dist/vvplot.esm.min.js
CHANGED
|
@@ -1,2 +1,25 @@
|
|
|
1
|
-
import{computed as Y,isRef as ti,reactive as Ot,unref as Mt,getCurrentScope as wa,onScopeDispose as ba,toValue as al,watch as St,shallowRef as ka,getCurrentInstance as Aa,onMounted as ol,useTemplateRef as Vt,nextTick as Ei,createElementBlock as D,openBlock as V,mergeProps as _,renderSlot as $a,createCommentVNode as Ft,createTextVNode as gt,toDisplayString as Oe,inject as Mn,normalizeStyle as sn,createElementVNode as wt,createBlock as kt,Fragment as ut,renderList as ht,createVNode as le,toHandlers as qt,normalizeProps as ge,resolveDynamicComponent as qe,guardReactiveProps as un,mergeModels as We,useModel as me,createPropsRestProxy as sl,ref as Sn,useId as Ma,Teleport as Sa,useSlots as Na,useAttrs as Ta,provide as hr}from"vue";function Ca(t){return wa()?(ba(t),!0):!1}function Oa(t){if(!ti(t))return Ot(t);const e=new Proxy({},{get(n,i,r){return Mt(Reflect.get(t.value,i,r))},set(n,i,r){return ti(t.value[i])&&!ti(r)?t.value[i].value=r:t.value[i]=r,!0},deleteProperty(n,i){return Reflect.deleteProperty(t.value,i)},has(n,i){return Reflect.has(t.value,i)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return Ot(e)}function we(t){return Oa(Y(t))}const Ea=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ja=Ea?window:void 0;function mr(t){var e;const n=al(t);return(e=n?.$el)!=null?e:n}function Pa(){const t=ka(!1),e=Aa();return e&&ol(()=>{t.value=!0},e),t}function Va(t){const e=Pa();return Y(()=>(e.value,!!t()))}function ul(t,e,n={}){const{window:i=ja,...r}=n;let l;const o=Va(()=>i&&"ResizeObserver"in i),s=()=>{l&&(l.disconnect(),l=void 0)},c=Y(()=>{const f=al(t);return Array.isArray(f)?f.map(h=>mr(h)):[mr(f)]}),a=St(c,f=>{if(s(),o.value&&i){l=new ResizeObserver(e);for(const h of f)h&&l.observe(h,r)}},{immediate:!0,flush:"post"}),u=()=>{s(),a()};return Ca(u),{isSupported:o,stop:u}}const mn=()=>!1,si=Object.assign,Ia=Symbol(""),Ba=Symbol(""),La=Symbol(""),Xa=Symbol(""),cl={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function Ya(t,e=""){return{type:0,source:e,children:t,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:cl}}function ui(t,e=!1,n=cl,i=0){return{type:4,loc:n,content:t,isStatic:e,constType:e?3:i}}const dr=new Uint8Array([123,123]),yr=new Uint8Array([125,125]);function gr(t){return t>=97&&t<=122||t>=65&&t<=90}function Ut(t){return t===32||t===10||t===9||t===12||t===13}function ve(t){return t===47||t===62||Ut(t)}function Nn(t){const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}const Yt={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class Da{constructor(e,n){this.stack=e,this.cbs=n,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=dr,this.delimiterClose=yr,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=dr,this.delimiterClose=yr}getPos(e){let n=1,i=e+1;const r=this.newlines.length;let l=-1;if(r>100){let o=-1,s=r;for(;o+1<s;){const c=o+s>>>1;this.newlines[c]<e?o=c:s=c}l=o}else for(let o=r-1;o>=0;o--)if(e>this.newlines[o]){l=o;break}return l>=0&&(n=l+2,i=e-this.newlines[l]),{column:i,line:n,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){e===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const n=this.index+1-this.delimiterOpen.length;n>this.sectionStart&&this.cbs.ontext(this.sectionStart,n),this.state=3,this.sectionStart=n}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){const n=this.sequenceIndex===this.currentSequence.length;if(!(n?ve(e):(e|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!n){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(e===62||Ut(e)){const n=this.index-this.currentSequence.length;if(this.sectionStart<n){const i=this.index;this.index=n,this.cbs.ontext(this.sectionStart,n),this.index=i}this.sectionStart=n+2,this.stateInClosingTagName(e),this.inRCDATA=!1;return}this.sequenceIndex=0}(e|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===Yt.TitleEnd||this.currentSequence===Yt.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(e===60)}stateCDATASequence(e){e===Yt.Cdata[this.sequenceIndex]?++this.sequenceIndex===Yt.Cdata.length&&(this.state=28,this.currentSequence=Yt.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length;){const n=this.buffer.charCodeAt(this.index);if(n===10&&this.newlines.push(this.index),n===e)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===Yt.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,n){this.enterRCDATA(e,n),this.state=31}enterRCDATA(e,n){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=n}stateBeforeTagName(e){e===33?(this.state=22,this.sectionStart=this.index+1):e===63?(this.state=24,this.sectionStart=this.index+1):gr(e)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:e===116?this.state=30:this.state=e===115?29:6):e===47?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){ve(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(ve(e)){const n=this.buffer.slice(this.sectionStart,this.index);n!=="template"&&this.enterRCDATA(Nn("</"+n),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){Ut(e)||(e===62?(this.state=1,this.sectionStart=this.index+1):(this.state=gr(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(e===62||Ut(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){e===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){e===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):e===47?this.state=7:e===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):Ut(e)||this.handleAttrStart(e)}handleAttrStart(e){e===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):e===46||e===58||e===64||e===35?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(e){e===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):Ut(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(e===61||ve(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){e===61||ve(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):e===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){e===61||ve(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===91?this.state=15:e===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){e===93?this.state=14:(e===61||ve(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){e===61||ve(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(e){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(e)}stateAfterAttrName(e){e===61?this.state=18:e===47||e===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):Ut(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){e===34?(this.state=19,this.sectionStart=this.index+1):e===39?(this.state=20,this.sectionStart=this.index+1):Ut(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,n){(e===n||this.fastForwardTo(n))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(n===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){Ut(e)||e===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):(e===39||e===60||e===61||e===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){e===91?(this.state=26,this.sequenceIndex=0):this.state=e===45?25:23}stateInDeclaration(e){(e===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(e===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){e===45?(this.state=28,this.currentSequence=Yt.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(e===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){e===Yt.ScriptEnd[3]?this.startSpecial(Yt.ScriptEnd,4):e===Yt.StyleEnd[3]?this.startSpecial(Yt.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===Yt.TitleEnd[3]?this.startSpecial(Yt.TitleEnd,4):e===Yt.TextareaEnd[3]?this.startSpecial(Yt.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){const n=this.buffer.charCodeAt(this.index);switch(n===10&&this.state!==33&&this.newlines.push(this.index),this.state){case 1:{this.stateText(n);break}case 2:{this.stateInterpolationOpen(n);break}case 3:{this.stateInterpolation(n);break}case 4:{this.stateInterpolationClose(n);break}case 31:{this.stateSpecialStartSequence(n);break}case 32:{this.stateInRCDATA(n);break}case 26:{this.stateCDATASequence(n);break}case 19:{this.stateInAttrValueDoubleQuotes(n);break}case 12:{this.stateInAttrName(n);break}case 13:{this.stateInDirName(n);break}case 14:{this.stateInDirArg(n);break}case 15:{this.stateInDynamicDirArg(n);break}case 16:{this.stateInDirModifier(n);break}case 28:{this.stateInCommentLike(n);break}case 27:{this.stateInSpecialComment(n);break}case 11:{this.stateBeforeAttrName(n);break}case 6:{this.stateInTagName(n);break}case 34:{this.stateInSFCRootTagName(n);break}case 9:{this.stateInClosingTagName(n);break}case 5:{this.stateBeforeTagName(n);break}case 17:{this.stateAfterAttrName(n);break}case 20:{this.stateInAttrValueSingleQuotes(n);break}case 18:{this.stateBeforeAttrValue(n);break}case 8:{this.stateBeforeClosingTagName(n);break}case 10:{this.stateAfterClosingTagName(n);break}case 29:{this.stateBeforeSpecialS(n);break}case 30:{this.stateBeforeSpecialT(n);break}case 21:{this.stateInAttrValueNoQuotes(n);break}case 7:{this.stateInSelfClosingTag(n);break}case 23:{this.stateInDeclaration(n);break}case 22:{this.stateBeforeDeclaration(n);break}case 25:{this.stateBeforeComment(n);break}case 24:{this.stateInProcessingInstruction(n);break}case 33:{this.stateInEntity();break}}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(this.state===1||this.state===32&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===19||this.state===20||this.state===21)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const e=this.buffer.length;this.sectionStart>=e||(this.state===28?this.currentSequence===Yt.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,n){}}function xr(t,{compatConfig:e}){const n=e&&e[t];return t==="MODE"?n||3:n}function fl(t,e){const n=xr("MODE",e),i=xr(t,e);return n===3?i===!0:i!==!1}function Tn(t,e,n,...i){return fl(t,e)}function Ra(t){throw t}function Ha(t){}function za(t,e,n,i){const r=`https://vuejs.org/error-reference/#compiler-${t}`,l=new SyntaxError(String(r));return l.code=t,l.loc=e,l}const Fa=t=>t.type===4&&t.isStatic;function qa(t){switch(t){case"Teleport":case"teleport":return Ia;case"Suspense":case"suspense":return Ba;case"KeepAlive":case"keep-alive":return La;case"BaseTransition":case"base-transition":return Xa}}function Wa(t,e){return!!(t&&Fa(t)&&t.content===e)}function vr(t){return t.type===7&&t.name==="pre"}const Ga=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;function Ua(t){for(let e=0;e<t.length;e++)if(!Ut(t.charCodeAt(e)))return!1;return!0}const hl={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:mn,isPreTag:mn,isIgnoreNewlineTag:mn,isCustomElement:mn,onError:Ra,onWarn:Ha,comments:!1,prefixIdentifiers:!1};let xt=hl,nn=null,ye="",Dt=null,ft=null,zt="",he=-1,$e=-1,ji=0,pe=!1,ci=null;const bt=[],Tt=new Da(bt,{onerr:ce,ontext(t,e){dn(Bt(t,e),t,e)},ontextentity(t,e,n){dn(t,e,n)},oninterpolation(t,e){if(pe)return dn(Bt(t,e),t,e);let n=t+Tt.delimiterOpen.length,i=e-Tt.delimiterClose.length;for(;Ut(ye.charCodeAt(n));)n++;for(;Ut(ye.charCodeAt(i-1));)i--;let r=Bt(n,i);r.includes("&")&&(r=xt.decodeEntities(r,!1)),fi({type:5,content:wn(r,!1,Et(n,i)),loc:Et(t,e)})},onopentagname(t,e){const n=Bt(t,e);Dt={type:1,tag:n,ns:xt.getNamespace(n,bt[0],xt.ns),tagType:0,props:[],children:[],loc:Et(t-1,e),codegenNode:void 0}},onopentagend(t){wr(t)},onclosetag(t,e){const n=Bt(t,e);if(!xt.isVoidTag(n)){let i=!1;for(let r=0;r<bt.length;r++)if(bt[r].tag.toLowerCase()===n.toLowerCase()){i=!0,r>0&&ce(24,bt[0].loc.start.offset);for(let o=0;o<=r;o++){const s=bt.shift();pn(s,e,o<r)}break}i||ce(23,ml(t,60))}},onselfclosingtag(t){const e=Dt.tag;Dt.isSelfClosing=!0,wr(t),bt[0]&&bt[0].tag===e&&pn(bt.shift(),t)},onattribname(t,e){ft={type:6,name:Bt(t,e),nameLoc:Et(t,e),value:void 0,loc:Et(t)}},ondirname(t,e){const n=Bt(t,e),i=n==="."||n===":"?"bind":n==="@"?"on":n==="#"?"slot":n.slice(2);if(!pe&&i===""&&ce(26,t),pe||i==="")ft={type:6,name:n,nameLoc:Et(t,e),value:void 0,loc:Et(t)};else if(ft={type:7,name:i,rawName:n,exp:void 0,arg:void 0,modifiers:n==="."?[ui("prop")]:[],loc:Et(t)},i==="pre"){pe=Tt.inVPre=!0,ci=Dt;const r=Dt.props;for(let l=0;l<r.length;l++)r[l].type===7&&(r[l]=io(r[l]))}},ondirarg(t,e){if(t===e)return;const n=Bt(t,e);if(pe&&!vr(ft))ft.name+=n,Ne(ft.nameLoc,e);else{const i=n[0]!=="[";ft.arg=wn(i?n:n.slice(1,-1),i,Et(t,e),i?3:0)}},ondirmodifier(t,e){const n=Bt(t,e);if(pe&&!vr(ft))ft.name+="."+n,Ne(ft.nameLoc,e);else if(ft.name==="slot"){const i=ft.arg;i&&(i.content+="."+n,Ne(i.loc,e))}else{const i=ui(n,!0,Et(t,e));ft.modifiers.push(i)}},onattribdata(t,e){zt+=Bt(t,e),he<0&&(he=t),$e=e},onattribentity(t,e,n){zt+=t,he<0&&(he=e),$e=n},onattribnameend(t){const e=ft.loc.start.offset,n=Bt(e,t);ft.type===7&&(ft.rawName=n),Dt.props.some(i=>(i.type===7?i.rawName:i.name)===n)&&ce(2,e)},onattribend(t,e){if(Dt&&ft){if(Ne(ft.loc,e),t!==0)if(zt.includes("&")&&(zt=xt.decodeEntities(zt,!0)),ft.type===6)ft.name==="class"&&(zt=yl(zt).trim()),t===1&&!zt&&ce(13,e),ft.value={type:2,content:zt,loc:t===1?Et(he,$e):Et(he-1,$e+1)},Tt.inSFCRoot&&Dt.tag==="template"&&ft.name==="lang"&&zt&&zt!=="html"&&Tt.enterRCDATA(Nn("</template"),0);else{let n=0;ft.exp=wn(zt,!1,Et(he,$e),0,n),ft.name==="for"&&(ft.forParseResult=Qa(ft.exp));let i=-1;ft.name==="bind"&&(i=ft.modifiers.findIndex(r=>r.content==="sync"))>-1&&Tn("COMPILER_V_BIND_SYNC",xt,ft.loc,ft.arg.loc.source)&&(ft.name="model",ft.modifiers.splice(i,1))}(ft.type!==7||ft.name!=="pre")&&Dt.props.push(ft)}zt="",he=$e=-1},oncomment(t,e){xt.comments&&fi({type:3,content:Bt(t,e),loc:Et(t-4,e+3)})},onend(){const t=ye.length;for(let e=0;e<bt.length;e++)pn(bt[e],t-1),ce(24,bt[e].loc.start.offset)},oncdata(t,e){bt[0].ns!==0?dn(Bt(t,e),t,e):ce(1,t-9)},onprocessinginstruction(t){(bt[0]?bt[0].ns:xt.ns)===0&&ce(21,t-1)}}),pr=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Ka=/^\(|\)$/g;function Qa(t){const e=t.loc,n=t.content,i=n.match(Ga);if(!i)return;const[,r,l]=i,o=(f,h,m=!1)=>{const y=e.start.offset+h,x=y+f.length;return wn(f,!1,Et(y,x),0,m?1:0)},s={source:o(l.trim(),n.indexOf(l,r.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let c=r.trim().replace(Ka,"").trim();const a=r.indexOf(c),u=c.match(pr);if(u){c=c.replace(pr,"").trim();const f=u[1].trim();let h;if(f&&(h=n.indexOf(f,a+c.length),s.key=o(f,h,!0)),u[2]){const m=u[2].trim();m&&(s.index=o(m,n.indexOf(m,s.key?h+f.length:a+c.length),!0))}}return c&&(s.value=o(c,a,!0)),s}function Bt(t,e){return ye.slice(t,e)}function wr(t){Tt.inSFCRoot&&(Dt.innerLoc=Et(t+1,t+1)),fi(Dt);const{tag:e,ns:n}=Dt;n===0&&xt.isPreTag(e)&&ji++,xt.isVoidTag(e)?pn(Dt,t):(bt.unshift(Dt),(n===1||n===2)&&(Tt.inXML=!0)),Dt=null}function dn(t,e,n){{const l=bt[0]&&bt[0].tag;l!=="script"&&l!=="style"&&t.includes("&")&&(t=xt.decodeEntities(t,!1))}const i=bt[0]||nn,r=i.children[i.children.length-1];r&&r.type===2?(r.content+=t,Ne(r.loc,n)):i.children.push({type:2,content:t,loc:Et(e,n)})}function pn(t,e,n=!1){n?Ne(t.loc,ml(e,60)):Ne(t.loc,Za(e,62)+1),Tt.inSFCRoot&&(t.children.length?t.innerLoc.end=si({},t.children[t.children.length-1].loc.end):t.innerLoc.end=si({},t.innerLoc.start),t.innerLoc.source=Bt(t.innerLoc.start.offset,t.innerLoc.end.offset));const{tag:i,ns:r,children:l}=t;if(pe||(i==="slot"?t.tagType=2:br(t)?t.tagType=3:_a(t)&&(t.tagType=1)),Tt.inRCDATA||(t.children=dl(l)),r===0&&xt.isIgnoreNewlineTag(i)){const o=l[0];o&&o.type===2&&(o.content=o.content.replace(/^\r?\n/,""))}r===0&&xt.isPreTag(i)&&ji--,ci===t&&(pe=Tt.inVPre=!1,ci=null),Tt.inXML&&(bt[0]?bt[0].ns:xt.ns)===0&&(Tt.inXML=!1);{const o=t.props;if(!Tt.inSFCRoot&&fl("COMPILER_NATIVE_TEMPLATE",xt)&&t.tag==="template"&&!br(t)){const c=bt[0]||nn,a=c.children.indexOf(t);c.children.splice(a,1,...t.children)}const s=o.find(c=>c.type===6&&c.name==="inline-template");s&&Tn("COMPILER_INLINE_TEMPLATE",xt,s.loc)&&t.children.length&&(s.value={type:2,content:Bt(t.children[0].loc.start.offset,t.children[t.children.length-1].loc.end.offset),loc:s.loc})}}function Za(t,e){let n=t;for(;ye.charCodeAt(n)!==e&&n<ye.length-1;)n++;return n}function ml(t,e){let n=t;for(;ye.charCodeAt(n)!==e&&n>=0;)n--;return n}const Ja=new Set(["if","else","else-if","for","slot"]);function br({tag:t,props:e}){if(t==="template"){for(let n=0;n<e.length;n++)if(e[n].type===7&&Ja.has(e[n].name))return!0}return!1}function _a({tag:t,props:e}){if(xt.isCustomElement(t))return!1;if(t==="component"||to(t.charCodeAt(0))||qa(t)||xt.isBuiltInComponent&&xt.isBuiltInComponent(t)||xt.isNativeTag&&!xt.isNativeTag(t))return!0;for(let n=0;n<e.length;n++){const i=e[n];if(i.type===6){if(i.name==="is"&&i.value){if(i.value.content.startsWith("vue:"))return!0;if(Tn("COMPILER_IS_ON_ELEMENT",xt,i.loc))return!0}}else if(i.name==="bind"&&Wa(i.arg,"is")&&Tn("COMPILER_IS_ON_ELEMENT",xt,i.loc))return!0}return!1}function to(t){return t>64&&t<91}const eo=/\r\n/g;function dl(t){const e=xt.whitespace!=="preserve";let n=!1;for(let i=0;i<t.length;i++){const r=t[i];if(r.type===2)if(ji)r.content=r.content.replace(eo,`
|
|
2
|
-
`);else if(Ua(r.content)){const l=t[i-1]&&t[i-1].type,o=t[i+1]&&t[i+1].type;!l||!o||e&&(l===3&&(o===3||o===1)||l===1&&(o===3||o===1&&no(r.content)))?(n=!0,t[i]=null):r.content=" "}else e&&(r.content=yl(r.content))}return n?t.filter(Boolean):t}function no(t){for(let e=0;e<t.length;e++){const n=t.charCodeAt(e);if(n===10||n===13)return!0}return!1}function yl(t){let e="",n=!1;for(let i=0;i<t.length;i++)Ut(t.charCodeAt(i))?n||(e+=" ",n=!0):(e+=t[i],n=!1);return e}function fi(t){(bt[0]||nn).children.push(t)}function Et(t,e){return{start:Tt.getPos(t),end:e==null?e:Tt.getPos(e),source:e==null?e:Bt(t,e)}}function Ne(t,e){t.end=Tt.getPos(e),t.source=Bt(t.start.offset,e)}function io(t){const e={type:6,name:t.rawName,nameLoc:Et(t.loc.start.offset,t.loc.start.offset+t.rawName.length),value:void 0,loc:t.loc};if(t.exp){const n=t.exp.loc;n.end.offset<t.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),e.value={type:2,content:t.exp.content,loc:n}}return e}function wn(t,e=!1,n,i=0,r=0){return ui(t,e,n,i)}function ce(t,e,n){xt.onError(za(t,Et(e,e)))}function ro(){Tt.reset(),Dt=null,ft=null,zt="",he=-1,$e=-1,bt.length=0}function lo(t,e){if(ro(),ye=t,xt=si({},hl),e){let r;for(r in e)e[r]!=null&&(xt[r]=e[r])}Tt.mode=xt.parseMode==="html"?1:xt.parseMode==="sfc"?2:0,Tt.inXML=xt.ns===1||xt.ns===2;const n=e&&e.delimiters;n&&(Tt.delimiterOpen=Nn(n[0]),Tt.delimiterClose=Nn(n[1]));const i=nn=Ya([],t);return Tt.parse(ye),i.loc=Et(0,t.length),i.children=dl(i.children),nn=null,i}new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b");class gl{constructor(e,n,i){this.label=e,this.value=n,this.level=i}toString(){return this.label}valueOf(){return this.value}toJSON(){return this.label}}class He extends Array{static from(e){if(e instanceof this)return e;if(e[Symbol.iterator]){let n=Je(Array.from(e).map(i=>String(i))).sort((i,r)=>kr(i,r,{numeric:!0}));return new this(...n)}else if(typeof e=="object"){let n=Object.keys(e).map(i=>String(i)).sort((i,r)=>kr(e[i],e[r]));return new this(...n)}throw new Error(`Invalid level values: ${e}`)}constructor(...e){return e=e.map((n,i)=>new gl(String(n),i)),e.forEach(n=>n.level=e),e.mapping=Object.fromEntries(e.map(n=>[n,n])),Object.setPrototypeOf(e,He.prototype),e}getItem(e){return typeof e=="number"||e instanceof Number?this[e]:this.mapping[e]}apply(e){let n=e.map(i=>this.mapping[i]);return n.level=this,n}}function Ve(t){return typeof t=="number"||t instanceof Number||t instanceof Date}function st(t,e=0){return e==0||t==null?t:t instanceof Date?new t.constructor(+t+e):+t+e}const Xt={min(t,{na_rm:e=!0,infinity_rm:n=!0}={}){return e&&(t=t.filter(Ve)),n&&(t=t.filter(i=>isFinite(i))),Array.from(t).reduce((i,r)=>i<r?i:r,1/0)},max(t,{na_rm:e=!0,infinity_rm:n=!0}={}){return e&&(t=t.filter(Ve)),n&&(t=t.filter(i=>isFinite(i))),Array.from(t).reduce((i,r)=>i>r?i:r,-1/0)},mean(t,{na_rm:e=!0,infinity_rm:n=!0}={}){return e&&(t=t.filter(Ve)),n&&(t=t.filter(i=>isFinite(i))),t.length==0?NaN:Array.from(t).reduce((i,r)=>i+r,0)/t.length},sd(t,{na_rm:e=!0,infinity_rm:n=!0}={}){if(e&&(t=t.filter(Ve)),n&&(t=t.filter(r=>isFinite(r))),t.length<=1)return NaN;let i=Array.from(t).reduce((r,l)=>r+l,0)/t.length;return Math.sqrt(Array.from(t).reduce((r,l)=>r+(l-i)**2,0)/(t.length-1))},quantile(t,e,{na_rm:n=!0,infinity_rm:i=!0}={}){if(n&&(t=t.filter(Ve)),i&&(t=t.filter(s=>isFinite(s))),t.length==0)return NaN;t=Array.from(t).sort((s,c)=>s-c);let r=(t.length-1)*e,l=Math.floor(r),o=Math.ceil(r);return l==o?t[l]:t[l]*(o-r)+t[o]*(r-l)},extent(t,{na_rm:e=!0,infinity_rm:n=!0}={}){if(e&&(t=t.filter(Ve)),n&&(t=t.filter(l=>isFinite(l))),t.length==0)return new Array(2);let i=Array.from(t).reduce((l,o)=>l<o?l:o,1/0),r=Array.from(t).reduce((l,o)=>l>o?l:o,-1/0);return Object.assign([i,r],{min:i,max:r})}},hi={sum(...t){if(t.some(i=>i==null))return null;if(t.some(i=>!Array.isArray(i)&&typeof i!="number"))throw new Error("Arguments must be numbers or arrays");let e=t.filter(i=>!Array.isArray(i)).reduce((i,r)=>+r+i,0);if(t=t.filter(i=>Array.isArray(i)),t.length==0)return[e];if(t.some(i=>i.length==0))return[];let n=t[0].length;if(t.some(i=>i.length!=n))throw new Error("Arrays must have the same length");return Array.from({length:n},(i,r)=>t.reduce((l,o)=>+o[r]+l,e))},opposite(t){if(t==null)return null;if(!Array.isArray(t)&&typeof t!="number")throw new Error("Arguments must be numbers or arrays");return Array.isArray(t)?t.map(e=>e==null?e:-e):-t},concat(...t){if(t.some(i=>i==null))return null;let e=t.filter(i=>Array.isArray(i));if(e.length==0)return[t.join("")];if(t.some(i=>i.length==0))return[];let n=e[0].length;if(e.some(i=>i.length!=n))throw new Error("Arrays must have the same length");return Array.from({length:n},(i,r)=>t.map(l=>Array.isArray(l)?l[r]:l).join(""))},apply(t,...e){if(e.some(r=>r==null))return null;let n=e.filter(r=>Array.isArray(r));if(n.length==0)return[t(...e)];if(e.some(r=>r.length==0))return[];let i=n[0].length;if(n.some(r=>r.length!=i))throw new Error("Arrays must have the same length");return Array.from({length:i},(r,l)=>t(...e.map(o=>Array.isArray(o)?o[l]:o)))}};function Nt(...t){if(t=t.filter(e=>e!==void 0),t.length!=0)return t=t.slice(t.findIndex(e=>e==null)+1),t.length==0?null:t.reduce((e,n)=>{for(let i in n)n[i]===null&&delete e[i],n[i]!=null&&(e[i]=n[i]);return e},{})}function Ie(...t){if(!t.some(e=>e===void 0))return t.some(e=>e===null)?null:t.join("")}function Je(t,e=null){let n=new Map;for(let i in t){let r=e?e(t[i]):t[i];n.has(r)||n.set(r,t[i])}return Array.from(n.values())}function kr(t,e,{numeric:n=!1}={}){return typeof t!="number"||typeof e!="number"?String(t).localeCompare(String(e),void 0,{numeric:n}):t-e}function Se(t,...e){return Array.isArray(t)?(t=t.filter(n=>typeof n=="function"),t.length===0?!1:(t.forEach(n=>n(...e)),!0)):typeof t!="function"?!1:(t(...e),!0)}function ke(t,{min:e,max:n}){return t<e||t>n?NaN:t}function yt(t,{min:e,max:n}){return t<e?e:t>n?n:t}function mi(t,{min:e,max:n}){return t==-1/0?e:t==1/0?n:t}function Lt(t){return typeof t!="object"||t==null?t:Object.fromEntries(Object.entries(t).filter(([e,n])=>n!=null))}function xl(t,e){if(t===e)return!0;if(typeof t!="object"||typeof e!="object"||t==null||e==null)return!1;let n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(let r of n)if(!xl(t[r],e[r]))return!1;return!0}function ao(t){if(!Array.isArray(t))throw new Error("Argument must be an array");let e=[],n=[];for(let i=0;i<t.length;i++){let r=t[i],l=e.findIndex(o=>xl(o,r));l===-1&&(e.push(r),l=e.length-1),n.push(l)}return n.categories=e,n}function oo(...t){if(t.length==0)return null;let e=t.filter(r=>Array.isArray(r)).reduce((r,l)=>{if(Array.isArray(l)){if(r==null)return l.length;if(r!=l.length)throw new Error("Arrays must have the same length")}return r},null)??0,n=[],i=[];for(let r=0;r<e;r++){let l=t.map(s=>Array.isArray(s)?s[r]:s),o=n.findIndex(s=>s.every((c,a)=>c===l[a]));o===-1&&(n.push(l),o=n.length-1),i.push(o)}return i.categories=n,i}function Kt(t){if(Object.keys(t).length==0)return null;let e=Object.values(t).filter(l=>Array.isArray(l)).reduce((l,o)=>{if(Array.isArray(o)){if(l==null)return o.length;if(l!=o.length)throw new Error("Arrays must have the same length")}return l},null)??0,n=Object.keys(t),i=[],r=[];for(let l=0;l<e;l++){let o=Object.fromEntries(n.map(c=>[c,Array.isArray(t[c])?t[c][l]:t[c]])),s=i.findIndex(c=>n.every(a=>c[a]===o[a]));s===-1&&(i.push(o),s=i.length-1),r.push(s)}return r.categories=i,r}function Ar(t){if(Object.keys(t).length==0)return[];let e=Object.values(t).filter(n=>Array.isArray(n)).reduce((n,i)=>{if(Array.isArray(i)){if(n==null)return i.length;if(n!=i.length)throw new Error("Arrays must have the same length")}return n},null)??0;return Array.from({length:e},(n,i)=>Object.fromEntries(Object.keys(t).map(r=>[r,Array.isArray(t[r])?t[r][i]:t[r]])))}function so(t){if(!(t instanceof SVGElement))return null;function e(o){let s=o.childNodes.length;for(;s--;){const c=o.childNodes[s];c.nodeType===Node.COMMENT_NODE?o.removeChild(c):c.nodeType===Node.ELEMENT_NODE&&(e(c),c.getAttribute("style")==""&&c.removeAttribute("style"),c.getAttribute("class")==""&&c.removeAttribute("class"))}}let n=t.cloneNode(!0),i=Array.from(t.querySelectorAll("foreignObject")),r=Array.from(n.querySelectorAll("foreignObject"));for(let o=0;o<i.length;o++){let s=i[o],c=r[o],a=i[o].querySelector("canvas");if(!a)continue;let u=n.ownerDocument.createElementNS("http://www.w3.org/2000/svg","image");u.setAttribute("href",a.toDataURL()),u.setAttribute("x",s.getAttribute("x")),u.setAttribute("y",s.getAttribute("y")),u.setAttribute("width",s.getAttribute("width")),u.setAttribute("height",s.getAttribute("height")),c.parentNode.replaceChild(u,c)}for(let o of n.querySelectorAll(".vvplot-interactive"))o.remove();return e(n),n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),n.setAttribute("version","1.1"),n.setAttribute("width",t.scrollWidth),n.setAttribute("height",t.scrollHeight),n.setAttribute("viewBox",`0 0 ${t.scrollWidth} ${t.scrollHeight}`),new XMLSerializer().serializeToString(n)}const vl={axis:{line_width:1,tick_width:1,tick_length:5,label_size:12,title_size:18},axis_h:{title_offset:20},axis_v:{title_offset:30,title_angle:90},axis_left:{tick_position:"left",title_position:"left"},axis_right:{tick_position:"right",title_position:"right"},axis_top:{tick_position:"top",title_position:"top"},axis_bottom:{tick_position:"bottom",title_position:"bottom"},grid:{line_width:1,line_width_major:2},plot:{margin:20,padding_h:50,padding_v:20},legend:{spacing:4},selection:{background:"#00000020"}},pl={axis:{line_color:"black",tick_color:"black",label_color:"black",title_color:"black"},grid:{line_color:"#eeeeee"}},uo={axis:{line_color:"gray",tick_color:"gray",label_color:"gray",title_color:"gray"},grid:{line_color:"#eeeeee"}},co={axis:{tick_color:"black",label_color:"black",title_color:"black"},grid:{line_color:"white"},plot:{background:"#eeeeee"}},fo={axis:{tick_color:"#333333",label_color:"#555555",title_color:"black"},grid:{line_color:"#666666"},plot:{background:"#888888"}},ho={axis:{line_color:"black",tick_color:"black",label_color:"black",title_color:"black"},grid:{line_color:"black",line_width_major:1,line_width_minor:.5}},mo={axis:{line_color:"black",tick_color:"black",label_color:"black",title_color:"black"},grid:null},yo={axis:null,grid:null};function go(...t){return t.reduce((e,n)=>{for(let i in n)n[i]===null?e[i]=null:e[i]=Nt(e[i],n[i]);return e??void 0},{})}function xo(t,e=!1){let{axis_h:n,axis_v:i,axis_x:r,axis_y:l,grid_h:o,grid_v:s,grid_x:c,grid_y:a,plot:{margin_x:u,margin_y:f,margin_h:h,margin_v:m,padding_x:y,padding_y:x,padding_h:$,padding_v:O,...j}={},...N}=t;return e?(n=Nt(n,l),i=Nt(i,r),o=Nt(o,c),s=Nt(s,a),j.margin_h=f===void 0?h:f,j.margin_v=u===void 0?m:u,j.padding_h=x===void 0?$:x,j.padding_v=y===void 0?O:y):(n=Nt(n,r),i=Nt(i,l),o=Nt(o,a),s=Nt(s,c),j.margin_h=u===void 0?h:u,j.margin_v=f===void 0?m:f,j.padding_h=y===void 0?$:y,j.padding_v=x===void 0?O:x),{axis_h:n,axis_v:i,grid_h:o,grid_v:s,plot:j,...N}}function vo(t){function e(n){return{line_color_major:["line_color","line_color_major"].map(i=>n?.[i]).findLast(i=>i!==void 0),line_color_minor:["line_color","line_color_minor"].map(i=>n?.[i]).findLast(i=>i!==void 0),line_width_major:["line_width","line_width_major"].map(i=>n?.[i]).findLast(i=>i!==void 0),line_width_minor:["line_width","line_width_minor"].map(i=>n?.[i]).findLast(i=>i!==void 0)}}return{axis:{h:Nt(...["axis","axis_h"].map(n=>t?.[n])),v:Nt(...["axis","axis_v"].map(n=>t?.[n])),left:Nt(...["axis","axis_v","axis_left"].map(n=>t?.[n])),right:Nt(...["axis","axis_v","axis_right"].map(n=>t?.[n])),top:Nt(...["axis","axis_h","axis_top"].map(n=>t?.[n])),bottom:Nt(...["axis","axis_h","axis_bottom"].map(n=>t?.[n]))},grid:{h:e(Nt(...["grid","grid_h"].map(n=>t?.[n]))),v:e(Nt(...["grid","grid_v"].map(n=>t?.[n])))},plot:{margin:{left:["margin","margin_h","margin_left"].map(n=>t?.plot?.[n]).findLast(n=>n!==void 0)??0,right:["margin","margin_h","margin_right"].map(n=>t?.plot?.[n]).findLast(n=>n!==void 0)??0,top:["margin","margin_v","margin_top"].map(n=>t?.plot?.[n]).findLast(n=>n!==void 0)??0,bottom:["margin","margin_v","margin_bottom"].map(n=>t?.plot?.[n]).findLast(n=>n!==void 0)??0},padding:{left:["padding","padding_h","padding_left"].map(n=>t?.plot?.[n]).findLast(n=>n!==void 0)??0,right:["padding","padding_h","padding_right"].map(n=>t?.plot?.[n]).findLast(n=>n!==void 0)??0,top:["padding","padding_v","padding_top"].map(n=>t?.plot?.[n]).findLast(n=>n!==void 0)??0,bottom:["padding","padding_v","padding_bottom"].map(n=>t?.plot?.[n]).findLast(n=>n!==void 0)??0},background:t?.plot?.background},selection:t?.selection??{},legend:{spacing:t?.legend?.spacing??0}}}const po={base:vl,default:pl,light:uo,classic:mo,gray:co,dark:fo,linedraw:ho,void:yo};let et=hi.sum;const be={blank:{scale_attrs:[],coord_scale(t,e){return null},get_range(t,e){if(e=="x")return t.x??[];if(e=="y")return t.y??[]},validate(t){return null}},point:{scale_attrs:["shape","size","color","stroke","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge??0,i=t.ynudge??0,r=et(e.x?.apply?.(t.x)??t.x,n),l=et(e.y?.apply?.(t.y)??t.y,i);return{x:r,y:l}},get_range(t,e){if(e=="x")return t.x??[];if(e=="y")return t.y??[]},validate(t){return isNaN(t.x)||isNaN(t.y)?null:t}},line:{scale_attrs:["color","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge??0,i=t.ynudge??0,r=et(e.x?.apply?.(t.x)??t.x,n),l=et(e.y?.apply?.(t.y)??t.y,i),o=et(e.x?.apply?.(t.xend)??t.xend,n),s=et(e.y?.apply?.(t.yend)??t.yend,i);return{x:r,y:l,xend:o,yend:s}},get_range(t,e){if(e=="x")return(t.x??[]).concat(t.xend??[]);if(e=="y")return(t.y??[]).concat(t.yend??[])},validate(t){return isNaN(t.x)||isNaN(t.y)||isNaN(t.xend)||isNaN(t.yend)?null:t}},stick:{scale_attrs:["color","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge??0,i=t.ynudge??0,r=et(e.x?.apply?.(t.x)??t.x,n),l=et(e.y?.apply?.(t.y)??t.y,i),o=et(r,t.dx),s=et(l,t.dy);return{x:r,y:l,xend:o,yend:s}},get_values(t,e){if(e=="x")return t.x??[];if(e=="y")return t.y??[]},get_range(t,e){if(e=="x")return(t.x??[]).concat(et(t.x??[],t.dx??0)??[]);if(e=="y")return(t.y??[]).concat(et(t.y??[],t.dy??0)??[])},validate(t){return isNaN(t.x)||isNaN(t.y)||isNaN(t.xend)||isNaN(t.yend)?null:t}},curve:{scale_attrs:["fill","color","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge?.map(l=>+l),i=t.ynudge?.map(l=>+l);return{points:t.points.map((l,o)=>l.map(s=>{let c=n?.[o]??0,a=i?.[o]??0;return{x:+(e?.x?.[s.x]??s.x)+c,y:+(e?.y?.[s.y]??s.y)+a}}))}},get_range(t,e){if(e=="x")return(t.points??[]).flatMap(n=>n.map(i=>i.x));if(e=="y")return(t.points??[]).flatMap(n=>n.map(i=>i.y))},validate(t){return Array.isArray(t.points)?t:null}},tile:{scale_attrs:["fill","color","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge??0,i=t.ynudge??0,r=e.x?.apply?.(t.x)??t.x,l=e.y?.apply?.(t.y)??t.y,o=et(r,t.width?.map?.(u=>-u/2)??-.5,n),s=et(r,t.width?.map?.(u=>+u/2)??.5,n),c=et(l,t.height?.map?.(u=>-u/2)??-.5,i),a=et(l,t.height?.map?.(u=>+u/2)??.5,i);return{xmin:o,xmax:s,ymin:c,ymax:a}},get_values(t,e){if(e=="x")return t.x;if(e=="y")return t.y},get_range(t,e){if(e=="x"){let n=(t.x??[]).map((r,l)=>+r-(t.width?.[l]??0)/2),i=(t.x??[]).map((r,l)=>+r+(t.width?.[l]??0)/2);return n.concat(i)}if(e=="y"){let n=(t.y??[]).map((r,l)=>+r-(t.height?.[l]??0)/2),i=(t.y??[]).map((r,l)=>+r+(t.height?.[l]??0)/2);return n.concat(i)}},validate(t){return isNaN(t.xmin)||isNaN(t.ymin)||isNaN(t.xmax)||isNaN(t.ymax)?null:t}},rect:{scale_attrs:["fill","color","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge??0,i=t.ynudge??0,r=et(e.x?.apply?.(t.xmin)??t.xmin,n),l=et(e.x?.apply?.(t.xmax)??t.xmax,n),o=et(e.y?.apply?.(t.ymin)??t.ymin,i),s=et(e.y?.apply?.(t.ymax)??t.ymax,i);return{xmin:r,xmax:l,ymin:o,ymax:s}},get_range(t,e){if(e=="x")return(t.xmin??[]).concat(t.xmax??[]);if(e=="y")return(t.ymin??[]).concat(t.ymax??[])},validate(t){return isNaN(t.xmin)||isNaN(t.ymin)||isNaN(t.xmax)||isNaN(t.ymax)?null:t}},polygon:{scale_attrs:["fill","color","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge?.map(l=>+l),i=t.ynudge?.map(l=>+l);return{points:t.points.map((l,o)=>l.map(s=>{let c=n?.[o]??0,a=i?.[o]??0;return{x:+(e?.x?.[s.x]??s.x)+c,y:+(e?.y?.[s.y]??s.y)+a}}))}},get_range(t,e){if(e=="x")return(t.points??[]).flatMap(n=>n.map(i=>i.x));if(e=="y")return(t.points??[]).flatMap(n=>n.map(i=>i.y))},validate(t){return Array.isArray(t.points)?t:null}},text:{scale_attrs:["size","color","stroke","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge??0,i=t.ynudge??0,r=et(e.x?.apply?.(t.x)??t.x,n),l=et(e.y?.apply?.(t.y)??t.y,i);return{x:r,y:l}},get_range(t,e){if(e=="x")return t.x??[];if(e=="y")return t.y??[]},validate(t){return isNaN(t.x)||isNaN(t.y)?null:t}},textsegment:{scale_attrs:["size","color","stroke","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge??0,i=t.ynudge??0,r=et(e.x?.apply?.(t.x)??t.x,n),l=et(e.y?.apply?.(t.y)??t.y,i),o=et(e.x?.apply?.(t.xend)??t.xend,n),s=et(e.y?.apply?.(t.yend)??t.yend,i);return{x:r,y:l,xend:o,yend:s}},get_range(t,e){if(e=="x")return(t.x??[]).concat(t.xend??[]);if(e=="y")return(t.y??[]).concat(t.yend??[])},validate(t){return isNaN(t.x)||isNaN(t.xend)||isNaN(t.y)||isNaN(t.yend)?null:t}},boxplot:{scale_attrs:["fill","color","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge??0,i=t.ynudge??0;if(t.x){let r=et(e.x?.apply?.(t.x)??t.x,n),l=et(r,t.width?.map?.(x=>-x/2)??-.5,n),o=et(r,t.width?.map?.(x=>+x/2)??.5,n),s=et(t.lwisker,i),c=et(t.Q1,i),a=et(t.median,i),u=et(t.Q3,i),f=et(t.uwisker,i),h=hi.apply((x,{y:$,$raw:O},j)=>et($,j).map((N,I)=>({x,y:N,$raw:O[I]})),r,t.outliers??[],i),m=et(t.min,i),y=et(t.max,i);return{x:r,xmin:l,xmax:o,lwisker:s,Q1:c,median:a,Q3:u,uwisker:f,outliers:h,$xmin:l,$xmax:o,$ymin:m,$ymax:y}}else if(t.y){let r=et(e.y?.apply?.(t.y)??t.y,i),l=et(r,t.height?.map?.(x=>-x/2)??-.5,i),o=et(r,t.height?.map?.(x=>+x/2)??.5,i),s=et(t.lwisker,n),c=et(t.Q1,n),a=et(t.median,n),u=et(t.Q3,n),f=et(t.uwisker,n),h=hi.apply((x,{x:$,$raw:O},j)=>et($,j).map((N,I)=>({x:N,y:x,$raw:O[I]})),r,t.outliers??[],n),m=et(t.xmin,n),y=et(t.xmax,n);return{y:r,ymin:l,ymax:o,lwisker:s,Q1:c,median:a,Q3:u,uwisker:f,outliers:h,$xmin:m,$xmax:y,$ymin:l,$ymax:o}}return{}},get_range(t,e){if(e=="x")return t.x||(t.min??[]).concat(t.max??[]);if(e=="y")return t.y||(t.min??[]).concat(t.max??[])},validate(t){return[t.$xmin,t.$xmax,t.$ymin,t.$ymax].some(e=>isNaN(e))?null:t}}},wo={identity:Object.assign(function(t){return t},{core_attrs:["x","y","xnudge","ynudge"]}),line:Object.assign(function(t,{orientation:e="x"}={}){let n=["x","y"].filter(a=>t[a]==null);if(n.length>0)throw new Error(`Missing aesthetics for "StatLine": "${n.join('", "')}"`);let i=t.group??new Array(t.x.length).fill(null),l=Object.values(i.reduce((a,u,f)=>(a[u]??=[],a[u].push(f),a),{})).map(a=>a.map((u,f)=>[t[e][u],f]).sort((u,f)=>u[0]-f[0]).map((u,f)=>a[u[1]])),o=l.map(a=>a.slice(0,-1).concat(NaN)).reduce((a,u)=>a.concat(u),[]).filter(a=>!isNaN(a)),s=l.map(a=>a.slice(1).concat(NaN)).reduce((a,u)=>a.concat(u),[]).filter(a=>!isNaN(a)),c={};for(let a in t)c[a]=o.map(u=>t[a][u]);return c.xend=s.map(a=>t.x[a]),c.yend=s.map(a=>t.y[a]),c},{core_attrs:["x","y","xnudge","ynudge"]}),linerange:Object.assign(function(t){if(t.x!=null){let e=["x","ymin","ymax"].filter(n=>t[n]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatLinerange": "${e.join('", "')}"`);return(({x:n,ymin:i,ymax:r,...l})=>({x:n,xend:n,y:i,yend:r,...l}))(t)}else if(t.y!=null){let e=["y","xmin","xmax"].filter(n=>t[n]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatLinerange": "${e.join('", "')}"`);return(({y:n,xmin:i,xmax:r,...l})=>({y:n,yend:n,x:i,xend:r,...l}))(t)}else throw new Error('Missing aesthetics for "StatLinerange": x,ymin,ymax or y,xmin,xmax')},{core_attrs:["x","y","xmin","xmax","ymin","ymax","xnudge","ynudge"]}),path:Object.assign(function(t){let e=["x","y"].filter(c=>t[c]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatPath": "${e.join('", "')}"`);let n=t.group??new Array(t.x.length).fill(null),r=Object.values(n.reduce((c,a,u)=>(c[a]??=[],c[a].push(u),c),{})).map(c=>c.map((a,u)=>c[u])),l=r.map(c=>c.slice(0,-1).concat(NaN)).reduce((c,a)=>c.concat(a),[]).filter(c=>!isNaN(c)),o=r.map(c=>c.slice(1).concat(NaN)).reduce((c,a)=>c.concat(a),[]).filter(c=>!isNaN(c)),s={};for(let c in t)s[c]=l.map(a=>t[c][a]);return s.xend=o.map(c=>t.x[c]),s.yend=o.map(c=>t.y[c]),s},{core_attrs:["x","y","xnudge","ynudge"]}),segment:Object.assign(function(t){t.xend==null&&(t.xend=t.x),t.yend==null&&(t.yend=t.y);let e=["x","y","xend","yend"].filter(n=>t[n]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatSegment": "${e.join('", "')}"`);return t},{core_attrs:["x","y","xend","yend","xnudge","ynudge"]}),stick:Object.assign(function(t){t.dx==null&&(t.dx=Array(t.x.length).fill(0)),t.dy==null&&(t.dy=Array(t.y.length).fill(0));let e=["x","y","dx","dy"].filter(n=>t[n]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatStick": "${e.join('", "')}"`);return t},{core_attrs:["x","y","dx","dy","xnudge","ynudge"]}),curve:Object.assign(function(t){if(t.points!=null)return t;let e=["x","y"].filter(u=>t[u]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatCurve": "${e.join('", "')}" or "points"`);let n=Object.keys(t).filter(u=>!["x","y"].includes(u)&&!u.startsWith("$")),i=Kt(Object.fromEntries(n.map(u=>[u,t[u]]))),r=Kt({group:i??new Array(t.x.length).fill(0)}).map((u,f,h)=>h.categories[u]),l=Map.groupBy(t.$raw,(u,f)=>r[f]),o=Array.from(l.values()),s=Array.from(l.keys()),c=Array.from(Map.groupBy(Ar({x:t.x,y:t.y}),(u,f)=>r[f]).values()),a={$raw:o,points:c};for(let u of n)a[u]=s.map(f=>f.group).map(f=>i.categories[f][u]);return a},{core_attrs:["x","y","xnudge","ynudge"]}),point:Object.assign(function(t){let e=["x","y"].filter(n=>t[n]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatPoint": "${e.join('", "')}"`);return t},{core_attrs:["x","y","xnudge","ynudge"]}),polygon:Object.assign(function(t){if(t.points!=null)return t;let e=["x","y"].filter(u=>t[u]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatPolygon": "${e.join('", "')}" or "points"`);let n=Object.keys(t).filter(u=>!["x","y"].includes(u)&&!u.startsWith("$")),i=Kt(Object.fromEntries(n.map(u=>[u,t[u]]))),r=Kt({group:i??new Array(t.x.length).fill(0)}).map((u,f,h)=>h.categories[u]),l=Map.groupBy(t.$raw,(u,f)=>r[f]),o=Array.from(l.values()),s=Array.from(l.keys()),c=Array.from(Map.groupBy(Ar({x:t.x,y:t.y}),(u,f)=>r[f]).values()),a={$raw:o,points:c};for(let u of n)a[u]=s.map(f=>f.group).map(f=>i.categories[f][u]);return a},{core_attrs:["points","xnudge","ynudge"]}),rect:Object.assign(function(t){let e=["xmin","xmax","ymin","ymax"].filter(n=>t[n]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatRect": "${e.join('", "')}"`);return t},{core_attrs:["xmin","xmax","ymin","ymax","xnudge","ynudge"]}),tile:Object.assign(function(t){t.width==null&&t.x.some(n=>typeof n=="string")&&(t.width=Array(t.x.length).fill(1)),t.height==null&&t.y.some(n=>typeof n=="string")&&(t.height=Array(t.y.length).fill(1));let e=["x","y","width","height"].filter(n=>t[n]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatTile": "${e.join('", "')}"`);return t},{core_attrs:["x","y","width","height","xnudge","ynudge"]}),text:Object.assign(function(t){let e=["x","y","label"].filter(n=>t[n]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatText": "${e.join('", "')}"`);return t},{core_attrs:["x","y","xnudge","ynudge","label","text-length"]}),textsegment:Object.assign(function(t){t.xend==null&&(t.xend=t.x),t.yend==null&&(t.yend=t.y);let e=["x","y","xend","yend","label"].filter(n=>t[n]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatTextsegment": "${e.join('", "')}"`);return t},{core_attrs:["x","y","xend","yend","xnudge","ynudge","label"]}),histogram:Object.assign(function(t,{bins:e=30,binwidth:n,breaks:i}={}){if(t.x!=null&&t.y!=null)throw new Error('"StatHistogram" only supports "x" or "y", not both');let r=t.x??t.y;if(r==null)throw new Error('Missing aesthetics for "StatHistogram": "x" or "y"');if(r.some(h=>typeof h!="number"))throw new Error('"StatHistogram" requires a continuous aesthetic');if(i)i.sort((h,m)=>h-m);else{let{min:h,max:m}=Xt.extent(r);n||(n=(m-h)/(e-1)),i=Array.from({length:e+1},(y,x)=>h+(x-.5)*n)}e=i.length-1;let l=Object.keys(t).filter(h=>!["x","y"].includes(h)&&!h.startsWith("$")),o=Kt(Object.fromEntries(l.map(h=>[h,t[h]]))),s=Kt({group:o??new Array(r.length).fill(0),upper:r.map(h=>i.findLast(m=>m<=h)??i[0]),lower:r.map(h=>i.find(m=>m>h)??i[e])}).map((h,m,y)=>y.categories[h]),c=Map.groupBy(t.$raw,(h,m)=>s[m]),a=Array.from(c.values()),u=Array.from(c.keys()),f={$raw:a,count:a.map(h=>h.length),$group:u.map(h=>h.group),upper:u.map(h=>h.upper),lower:u.map(h=>h.lower)};for(let h of l)f[h]=u.map(m=>o.categories[m.group][h]);return t.x?(({upper:h,lower:m,count:y,ymin:x=a.map(()=>0),...$})=>({xmin:h,xmax:m,ymin:x,ymax:y,...$}))(f):(({upper:h,lower:m,count:y,xmin:x=a.map(()=>0),...$})=>({xmin:x,xmax:y,ymin:h,ymax:m,...$}))(f)},{core_attrs:["x","y","xnudge","ynudge"]}),bar:Object.assign(function(t){if(t.x!=null&&t.y!=null)throw new Error('"StatBar" only supports "x" or "y", not both');let e=t.x??t.y;if(e==null)throw new Error('Missing aesthetics for "StatBar": "x" or "y"');if(e.some(a=>typeof a=="number"))throw new Error('"StatBar" requires a discrete aesthetic');let n=Object.keys(t).filter(a=>!["x","y"].includes(a)&&!a.startsWith("$")),i=Kt(Object.fromEntries(n.map(a=>[a,t[a]]))),r=Kt({group:i??0,value:e}),l=Map.groupBy(t.$raw,(a,u)=>r.categories[r[u]]),o=Array.from(l.values()),s=Array.from(l.keys()),c={$raw:o,count:o.map(a=>a.length),$group:s.map(a=>a.group),value:s.map(a=>a.value)};for(let a of n)c[a]=s.map(u=>u.group).map(u=>i.categories[u][a]);return t.x?(({value:a,count:u,...f})=>({x:a,y:u.map(h=>h/2),height:u,...f}))(c):(({value:a,count:u,...f})=>({y:a,x:u.map(h=>h/2),width:u,...f}))(c)},{core_attrs:["x","y","xnudge","ynudge"]}),boxplot:Object.assign(function(t,{}){let e=["x","y"].filter(b=>t[b]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatBoxplot": "${e.join('", "')}"`);let n=t.x.some(b=>typeof b!="number"),i=t.y.some(b=>typeof b!="number");if(n&&i)throw new Error('Both "x" and "y" are discrete, "StatBoxplot" requires one continuous and one discrete aesthetic');if(!n&&!i)throw new Error('Both "x" and "y" are continuous, "StatBoxplot" requires one continuous and one discrete aesthetic');let[r,l]=n?["y","x"]:["x","y"],o=Object.keys(t).filter(b=>b!=r&&!b.startsWith("$")),s=Kt(Object.fromEntries(o.map(b=>[b,t[b]]))),c=Kt({group:s??0,cate:t[l]}),a=Map.groupBy(c.map((b,d)=>d),(b,d)=>c.categories[c[d]]),u=Array.from(a.keys()),f=Array.from(a.values()).map(b=>b.map(d=>t.$raw[d])),h=Array.from(a.values()).map(b=>b.map(d=>t[r][d])),m=h.map(b=>Xt.min(b)),y=h.map(b=>Xt.quantile(b,.25)),x=h.map(b=>Xt.quantile(b,.5)),$=h.map(b=>Xt.quantile(b,.75)),O=h.map(b=>Xt.max(b)),j=h.map((b,d)=>$[d]-y[d]),N=h.map((b,d)=>Math.max(m[d],y[d]-1.5*j[d])),I=h.map((b,d)=>Math.min(O[d],$[d]+1.5*j[d])),B=Array.from(a.values()).map((b,d)=>{let p=b.filter(w=>t[r][w]<N[d]||t[r][w]>I[d]);return{[r]:p.map(w=>t[r][w]),$raw:p.map(w=>t.$raw[w])}}),P={$raw:f,$group:u.map(b=>b.group),min:m,lwisker:N,Q1:y,median:x,Q3:$,uwisker:I,max:O,outliers:B};for(let b of o)P[b]=u.map(d=>d.group).map(d=>s.categories[d][b]);return P},{core_attrs:["x","y","xnudge","ynudge"]}),density:Object.assign(function(t,{n:e=512,kernel:n="gaussian"}={}){if(t.x!=null&&t.y!=null)throw new Error('"StatDensity" only supports "x" or "y", not both');let i=t.x??t.y;if(i==null)throw new Error('Missing aesthetics for "StatDensity": "x" or "y"');if(i.some(m=>typeof m!="number"))throw new Error('"StatDensity" requires a continuous aesthetic');if(n=$r[n],!n)throw new Error(`kernel must be one of ${Object.keys($r).map(m=>`"${m}"`).join(", ")}`);let r=Object.keys(t).filter(m=>!["x","y"].includes(m)&&!m.startsWith("$")),l=Kt(Object.fromEntries(r.map(m=>[m,t[m]]))),o=Kt({group:l??new Array(i.length).fill(0)}).map((m,y,x)=>x.categories[m]),s=Map.groupBy(t.$raw,(m,y)=>o[y]),c=Array.from(s.values()),a=Array.from(s.keys()),u=Array.from(Map.groupBy(i,(m,y)=>o[y]).values()),f={$raw:c,$group:a.map(m=>m.group)},h=u.map(m=>{let y=bo.nrd0(m),{min:x,max:$}=Xt.extent(m);x-=3*y,$+=3*y;let O=($-x)/(e-1);return Array.from({length:e},(N,I)=>x+I*O).map(N=>[N,Xt.mean(m.map(I=>n((N-I)/y)))/y])});for(let m of r)f[m]=a.map(y=>l.categories[y.group][m]);return t.x?f.points=h.map(m=>m.map(([y,x])=>({x:y,y:x}))):f.points=h.map(m=>m.map(([y,x])=>({x,y}))),f},{core_attrs:["x","y","xnudge","ynudge"]})},bo={nrd0:function(t){t=t.filter(r=>(typeof r=="number"||r instanceof Date)&&isFinite(r));let e=Xt.sd(t),n=Xt.quantile(t,.75)-Xt.quantile(t,.25);return .9*(Math.min(e,n/1.34)||1)*t.length**-.2},nrd:function(t){t=t.filter(r=>(typeof r=="number"||r instanceof Date)&&isFinite(r));let e=Xt.sd(t),n=Xt.quantile(t,.75)-Xt.quantile(t,.25);return 1.06*(Math.min(e,n/1.34)||1)*t.length**-.2}},$r={uniform:t=>Math.abs(t)<=1?.5:0,triangular:t=>Math.abs(t)<=1?1-Math.abs(t):0,epanechnikov:t=>Math.abs(t)<=1?.75*(1-t**2):0,biweight:t=>Math.abs(t)<=1?15/16*(1-t**2)**2:0,triweight:t=>Math.abs(t)<=1?35/32*(1-t**2)**3:0,tricube:t=>Math.abs(t)<=1?70/81*(1-Math.abs(t)**3)**3:0,gaussian:t=>Math.exp(-.5*t**2)/Math.sqrt(2*Math.PI),cosine:t=>Math.abs(t)<=1?Math.PI/4*Math.cos(Math.PI/2*t):0,logistic:t=>1/Math.cosh(t)**2/Math.PI,sigmoid:t=>2/(Math.exp(t)+Math.exp(-t))**2/Math.PI};function bn(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ko(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function wl(t){let e,n,i;t.length!==2?(e=bn,n=(s,c)=>bn(t(s),c),i=(s,c)=>t(s)-c):(e=t===bn||t===ko?t:Ao,n=t,i=t);function r(s,c,a=0,u=s.length){if(a<u){if(e(c,c)!==0)return u;do{const f=a+u>>>1;n(s[f],c)<0?a=f+1:u=f}while(a<u)}return a}function l(s,c,a=0,u=s.length){if(a<u){if(e(c,c)!==0)return u;do{const f=a+u>>>1;n(s[f],c)<=0?a=f+1:u=f}while(a<u)}return a}function o(s,c,a=0,u=s.length){const f=r(s,c,a,u-1);return f>a&&i(s[f-1],c)>-i(s[f],c)?f-1:f}return{left:r,center:o,right:l}}function Ao(){return 0}function $o(t){return t===null?NaN:+t}const Mo=wl(bn),So=Mo.right;wl($o).center;const No=Math.sqrt(50),To=Math.sqrt(10),Co=Math.sqrt(2);function Cn(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),l=i/Math.pow(10,r),o=l>=No?10:l>=To?5:l>=Co?2:1;let s,c,a;return r<0?(a=Math.pow(10,-r)/o,s=Math.round(t*a),c=Math.round(e*a),s/a<t&&++s,c/a>e&&--c,a=-a):(a=Math.pow(10,r)*o,s=Math.round(t/a),c=Math.round(e/a),s*a<t&&++s,c*a>e&&--c),c<s&&.5<=n&&n<2?Cn(t,e,n*2):[s,c,a]}function Oo(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const i=e<t,[r,l,o]=i?Cn(e,t,n):Cn(t,e,n);if(!(l>=r))return[];const s=l-r+1,c=new Array(s);if(i)if(o<0)for(let a=0;a<s;++a)c[a]=(l-a)/-o;else for(let a=0;a<s;++a)c[a]=(l-a)*o;else if(o<0)for(let a=0;a<s;++a)c[a]=(r+a)/-o;else for(let a=0;a<s;++a)c[a]=(r+a)*o;return c}function di(t,e,n){return e=+e,t=+t,n=+n,Cn(t,e,n)[2]}function Eo(t,e,n){e=+e,t=+t,n=+n;const i=e<t,r=i?di(e,t,n):di(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}var jo={value:()=>{}};function bl(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new kn(n)}function kn(t){this._=t}function Po(t,e){return t.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}kn.prototype=bl.prototype={constructor:kn,on:function(t,e){var n=this._,i=Po(t+"",n),r,l=-1,o=i.length;if(arguments.length<2){for(;++l<o;)if((r=(t=i[l]).type)&&(r=Vo(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++l<o;)if(r=(t=i[l]).type)n[r]=Mr(n[r],t.name,e);else if(e==null)for(r in n)n[r]=Mr(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new kn(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,l;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(l=this._[t],i=0,r=l.length;i<r;++i)l[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,l=i.length;r<l;++r)i[r].value.apply(e,n)}};function Vo(t,e){for(var n=0,i=t.length,r;n<i;++n)if((r=t[n]).name===e)return r.value}function Mr(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=jo,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var yi="http://www.w3.org/1999/xhtml";const Sr={svg:"http://www.w3.org/2000/svg",xhtml:yi,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Gn(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Sr.hasOwnProperty(e)?{space:Sr[e],local:t}:t}function Io(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===yi&&e.documentElement.namespaceURI===yi?e.createElement(t):e.createElementNS(n,t)}}function Bo(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function kl(t){var e=Gn(t);return(e.local?Bo:Io)(e)}function Lo(){}function Pi(t){return t==null?Lo:function(){return this.querySelector(t)}}function Xo(t){typeof t!="function"&&(t=Pi(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var l=e[r],o=l.length,s=i[r]=new Array(o),c,a,u=0;u<o;++u)(c=l[u])&&(a=t.call(c,c.__data__,u,l))&&("__data__"in c&&(a.__data__=c.__data__),s[u]=a);return new te(i,this._parents)}function Yo(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Do(){return[]}function Al(t){return t==null?Do:function(){return this.querySelectorAll(t)}}function Ro(t){return function(){return Yo(t.apply(this,arguments))}}function Ho(t){typeof t=="function"?t=Ro(t):t=Al(t);for(var e=this._groups,n=e.length,i=[],r=[],l=0;l<n;++l)for(var o=e[l],s=o.length,c,a=0;a<s;++a)(c=o[a])&&(i.push(t.call(c,c.__data__,a,o)),r.push(c));return new te(i,r)}function $l(t){return function(){return this.matches(t)}}function Ml(t){return function(e){return e.matches(t)}}var zo=Array.prototype.find;function Fo(t){return function(){return zo.call(this.children,t)}}function qo(){return this.firstElementChild}function Wo(t){return this.select(t==null?qo:Fo(typeof t=="function"?t:Ml(t)))}var Go=Array.prototype.filter;function Uo(){return Array.from(this.children)}function Ko(t){return function(){return Go.call(this.children,t)}}function Qo(t){return this.selectAll(t==null?Uo:Ko(typeof t=="function"?t:Ml(t)))}function Zo(t){typeof t!="function"&&(t=$l(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var l=e[r],o=l.length,s=i[r]=[],c,a=0;a<o;++a)(c=l[a])&&t.call(c,c.__data__,a,l)&&s.push(c);return new te(i,this._parents)}function Sl(t){return new Array(t.length)}function Jo(){return new te(this._enter||this._groups.map(Sl),this._parents)}function On(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}On.prototype={constructor:On,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function _o(t){return function(){return t}}function ts(t,e,n,i,r,l){for(var o=0,s,c=e.length,a=l.length;o<a;++o)(s=e[o])?(s.__data__=l[o],i[o]=s):n[o]=new On(t,l[o]);for(;o<c;++o)(s=e[o])&&(r[o]=s)}function es(t,e,n,i,r,l,o){var s,c,a=new Map,u=e.length,f=l.length,h=new Array(u),m;for(s=0;s<u;++s)(c=e[s])&&(h[s]=m=o.call(c,c.__data__,s,e)+"",a.has(m)?r[s]=c:a.set(m,c));for(s=0;s<f;++s)m=o.call(t,l[s],s,l)+"",(c=a.get(m))?(i[s]=c,c.__data__=l[s],a.delete(m)):n[s]=new On(t,l[s]);for(s=0;s<u;++s)(c=e[s])&&a.get(h[s])===c&&(r[s]=c)}function ns(t){return t.__data__}function is(t,e){if(!arguments.length)return Array.from(this,ns);var n=e?es:ts,i=this._parents,r=this._groups;typeof t!="function"&&(t=_o(t));for(var l=r.length,o=new Array(l),s=new Array(l),c=new Array(l),a=0;a<l;++a){var u=i[a],f=r[a],h=f.length,m=rs(t.call(u,u&&u.__data__,a,i)),y=m.length,x=s[a]=new Array(y),$=o[a]=new Array(y),O=c[a]=new Array(h);n(u,f,x,$,O,m,e);for(var j=0,N=0,I,B;j<y;++j)if(I=x[j]){for(j>=N&&(N=j+1);!(B=$[N])&&++N<y;);I._next=B||null}}return o=new te(o,i),o._enter=s,o._exit=c,o}function rs(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function ls(){return new te(this._exit||this._groups.map(Sl),this._parents)}function as(t,e,n){var i=this.enter(),r=this,l=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(r=e(r),r&&(r=r.selection())),n==null?l.remove():n(l),i&&r?i.merge(r).order():r}function os(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,l=i.length,o=Math.min(r,l),s=new Array(r),c=0;c<o;++c)for(var a=n[c],u=i[c],f=a.length,h=s[c]=new Array(f),m,y=0;y<f;++y)(m=a[y]||u[y])&&(h[y]=m);for(;c<r;++c)s[c]=n[c];return new te(s,this._parents)}function ss(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i=t[e],r=i.length-1,l=i[r],o;--r>=0;)(o=i[r])&&(l&&o.compareDocumentPosition(l)^4&&l.parentNode.insertBefore(o,l),l=o);return this}function us(t){t||(t=cs);function e(f,h){return f&&h?t(f.__data__,h.__data__):!f-!h}for(var n=this._groups,i=n.length,r=new Array(i),l=0;l<i;++l){for(var o=n[l],s=o.length,c=r[l]=new Array(s),a,u=0;u<s;++u)(a=o[u])&&(c[u]=a);c.sort(e)}return new te(r,this._parents).order()}function cs(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function fs(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function hs(){return Array.from(this)}function ms(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,l=i.length;r<l;++r){var o=i[r];if(o)return o}return null}function ds(){let t=0;for(const e of this)++t;return t}function ys(){return!this.node()}function gs(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r=e[n],l=0,o=r.length,s;l<o;++l)(s=r[l])&&t.call(s,s.__data__,l,r);return this}function xs(t){return function(){this.removeAttribute(t)}}function vs(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ps(t,e){return function(){this.setAttribute(t,e)}}function ws(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function bs(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function ks(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function As(t,e){var n=Gn(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((e==null?n.local?vs:xs:typeof e=="function"?n.local?ks:bs:n.local?ws:ps)(n,e))}function Nl(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function $s(t){return function(){this.style.removeProperty(t)}}function Ms(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ss(t,e,n){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Ns(t,e,n){return arguments.length>1?this.each((e==null?$s:typeof e=="function"?Ss:Ms)(t,e,n??"")):Ge(this.node(),t)}function Ge(t,e){return t.style.getPropertyValue(e)||Nl(t).getComputedStyle(t,null).getPropertyValue(e)}function Ts(t){return function(){delete this[t]}}function Cs(t,e){return function(){this[t]=e}}function Os(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Es(t,e){return arguments.length>1?this.each((e==null?Ts:typeof e=="function"?Os:Cs)(t,e)):this.node()[t]}function Tl(t){return t.trim().split(/^|\s+/)}function Vi(t){return t.classList||new Cl(t)}function Cl(t){this._node=t,this._names=Tl(t.getAttribute("class")||"")}Cl.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Ol(t,e){for(var n=Vi(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function El(t,e){for(var n=Vi(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function js(t){return function(){Ol(this,t)}}function Ps(t){return function(){El(this,t)}}function Vs(t,e){return function(){(e.apply(this,arguments)?Ol:El)(this,t)}}function Is(t,e){var n=Tl(t+"");if(arguments.length<2){for(var i=Vi(this.node()),r=-1,l=n.length;++r<l;)if(!i.contains(n[r]))return!1;return!0}return this.each((typeof e=="function"?Vs:e?js:Ps)(n,e))}function Bs(){this.textContent=""}function Ls(t){return function(){this.textContent=t}}function Xs(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Ys(t){return arguments.length?this.each(t==null?Bs:(typeof t=="function"?Xs:Ls)(t)):this.node().textContent}function Ds(){this.innerHTML=""}function Rs(t){return function(){this.innerHTML=t}}function Hs(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function zs(t){return arguments.length?this.each(t==null?Ds:(typeof t=="function"?Hs:Rs)(t)):this.node().innerHTML}function Fs(){this.nextSibling&&this.parentNode.appendChild(this)}function qs(){return this.each(Fs)}function Ws(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Gs(){return this.each(Ws)}function Us(t){var e=typeof t=="function"?t:kl(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Ks(){return null}function Qs(t,e){var n=typeof t=="function"?t:kl(t),i=e==null?Ks:typeof e=="function"?e:Pi(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function Zs(){var t=this.parentNode;t&&t.removeChild(this)}function Js(){return this.each(Zs)}function _s(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function tu(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function eu(t){return this.select(t?tu:_s)}function nu(t){return arguments.length?this.property("__data__",t):this.node().__data__}function iu(t){return function(e){t.call(this,e,this.__data__)}}function ru(t){return t.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function lu(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,r=e.length,l;n<r;++n)l=e[n],(!t.type||l.type===t.type)&&l.name===t.name?this.removeEventListener(l.type,l.listener,l.options):e[++i]=l;++i?e.length=i:delete this.__on}}}function au(t,e,n){return function(){var i=this.__on,r,l=iu(e);if(i){for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=l,r.options=n),r.value=e;return}}this.addEventListener(t.type,l,n),r={type:t.type,name:t.name,value:e,listener:l,options:n},i?i.push(r):this.__on=[r]}}function ou(t,e,n){var i=ru(t+""),r,l=i.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,a=s.length,u;c<a;++c)for(r=0,u=s[c];r<l;++r)if((o=i[r]).type===u.type&&o.name===u.name)return u.value}return}for(s=e?au:lu,r=0;r<l;++r)this.each(s(i[r],e,n));return this}function jl(t,e,n){var i=Nl(t),r=i.CustomEvent;typeof r=="function"?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function su(t,e){return function(){return jl(this,t,e)}}function uu(t,e){return function(){return jl(this,t,e.apply(this,arguments))}}function cu(t,e){return this.each((typeof e=="function"?uu:su)(t,e))}function*fu(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,l=i.length,o;r<l;++r)(o=i[r])&&(yield o)}var hu=[null];function te(t,e){this._groups=t,this._parents=e}function cn(){return new te([[document.documentElement]],hu)}function mu(){return this}te.prototype=cn.prototype={constructor:te,select:Xo,selectAll:Ho,selectChild:Wo,selectChildren:Qo,filter:Zo,data:is,enter:Jo,exit:ls,join:as,merge:os,selection:mu,order:ss,sort:us,call:fs,nodes:hs,node:ms,size:ds,empty:ys,each:gs,attr:As,style:Ns,property:Es,classed:Is,text:Ys,html:zs,raise:qs,lower:Gs,append:Us,insert:Qs,remove:Js,clone:eu,datum:nu,on:ou,dispatch:cu,[Symbol.iterator]:fu};function fn(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Un(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Pe(){}var rn=.7,En=1/rn,ze="\\s*([+-]?\\d+)\\s*",ln="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ae="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",du=/^#([0-9a-f]{3,8})$/,yu=new RegExp(`^rgb\\(${ze},${ze},${ze}\\)$`),gu=new RegExp(`^rgb\\(${ae},${ae},${ae}\\)$`),xu=new RegExp(`^rgba\\(${ze},${ze},${ze},${ln}\\)$`),vu=new RegExp(`^rgba\\(${ae},${ae},${ae},${ln}\\)$`),pu=new RegExp(`^hsl\\(${ln},${ae},${ae}\\)$`),wu=new RegExp(`^hsla\\(${ln},${ae},${ae},${ln}\\)$`),Nr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};fn(Pe,Ee,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Tr,formatHex:Tr,formatHex8:bu,formatHsl:ku,formatRgb:Cr,toString:Cr});function Tr(){return this.rgb().formatHex()}function bu(){return this.rgb().formatHex8()}function ku(){return Vl(this).formatHsl()}function Cr(){return this.rgb().formatRgb()}function Ee(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=du.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Or(e):n===3?new Rt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?yn(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?yn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=yu.exec(t))?new Rt(e[1],e[2],e[3],1):(e=gu.exec(t))?new Rt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=xu.exec(t))?yn(e[1],e[2],e[3],e[4]):(e=vu.exec(t))?yn(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=pu.exec(t))?Pr(e[1],e[2]/100,e[3]/100,1):(e=wu.exec(t))?Pr(e[1],e[2]/100,e[3]/100,e[4]):Nr.hasOwnProperty(t)?Or(Nr[t]):t==="transparent"?new Rt(NaN,NaN,NaN,0):null}function Or(t){return new Rt(t>>16&255,t>>8&255,t&255,1)}function yn(t,e,n,i){return i<=0&&(t=e=n=NaN),new Rt(t,e,n,i)}function Pl(t){return t instanceof Pe||(t=Ee(t)),t?(t=t.rgb(),new Rt(t.r,t.g,t.b,t.opacity)):new Rt}function gi(t,e,n,i){return arguments.length===1?Pl(t):new Rt(t,e,n,i??1)}function Rt(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}fn(Rt,gi,Un(Pe,{brighter(t){return t=t==null?En:Math.pow(En,t),new Rt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?rn:Math.pow(rn,t),new Rt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Rt(Ce(this.r),Ce(this.g),Ce(this.b),jn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Er,formatHex:Er,formatHex8:Au,formatRgb:jr,toString:jr}));function Er(){return`#${Te(this.r)}${Te(this.g)}${Te(this.b)}`}function Au(){return`#${Te(this.r)}${Te(this.g)}${Te(this.b)}${Te((isNaN(this.opacity)?1:this.opacity)*255)}`}function jr(){const t=jn(this.opacity);return`${t===1?"rgb(":"rgba("}${Ce(this.r)}, ${Ce(this.g)}, ${Ce(this.b)}${t===1?")":`, ${t})`}`}function jn(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ce(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Te(t){return t=Ce(t),(t<16?"0":"")+t.toString(16)}function Pr(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new _t(t,e,n,i)}function Vl(t){if(t instanceof _t)return new _t(t.h,t.s,t.l,t.opacity);if(t instanceof Pe||(t=Ee(t)),!t)return new _t;if(t instanceof _t)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),l=Math.max(e,n,i),o=NaN,s=l-r,c=(l+r)/2;return s?(e===l?o=(n-i)/s+(n<i)*6:n===l?o=(i-e)/s+2:o=(e-n)/s+4,s/=c<.5?l+r:2-l-r,o*=60):s=c>0&&c<1?0:o,new _t(o,s,c,t.opacity)}function $u(t,e,n,i){return arguments.length===1?Vl(t):new _t(t,e,n,i??1)}function _t(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}fn(_t,$u,Un(Pe,{brighter(t){return t=t==null?En:Math.pow(En,t),new _t(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?rn:Math.pow(rn,t),new _t(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Rt(ei(t>=240?t-240:t+120,r,i),ei(t,r,i),ei(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new _t(Vr(this.h),gn(this.s),gn(this.l),jn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=jn(this.opacity);return`${t===1?"hsl(":"hsla("}${Vr(this.h)}, ${gn(this.s)*100}%, ${gn(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Vr(t){return t=(t||0)%360,t<0?t+360:t}function gn(t){return Math.max(0,Math.min(1,t||0))}function ei(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Mu=Math.PI/180,Su=180/Math.PI,Pn=18,Il=.96422,Bl=1,Ll=.82521,Xl=4/29,Fe=6/29,Yl=3*Fe*Fe,Nu=Fe*Fe*Fe;function Dl(t){if(t instanceof oe)return new oe(t.l,t.a,t.b,t.opacity);if(t instanceof de)return Hl(t);t instanceof Rt||(t=Pl(t));var e=li(t.r),n=li(t.g),i=li(t.b),r=ni((.2225045*e+.7168786*n+.0606169*i)/Bl),l,o;return e===n&&n===i?l=o=r:(l=ni((.4360747*e+.3850649*n+.1430804*i)/Il),o=ni((.0139322*e+.0971045*n+.7141733*i)/Ll)),new oe(116*r-16,500*(l-r),200*(r-o),t.opacity)}function xi(t,e,n,i){return arguments.length===1?Dl(t):new oe(t,e,n,i??1)}function oe(t,e,n,i){this.l=+t,this.a=+e,this.b=+n,this.opacity=+i}fn(oe,xi,Un(Pe,{brighter(t){return new oe(this.l+Pn*(t??1),this.a,this.b,this.opacity)},darker(t){return new oe(this.l-Pn*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=Il*ii(e),t=Bl*ii(t),n=Ll*ii(n),new Rt(ri(3.1338561*e-1.6168667*t-.4906146*n),ri(-.9787684*e+1.9161415*t+.033454*n),ri(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function ni(t){return t>Nu?Math.pow(t,1/3):t/Yl+Xl}function ii(t){return t>Fe?t*t*t:Yl*(t-Xl)}function ri(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function li(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Tu(t){if(t instanceof de)return new de(t.h,t.c,t.l,t.opacity);if(t instanceof oe||(t=Dl(t)),t.a===0&&t.b===0)return new de(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Su;return new de(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Rl(t,e,n,i){return arguments.length===1?Tu(t):new de(t,e,n,i??1)}function de(t,e,n,i){this.h=+t,this.c=+e,this.l=+n,this.opacity=+i}function Hl(t){if(isNaN(t.h))return new oe(t.l,0,0,t.opacity);var e=t.h*Mu;return new oe(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}fn(de,Rl,Un(Pe,{brighter(t){return new de(this.h,this.c,this.l+Pn*(t??1),this.opacity)},darker(t){return new de(this.h,this.c,this.l-Pn*(t??1),this.opacity)},rgb(){return Hl(this).rgb()}}));const Ii=t=>()=>t;function Cu(t,e){return function(n){return t+n*e}}function Ou(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function Eu(t){return(t=+t)==1?Ye:function(e,n){return n-e?Ou(e,n,t):Ii(isNaN(e)?n:e)}}function Ye(t,e){var n=e-t;return n?Cu(t,n):Ii(isNaN(t)?e:t)}const Vn=(function t(e){var n=Eu(e);function i(r,l){var o=n((r=gi(r)).r,(l=gi(l)).r),s=n(r.g,l.g),c=n(r.b,l.b),a=Ye(r.opacity,l.opacity);return function(u){return r.r=o(u),r.g=s(u),r.b=c(u),r.opacity=a(u),r+""}}return i.gamma=t,i})(1);function ju(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,i=e.slice(),r;return function(l){for(r=0;r<n;++r)i[r]=t[r]*(1-l)+e[r]*l;return i}}function Pu(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Vu(t,e){var n=e?e.length:0,i=t?Math.min(n,t.length):0,r=new Array(i),l=new Array(n),o;for(o=0;o<i;++o)r[o]=Bi(t[o],e[o]);for(;o<n;++o)l[o]=e[o];return function(s){for(o=0;o<i;++o)l[o]=r[o](s);return l}}function Iu(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function Jt(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Bu(t,e){var n={},i={},r;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(r in e)r in t?n[r]=Bi(t[r],e[r]):i[r]=e[r];return function(l){for(r in n)i[r]=n[r](l);return i}}var vi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ai=new RegExp(vi.source,"g");function Lu(t){return function(){return t}}function Xu(t){return function(e){return t(e)+""}}function zl(t,e){var n=vi.lastIndex=ai.lastIndex=0,i,r,l,o=-1,s=[],c=[];for(t=t+"",e=e+"";(i=vi.exec(t))&&(r=ai.exec(e));)(l=r.index)>n&&(l=e.slice(n,l),s[o]?s[o]+=l:s[++o]=l),(i=i[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:Jt(i,r)})),n=ai.lastIndex;return n<e.length&&(l=e.slice(n),s[o]?s[o]+=l:s[++o]=l),s.length<2?c[0]?Xu(c[0].x):Lu(e):(e=c.length,function(a){for(var u=0,f;u<e;++u)s[(f=c[u]).i]=f.x(a);return s.join("")})}function Bi(t,e){var n=typeof e,i;return e==null||n==="boolean"?Ii(e):(n==="number"?Jt:n==="string"?(i=Ee(e))?(e=i,Vn):zl:e instanceof Ee?Vn:e instanceof Date?Iu:Pu(e)?ju:Array.isArray(e)?Vu:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Bu:Jt)(t,e)}function Yu(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Ir=180/Math.PI,pi={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Fl(t,e,n,i,r,l){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*i)&&(n-=t*c,i-=e*c),(s=Math.sqrt(n*n+i*i))&&(n/=s,i/=s,c/=s),t*i<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:r,translateY:l,rotate:Math.atan2(e,t)*Ir,skewX:Math.atan(c)*Ir,scaleX:o,scaleY:s}}var xn;function Du(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?pi:Fl(e.a,e.b,e.c,e.d,e.e,e.f)}function Ru(t){return t==null||(xn||(xn=document.createElementNS("http://www.w3.org/2000/svg","g")),xn.setAttribute("transform",t),!(t=xn.transform.baseVal.consolidate()))?pi:(t=t.matrix,Fl(t.a,t.b,t.c,t.d,t.e,t.f))}function ql(t,e,n,i){function r(a){return a.length?a.pop()+" ":""}function l(a,u,f,h,m,y){if(a!==f||u!==h){var x=m.push("translate(",null,e,null,n);y.push({i:x-4,x:Jt(a,f)},{i:x-2,x:Jt(u,h)})}else(f||h)&&m.push("translate("+f+e+h+n)}function o(a,u,f,h){a!==u?(a-u>180?u+=360:u-a>180&&(a+=360),h.push({i:f.push(r(f)+"rotate(",null,i)-2,x:Jt(a,u)})):u&&f.push(r(f)+"rotate("+u+i)}function s(a,u,f,h){a!==u?h.push({i:f.push(r(f)+"skewX(",null,i)-2,x:Jt(a,u)}):u&&f.push(r(f)+"skewX("+u+i)}function c(a,u,f,h,m,y){if(a!==f||u!==h){var x=m.push(r(m)+"scale(",null,",",null,")");y.push({i:x-4,x:Jt(a,f)},{i:x-2,x:Jt(u,h)})}else(f!==1||h!==1)&&m.push(r(m)+"scale("+f+","+h+")")}return function(a,u){var f=[],h=[];return a=t(a),u=t(u),l(a.translateX,a.translateY,u.translateX,u.translateY,f,h),o(a.rotate,u.rotate,f,h),s(a.skewX,u.skewX,f,h),c(a.scaleX,a.scaleY,u.scaleX,u.scaleY,f,h),a=u=null,function(m){for(var y=-1,x=h.length,$;++y<x;)f[($=h[y]).i]=$.x(m);return f.join("")}}}var Hu=ql(Du,"px, ","px)","deg)"),zu=ql(Ru,", ",")",")");function wi(t,e){var n=Ye((t=xi(t)).l,(e=xi(e)).l),i=Ye(t.a,e.a),r=Ye(t.b,e.b),l=Ye(t.opacity,e.opacity);return function(o){return t.l=n(o),t.a=i(o),t.b=r(o),t.opacity=l(o),t+""}}var Ue=0,_e=0,Ze=0,Wl=1e3,In,tn,Bn=0,je=0,Kn=0,an=typeof performance=="object"&&performance.now?performance:Date,Gl=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Li(){return je||(Gl(Fu),je=an.now()+Kn)}function Fu(){je=0}function Ln(){this._call=this._time=this._next=null}Ln.prototype=Ul.prototype={constructor:Ln,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Li():+n)+(e==null?0:+e),!this._next&&tn!==this&&(tn?tn._next=this:In=this,tn=this),this._call=t,this._time=n,bi()},stop:function(){this._call&&(this._call=null,this._time=1/0,bi())}};function Ul(t,e,n){var i=new Ln;return i.restart(t,e,n),i}function qu(){Li(),++Ue;for(var t=In,e;t;)(e=je-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Ue}function Br(){je=(Bn=an.now())+Kn,Ue=_e=0;try{qu()}finally{Ue=0,Gu(),je=0}}function Wu(){var t=an.now(),e=t-Bn;e>Wl&&(Kn-=e,Bn=t)}function Gu(){for(var t,e=In,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:In=n);tn=t,bi(i)}function bi(t){if(!Ue){_e&&(_e=clearTimeout(_e));var e=t-je;e>24?(t<1/0&&(_e=setTimeout(Br,t-an.now()-Kn)),Ze&&(Ze=clearInterval(Ze))):(Ze||(Bn=an.now(),Ze=setInterval(Wu,Wl)),Ue=1,Gl(Br))}}function Lr(t,e,n){var i=new Ln;return e=e==null?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,n),i}var Uu=bl("start","end","cancel","interrupt"),Ku=[],Kl=0,Xr=1,ki=2,An=3,Yr=4,Ai=5,$n=6;function Qn(t,e,n,i,r,l){var o=t.__transition;if(!o)t.__transition={};else if(n in o)return;Qu(t,n,{name:e,index:i,group:r,on:Uu,tween:Ku,time:l.time,delay:l.delay,duration:l.duration,ease:l.ease,timer:null,state:Kl})}function Xi(t,e){var n=ee(t,e);if(n.state>Kl)throw new Error("too late; already scheduled");return n}function se(t,e){var n=ee(t,e);if(n.state>An)throw new Error("too late; already running");return n}function ee(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Qu(t,e,n){var i=t.__transition,r;i[e]=n,n.timer=Ul(l,0,n.time);function l(a){n.state=Xr,n.timer.restart(o,n.delay,n.time),n.delay<=a&&o(a-n.delay)}function o(a){var u,f,h,m;if(n.state!==Xr)return c();for(u in i)if(m=i[u],m.name===n.name){if(m.state===An)return Lr(o);m.state===Yr?(m.state=$n,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete i[u]):+u<e&&(m.state=$n,m.timer.stop(),m.on.call("cancel",t,t.__data__,m.index,m.group),delete i[u])}if(Lr(function(){n.state===An&&(n.state=Yr,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=ki,n.on.call("start",t,t.__data__,n.index,n.group),n.state===ki){for(n.state=An,r=new Array(h=n.tween.length),u=0,f=-1;u<h;++u)(m=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++f]=m);r.length=f+1}}function s(a){for(var u=a<n.duration?n.ease.call(null,a/n.duration):(n.timer.restart(c),n.state=Ai,1),f=-1,h=r.length;++f<h;)r[f].call(t,u);n.state===Ai&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=$n,n.timer.stop(),delete i[e];for(var a in i)return;delete t.__transition}}function Zu(t,e){var n=t.__transition,i,r,l=!0,o;if(n){e=e==null?null:e+"";for(o in n){if((i=n[o]).name!==e){l=!1;continue}r=i.state>ki&&i.state<Ai,i.state=$n,i.timer.stop(),i.on.call(r?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete n[o]}l&&delete t.__transition}}function Ju(t){return this.each(function(){Zu(this,t)})}function _u(t,e){var n,i;return function(){var r=se(this,t),l=r.tween;if(l!==n){i=n=l;for(var o=0,s=i.length;o<s;++o)if(i[o].name===e){i=i.slice(),i.splice(o,1);break}}r.tween=i}}function tc(t,e,n){var i,r;if(typeof n!="function")throw new Error;return function(){var l=se(this,t),o=l.tween;if(o!==i){r=(i=o).slice();for(var s={name:e,value:n},c=0,a=r.length;c<a;++c)if(r[c].name===e){r[c]=s;break}c===a&&r.push(s)}l.tween=r}}function ec(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i=ee(this.node(),n).tween,r=0,l=i.length,o;r<l;++r)if((o=i[r]).name===t)return o.value;return null}return this.each((e==null?_u:tc)(n,t,e))}function Yi(t,e,n){var i=t._id;return t.each(function(){var r=se(this,i);(r.value||(r.value={}))[e]=n.apply(this,arguments)}),function(r){return ee(r,i).value[e]}}function Ql(t,e){var n;return(typeof e=="number"?Jt:e instanceof Ee?Vn:(n=Ee(e))?(e=n,Vn):zl)(t,e)}function nc(t){return function(){this.removeAttribute(t)}}function ic(t){return function(){this.removeAttributeNS(t.space,t.local)}}function rc(t,e,n){var i,r=n+"",l;return function(){var o=this.getAttribute(t);return o===r?null:o===i?l:l=e(i=o,n)}}function lc(t,e,n){var i,r=n+"",l;return function(){var o=this.getAttributeNS(t.space,t.local);return o===r?null:o===i?l:l=e(i=o,n)}}function ac(t,e,n){var i,r,l;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(t):(o=this.getAttribute(t),c=s+"",o===c?null:o===i&&c===r?l:(r=c,l=e(i=o,s)))}}function oc(t,e,n){var i,r,l;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),c=s+"",o===c?null:o===i&&c===r?l:(r=c,l=e(i=o,s)))}}function sc(t,e){var n=Gn(t),i=n==="transform"?zu:Ql;return this.attrTween(t,typeof e=="function"?(n.local?oc:ac)(n,i,Yi(this,"attr."+t,e)):e==null?(n.local?ic:nc)(n):(n.local?lc:rc)(n,i,e))}function uc(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function cc(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function fc(t,e){var n,i;function r(){var l=e.apply(this,arguments);return l!==i&&(n=(i=l)&&cc(t,l)),n}return r._value=e,r}function hc(t,e){var n,i;function r(){var l=e.apply(this,arguments);return l!==i&&(n=(i=l)&&uc(t,l)),n}return r._value=e,r}function mc(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var i=Gn(t);return this.tween(n,(i.local?fc:hc)(i,e))}function dc(t,e){return function(){Xi(this,t).delay=+e.apply(this,arguments)}}function yc(t,e){return e=+e,function(){Xi(this,t).delay=e}}function gc(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?dc:yc)(e,t)):ee(this.node(),e).delay}function xc(t,e){return function(){se(this,t).duration=+e.apply(this,arguments)}}function vc(t,e){return e=+e,function(){se(this,t).duration=e}}function pc(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?xc:vc)(e,t)):ee(this.node(),e).duration}function wc(t,e){if(typeof e!="function")throw new Error;return function(){se(this,t).ease=e}}function bc(t){var e=this._id;return arguments.length?this.each(wc(e,t)):ee(this.node(),e).ease}function kc(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;se(this,t).ease=n}}function Ac(t){if(typeof t!="function")throw new Error;return this.each(kc(this._id,t))}function $c(t){typeof t!="function"&&(t=$l(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var l=e[r],o=l.length,s=i[r]=[],c,a=0;a<o;++a)(c=l[a])&&t.call(c,c.__data__,a,l)&&s.push(c);return new xe(i,this._parents,this._name,this._id)}function Mc(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,l=Math.min(i,r),o=new Array(i),s=0;s<l;++s)for(var c=e[s],a=n[s],u=c.length,f=o[s]=new Array(u),h,m=0;m<u;++m)(h=c[m]||a[m])&&(f[m]=h);for(;s<i;++s)o[s]=e[s];return new xe(o,this._parents,this._name,this._id)}function Sc(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function Nc(t,e,n){var i,r,l=Sc(e)?Xi:se;return function(){var o=l(this,t),s=o.on;s!==i&&(r=(i=s).copy()).on(e,n),o.on=r}}function Tc(t,e){var n=this._id;return arguments.length<2?ee(this.node(),n).on.on(t):this.each(Nc(n,t,e))}function Cc(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Oc(){return this.on("end.remove",Cc(this._id))}function Ec(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Pi(t));for(var i=this._groups,r=i.length,l=new Array(r),o=0;o<r;++o)for(var s=i[o],c=s.length,a=l[o]=new Array(c),u,f,h=0;h<c;++h)(u=s[h])&&(f=t.call(u,u.__data__,h,s))&&("__data__"in u&&(f.__data__=u.__data__),a[h]=f,Qn(a[h],e,n,h,a,ee(u,n)));return new xe(l,this._parents,e,n)}function jc(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Al(t));for(var i=this._groups,r=i.length,l=[],o=[],s=0;s<r;++s)for(var c=i[s],a=c.length,u,f=0;f<a;++f)if(u=c[f]){for(var h=t.call(u,u.__data__,f,c),m,y=ee(u,n),x=0,$=h.length;x<$;++x)(m=h[x])&&Qn(m,e,n,x,h,y);l.push(h),o.push(u)}return new xe(l,o,e,n)}var Pc=cn.prototype.constructor;function Vc(){return new Pc(this._groups,this._parents)}function Ic(t,e){var n,i,r;return function(){var l=Ge(this,t),o=(this.style.removeProperty(t),Ge(this,t));return l===o?null:l===n&&o===i?r:r=e(n=l,i=o)}}function Zl(t){return function(){this.style.removeProperty(t)}}function Bc(t,e,n){var i,r=n+"",l;return function(){var o=Ge(this,t);return o===r?null:o===i?l:l=e(i=o,n)}}function Lc(t,e,n){var i,r,l;return function(){var o=Ge(this,t),s=n(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(t),Ge(this,t))),o===c?null:o===i&&c===r?l:(r=c,l=e(i=o,s))}}function Xc(t,e){var n,i,r,l="style."+e,o="end."+l,s;return function(){var c=se(this,t),a=c.on,u=c.value[l]==null?s||(s=Zl(e)):void 0;(a!==n||r!==u)&&(i=(n=a).copy()).on(o,r=u),c.on=i}}function Yc(t,e,n){var i=(t+="")=="transform"?Hu:Ql;return e==null?this.styleTween(t,Ic(t,i)).on("end.style."+t,Zl(t)):typeof e=="function"?this.styleTween(t,Lc(t,i,Yi(this,"style."+t,e))).each(Xc(this._id,t)):this.styleTween(t,Bc(t,i,e),n).on("end.style."+t,null)}function Dc(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}function Rc(t,e,n){var i,r;function l(){var o=e.apply(this,arguments);return o!==r&&(i=(r=o)&&Dc(t,o,n)),i}return l._value=e,l}function Hc(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,Rc(t,e,n??""))}function zc(t){return function(){this.textContent=t}}function Fc(t){return function(){var e=t(this);this.textContent=e??""}}function qc(t){return this.tween("text",typeof t=="function"?Fc(Yi(this,"text",t)):zc(t==null?"":t+""))}function Wc(t){return function(e){this.textContent=t.call(this,e)}}function Gc(t){var e,n;function i(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Wc(r)),e}return i._value=t,i}function Uc(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Gc(t))}function Kc(){for(var t=this._name,e=this._id,n=Jl(),i=this._groups,r=i.length,l=0;l<r;++l)for(var o=i[l],s=o.length,c,a=0;a<s;++a)if(c=o[a]){var u=ee(c,e);Qn(c,t,n,a,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new xe(i,this._parents,t,n)}function Qc(){var t,e,n=this,i=n._id,r=n.size();return new Promise(function(l,o){var s={value:o},c={value:function(){--r===0&&l()}};n.each(function(){var a=se(this,i),u=a.on;u!==t&&(e=(t=u).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),a.on=e}),r===0&&l()})}var Zc=0;function xe(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function Jl(){return++Zc}var fe=cn.prototype;xe.prototype={constructor:xe,select:Ec,selectAll:jc,selectChild:fe.selectChild,selectChildren:fe.selectChildren,filter:$c,merge:Mc,selection:Vc,transition:Kc,call:fe.call,nodes:fe.nodes,node:fe.node,size:fe.size,empty:fe.empty,each:fe.each,on:Tc,attr:sc,attrTween:mc,style:Yc,styleTween:Hc,text:qc,textTween:Uc,remove:Oc,tween:ec,delay:gc,duration:pc,ease:bc,easeVarying:Ac,end:Qc,[Symbol.iterator]:fe[Symbol.iterator]};function Jc(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var _c={time:null,delay:0,duration:250,ease:Jc};function tf(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function ef(t){var e,n;t instanceof xe?(e=t._id,t=t._name):(e=Jl(),(n=_c).time=Li(),t=t==null?null:t+"");for(var i=this._groups,r=i.length,l=0;l<r;++l)for(var o=i[l],s=o.length,c,a=0;a<s;++a)(c=o[a])&&Qn(c,t,e,a,o,n||tf(c,e));return new xe(i,this._parents,t,e)}cn.prototype.interrupt=Ju;cn.prototype.transition=ef;const $i=Math.PI,Mi=2*$i,Me=1e-6,nf=Mi-Me;function _l(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function rf(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return _l;const n=10**e;return function(i){this._+=i[0];for(let r=1,l=i.length;r<l;++r)this._+=Math.round(arguments[r]*n)/n+i[r]}}class lf{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?_l:rf(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,i,r){this._append`Q${+e},${+n},${this._x1=+i},${this._y1=+r}`}bezierCurveTo(e,n,i,r,l,o){this._append`C${+e},${+n},${+i},${+r},${this._x1=+l},${this._y1=+o}`}arcTo(e,n,i,r,l){if(e=+e,n=+n,i=+i,r=+r,l=+l,l<0)throw new Error(`negative radius: ${l}`);let o=this._x1,s=this._y1,c=i-e,a=r-n,u=o-e,f=s-n,h=u*u+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(h>Me)if(!(Math.abs(f*c-a*u)>Me)||!l)this._append`L${this._x1=e},${this._y1=n}`;else{let m=i-o,y=r-s,x=c*c+a*a,$=m*m+y*y,O=Math.sqrt(x),j=Math.sqrt(h),N=l*Math.tan(($i-Math.acos((x+h-$)/(2*O*j)))/2),I=N/j,B=N/O;Math.abs(I-1)>Me&&this._append`L${e+I*u},${n+I*f}`,this._append`A${l},${l},0,0,${+(f*m>u*y)},${this._x1=e+B*c},${this._y1=n+B*a}`}}arc(e,n,i,r,l,o){if(e=+e,n=+n,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(r),c=i*Math.sin(r),a=e+s,u=n+c,f=1^o,h=o?r-l:l-r;this._x1===null?this._append`M${a},${u}`:(Math.abs(this._x1-a)>Me||Math.abs(this._y1-u)>Me)&&this._append`L${a},${u}`,i&&(h<0&&(h=h%Mi+Mi),h>nf?this._append`A${i},${i},0,1,${f},${e-s},${n-c}A${i},${i},0,1,${f},${this._x1=a},${this._y1=u}`:h>Me&&this._append`A${i},${i},0,${+(h>=$i)},${f},${this._x1=e+i*Math.cos(l)},${this._y1=n+i*Math.sin(l)}`)}rect(e,n,i,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function af(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Xn(t,e){if(!isFinite(t)||t===0)return null;var n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function Ke(t){return t=Xn(Math.abs(t)),t?t[1]:NaN}function of(t,e){return function(n,i){for(var r=n.length,l=[],o=0,s=t[0],c=0;r>0&&s>0&&(c+s+1>i&&(s=Math.max(1,i-c)),l.push(n.substring(r-=s,r+s)),!((c+=s+1)>i));)s=t[o=(o+1)%t.length];return l.reverse().join(e)}}function sf(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var uf=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Yn(t){if(!(e=uf.exec(t)))throw new Error("invalid format: "+t);var e;return new Di({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Yn.prototype=Di.prototype;function Di(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}Di.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function cf(t){t:for(var e=t.length,n=1,i=-1,r;n<e;++n)switch(t[n]){case".":i=r=n;break;case"0":i===0&&(i=n),r=n;break;default:if(!+t[n])break t;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(r+1):t}var Dn;function ff(t,e){var n=Xn(t,e);if(!n)return Dn=void 0,t.toPrecision(e);var i=n[0],r=n[1],l=r-(Dn=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,o=i.length;return l===o?i:l>o?i+new Array(l-o+1).join("0"):l>0?i.slice(0,l)+"."+i.slice(l):"0."+new Array(1-l).join("0")+Xn(t,Math.max(0,e+l-1))[0]}function Dr(t,e){var n=Xn(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const Rr={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:af,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Dr(t*100,e),r:Dr,s:ff,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Hr(t){return t}var zr=Array.prototype.map,Fr=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function hf(t){var e=t.grouping===void 0||t.thousands===void 0?Hr:of(zr.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",r=t.decimal===void 0?".":t.decimal+"",l=t.numerals===void 0?Hr:sf(zr.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"\u2212":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function a(f,h){f=Yn(f);var m=f.fill,y=f.align,x=f.sign,$=f.symbol,O=f.zero,j=f.width,N=f.comma,I=f.precision,B=f.trim,P=f.type;P==="n"?(N=!0,P="g"):Rr[P]||(I===void 0&&(I=12),B=!0,P="g"),(O||m==="0"&&y==="=")&&(O=!0,m="0",y="=");var b=(h&&h.prefix!==void 0?h.prefix:"")+($==="$"?n:$==="#"&&/[boxX]/.test(P)?"0"+P.toLowerCase():""),d=($==="$"?i:/[%p]/.test(P)?o:"")+(h&&h.suffix!==void 0?h.suffix:""),p=Rr[P],w=/[defgprs%]/.test(P);I=I===void 0?6:/[gprs]/.test(P)?Math.max(1,Math.min(21,I)):Math.max(0,Math.min(20,I));function S(k){var X=b,L=d,H,z,R;if(P==="c")L=p(k)+L,k="";else{k=+k;var F=k<0||1/k<0;if(k=isNaN(k)?c:p(Math.abs(k),I),B&&(k=cf(k)),F&&+k==0&&x!=="+"&&(F=!1),X=(F?x==="("?x:s:x==="-"||x==="("?"":x)+X,L=(P==="s"&&!isNaN(k)&&Dn!==void 0?Fr[8+Dn/3]:"")+L+(F&&x==="("?")":""),w){for(H=-1,z=k.length;++H<z;)if(R=k.charCodeAt(H),48>R||R>57){L=(R===46?r+k.slice(H+1):k.slice(H))+L,k=k.slice(0,H);break}}}N&&!O&&(k=e(k,1/0));var Q=X.length+k.length+L.length,K=Q<j?new Array(j-Q+1).join(m):"";switch(N&&O&&(k=e(K+k,K.length?j-L.length:1/0),K=""),y){case"<":k=X+k+L+K;break;case"=":k=X+K+k+L;break;case"^":k=K.slice(0,Q=K.length>>1)+X+k+L+K.slice(Q);break;default:k=K+X+k+L;break}return l(k)}return S.toString=function(){return f+""},S}function u(f,h){var m=Math.max(-8,Math.min(8,Math.floor(Ke(h)/3)))*3,y=Math.pow(10,-m),x=a((f=Yn(f),f.type="f",f),{suffix:Fr[8+m/3]});return function($){return x(y*$)}}return{format:a,formatPrefix:u}}var vn,ta,ea;mf({thousands:",",grouping:[3],currency:["$",""]});function mf(t){return vn=hf(t),ta=vn.format,ea=vn.formatPrefix,vn}function df(t){return Math.max(0,-Ke(Math.abs(t)))}function yf(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ke(e)/3)))*3-Ke(Math.abs(t)))}function gf(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ke(e)-Ke(t))+1}function xf(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function vf(t){return function(){return t}}function pf(t){return+t}var qr=[0,1];function De(t){return t}function Si(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:vf(isNaN(e)?NaN:.5)}function wf(t,e){var n;return t>e&&(n=t,t=e,e=n),function(i){return Math.max(t,Math.min(e,i))}}function bf(t,e,n){var i=t[0],r=t[1],l=e[0],o=e[1];return r<i?(i=Si(r,i),l=n(o,l)):(i=Si(i,r),l=n(l,o)),function(s){return l(i(s))}}function kf(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),l=new Array(i),o=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<i;)r[o]=Si(t[o],t[o+1]),l[o]=n(e[o],e[o+1]);return function(s){var c=So(t,s,1,i)-1;return l[c](r[c](s))}}function Af(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function $f(){var t=qr,e=qr,n=Bi,i,r,l,o=De,s,c,a;function u(){var h=Math.min(t.length,e.length);return o!==De&&(o=wf(t[0],t[h-1])),s=h>2?kf:bf,c=a=null,f}function f(h){return h==null||isNaN(h=+h)?l:(c||(c=s(t.map(i),e,n)))(i(o(h)))}return f.invert=function(h){return o(r((a||(a=s(e,t.map(i),Jt)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,pf),u()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),u()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=Yu,u()},f.clamp=function(h){return arguments.length?(o=h?!0:De,u()):o!==De},f.interpolate=function(h){return arguments.length?(n=h,u()):n},f.unknown=function(h){return arguments.length?(l=h,f):l},function(h,m){return i=h,r=m,u()}}function Mf(){return $f()(De,De)}function Sf(t,e,n,i){var r=Eo(t,e,n),l;switch(i=Yn(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(l=yf(r,o))&&(i.precision=l),ea(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(l=gf(r,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=l-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(l=df(r))&&(i.precision=l-(i.type==="%")*2);break}}return ta(i)}function Nf(t){var e=t.domain;return t.ticks=function(n){var i=e();return Oo(i[0],i[i.length-1],n??10)},t.tickFormat=function(n,i){var r=e();return Sf(r[0],r[r.length-1],n??10,i)},t.nice=function(n){n==null&&(n=10);var i=e(),r=0,l=i.length-1,o=i[r],s=i[l],c,a,u=10;for(s<o&&(a=o,o=s,s=a,a=r,r=l,l=a);u-- >0;){if(a=di(o,s,n),a===c)return i[r]=o,i[l]=s,e(i);if(a>0)o=Math.floor(o/a)*a,s=Math.ceil(s/a)*a;else if(a<0)o=Math.ceil(o*a)/a,s=Math.floor(s*a)/a;else break;c=a}return t},t}function na(){var t=Mf();return t.copy=function(){return Af(t,na())},xf.apply(t,arguments),Nf(t)}function Be(t){return function(){return t}}const Wr=1e-12;function Tf(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const i=Math.floor(n);if(!(i>=0))throw new RangeError(`invalid digits: ${n}`);e=i}return t},()=>new lf(e)}function Cf(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function ia(t){this._context=t}ia.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Ri(t){return new ia(t)}function Of(t){return t[0]}function Ef(t){return t[1]}function jf(t,e){var n=Be(!0),i=null,r=Ri,l=null,o=Tf(s);t=typeof t=="function"?t:t===void 0?Of:Be(t),e=typeof e=="function"?e:e===void 0?Ef:Be(e);function s(c){var a,u=(c=Cf(c)).length,f,h=!1,m;for(i==null&&(l=r(m=o())),a=0;a<=u;++a)!(a<u&&n(f=c[a],a,c))===h&&((h=!h)?l.lineStart():l.lineEnd()),h&&l.point(+t(f,a,c),+e(f,a,c));if(m)return l=null,m+""||null}return s.x=function(c){return arguments.length?(t=typeof c=="function"?c:Be(+c),s):t},s.y=function(c){return arguments.length?(e=typeof c=="function"?c:Be(+c),s):e},s.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Be(!!c),s):n},s.curve=function(c){return arguments.length?(r=c,i!=null&&(l=r(i)),s):r},s.context=function(c){return arguments.length?(c==null?i=l=null:l=r(i=c),s):i},s}function Gr(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Hi(t,e){this._context=t,this._k=(1-e)/6}Hi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Gr(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Gr(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ra=(function t(e){function n(i){return new Hi(i,e)}return n.tension=function(i){return t(+i)},n})(0);function Pf(t,e,n){var i=t._x1,r=t._y1,l=t._x2,o=t._y2;if(t._l01_a>Wr){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,r=(r*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Wr){var a=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);l=(l*a+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*a+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(i,r,l,o,t._x2,t._y2)}function la(t,e){this._context=t,this._alpha=e}la.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Pf(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const aa=(function t(e){function n(i){return e?new la(i,e):new Hi(i,0)}return n.alpha=function(i){return t(+i)},n})(.5);function oa(t){this._context=t}oa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var i=Ur(t),r=Ur(e),l=0,o=1;o<n;++l,++o)this._context.bezierCurveTo(i[0][l],r[0][l],i[1][l],r[1][l],t[o],e[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Ur(t){var e,n=t.length-1,i,r=new Array(n),l=new Array(n),o=new Array(n);for(r[0]=0,l[0]=2,o[0]=t[0]+2*t[1],e=1;e<n-1;++e)r[e]=1,l[e]=4,o[e]=4*t[e]+2*t[e+1];for(r[n-1]=2,l[n-1]=7,o[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)i=r[e]/l[e-1],l[e]-=i,o[e]-=i*o[e-1];for(r[n-1]=o[n-1]/l[n-1],e=n-2;e>=0;--e)r[e]=(o[e]-r[e+1])/l[e];for(l[n-1]=(t[n]+r[n-1])/2,e=0;e<n-1;++e)l[e]=2*t[e+1]-r[e+1];return[r,l]}function Rn(t){return new oa(t)}function en(t,e,n){this.k=t,this.x=e,this.y=n}en.prototype={constructor:en,scale:function(t){return t===1?this:new en(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new en(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};en.prototype;const Vf={censor:ke,squish(t,{min:e,max:n}){return isFinite(t)?t<e?e:t>n?n:t:t},squish_any:yt,squish_infinite:mi,discard(t,{min:e,max:n}){return t<e||t>n?null:t}};function Xe(t,{title:e,...n}={}){return Object.assign(function(i){return i.map(t)},{title:e},n)}function sa({values:t={},na_value:e=null,title:n,...i}={}){let r;return Array.isArray(t)?r=function(l){return l.map(o=>t[+o]??e)}:r=function(l){return l.map(o=>t[o]??e)},Object.assign(r,{title:n},i)}function Le({limits:t,oob:e=ke,range:n=[0,1],na_value:i=null,null_value:r=null,title:l,...o}={}){return Object.assign(function(c){let a=this?.limits?.min??this?.limits?.[0]??c.extent?.[0],u=this?.limits?.max??this?.limits?.[1]??c.extent?.[1],f=u-a,h=n?.min??n[0],m=n?.max??n[1],y=m-h;return c.map(x=>(x=this.oob(x,{min:a,max:u}),x===null?r:isNaN(x)?i:h+(x-a)/f*y))},{title:l,limits:t,oob:e},o)}function Kr({title:t,...e}={}){return Object.assign(function(n){return n.map(i=>+i)},{asis:!0,title:t},e)}function Ni({title:t,...e}={}){return Object.assign(function(n){return n.map(i=>String(i??""))},{asis:!0,title:t},e)}function Hn({h:t=[15,375],c:e=100,l:n=65,h_start:i=0,direction:r=1,limits:l,oob:o=ke,na_value:s="#7f7f7f",null_value:c=null,title:a,...u}={}){return Object.assign(function(h){let m=this?.limits?.min??this?.limits?.[0]??h.extent?.[0],y=this?.limits?.max??this?.limits?.[1]??h.extent?.[1],x=y-m,$=t?.min??t[0],O=t?.max??t[1],j=O-$;return h.map(N=>(N=this.oob(N,{min:m,max:y}),N===null?c:isNaN(N)?s:Rl(i+$+j*(N-m)/x*r,e,n).toString()))},{title:a,limits:l,oob:o},u)}function If({values:t,na_value:e="#7f7f7f",title:n,...i}={}){return sa({values:t,na_value:e,title:n,...i})}function zn({low:t="#132B43",high:e="#56B1F7",limits:n,oob:i=ke,na_value:r="#7f7f7f",null_value:l=null,title:o,...s}={}){return Object.assign(function(a){let u=this?.limits?.min??this?.limits?.[0]??a.extent?.[0],f=this?.limits?.max??this?.limits?.[1]??a.extent?.[1],h=wi(t,e);return a.map(m=>(m=this.oob(m,{min:u,max:f}),m===null?l:isNaN(m)?r:u===f?h(.5):m>f?e:m<u?t:h((m-u)/(f-u))))},{title:o,limits:n,oob:i},s)}function Bf({low:t="#832424",mid:e="white",high:n="#3A3A98",midpoint:i=0,limits:r,oob:l=ke,na_value:o="#7f7f7f",null_value:s=null,title:c,...a}={}){return Object.assign(function(f){let h=this?.limits?.min??this?.limits?.[0]??f.extent?.[0],m=this?.limits?.max??this?.limits?.[1]??f.extent?.[1],y=i??(h+m)/2,x=wi(t,e),$=wi(e,n);return f.map(O=>(O=this.oob(O,{min:h,max:m}),O===null?s:isNaN(O)?o:O<y?x((O-h)/(y-h)):$((O-y)/(m-y))))},{title:c,limits:r,oob:l},a)}function Lf({colors:t=[],values:e,anchors:n,limits:i,oob:r=ke,na_value:l="#7f7f7f",null_value:o=null,title:s,...c}={}){return Object.assign(function(u){let f=this?.limits?.min??this?.limits?.[0]??u.extent?.[0],h=this?.limits?.max??this?.limits?.[1]??u.extent?.[1],m=e??n?.map?.(x=>f+(h-f)*x);m??=Array(t.length).fill(0).map((x,$)=>f+(h-f)*$/(t.length-1)),t=t.filter((x,$)=>!isNaN(m[$])),m=m.filter(x=>!isNaN(x));let y=na(m,t);return u.map(x=>(x=this.oob(x,{min:f,max:h}),x===null?o:isNaN(x)?l:y(x)))},{title:s,limits:i,oob:r},c)}function Qr({limits:t,oob:e=ke,title:n,...i}={}){let r=Hn(),l=zn();return Object.assign(function(s){return s.level!=null?r.call(this,s):l.call(this,s)},{title:n,limits:t,oob:e},i)}function Xf({discrete:t,continuous:e,limits:n,oob:i=ke,title:r,...l}={}){return t??=Hn(),e??=zn(),Object.assign(function(s){return s.level!=null?t.call(this,s):e.call(this,s)},{title:r,limits:n,oob:i},l)}function Zr({title:t,...e}={}){let n=["circle","square","triangle","diamond","plus"];return Object.assign(function(r){return r.map(l=>n[+l])},{title:t},e)}function Jr({title:t,...e}={}){let n=["solid","22","42","44","13","1343","73","2262","12223242","F282","F4448444","224282F2","F1"];return Object.assign(function(r){return r.map(l=>n[+l])},{title:t},e)}const oi={identity:({title:t,...e}={})=>Ni({legend:!1,title:t,...e}),discrete:Hn,hue:Hn,manual:If,continuous:zn,gradient:zn,gradient2:Bf,gradientn:Lf,dynamic:Xf,auto:Qr,custom:Xe,default:Qr},ua={color:oi,stroke:oi,fill:oi,alpha:{continuous:Le,custom:Xe,default:({title:t,...e}={})=>Le({range:[.1,1],title:t,...e})},size:{identity:({title:t,...e}={})=>Kr({legend:!1,title:t,...e}),continuous:Le,custom:Xe,default:({title:t,...e}={})=>Le({range:[1,6],title:t,...e})},linewidth:{identity:({title:t,...e}={})=>Kr({legend:!1,title:t,...e}),continuous:Le,manual:sa,custom:Xe,default:({title:t,...e}={})=>Le({range:[1,6],title:t,...e})},linetype:{identity:({title:t,...e}={})=>Ni({legend:!1,title:t,...e}),discrete:Jr,default:Jr,custom:Xe},shape:{identity:({title:t,...e}={})=>Ni({legend:!1,title:t,...e}),discrete:Zr,default:Zr,custom:Xe}};function Yf({step:t,minor:e=!1}={}){return function({min:n,max:i,minor:r=e}={}){let l=i-n,o=t;if(isNaN(l)||l<0)return[];if(l==0)return[n];let s=10**Math.floor(Math.log10(l)-1),c=l/s;o==null&&(o=([5,10,20].find(f=>f*5>c)??20)*s),r&&(o/=2);let a=Math.ceil(n/o),u=Math.floor(i/o);return new Array(u-a+1).fill(null).map((f,h)=>(a+h)*o)}}function Df(){return function({min:t,max:e}={}){let n=e-t;if(isNaN(n)||n<0)return[];if(n==0)return[new Date(t)];let i=new Date(t),r=new Date(e),l=i.getUTCFullYear(),o=i.getUTCMonth(),s=i.getUTCDate(),c=i.getUTCHours(),a=i.getUTCMinutes(),u=i.getUTCSeconds(),f=[];if(n>3*31536e6){let h=n/31536e6,m=10**Math.floor(Math.log10(h)-1),y=h/m,x=Math.max((y>50?10:y>25?5:2)*m,1);i=new Date(Date.UTC(Math.ceil(l/x)*x));do f.push(new Date(i));while(i.setUTCFullYear(i.getUTCFullYear()+x)<r)}else if(n>3*2592e6){let h=n/2592e6,m=[2,3,6].findLast(y=>y*3<=h)||1;i=new Date(Date.UTC(l,Math.ceil(o/m)*m));do f.push(new Date(i));while(i.setUTCMonth(i.getUTCMonth()+m)<r)}else if(n>21*864e5){i=new Date(Date.UTC(l,o,s+(7-i.getUTCDay())%7));do f.push(new Date(i));while(i.setUTCDate(i.getUTCDate()+7)<r)}else if(n>3*864e5){let h=n/864e5,m=[2,3].findLast(y=>y*3<=h)||1;i=new Date(Date.UTC(l,o,Math.ceil(s)));do f.push(new Date(i));while(i.setUTCDate(i.getUTCDate()+m)<r)}else if(n>3*36e5){let h=n/36e5,m=[2,3,6].findLast(y=>y*3<=h)||1;i=new Date(Date.UTC(l,o,s,Math.ceil(c/m)*m));do f.push(new Date(i));while(i.setUTCHours(i.getUTCHours()+m)<r)}else if(n>3*6e4){let h=n/6e4,m=[2,5,10,30].findLast(y=>y*3<=h)||1;i=new Date(Date.UTC(l,o,s,c,Math.ceil(a/m)*m));do f.push(new Date(i));while(i.setUTCMinutes(i.getUTCMinutes()+m)<r)}else if(n>3e3){let h=n/1e3,m=[2,5,10,30].findLast(y=>y*3<=h)||1;i=new Date(Date.UTC(l,o,s,c,a,Math.ceil(u/m)*m));do f.push(new Date(i));while(i.setUTCSeconds(i.getUTCSeconds()+m)<r)}else{let h=10**Math.floor(Math.log10(n)-1),m=n/h,y=(m>50?20:m>25?10:5)*h,x=Math.ceil(t/y),$=Math.floor(e/y);return new Array($-x+1).fill(null).map((O,j)=>new Date((x+j)*y))}return f}}const Zn={number:Yf,datetime:Df};let Rf={y:t=>t.getUTCFullYear(),M:t=>t.getUTCMonth()+1,d:t=>t.getUTCDate(),h:t=>t.getUTCHours(),m:t=>t.getUTCMinutes(),s:t=>t.getUTCSeconds()};function Ti(t,e="yyyy-MM-dd hh:mm:ss"){return e.replace(/(y|M|d|h|m|s)\1*/g,(n,i)=>{let r=String(Rf[i](t)),l=n.length;return i=="y"?r.slice(-l):r.padStart(l,"0")})}const ca={default:{"":1,k:1e3,M:1e6,G:1e9,T:1e12,P:1e15,E:1e18,Z:1e21,Y:1e24},si:{y:1e-24,z:1e-21,a:1e-18,f:1e-15,p:1e-12,n:1e-9,\u03BC:1e-6,m:.001,"":1,k:1e3,M:1e6,G:1e9,T:1e12,P:1e15,E:1e18,Z:1e21,Y:1e24},binary:{"":1,Ki:1024,Mi:1024**2,Gi:1024**3,Ti:1024**4,Pi:1024**5,Ei:1024**6,Zi:1024**7,Yi:1024**8},time:{ns:1e-9,\u03BCs:1e-6,ms:.001,s:1,m:60,h:3600,d:86400,w:604800,M:2592e3,y:31536e3}};function Hf(){return function(t){return t==null?"":t instanceof Date?Ti(t):String(t)}}function fa({accuracy:t,scale:e=1,prefix:n="",suffix:i="",big_mark:r=" ",style_positive:l="none",style_negative:o="hyphen",scale_cut:s={"":1}}={}){let c={plus:"+",space:" "}[l]??"",a={hyphen:"-",minus:"\u2212",parens:"("}[o]??"";return function(u,f,h=[u]){let m;if(t)m=t;else if(h.length>1){let N=h.filter(B=>isFinite(B)).sort((B,P)=>B-P);m=N.slice(1).map((B,P)=>B-N[P]).reduce((B,P)=>B<P?B:P)*e}else m=u||1;let y=Object.entries(s).sort((N,I)=>I[1]-N[1]).find(N=>N[1]<=m)?.[0]??"",x=(y==""?"":" ")+y+i;m=m/(s[y]??1);let $=Math.max(0,Math.ceil(-Math.log10(m))),O=Math.round(u*e/(s[y]??1)/m)*m,j=n+(O>0?c:O<0?a:"");return O<0&&o=="parens"&&(x=")"+x),O=Math.abs(O).toFixed($).replace(new RegExp("(?<!\\..*)(\\d)(?=(?:\\d{3})+(?:\\.|$))","g"),"$1"+r),j+O+x}}function Ci({format:t}={}){let e={y:31536e3,M:2678400,d:86400,h:3600,m:60,s:1},n={y:0,M:5,d:8,h:11,m:14,s:17},i={y:4,M:7,d:10,h:13,m:16,s:19};return function(r,l,o=[r]){if(o.length<=1)return Ti(new Date(r),t);if(t==null){let s=Array.from(o).sort((h,m)=>h-m),c=s.slice(1).map((h,m)=>h-s[m]).reduce((h,m)=>h<m?h:m)/1e3,a=(s[s.length-1]-s[0])/1e3,u=["y","M","d","m","s"].find(h=>e[h]<=c),f=a>2678400?"y":a>86400?"M":"h";t="yyyy-MM-dd hh:mm:ss".slice(n[f],i[u])}return Ti(new Date(r),t)}}function _r(t){let e=fa(t),n=Ci(t);return function(i,r,l=[i]){return i instanceof gl?String(i):i instanceof Date?n(i,r,l):e(i,r,l)}}const Oi={number:fa,datetime:Ci,timestamp:Ci,asis:Hf,auto:_r,default:function(t){return _r({scale_cut:ca.default,...t})}};function zf(t,e){return t==null?{}:Object.fromEntries(Object.entries(t).map(([n,i])=>[n,e(n,i)]))}class Ff{constructor(e,n){let{data:i=[],aes:r,extendX:l,extendY:o}=n,{geom:s,stat:c,data:a,aes:u,levels:f={},scales:h={},attrs:m,args:y,vBind:x,extendX:$,extendY:O}=e;if(!be[s]){console.error(`Invalid geom "${s}"`,"in layer",e,", plot",n);return}let j=typeof c=="function"?c:wo[c];if(j==null){console.error(`Invalid stat "${c}"`,"in layer",e,", plot",n);return}this.geom=s,this.vBind=Object.assign(x,{extendX:$??l??0,extendY:O??o??0}),this.scales={},typeof a=="function"&&(a=a(i)),a==null&&(a=i),u={...r,...u};let N={},I={};for(const b in u)I[b]=String(u[b]),N[b]=a.map(u[b]);N.$raw=a;let B=j?.core_attrs??["x","y","xnudge","ynudge"],P=a.length;P==0&&(P=B.map(b=>m[b]).filter(b=>b!=null).reduce((b,d)=>Math.max(Array.isArray(d)?d.length:1,b),0));for(const b in m)if(B.includes(b))if(Array.isArray(m[b])){if(m[b].length!=P)throw new Error(`Attribute "${b}" must have the same length as data (${P})`);N[b]=m[b]}else{if(m[b]==null)continue;N[b]=new Array(P).fill(m[b])}try{if(N=j(N,y||{}),N.$group??=N.group,N.$group==null){let b=Object.values(N).filter(d=>Array.isArray(d)).reduce((d,p)=>Math.max(d,p.length),0);N.$group=new Array(b).fill(null)}}catch(b){console.error("Error",b,"in layer",e,", plot",n);return}this.localScales=new Set([...Object.keys(f).filter(b=>f[b]!=null),...Object.keys(h).filter(b=>h[b]!=null)]),this.aes=new Set([...this.localScales,...be[s]?.scale_attrs??[]]),this.$data=N,this.$fns=I,this.data={...N};for(const b in N)if(h[b]!=null){let d=new Jn(h[b]);d.aesthetics=b,d.title===void 0&&(d.title=I[b]);let p=this.$data[b];if(!p?.length)continue;d.asis||(f?.[b]!=null?d.level=f[b]:p.some(w=>typeof w=="string")?d.level=He.from(p):d.extent=Xt.extent(p)),this.applyScale(b,d)}this.attrs={};for(const b in m)if(!B.includes(b))if(Array.isArray(m[b])){if(m[b].length!=P)throw new Error(`Attribute "${b}" must have the same length as data (${P})`);this.data[b]=m[b]}else this.attrs[b]=m[b],m[b]!=null&&(this.data[b]=new Array(P).fill(m[b]))}applyScale(e,n){let i=this.$data[e];i!=null&&(n.level&&(i=n.level.apply(i)),n.limits&&(i.extent=n.limits),n.aes=e,this.data[e]=n(i),this.scales[e]=n)}applyCoordScale(e){try{Object.assign(this.data,be[this.geom]?.coord_scale?.(this.$data,e))}catch(n){console.error(n)}}}class qf{constructor(e,n){this.levels={},this.extents={},this.layers=[],this.coordScales={};for(let i in n)this.layers.push(new Ff(n[i],e));this.layers=this.layers.filter(i=>i.$data!=null),this.aes=new Set(this.layers.flatMap(i=>Array.from(i.aes))),this.scales=new Map}useScales(e,n){this.scales=new Map;for(const i of this.aes){let r=this.layers.filter(l=>!l.localScales.has(i)).flatMap(l=>l.$data[i]??[]);if(r.length!=0){let l=new Jn(e?.[i]??ua[i].default());l.aesthetics=i,l.asis||(n?.[i]!=null?l.level=n[i]:r.some(o=>typeof o=="string")?l.level=He.from(r):l.extent=Xt.extent(r)),l.title==null&&(l.title=this.layers.map(o=>o.$fns?.[i]).find(o=>o!=null));for(const o of this.layers)o.localScales.has(i)||o.applyScale(i,l)}for(const l of this.layers){let o=l.scales?.[i];if(o!=null&&!o.asis){this.scales.has(o)||this.scales.set(o,{});let s=this.scales.get(o);s[l.geom]==null&&(s[l.geom]={});for(let c of be[l.geom]?.scale_attrs)l.attrs[c]!=null&&(s[l.geom][c]=l.attrs[c])}}}return this}useCoordLevels(e={}){for(const n of["x","y"])if(e[n])this.levels[n]=new He(...e[n]);else{let i=this.layers.flatMap(r=>(be[r.geom].get_values??be[r.geom].get_range)?.(r.$data,n));i.some(r=>typeof r=="string")?this.levels[n]=He.from(i):(i=this.layers.flatMap(r=>be[r.geom].get_range?.(r.$data,n)).filter(r=>!isNaN(r)),this.extents[n]=Xt.extent(i))}for(const n of this.layers)n.applyCoordScale(this.levels);return this}getComputedLayers(){return this.layers.map(e=>({data:Object.values(Object.groupBy(e.data.$group.map((i,r)=>be[e.geom].validate(zf(e.data,(l,o)=>o?.[r]))).filter(i=>i!=null),i=>i.$group)),geom:e.geom,vBind:e.vBind}))}getCoordScales(e,n,i){let r={};if(this._range=e,this.levels.x){let l=+(e?.xmin??-.5)-(+n.x?.min||0),o=+(e?.xmax??this.levels.x.length-.5)+(+n.x?.max||0);r.x=new Fn(this.levels.x,{min:l,max:o})}else{let l=e?.xmin??this.extents.x?.min??0,o=e?.xmax??this.extents.x?.max??0,s=st(l,-n.x?.min||0),c=st(o,+n.x?.max||0),a=i?.x??1;if(c-s<a)if(e?.xmax==null&&e?.xmin!=null)c=st(s,+a);else if(e?.xmax!=null&&e?.xmin==null)s=st(c,-a);else{let u=c-s;c=st(c,-u/2+a/2),s=st(c,-a)}s instanceof Date||c instanceof Date?r.x=new qn({min:s,max:c}):r.x=new on({min:s,max:c})}if(this.levels.y){let l=+(e?.ymin??-.5)-(+n.y?.min||0),o=+(e?.ymax??this.levels.y.length-.5)+(+n.y?.max||0);r.y=new Fn(this.levels.y,{min:l,max:o})}else{let l=e?.ymin??this.extents.y?.min??0,o=e?.ymax??this.extents.y?.max??0,s=st(l,-n.y?.min),c=st(o,+n.y?.max||0),a=i?.y??1;if(c-s<a)if(e?.ymax==null&&e?.ymin!=null)c=st(s,+a);else if(e?.ymax!=null&&e?.ymin==null)s=st(c,-a);else{let u=c-s;c=st(c,-u/2+a/2),s=st(c,-a)}s instanceof Date||c instanceof Date?r.y=new qn({min:s,max:c}):r.y=new on({min:s,max:c})}return r}render(e,n,i){let r=this.getCoordScales(e,n,i);return{layers:this.getComputedLayers(),coordScales:r,scales:this.scales}}}class Jn extends Function{constructor(e){let n=e._fn??e;function i(){return n.apply(i,arguments)}return Object.setPrototypeOf(i,Jn.prototype),Object.assign(i,e),i._fn=n,i}set extent({min:e,max:n,0:i,1:r}={}){e??=i,n??=r,this._limits={0:e,1:n,length:2,min:e,max:n}}get extent(){return this.limits}set limits({min:e,max:n,0:i,1:r}={}){e??=i,n??=r,this.$limits={0:e,1:n,length:2,min:e,max:n}}get limits(){let e=this.$limits?.min??(this.level?0:this._limits?.min),n=this.$limits?.max??this.level?.length??this._limits?.max;return{0:e,1:n,length:2,min:e,max:n}}}class Fn extends Function{constructor(e,{min:n,max:i}={}){const r=n==i?l=>0:l=>(+l-n)/(i-n);return r.range={min:n,max:i},r.level=e,Object.setPrototypeOf(r,Fn.prototype),r}invert(e){let{min:n,max:i}=this.range;return e*(i-n)+n}get breaks(){return Array.from(this.level)}get minorBreaks(){return[]}}class on extends Function{constructor(e){let{min:n,max:i}=e;const r=n==i?l=>isFinite(l)?.5:l:l=>(+l-n)/(i-n);return r.range={min:n,max:i},Object.setPrototypeOf(r,on.prototype),r}invert(e){let{min:n,max:i}=this.range;return st(n,e*(i-n))}get breaks(){return Zn.number()}}class qn extends on{constructor(e){let n=super(e);return Object.setPrototypeOf(n,qn.prototype),n}get breaks(){return Zn.datetime()}get minorBreaks(){return[]}}class Wf{constructor(e,{breaks:n,labels:i,minorBreaks:r,titles:l}={}){this.scale=e,this.range=e?.range,this.breaks=n??e.breaks,this.labels=i??Oi.auto(),this.titles=l??Oi.asis(),this.minorBreaks=r??n??e.minorBreaks??e.breaks}getBindings({range:e,expandMult:n}={}){let i=this.breaks,r=this.minorBreaks,l=this.labels,o=this.titles,s=e?.min??this?.range?.min,c=e?.max??this?.range?.max,a=c-s||0;s=s==null?s:st(s,-(n?.min??0)*a),c=c==null?c:st(c,+(n?.max??0)*a);function u(h){return h.position!=null?h:{position:h}}typeof i=="function"&&(i=i({min:s,max:c})),i=Array.isArray(i)?i.map(u):[];let f=i.map(h=>h.position);if(typeof r=="function"&&(r=r({min:s,max:c,minor:!0})),r=Array.isArray(r)?r.map(u):[],typeof l=="function"&&(l=f.map(l)),!Array.isArray(l))l=[];else if(l.length!=f.length)throw new Error("Length of labels must be the same as breaks");if(typeof o=="function"&&(o=f.map(o)),!Array.isArray(o))o=[];else if(o.length!=f.length)throw new Error("Length of titles must be the same as breaks");return{majorBreaks:i,minorBreaks:r,ticks:f.map((h,m)=>({position:h,label:l[m],title:o[m]}))}}}const Gf=["font-size"],Uf={key:0},Qe={__name:"CoreText",props:{x:{type:Number,default:0},y:{type:Number,default:0},text:null,title:null,size:Number,color:String,stroke:String,linewidth:Number,linetype:String,alpha:{type:Number,default:1},angle:{type:Number,default:0},translateX:{type:Number,default:0},translateY:{type:Number,default:0},anchorX:Number,anchorY:Number,dockX:Number,dockY:Number,fontSize:Number,textLength:Number},setup(t){const e=Vt("ele"),n=Ot({width:0,height:0});St([e,()=>t.fontSize,()=>t.size,()=>t.text,()=>t.textLength],async([l])=>{if(!l)return;await Ei();let{width:o,height:s}=l.getBBox();n.width=o,n.height=s});const i=Y(()=>{let l;if(t.dockX!=null||t.dockY!=null){let o={left:0,center:.5,right:1}[t.dockX]??+(t.dockX??.5),s={bottom:0,center:.5,top:1}[t.dockY]??+(t.dockY??.5);isNaN(o)&&(o=.5),isNaN(s)&&(s=.5);let c=n.width*Math.abs(Math.cos(t.angle*Math.PI/180))+n.height*Math.abs(Math.sin(t.angle*Math.PI/180)),a=n.width*Math.abs(Math.sin(t.angle*Math.PI/180))+n.height*Math.abs(Math.cos(t.angle*Math.PI/180)),u=t.translateX,f=t.translateY;l=`translate(${c*(.5-o)+u},${a*(s-.5)+f})`,t.angle&&(l+=` rotate(${t.angle})`)}else{let o={left:0,center:.5,right:1}[t.anchorX]??+(t.anchorX??.5),s={bottom:0,center:.5,top:1}[t.anchorY]??+(t.anchorY??.5);isNaN(o)&&(o=.5),isNaN(s)&&(s=.5);let c=n.width,a=n.height,u=t.translateX*Math.cos(t.angle*Math.PI/180)+t.translateY*Math.sin(t.angle*Math.PI/180),f=t.translateY*Math.cos(t.angle*Math.PI/180)-t.translateX*Math.sin(t.angle*Math.PI/180);l=`translate(${c*(.5-o)+u},${a*(s-.5)+f})`,t.angle&&(l=`rotate(${t.angle}) `+l)}return{x:t.x,y:t.y,fill:t.color||null,"fill-opacity":t.alpha==1?null:t.alpha,stroke:t.stroke||null,"stroke-width":t.linewidth,"stroke-dasharray":r(t.linetype),"stroke-opacity":t.alpha==1?null:t.alpha,transform:l,textLength:t.textLength,lengthAdjust:t.textLength?"spacingAndGlyphs":null,"transform-origin":`${t.x} ${t.y}`}});function r(l){return l==null?null:Array.isArray(l)?l.join(" "):l==="solid"?null:l==="dashed"?"4 4":l==="dotted"?"1 3":l==="dotdash"?"1 3 4 3":l==="longdash"?"8 4":l==="twodash"?"2 2 6 2":l.includes(" ")?l:l.split("").map(o=>+("0x"+o)).join(" ")}return(l,o)=>(V(),D("text",_({ref_key:"ele",ref:e,"text-anchor":"middle","dominant-baseline":"central"},i.value,{"font-size":(t.fontSize??t.size*4)||null}),[$a(l.$slots,"default",{},()=>[t.title?(V(),D("title",Uf,Oe(t.title),1)):Ft("",!0),gt(" "+Oe(t.text.replace(/ /g,"\xA0")),1)])],16,Gf))}},Kf=["transform"],Qf=["x2"],Zf={class:"vvplot-interactive",fill:"transparent"},Jf=["width","cursor"],_f={key:0,class:"vvplot-interactive",fill:"transparent"},th=["x"],eh={__name:"CoreAxisH",props:{coord:String,ticks:{type:Array,default:()=>[]},title:String,coord2pos:Function,pos2coord:Function,layout:Object,theme:{type:Object,default:()=>({})},action:{type:Array,default:()=>[]},position:null,activeTransform:Object,transition:String},emits:["click","dblclick","contextmenu","pointerdown","pointerup","pointerover","pointerout","pointerenter","pointerleave","pointermove","wheel","singleclick","move","zoom","rescale","nudge","rangechange","update:transition"],setup(t,{emit:e}){const n=Y(()=>t.layout.width+t.layout.l+t.layout.r),i=Y(()=>t.layout.height+t.layout.t+t.layout.b),r=Mn("rangePreview"),l=Y(()=>{let d=0,p={bottom:"0%",center:"50%",top:"100%"}[t.position]??t.position;return typeof p=="string"&&p.endsWith("%")?d=i.value*(1-p.slice(0,-1)/100):d=t.activeTransform.translateV+t.coord2pos({v:+p}).v*t.activeTransform.scaleV+t.layout.top,`translate(0, ${d})`}),o=Y(()=>{let d=t.theme.title_position??t.theme.tick_position,p=d,w=t.theme.title_dock_x,S=t.theme.title_dock_y,k=0;return typeof d!="number"&&(p={left:0,bottom:.5,top:.5,right:1}[d]??.5,w??={left:1,right:0}[d]??.5,S??={top:0,bottom:1}[d]??.5,k=({top:-1,bottom:1}[d]??0)*(t.theme.title_offset??0)),{x:n.value*p,y:k,angle:t.theme.title_angle,dockX:w,dockY:S,fontSize:t.theme.title_size,text:t.title,fill:t.theme.title_color,...t.theme.title_style}}),s=Y(()=>({stroke:t.theme.line_color,"stroke-width":t.theme.line_width,"stroke-dasharray":t.theme.line_dasharray,style:t.theme.line_style})),c=Y(()=>{let d=[];for(let p of t.ticks){typeof p=="number"&&(p={position:p});let w=t.coord2pos({h:p.position}).h,S=w*(t.activeTransform.scaleH-1)+t.activeTransform.translateH,k=w+t.layout.l;if(k+S<0||k+S>n.value)continue;let X=(t.theme.tick_position=="top"?-1:1)*(p.length??t.theme.tick_length);d.push({key:"line-"+p.position,y1:0,y2:X,x1:k,x2:k,stroke:p.color??t.theme.tick_color,"stroke-width":p.width??t.theme.tick_width,transform:S?`translate(${S},0)`:null,style:{transition:t.transition}})}return d.filter(p=>p.stroke!=null).sort((p,w)=>p.x1-w.x1)}),a=Y(()=>{let d=t.theme.tick_position=="top",p=[];for(let w of t.ticks){typeof w=="number"&&(w={position:w,label:w});let S=t.coord2pos({h:w.position}).h,k=S*(t.activeTransform.scaleH-1)+t.activeTransform.translateH,X=S+t.layout.l;if(X+k<0||X+k>n.value)continue;let L=(d?-1:1)*((w.length??t.theme.tick_length)+3),H,z,R,F;t.theme.tick_anchor_x!=null||t.theme.tick_anchor_y!=null?(H=t.theme.tick_anchor_x??.5,z=t.theme.tick_anchor_y??(d?0:1)):(R=t.theme.tick_dock_x??.5,F=t.theme.tick_dock_y??(d?0:1)),p.push({wrapper:{key:"text-"+w.position,transform:k?`translate(${k},0)`:null,style:{transition:t.transition}},text:{x:X,y:L,angle:t.theme.text_angle,anchorX:H,anchorY:z,dockX:R,dockY:F,text:w.label,title:w.title??w.label,fontSize:w.size??t.theme.label_size,fill:w.color??t.theme.label_color}})}return p.filter(w=>w.text.fill!=null).sort((w,S)=>w.text.x-S.text.x)}),u=Vt("i");function f(d){let p=u.value.getBoundingClientRect(),w=Math.trunc(d.clientX)-p.left-t.layout.left,S=p.left+t.layout.left+t.layout.width-Math.trunc(d.clientX),k={l:w,r:S},{x:X,y:L}=t.pos2coord({h:w});return X&&(k.x=X),L&&(k.y=L),k}const h=e;let m,y=0;function x(d){let p=f(d);h("pointerdown",d,p);let w=!1;function S(z){(Math.abs(z.screenX-d.screenX)>3||Math.abs(z.screenY-d.screenY)>3)&&(w=!0,z.currentTarget.removeEventListener("pointermove",S))}d.target.addEventListener("pointermove",S,{passive:!0}),d.target.addEventListener("pointerup",function(z){if(d.target.removeEventListener("pointermove",S),!w){let R=f(z);h("singleclick",new PointerEvent("singleclick",z),R)}},{once:!0});let k=t.action.find(z=>z.action=="move");if(!k)return;d.preventDefault(),d.stopPropagation(),d.target.style.cursor="grabbing",m=clearTimeout(m);let X=0,L=t.layout.width,H=t.coord2pos(k);d.target.setPointerCapture(d.pointerId),d.target.onpointermove=z=>{if(y+=z.movementX,!w)return;let R=yt(-y,{min:H.hmin-X,max:H.hmax-L}),{xmin:F,xmax:Q,ymin:K,ymax:at}=t.pos2coord({hmin:X+R,hmax:L+R});Object.assign(r,{xmin:F,xmax:Q,ymin:K,ymax:at})},d.target.onpointerup=z=>{d.target.onpointermove=null,d.target.onpointerup=null,d.target.style.cursor=null,w&&(m=setTimeout(()=>{P(k,z),y=0},300))}}function $(d){let p=t.action.find(F=>F.action=="rescale");if(!p)return;d.preventDefault(),d.stopPropagation();let{"min-range-h":w=0}=p,S=f(d),k=t.coord2pos(S).h,X=k-S.l,L=k+S.r,H=t.pos2coord({hmin:X,hmax:L}),z={min:t.coord2pos(p).hmin,max:t.coord2pos({hmin:H.hmax-w,hmax:H.hmin+w}).hmin},R=0;d.target.setPointerCapture(d.pointerId),d.target.onpointermove=F=>{R+=F.movementX;let{xmin:Q,xmax:K,ymin:at,ymax:nt}=t.pos2coord({hmin:yt(L-(L-X)*S.r/Math.max(S.r-R,1),z),hmax:L});Object.assign(r,{xmin:Q,xmax:K,ymin:at,ymax:nt})},d.target.onpointerup=F=>{d.target.onpointermove=null,d.target.onpointerup=null,P(p,F)}}function O(d){let p=t.action.find(F=>F.action=="rescale");if(!p)return;d.preventDefault(),d.stopPropagation();let{"min-range-h":w=0}=p,S=f(d),k=t.coord2pos(S).h,X=k-S.l,L=k+S.r,H=t.pos2coord({hmin:X,hmax:L}),z={min:t.coord2pos({hmin:H.hmax-w,hmax:H.hmin+w}).hmax,max:t.coord2pos(p).hmax},R=0;d.target.setPointerCapture(d.pointerId),d.target.onpointermove=F=>{R+=F.movementX;let{xmin:Q,xmax:K,ymin:at,ymax:nt}=t.pos2coord({hmin:X,hmax:yt(X+(L-X)*S.l/Math.max(S.l+R,1),z)});Object.assign(r,{xmin:Q,xmax:K,ymin:at,ymax:nt})},d.target.onpointerup=F=>{d.target.onpointermove=null,d.target.onpointerup=null,P(p,F)}}let j=0,N;function I(d){let p=f(d);h("wheel",d,p);let w=t.action.find(S=>["zoom","nudge"].includes(S.action)&&["ctrlKey","shiftKey","altKey","metaKey"].every(k=>S[k]==d[k]));w&&(N=clearTimeout(N),d.preventDefault(),d.stopPropagation(),h("update:transition","transform 0.1s ease-out"),j+=d.deltaY,B(w,p,j),N=setTimeout(()=>{P(w,d),j=0},300))}function B(d,p,w){if(d.action=="zoom"){let{"min-range-h":S=0,sensitivity:k=1.25}=d,X=k**(w/100),L=t.coord2pos(d),H=Math.max(p.l-Math.max(p.l,0)*X,L.hmin??-1/0),z=Math.min(p.l+Math.max(p.r,0)*X,L.hmax??1/0),{[t.coord+"min"]:R,[t.coord+"max"]:F}=t.pos2coord({hmin:H,hmax:z});if(X<1&&F-R<S){let Q=(F+R)/2;R=Q-S/2,F=Q+S/2}r[t.coord+"min"]=R,r[t.coord+"max"]=F}if(d.action=="nudge"){let{sensitivity:S=.1}=d,k=t.coord2pos(d),X=0,L=t.layout.width,H=S*t.layout.width*(-w/120),z=yt(-H,{min:k.hmin-X,max:k.hmax-L}),{xmin:R,xmax:F,ymin:Q,ymax:K}=t.pos2coord({hmin:X+z,hmax:L+z});Object.assign(r,{xmin:R,xmax:F,ymin:Q,ymax:K})}}function P(d,p){let w=Lt(r)??{};if(!Object.keys(w).length)return;let S=new PointerEvent(p.type,p);Se(d.emit,w,S)||h(d.action,w,S),h("rangechange",w),Object.assign(r,{xmin:void 0,xmax:void 0,ymin:void 0,ymax:void 0})}const b={pointerup(d){h("pointerup",d,f(d))},pointerover(d){h("pointerover",d,f(d))},pointerout(d){h("pointerout",d,f(d))},pointerenter(d){h("pointerenter",d,f(d))},pointerleave(d){h("pointerleave",d,f(d))},dblclick(d){h("dblclick",d,f(d))},click(d){h("click",d,f(d))},contextmenu(d){h("contextmenu",d,f(d))},pointermove(d){h("pointermove",d,f(d))},pointerdown:x,wheel:I};return(d,p)=>(V(),D("g",{transform:l.value,style:sn({transition:t.transition})},[wt("line",_({ref:"i",x1:0,x2:n.value,y1:0,y2:0},s.value),null,16,Qf),p[1]||(p[1]=gt()),(V(!0),D(ut,null,ht(c.value,w=>(V(),D("line",_({ref_for:!0},w),null,16))),256)),p[2]||(p[2]=gt()),(V(!0),D(ut,null,ht(a.value,w=>(V(),D("g",_({ref_for:!0},w.wrapper),[le(Qe,_({ref_for:!0},w.text),null,16)],16))),256)),p[3]||(p[3]=gt()),wt("g",Zf,[wt("rect",_({width:n.value,height:10,y:-5},qt(b,!0),{cursor:t.action.some?.(w=>w.action=="move")?"grab":null}),null,16,Jf)]),p[4]||(p[4]=gt()),t.action.some?.(w=>w.action=="rescale")?(V(),D("g",_f,[wt("rect",{width:20,height:10,y:-5,style:{cursor:"ew-resize"},onPointerdown:$},null,32),p[0]||(p[0]=gt()),wt("rect",{width:20,height:10,y:-5,x:n.value-20,style:{cursor:"ew-resize"},onPointerdown:O},null,40,th)])):Ft("",!0),p[5]||(p[5]=gt()),o.value.text?(V(),kt(Qe,ge(_({key:1},o.value)),null,16)):Ft("",!0)],12,Kf))}},nh=["transform"],ih=["y2"],rh={class:"vvplot-interactive",fill:"transparent"},lh=["height","cursor"],ah={key:0,class:"vvplot-interactive",fill:"transparent"},oh=["y"],sh={__name:"CoreAxisV",props:{coord:String,ticks:{type:Array,default:()=>[]},title:String,coord2pos:Function,pos2coord:Function,layout:Object,theme:{type:Object,default:()=>({})},action:{type:Array,default:()=>[]},position:null,activeTransform:Object,transition:String},emits:["click","dblclick","contextmenu","pointerdown","pointerup","pointerover","pointerout","pointerenter","pointerleave","pointermove","wheel","singleclick","move","zoom","rescale","nudge","rangechange","update:transition"],setup(t,{emit:e}){const n=Y(()=>t.layout.width+t.layout.l+t.layout.r),i=Y(()=>t.layout.height+t.layout.t+t.layout.b),r=Mn("rangePreview"),l=Y(()=>{let d=0,p={left:"0%",center:"50%",right:"100%"}[t.position]??t.position;return typeof p=="string"&&p.endsWith("%")?d=n.value*p.slice(0,-1)/100:d=t.activeTransform.translateH+t.coord2pos({h:+p}).h*t.activeTransform.scaleH+t.layout.left,`translate(${d}, 0)`}),o=Y(()=>{let d=t.theme.title_position??t.theme.tick_position,p=d,w=t.theme.title_dock_x,S=t.theme.title_dock_y,k=0;return typeof d!="number"&&(p={bottom:0,left:.5,right:.5,top:1}[d]??.5,w??={left:1,right:0}[d]??.5,S??={top:0,bottom:1}[d]??.5,k=({left:-1,right:1}[d]??0)*(t.theme.title_offset??0)),{x:k,y:i.value*(1-p),angle:t.theme.title_angle,dockX:w,dockY:S,fontSize:t.theme.title_size,text:t.title,fill:t.theme.title_color,...t.theme.title_style}}),s=Y(()=>({stroke:t.theme.line_color,"stroke-width":t.theme.line_width,"stroke-dasharray":t.theme.line_dasharray,style:t.theme.line_style})),c=Y(()=>{let d=[];for(let p of t.ticks){typeof p=="number"&&(p={position:p});let w=t.coord2pos({v:p.position}).v,S=w*(t.activeTransform.scaleV-1)+t.activeTransform.translateV,k=w+t.layout.t;if(k+S<0||k+S>i.value)continue;let X=(t.theme.tick_position=="right"?1:-1)*(p.length??t.theme.tick_length);d.push({key:"line-"+p.position,y1:k,y2:k,x1:0,x2:X,stroke:p.color??t.theme.tick_color,"stroke-width":p.width??t.theme.tick_width,transform:S?`translate(0,${S})`:null,style:{transition:t.transition}})}return d.filter(p=>p.stroke!=null).sort((p,w)=>p.y1-w.y1)}),a=Y(()=>{let d=t.theme.tick_position=="right",p=[];for(let w of t.ticks){typeof w=="number"&&(w={position:w});let S=t.coord2pos({v:w.position}).v,k=S*(t.activeTransform.scaleV-1)+t.activeTransform.translateV,X=S+t.layout.t;if(X+k<0||X+k>i.value)continue;let L=(d?1:-1)*((w.length??t.theme.tick_length)+3),H,z,R,F;t.theme.tick_anchor_x!=null||t.theme.tick_anchor_y!=null?(H=t.theme.tick_anchor_x??(d?0:1),z=t.theme.tick_anchor_y??.5):(R=t.theme.tick_dock_x??(d?0:1),F=t.theme.tick_dock_y??.5),p.push({wrapper:{key:"text-"+w.position,transform:k?`translate(0,${k})`:null,style:{transition:t.transition}},text:{y:X,x:L,angle:t.theme.text_angle,anchorX:H,anchorY:z,dockX:R,dockY:F,text:w.label,title:w.title??w.label,fontSize:w.size??t.theme.label_size,fill:w.color??t.theme.label_color}})}return p.filter(w=>w.text.fill!=null).sort((w,S)=>w.text.y-S.text.y)}),u=Vt("i");function f(d){let p=u.value.getBoundingClientRect(),w=Math.trunc(d.clientY)-p.top-t.layout.top,S=p.top+t.layout.top+t.layout.height-Math.trunc(d.clientY),k={t:w,b:S},{x:X,y:L}=t.pos2coord({v:w});return X&&(k.x=X),L&&(k.y=L),k}const h=e;let m,y=0;function x(d){let p=f(d);h("pointerdown",d,p);let w=!1;function S(z){(Math.abs(z.screenX-d.screenX)>3||Math.abs(z.screenY-d.screenY)>3)&&(w=!0,z.currentTarget.removeEventListener("pointermove",S))}d.target.addEventListener("pointermove",S,{passive:!0}),d.target.addEventListener("pointerup",function(z){if(d.target.removeEventListener("pointermove",S),!w){let R=f(z);h("singleclick",new PointerEvent("singleclick",z),R)}},{once:!0});let k=t.action.find(z=>z.action=="move");if(!k)return;d.preventDefault(),d.stopPropagation(),d.target.style.cursor="grabbing",m=clearTimeout(m);let X=0,L=t.layout.height,H=t.coord2pos(k);d.target.setPointerCapture(d.pointerId),d.target.onpointermove=z=>{if(y+=z.movementY,!w)return;let R=yt(-y,{min:H.vmin-X,max:H.vmax-L}),{xmin:F,xmax:Q,ymin:K,ymax:at}=t.pos2coord({vmin:X+R,vmax:L+R});Object.assign(r,{xmin:F,xmax:Q,ymin:K,ymax:at})},d.target.onpointerup=z=>{d.target.onpointermove=null,d.target.onpointerup=null,d.target.style.cursor=null,w&&(m=setTimeout(()=>{P(k,z),y=0},300))}}function $(d){let p=t.action.find(F=>F.action=="rescale");if(!p)return;d.preventDefault(),d.stopPropagation();let{"min-range-v":w=0}=p,S=f(d),k=t.coord2pos(S).v,X=k-S.t,L=k+S.b,H=t.pos2coord({vmin:X,vmax:L}),z={min:t.coord2pos(p).vmin,max:t.coord2pos({vmin:H.vmax-w,vmax:H.vmin+w}).vmin},R=0;d.target.setPointerCapture(d.pointerId),d.target.onpointermove=F=>{R+=F.movementY;let{xmin:Q,xmax:K,ymin:at,ymax:nt}=t.pos2coord({vmin:yt(L-(L-X)*S.b/Math.max(S.b-R,1),z),vmax:L});Object.assign(r,{xmin:Q,xmax:K,ymin:at,ymax:nt})},d.target.onpointerup=F=>{d.target.onpointermove=null,d.target.onpointerup=null,P(p,F)}}function O(d){let p=t.action.find(F=>F.action=="rescale");if(!p)return;d.preventDefault(),d.stopPropagation();let{"min-range-v":w=0}=p,S=f(d),k=t.coord2pos(S).v,X=k-S.t,L=k+S.b,H=t.pos2coord({vmin:X,vmax:L}),z={min:t.coord2pos({vmin:H.vmax-w,vmax:H.vmin+w}).vmax,max:t.coord2pos(p).vmax},R=0;d.target.setPointerCapture(d.pointerId),d.target.onpointermove=F=>{R+=F.movementY;let{xmin:Q,xmax:K,ymin:at,ymax:nt}=t.pos2coord({vmin:X,vmax:yt(X+(L-X)*S.t/Math.max(S.t+R,1),z)});Object.assign(r,{xmin:Q,xmax:K,ymin:at,ymax:nt})},d.target.onpointerup=F=>{d.target.onpointermove=null,d.target.onpointerup=null,P(p,F)}}let j=0,N;function I(d){let p=f(d);h("wheel",d,p);let w=t.action.find(S=>["zoom","nudge"].includes(S.action)&&["ctrlKey","shiftKey","altKey","metaKey"].every(k=>S[k]==d[k]));w&&(N=clearTimeout(N),d.preventDefault(),d.stopPropagation(),h("update:transition","transform 0.1s ease-out"),j+=d.deltaY,B(w,p,j),N=setTimeout(()=>{P(w,d),j=0},300))}function B(d,p,w){if(d.action=="zoom"){let{"min-range-v":S=0,sensitivity:k=1.25}=d,X=k**(w/100),L=t.coord2pos(d),H=Math.max(p.t-Math.max(p.t,0)*X,L.vmin??-1/0),z=Math.min(p.t+Math.max(p.b,0)*X,L.vmax??1/0),{[t.coord+"min"]:R,[t.coord+"max"]:F}=t.pos2coord({vmin:H,vmax:z});if(X<1&&F-R<S){let Q=(F+R)/2;R=Q-S/2,F=Q+S/2}r[t.coord+"min"]=R,r[t.coord+"max"]=F}if(d.action=="nudge"){let{sensitivity:S=.1}=d,k=t.coord2pos(d),X=0,L=t.layout.height,H=S*t.layout.height*(-w/120),z=yt(-H,{min:k.vmin-X,max:k.vmax-L}),{xmin:R,xmax:F,ymin:Q,ymax:K}=t.pos2coord({vmin:X+z,vmax:L+z});Object.assign(r,{xmin:R,xmax:F,ymin:Q,ymax:K})}}function P(d,p){let w=Lt(r)??{};if(!Object.keys(w).length)return;let S=new PointerEvent(p.type,p);Se(d.emit,w,S)||h(d.action,w,S),h("rangechange",w),Object.assign(r,{xmin:void 0,xmax:void 0,ymin:void 0,ymax:void 0})}const b={pointerup(d){h("pointerup",d,f(d))},pointerover(d){h("pointerover",d,f(d))},pointerout(d){h("pointerout",d,f(d))},pointerenter(d){h("pointerenter",d,f(d))},pointerleave(d){h("pointerleave",d,f(d))},dblclick(d){h("dblclick",d,f(d))},click(d){h("click",d,f(d))},contextmenu(d){h("contextmenu",d,f(d))},pointermove(d){h("pointermove",d,f(d))},pointerdown:x,wheel:I};return(d,p)=>(V(),D("g",{transform:l.value,style:sn({transition:t.transition})},[wt("line",_({ref:"i",x1:0,x2:0,y1:0,y2:i.value},s.value),null,16,ih),p[1]||(p[1]=gt()),(V(!0),D(ut,null,ht(c.value,w=>(V(),D("line",_({ref_for:!0},w),null,16))),256)),p[2]||(p[2]=gt()),(V(!0),D(ut,null,ht(a.value,w=>(V(),D("g",_({ref_for:!0},w.wrapper),[le(Qe,_({ref_for:!0},w.text),null,16)],16))),256)),p[3]||(p[3]=gt()),wt("g",rh,[wt("rect",_({width:10,height:i.value,x:-5},qt(b,!0),{cursor:t.action.some?.(w=>w.action=="move")?"grab":null}),null,16,lh)]),p[4]||(p[4]=gt()),t.action.some?.(w=>w.action=="rescale")?(V(),D("g",ah,[wt("rect",{width:10,height:20,x:-5,style:{cursor:"ns-resize"},onPointerdown:$},null,32),p[0]||(p[0]=gt()),wt("rect",{width:10,height:20,x:-5,y:i.value-20,style:{cursor:"ns-resize"},onPointerdown:O},null,40,oh)])):Ft("",!0),p[5]||(p[5]=gt()),o.value.text?(V(),kt(Qe,ge(_({key:1},o.value)),null,16)):Ft("",!0)],12,nh))}},tl={__name:"CoreAxis",props:{theme:{type:Object,default:()=>({})},position:null,orientation:null},setup(t){const e={h:eh,v:sh};return(n,i)=>t.position!="none"?(V(),kt(qe(e[t.orientation]),{key:0,theme:t.theme,position:t.position},null,8,["theme","position"])):Ft("",!0)}},uh={__name:"CoreGridH",props:{majorBreaks:{type:Array,default:()=>[]},minorBreaks:{type:Array,default:()=>[]},coord2pos:Function,pos2coord:Function,layout:Object,theme:{type:Object,default:()=>({})},action:{type:Object,default:()=>({})},activeTransform:Object,transition:String},setup(t){const e=Y(()=>t.layout.width+t.layout.l+t.layout.r),n=Y(()=>t.layout.height+t.layout.t+t.layout.b),i=Y(()=>{let o=[];for(let s of t.majorBreaks){let c=t.coord2pos({v:s.position}).v;if(isNaN(c))continue;let a=c*(t.activeTransform.scaleV-1)+t.activeTransform.translateV,u=c+t.layout.t;u+a<0||u+a>n.value||o.push({key:"major-"+s.position,x1:0,x2:e.value,y1:u,y2:u,stroke:s.color??t.theme.line_color_major,"stroke-width":s.width??t.theme.line_width_major??0,transform:a?`translate(0,${a})`:null,style:{transition:t.transition}})}return o.filter(s=>s.stroke!==null)}),r=Y(()=>{let o=[];for(let s of t.minorBreaks){if(t.majorBreaks.some(f=>f.position==s.position))continue;let c=t.coord2pos({v:s.position}).v;if(isNaN(c))continue;let a=c*(t.activeTransform.scaleV-1)+t.activeTransform.translateV,u=c+t.layout.t;u+a<0||u+a>n.value||o.push({key:"minor-"+s.position,x1:0,x2:e.value,y1:u,y2:u,stroke:s.color??t.theme.line_color_minor,"stroke-width":s.width??t.theme.line_width_minor??0,transform:a?`translate(0,${a})`:null,style:{transition:t.transition}})}return o.filter(s=>s.stroke!==null)}),l=Y(()=>r.value.concat(i.value).sort((o,s)=>o.y1-s.y1));return(o,s)=>(V(),D("g",null,[(V(!0),D(ut,null,ht(l.value,c=>(V(),D("line",_({ref_for:!0},c,{style:{transition:t.transition}}),null,16))),256))]))}},ch={__name:"CoreGridV",props:{majorBreaks:{type:Array,default:()=>[]},minorBreaks:{type:Array,default:()=>[]},coord2pos:Function,pos2coord:Function,layout:Object,theme:{type:Object,default:()=>({})},action:{type:Object,default:()=>({})},activeTransform:Object,transition:String},setup(t){const e=Y(()=>t.layout.width+t.layout.l+t.layout.r),n=Y(()=>t.layout.height+t.layout.t+t.layout.b),i=Y(()=>{let o=[];for(let s of t.majorBreaks){let c=t.coord2pos({h:s.position}).h;if(isNaN(c))continue;let a=c*(t.activeTransform.scaleH-1)+t.activeTransform.translateH,u=c+t.layout.l;u+a<0||u+a>e.value||o.push({key:"major-"+s.position,y1:0,y2:n.value,x1:u,x2:u,stroke:s.color??t.theme.line_color_major,"stroke-width":s.width??t.theme.line_width_major??0,transform:a?`translate(${a},0)`:null,style:{transition:t.transition}})}return o.filter(s=>s.stroke!==null)}),r=Y(()=>{let o=[];for(let s of t.minorBreaks){if(t.majorBreaks.some(f=>f.position==s.position))continue;let c=t.coord2pos({h:s.position}).h;if(isNaN(c))continue;let a=c*(t.activeTransform.scaleH-1)+t.activeTransform.translateH,u=c+t.layout.l;u+a<0||u+a>e.value||o.push({key:"minor-"+s.position,y1:0,y2:n.value,x1:u,x2:u,stroke:s.color??t.theme.line_color_minor,"stroke-width":s.width??t.theme.line_width_minor??0,transform:a?`translate(${a},0)`:null,style:{transition:t.transition}})}return o.filter(s=>s.stroke!==null)}),l=Y(()=>r.value.concat(i.value).sort((o,s)=>o.x1-s.x1));return(o,s)=>(V(),D("g",null,[(V(!0),D(ut,null,ht(l.value,c=>(V(),D("line",_({ref_for:!0},c,{style:{transition:t.transition}}),null,16))),256))]))}},fh={__name:"CoreCanvasCurve",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"],setup(t,{expose:e,emit:n}){let i=["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"];const r=n,l=Y(()=>({width:t.layout.fullWidth*(1+t.extendX*2),height:t.layout.fullHeight*(1+t.extendY*2),x:-t.layout.l-t.layout.fullWidth*t.extendX,y:-t.layout.t-t.layout.fullHeight*t.extendY})),o=Vt("container"),s=Y(()=>{if(o.value==null)return;const u=document.createElement("canvas");u.width=t.layout.fullWidth*(1+t.extendX*2),u.height=t.layout.fullHeight*(1+t.extendY*2);const f=u.getContext("2d");f.clearRect(0,0,u.width,u.height),f.translate(t.layout.l+t.layout.fullWidth*t.extendX,t.layout.t+t.layout.fullHeight*t.extendY);let h=new Map,m=new Map;for(const y of t.data)for(let{points:x,fill:$="none",color:O="black",linewidth:j,linetype:N,alpha:I,"translate-x":B=0,"translate-y":P=0,$raw:b,interpolate:d}of y){if(x=x.map(k=>(({h:X,v:L})=>({x:X,y:L}))(t.coord2pos(k))).filter(k=>k.x!=null&&k.y!=null),x.length===0)continue;const p=new Path2D;let S=(c[d]??Rn)(p);S.lineStart();for(let k=0;k<x.length;k++)S.point(x[k].x+B,x[k].y+P);S.lineEnd(),h.set(p,b),f.lineWidth=j,f.globalAlpha=I,f.setLineDash(a(N)),$!=="none"&&(f.fillStyle=$,f.fill(p)),O!=null&&(f.strokeStyle=O,f.stroke(p))}for(let y of Array.from(h.keys()).reverse())m.set(y,h.get(y));for(let y of i)u.addEventListener(y,function(x){if(x._vhandled)return;const $=u.getBoundingClientRect(),O=x.clientX-$.left,j=x.clientY-$.top;for(const[N,I]of m)if(f.isPointInPath(N,O,j)){r(y,x,t.getCoord(x),I),x._vhandled=!0;break}});return u});St(s,u=>o.value.replaceChildren(u)),e({dispatchEvent:u=>s.value?.dispatchEvent?.(u)});const c={cardinal:ra,catmullRom:aa,linear:Ri,natural:Rn};function a(u){return u==null?[]:Array.isArray(u)?u:u==="solid"?[]:u==="dashed"?[4,4]:u==="dotted"?[1,3]:u==="dotdash"?[1,3,4,3]:u==="longdash"?[8,4]:u==="twodash"?[2,2,6,2]:u.includes(" ")?u:u.split("").map(f=>+("0x"+f))}return(u,f)=>(V(),D("foreignObject",_(l.value,{ref:"container"}),null,16))}},hh={__name:"CoreCanvasBoxplot",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"],setup(t,{expose:e,emit:n}){let i=["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"];const r=n,l=Y(()=>({width:t.layout.fullWidth*(1+t.extendX*2),height:t.layout.fullHeight*(1+t.extendY*2),x:-t.layout.l-t.layout.fullWidth*t.extendX,y:-t.layout.t-t.layout.fullHeight*t.extendY})),o=Vt("container"),s=Y(()=>{if(o.value==null)return;const a=document.createElement("canvas");a.width=t.layout.fullWidth*(1+t.extendX*2),a.height=t.layout.fullHeight*(1+t.extendY*2);const u=a.getContext("2d");u.clearRect(0,0,a.width,a.height),u.translate(t.layout.l+t.layout.fullWidth*t.extendX,t.layout.t+t.layout.fullHeight*t.extendY);let f=new Map,h=new Map;for(const m of t.data)for(let{x:y,xmin:x,xmax:$,y:O,ymin:j,ymax:N,lwisker:I,Q1:B,median:P,Q3:b,uwisker:d,outliers:p,$xmin:w,$xmax:S,$ymin:k,$ymax:X,fill:L="white",color:H="black",linewidth:z=1,linetype:R,alpha:F,"translate-x":Q=0,"translate-y":K=0,$raw:at}of m){if(H==="transparent")continue;const{hmin:nt,hmax:ot,vmin:pt,vmax:At}=t.coord2pos(y==null?{ymin:j,ymax:N,xmin:B,xmax:b}:{xmin:x,xmax:$,ymin:B,ymax:b}),{h:Ct,v:It}=t.coord2pos(y==null?{y:O,x:I}:{x:y,y:I}),{h:jt,v:$t}=t.coord2pos(y==null?{y:O,x:d}:{x:y,y:d}),{h:Wt,v:Gt}=t.coord2pos(y==null?{y:j,x:P}:{x,y:P}),{h:A,v:C}=t.coord2pos(y==null?{y:N,x:P}:{x:$,y:P}),{h:E,v:g}=t.coord2pos(y==null?{y:j*.25+N*.75,x:d}:{x:x*.25+$*.75,y:d}),{h:v,v:M}=t.coord2pos(y==null?{y:j*.75+N*.25,x:d}:{x:x*.75+$*.25,y:d}),{h:T,v:W}=t.coord2pos(y==null?{y:j*.25+N*.75,x:I}:{x:x*.25+$*.75,y:I}),{h:q,v:Z}=t.coord2pos(y==null?{y:j*.75+N*.25,x:I}:{x:x*.75+$*.25,y:I});u.globalAlpha=F,u.setLineDash(c(R));const tt=new Path2D;tt.moveTo(Ct+Q,It+K),tt.lineTo(jt+Q,$t+K);const it=new Path2D;it.moveTo(E+Q,g+K),it.lineTo(v+Q,M+K),it.moveTo(T+Q,W+K),it.lineTo(q+Q,Z+K),u.lineWidth=z,H!=="none"&&(u.strokeStyle=H,u.stroke(tt),u.stroke(it));const mt=new Path2D;mt.rect(nt+Q,pt+K,ot-nt,At-pt),L!=="none"&&(u.fillStyle=L,u.fill(mt)),H!=null&&(u.strokeStyle=H,u.stroke(mt)),f.set(mt,at);const dt=new Path2D;dt.moveTo(Wt+Q,Gt+K),dt.lineTo(A+Q,C+K),u.lineWidth=z*2,H!=="none"&&(u.strokeStyle=H,u.stroke(dt));for(let{x:ct,y:rt,$raw:G}of p){const{h:J,v:U}=t.coord2pos({x:ct,y:rt}),lt=new Path2D;lt.arc(J+Q,U+K,2,0,Math.PI*2),L!=="none"&&(u.fillStyle=H,u.fill(lt)),f.set(lt,G)}}for(let m of Array.from(f.keys()).reverse())h.set(m,f.get(m));for(let m of i)a.addEventListener(m,function(y){if(y._vhandled)return;const x=a.getBoundingClientRect(),$=y.clientX-x.left,O=y.clientY-x.top;for(const[j,N]of h)if(u.isPointInPath(j,$,O)){r(m,y,t.getCoord(y),N),y._vhandled=!0;break}});return a});St(s,a=>o.value.replaceChildren(a)),e({dispatchEvent:a=>s.value?.dispatchEvent?.(a)});function c(a){return a==null?[]:Array.isArray(a)?a:a==="solid"?[]:a==="dashed"?[4,4]:a==="dotted"?[1,3]:a==="dotdash"?[1,3,4,3]:a==="longdash"?[8,4]:a==="twodash"?[2,2,6,2]:a.includes(" ")?a:a.split("").map(u=>+("0x"+u))}return(a,u)=>(V(),D("foreignObject",_(l.value,{ref:"container"}),null,16))}},el={__name:"CoreCanvasLine",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"],setup(t,{expose:e,emit:n}){let i=["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"];const r=n,l=Y(()=>({width:t.layout.fullWidth*(1+t.extendX*2),height:t.layout.fullHeight*(1+t.extendY*2),x:-t.layout.l-t.layout.fullWidth*t.extendX,y:-t.layout.t-t.layout.fullHeight*t.extendY})),o=Vt("container"),s=Y(()=>{if(o.value==null)return;const a=document.createElement("canvas");a.width=t.layout.fullWidth*(1+t.extendX*2),a.height=t.layout.fullHeight*(1+t.extendY*2);const u=a.getContext("2d");u.clearRect(0,0,a.width,a.height),u.translate(t.layout.l+t.layout.fullWidth*t.extendX,t.layout.t+t.layout.fullHeight*t.extendY);let f=new Map,h=new Map;for(const m of t.data)for(let{x:y,y:x,xend:$,yend:O,color:j,linewidth:N,alpha:I,linetype:B,"translate-x":P=0,"translate-y":b=0,$raw:d}of m){if(j==="transparent")continue;const{h:p,v:w}=t.coord2pos({x:y,y:x}),{h:S,v:k}=t.coord2pos({x:$,y:O}),X=new Path2D;X.moveTo(p+P,w+b),X.lineTo(S+P,k+b),f.set(X,d),u.lineWidth=N,u.globalAlpha=I,u.setLineDash(c(B)),j!=="none"&&(u.strokeStyle=j,u.stroke(X))}for(let m of Array.from(f.keys()).reverse())h.set(m,f.get(m));for(let m of i)a.addEventListener(m,function(y){if(y._vhandled)return;const x=a.getBoundingClientRect(),$=y.clientX-x.left,O=y.clientY-x.top;for(const[j,N]of h)if(u.isPointInPath(j,$,O)){r(m,y,t.getCoord(y),N),y._vhandled=!0;break}});return a});St(s,a=>o.value.replaceChildren(a)),e({dispatchEvent:a=>s.value?.dispatchEvent?.(a)});function c(a){return a==null?[]:Array.isArray(a)?a:a==="solid"?[]:a==="dashed"?[4,4]:a==="dotted"?[1,3]:a==="dotdash"?[1,3,4,3]:a==="longdash"?[8,4]:a==="twodash"?[2,2,6,2]:a.includes(" ")?a:a.split("").map(u=>+("0x"+u))}return(a,u)=>(V(),D("foreignObject",_(l.value,{ref:"container"}),null,16))}},mh={__name:"CoreCanvasPoint",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"],setup(t,{expose:e,emit:n}){let i=["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"];const r=n,l={triangle:a=>`M0-${a*2/3}L${a*.577},${a/3}L-${a*.577},${a/3}Z`,diamond:a=>`M0-${a*.707}L${a*.707},0L0,${a*.707}L-${a*.707},0Z`,square:a=>`M-${a/2}-${a/2}H${a/2}V${a/2}H-${a/2}Z`,plus:a=>`M-${a/10}-${a/2}V-${a/10}H-${a/2}V${a/10}H-${a/10}V${a/2}H${a/10}V${a/10}H${a/2}V-${a/10}H${a/10}V-${a/2}H-${a/10}Z`,corss:a=>`M-${a*.283}-${a*.424}L-${a*.424}-${a*.283}L-${a*.141},0L-${a*.424},${a*.283}L-${a*.283},${a*.424}L0,${a*.141}L${a*.283},${a*.424}L${a*.424},${a*.283}L${a*.141},0L${a*.424},-${a*.283}L${a*.283},-${a*.424}L0,-${a*.141}Z`},o=Y(()=>({width:t.layout.fullWidth*(1+t.extendX*2),height:t.layout.fullHeight*(1+t.extendY*2),x:-t.layout.l-t.layout.fullWidth*t.extendX,y:-t.layout.t-t.layout.fullHeight*t.extendY})),s=Vt("container"),c=Y(()=>{if(s.value==null)return;const a=document.createElement("canvas");a.width=t.layout.fullWidth*(1+t.extendX*2),a.height=t.layout.fullHeight*(1+t.extendY*2);const u=a.getContext("2d");u.clearRect(0,0,a.width,a.height),u.translate(t.layout.l+t.layout.fullWidth*t.extendX,t.layout.t+t.layout.fullHeight*t.extendY);let f=new Map,h=new Map;for(const m of t.data)for(let{x:y,y:x,size:$=6,shape:O,color:j,stroke:N,linewidth:I,alpha:B,"translate-x":P=0,"translate-y":b=0,$raw:d}of m){const{h:p,v:w}=t.coord2pos({x:y,y:x}),S=new Path2D;String(O).startsWith("path:")?S.addPath(new Path2D(O.slice(5)),new DOMMatrix().translateSelf(p+P,w+b)):O in l?S.addPath(new Path2D(l[O]($)),new DOMMatrix().translate(p+P,w+b)):S.arc(p+P,w+b,$/2,0,Math.PI*2),f.set(S,d),u.lineWidth=I,u.globalAlpha=B,u.beginPath(),j!=="none"&&(u.fillStyle=j,u.fill(S)),N!=null&&(u.strokeStyle=N,u.stroke(S))}for(let m of Array.from(f.keys()).reverse())h.set(m,f.get(m));for(let m of i)a.addEventListener(m,function(y){if(y._vhandled)return;const x=a.getBoundingClientRect(),$=y.clientX-x.left,O=y.clientY-x.top;for(const[j,N]of h)if(u.isPointInPath(j,$,O)){r(m,y,t.getCoord(y),N),y._vhandled=!0;break}});return a});return St(c,a=>s.value.replaceChildren(a)),e({dispatchEvent:a=>c.value?.dispatchEvent?.(a)}),(a,u)=>(V(),D("foreignObject",_(o.value,{ref:"container"}),null,16))}},dh={__name:"CoreCanvasPolygon",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"],setup(t,{expose:e,emit:n}){let i=["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"];const r=n,l=Y(()=>({width:t.layout.fullWidth*(1+t.extendX*2),height:t.layout.fullHeight*(1+t.extendY*2),x:-t.layout.l-t.layout.fullWidth*t.extendX,y:-t.layout.t-t.layout.fullHeight*t.extendY})),o=Vt("container"),s=Y(()=>{if(o.value==null)return;const a=document.createElement("canvas");a.width=t.layout.fullWidth*(1+t.extendX*2),a.height=t.layout.fullHeight*(1+t.extendY*2);const u=a.getContext("2d");u.clearRect(0,0,a.width,a.height),u.translate(t.layout.l+t.layout.fullWidth*t.extendX,t.layout.t+t.layout.fullHeight*t.extendY);let f=new Map,h=new Map;for(const m of t.data)for(let{points:y,fill:x,color:$,linewidth:O,linetype:j,alpha:N,"translate-x":I=0,"translate-y":B=0,$raw:P}of m){if(y=y.map(d=>(({h:p,v:w})=>({x:p,y:w}))(t.coord2pos(d))).filter(d=>d.x!=null&&d.y!=null),y.length===0)continue;const b=new Path2D;b.moveTo(y[0].x+I,y[0].y+B);for(let d=1;d<y.length;d++)b.lineTo(y[d].x+I,y[d].y+B);b.closePath(),f.set(b,P),u.lineWidth=O,u.globalAlpha=N,u.setLineDash(c(j)),x!=="none"&&(u.fillStyle=x,u.fill(b)),$!=null&&(u.strokeStyle=$,u.stroke(b))}for(let m of Array.from(f.keys()).reverse())h.set(m,f.get(m));for(let m of i)a.addEventListener(m,function(y){if(y._vhandled)return;const x=a.getBoundingClientRect(),$=y.clientX-x.left,O=y.clientY-x.top;for(const[j,N]of h)if(u.isPointInPath(j,$,O)){r(m,y,t.getCoord(y),N),y._vhandled=!0;break}});return a});St(s,a=>o.value.replaceChildren(a)),e({dispatchEvent:a=>s.value?.dispatchEvent?.(a)});function c(a){return a==null?[]:Array.isArray(a)?a:a==="solid"?[]:a==="dashed"?[4,4]:a==="dotted"?[1,3]:a==="dotdash"?[1,3,4,3]:a==="longdash"?[8,4]:a==="twodash"?[2,2,6,2]:a.includes(" ")?a:a.split("").map(u=>+("0x"+u))}return(a,u)=>(V(),D("foreignObject",_(l.value,{ref:"container"}),null,16))}},nl={__name:"CoreCanvasRect",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"],setup(t,{expose:e,emit:n}){let i=["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"];const r=n,l=Y(()=>({width:t.layout.fullWidth*(1+t.extendX*2),height:t.layout.fullHeight*(1+t.extendY*2),x:-t.layout.l-t.layout.fullWidth*t.extendX,y:-t.layout.t-t.layout.fullHeight*t.extendY})),o=Vt("container"),s=Y(()=>{if(o.value==null)return;const a=document.createElement("canvas");a.width=t.layout.fullWidth*(1+t.extendX*2),a.height=t.layout.fullHeight*(1+t.extendY*2);const u=a.getContext("2d");u.clearRect(0,0,a.width,a.height),u.translate(t.layout.l+t.layout.fullWidth*t.extendX,t.layout.t+t.layout.fullHeight*t.extendY);let f=new Map,h=new Map;for(const m of t.data)for(let{xmin:y,xmax:x,ymin:$,ymax:O,fill:j,color:N,linewidth:I,linetype:B,alpha:P,"translate-x":b=0,"translate-y":d=0,$raw:p}of m){const{hmin:w,hmax:S,vmin:k,vmax:X}=t.coord2pos({xmin:y,xmax:x,ymin:$,ymax:O}),L=new Path2D;L.rect(w+b,k+d,S-w,X-k),f.set(L,p),u.lineWidth=I,u.globalAlpha=P,u.setLineDash(c(B)),j!=="none"&&(u.fillStyle=j,u.fill(L)),N!=null&&(u.strokeStyle=N,u.stroke(L))}for(let m of Array.from(f.keys()).reverse())h.set(m,f.get(m));for(let m of i)a.addEventListener(m,function(y){if(y._vhandled)return;const x=a.getBoundingClientRect(),$=y.clientX-x.left,O=y.clientY-x.top;for(const[j,N]of h)if(u.isPointInPath(j,$,O)){r(m,y,t.getCoord(y),N),y._vhandled=!0;break}});return a});St(s,a=>o.value.replaceChildren(a)),e({dispatchEvent:a=>s.value?.dispatchEvent?.(a)});function c(a){return a==null?[]:Array.isArray(a)?a:a==="solid"?[]:a==="dashed"?[4,4]:a==="dotted"?[1,3]:a==="dotdash"?[1,3,4,3]:a==="longdash"?[8,4]:a==="twodash"?[2,2,6,2]:a.includes(" ")?a:a.split("").map(u=>+("0x"+u))}return(a,u)=>(V(),D("foreignObject",_(l.value,{ref:"container"}),null,16))}},yh={__name:"CoreCanvasText",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"],setup(t,{expose:e,emit:n}){let i=["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"];const r=n,l=Y(()=>({width:t.layout.fullWidth*(1+t.extendX*2),height:t.layout.fullHeight*(1+t.extendY*2),x:-t.layout.l-t.layout.fullWidth*t.extendX,y:-t.layout.t-t.layout.fullHeight*t.extendY})),o=Vt("container"),s=Y(()=>{if(o.value==null)return;const a=document.createElement("canvas");a.width=t.layout.fullWidth*(1+t.extendX*2),a.height=t.layout.fullHeight*(1+t.extendY*2);const u=a.getContext("2d");u.clearRect(0,0,a.width,a.height),u.translate(t.layout.l+t.layout.fullWidth*t.extendX,t.layout.t+t.layout.fullHeight*t.extendY);let f=new Map,h=new Map;for(const m of t.data)for(let{x:y,y:x,color:$,size:O=4,label:j="",title:N,stroke:I,linewidth:B,linetype:P,alpha:b,"anchor-x":d,"anchor-y":p,"dock-x":w,"dock-y":S,"translate-x":k=0,"translate-y":X=0,angle:L,"text-length":H,$raw:z}of m){u.save();const{h:R,v:F}=t.coord2pos({x:y,y:x});u.textAlign="center",u.textBaseline="middle",u.lineWidth=B,u.globalAlpha=b,u.font=`${O*4}px sans-serif`,u.setLineDash(c(P)),u.translate(R+k,F+X);let{width:Q,fontBoundingBoxAscent:K,fontBoundingBoxDescent:at}=u.measureText(j),nt=Q,ot=K+at;if(typeof H=="object"){let{x:pt=0,y:At=0}=H,{h:Ct,v:It}=t.coord2pos({x:y+pt/2,y:x+At/2}),{h:jt,v:$t}=t.coord2pos({x:y-pt/2,y:x-At/2});nt=Math.hypot(Ct-jt||0,It-$t||0)}else H!=null&&(nt=H);if(w!=null||S!=null){let pt={left:0,center:.5,right:1}[w]??+(w??.5),At={bottom:0,center:.5,top:1}[S]??+(S??.5);isNaN(pt)&&(pt=.5),isNaN(At)&&(At=.5);let Ct=nt*Math.abs(Math.cos(L*Math.PI/180))+ot*Math.abs(Math.sin(L*Math.PI/180)),It=nt*Math.abs(Math.sin(L*Math.PI/180))+ot*Math.abs(Math.cos(L*Math.PI/180));u.translate(Ct*(.5-pt),It*(At-.5)),u.rotate(L*Math.PI/180)}else{let pt={left:0,center:.5,right:1}[d]??+(d??.5),At={bottom:0,center:.5,top:1}[p]??+(p??.5);isNaN(pt)&&(pt=.5),isNaN(At)&&(At=.5);let Ct=nt,It=ot;u.rotate(L*Math.PI/180),u.translate(Ct*(.5-pt),It*(At-.5))}nt!=Q&&u.scale(nt/Q,1),$!=="none"&&(u.fillStyle=$,u.fillText(j,0,0)),I!=null&&(u.strokeStyle=I,u.strokeText(j,0,0)),u.restore()}for(let m of Array.from(f.keys()).reverse())h.set(m,f.get(m));for(let m of i)a.addEventListener(m,function(y){if(y._vhandled)return;const x=a.getBoundingClientRect(),$=y.clientX-x.left,O=y.clientY-x.top;for(const[j,N]of h)if(u.isPointInPath(j,$,O)){r(m,y,t.getCoord(y),N),y._vhandled=!0;break}});return a});St(s,a=>o.value.replaceChildren(a)),e({dispatchEvent:a=>s.value?.dispatchEvent?.(a)});function c(a){return a==null?[]:Array.isArray(a)?a:a==="solid"?[]:a==="dashed"?[4,4]:a==="dotted"?[1,3]:a==="dotdash"?[1,3,4,3]:a==="longdash"?[8,4]:a==="twodash"?[2,2,6,2]:a.includes(" ")?a:a.split("").map(u=>+("0x"+u))}return(a,u)=>(V(),D("foreignObject",_(l.value,{ref:"container"}),null,16))}},gh={__name:"CoreCanvasTextsegment",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"],setup(t,{expose:e,emit:n}){let i=["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"];const r=n,l=Y(()=>({width:t.layout.fullWidth*(1+t.extendX*2),height:t.layout.fullHeight*(1+t.extendY*2),x:-t.layout.l-t.layout.fullWidth*t.extendX,y:-t.layout.t-t.layout.fullHeight*t.extendY})),o=Vt("container"),s=Y(()=>{if(o.value==null)return;const a=document.createElement("canvas");a.width=t.layout.fullWidth*(1+t.extendX*2),a.height=t.layout.fullHeight*(1+t.extendY*2);const u=a.getContext("2d");u.clearRect(0,0,a.width,a.height),u.translate(t.layout.l+t.layout.fullWidth*t.extendX,t.layout.t+t.layout.fullHeight*t.extendY);let f=new Map,h=new Map;for(const m of t.data)for(let{x:y,xend:x,y:$,yend:O,size:j=4,label:N="",title:I,color:B,stroke:P,linewidth:b,linetype:d,alpha:p,"translate-x":w=0,"translate-y":S=0,"text-length":k,$raw:X}of m){u.save(),u.translate(w,S),u.textAlign="center",u.textBaseline="middle",u.lineWidth=b,u.globalAlpha=p,u.font=`${j*4}px sans-serif`;let L=c(String(N)),H=(x-y)/(L.length-1||1),z=(O-$)/(L.length-1||1);for(let R=0;R<L.length;R++){u.save();let F=y+R*H,Q=$+R*z;const{h:K,v:at}=t.coord2pos({x:F,y:Q});u.translate(K,at);let nt=L[R],{width:ot,fontBoundingBoxAscent:pt,fontBoundingBoxDescent:At}=u.measureText(nt),Ct=ot;if(typeof k=="object"){let{x:It=0,y:jt=0}=k,{h:$t,v:Wt}=t.coord2pos({x:y+It/2,y:$+jt/2}),{h:Gt,v:A}=t.coord2pos({x:y-It/2,y:$-jt/2});Ct=Math.hypot($t-Gt||0,Wt-A||0)}else k!=null&&(Ct=k);Ct!=ot&&u.scale(Ct/ot,1),B!=="none"&&(u.fillStyle=B,u.fillText(nt,0,0)),P!=null&&(u.strokeStyle=P,u.strokeText(nt,0,0)),u.restore()}u.restore()}for(let m of Array.from(f.keys()).reverse())h.set(m,f.get(m));for(let m of i)a.addEventListener(m,function(y){if(y._vhandled)return;const x=a.getBoundingClientRect(),$=y.clientX-x.left,O=y.clientY-x.top;for(const[j,N]of h)if(u.isPointInPath(j,$,O)){r(m,y,t.getCoord(y),N),y._vhandled=!0;break}});return a});St(s,a=>o.value.replaceChildren(a)),e({dispatchEvent:a=>s.value?.dispatchEvent?.(a)});function c(a){let u=[];for(let f=0;f<a.length;f++)if(a[f]==""){let h=f+1;for(;h<a.length&&a[h]!="";)h++;u.push(a.slice(f+1,h)),f=h}else u.push(a[f]);return u}return(a,u)=>(V(),D("foreignObject",_(l.value,{ref:"container"}),null,16))}},xh=Object.freeze(Object.defineProperty({__proto__:null,boxplot:hh,curve:fh,line:el,point:mh,polygon:dh,rect:nl,stick:el,text:yh,textsegment:gh,tile:nl},Symbol.toStringTag,{value:"Module"})),vh={__name:"CoreSvgBlank",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup"],setup(t,{emit:e}){return(n,i)=>(V(),D("g"))}},_n={__name:"CoreTile",props:{x:{type:Number,default:0},y:{type:Number,default:0},width:{type:Number,default:0},height:{type:Number,default:0},fill:String,color:String,linewidth:Number,linetype:String,alpha:{type:Number,default:1},translateX:{type:Number,default:0},translateY:{type:Number,default:0}},setup(t){const e=Y(()=>({x:t.x-t.width/2,y:t.y-t.height/2,width:t.width,height:t.height,fill:t.fill||null,"fill-opacity":t.alpha==1?null:t.alpha,stroke:t.color||null,"stroke-width":t.linewidth,"stroke-opacity":t.alpha==1?null:t.alpha,"stroke-dasharray":n(t.linetype),transform:t.translateX||t.translateY?`translate(${t.translateX}, ${t.translateY})`:null}));function n(i){return i==null?null:Array.isArray(i)?i.join(" "):i==="solid"?null:i==="dashed"?"4 4":i==="dotted"?"1 3":i==="dotdash"?"1 3 4 3":i==="longdash"?"8 4":i==="twodash"?"2 2 6 2":i.includes(" ")?i:i.split("").map(r=>+("0x"+r)).join(" ")}return(i,r)=>(V(),D("rect",ge(un(e.value)),null,16))}},zi={__name:"CorePoint",props:{x:{type:Number,default:0},y:{type:Number,default:0},shape:String,size:{type:Number,default:6},color:String,stroke:String,linewidth:Number,linetype:String,alpha:{type:Number,default:1},angle:{type:Number,default:0},translateX:{type:Number,default:0},translateY:{type:Number,default:0}},setup(t){const e={square:"M-0.5-0.5H0.5V0.5H-0.5Z",triangle:"M0-0.667L0.577,0.333L-0.577,0.333Z",diamond:"M0-0.707L0.707,0L0,0.707L-0.707,0Z",plus:"M-0.1-0.5V-0.1H-0.5V0.1H-0.1V0.5H0.1V0.1H0.5V-0.1H0.1V-0.5H-0.1Z",cross:"M-0.283-0.424L-0.424-0.283L-0.141,0L-0.424,0.283L-0.283,0.424L0,0.141L0.283,0.424L0.424,0.283L0.141,0L0.424,-0.283L0.283,-0.424L0,-0.141Z"},n=Y(()=>{let r=t.shape?.startsWith?.("path:")?t.shape?.slice?.(5):e[t.shape],l={fill:t.color||null,"fill-opacity":t.alpha==1?null:t.alpha,stroke:t.stroke||null,"stroke-width":t.linewidth,"stroke-opacity":t.alpha==1?null:t.alpha,"stroke-dasharray":i(t.linetype)};if(r!=null){let o=`translate(${t.x+t.translateX},${t.y+t.translateY})`;t.size!=1&&(o+=`scale(${t.size})`),t.angle&&(o+=`rotate(${t.angle})`),Object.assign(l,{d:r,transform:o})}else{let o=t.translateX||t.translateY?`translate(${t.translateX}, ${t.translateY})`:null;Object.assign(l,{cx:t.x,cy:t.y,r:t.size/2,transform:o})}return l});function i(r){return r==null?null:Array.isArray(r)?r.join(" "):r==="solid"?null:r==="dashed"?"4 4":r==="dotted"?"1 3":r==="dotdash"?"1 3 4 3":r==="longdash"?"8 4":r==="twodash"?"2 2 6 2":r.includes(" ")?r:r.split("").map(l=>+("0x"+l)).join(" ")}return(r,l)=>n.value.d?(V(),D("path",ge(_({key:0},n.value)),null,16)):(V(),D("circle",ge(_({key:1},n.value)),null,16))}},Re={__name:"CoreLine",props:{x1:{type:Number,default:0},y1:{type:Number,default:0},x2:{type:Number,default:0},y2:{type:Number,default:0},color:String,stroke:String,linewidth:Number,linetype:String,alpha:{type:Number,default:1},translateX:{type:Number,default:0},translateY:{type:Number,default:0}},setup(t){const e=Y(()=>({x1:t.x1,x2:t.x2,y1:t.y1,y2:t.y2,stroke:t.color||null,"stroke-width":t.linewidth,"stroke-opacity":t.alpha==1?null:t.alpha,"stroke-dasharray":n(t.linetype),transform:t.translateX||t.translateY?`translate(${t.translateX}, ${t.translateY})`:null}));function n(i){return i==null?null:Array.isArray(i)?i.join(" "):i==="solid"?null:i==="dashed"?"4 4":i==="dotted"?"1 3":i==="dotdash"?"1 3 4 3":i==="longdash"?"8 4":i==="twodash"?"2 2 6 2":i.includes(" ")?i:i.split("").map(r=>+("0x"+r)).join(" ")}return(i,r)=>(V(),D("line",ge(un(e.value)),null,16))}},ph={__name:"CoreSvgBoxplot",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"],setup(t,{emit:e}){let n=["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"];const i=e,r=Y(()=>{let l=-t.layout.fullWidth*t.extendX-t.layout.l,o=t.layout.fullWidth*(1+t.extendX)-t.layout.l,s=-t.layout.fullHeight*t.extendY-t.layout.t,c=t.layout.fullHeight*(1+t.extendY)-t.layout.t;return t.data.map(a=>a.map(({x:u,xmin:f,xmax:h,y:m,ymin:y,ymax:x,lwisker:$,Q1:O,median:j,Q3:N,uwisker:I,outliers:B,$xmin:P,$xmax:b,$ymin:d,$ymax:p,fill:w="white",color:S="black",linewidth:k,linetype:X,alpha:L,"translate-x":H=0,"translate-y":z=0,$raw:R})=>{const{hmin:F,hmax:Q,vmin:K,vmax:at}=t.coord2pos({xmin:P,xmax:b,ymin:d,ymax:p});if(F<l&&Q<l||F>o&&Q>o||K<s&&at<s||K>c&&at>c)return null;const{hmin:nt,hmax:ot,vmin:pt,vmax:At}=t.coord2pos(u==null?{ymin:y,ymax:x,xmin:O,xmax:N}:{xmin:f,xmax:h,ymin:O,ymax:N}),{h:Ct,v:It}=t.coord2pos(u==null?{y:m,x:$}:{x:u,y:$}),{h:jt,v:$t}=t.coord2pos(u==null?{y:m,x:I}:{x:u,y:I}),{h:Wt,v:Gt}=t.coord2pos(u==null?{y,x:j}:{x:f,y:j}),{h:A,v:C}=t.coord2pos(u==null?{y:x,x:j}:{x:h,y:j}),{h:E,v:g}=t.coord2pos(u==null?{y:y*.25+x*.75,x:I}:{x:f*.25+h*.75,y:I}),{h:v,v:M}=t.coord2pos(u==null?{y:y*.75+x*.25,x:I}:{x:f*.75+h*.25,y:I}),{h:T,v:W}=t.coord2pos(u==null?{y:y*.25+x*.75,x:$}:{x:f*.25+h*.75,y:$}),{h:q,v:Z}=t.coord2pos(u==null?{y:y*.75+x*.25,x:$}:{x:f*.75+h*.25,y:$});let tt={rect:{x:(nt+ot)/2,width:ot-nt,y:(pt+At)/2,height:At-pt,fill:w,color:S,linetype:X,linewidth:k,alpha:L,translateX:H,translateY:z},line:{x1:Ct,y1:It,x2:jt,y2:$t,color:S,linetype:X,linewidth:k,alpha:L,translateX:H,translateY:z},midline:{x1:Wt,y1:Gt,x2:A,y2:C,color:S,linetype:X,linewidth:(k??1)*2,alpha:L,translateX:H,translateY:z},uwisker:{x1:E,y1:g,x2:v,y2:M,color:S,linetype:X,linewidth:k,alpha:L,translateX:H,translateY:z},lwisker:{x1:T,y1:W,x2:q,y2:Z,color:S,linetype:X,linewidth:k,alpha:L,translateX:H,translateY:z},outliers:B?.map(({x:mt,y:dt,$raw:ct})=>{const{h:rt,v:G}=t.coord2pos({x:mt,y:dt});let J={x:rt,y:G,shape:"circle",size:4,color:S,alpha:L,translateX:H,translateY:z},U=Object.fromEntries(n.map(lt=>[lt,vt=>i(lt,vt,ct)]));return[J,U]})},it=Object.fromEntries(n.map(mt=>[mt,dt=>i(mt,Object.assign(dt,{_vhandled:!0}),t.getCoord(dt),R)]));return[tt,it]}).filter(u=>u!=null))});return(l,o)=>(V(),D("g",null,[(V(!0),D(ut,null,ht(r.value,s=>(V(),D("g",null,[(V(!0),D(ut,null,ht(s,([c,a])=>(V(),D("g",null,[le(Re,_({ref_for:!0},c.line),null,16),o[0]||(o[0]=gt()),le(_n,_({ref_for:!0},c.rect,qt(a)),null,16),o[1]||(o[1]=gt()),le(Re,_({ref_for:!0},c.midline),null,16),o[2]||(o[2]=gt()),le(Re,_({ref_for:!0},c.uwisker),null,16),o[3]||(o[3]=gt()),le(Re,_({ref_for:!0},c.lwisker),null,16),o[4]||(o[4]=gt()),(V(!0),D(ut,null,ht(c.outliers,([u,f])=>(V(),kt(zi,_({ref_for:!0},u,qt(f)),null,16))),256))]))),256))]))),256))]))}},ha={__name:"CoreCurve",props:{points:{type:Array,default:()=>[]},interpolate:{default:"natural"},fill:{type:String,default:"none"},color:String,stroke:String,linewidth:Number,linetype:String,alpha:{type:Number,default:1},translateX:{type:Number,default:0},translateY:{type:Number,default:0}},setup(t){const e=Y(()=>{let r=n[t.interpolate]??Rn;return{d:jf().curve(r)(t.points.map(l=>[l.x,l.y])),fill:t.fill||null,stroke:t.color||null,"stroke-width":t.linewidth,"stroke-opacity":t.alpha==1?null:t.alpha,"stroke-dasharray":i(t.linetype),transform:t.translateX||t.translateY?`translate(${t.translateX}, ${t.translateY})`:null}}),n={cardinal:ra,catmullRom:aa,linear:Ri,natural:Rn};function i(r){return r==null?null:Array.isArray(r)?r.join(" "):r==="solid"?null:r==="dashed"?"4 4":r==="dotted"?"1 3":r==="dotdash"?"1 3 4 3":r==="longdash"?"8 4":r==="twodash"?"2 2 6 2":r.includes(" ")?r:r.split("").map(l=>+("0x"+l)).join(" ")}return(r,l)=>(V(),D("path",ge(un(e.value)),null,16))}},wh={__name:"CoreSvgCurve",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"],setup(t,{emit:e}){let n=["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"];const i=e,r=Y(()=>{let l=-t.layout.fullWidth*t.extendX-t.layout.l,o=t.layout.fullWidth*(1+t.extendX)-t.layout.l,s=-t.layout.fullHeight*t.extendY-t.layout.t,c=t.layout.fullHeight*(1+t.extendY)-t.layout.t;return t.data.map(a=>a.map(({points:u,fill:f="none",color:h="black",linewidth:m,linetype:y,alpha:x,"translate-x":$=0,"translate-y":O=0,$raw:j,interpolate:N})=>{if(u=u.map(P=>(({h:b,v:d})=>({x:b,y:d}))(t.coord2pos(P))),u.every(P=>P.x<l)||u.every(P=>P.x>o)||u.every(P=>P.y<s)||u.every(P=>P.y>c))return null;let I={points:u,fill:f,color:h,linetype:y,linewidth:m,alpha:x,translateX:$,translateY:O,interpolate:N},B=Object.fromEntries(n.map(P=>[P,b=>i(P,Object.assign(b,{_vhandled:!0}),t.getCoord(b),j)]));return[I,B]}).filter(u=>u!=null))});return(l,o)=>(V(),D("g",null,[(V(!0),D(ut,null,ht(r.value,s=>(V(),D("g",null,[(V(!0),D(ut,null,ht(s,([c,a])=>(V(),kt(ha,_({ref_for:!0},c,qt(a)),null,16))),256))]))),256))]))}},il={__name:"CoreSvgLine",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"],setup(t,{emit:e}){let n=["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"];const i=e,r=Y(()=>{let l=-t.layout.fullWidth*t.extendX-t.layout.l,o=t.layout.fullWidth*(1+t.extendX)-t.layout.l,s=-t.layout.fullHeight*t.extendY-t.layout.t,c=t.layout.fullHeight*(1+t.extendY)-t.layout.t;return t.data.map(a=>a.map(({x:u,y:f,xend:h,yend:m,color:y="black",linewidth:x,linetype:$,alpha:O,"translate-x":j=0,"translate-y":N=0,$raw:I})=>{const{h:B,v:P}=t.coord2pos({x:u,y:f}),{h:b,v:d}=t.coord2pos({x:h,y:m});if(B<l&&b<l||B>o&&b>o||P<s&&d<s||P>c&&d>c)return null;let p={x1:B,x2:b,y1:P,y2:d,color:y,linetype:$,linewidth:x,alpha:O,translateX:j,translateY:N},w=Object.fromEntries(n.map(S=>[S,k=>i(S,Object.assign(k,{_vhandled:!0}),t.getCoord(k),I)]));return[p,w]}).filter(u=>u!=null))});return(l,o)=>(V(),D("g",null,[(V(!0),D(ut,null,ht(r.value,s=>(V(),D("g",null,[(V(!0),D(ut,null,ht(s,([c,a])=>(V(),kt(Re,_({ref_for:!0},c,qt(a)),null,16))),256))]))),256))]))}},bh={__name:"CoreSvgPoint",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"],setup(t,{emit:e}){let n=["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"];const i=e,r=Y(()=>{let l=-t.layout.fullWidth*t.extendX-t.layout.l,o=t.layout.fullWidth*(1+t.extendX)-t.layout.l,s=-t.layout.fullHeight*t.extendY-t.layout.t,c=t.layout.fullHeight*(1+t.extendY)-t.layout.t;return t.data.map(a=>a.map(({x:u,y:f,shape:h,size:m=6,color:y,stroke:x,linetype:$,linewidth:O,alpha:j,"translate-x":N=0,"translate-y":I=0,angle:B,$raw:P})=>{const{h:b,v:d}=t.coord2pos({x:u,y:f});if(b<l||b>o||d<s||d>c)return null;let p={x:b,y:d,shape:h,size:m,color:y,stroke:x,linetype:$,linewidth:O,alpha:j,angle:B,translateX:N,translateY:I},w=Object.fromEntries(n.map(S=>[S,k=>i(S,Object.assign(k,{_vhandled:!0}),t.getCoord(k),P)]));return[p,w]}).filter(u=>u!=null))});return(l,o)=>(V(),D("g",null,[(V(!0),D(ut,null,ht(r.value,s=>(V(),D("g",null,[(V(!0),D(ut,null,ht(s,([c,a])=>(V(),kt(zi,_({ref_for:!0},c,qt(a)),null,16))),256))]))),256))]))}},ma={__name:"CorePolygon",props:{points:{type:Array,default:()=>[]},fill:String,color:String,linewidth:Number,linetype:String,alpha:{type:Number,default:1},translateX:{type:Number,default:0},translateY:{type:Number,default:0}},setup(t){const e=Y(()=>({points:t.points.map(i=>`${i.x},${i.y}`).join(" "),fill:t.fill||null,"fill-opacity":t.alpha==1?null:t.alpha,stroke:t.color||null,"stroke-width":t.linewidth,"stroke-opacity":t.alpha==1?null:t.alpha,"stroke-dasharray":n(t.linetype),transform:t.translateX||t.translateY?`translate(${t.translateX}, ${t.translateY})`:null}));function n(i){return i==null?null:Array.isArray(i)?i.join(" "):i==="solid"?null:i==="dashed"?"4 4":i==="dotted"?"1 3":i==="dotdash"?"1 3 4 3":i==="longdash"?"8 4":i==="twodash"?"2 2 6 2":i.includes(" ")?i:i.split("").map(r=>+("0x"+r)).join(" ")}return(i,r)=>(V(),D("polygon",ge(un(e.value)),null,16))}},kh={__name:"CoreSvgPolygon",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"],setup(t,{emit:e}){let n=["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"];const i=e,r=Y(()=>{let l=-t.layout.fullWidth*t.extendX-t.layout.l,o=t.layout.fullWidth*(1+t.extendX)-t.layout.l,s=-t.layout.fullHeight*t.extendY-t.layout.t,c=t.layout.fullHeight*(1+t.extendY)-t.layout.t;return t.data.map(a=>a.map(({points:u,fill:f,color:h,linewidth:m,linetype:y,alpha:x,"translate-x":$=0,"translate-y":O=0,$raw:j})=>{if(u=u.map(B=>(({h:P,v:b})=>({x:P,y:b}))(t.coord2pos(B))),u.every(B=>B.x<l)||u.every(B=>B.x>o)||u.every(B=>B.y<s)||u.every(B=>B.y>c))return null;let N={points:u,fill:f,color:h,linewidth:m,linetype:y,alpha:x,translateX:$,translateY:O},I=Object.fromEntries(n.map(B=>[B,P=>i(B,Object.assign(P,{_vhandled:!0}),t.getCoord(P),j)]));return[N,I]}).filter(u=>u!=null))});return(l,o)=>(V(),D("g",null,[(V(!0),D(ut,null,ht(r.value,s=>(V(),D("g",null,[(V(!0),D(ut,null,ht(s,([c,a])=>(V(),kt(ma,_({ref_for:!0},c,qt(a)),null,16))),256))]))),256))]))}},rl={__name:"CoreSvgRect",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"],setup(t,{emit:e}){let n=["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"];const i=e,r=Y(()=>{let l=-t.layout.fullWidth*t.extendX-t.layout.l,o=t.layout.fullWidth*(1+t.extendX)-t.layout.l,s=-t.layout.fullHeight*t.extendY-t.layout.t,c=t.layout.fullHeight*(1+t.extendY)-t.layout.t;return t.data.map(a=>a.map(({xmin:u,xmax:f,ymin:h,ymax:m,fill:y="black",color:x,linewidth:$,linetype:O,alpha:j,"translate-x":N=0,"translate-y":I=0,$raw:B})=>{const{hmin:P,hmax:b,vmin:d,vmax:p}=t.coord2pos({xmin:u,xmax:f,ymin:h,ymax:m});if(P<l&&b<l||P>o&&b>o||d<s&&p<s||d>c&&p>c)return null;let w={x:(P+b)/2,width:b-P,y:(d+p)/2,height:p-d,fill:y,color:x,linetype:O,linewidth:$,alpha:j,translateX:N,translateY:I},S=Object.fromEntries(n.map(k=>[k,X=>i(k,Object.assign(X,{_vhandled:!0}),t.getCoord(X),B)]));return[w,S]}).filter(u=>u!=null))});return(l,o)=>(V(),D("g",null,[(V(!0),D(ut,null,ht(r.value,s=>(V(),D("g",null,[(V(!0),D(ut,null,ht(s,([c,a])=>(V(),kt(_n,_({ref_for:!0},c,qt(a)),null,16))),256))]))),256))]))}},Ah={__name:"CoreSvgText",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"],setup(t,{emit:e}){let n=["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"];const i=e,r=Y(()=>{let l=-t.layout.fullWidth*t.extendX-t.layout.l,o=t.layout.fullWidth*(1+t.extendX)-t.layout.l,s=-t.layout.fullHeight*t.extendY-t.layout.t,c=t.layout.fullHeight*(1+t.extendY)-t.layout.t;return t.data.map(a=>a.map(({x:u,y:f,size:h=4,label:m,title:y,color:x,stroke:$,linewidth:O,linetype:j,alpha:N,"anchor-x":I,"anchor-y":B,"dock-x":P,"dock-y":b,"translate-x":d=0,"translate-y":p=0,angle:w,"text-length":S,$raw:k})=>{if(m==null)return null;const{h:X,v:L}=t.coord2pos({x:u,y:f});if(X<l||X>o||L<s||L>c)return null;if(typeof S=="object"){let{x:R=0,y:F=0}=S,{h:Q,v:K}=t.coord2pos({x:u+R/2,y:f+F/2}),{h:at,v:nt}=t.coord2pos({x:u-R/2,y:f-F/2});S=Math.hypot(Q-at||0,K-nt||0)}let H={x:X,y:L,text:String(m),title:String(y??m),size:h,color:x,stroke:$,linetype:j,linewidth:O,alpha:N,angle:w,translateX:d,translateY:p,anchorX:I,anchorY:B,dockX:P,dockY:b,textLength:S},z=Object.fromEntries(n.map(R=>[R,F=>i(R,Object.assign(F,{_vhandled:!0}),t.getCoord(F),k)]));return[H,z]}).filter(u=>u!=null))});return(l,o)=>(V(),D("g",null,[(V(!0),D(ut,null,ht(r.value,s=>(V(),D("g",null,[(V(!0),D(ut,null,ht(s,([c,a])=>(V(),kt(Qe,_({ref_for:!0},c,qt(a)),null,16))),256))]))),256))]))}},$h={__name:"CoreSvgTextsegment",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"],setup(t,{emit:e}){let n=["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"];const i=e,r=Y(()=>{let o=-t.layout.fullWidth*t.extendX-t.layout.l,s=t.layout.fullWidth*(1+t.extendX)-t.layout.l,c=-t.layout.fullHeight*t.extendY-t.layout.t,a=t.layout.fullHeight*(1+t.extendY)-t.layout.t;return t.data.map(u=>u.map(({x:f,xend:h,y:m,yend:y,size:x=4,label:$,title:O,color:j,stroke:N,linewidth:I,linetype:B,alpha:P,"translate-x":b=0,"translate-y":d=0,"text-length":p,$raw:w})=>{if($==null)return null;const{h:S,v:k}=t.coord2pos({x:f,y:m}),{h:X,v:L}=t.coord2pos({x:h,y});if(S<o&&X<o||S>s&&X>s||k<c&&L<c||k>a&&L>a)return null;let H=l(String($)),z=(h-f)/(H.length-1||1),R=(y-m)/(H.length-1||1),F=H.map((at,nt)=>{let ot=f+nt*z,pt=m+nt*R;const{h:At,v:Ct}=t.coord2pos({x:ot,y:pt});if(typeof p=="object"){let{x:jt=0,y:$t=0}=p,{h:Wt,v:Gt}=t.coord2pos({x:ot+jt/2,y:pt+$t/2}),{h:A,v:C}=t.coord2pos({x:ot-jt/2,y:pt-$t/2});p=Math.hypot(Wt-A||0,Gt-C||0)}return[{x:At,y:Ct,"text-anchor":"middle","alignment-baseline":"central",textLength:p,lengthAdjust:p?"spacingAndGlyphs":null},at]}),Q={fill:j,"font-size":x*4,stroke:N,"stroke-width":I,"stroke-dasharray":B,"fill-opacity":P,"stroke-opacity":P,transform:b||d?`translate(${b}, ${d})`:null},K=Object.fromEntries(n.map(at=>[at,nt=>i(at,Object.assign(nt,{_vhandled:!0}),t.getCoord(nt),w)]));return[Q,K,F,String(O??$)]}).filter(f=>f!=null))});function l(o){let s=[];for(let c=0;c<o.length;c++)if(o[c]==""){let a=c+1;for(;a<o.length&&o[a]!="";)a++;s.push(o.slice(c+1,a)),c=a}else s.push(o[c]);return s}return(o,s)=>(V(),D("g",null,[(V(!0),D(ut,null,ht(r.value,c=>(V(),D("g",null,[(V(!0),D(ut,null,ht(c,([a,u,f,h])=>(V(),D("text",_({ref_for:!0},a,qt(u,!0)),[wt("title",null,Oe(h),1),s[0]||(s[0]=gt()),(V(!0),D(ut,null,ht(f,([m,y])=>(V(),D(ut,null,[y?(V(),D("tspan",_({key:0,ref_for:!0},m),Oe(y),17)):Ft("",!0)],64))),256))],16))),256))]))),256))]))}},Mh=Object.freeze(Object.defineProperty({__proto__:null,blank:vh,boxplot:ph,curve:wh,line:il,point:bh,polygon:kh,rect:rl,stick:il,text:Ah,textsegment:$h,tile:rl},Symbol.toStringTag,{value:"Module"})),Sh={__name:"CoreLayer",props:{data:Object,geom:String,render:String,defaultRender:{type:String,default:"auto"}},setup(t,{expose:e}){const n={svg:Mh,canvas:xh},i=Y(()=>{let o=t.render??t.defaultRender;return o=="auto"?t.data.map(c=>c.length).reduce((c,a)=>c+a,0)>1e3?"canvas":"svg":n[o][t.geom]!=null?o:"svg"}),r=Vt("layer"),l=Y(()=>i.value=="canvas"?"pointer-events: none;":"");return e({render:i,dispatchEvent:o=>r.value?.dispatchEvent?.(o)}),(o,s)=>(V(),kt(qe(n[i.value][t.geom]),{ref_key:"layer",ref:r,style:sn(l.value),data:t.data},null,8,["style","data"]))}},Nh={key:0},Th=["onPointerdown"],ll={__name:"CoreSelection",props:We({coord2pos:Function,pos2coord:Function,layout:Object,theme:Object,flip:Boolean,move:Boolean,resize:Boolean,dismissible:Boolean,xmin:Number,xmax:Number,ymin:Number,ymax:Number,x:Boolean,y:Boolean,minRangeX:Number,minRangeY:Number,ctrlKey:Boolean,shiftKey:Boolean,altKey:Boolean,metaKey:Boolean,buttons:Number,activeTransform:Object,transition:String},{modelValue:{default:()=>({})},modelModifiers:{}}),emits:We(["select","selecting","selectend","click","contextmenu"],["update:modelValue"]),setup(t,{emit:e}){const n=me(t,"modelValue"),i=sl(t,["coord2pos","pos2coord","layout","theme","flip","activeTransform","transition"]),r=Y(()=>{if(n.value==null||n.value.hidden||["xmin","xmax","ymin","ymax"].every($=>n.value?.[$]==null))return null;let{hmin:f,hmax:h,vmin:m,vmax:y}=t.coord2pos(n.value,{limited:!0}),x=t.coord2pos(n.value);return f!=null&&h!=null&&([f,h]=[f,h].sort(($,O)=>$-O)),m!=null&&y!=null&&([m,y]=[m,y].sort(($,O)=>$-O)),{hmin:f,hmax:h,vmin:m,vmax:y,pos:x}}),l=Y(()=>{if(!r.value)return null;let{translateH:f,translateV:h,scaleH:m,scaleV:y}=t.activeTransform,{hmin:x,hmax:$,vmin:O,vmax:j,pos:N}=r.value,I=$-x,B=j-O,P=t.layout.left,b=t.layout.top,d=1,p=1;if(N.hmin!=null&&N.hmax!=null)P+=f,d=m;else if(N.hmin!=null){let S=f+x*(m-1);d=1-S/I,P+=S*(1+x/I)}else if(N.hmax!=null){let S=f+$*(m-1);d=1+S/I,P+=S*(1-$/I)}if(N.vmin!=null&&N.vmax!=null)b+=t.activeTransform.translateV,p=t.activeTransform.scaleV;else if(N.vmin!=null){let S=h+O*(y-1);p=1-S/B,b+=S*(1+O/B)}else if(N.vmax!=null){let S=h+j*(y-1);p=1+S/B,b+=S*(1-j/B)}let w=[];return(P!=0||b!=0)&&w.push(`translate(${P}, ${b})`),(d!=1||p!=1)&&w.push(`scale(${d}, ${p})`),w.join(" ")||null}),o=Y(()=>t.activeTransform.translateH!=0||t.activeTransform.translateV!=0||t.activeTransform.scaleH!=1||t.activeTransform.scaleV!=1),s=Y(()=>{if(!r.value)return null;let{hmin:f,hmax:h,vmin:m,vmax:y,pos:x}=r.value,$=t.theme?.line_width??1;x.hmin==null&&(f-=$/2),x.hmax==null&&(h+=$/2),x.vmin==null&&(m-=$/2),x.vmax==null&&(y+=$/2);let O=h-f,j=y-m;return{x:f,y:m,width:O,height:j,fill:t.theme?.background??"transparent","fill-opacity":t.theme?.opacity,stroke:t.theme?.line_color??"none","stroke-width":t.theme?.line_width,"stroke-opacity":t.theme?.opacity,transform:l.value,style:{transition:t.transition,"pointer-events":"none"}}}),c=Y(()=>{if(!r.value||o.value)return null;let f=10,{hmin:h,hmax:m,vmin:y,vmax:x,pos:$}=r.value,O=m-h,j=x-y,N={};i.move&&(N.tblr={x:h,y,width:O,height:j,fill:"transparent",style:"cursor:move;"}),i.resize&&($.hmin!=null&&(N.l={x:h-f/2,y,width:f,height:j,style:"cursor:ew-resize;",class:"vvplot-interactive"}),$.hmax!=null&&(N.r={x:m-f/2,y,width:f,height:j,style:"cursor:ew-resize;"}),$.vmin!=null&&(N.t={x:h,y:y-f/2,width:O,height:f,style:"cursor:ns-resize;"}),$.vmax!=null&&(N.b={x:h,y:x-f/2,width:O,height:f,style:"cursor:ns-resize;"}),$.hmin!=null&&$.vmin!=null&&(N.tl={x:h-f/2,y:y-f/2,width:f,height:f,style:"cursor:nwse-resize;"}),$.hmax!=null&&$.vmin!=null&&(N.tr={x:m-f/2,y:y-f/2,width:f,height:f,style:"cursor:nesw-resize;"}),$.hmin!=null&&$.vmax!=null&&(N.bl={x:h-f/2,y:x-f/2,width:f,height:f,style:"cursor:nesw-resize;"}),$.hmax!=null&&$.vmax!=null&&(N.br={x:m-f/2,y:x-f/2,width:f,height:f,style:"cursor:nwse-resize;"}));let I=t.layout.left,B=t.layout.top;if(I||B)for(let P in N)N[P].transform=`translate(${I}, ${B})`;return N}),a=e;function u(f,h){if(!h||!["buttons","ctrlKey","shiftKey","altKey","metaKey"].every(K=>i[K]==f[K]))return;f.stopPropagation(),f.preventDefault(),f.target.setPointerCapture(f.pointerId);let m=t.coord2pos(n.value),{h:y,v:x}=t.pos2coord({h:m.hmin,v:m.vmin}),{h:$,v:O}=t.pos2coord({h:m.hmax,v:m.vmax}),{hmin:j,hmax:N,vmin:I,vmax:B}=m,P=!1,b={min:i.xmin,max:i.xmax},d={min:i.ymin,max:i.ymax},[p=0,w=0]=t.flip?[i.minRangeY,i.minRangeX]:[i.minRangeX,i.minRangeY],S=t.coord2pos(i),k=0,X=0,L,H,z,R,F=!1,Q=!1;f.target.onpointermove=K=>{if(P=!0,k+=K.movementX,X+=K.movementY,h.includes("l")&&h.includes("r")){let at=yt(k,{min:S.hmin-j,max:S.hmax-N}),nt=t.pos2coord({hmin:st(j,at),hmax:st(N,at)});y=nt.hmin,$=nt.hmax}else h.includes("l")?(y=t.pos2coord({h:j+k}).h,y=yt(y,y>$?{min:st($,p)}:{max:st($,-p)}),F=j+k>N):h.includes("r")&&($=t.pos2coord({h:N+k}).h,$=yt($,$>y?{min:st(y,p)}:{max:st(y,-p)}),F=N+k<j);if(h.includes("t")&&h.includes("b")){let at=yt(X,{min:S.vmin-I,max:S.vmax-B}),nt=t.pos2coord({vmin:st(I,at),vmax:st(B,at)});x=nt.vmin,O=nt.vmax}else h.includes("t")?(x=t.pos2coord({v:I+X}).v,x=yt(x,x>O?{min:st(O,w)}:{max:st(O,-w)}),Q=I+X>B):h.includes("b")&&(O=t.pos2coord({v:B+X}).v,O=yt(O,O>x?{min:st(x,w)}:{max:st(x,-w)}),Q=B+X<I);L=yt(t.flip?x:y,b),H=yt(t.flip?O:$,b),z=yt(t.flip?y:x,d),R=yt(t.flip?$:O,d),L>H&&([L,H]=[H,L]),z>R&&([z,R]=[R,z]),a("selecting",{xmin:L,xmax:H,ymin:z,ymax:R},t.theme)},f.target.onpointerup=K=>{if(K.currentTarget.onpointerup=null,K.currentTarget.onpointermove=null,i.buttons&1&&(K.currentTarget.onclick=ot=>{ot.currentTarget.onclick=null,a("click",ot)}),i.buttons&2&&(K.currentTarget.oncontextmenu=ot=>{ot.currentTarget.onclick=null,a("contextmenu",ot)}),!P)return;let at={xmin:L,xmax:H,xreverse:!!(F^n.value.xreverse),ymin:z,ymax:R,yreverse:!!(Q^n.value.yreverse)},nt=new PointerEvent("select",f);n.value=Lt(at),a("selectend"),a("select",Lt(at),nt)}}return(f,h)=>s.value?(V(),D("g",Nh,[wt("rect",ge(un(s.value)),null,16),h[0]||(h[0]=gt()),(V(!0),D(ut,null,ht(c.value,(m,y)=>(V(),D("rect",_({fill:"transparent"},{ref_for:!0},m,{onPointerdown:x=>u(x,y),class:"vvplot-interactive"}),null,16,Th))),256))])):Ft("",!0)}},Ch=["height","width"],Oh=["y1","y2"],Eh=["y"],jh={__name:"CoreGuideGradientbar",props:{scales:Array,appearance:{type:Object,default:()=>({})},theme:{type:Object,default:()=>({})},breaks:Array,limits:Object},setup(t){const e=Y(()=>{let{min:l,max:o}=t.limits;return t.breaks.map(s=>({position:(s-l)/(o-l),label:String(s)}))}),n=Y(()=>{let l=30,{min:o,max:s}=t.limits,c=(s-o)/(l-1),a=Array.from({length:l},(f,h)=>o+h*c),u=t.scales.map(f=>f(a));return a.map((f,h)=>Object.fromEntries(t.scales.map((m,y)=>[{color:"fill"}[m.aesthetics]??m.aesthetics,u[y][h]])))}),i=Sn(0),r=Vt("svg");return St(e,async()=>{await Ei();let l=r.value?.getBBox?.();l&&(i.value=l.width+l.x)},{immediate:!0}),(l,o)=>(V(),D("svg",{height:n.value.length*3+20,width:i.value,ref:"svg"},[(V(!0),D(ut,null,ht(n.value,(s,c)=>(V(),kt(_n,_({width:10,height:3.1,x:10,y:10+(29-c+.5)*3,alpha:t.appearance.alpha},{ref_for:!0},s),null,16,["y","alpha"]))),256)),o[1]||(o[1]=gt()),(V(!0),D(ut,null,ht(e.value,(s,c)=>(V(),D("g",null,[wt("line",{x1:"15",x2:"18",y1:10+(1-s.position)*90,y2:10+(1-s.position)*90,stroke:"black"},null,8,Oh),o[0]||(o[0]=gt()),wt("text",{x:"20",y:10+(1-s.position)*90,"alignment-baseline":"central"},Oe(s.label),9,Eh)]))),256))],8,Ch))}},Ph=Object.freeze(Object.defineProperty({__proto__:null,curve:ha,line:Re,point:zi,polygon:ma,text:Qe,tile:_n},Symbol.toStringTag,{value:"Module"})),Vh=["height","width"],Ih=["transform"],Bh={transform:"translate(10, 10)"},Lh={x:"20",y:"10","alignment-baseline":"central"},Xh={__name:"CoreGuideLegendkey",props:{scales:Array,appearances:{type:Object,default:()=>({})},theme:{type:Object,default:()=>({})},breaks:Array},setup(t){const e=Y(()=>{let l=t.scales.map(a=>a(t.breaks)),o=t.breaks.map((a,u)=>({bind:Object.fromEntries(t.scales.map((f,h)=>[f.aesthetics,l[h][u]])),label:String(a)})),s=ao(o.map(a=>a.bind)),c=Map.groupBy(o.map(a=>a.label),(a,u)=>s.categories[s[u]]);return Array.from(c).map(([a,u])=>({bind:a,label:u.join("; ")}))}),n=Y(()=>{let{text:l,line:o,point:s,tile:c}=t.appearances,a={};return l!=null&&(a.text={size:4,text:"a",...l}),o!=null&&(a.line={x1:-5,x2:5,color:"black",...o}),s!=null&&(a.point={size:6,...s}),c!=null&&(a.tile={width:10,height:10,fill:"transparent",...c}),a}),i=Sn(0),r=Vt("svg");return St(e,async()=>{await Ei();let l=r.value?.getBBox?.();l&&(i.value=l.width+l.x)},{immediate:!0}),(l,o)=>(V(),D("svg",{height:e.value.length*20,width:i.value,ref:"svg"},[(V(!0),D(ut,null,ht(e.value,(s,c)=>(V(),D("g",{transform:`translate(0, ${c*20})`},[wt("g",Bh,[(V(!0),D(ut,null,ht(n.value,(a,u)=>(V(),kt(qe(Ph[u]),_({ref_for:!0},{...a,...s.bind}),null,16))),256))]),o[0]||(o[0]=gt()),wt("text",Lh,Oe(s.label),1)],8,Ih))),256))],8,Vh))}},Yh=Object.assign({inheritAttrs:!1},{__name:"CoreGuide",props:{scales:Array,type:{type:String,default:"legendkey"}},setup(t){const e={legendkey:Xh,gradientbar:jh},n=Y(()=>t.scales.map(([l])=>l.title).find(l=>l!=null)),i=Y(()=>{let l=t.scales.map(([s])=>s),o=l.find(s=>s.breaks!=null);return Array.isArray(o?.breaks)?Array.from(o.breaks):(o=l.find(s=>s.level!=null),o?.level?o.level.apply(Array.from(o.level)):(o=l.find(s=>s.limits!=null),Zn.number({minor:!0})(o.limits)))}),r=Y(()=>{let l={scales:t.scales.map(([o])=>o)};if(t.type=="legendkey")l.appearances={text:Nt(...t.scales.flatMap(([o,s])=>[s.text])),line:Nt(...t.scales.flatMap(([o,s])=>[s.line,s.linerange,s.curve])),point:Nt(...t.scales.flatMap(([o,s])=>[s.point])),tile:Nt(...t.scales.flatMap(([o,s])=>[s.rect,s.tile,s.polygon]))};else if(t.type=="gradientbar"){let o=t.scales.map(([c])=>c.limits?.max).filter(c=>c!=null).reduce((c,a)=>Math.min(c,a),1/0),s=t.scales.map(([c])=>c.limits?.min).filter(c=>c!=null).reduce((c,a)=>Math.max(c,a),-1/0);l.limits={min:s,max:o},l.appearance=Nt(...t.scales.flatMap(([c,a])=>Object.values(a)))}return l});return(l,o)=>(V(),D(ut,null,[wt("span",null,Oe(n.value),1),o[0]||(o[0]=gt()),(V(),kt(qe(e[t.type]),_(r.value,{breaks:i.value}),null,16,["breaks"]))],64))}}),Dh={__name:"CoreLegend",props:{theme:{type:Object,default:()=>({})},scales:Map},setup(t){const e=Y(()=>{let i=new Map(Array.from(t.scales).filter(([a])=>a.legend!==!1)),r=Array.from(i.keys()),l=r.map(a=>a.key),o=1;for(let a in l){for(;l.includes("_guide_"+o);)o++;l[a]==null&&(l[a]="_guide_"+o)}let s=r.map(a=>n(a)),c=oo(l,s);return Map.groupBy(i,(a,u)=>c.categories[c[u]])});function n(i){return i==null?null:["gradientbar","legendkey"].includes(i.guide)?i.guide:i.level?"legendkey":["color","fill","alpha"].includes(i.aesthetics)?"gradientbar":"legendkey"}return(i,r)=>t.scales?(V(),D("div",{key:0,class:"vvplot-legend",style:sn({gap:t.theme.spacing+"px"})},[(V(!0),D(ut,null,ht(e.value,([[l,o],s])=>(V(),kt(Yh,{key:l,type:o,scales:s},null,8,["type","scales"]))),128))],4)):Ft("",!0)}},Rh=["id"],Hh=["width","height"],zh=["transform","width","height","fill"],Fh=["transform"],qh=["transform","clip-path"],Wh=["transform"],Gh=["clip-path"],Uh={key:1},Kh=Object.assign({inheritAttrs:!1},{__name:"CorePlot",props:We({schema:Object,layers:Array,minRange:Object,expandAdd:Object,flip:Boolean,reverse:Object,paddings:Object,expandMult:Object,coordLevels:Object,levels:Object,scales:Object,axes:{type:Array,default:()=>[]},theme:Object,render:String,clip:Boolean,action:{type:Array,default:()=>[]},selections:{type:Array,default:()=>[]},legendTeleport:null},{selectionPreview:{},selectionPreviewModifiers:{},selectionPreviewTheme:{},selectionPreviewThemeModifiers:{},transition:{},transitionModifiers:{}}),emits:We(["click","singleclick","dblclick","contextmenu","pointerdown","pointerup","pointerover","pointerout","pointerenter","pointerleave","pointermove","wheel","select","move","zoom","rescale","nudge"],["update:selectionPreview","update:selectionPreviewTheme","update:transition"]),setup(t,{expose:e,emit:n}){const i=Ma(),r=sl(t,["schema","theme","expandAdd","expandMult","coordLevels","levels","scales","flip","reverse","paddings"]),l=n,o=Mn("range"),s=Mn("rangePreview"),c=me(t,"selectionPreview"),a=me(t,"selectionPreviewTheme");function u(A,C){c.value=A,a.value=C}const f=Y(()=>Object.assign({},t.theme?.selection,a.value));function h(){c.value={}}const m=me(t,"transition"),y=Vt("svg"),x=Vt("layers"),$=Sn(0),O=Sn(0);ul(y,A=>{let{width:C,height:E}=A[0].contentRect;$.value=C,O.value=E});const j=Y(()=>new qf(t.schema,r.layers)),N=Y(()=>j.value.useScales(t.scales,t.levels).useCoordLevels(t.coordLevels).render(o,t.expandAdd,r.minRange)),I=we(()=>{let A=Object.fromEntries(["left","right","top","bottom"].map(M=>[M,t.paddings[M]&&t.theme.plot.padding[M]||0])),C=+t.theme.plot.margin.left+A.left,E=+t.theme.plot.margin.right+A.right,g=+t.theme.plot.margin.top+A.top,v=+t.theme.plot.margin.bottom+A.bottom;return g+v>O.value&&(g=O.value*(g/(g+v)),v=O.value-g),C+E>$.value&&(C=$.value*(C/(C+E)),E=$.value-C),{l:C,r:E,t:g,b:v,left:C,right:$.value-E,top:g,bottom:O.value-v,width:$.value-C-E,height:O.value-g-v}}),B=we(()=>{let A=N.value.coordScales,C=t.expandMult,{min:E,max:g}=S(A.x.range,C.x),{min:v,max:M}=S(A.y.range,C.y),[T,W,q,Z]=t.flip?[v,M,E,g]:[E,g,v,M],{width:tt,height:it}=I;return{left:tt*T||0,right:tt*(1-W)||0,top:it*Z||0,bottom:it*(1-q)||0,l:tt*T||0,r:tt*W||0,t:it*Z||0,b:it*q||0,width:tt*(1-T-W),height:it*(1-Z-q),fullWidth:tt,fullHeight:it}});e({vplot:N,panel:I,svg:y});const P=Y(()=>{let A=ot.value.translateH+B.left,C=ot.value.translateV+B.top,E=ot.value.scaleH,g=ot.value.scaleV,v=[];return(A!=0||C!=0)&&v.push(`translate(${A}, ${C})`),(E!=1||g!=1)&&v.push(`scale(${E}, ${g})`),{transform:v.join(" ")||null}});function b({value:A,min:C,max:E},g,v,M){let T={};return A!=null&&(T.value=g.invert(v?1-A/M:A/M)),v?(E!=null&&(T.min=g.invert(1-E/M)),C!=null&&(T.max=g.invert(1-C/M))):(C!=null&&(T.min=g.invert(C/M)),E!=null&&(T.max=g.invert(E/M))),T}function d({h:A,hmin:C,hmax:E,v:g,vmin:v,vmax:M}={}){let T=N.value.coordScales,{width:W,height:q}=B,Z={},[tt,it,mt]=t.flip?[g,v,M]:[A,C,E],[dt,ct,rt]=t.flip?[A,C,E]:[g,v,M];if(tt!=null||it!=null||mt!=null){let{value:G,min:J,max:U}=b({value:tt,min:it,max:mt},T.x,t.flip!=t.reverse.x,t.flip?q:W);Object.assign(Z,Lt({x:G,xmin:J,xmax:U})),t.flip?Object.assign(Z,Lt({v:G,vmin:J,vmax:U})):Object.assign(Z,Lt({h:G,hmin:J,hmax:U}))}if(dt!=null||ct!=null||rt!=null){let{value:G,min:J,max:U}=b({value:dt,min:ct,max:rt},T.y,t.flip==t.reverse.y,t.flip?W:q);Object.assign(Z,Lt({y:G,ymin:J,ymax:U})),t.flip?Object.assign(Z,Lt({h:G,hmin:J,hmax:U})):Object.assign(Z,Lt({v:G,vmin:J,vmax:U}))}return Z}function p({value:A,min:C,max:E}={},{oob:g=mi}={},v,M,T,W){let q={};return A!=null&&(q.value=T?g(T*(M?1-v(A):v(A)),W):0),C==null&&E==null||(M?(E!=null&&(q.min=T?g(T*(1-v(E)),W):0),C!=null&&(q.max=T?g(T*(1-v(C)),W):0)):(C!=null&&(q.min=T?g(T*v(C),W):0),E!=null&&(q.max=T?g(T*v(E),W):0))),q}function w({h:A,hmin:C,hmax:E,v:g,vmin:v,vmax:M,x:T,xmin:W,xmax:q,y:Z,ymin:tt,ymax:it}={},{limited:mt=!1,oob:dt=mi}={}){let{width:ct,height:rt,l:G,r:J,t:U,b:lt}=B,vt={},Qt=N.value.coordScales,Ht={min:-G,max:ct+J},ue={min:-U,max:rt+lt};if((T!=null||W!=null||q!=null)&&(t.flip?[g,v,M]=[T,W,q]:[A,C,E]=[T,W,q]),(Z!=null||tt!=null||it!=null)&&(t.flip?[A,C,E]=[Z,tt,it]:[g,v,M]=[Z,tt,it]),A!=null||C!=null||E!=null){let{value:ne,min:ie,max:re}=p({value:A,min:C,max:E},{oob:dt},Qt[t.flip?"y":"x"],t.reverse[t.flip?"y":"x"],ct,Ht);Object.assign(vt,Lt({h:ne,hmin:ie,hmax:re}))}if(g!=null||v!=null||M!=null){let{value:ne,min:ie,max:re}=p({value:g,min:v,max:M},{oob:dt},Qt[t.flip?"x":"y"],!t.reverse[t.flip?"x":"y"],rt,ue);Object.assign(vt,Lt({v:ne,vmin:ie,vmax:re}))}return mt&&(vt.hmin==null&&(vt.hmin=Ht.min),vt.hmax==null&&(vt.hmax=Ht.max),vt.vmin==null&&(vt.vmin=ue.min),vt.vmax==null&&(vt.vmax=ue.max)),vt}function S({min:A,max:C}={},{min:E=0,max:g=0}={}){let v=C-A,M=+A-E*v,T=+C+g*v,W=T-M;return{min:W==0?0:(A-M)/W,max:W==0?0:(T-C)/W}}function k(A){let C=y.value.getBoundingClientRect(),E=Math.trunc(A.clientX)-(C.left+I.left+B.left),g=Math.trunc(A.clientY)-(C.top+I.top+B.top),v=C.left+I.left+B.right-Math.trunc(A.clientX),M=C.top+I.top+B.bottom-Math.trunc(A.clientY),{x:T,y:W}=d({h:E,v:g});return{l:E,t:g,r:v,b:M,x:T,y:W}}function X(A){let C=y.value.getBoundingClientRect();return A.clientX>C.left+I.l&&A.clientX<C.right-I.r&&A.clientY>C.top+I.t&&A.clientY<C.bottom-I.b}function L(A){if(!x.value||A._vhandled||!X(A)||!Array.from(x.value).filter(v=>v.render=="canvas").length)return A;let E={};for(let v in A)E[v]=A[v];E.bubbles=!1;let g=new PointerEvent(A.type,E);for(let v of Object.keys(A)){let M=Object.getOwnPropertyDescriptor(g,v);M&&!M.writable&&!M.set||(g[v]=A[v])}for(let v=x.value.length-1;v>=0;v--)x.value[v].dispatchEvent(g)===!1&&A.preventDefault();for(let v of Object.keys(g)){let M=Object.getOwnPropertyDescriptor(g,v);M&&!M.writable&&!M.set||(A[v]=g[v])}return g._vhandled?g:A}let H,z=0,R=0;function F(A){let C=L(A),E=k(A);if(l("pointerdown",C,E),C.defaultPrevented&&A.preventDefault(),r.clip&&!X(A))return;let g=A.currentTarget,v=!1;function M(q){(Math.abs(q.screenX-A.screenX)>3||Math.abs(q.screenY-A.screenY)>3)&&(v=!0,q.currentTarget.removeEventListener("pointermove",M))}A.target.addEventListener("pointermove",M,{passive:!0}),A.target.addEventListener("pointerup",function(q){if(A.target.removeEventListener("pointermove",M),!v){let Z=new PointerEvent("singleclick",q);q.target.dispatchEvent(Z)}},{once:!0});let T=r.selections.findLast(q=>["buttons","ctrlKey","shiftKey","altKey","metaKey"].every(Z=>q[Z]==A[Z]));if(T){let{x:q=!1,y:Z=!1,"min-range-x":tt=0,"min-range-y":it=0}=T;A.target.setPointerCapture(A.pointerId),g.style.userSelect="none";let mt=(({xmin:ct,xmax:rt})=>({min:ct,max:rt}))(T),dt=(({ymin:ct,ymax:rt})=>({min:ct,max:rt}))(T);A.target.onpointermove=ct=>{if(!q&&!Z||!v)return;let rt=k(ct),G={};if(q){let J=yt(E.x,mt),U=yt(yt(rt.x,rt.x>J?{min:st(J,tt)}:{max:st(J,-tt)}),mt);G.xmin=J>U?U:J,G.xmax=J>U?J:U,G.xreverse=J>U}if(Z){let J=yt(E.y,dt),U=yt(yt(rt.y,rt.y>J?{min:st(J,it)}:{max:st(J,-it)}),dt);G.ymin=J>U?U:J,G.ymax=J>U?J:U}c.value=G,a.value=T.theme},A.target.onpointerup=ct=>{if(ct.currentTarget.onpointerup=null,ct.currentTarget.onpointermove=null,g.style.userSelect=null,c.value={},v&&(q||Z)){T.buttons&1&&(ct.currentTarget.onclick=U=>{U.currentTarget.onclick=null,Se(T.onClick,U)}),T.buttons&2&&(ct.currentTarget.oncontextmenu=U=>{U.currentTarget.oncontextmenu=null,Se(T.onContextmenu,U)});let rt=k(ct),G={},J=new PointerEvent("select",A);if(q){let U=yt(E.x,mt),lt=yt(yt(rt.x,rt.x>U?{min:st(U,tt)}:{max:st(U,-tt)}),mt);if(U==lt)return;G.xmin=U>lt?lt:U,G.xmax=U>lt?U:lt,G.xreverse=U>lt}if(Z){let U=yt(E.y,dt),lt=yt(yt(rt.y,rt.y>U?{min:st(U,it)}:{max:st(U,-it)}),dt);if(U==lt)return;G.ymin=U>lt?lt:U,G.ymax=U>lt?U:lt,G.yreverse=U>lt}T["onUpdate:modelValue"]?.(G),Se(T.onSelect,Lt(G),J)||l("select",Lt(G),J)}if(!v&&T.dismissible!==!1){if(ct.defaultPrevented)return;let rt=T.modelValue;if(T.dismissible!==!0&&["xmin","xmax","ymin","ymax"].every(U=>rt?.[U]==null))return;let G={},J=new PointerEvent("select",A);T["onUpdate:modelValue"]?.(G),Se(T.onDismiss,Lt(G),J)||l("select",Lt(G),J)}};return}let W=r.action.find(q=>q.action=="move"&&["buttons","ctrlKey","shiftKey","altKey","metaKey"].every(Z=>q[Z]==A[Z]));if(W){A.target.setPointerCapture(A.pointerId),g.style.userSelect="none",H=clearTimeout(H);let q=0,Z=B.width,tt=0,it=B.height,mt,dt,ct,rt,G=w(W);A.target.onpointermove=J=>{let{x:U=!1,y:lt=!1}=W,[vt,Qt]=t.flip?[lt,U]:[U,lt];if(vt){z+=J.movementX;let re=yt(-z,{min:G.hmin-q,max:G.hmax-Z});mt=q+re,dt=Z+re}if(Qt){R+=J.movementY;let re=yt(-R,{min:G.vmin-tt,max:G.vmax-it});ct=tt+re,rt=it+re}let{xmin:Ht,xmax:ue,ymin:ne,ymax:ie}=d({hmin:mt,hmax:dt,vmin:ct,vmax:rt});Object.assign(s,{xmin:Ht,xmax:ue,ymin:ne,ymax:ie})},A.target.onpointerup=J=>{J.currentTarget.onpointerup=null,J.currentTarget.onpointermove=null,g.style.userSelect=null,H=setTimeout(()=>{pt(W,J),z=R=0},300)};return}}let Q=0,K;function at(A){let C=L(A),E=k(A);if(l("wheel",C,E),C.defaultPrevented&&A.preventDefault(),r.clip&&!X(A))return;let g=r.action.find(v=>["zoom","nudge"].includes(v.action)&&["ctrlKey","shiftKey","altKey","metaKey"].every(M=>v[M]==A[M]));!g||!g.x&&!g.y||(K=clearTimeout(K),A.preventDefault(),m.value="transform 0.1s ease-out",Q+=A.deltaY,nt(g,E,Q),K=setTimeout(()=>{pt(g,A),Q=0},300))}function nt(A,C,E){if(A.action=="zoom"){let{x:g=!1,y:v=!1,"min-range-x":M=0,"min-range-y":T=0,sensitivity:W=1.25}=A,q=W**(Q/100),[Z,tt]=t.flip?[v,g]:[g,v],it=w(A),mt,dt,ct,rt;Z&&(mt=Math.max(C.l-Math.max(C.l,0)*q,it.hmin??-1/0),dt=Math.min(C.l+Math.max(C.r,0)*q,it.hmax??1/0)),tt&&(ct=Math.max(C.t-Math.max(C.t,0)*q,it.vmin??-1/0),rt=Math.min(C.t+Math.max(C.b,0)*q,it.vmax??1/0));let{xmin:G,xmax:J,ymin:U,ymax:lt}=d({hmin:mt,hmax:dt,vmin:ct,vmax:rt});if(g&&q<1&&J-G<M){let vt=(J+G)/2;G=vt-M/2,J=vt+M/2}if(v&&q<1&<-U<T){let vt=(lt+U)/2;U=vt-T/2,lt=vt+T/2}Object.assign(s,{xmin:G,xmax:J,ymin:U,ymax:lt})}if(A.action=="nudge"){let{x:g=!1,y:v=!1,sensitivity:M=.1}=A,[T,W]=t.flip?[v,g]:[g,v],q=w(A),Z=0,tt=B.width,it=0,mt=B.height,dt,ct,rt,G;if(T){let Qt=M*B.width*(-E/120),Ht=yt(-Qt,{min:q.hmin-Z,max:q.hmax-tt});dt=Z+Ht,ct=tt+Ht}if(W){let Qt=M*B.height*(-E/120),Ht=yt(-Qt,{min:q.vmin-it,max:q.vmax-mt});rt=it+Ht,G=mt+Ht}let{xmin:J,xmax:U,ymin:lt,ymax:vt}=d({hmin:dt,hmax:ct,vmin:rt,vmax:G});Object.assign(s,{xmin:J,xmax:U,ymin:lt,ymax:vt})}}const ot=Y(()=>{let A=0,C=B.width,E=0,g=B.height,{hmin:v=A,hmax:M=C,vmin:T=E,vmax:W=g}=w(s??{}),q=C-A,Z=M-v,tt=g-E,it=W-T;return{scaleH:q<1||Z<1||Math.abs(q-Z)<1?1:q/Z,translateH:(A*M-v*C)/(M-v)||0,scaleV:tt<1||it<1||Math.abs(tt-it)<1?1:tt/it,translateV:(E*W-T*g)/(W-T)||0}});St(ot,({translateH:A,translateV:C,scaleH:E,scaleV:g})=>{!A&&!C&&E==1&&g==1&&(m.value=null)},{deep:!0});function pt(A,C){let E=Lt(s)??{};if(!Object.keys(E).length)return;let g=new PointerEvent(C.type,C);Se(A.emit,E,g)||l(A.action,E,g),Ct(E),Object.assign(s,{xmin:void 0,xmax:void 0,ymin:void 0,ymax:void 0})}const At={pointerdown:F,pointerup(A){let C=L(A),E=k(A);l("pointerup",C,E),C.defaultPrevented&&A.preventDefault()},pointerover(A){l("pointerover",A,k(A))},pointerout(A){l("pointerout",A,k(A))},pointerenter(A){l("pointerenter",A,k(A))},pointerleave(A){l("pointerleave",A,k(A))},click(A){l("click",L(A),k(A))},contextmenu(A){let C=L(A),E=k(A);l("contextmenu",C,E),C.defaultPrevented&&A.preventDefault()},singleclick(A){l("singleclick",L(A),k(A))},dblclick(A){let C=L(A),E=k(A);l("dblclick",C,E),C.defaultPrevented&&A.preventDefault()},pointermove(A){let C=L(A),E=k(A);l("pointermove",C,E),C.defaultPrevented&&A.preventDefault()},wheel:at};function Ct(A){let{xmin:C,xmax:E,ymin:g,ymax:v}=A,{xmin:M,xmax:T,ymin:W,ymax:q}=o;C=C!=null?st(C,+t.expandAdd.x.min):M,E=E!=null?st(E,-t.expandAdd.x.max):T,g=g!=null?st(g,+t.expandAdd.y.min):W,v=v!=null?st(v,-t.expandAdd.y.max):q,!(C==M&&E==T&&g==W&&v==q)&&Object.assign(o,{xmin:C,xmax:E,ymin:g,ymax:v})}const It=we(()=>{let A=s?.xmin??o?.xmin,C=s?.xmax??o?.xmax,E=s?.ymin??o?.ymin,g=s?.ymax??o?.ymax;return{x:A||C?{min:A,max:C}:void 0,y:E||g?{min:E,max:g}:void 0}}),jt=Y(()=>{let A={x:N.value.coordScales.x,y:N.value.coordScales.y};return r.axes.filter(C=>C.coord in A).filter(C=>["h","v"].includes(C.orientation)).map(({coord:C,breaks:E,labels:g,titles:v,minorBreaks:M,...T})=>({coord:C,axis:new Wf(A[C],{breaks:E,labels:g,titles:v,minorBreaks:M}),etc:T}))}),$t=Y(()=>jt.value.map(({coord:A,axis:C,etc:E})=>{let{majorBreaks:g,minorBreaks:v,ticks:M}=C.getBindings({range:It[A],expandMult:t.expandMult[A]}),{showGrid:T,orientation:W,...q}=E;return{majorBreaks:g,minorBreaks:v,ticks:M,showGrid:T,coord:A,orientation:W,bind:q}})),Wt=Y(()=>{let A=$t.value.filter(E=>E.showGrid&&E.orientation=="v"),C=$t.value.filter(E=>E.showGrid&&E.orientation=="h");return{h:{majorBreaks:Je(A.flatMap(E=>E.majorBreaks),E=>E.position),minorBreaks:Je(A.flatMap(E=>E.minorBreaks),E=>E.position)},v:{majorBreaks:Je(C.flatMap(E=>E.majorBreaks),E=>E.position),minorBreaks:Je(C.flatMap(E=>E.minorBreaks),E=>E.position)}}}),Gt=Y(()=>$t.value.map(({orientation:A,coord:C,bind:E,ticks:g})=>{let{onMove:v=(...Z)=>l("move",...Z),onZoom:M=(...Z)=>l("zoom",...Z),onRescale:T=(...Z)=>l("rescale",...Z),onNudge:W=(...Z)=>l("nudge",...Z),...q}=E;return{orientation:A,bind:{coord:C,orientation:A,ticks:g,layout:B,coord2pos:w,pos2coord:d,...q},on:{zoom:M,move:v,rescale:T,nudge:W,rangechange:Ct}}}));return(A,C)=>(V(),D("svg",_({ref:"svg",width:"100%",height:"100%"},qt(At,!0),A.$attrs),[wt("defs",null,[wt("clipPath",{id:`${Mt(i)}-plot-clip`},[wt("rect",{x:"0",y:"0",width:Mt(I).width,height:Mt(I).height},null,8,Hh)],8,Rh)]),C[6]||(C[6]=gt()),t.theme.plot.background?(V(),D("rect",{key:0,transform:`translate(${Mt(I).left}, ${Mt(I).top})`,width:Mt(I).width,height:Mt(I).height,fill:t.theme.plot.background},null,8,zh)):Ft("",!0),C[7]||(C[7]=gt()),wt("g",{transform:`translate(${Mt(I).left}, ${Mt(I).top})`,style:{"pointer-events":"none"}},[t.theme.grid.h?(V(),kt(uh,_({key:0},Wt.value.h,{layout:Mt(B),theme:t.theme.grid.h,activeTransform:ot.value,coord2pos:w,transition:m.value}),null,16,["layout","theme","activeTransform","transition"])):Ft("",!0),C[2]||(C[2]=gt()),t.theme.grid.v?(V(),kt(ch,_({key:1},Wt.value.v,{layout:Mt(B),theme:t.theme.grid.v,activeTransform:ot.value,coord2pos:w,transition:m.value}),null,16,["layout","theme","activeTransform","transition"])):Ft("",!0)],8,Fh),C[8]||(C[8]=gt()),wt("g",{transform:`translate(${Mt(I).left}, ${Mt(I).top})`,"clip-path":r.clip?`url(#${Mt(i)}-plot-clip)`:null},[wt("g",_(P.value,{style:{transition:m.value}}),[(V(!0),D(ut,null,ht(N.value.layers,E=>(V(),kt(Sh,_({ref_for:!0,ref_key:"layers",ref:x,data:E.data},{ref_for:!0},E.vBind,{layout:Mt(B),geom:E.geom,coord2pos:w,getCoord:k,"default-render":r.render}),null,16,["data","layout","geom","default-render"]))),256))],16),C[3]||(C[3]=gt()),(V(!0),D(ut,null,ht(r.selections,E=>(V(),kt(ll,_({coord2pos:w,pos2coord:d,layout:Mt(B),onSelecting:u,onSelectend:h,transition:m.value,activeTransform:ot.value},{ref_for:!0},E,{flip:t.flip}),null,16,["layout","transition","activeTransform","flip"]))),256)),C[4]||(C[4]=gt()),le(ll,{coord2pos:w,pos2coord:d,layout:Mt(B),modelValue:c.value,transition:m.value,activeTransform:ot.value,theme:f.value,flip:t.flip},null,8,["layout","modelValue","transition","activeTransform","theme","flip"])],8,qh),C[9]||(C[9]=gt()),wt("g",{transform:`translate(${Mt(I).left}, ${Mt(I).top})`},[(V(!0),D(ut,null,ht(Gt.value.filter(E=>typeof E.bind.position!="number"),E=>(V(),kt(tl,_({ref_for:!0},E.bind,qt(E.on),{transition:m.value,"onUpdate:transition":C[0]||(C[0]=g=>m.value=g),activeTransform:ot.value}),null,16,["transition","activeTransform"]))),256)),C[5]||(C[5]=gt()),wt("g",{"clip-path":r.clip?`url(#${Mt(i)}-plot-clip)`:null},[(V(!0),D(ut,null,ht(Gt.value.filter(E=>typeof E.bind.position=="number"),E=>(V(),kt(tl,_({ref_for:!0},E.bind,qt(E.on),{transition:m.value,"onUpdate:transition":C[1]||(C[1]=g=>m.value=g),activeTransform:ot.value}),null,16,["transition","activeTransform"]))),256))],8,Gh)],8,Wh),C[10]||(C[10]=gt()),r.legendTeleport?(V(),D("foreignObject",Uh,[(V(),kt(Sa,{defer:"",to:r.legendTeleport},[le(Dh,{scales:N.value?.scales,theme:t.theme.legend},null,8,["scales","theme"])],8,["to"]))])):Ft("",!0)],16))}}),Wn={$_type:"action",$_props:{}},Fi={$_type:"layer"},qi={$_props:{geom:"tile",stat:"bar"},$_type:"layer"},Wi={$_props:{geom:"blank",stat:"identity"},$_type:"layer"},Gi={$_props:{geom:"boxplot",stat:"boxplot"},$_type:"layer"},Ui={$_props:{geom:"curve",stat:"curve"},$_type:"layer"},Ki={$_props:{geom:"curve",stat:"density"},$_type:"layer",$_argnames:["n","kernel"]},Qi={$_props:{geom:"rect",stat:"histogram"},$_type:"layer",$_argnames:["bins","binwidth","breaks"]},Zi={$_props:{geom:"line",stat:"line"},$_type:"layer",$_argnames:["orientation"]},Ji={$_props:{geom:"line",stat:"linerange"},$_type:"layer"},_i={$_props:{geom:"line",stat:"path"},$_type:"layer"},tr={$_props:{geom:"point",stat:"point"},$_type:"layer"},er={$_props:{geom:"polygon",stat:"polygon"},$_type:"layer"},nr={$_props:{geom:"rect",stat:"rect"},$_type:"layer"},ir={$_props:{geom:"line",stat:"segment"},$_type:"layer"},rr={$_props:{geom:"stick",stat:"stick"},$_type:"layer"},lr={$_props:{geom:"text",stat:"text"},$_type:"layer"},ar={$_props:{geom:"textsegment",stat:"textsegment"},$_type:"layer"},or={$_props:{geom:"tile",stat:"tile"},$_type:"layer"},Qh=Object.freeze(Object.defineProperty({__proto__:null,VVGeom:Fi,VVGeomBar:qi,VVGeomBlank:Wi,VVGeomBoxplot:Gi,VVGeomCurve:Ui,VVGeomDensity:Ki,VVGeomHistogram:Qi,VVGeomLine:Zi,VVGeomLinerange:Ji,VVGeomPath:_i,VVGeomPoint:tr,VVGeomPolygon:er,VVGeomRect:nr,VVGeomSegment:ir,VVGeomStick:rr,VVGeomText:lr,VVGeomTextsegment:ar,VVGeomTile:or},Symbol.toStringTag,{value:"Module"})),sr={$_type:"axis",$_props:{}},ur={$_type:"axis",$_props:{coord:"x"}},cr={$_type:"axis",$_props:{coord:"y"}},Zh=Object.freeze(Object.defineProperty({__proto__:null,VVAxis:sr,VVAxisX:ur,VVAxisY:cr},Symbol.toStringTag,{value:"Module"})),Jh={key:0,class:"vvplot-panel",style:{"pointer-events":"auto",display:"contents"}},da=Object.assign({inheritAttrs:!1},{__name:"Plot",props:We({data:Array,scales:Object,aes:Object,expandAdd:Object,expandMult:Object,extend:Object,levels:Object,range:Object,minRange:Object,rangePreview:Object,axes:[Object,Array],theme:[Object,Array],action:[Object,Array],reverse:Object,render:String,flip:Boolean,clip:{type:Boolean,default:!0},resize:null,legendTeleport:null},{selectionPreview:{default:()=>({})},selectionPreviewModifiers:{},selectionPreviewTheme:{default:()=>({})},selectionPreviewThemeModifiers:{},transition:{},transitionModifiers:{},width:{},widthModifiers:{},height:{},heightModifiers:{}}),emits:We(["resize","rangechange","select","update:range","update:rangePreview"],["update:selectionPreview","update:selectionPreviewTheme","update:transition","update:width","update:height"]),setup(t,{expose:e,emit:n}){const i={...Qh,...Zh,VVAction:Wn,VVSelection:Wn},r={x:"y",y:"x",h:"v",v:"h",top:"bottom",bottom:"top",left:"right",right:"left"};function l(g){return g==null?g:g===""||!!g}const o=n,s=me(t,"selectionPreview"),c=me(t,"selectionPreviewTheme"),a=me(t,"transition");function u(g){return g==null?[]:g.flatMap(v=>v.type==ut?u(v.children):v.type=="template"?u(v.children).map(M=>(M.props={...M.props,...v.props},M)):v)}function f(g){return{props:Object.fromEntries(g.props.map(M=>{try{if(M.type==7)return[M.arg.content,new Function("return "+M.exp.content)()];if(M.type==6)return[M.name,M.value?.content??""]}catch{}}).filter(M=>M!=null)),children:g.children.map(M=>()=>[f(M)]),type:i[g.tag]}}const h=Na(),m=Ta(),y=Ot({axis:{},layer:{},action:{},selection:{},dom:{}});for(let g in h)St(()=>h[g]?.(),v=>{let M=u(v).flatMap(W=>W.type?.template?lo(W.type.template,{decodeEntities:!0}).children.map(Z=>f(Z)):W).filter(W=>W!=null),T=Object.groupBy(M,W=>W.type.$_type??"dom");for(let W in T)y[W][g]=T[W]},{immediate:!0});const x=Y(()=>Object.values(y.layer).flat()),$=Y(()=>Object.values(y.axis).flat()),O=Y(()=>Object.values(y.action).flat()),j=Y(()=>Object.values(y.selection).flat()),N=Y(()=>Object.keys(y.dom).flatMap(g=>g=="panel"?[]:y.dom[g])),I=Y(()=>{let g={},v={};for(let M in m)if(M.startsWith("on")){let T=Array.isArray(m[M])?m[M]:[m[M]];g[M]=T.filter(W=>typeof W=="function"),v[M]=T.filter(W=>typeof W!="function")}else v[M]=m[M];return{plot:g,wrapper:v}}),B=Y(()=>{let g=[vl,pl].concat(t.theme??[]);return vo(xo(go(...g),t.flip))},{deep:!0}),P=we(()=>{let g=$.value.map(T=>({...T.type.$_props,...T.props})),v=g.filter(T=>T.coord==="x"),M=g.filter(T=>T.coord==="y");return{x:v.find(T=>l(T.primary))??v.find(T=>T.primary==null&&!l(T.secondary)),y:M.find(T=>l(T.primary))??M.find(T=>T.primary==null&&!l(T.secondary))}}),b={levels:Ot({}),extend:Ot({}),"min-range":Ot({}),"expand-add":Ot({}),"expand-mult":Ot({}),boundary:Ot({}),reverse:Ot({}),min:Ot({}),max:Ot({}),"min-preview":Ot({}),"max-preview":Ot({})};St(P,g=>{for(let v of["x","y"])for(let M in b)b[M][v]=g?.[v]?.[M]},{immediate:!0});const d=we(()=>{let g={};for(let v of["x","y"]){let M=b.boundary[v];g[v]={min:M?.min??M?.[0],max:M?.max??M?.[1]}}return g}),p=Y(()=>({data:t.data,aes:t.aes,extendX:b.extend.x??t.extend?.x??0,extendY:b.extend.y??t.extend?.y??0})),w=Y(()=>x.value.map(g=>{let{geom:v,stat:M,scales:T,data:W,"extend-x":q,"extend-y":Z,...tt}={...g.type.$_props,...g.props},it=g.type.$_argnames||[],mt={},dt={},ct={},rt={};for(let G in tt)G!="key"&&(it.includes(G)?dt[G]=tt[G]:G.startsWith("on")?rt[G]=tt[G]:typeof tt[G]=="function"?mt[G]=tt[G]:["class","style","render"].includes(G)?rt[G]=tt[G]:ct[G]=tt[G]);return{geom:v,stat:M,data:W,aes:mt,attrs:ct,scales:T,args:dt,extendX:q,extendY:Z,vBind:rt}})),S=Y(()=>(({x:g,y:v,...M})=>M)(t.levels??{})),k=Y(()=>{let g={};for(let v of["x","y"])g[v]=b.levels[v]??t.levels?.[v];return g}),X=Y(()=>{let g={};for(let v of["x","y"]){let M=b.min[v]??t.range?.[v+"min"],T=b.max[v]??t.range?.[v+"max"];g[v+"min"]=isFinite(M)&&!Number.isNaN(M)?M:null,g[v+"max"]=isFinite(T)&&!Number.isNaN(T)?T:null}return g}),L=Y(()=>{let g={};for(let v of["x","y"]){let M=b["min-preview"][v]??t.rangePreview?.[v+"min"],T=b["max-preview"][v]??t.rangePreview?.[v+"max"];g[v+"min"]=isFinite(M)&&!Number.isNaN(M)?M:null,g[v+"max"]=isFinite(T)&&!Number.isNaN(T)?T:null}return g}),H=we(()=>({xmin:P?.x?.["onUpdate:min"],xmax:P?.x?.["onUpdate:max"],ymin:P?.y?.["onUpdate:min"],ymax:P?.y?.["onUpdate:max"]})),z=we(()=>({xmin:P?.x?.["onUpdate:minPreview"],xmax:P?.x?.["onUpdate:maxPreview"],ymin:P?.y?.["onUpdate:minPreview"],ymax:P?.y?.["onUpdate:maxPreview"]})),R=Ot({}),F=Ot({});St(X,(g,v)=>{g?.xmin!==v?.xmin&&(R.xmin=g.xmin),g?.xmax!==v?.xmax&&(R.xmax=g.xmax),g?.ymin!==v?.ymin&&(R.ymin=g.ymin),g?.ymax!==v?.ymax&&(R.ymax=g.ymax)},{immediate:!0}),St(L,(g,v)=>{g?.xmin!==v?.xmin&&(F.xmin=g.xmin),g?.xmax!==v?.xmax&&(F.xmax=g.xmax),g?.ymin!==v?.ymin&&(F.ymin=g.ymin),g?.ymax!==v?.ymax&&(F.ymax=g.ymax)},{immediate:!0}),St(()=>({...R}),(g,v)=>{for(let M in H)H[M]?.(g[M]);o("rangechange",{...g},{...v}),o("update:range",{...g})},{deep:!0}),St(()=>F,g=>{for(let v in z)z[v]?.(g[v]);o("update:rangePreview",{...g})},{deep:!0}),hr("range",R),hr("rangePreview",F);const Q=Y(()=>({x:b["min-range"].x??t.minRange?.x??0,y:b["min-range"].y??t.minRange?.y??0})),K=Y(()=>{let g=b["expand-add"].x??t.expandAdd?.x??0,v=b["expand-add"].y??t.expandAdd?.y??0;return Array.isArray(g)?g={min:g[0],max:g[1]}:typeof g=="number"&&(g={min:g,max:g}),Array.isArray(v)?v={min:v[0],max:v[1]}:typeof v=="number"&&(v={min:v,max:v}),{x:g,y:v}}),at=Y(()=>{let g=b["expand-mult"].x??t.expandMult?.x??.05,v=b["expand-mult"].y??t.expandMult?.y??.05;return Array.isArray(g)?g={min:g[0],max:g[1]}:typeof g=="number"&&(g={min:g,max:g}),Array.isArray(v)?v={min:v[0],max:v[1]}:typeof v=="number"&&(v={min:v,max:v}),{x:g,y:v}}),nt=we(()=>({x:l(b.reverse.x)??t.reverse?.x??!1,y:l(b.reverse.y)??t.reverse?.y??!1})),ot={left:1,right:2,middle:4,X1:8,X2:16},pt=Y(()=>{let g=t.flip?{x:"v",y:"h"}:{x:"h",y:"v"},v=$.value.map(M=>({...M.type.$_props,...M.props,$_children:M.children})).concat(t.axes??[]);return v.every(M=>M?.coord!="x")&&v.push({coord:"x"}),v.every(M=>M?.coord!="y")&&v.push({coord:"y"}),v.map(({coord:M,position:T,title:W,breaks:q,labels:Z,titles:tt,"minor-breaks":it,"show-grid":mt,theme:dt=[],extend:ct,boundary:rt,action:G,primary:J,secondary:U,"expand-mult":lt,"expand-add":vt,levels:Qt,limits:Ht,min:ue,max:ne,"onUpdate:min":ie,"onUpdate:max":re,$_children:ga,...xa})=>{let Ae=g[M];T=T??"start",T=="start"?(T={h:"bottom",v:"left"}[Ae],nt[r[M]]&&(T=r[T])):T=="end"&&(T={h:"top",v:"right"}[Ae],nt[r[M]]&&(T=r[T]));let va=Object.values(ga??{}).filter(Pt=>typeof Pt=="function").flatMap(Pt=>u(Pt())).map(Pt=>({...Pt.type.$_props,...Pt.props})).concat(G??[]).flatMap(Pt=>{let fr=[];for(let hn of["move","nudge","zoom","rescale"]){let Zt=Pt[hn];if(Zt==null||Zt===!1)continue;let pa="on"+hn.charAt(0).toUpperCase()+hn.slice(1);fr.push({action:hn,[Ae+"min"]:Zt.min??Pt.min??rt?.min??rt?.[0]??d?.[M]?.min,[Ae+"max"]:Zt.max??Pt.max??rt?.max??rt?.[1]??d?.[M]?.max,["min-range-"+Ae]:Zt["min-range"]??Pt["min-range"],ctrlKey:!!(Zt.ctrl??l(Pt.ctrl)),shiftKey:!!(Zt.shift??l(Pt.shift)),altKey:!!(Zt.alt??l(Pt.alt)),metaKey:!!(Zt.meta??l(Pt.meta)),buttons:Zt.buttons??ot[Zt.button]??Pt.buttons??ot[Pt.button]??1,emit:Pt[pa]})}return fr});return{coord:M,orientation:Ae,position:T,title:W,breaks:q,labels:Z,titles:tt,minorBreaks:it,showGrid:l(mt)??T!=="none",extend:ct??b.extend[M],theme:Object.assign({},...[B.value?.axis?.[T]??B.value?.axis?.[Ae]].concat(dt)),action:va,...xa}}).filter(M=>M!=null)}),At=Ot({});St(pt,g=>{for(let v of["left","right","top","bottom"])At[v]=g.some(M=>M.position==v)},{immediate:!0});const Ct=Y(()=>O.value.map(g=>({...g.type.$_props,...g.props})).concat(t.action??[]).flatMap(g=>{let v=[];for(let M of["select","move","nudge","zoom"]){let T=g[M];if(T==null||T===!1)continue;let W=T.x==null&&T.y==null&&g.x==null&&g.y==null,q="on"+M.charAt(0).toUpperCase()+M.slice(1);v.push({action:M,x:W||!!(T.x??l(g.x)),y:W||!!(T.y??l(g.y)),xmin:T.xmin??g.xmin??d?.x?.min,xmax:T.xmax??g.xmax??d?.x?.max,ymin:T.ymin??g.ymin??d?.y?.min,ymax:T.ymax??g.ymax??d?.y?.max,"min-range-x":T["min-range-x"]??g["min-range-x"],"min-range-y":T["min-range-y"]??g["min-range-y"],ctrlKey:!!(T.ctrl??l(g.ctrl)),shiftKey:!!(T.shift??l(g.shift)),altKey:!!(T.alt??l(g.alt)),metaKey:!!(T.meta??l(g.meta)),buttons:T.buttons??ot[T.button]??g.buttons??ot[g.button]??1,emit:g[q]})}return v})),It=Y(()=>j.value.map(g=>({...g.type.$_props,...g.props})).map(({once:g,move:v,dismissible:M,resize:T,x:W,y:q,xmin:Z,xmax:tt,ymin:it,ymax:mt,ctrl:dt,shift:ct,alt:rt,meta:G,button:J,buttons:U,modelValue:lt,"onUpdate:modelValue":vt,theme:Qt=[],...Ht})=>{let ue=W==null&&q==null;return l(g)?(lt=Ot({}),vt=null):vt==null&&(lt=Ot(lt??{}),vt=ne=>{for(let ie in lt)delete lt[ie];Object.assign(lt,ne)}),{move:!!l(v),dismissible:M==null?void 0:M!==!1,resize:!!l(T),x:ue||!!l(W),y:ue||!!l(q),xmin:Z??d?.x?.min,xmax:tt??d?.x?.max,ymin:it??d?.y?.min,ymax:mt??d?.y?.max,ctrlKey:!!l(dt),shiftKey:!!l(ct),altKey:!!l(rt),metaKey:!!l(G),buttons:U??ot[J]??1,modelValue:lt,"onUpdate:modelValue":vt,theme:Object.assign({},...[B.value?.selection].concat(Qt)),onSelect:(ne,ie)=>o("select",ne,ie),...Ht}})),jt=Vt("wrapper"),$t=Vt("plot"),Wt=me(t,"width"),Gt=me(t,"height");ol(()=>{St(Wt,g=>{jt.value.style.width=Ie(g,"px")??null},{immediate:!0}),St(Gt,g=>{jt.value.style.height=Ie(g,"px")??null},{immediate:!0})});let A={width:0,height:0};ul($t,g=>{let{width:v,height:M}=g[0].contentRect;jt.value.style.width&&(Wt.value=v),jt.value.style.height&&(Gt.value=M),(v>0||M>0)&&(A.width>0||A.height>0)&&o("resize",{width:v,height:M},A),A={width:v,height:M}});const C=Y(()=>({position:"absolute",pointerEvents:"none",left:Ie($t.value?.panel?.left,"px"),top:Ie($t.value?.panel?.top,"px"),width:Ie($t.value?.panel?.width,"px"),height:Ie($t.value?.panel?.height,"px")})),E=Y(()=>{let g={position:"relative",overflow:"hidden",boxSizing:"border-box"};return t.resize==="both"||t.resize===!0||t.resize===""?Object.assign(g,{resize:"both"}):t.resize==="horizontal"||t.resize==="x"&&!t.flip||t.resize==="y"&&t.flip?Object.assign(g,{resize:"horizontal"}):(t.resize==="vertical"||t.resize==="y"&&!t.flip||t.resize==="x"&&t.flip)&&Object.assign(g,{resize:"vertical"}),g});return e({get svg(){return $t.value.svg},serialize(){return so($t.value.svg)}}),(g,v)=>(V(),D("div",_({ref:"wrapper",class:"vvplot",style:E.value},I.value.wrapper),[le(Kh,_({ref:"plot",paddings:At,schema:p.value,layers:w.value,"min-range":Q.value,"expand-add":K.value,"expand-mult":at.value,reverse:Mt(nt),flip:t.flip,"coord-levels":k.value,levels:S.value,scales:t.scales,axes:pt.value,theme:B.value,selections:It.value,transition:a.value,"onUpdate:transition":v[0]||(v[0]=M=>a.value=M)},I.value.plot,{"selection-preview":s.value,"onUpdate:selectionPreview":v[1]||(v[1]=M=>s.value=M),"selection-preview-theme":c.value,"onUpdate:selectionPreviewTheme":v[2]||(v[2]=M=>c.value=M),action:Ct.value,clip:t.clip,render:t.render,legendTeleport:t.legendTeleport,onSelect:v[3]||(v[3]=(M,T)=>o("select",M,T))}),null,16,["paddings","schema","layers","min-range","expand-add","expand-mult","reverse","flip","coord-levels","levels","scales","axes","theme","selections","transition","selection-preview","selection-preview-theme","action","clip","render","legendTeleport"]),v[4]||(v[4]=gt()),wt("div",{class:"vvplot-panel-container",style:sn(C.value)},[y.dom.panel?.length?(V(),D("div",Jh,[(V(!0),D(ut,null,ht(y.dom.panel,M=>(V(),kt(qe(M)))),256))])):Ft("",!0)],4),v[5]||(v[5]=gt()),(V(!0),D(ut,null,ht(N.value,M=>(V(),kt(qe(M)))),256))],16))}}),ya={$_type:"selection",$_props:{}},_h=Object.freeze(Object.defineProperty({__proto__:null,VVAction:Wn,VVAxis:sr,VVAxisX:ur,VVAxisY:cr,VVGeom:Fi,VVGeomBar:qi,VVGeomBlank:Wi,VVGeomBoxplot:Gi,VVGeomCurve:Ui,VVGeomDensity:Ki,VVGeomHistogram:Qi,VVGeomLine:Zi,VVGeomLinerange:Ji,VVGeomPath:_i,VVGeomPoint:tr,VVGeomPolygon:er,VVGeomRect:nr,VVGeomSegment:ir,VVGeomStick:rr,VVGeomText:lr,VVGeomTextsegment:ar,VVGeomTile:or,VVPlot:da,VVSelection:ya},Symbol.toStringTag,{value:"Module"}));export{Wn as VVAction,sr as VVAxis,ur as VVAxisX,cr as VVAxisY,Fi as VVGeom,qi as VVGeomBar,Wi as VVGeomBlank,Gi as VVGeomBoxplot,Ui as VVGeomCurve,Ki as VVGeomDensity,Qi as VVGeomHistogram,Zi as VVGeomLine,Ji as VVGeomLinerange,_i as VVGeomPath,tr as VVGeomPoint,er as VVGeomPolygon,nr as VVGeomRect,ir as VVGeomSegment,rr as VVGeomStick,lr as VVGeomText,ar as VVGeomTextsegment,or as VVGeomTile,da as VVPlot,ya as VVSelection,_h as components,ca as number_cut,Vf as oob,Zn as vvbreak,Oi as vvlabel,ua as vvscale,po as vvtheme};
|
|
1
|
+
import{computed as H,isRef as jn,reactive as Lt,unref as Mt,getCurrentScope as tl,onScopeDispose as el,toValue as go,watch as St,shallowRef as nl,getCurrentInstance as il,onMounted as yo,useTemplateRef as Pt,nextTick as kn,openBlock as L,createElementBlock as I,mergeProps as tt,renderSlot as rl,toDisplayString as qt,createCommentVNode as Et,createTextVNode as mt,Fragment as rt,renderList as at,inject as K1,normalizeStyle as N1,createElementVNode as kt,createBlock as pt,toHandlers as zt,normalizeProps as oe,resolveDynamicComponent as r1,guardReactiveProps as u1,createVNode as $e,useModel as ke,createPropsRestProxy as xo,mergeModels as o1,ref as Z1,useId as ol,Teleport as sl,useSlots as ll,useAttrs as al,provide as nr}from"vue";function cl(t){return tl()?(el(t),!0):!1}function ul(t){if(!jn(t))return Lt(t);const e=new Proxy({},{get(n,i,r){return Mt(Reflect.get(t.value,i,r))},set(n,i,r){return jn(t.value[i])&&!jn(r)?t.value[i].value=r:t.value[i]=r,!0},deleteProperty(n,i){return Reflect.deleteProperty(t.value,i)},has(n,i){return Reflect.has(t.value,i)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return Lt(e)}function Ee(t){return ul(H(t))}const hl=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const fl=hl?window:void 0;function ir(t){var e;const n=go(t);return(e=n?.$el)!=null?e:n}function ml(){const t=nl(!1),e=il();return e&&yo(()=>{t.value=!0},e),t}function dl(t){const e=ml();return H(()=>(e.value,!!t()))}function vo(t,e,n={}){const{window:i=fl,...r}=n;let o;const l=dl(()=>i&&"ResizeObserver"in i),c=()=>{o&&(o.disconnect(),o=void 0)},a=H(()=>{const m=go(t);return Array.isArray(m)?m.map(f=>ir(f)):[ir(m)]}),s=St(a,m=>{if(c(),l.value&&i){o=new ResizeObserver(e);for(const f of m)f&&o.observe(f,r)}},{immediate:!0,flush:"post"}),u=()=>{c(),s()};return cl(u),{isSupported:l,stop:u}}const E1=()=>!1,zn=Object.assign,gl=Symbol(""),yl=Symbol(""),xl=Symbol(""),vl=Symbol(""),po={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function pl(t,e=""){return{type:0,source:e,children:t,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:po}}function Un(t,e=!1,n=po,i=0){return{type:4,loc:n,content:t,isStatic:e,constType:e?3:i}}const rr=new Uint8Array([123,123]),or=new Uint8Array([125,125]);function sr(t){return t>=97&&t<=122||t>=65&&t<=90}function ne(t){return t===32||t===10||t===9||t===12||t===13}function Ne(t){return t===47||t===62||ne(t)}function Q1(t){const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}const Ft={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class bl{constructor(e,n){this.stack=e,this.cbs=n,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=rr,this.delimiterClose=or,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=rr,this.delimiterClose=or}getPos(e){let n=1,i=e+1;const r=this.newlines.length;let o=-1;if(r>100){let l=-1,c=r;for(;l+1<c;){const a=l+c>>>1;this.newlines[a]<e?l=a:c=a}o=l}else for(let l=r-1;l>=0;l--)if(e>this.newlines[l]){o=l;break}return o>=0&&(n=o+2,i=e-this.newlines[o]),{column:i,line:n,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){e===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const n=this.index+1-this.delimiterOpen.length;n>this.sectionStart&&this.cbs.ontext(this.sectionStart,n),this.state=3,this.sectionStart=n}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){const n=this.sequenceIndex===this.currentSequence.length;if(!(n?Ne(e):(e|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!n){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(e===62||ne(e)){const n=this.index-this.currentSequence.length;if(this.sectionStart<n){const i=this.index;this.index=n,this.cbs.ontext(this.sectionStart,n),this.index=i}this.sectionStart=n+2,this.stateInClosingTagName(e),this.inRCDATA=!1;return}this.sequenceIndex=0}(e|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===Ft.TitleEnd||this.currentSequence===Ft.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(e===60)}stateCDATASequence(e){e===Ft.Cdata[this.sequenceIndex]?++this.sequenceIndex===Ft.Cdata.length&&(this.state=28,this.currentSequence=Ft.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length;){const n=this.buffer.charCodeAt(this.index);if(n===10&&this.newlines.push(this.index),n===e)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===Ft.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,n){this.enterRCDATA(e,n),this.state=31}enterRCDATA(e,n){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=n}stateBeforeTagName(e){e===33?(this.state=22,this.sectionStart=this.index+1):e===63?(this.state=24,this.sectionStart=this.index+1):sr(e)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:e===116?this.state=30:this.state=e===115?29:6):e===47?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){Ne(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(Ne(e)){const n=this.buffer.slice(this.sectionStart,this.index);n!=="template"&&this.enterRCDATA(Q1("</"+n),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){ne(e)||(e===62?(this.state=1,this.sectionStart=this.index+1):(this.state=sr(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(e===62||ne(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){e===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){e===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):e===47?this.state=7:e===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):ne(e)||this.handleAttrStart(e)}handleAttrStart(e){e===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):e===46||e===58||e===64||e===35?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(e){e===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):ne(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(e===61||Ne(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){e===61||Ne(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):e===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){e===61||Ne(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===91?this.state=15:e===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){e===93?this.state=14:(e===61||Ne(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){e===61||Ne(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(e){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(e)}stateAfterAttrName(e){e===61?this.state=18:e===47||e===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):ne(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){e===34?(this.state=19,this.sectionStart=this.index+1):e===39?(this.state=20,this.sectionStart=this.index+1):ne(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,n){(e===n||this.fastForwardTo(n))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(n===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){ne(e)||e===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):(e===39||e===60||e===61||e===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){e===91?(this.state=26,this.sequenceIndex=0):this.state=e===45?25:23}stateInDeclaration(e){(e===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(e===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){e===45?(this.state=28,this.currentSequence=Ft.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(e===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){e===Ft.ScriptEnd[3]?this.startSpecial(Ft.ScriptEnd,4):e===Ft.StyleEnd[3]?this.startSpecial(Ft.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===Ft.TitleEnd[3]?this.startSpecial(Ft.TitleEnd,4):e===Ft.TextareaEnd[3]?this.startSpecial(Ft.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){const n=this.buffer.charCodeAt(this.index);switch(n===10&&this.state!==33&&this.newlines.push(this.index),this.state){case 1:{this.stateText(n);break}case 2:{this.stateInterpolationOpen(n);break}case 3:{this.stateInterpolation(n);break}case 4:{this.stateInterpolationClose(n);break}case 31:{this.stateSpecialStartSequence(n);break}case 32:{this.stateInRCDATA(n);break}case 26:{this.stateCDATASequence(n);break}case 19:{this.stateInAttrValueDoubleQuotes(n);break}case 12:{this.stateInAttrName(n);break}case 13:{this.stateInDirName(n);break}case 14:{this.stateInDirArg(n);break}case 15:{this.stateInDynamicDirArg(n);break}case 16:{this.stateInDirModifier(n);break}case 28:{this.stateInCommentLike(n);break}case 27:{this.stateInSpecialComment(n);break}case 11:{this.stateBeforeAttrName(n);break}case 6:{this.stateInTagName(n);break}case 34:{this.stateInSFCRootTagName(n);break}case 9:{this.stateInClosingTagName(n);break}case 5:{this.stateBeforeTagName(n);break}case 17:{this.stateAfterAttrName(n);break}case 20:{this.stateInAttrValueSingleQuotes(n);break}case 18:{this.stateBeforeAttrValue(n);break}case 8:{this.stateBeforeClosingTagName(n);break}case 10:{this.stateAfterClosingTagName(n);break}case 29:{this.stateBeforeSpecialS(n);break}case 30:{this.stateBeforeSpecialT(n);break}case 21:{this.stateInAttrValueNoQuotes(n);break}case 7:{this.stateInSelfClosingTag(n);break}case 23:{this.stateInDeclaration(n);break}case 22:{this.stateBeforeDeclaration(n);break}case 25:{this.stateBeforeComment(n);break}case 24:{this.stateInProcessingInstruction(n);break}case 33:{this.stateInEntity();break}}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(this.state===1||this.state===32&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===19||this.state===20||this.state===21)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const e=this.buffer.length;this.sectionStart>=e||(this.state===28?this.currentSequence===Ft.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,n){}}function lr(t,{compatConfig:e}){const n=e&&e[t];return t==="MODE"?n||3:n}function bo(t,e){const n=lr("MODE",e),i=lr(t,e);return n===3?i===!0:i!==!1}function J1(t,e,n,...i){return bo(t,e)}function wl(t){throw t}function kl(t){}function Al(t,e,n,i){const r=`https://vuejs.org/error-reference/#compiler-${t}`,o=new SyntaxError(String(r));return o.code=t,o.loc=e,o}const Sl=t=>t.type===4&&t.isStatic;function Cl(t){switch(t){case"Teleport":case"teleport":return gl;case"Suspense":case"suspense":return yl;case"KeepAlive":case"keep-alive":return xl;case"BaseTransition":case"base-transition":return vl}}function Nl(t,e){return!!(t&&Sl(t)&&t.content===e)}function ar(t){return t.type===7&&t.name==="pre"}const Ml=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;function Tl(t){for(let e=0;e<t.length;e++)if(!ne(t.charCodeAt(e)))return!1;return!0}const wo={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:E1,isPreTag:E1,isIgnoreNewlineTag:E1,isCustomElement:E1,onError:wl,onWarn:kl,comments:!1,prefixIdentifiers:!1};let wt=wo,p1=null,Se="",Gt=null,dt=null,Jt="",we=-1,je=-1,xi=0,Me=!1,Fn=null;const At=[],$t=new bl(At,{onerr:pe,ontext(t,e){L1(Ht(t,e),t,e)},ontextentity(t,e,n){L1(t,e,n)},oninterpolation(t,e){if(Me)return L1(Ht(t,e),t,e);let n=t+$t.delimiterOpen.length,i=e-$t.delimiterClose.length;for(;ne(Se.charCodeAt(n));)n++;for(;ne(Se.charCodeAt(i-1));)i--;let r=Ht(n,i);r.includes("&")&&(r=wt.decodeEntities(r,!1)),Gn({type:5,content:U1(r,!1,jt(n,i)),loc:jt(t,e)})},onopentagname(t,e){const n=Ht(t,e);Gt={type:1,tag:n,ns:wt.getNamespace(n,At[0],wt.ns),tagType:0,props:[],children:[],loc:jt(t-1,e),codegenNode:void 0}},onopentagend(t){ur(t)},onclosetag(t,e){const n=Ht(t,e);if(!wt.isVoidTag(n)){let i=!1;for(let r=0;r<At.length;r++)if(At[r].tag.toLowerCase()===n.toLowerCase()){i=!0,r>0&&pe(24,At[0].loc.start.offset);for(let l=0;l<=r;l++){const c=At.shift();z1(c,e,l<r)}break}i||pe(23,ko(t,60))}},onselfclosingtag(t){const e=Gt.tag;Gt.isSelfClosing=!0,ur(t),At[0]&&At[0].tag===e&&z1(At.shift(),t)},onattribname(t,e){dt={type:6,name:Ht(t,e),nameLoc:jt(t,e),value:void 0,loc:jt(t)}},ondirname(t,e){const n=Ht(t,e),i=n==="."||n===":"?"bind":n==="@"?"on":n==="#"?"slot":n.slice(2);if(!Me&&i===""&&pe(26,t),Me||i==="")dt={type:6,name:n,nameLoc:jt(t,e),value:void 0,loc:jt(t)};else if(dt={type:7,name:i,rawName:n,exp:void 0,arg:void 0,modifiers:n==="."?[Un("prop")]:[],loc:jt(t)},i==="pre"){Me=$t.inVPre=!0,Fn=Gt;const r=Gt.props;for(let o=0;o<r.length;o++)r[o].type===7&&(r[o]=Bl(r[o]))}},ondirarg(t,e){if(t===e)return;const n=Ht(t,e);if(Me&&!ar(dt))dt.name+=n,qe(dt.nameLoc,e);else{const i=n[0]!=="[";dt.arg=U1(i?n:n.slice(1,-1),i,jt(t,e),i?3:0)}},ondirmodifier(t,e){const n=Ht(t,e);if(Me&&!ar(dt))dt.name+="."+n,qe(dt.nameLoc,e);else if(dt.name==="slot"){const i=dt.arg;i&&(i.content+="."+n,qe(i.loc,e))}else{const i=Un(n,!0,jt(t,e));dt.modifiers.push(i)}},onattribdata(t,e){Jt+=Ht(t,e),we<0&&(we=t),je=e},onattribentity(t,e,n){Jt+=t,we<0&&(we=e),je=n},onattribnameend(t){const e=dt.loc.start.offset,n=Ht(e,t);dt.type===7&&(dt.rawName=n),Gt.props.some(i=>(i.type===7?i.rawName:i.name)===n)&&pe(2,e)},onattribend(t,e){if(Gt&&dt){if(qe(dt.loc,e),t!==0)if(Jt.includes("&")&&(Jt=wt.decodeEntities(Jt,!0)),dt.type===6)dt.name==="class"&&(Jt=So(Jt).trim()),t===1&&!Jt&&pe(13,e),dt.value={type:2,content:Jt,loc:t===1?jt(we,je):jt(we-1,je+1)},$t.inSFCRoot&&Gt.tag==="template"&&dt.name==="lang"&&Jt&&Jt!=="html"&&$t.enterRCDATA(Q1("</template"),0);else{let n=0;dt.exp=U1(Jt,!1,jt(we,je),0,n),dt.name==="for"&&(dt.forParseResult=El(dt.exp));let i=-1;dt.name==="bind"&&(i=dt.modifiers.findIndex(r=>r.content==="sync"))>-1&&J1("COMPILER_V_BIND_SYNC",wt,dt.loc,dt.arg.loc.source)&&(dt.name="model",dt.modifiers.splice(i,1))}(dt.type!==7||dt.name!=="pre")&&Gt.props.push(dt)}Jt="",we=je=-1},oncomment(t,e){wt.comments&&Gn({type:3,content:Ht(t,e),loc:jt(t-4,e+3)})},onend(){const t=Se.length;for(let e=0;e<At.length;e++)z1(At[e],t-1),pe(24,At[e].loc.start.offset)},oncdata(t,e){At[0].ns!==0?L1(Ht(t,e),t,e):pe(1,t-9)},onprocessinginstruction(t){(At[0]?At[0].ns:wt.ns)===0&&pe(21,t-1)}}),cr=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,$l=/^\(|\)$/g;function El(t){const e=t.loc,n=t.content,i=n.match(Ml);if(!i)return;const[,r,o]=i,l=(m,f,h=!1)=>{const d=e.start.offset+f,y=d+m.length;return U1(m,!1,jt(d,y),0,h?1:0)},c={source:l(o.trim(),n.indexOf(o,r.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let a=r.trim().replace($l,"").trim();const s=r.indexOf(a),u=a.match(cr);if(u){a=a.replace(cr,"").trim();const m=u[1].trim();let f;if(m&&(f=n.indexOf(m,s+a.length),c.key=l(m,f,!0)),u[2]){const h=u[2].trim();h&&(c.index=l(h,n.indexOf(h,c.key?f+m.length:s+a.length),!0))}}return a&&(c.value=l(a,s,!0)),c}function Ht(t,e){return Se.slice(t,e)}function ur(t){$t.inSFCRoot&&(Gt.innerLoc=jt(t+1,t+1)),Gn(Gt);const{tag:e,ns:n}=Gt;n===0&&wt.isPreTag(e)&&xi++,wt.isVoidTag(e)?z1(Gt,t):(At.unshift(Gt),(n===1||n===2)&&($t.inXML=!0)),Gt=null}function L1(t,e,n){{const o=At[0]&&At[0].tag;o!=="script"&&o!=="style"&&t.includes("&")&&(t=wt.decodeEntities(t,!1))}const i=At[0]||p1,r=i.children[i.children.length-1];r&&r.type===2?(r.content+=t,qe(r.loc,n)):i.children.push({type:2,content:t,loc:jt(e,n)})}function z1(t,e,n=!1){n?qe(t.loc,ko(e,60)):qe(t.loc,Ll(e,62)+1),$t.inSFCRoot&&(t.children.length?t.innerLoc.end=zn({},t.children[t.children.length-1].loc.end):t.innerLoc.end=zn({},t.innerLoc.start),t.innerLoc.source=Ht(t.innerLoc.start.offset,t.innerLoc.end.offset));const{tag:i,ns:r,children:o}=t;if(Me||(i==="slot"?t.tagType=2:hr(t)?t.tagType=3:jl(t)&&(t.tagType=1)),$t.inRCDATA||(t.children=Ao(o)),r===0&&wt.isIgnoreNewlineTag(i)){const l=o[0];l&&l.type===2&&(l.content=l.content.replace(/^\r?\n/,""))}r===0&&wt.isPreTag(i)&&xi--,Fn===t&&(Me=$t.inVPre=!1,Fn=null),$t.inXML&&(At[0]?At[0].ns:wt.ns)===0&&($t.inXML=!1);{const l=t.props;if(!$t.inSFCRoot&&bo("COMPILER_NATIVE_TEMPLATE",wt)&&t.tag==="template"&&!hr(t)){const a=At[0]||p1,s=a.children.indexOf(t);a.children.splice(s,1,...t.children)}const c=l.find(a=>a.type===6&&a.name==="inline-template");c&&J1("COMPILER_INLINE_TEMPLATE",wt,c.loc)&&t.children.length&&(c.value={type:2,content:Ht(t.children[0].loc.start.offset,t.children[t.children.length-1].loc.end.offset),loc:c.loc})}}function Ll(t,e){let n=t;for(;Se.charCodeAt(n)!==e&&n<Se.length-1;)n++;return n}function ko(t,e){let n=t;for(;Se.charCodeAt(n)!==e&&n>=0;)n--;return n}const Ol=new Set(["if","else","else-if","for","slot"]);function hr({tag:t,props:e}){if(t==="template"){for(let n=0;n<e.length;n++)if(e[n].type===7&&Ol.has(e[n].name))return!0}return!1}function jl({tag:t,props:e}){if(wt.isCustomElement(t))return!1;if(t==="component"||Pl(t.charCodeAt(0))||Cl(t)||wt.isBuiltInComponent&&wt.isBuiltInComponent(t)||wt.isNativeTag&&!wt.isNativeTag(t))return!0;for(let n=0;n<e.length;n++){const i=e[n];if(i.type===6){if(i.name==="is"&&i.value){if(i.value.content.startsWith("vue:"))return!0;if(J1("COMPILER_IS_ON_ELEMENT",wt,i.loc))return!0}}else if(i.name==="bind"&&Nl(i.arg,"is")&&J1("COMPILER_IS_ON_ELEMENT",wt,i.loc))return!0}return!1}function Pl(t){return t>64&&t<91}const Dl=/\r\n/g;function Ao(t){const e=wt.whitespace!=="preserve";let n=!1;for(let i=0;i<t.length;i++){const r=t[i];if(r.type===2)if(xi)r.content=r.content.replace(Dl,`
|
|
2
|
+
`);else if(Tl(r.content)){const o=t[i-1]&&t[i-1].type,l=t[i+1]&&t[i+1].type;!o||!l||e&&(o===3&&(l===3||l===1)||o===1&&(l===3||l===1&&ql(r.content)))?(n=!0,t[i]=null):r.content=" "}else e&&(r.content=So(r.content))}return n?t.filter(Boolean):t}function ql(t){for(let e=0;e<t.length;e++){const n=t.charCodeAt(e);if(n===10||n===13)return!0}return!1}function So(t){let e="",n=!1;for(let i=0;i<t.length;i++)ne(t.charCodeAt(i))?n||(e+=" ",n=!0):(e+=t[i],n=!1);return e}function Gn(t){(At[0]||p1).children.push(t)}function jt(t,e){return{start:$t.getPos(t),end:e==null?e:$t.getPos(e),source:e==null?e:Ht(t,e)}}function qe(t,e){t.end=$t.getPos(e),t.source=Ht(t.start.offset,e)}function Bl(t){const e={type:6,name:t.rawName,nameLoc:jt(t.loc.start.offset,t.loc.start.offset+t.rawName.length),value:void 0,loc:t.loc};if(t.exp){const n=t.exp.loc;n.end.offset<t.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),e.value={type:2,content:t.exp.content,loc:n}}return e}function U1(t,e=!1,n,i=0,r=0){return Un(t,e,n,i)}function pe(t,e,n){wt.onError(Al(t,jt(e,e)))}function Vl(){$t.reset(),Gt=null,dt=null,Jt="",we=-1,je=-1,At.length=0}function Il(t,e){if(Vl(),Se=t,wt=zn({},wo),e){let r;for(r in e)e[r]!=null&&(wt[r]=e[r])}$t.mode=wt.parseMode==="html"?1:wt.parseMode==="sfc"?2:0,$t.inXML=wt.ns===1||wt.ns===2;const n=e&&e.delimiters;n&&($t.delimiterOpen=Q1(n[0]),$t.delimiterClose=Q1(n[1]));const i=p1=pl([],t);return $t.parse(Se),i.loc=jt(0,t.length),i.children=Ao(i.children),p1=null,i}new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b");class Co{constructor(e,n,i){this.label=e,this.value=n,this.level=i}toString(){return this.label}valueOf(){return this.value}toJSON(){return this.label}}class Ve extends Array{static from(e){if(e instanceof this)return e;if(e[Symbol.iterator]){let n=g1(Array.from(e).map(i=>String(i))).sort((i,r)=>fr(i,r,{numeric:!0}));return new this(...n)}else if(typeof e=="object"){let n=Object.keys(e).map(i=>String(i)).sort((i,r)=>fr(e[i],e[r]));return new this(...n)}throw new Error(`Invalid level values: ${e}`)}static isEqual(e,n){if(e instanceof this&&n instanceof this)return e.length===n.length&&Array(e.length).fill().every((i,r)=>e[r].label===n[r].label)}constructor(...e){return e=e.map((n,i)=>new Co(String(n),i)),e.forEach(n=>n.level=e),e.mapping=Object.fromEntries(e.map(n=>[n,n])),Object.setPrototypeOf(e,Ve.prototype),e}getItem(e){return typeof e=="number"||e instanceof Number?this[e]:this.mapping[e]}apply(e){let n=e.map(i=>this.mapping[i]);return n.level=this,n}}function Ge(t){return typeof t=="number"||t instanceof Number||t instanceof Date}function ht(t,e=0){return e==0||t==null?t:t instanceof Date?new t.constructor(+t+e):+t+e}const Yt={min(t,{na_rm:e=!0,infinity_rm:n=!0}={}){return e&&(t=t.filter(Ge)),n&&(t=t.filter(i=>isFinite(i))),Array.from(t).reduce((i,r)=>i<r?i:r,1/0)},max(t,{na_rm:e=!0,infinity_rm:n=!0}={}){return e&&(t=t.filter(Ge)),n&&(t=t.filter(i=>isFinite(i))),Array.from(t).reduce((i,r)=>i>r?i:r,-1/0)},mean(t,{na_rm:e=!0,infinity_rm:n=!0}={}){return e&&(t=t.filter(Ge)),n&&(t=t.filter(i=>isFinite(i))),t.length==0?NaN:Array.from(t).reduce((i,r)=>i+r,0)/t.length},sd(t,{na_rm:e=!0,infinity_rm:n=!0}={}){if(e&&(t=t.filter(Ge)),n&&(t=t.filter(r=>isFinite(r))),t.length<=1)return NaN;let i=Array.from(t).reduce((r,o)=>r+o,0)/t.length;return Math.sqrt(Array.from(t).reduce((r,o)=>r+(o-i)**2,0)/(t.length-1))},quantile(t,e,{na_rm:n=!0,infinity_rm:i=!0}={}){if(n&&(t=t.filter(Ge)),i&&(t=t.filter(c=>isFinite(c))),t.length==0)return NaN;t=Array.from(t).sort((c,a)=>c-a);let r=(t.length-1)*e,o=Math.floor(r),l=Math.ceil(r);return o==l?t[o]:t[o]*(l-r)+t[l]*(r-o)},extent(t,{na_rm:e=!0,infinity_rm:n=!0}={}){if(e&&(t=t.filter(Ge)),n&&(t=t.filter(o=>isFinite(o))),t.length==0)return new Array(2);let i=Array.from(t).reduce((o,l)=>o<l?o:l,1/0),r=Array.from(t).reduce((o,l)=>o>l?o:l,-1/0);return Object.assign([i,r],{min:i,max:r})}},Ot={sum(...t){if(t.some(i=>i==null))return null;if(t.some(i=>!Array.isArray(i)&&typeof i!="number"))throw new Error("Arguments must be numbers or arrays");let e=t.filter(i=>!Array.isArray(i)).reduce((i,r)=>+r+i,0);if(t=t.filter(i=>Array.isArray(i)),t.length==0)return[e];if(t.some(i=>i.length==0))return[];let n=t[0].length;if(t.some(i=>i.length!=n))throw new Error("Arrays must have the same length");return Array.from({length:n},(i,r)=>t.reduce((o,l)=>+l[r]+o,e))},opposite(t){if(t==null)return null;if(!Array.isArray(t)&&typeof t!="number")throw new Error("Arguments must be numbers or arrays");return Array.isArray(t)?t.map(e=>e==null?e:-e):-t},concat(...t){if(t.some(i=>i==null))return null;let e=t.filter(i=>Array.isArray(i));if(e.length==0)return[t.join("")];if(t.some(i=>i.length==0))return[];let n=e[0].length;if(e.some(i=>i.length!=n))throw new Error("Arrays must have the same length");return Array.from({length:n},(i,r)=>t.map(o=>Array.isArray(o)?o[r]:o).join(""))},apply(t,...e){if(e.some(r=>r==null))return null;let n=e.filter(r=>Array.isArray(r));if(n.length==0)return[t(...e)];if(e.some(r=>r.length==0))return[];let i=n[0].length;if(n.some(r=>r.length!=i))throw new Error("Arrays must have the same length");return Array.from({length:i},(r,o)=>t(...e.map(l=>Array.isArray(l)?l[o]:l)))}};function Tt(...t){if(t=t.filter(e=>e!==void 0),t.length!=0)return t=t.slice(t.findIndex(e=>e==null)+1),t.length==0?null:t.reduce((e,n)=>{for(let i in n)n[i]===null&&delete e[i],n[i]!=null&&(e[i]=n[i]);return e},{})}function Te(...t){if(!t.some(e=>e===void 0))return t.some(e=>e===null)?null:t.join("")}function g1(t,e=null){let n=new Map;for(let i in t){let r=e?e(t[i]):t[i];n.has(r)||n.set(r,t[i])}return Array.from(n.values())}function fr(t,e,{numeric:n=!1}={}){return typeof t!="number"||typeof e!="number"?String(t).localeCompare(String(e),void 0,{numeric:n}):t-e}function De(t,...e){return Array.isArray(t)?(t=t.filter(n=>typeof n=="function"),t.length===0?!1:(t.forEach(n=>n(...e)),!0)):typeof t!="function"?!1:(t(...e),!0)}function Oe(t,{min:e,max:n}){return t<e||t>n?NaN:t}function yt(t,{min:e,max:n}){return t<e?e:t>n?n:t}function Wn(t,{min:e,max:n}){return t==-1/0?e:t==1/0?n:t}function Xt(t){return typeof t!="object"||t==null?t:Object.fromEntries(Object.entries(t).filter(([e,n])=>n!=null))}function No(t,e){if(t===e)return!0;if(typeof t!="object"||typeof e!="object"||t==null||e==null)return!1;let n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(let r of n)if(!No(t[r],e[r]))return!1;return!0}function Rl(t){if(!Array.isArray(t))throw new Error("Argument must be an array");let e=[],n=[];for(let i=0;i<t.length;i++){let r=t[i],o=e.findIndex(l=>No(l,r));o===-1&&(e.push(r),o=e.length-1),n.push(o)}return n.categories=e,n}function Hl(...t){if(t.length==0)return null;let e=t.filter(r=>Array.isArray(r)).reduce((r,o)=>{if(Array.isArray(o)){if(r==null)return o.length;if(r!=o.length)throw new Error("Arrays must have the same length")}return r},null)??0,n=[],i=[];for(let r=0;r<e;r++){let o=t.map(c=>Array.isArray(c)?c[r]:c),l=n.findIndex(c=>c.every((a,s)=>a===o[s]));l===-1&&(n.push(o),l=n.length-1),i.push(l)}return i.categories=n,i}function te(t){if(Object.keys(t).length==0)return null;let e=Object.values(t).filter(o=>Array.isArray(o)).reduce((o,l)=>{if(Array.isArray(l)){if(o==null)return l.length;if(o!=l.length)throw new Error("Arrays must have the same length")}return o},null)??0,n=Object.keys(t),i=[],r=[];for(let o=0;o<e;o++){let l=Object.fromEntries(n.map(a=>[a,Array.isArray(t[a])?t[a][o]:t[a]])),c=i.findIndex(a=>n.every(s=>a[s]===l[s]));c===-1&&(i.push(l),c=i.length-1),r.push(c)}return r.categories=i,r}function vi(t){if(Object.keys(t).length==0)return[];let e=Object.values(t).filter(n=>Array.isArray(n)).reduce((n,i)=>{if(Array.isArray(i)){if(n==null)return i.length;if(n!=i.length)throw new Error("Arrays must have the same length")}return n},null)??0;return Array.from({length:e},(n,i)=>Object.fromEntries(Object.keys(t).map(r=>[r,Array.isArray(t[r])?t[r][i]:t[r]])))}function Bt(t){return t==null?[]:Array.isArray(t)?t:t==="solid"?[]:t==="dashed"?[4,4]:t==="dotted"?[1,3]:t==="dotdash"?[1,3,4,3]:t==="longdash"?[8,4]:t==="twodash"?[2,2,6,2]:t.includes(" ")?t.split(" ").map(e=>+e):t.split("").map(e=>+("0x"+e))}function Xl(t){if(!(t instanceof SVGElement))return null;function e(l){let c=l.childNodes.length;for(;c--;){const a=l.childNodes[c];a.nodeType===Node.COMMENT_NODE?l.removeChild(a):a.nodeType===Node.ELEMENT_NODE&&(e(a),a.getAttribute("style")==""&&a.removeAttribute("style"),a.getAttribute("class")==""&&a.removeAttribute("class"))}}let n=t.cloneNode(!0),i=Array.from(t.querySelectorAll("foreignObject")),r=Array.from(n.querySelectorAll("foreignObject"));for(let l=0;l<i.length;l++){let c=i[l],a=r[l],s=i[l].querySelector("canvas");if(!s)continue;let u=n.ownerDocument.createElementNS("http://www.w3.org/2000/svg","image");u.setAttribute("href",s.toDataURL()),u.setAttribute("x",c.getAttribute("x")),u.setAttribute("y",c.getAttribute("y")),u.setAttribute("width",c.getAttribute("width")),u.setAttribute("height",c.getAttribute("height")),a.parentNode.replaceChild(u,a)}for(let l of n.querySelectorAll(".vvplot-interactive"))l.remove();return e(n),n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),n.setAttribute("version","1.1"),n.setAttribute("width",t.scrollWidth),n.setAttribute("height",t.scrollHeight),n.setAttribute("viewBox",`0 0 ${t.scrollWidth} ${t.scrollHeight}`),new XMLSerializer().serializeToString(n)}const Mo={axis:{line_width:1,tick_width:1,tick_length:5,label_size:12,title_size:18},axis_h:{title_offset:20},axis_v:{title_offset:30,title_angle:90},axis_left:{tick_position:"left",title_position:"left"},axis_right:{tick_position:"right",title_position:"right"},axis_top:{tick_position:"top",title_position:"top"},axis_bottom:{tick_position:"bottom",title_position:"bottom"},grid:{line_width:1,line_width_major:2},plot:{margin:20,padding_h:50,padding_v:20},legend:{spacing:4},selection:{background:"#00000020"}},To={axis:{line_color:"black",tick_color:"black",label_color:"black",title_color:"black"},grid:{line_color:"#eeeeee"}},Yl={axis:{line_color:"gray",tick_color:"gray",label_color:"gray",title_color:"gray"},grid:{line_color:"#eeeeee"}},zl={axis:{tick_color:"black",label_color:"black",title_color:"black"},grid:{line_color:"white"},plot:{background:"#eeeeee"}},Ul={axis:{tick_color:"#333333",label_color:"#555555",title_color:"black"},grid:{line_color:"#666666"},plot:{background:"#888888"}},Fl={axis:{line_color:"black",tick_color:"black",label_color:"black",title_color:"black"},grid:{line_color:"black",line_width_major:1,line_width_minor:.5}},Gl={axis:{line_color:"black",tick_color:"black",label_color:"black",title_color:"black"},grid:null},Wl={axis:null,grid:null};function _l(...t){return t.reduce((e,n)=>{for(let i in n)n[i]===null?e[i]=null:e[i]=Tt(e[i],n[i]);return e??void 0},{})}function Kl(t,e=!1){let{axis_h:n,axis_v:i,axis_x:r,axis_y:o,grid_h:l,grid_v:c,grid_x:a,grid_y:s,plot:{margin_x:u,margin_y:m,margin_h:f,margin_v:h,padding_x:d,padding_y:y,padding_h:v,padding_v:p,...T}={},...A}=t;return e?(n=Tt(n,o),i=Tt(i,r),l=Tt(l,a),c=Tt(c,s),T.margin_h=m===void 0?f:m,T.margin_v=u===void 0?h:u,T.padding_h=y===void 0?v:y,T.padding_v=d===void 0?p:d):(n=Tt(n,r),i=Tt(i,o),l=Tt(l,s),c=Tt(c,a),T.margin_h=u===void 0?f:u,T.margin_v=m===void 0?h:m,T.padding_h=d===void 0?v:d,T.padding_v=y===void 0?p:y),{axis_h:n,axis_v:i,grid_h:l,grid_v:c,plot:T,...A}}function Zl(t){function e(n){return{line_color_major:["line_color","line_color_major"].map(i=>n?.[i]).findLast(i=>i!==void 0),line_color_minor:["line_color","line_color_minor"].map(i=>n?.[i]).findLast(i=>i!==void 0),line_width_major:["line_width","line_width_major"].map(i=>n?.[i]).findLast(i=>i!==void 0),line_width_minor:["line_width","line_width_minor"].map(i=>n?.[i]).findLast(i=>i!==void 0)}}return{axis:{h:Tt(...["axis","axis_h"].map(n=>t?.[n])),v:Tt(...["axis","axis_v"].map(n=>t?.[n])),left:Tt(...["axis","axis_v","axis_left"].map(n=>t?.[n])),right:Tt(...["axis","axis_v","axis_right"].map(n=>t?.[n])),top:Tt(...["axis","axis_h","axis_top"].map(n=>t?.[n])),bottom:Tt(...["axis","axis_h","axis_bottom"].map(n=>t?.[n]))},grid:{h:e(Tt(...["grid","grid_h"].map(n=>t?.[n]))),v:e(Tt(...["grid","grid_v"].map(n=>t?.[n])))},plot:{margin:{left:["margin","margin_h","margin_left"].map(n=>t?.plot?.[n]).findLast(n=>n!==void 0)??0,right:["margin","margin_h","margin_right"].map(n=>t?.plot?.[n]).findLast(n=>n!==void 0)??0,top:["margin","margin_v","margin_top"].map(n=>t?.plot?.[n]).findLast(n=>n!==void 0)??0,bottom:["margin","margin_v","margin_bottom"].map(n=>t?.plot?.[n]).findLast(n=>n!==void 0)??0},padding:{left:["padding","padding_h","padding_left"].map(n=>t?.plot?.[n]).findLast(n=>n!==void 0)??0,right:["padding","padding_h","padding_right"].map(n=>t?.plot?.[n]).findLast(n=>n!==void 0)??0,top:["padding","padding_v","padding_top"].map(n=>t?.plot?.[n]).findLast(n=>n!==void 0)??0,bottom:["padding","padding_v","padding_bottom"].map(n=>t?.plot?.[n]).findLast(n=>n!==void 0)??0},background:t?.plot?.background},selection:t?.selection??{},legend:{spacing:t?.legend?.spacing??0}}}const Ql={base:Mo,default:To,light:Yl,classic:Gl,gray:zl,dark:Ul,linedraw:Fl,void:Wl},Jl={scale_attrs:[],coord_scale(t,e){return null},get_range(t,e){if(e=="x")return t.x??[];if(e=="y")return t.y??[]},validate(t){return null}};let Nt=Ot.sum;const ta={scale_attrs:["fill","color","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge??0,i=t.ynudge??0;if(t.x){let r=Nt(e.x?.apply?.(t.x)??t.x,n),o=Nt(r,t.width?.map?.(y=>-y/2)??-.5,n),l=Nt(r,t.width?.map?.(y=>+y/2)??.5,n),c=Nt(t.lwisker,i),a=Nt(t.Q1,i),s=Nt(t.median,i),u=Nt(t.Q3,i),m=Nt(t.uwisker,i),f=Ot.apply((y,{y:v,$raw:p},T)=>Nt(v,T).map((A,O)=>({x:y,y:A,$raw:p[O]})),r,t.outliers??[],i),h=Nt(t.min,i),d=Nt(t.max,i);return{x:r,xmin:o,xmax:l,lwisker:c,Q1:a,median:s,Q3:u,uwisker:m,outliers:f,$xmin:o,$xmax:l,$ymin:h,$ymax:d}}else if(t.y){let r=Nt(e.y?.apply?.(t.y)??t.y,i),o=Nt(r,t.height?.map?.(y=>-y/2)??-.5,i),l=Nt(r,t.height?.map?.(y=>+y/2)??.5,i),c=Nt(t.lwisker,n),a=Nt(t.Q1,n),s=Nt(t.median,n),u=Nt(t.Q3,n),m=Nt(t.uwisker,n),f=Ot.apply((y,{x:v,$raw:p},T)=>Nt(v,T).map((A,O)=>({x:A,y,$raw:p[O]})),r,t.outliers??[],n),h=Nt(t.xmin,n),d=Nt(t.xmax,n);return{y:r,ymin:o,ymax:l,lwisker:c,Q1:a,median:s,Q3:u,uwisker:m,outliers:f,$xmin:h,$xmax:d,$ymin:o,$ymax:l}}return{}},get_range(t,e){if(e=="x")return t.x||(t.min??[]).concat(t.max??[]);if(e=="y")return t.y||(t.min??[]).concat(t.max??[])},validate(t){return[t.$xmin,t.$xmax,t.$ymin,t.$ymax].some(e=>isNaN(e))?null:t}},ea={scale_attrs:["fill","color","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge?.map(o=>+o),i=t.ynudge?.map(o=>+o);return{points:t.points.map((o,l)=>o.map(c=>{let a=n?.[l]??0,s=i?.[l]??0;return{x:+(e?.x?.[c.x]??c.x)+a,y:+(e?.y?.[c.y]??c.y)+s}}))}},get_range(t,e){if(e=="x")return(t.points??[]).flatMap(n=>n.map(i=>i.x));if(e=="y")return(t.points??[]).flatMap(n=>n.map(i=>i.y))},validate(t){return Array.isArray(t.points)?t:null}};let We=Ot.sum;const na={scale_attrs:["fill","color","linewidth","linetype","alpha"],coord_scale(t,e){let{A:n,B:i,C:r}=t,o=t.xnudge??0,l=t.ynudge??0,c=We(e.x?.apply?.(t.cx)??t.cx,o),a=We(e.y?.apply?.(t.cy)??t.cy,l);return{cx:c,cy:a,A:n,B:i,C:r}},get_range(t,e){if(e=="x"){let n=Ot.apply((i,r,o)=>Math.sqrt(o/(i*o-r*r)),t.A??[],t.B??[],t.C??[]);return We(t.cx??[],n).concat(We(t.cx??[],Ot.opposite(n))??[])}if(e=="y"){let n=Ot.apply((i,r,o)=>Math.sqrt(i/(i*o-r*r)),t.A??[],t.B??[],t.C??[]);return We(t.cy??[],n).concat(We(t.cy??[],Ot.opposite(n))??[])}},validate(t){return isNaN(t.cx)||isNaN(t.cy)||isNaN(t.A)||isNaN(t.B)||isNaN(t.C)||!(t.A*t.C>t.B*t.B)?null:t}};let O1=Ot.sum;const ia={scale_attrs:["color","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge??0,i=t.ynudge??0,r=O1(e.x?.apply?.(t.x)??t.x,n),o=O1(e.y?.apply?.(t.y)??t.y,i),l=O1(e.x?.apply?.(t.xend)??t.xend,n),c=O1(e.y?.apply?.(t.yend)??t.yend,i);return{x:r,y:o,xend:l,yend:c}},get_range(t,e){if(e=="x")return(t.x??[]).concat(t.xend??[]);if(e=="y")return(t.y??[]).concat(t.yend??[])},validate(t){return isNaN(t.x)||isNaN(t.y)||isNaN(t.xend)||isNaN(t.yend)?null:t}};let mr=Ot.sum;const ra={scale_attrs:["size","color","stroke","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge??0,i=t.ynudge??0,r=mr(e.x?.apply?.(t.x)??t.x,n),o=mr(e.y?.apply?.(t.y)??t.y,i);return{x:r,y:o}},get_range(t,e){if(e=="x")return t.x??[];if(e=="y")return t.y??[]},validate(t){return isNaN(t.x)||isNaN(t.y)?null:t}};let j1=Ot.sum;const oa={scale_attrs:["size","color","stroke","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge??0,i=t.ynudge??0,r=j1(e.x?.apply?.(t.x)??t.x,n),o=j1(e.y?.apply?.(t.y)??t.y,i),l=j1(e.x?.apply?.(t.xend)??t.xend,n),c=j1(e.y?.apply?.(t.yend)??t.yend,i);return{x:r,y:o,xend:l,yend:c}},get_range(t,e){if(e=="x")return(t.x??[]).concat(t.xend??[]);if(e=="y")return(t.y??[]).concat(t.yend??[])},validate(t){return isNaN(t.x)||isNaN(t.xend)||isNaN(t.y)||isNaN(t.yend)?null:t}};let dr=Ot.sum;const sa={scale_attrs:["shape","size","color","stroke","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge??0,i=t.ynudge??0,r=dr(e.x?.apply?.(t.x)??t.x,n),o=dr(e.y?.apply?.(t.y)??t.y,i);return{x:r,y:o}},get_range(t,e){if(e=="x")return t.x??[];if(e=="y")return t.y??[]},validate(t){return isNaN(t.x)||isNaN(t.y)?null:t}},la={scale_attrs:["fill","color","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge?.map(o=>+o),i=t.ynudge?.map(o=>+o);return{points:t.points.map((o,l)=>o.map(c=>{let a=n?.[l]??0,s=i?.[l]??0;return{x:+(e?.x?.[c.x]??c.x)+a,y:+(e?.y?.[c.y]??c.y)+s}}))}},get_range(t,e){if(e=="x")return(t.points??[]).flatMap(n=>n.map(i=>i.x));if(e=="y")return(t.points??[]).flatMap(n=>n.map(i=>i.y))},validate(t){return Array.isArray(t.points)?t:null}};let P1=Ot.sum;const aa={scale_attrs:["fill","color","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge??0,i=t.ynudge??0,r=P1(e.x?.apply?.(t.xmin)??t.xmin,n),o=P1(e.x?.apply?.(t.xmax)??t.xmax,n),l=P1(e.y?.apply?.(t.ymin)??t.ymin,i),c=P1(e.y?.apply?.(t.ymax)??t.ymax,i);return{xmin:r,xmax:o,ymin:l,ymax:c}},get_range(t,e){if(e=="x")return(t.xmin??[]).concat(t.xmax??[]);if(e=="y")return(t.ymin??[]).concat(t.ymax??[])},validate(t){return isNaN(t.xmin)||isNaN(t.ymin)||isNaN(t.xmax)||isNaN(t.ymax)?null:t}};let _e=Ot.sum;const ca={scale_attrs:["color","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge??0,i=t.ynudge??0,r=_e(e.x?.apply?.(t.x)??t.x,n),o=_e(e.y?.apply?.(t.y)??t.y,i),l=_e(r,t.dx),c=_e(o,t.dy);return{x:r,y:o,xend:l,yend:c}},get_values(t,e){if(e=="x")return t.x??[];if(e=="y")return t.y??[]},get_range(t,e){if(e=="x")return(t.x??[]).concat(_e(t.x??[],t.dx??0)??[]);if(e=="y")return(t.y??[]).concat(_e(t.y??[],t.dy??0)??[])},validate(t){return isNaN(t.x)||isNaN(t.y)||isNaN(t.xend)||isNaN(t.yend)?null:t}};let gr=Ot.sum;const ua={scale_attrs:["size","color","stroke","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge??0,i=t.ynudge??0,r=gr(e.x?.apply?.(t.x)??t.x,n),o=gr(e.y?.apply?.(t.y)??t.y,i);return{x:r,y:o}},get_range(t,e){if(e=="x")return t.x??[];if(e=="y")return t.y??[]},validate(t){return isNaN(t.x)||isNaN(t.y)?null:t}};let D1=Ot.sum;const ha={scale_attrs:["size","color","stroke","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge??0,i=t.ynudge??0,r=D1(e.x?.apply?.(t.x)??t.x,n),o=D1(e.y?.apply?.(t.y)??t.y,i),l=D1(e.x?.apply?.(t.xend)??t.xend,n),c=D1(e.y?.apply?.(t.yend)??t.yend,i);return{x:r,y:o,xend:l,yend:c}},get_range(t,e){if(e=="x")return(t.x??[]).concat(t.xend??[]);if(e=="y")return(t.y??[]).concat(t.yend??[])},validate(t){return isNaN(t.x)||isNaN(t.xend)||isNaN(t.y)||isNaN(t.yend)?null:t}};let q1=Ot.sum;const fa={scale_attrs:["fill","color","linewidth","linetype","alpha"],coord_scale(t,e){let n=t.xnudge??0,i=t.ynudge??0,r=e.x?.apply?.(t.x)??t.x,o=e.y?.apply?.(t.y)??t.y,l=q1(r,t.width?.map?.(u=>-u/2)??-.5,n),c=q1(r,t.width?.map?.(u=>+u/2)??.5,n),a=q1(o,t.height?.map?.(u=>-u/2)??-.5,i),s=q1(o,t.height?.map?.(u=>+u/2)??.5,i);return{xmin:l,xmax:c,ymin:a,ymax:s}},get_values(t,e){if(e=="x")return t.x;if(e=="y")return t.y},get_range(t,e){if(e=="x"){let n=Ot.apply((r,o)=>+r-o/2,t.x??[],t.width??[]),i=Ot.apply((r,o)=>+r+o/2,t.x??[],t.width??[]);return n.concat(i)}if(e=="y"){let n=Ot.apply((r,o)=>+r-o/2,t.y??[],t.height??[]),i=Ot.apply((r,o)=>+r+o/2,t.y??[],t.height??[]);return n.concat(i)}},validate(t){return isNaN(t.xmin)||isNaN(t.ymin)||isNaN(t.xmax)||isNaN(t.ymax)?null:t}},Le=Object.freeze(Object.defineProperty({__proto__:null,blank:Jl,boxplot:ta,curve:ea,ellipse:na,line:ia,markdown:ra,markdownsegment:oa,point:sa,polygon:la,rect:aa,stick:ca,text:ua,textsegment:ha,tile:fa},Symbol.toStringTag,{value:"Module"})),ma=Object.assign(function(t){if(t.x!=null&&t.y!=null)throw new Error('"StatBar" only supports "x" or "y", not both');let e=t.x??t.y;if(e==null)throw new Error('Missing aesthetics for "StatBar": "x" or "y"');if(e.some(s=>typeof s=="number"))throw new Error('"StatBar" requires a discrete aesthetic');let n=Object.keys(t).filter(s=>!["x","y"].includes(s)&&!s.startsWith("$")),i=te(Object.fromEntries(n.map(s=>[s,t[s]]))),r=te({group:i??0,value:e}),o=Map.groupBy(t.$raw,(s,u)=>r.categories[r[u]]),l=Array.from(o.values()),c=Array.from(o.keys()),a={$raw:l,count:l.map(s=>s.length),$group:c.map(s=>s.group),value:c.map(s=>s.value)};for(let s of n)a[s]=c.map(u=>u.group).map(u=>i.categories[u][s]);return t.x?(({value:s,count:u,...m})=>({x:s,y:u.map(f=>f/2),height:u,...m}))(a):(({value:s,count:u,...m})=>({y:s,x:u.map(f=>f/2),width:u,...m}))(a)},{core_attrs:["x","y","xnudge","ynudge"]}),da=Object.assign(function(t,{}){let e=["x","y"].filter(M=>t[M]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatBoxplot": "${e.join('", "')}"`);let n=t.x.some(M=>typeof M!="number"),i=t.y.some(M=>typeof M!="number");if(n&&i)throw new Error('Both "x" and "y" are discrete, "StatBoxplot" requires one continuous and one discrete aesthetic');if(!n&&!i)throw new Error('Both "x" and "y" are continuous, "StatBoxplot" requires one continuous and one discrete aesthetic');let[r,o]=n?["y","x"]:["x","y"],l=Object.keys(t).filter(M=>M!=r&&!M.startsWith("$")),c=te(Object.fromEntries(l.map(M=>[M,t[M]]))),a=te({group:c??0,cate:t[o]}),s=Map.groupBy(a.map((M,g)=>g),(M,g)=>a.categories[a[g]]),u=Array.from(s.keys()),m=Array.from(s.values()).map(M=>M.map(g=>t.$raw[g])),f=Array.from(s.values()).map(M=>M.map(g=>t[r][g])),h=f.map(M=>Yt.min(M)),d=f.map(M=>Yt.quantile(M,.25)),y=f.map(M=>Yt.quantile(M,.5)),v=f.map(M=>Yt.quantile(M,.75)),p=f.map(M=>Yt.max(M)),T=f.map((M,g)=>v[g]-d[g]),A=f.map((M,g)=>Math.max(h[g],d[g]-1.5*T[g])),O=f.map((M,g)=>Math.min(p[g],v[g]+1.5*T[g])),j=Array.from(s.values()).map((M,g)=>{let b=M.filter(k=>t[r][k]<A[g]||t[r][k]>O[g]);return{[r]:b.map(k=>t[r][k]),$raw:b.map(k=>t.$raw[k])}}),N={$raw:m,$group:u.map(M=>M.group),min:h,lwisker:A,Q1:d,median:y,Q3:v,uwisker:O,max:p,outliers:j};for(let M of l)N[M]=u.map(g=>g.group).map(g=>c.categories[g][M]);return N},{core_attrs:["x","y","width","height","xnudge","ynudge"]}),ga=Object.assign(function(t){if(t.points!=null)return t;let e=["x","y"].filter(u=>t[u]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatCurve": "${e.join('", "')}" or "points"`);let n=Object.keys(t).filter(u=>!["x","y"].includes(u)&&!u.startsWith("$")),i=te(Object.fromEntries(n.map(u=>[u,t[u]]))),r=te({group:i??new Array(t.x.length).fill(0)}).map((u,m,f)=>f.categories[u]),o=Map.groupBy(t.$raw,(u,m)=>r[m]),l=Array.from(o.values()),c=Array.from(o.keys()),a=Array.from(Map.groupBy(vi({x:t.x,y:t.y}),(u,m)=>r[m]).values()),s={$raw:l,points:a};for(let u of n)s[u]=c.map(m=>m.group).map(m=>i.categories[m][u]);return s},{core_attrs:["x","y","xnudge","ynudge"]}),ya=Object.assign(function(t,{n:e=512,kernel:n="gaussian"}={}){if(t.x!=null&&t.y!=null)throw new Error('"StatDensity" only supports "x" or "y", not both');let i=t.x??t.y;if(i==null)throw new Error('Missing aesthetics for "StatDensity": "x" or "y"');if(i.some(h=>typeof h!="number"))throw new Error('"StatDensity" requires a continuous aesthetic');if(n=yr[n],!n)throw new Error(`kernel must be one of ${Object.keys(yr).map(h=>`"${h}"`).join(", ")}`);let r=Object.keys(t).filter(h=>!["x","y"].includes(h)&&!h.startsWith("$")),o=te(Object.fromEntries(r.map(h=>[h,t[h]]))),l=te({group:o??new Array(i.length).fill(0)}).map((h,d,y)=>y.categories[h]),c=Map.groupBy(t.$raw,(h,d)=>l[d]),a=Array.from(c.values()),s=Array.from(c.keys()),u=Array.from(Map.groupBy(i,(h,d)=>l[d]).values()),m={$raw:a,$group:s.map(h=>h.group)},f=u.map(h=>{let d=xa.nrd0(h),{min:y,max:v}=Yt.extent(h);y-=3*d,v+=3*d;let p=(v-y)/(e-1);return Array.from({length:e},(A,O)=>y+O*p).map(A=>[A,Yt.mean(h.map(O=>n((A-O)/d)))/d])});for(let h of r)m[h]=s.map(d=>o.categories[d.group][h]);return t.x?m.points=f.map(h=>h.map(([d,y])=>({x:d,y}))):m.points=f.map(h=>h.map(([d,y])=>({x:y,y:d}))),m},{core_attrs:["x","y","xnudge","ynudge"]}),xa={nrd0:function(t){t=t.filter(r=>(typeof r=="number"||r instanceof Date)&&isFinite(r));let e=Yt.sd(t),n=Yt.quantile(t,.75)-Yt.quantile(t,.25);return .9*(Math.min(e,n/1.34)||1)*t.length**-.2},nrd:function(t){t=t.filter(r=>(typeof r=="number"||r instanceof Date)&&isFinite(r));let e=Yt.sd(t),n=Yt.quantile(t,.75)-Yt.quantile(t,.25);return 1.06*(Math.min(e,n/1.34)||1)*t.length**-.2}},yr={uniform:t=>Math.abs(t)<=1?.5:0,triangular:t=>Math.abs(t)<=1?1-Math.abs(t):0,epanechnikov:t=>Math.abs(t)<=1?.75*(1-t**2):0,biweight:t=>Math.abs(t)<=1?15/16*(1-t**2)**2:0,triweight:t=>Math.abs(t)<=1?35/32*(1-t**2)**3:0,tricube:t=>Math.abs(t)<=1?70/81*(1-Math.abs(t)**3)**3:0,gaussian:t=>Math.exp(-.5*t**2)/Math.sqrt(2*Math.PI),cosine:t=>Math.abs(t)<=1?Math.PI/4*Math.cos(Math.PI/2*t):0,logistic:t=>1/Math.cosh(t)**2/Math.PI,sigmoid:t=>2/(Math.exp(t)+Math.exp(-t))**2/Math.PI},va=Object.assign(function(t,{CI:e=.95}={}){let n=["x","y"].filter(f=>t[f]==null);if(n.length>0)throw new Error(`Missing aesthetics for "StatEllipse": "${n.join('", "')}" or "points"`);let i=Object.keys(t).filter(f=>!["x","y"].includes(f)&&!f.startsWith("$")),r=te(Object.fromEntries(i.map(f=>[f,t[f]]))),o=te({group:r??new Array(t.x.length).fill(0)}).map((f,h,d)=>d.categories[f]),l=Map.groupBy(t.$raw,(f,h)=>o[h]),c=Array.from(l.values()),a=Array.from(l.keys()),s=-2*Math.log(1-e),u=Array.from(Map.groupBy(vi({x:t.x,y:t.y}),(f,h)=>o[h]).values()).map(f=>{const h=f.length;let d=f.reduce((O,j)=>O+j.x,0)/h,y=f.reduce((O,j)=>O+j.y,0)/h;if(h<2)return{};let v=f.reduce((O,j)=>O+(j.x-d)**2,0)/(h-1),p=f.reduce((O,j)=>O+(j.x-d)*(j.y-y),0)/(h-1),T=f.reduce((O,j)=>O+(j.y-y)**2,0)/(h-1),A=(v*T-p*p)*s;return{cx:d,cy:y,A:T/A,B:-p/A,C:v/A}}),m={$raw:c,cx:u.map(f=>f.cx??0),cy:u.map(f=>f.cy??0),A:u.map(f=>f.A??0),B:u.map(f=>f.B??0),C:u.map(f=>f.C??0)};for(let f of i)m[f]=a.map(h=>h.group).map(h=>r.categories[h][f]);return m},{core_attrs:["x","y","xnudge","ynudge"]}),pa=Object.assign(function(t,{bins:e=30,binwidth:n,breaks:i}={}){if(t.x!=null&&t.y!=null)throw new Error('"StatHistogram" only supports "x" or "y", not both');let r=t.x??t.y;if(r==null)throw new Error('Missing aesthetics for "StatHistogram": "x" or "y"');if(r.some(f=>typeof f!="number"))throw new Error('"StatHistogram" requires a continuous aesthetic');if(i)i.sort((f,h)=>f-h);else{let{min:f,max:h}=Yt.extent(r);n||(n=(h-f)/(e-1)),i=Array.from({length:e+1},(d,y)=>f+(y-.5)*n)}e=i.length-1;let o=Object.keys(t).filter(f=>!["x","y"].includes(f)&&!f.startsWith("$")),l=te(Object.fromEntries(o.map(f=>[f,t[f]]))),c=te({group:l??new Array(r.length).fill(0),upper:r.map(f=>i.findLast(h=>h<=f)??i[0]),lower:r.map(f=>i.find(h=>h>f)??i[e])}).map((f,h,d)=>d.categories[f]),a=Map.groupBy(t.$raw,(f,h)=>c[h]),s=Array.from(a.values()),u=Array.from(a.keys()),m={$raw:s,count:s.map(f=>f.length),$group:u.map(f=>f.group),upper:u.map(f=>f.upper),lower:u.map(f=>f.lower)};for(let f of o)m[f]=u.map(h=>l.categories[h.group][f]);return t.x?(({upper:f,lower:h,count:d,ymin:y=s.map(()=>0),...v})=>({xmin:f,xmax:h,ymin:y,ymax:d,...v}))(m):(({upper:f,lower:h,count:d,xmin:y=s.map(()=>0),...v})=>({xmin:y,xmax:d,ymin:f,ymax:h,...v}))(m)},{core_attrs:["x","y","xnudge","ynudge"]}),ba=Object.assign(function(t){return t},{core_attrs:["x","y","xnudge","ynudge"]}),wa=Object.assign(function(t,{orientation:e="x"}={}){let n=["x","y"].filter(s=>t[s]==null);if(n.length>0)throw new Error(`Missing aesthetics for "StatLine": "${n.join('", "')}"`);let i=t.group??new Array(t.x.length).fill(null),o=Object.values(i.reduce((s,u,m)=>(s[u]??=[],s[u].push(m),s),{})).map(s=>s.map((u,m)=>[t[e][u],m]).sort((u,m)=>u[0]-m[0]).map((u,m)=>s[u[1]])),l=o.map(s=>s.slice(0,-1).concat(NaN)).reduce((s,u)=>s.concat(u),[]).filter(s=>!isNaN(s)),c=o.map(s=>s.slice(1).concat(NaN)).reduce((s,u)=>s.concat(u),[]).filter(s=>!isNaN(s)),a={};for(let s in t)a[s]=l.map(u=>t[s][u]);return a.xend=c.map(s=>t.x[s]),a.yend=c.map(s=>t.y[s]),a},{core_attrs:["x","y","xnudge","ynudge"]}),ka=Object.assign(function(t){if(t.x!=null){let e=["x","ymin","ymax"].filter(n=>t[n]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatLinerange": "${e.join('", "')}"`);return(({x:n,ymin:i,ymax:r,...o})=>({x:n,xend:n,y:i,yend:r,...o}))(t)}else if(t.y!=null){let e=["y","xmin","xmax"].filter(n=>t[n]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatLinerange": "${e.join('", "')}"`);return(({y:n,xmin:i,xmax:r,...o})=>({y:n,yend:n,x:i,xend:r,...o}))(t)}else throw new Error('Missing aesthetics for "StatLinerange": x,ymin,ymax or y,xmin,xmax')},{core_attrs:["x","y","xmin","xmax","ymin","ymax","xnudge","ynudge"]}),Aa=Object.assign(function(t){let e=["x","y"].filter(a=>t[a]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatPath": "${e.join('", "')}"`);let n=t.group??new Array(t.x.length).fill(null),r=Object.values(n.reduce((a,s,u)=>(a[s]??=[],a[s].push(u),a),{})).map(a=>a.map((s,u)=>a[u])),o=r.map(a=>a.slice(0,-1).concat(NaN)).reduce((a,s)=>a.concat(s),[]).filter(a=>!isNaN(a)),l=r.map(a=>a.slice(1).concat(NaN)).reduce((a,s)=>a.concat(s),[]).filter(a=>!isNaN(a)),c={};for(let a in t)c[a]=o.map(s=>t[a][s]);return c.xend=l.map(a=>t.x[a]),c.yend=l.map(a=>t.y[a]),c},{core_attrs:["x","y","xnudge","ynudge"]}),Sa=Object.assign(function(t){let e=["x","y"].filter(n=>t[n]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatPoint": "${e.join('", "')}"`);return t},{core_attrs:["x","y","xnudge","ynudge"]}),Ca=Object.assign(function(t){if(t.points!=null)return t;let e=["x","y"].filter(u=>t[u]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatPolygon": "${e.join('", "')}" or "points"`);let n=Object.keys(t).filter(u=>!["x","y"].includes(u)&&!u.startsWith("$")),i=te(Object.fromEntries(n.map(u=>[u,t[u]]))),r=te({group:i??new Array(t.x.length).fill(0)}).map((u,m,f)=>f.categories[u]),o=Map.groupBy(t.$raw,(u,m)=>r[m]),l=Array.from(o.values()),c=Array.from(o.keys()),a=Array.from(Map.groupBy(vi({x:t.x,y:t.y}),(u,m)=>r[m]).values()),s={$raw:l,points:a};for(let u of n)s[u]=c.map(m=>m.group).map(m=>i.categories[m][u]);return s},{core_attrs:["points","xnudge","ynudge"]}),Na=Object.assign(function(t){let e=["xmin","xmax","ymin","ymax"].filter(n=>t[n]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatRect": "${e.join('", "')}"`);return t},{core_attrs:["xmin","xmax","ymin","ymax","xnudge","ynudge"]}),Ma=Object.assign(function(t){t.xend==null&&(t.xend=t.x),t.yend==null&&(t.yend=t.y);let e=["x","y","xend","yend"].filter(n=>t[n]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatSegment": "${e.join('", "')}"`);return t},{core_attrs:["x","y","xend","yend","xnudge","ynudge"]}),Ta=Object.assign(function(t){t.dx==null&&(t.dx=Array(t.x.length).fill(0)),t.dy==null&&(t.dy=Array(t.y.length).fill(0));let e=["x","y","dx","dy"].filter(n=>t[n]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatStick": "${e.join('", "')}"`);return t},{core_attrs:["x","y","dx","dy","xnudge","ynudge"]}),$a=Object.assign(function(t){let e=["x","y","label"].filter(n=>t[n]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatText": "${e.join('", "')}"`);return t},{core_attrs:["x","y","xnudge","ynudge","label","text-length"]}),Ea=Object.assign(function(t){t.xend==null&&(t.xend=t.x),t.yend==null&&(t.yend=t.y);let e=["x","y","xend","yend","label"].filter(n=>t[n]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatTextsegment": "${e.join('", "')}"`);return t},{core_attrs:["x","y","xend","yend","xnudge","ynudge","label"]}),La=Object.assign(function(t){t.width==null&&t.x.some(n=>typeof n=="string")&&(t.width=Array(t.x.length).fill(1)),t.height==null&&t.y.some(n=>typeof n=="string")&&(t.height=Array(t.y.length).fill(1));let e=["x","y","width","height"].filter(n=>t[n]==null);if(e.length>0)throw new Error(`Missing aesthetics for "StatTile": "${e.join('", "')}"`);return t},{core_attrs:["x","y","width","height","xnudge","ynudge"]}),Oa=Object.freeze(Object.defineProperty({__proto__:null,bar:ma,boxplot:da,curve:ga,density:ya,ellipse:va,histogram:pa,identity:ba,line:wa,linerange:ka,path:Aa,point:Sa,polygon:Ca,rect:Na,segment:Ma,stick:Ta,text:$a,textsegment:Ea,tile:La},Symbol.toStringTag,{value:"Module"}));function F1(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ja(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function $o(t){let e,n,i;t.length!==2?(e=F1,n=(c,a)=>F1(t(c),a),i=(c,a)=>t(c)-a):(e=t===F1||t===ja?t:Pa,n=t,i=t);function r(c,a,s=0,u=c.length){if(s<u){if(e(a,a)!==0)return u;do{const m=s+u>>>1;n(c[m],a)<0?s=m+1:u=m}while(s<u)}return s}function o(c,a,s=0,u=c.length){if(s<u){if(e(a,a)!==0)return u;do{const m=s+u>>>1;n(c[m],a)<=0?s=m+1:u=m}while(s<u)}return s}function l(c,a,s=0,u=c.length){const m=r(c,a,s,u-1);return m>s&&i(c[m-1],a)>-i(c[m],a)?m-1:m}return{left:r,center:l,right:o}}function Pa(){return 0}function Da(t){return t===null?NaN:+t}const qa=$o(F1),Ba=qa.right;$o(Da).center;const Va=Math.sqrt(50),Ia=Math.sqrt(10),Ra=Math.sqrt(2);function tn(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),o=i/Math.pow(10,r),l=o>=Va?10:o>=Ia?5:o>=Ra?2:1;let c,a,s;return r<0?(s=Math.pow(10,-r)/l,c=Math.round(t*s),a=Math.round(e*s),c/s<t&&++c,a/s>e&&--a,s=-s):(s=Math.pow(10,r)*l,c=Math.round(t/s),a=Math.round(e/s),c*s<t&&++c,a*s>e&&--a),a<c&&.5<=n&&n<2?tn(t,e,n*2):[c,a,s]}function Ha(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const i=e<t,[r,o,l]=i?tn(e,t,n):tn(t,e,n);if(!(o>=r))return[];const c=o-r+1,a=new Array(c);if(i)if(l<0)for(let s=0;s<c;++s)a[s]=(o-s)/-l;else for(let s=0;s<c;++s)a[s]=(o-s)*l;else if(l<0)for(let s=0;s<c;++s)a[s]=(r+s)/-l;else for(let s=0;s<c;++s)a[s]=(r+s)*l;return a}function _n(t,e,n){return e=+e,t=+t,n=+n,tn(t,e,n)[2]}function Xa(t,e,n){e=+e,t=+t,n=+n;const i=e<t,r=i?_n(e,t,n):_n(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}var Ya={value:()=>{}};function Eo(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new G1(n)}function G1(t){this._=t}function za(t,e){return t.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}G1.prototype=Eo.prototype={constructor:G1,on:function(t,e){var n=this._,i=za(t+"",n),r,o=-1,l=i.length;if(arguments.length<2){for(;++o<l;)if((r=(t=i[o]).type)&&(r=Ua(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<l;)if(r=(t=i[o]).type)n[r]=xr(n[r],t.name,e);else if(e==null)for(r in n)n[r]=xr(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new G1(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,o;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],i=0,r=o.length;i<r;++i)o[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(e,n)}};function Ua(t,e){for(var n=0,i=t.length,r;n<i;++n)if((r=t[n]).name===e)return r.value}function xr(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=Ya,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var Kn="http://www.w3.org/1999/xhtml";const vr={svg:"http://www.w3.org/2000/svg",xhtml:Kn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function An(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),vr.hasOwnProperty(e)?{space:vr[e],local:t}:t}function Fa(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Kn&&e.documentElement.namespaceURI===Kn?e.createElement(t):e.createElementNS(n,t)}}function Ga(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Lo(t){var e=An(t);return(e.local?Ga:Fa)(e)}function Wa(){}function pi(t){return t==null?Wa:function(){return this.querySelector(t)}}function _a(t){typeof t!="function"&&(t=pi(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],l=o.length,c=i[r]=new Array(l),a,s,u=0;u<l;++u)(a=o[u])&&(s=t.call(a,a.__data__,u,o))&&("__data__"in a&&(s.__data__=a.__data__),c[u]=s);return new ce(i,this._parents)}function Ka(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Za(){return[]}function Oo(t){return t==null?Za:function(){return this.querySelectorAll(t)}}function Qa(t){return function(){return Ka(t.apply(this,arguments))}}function Ja(t){typeof t=="function"?t=Qa(t):t=Oo(t);for(var e=this._groups,n=e.length,i=[],r=[],o=0;o<n;++o)for(var l=e[o],c=l.length,a,s=0;s<c;++s)(a=l[s])&&(i.push(t.call(a,a.__data__,s,l)),r.push(a));return new ce(i,r)}function jo(t){return function(){return this.matches(t)}}function Po(t){return function(e){return e.matches(t)}}var tc=Array.prototype.find;function ec(t){return function(){return tc.call(this.children,t)}}function nc(){return this.firstElementChild}function ic(t){return this.select(t==null?nc:ec(typeof t=="function"?t:Po(t)))}var rc=Array.prototype.filter;function oc(){return Array.from(this.children)}function sc(t){return function(){return rc.call(this.children,t)}}function lc(t){return this.selectAll(t==null?oc:sc(typeof t=="function"?t:Po(t)))}function ac(t){typeof t!="function"&&(t=jo(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],l=o.length,c=i[r]=[],a,s=0;s<l;++s)(a=o[s])&&t.call(a,a.__data__,s,o)&&c.push(a);return new ce(i,this._parents)}function Do(t){return new Array(t.length)}function cc(){return new ce(this._enter||this._groups.map(Do),this._parents)}function en(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}en.prototype={constructor:en,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function uc(t){return function(){return t}}function hc(t,e,n,i,r,o){for(var l=0,c,a=e.length,s=o.length;l<s;++l)(c=e[l])?(c.__data__=o[l],i[l]=c):n[l]=new en(t,o[l]);for(;l<a;++l)(c=e[l])&&(r[l]=c)}function fc(t,e,n,i,r,o,l){var c,a,s=new Map,u=e.length,m=o.length,f=new Array(u),h;for(c=0;c<u;++c)(a=e[c])&&(f[c]=h=l.call(a,a.__data__,c,e)+"",s.has(h)?r[c]=a:s.set(h,a));for(c=0;c<m;++c)h=l.call(t,o[c],c,o)+"",(a=s.get(h))?(i[c]=a,a.__data__=o[c],s.delete(h)):n[c]=new en(t,o[c]);for(c=0;c<u;++c)(a=e[c])&&s.get(f[c])===a&&(r[c]=a)}function mc(t){return t.__data__}function dc(t,e){if(!arguments.length)return Array.from(this,mc);var n=e?fc:hc,i=this._parents,r=this._groups;typeof t!="function"&&(t=uc(t));for(var o=r.length,l=new Array(o),c=new Array(o),a=new Array(o),s=0;s<o;++s){var u=i[s],m=r[s],f=m.length,h=gc(t.call(u,u&&u.__data__,s,i)),d=h.length,y=c[s]=new Array(d),v=l[s]=new Array(d),p=a[s]=new Array(f);n(u,m,y,v,p,h,e);for(var T=0,A=0,O,j;T<d;++T)if(O=y[T]){for(T>=A&&(A=T+1);!(j=v[A])&&++A<d;);O._next=j||null}}return l=new ce(l,i),l._enter=c,l._exit=a,l}function gc(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function yc(){return new ce(this._exit||this._groups.map(Do),this._parents)}function xc(t,e,n){var i=this.enter(),r=this,o=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(r=e(r),r&&(r=r.selection())),n==null?o.remove():n(o),i&&r?i.merge(r).order():r}function vc(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,o=i.length,l=Math.min(r,o),c=new Array(r),a=0;a<l;++a)for(var s=n[a],u=i[a],m=s.length,f=c[a]=new Array(m),h,d=0;d<m;++d)(h=s[d]||u[d])&&(f[d]=h);for(;a<r;++a)c[a]=n[a];return new ce(c,this._parents)}function pc(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i=t[e],r=i.length-1,o=i[r],l;--r>=0;)(l=i[r])&&(o&&l.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(l,o),o=l);return this}function bc(t){t||(t=wc);function e(m,f){return m&&f?t(m.__data__,f.__data__):!m-!f}for(var n=this._groups,i=n.length,r=new Array(i),o=0;o<i;++o){for(var l=n[o],c=l.length,a=r[o]=new Array(c),s,u=0;u<c;++u)(s=l[u])&&(a[u]=s);a.sort(e)}return new ce(r,this._parents).order()}function wc(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function kc(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Ac(){return Array.from(this)}function Sc(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length;r<o;++r){var l=i[r];if(l)return l}return null}function Cc(){let t=0;for(const e of this)++t;return t}function Nc(){return!this.node()}function Mc(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r=e[n],o=0,l=r.length,c;o<l;++o)(c=r[o])&&t.call(c,c.__data__,o,r);return this}function Tc(t){return function(){this.removeAttribute(t)}}function $c(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ec(t,e){return function(){this.setAttribute(t,e)}}function Lc(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Oc(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function jc(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Pc(t,e){var n=An(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((e==null?n.local?$c:Tc:typeof e=="function"?n.local?jc:Oc:n.local?Lc:Ec)(n,e))}function qo(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Dc(t){return function(){this.style.removeProperty(t)}}function qc(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Bc(t,e,n){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Vc(t,e,n){return arguments.length>1?this.each((e==null?Dc:typeof e=="function"?Bc:qc)(t,e,n??"")):s1(this.node(),t)}function s1(t,e){return t.style.getPropertyValue(e)||qo(t).getComputedStyle(t,null).getPropertyValue(e)}function Ic(t){return function(){delete this[t]}}function Rc(t,e){return function(){this[t]=e}}function Hc(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Xc(t,e){return arguments.length>1?this.each((e==null?Ic:typeof e=="function"?Hc:Rc)(t,e)):this.node()[t]}function Bo(t){return t.trim().split(/^|\s+/)}function bi(t){return t.classList||new Vo(t)}function Vo(t){this._node=t,this._names=Bo(t.getAttribute("class")||"")}Vo.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Io(t,e){for(var n=bi(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function Ro(t,e){for(var n=bi(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function Yc(t){return function(){Io(this,t)}}function zc(t){return function(){Ro(this,t)}}function Uc(t,e){return function(){(e.apply(this,arguments)?Io:Ro)(this,t)}}function Fc(t,e){var n=Bo(t+"");if(arguments.length<2){for(var i=bi(this.node()),r=-1,o=n.length;++r<o;)if(!i.contains(n[r]))return!1;return!0}return this.each((typeof e=="function"?Uc:e?Yc:zc)(n,e))}function Gc(){this.textContent=""}function Wc(t){return function(){this.textContent=t}}function _c(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Kc(t){return arguments.length?this.each(t==null?Gc:(typeof t=="function"?_c:Wc)(t)):this.node().textContent}function Zc(){this.innerHTML=""}function Qc(t){return function(){this.innerHTML=t}}function Jc(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function t0(t){return arguments.length?this.each(t==null?Zc:(typeof t=="function"?Jc:Qc)(t)):this.node().innerHTML}function e0(){this.nextSibling&&this.parentNode.appendChild(this)}function n0(){return this.each(e0)}function i0(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function r0(){return this.each(i0)}function o0(t){var e=typeof t=="function"?t:Lo(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function s0(){return null}function l0(t,e){var n=typeof t=="function"?t:Lo(t),i=e==null?s0:typeof e=="function"?e:pi(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function a0(){var t=this.parentNode;t&&t.removeChild(this)}function c0(){return this.each(a0)}function u0(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function h0(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function f0(t){return this.select(t?h0:u0)}function m0(t){return arguments.length?this.property("__data__",t):this.node().__data__}function d0(t){return function(e){t.call(this,e,this.__data__)}}function g0(t){return t.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function y0(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,r=e.length,o;n<r;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++i]=o;++i?e.length=i:delete this.__on}}}function x0(t,e,n){return function(){var i=this.__on,r,o=d0(e);if(i){for(var l=0,c=i.length;l<c;++l)if((r=i[l]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),r.value=e;return}}this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function v0(t,e,n){var i=g0(t+""),r,o=i.length,l;if(arguments.length<2){var c=this.node().__on;if(c){for(var a=0,s=c.length,u;a<s;++a)for(r=0,u=c[a];r<o;++r)if((l=i[r]).type===u.type&&l.name===u.name)return u.value}return}for(c=e?x0:y0,r=0;r<o;++r)this.each(c(i[r],e,n));return this}function Ho(t,e,n){var i=qo(t),r=i.CustomEvent;typeof r=="function"?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function p0(t,e){return function(){return Ho(this,t,e)}}function b0(t,e){return function(){return Ho(this,t,e.apply(this,arguments))}}function w0(t,e){return this.each((typeof e=="function"?b0:p0)(t,e))}function*k0(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length,l;r<o;++r)(l=i[r])&&(yield l)}var A0=[null];function ce(t,e){this._groups=t,this._parents=e}function M1(){return new ce([[document.documentElement]],A0)}function S0(){return this}ce.prototype=M1.prototype={constructor:ce,select:_a,selectAll:Ja,selectChild:ic,selectChildren:lc,filter:ac,data:dc,enter:cc,exit:yc,join:xc,merge:vc,selection:S0,order:pc,sort:bc,call:kc,nodes:Ac,node:Sc,size:Cc,empty:Nc,each:Mc,attr:Pc,style:Vc,property:Xc,classed:Fc,text:Kc,html:t0,raise:n0,lower:r0,append:o0,insert:l0,remove:c0,clone:f0,datum:m0,on:v0,dispatch:w0,[Symbol.iterator]:k0};function T1(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Sn(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function ze(){}var b1=.7,nn=1/b1,n1="\\s*([+-]?\\d+)\\s*",w1="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",me="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",C0=/^#([0-9a-f]{3,8})$/,N0=new RegExp(`^rgb\\(${n1},${n1},${n1}\\)$`),M0=new RegExp(`^rgb\\(${me},${me},${me}\\)$`),T0=new RegExp(`^rgba\\(${n1},${n1},${n1},${w1}\\)$`),$0=new RegExp(`^rgba\\(${me},${me},${me},${w1}\\)$`),E0=new RegExp(`^hsl\\(${w1},${me},${me}\\)$`),L0=new RegExp(`^hsla\\(${w1},${me},${me},${w1}\\)$`),pr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};T1(ze,Re,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:br,formatHex:br,formatHex8:O0,formatHsl:j0,formatRgb:wr,toString:wr});function br(){return this.rgb().formatHex()}function O0(){return this.rgb().formatHex8()}function j0(){return Yo(this).formatHsl()}function wr(){return this.rgb().formatRgb()}function Re(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=C0.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?kr(e):n===3?new Wt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?B1(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?B1(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=N0.exec(t))?new Wt(e[1],e[2],e[3],1):(e=M0.exec(t))?new Wt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=T0.exec(t))?B1(e[1],e[2],e[3],e[4]):(e=$0.exec(t))?B1(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=E0.exec(t))?Cr(e[1],e[2]/100,e[3]/100,1):(e=L0.exec(t))?Cr(e[1],e[2]/100,e[3]/100,e[4]):pr.hasOwnProperty(t)?kr(pr[t]):t==="transparent"?new Wt(NaN,NaN,NaN,0):null}function kr(t){return new Wt(t>>16&255,t>>8&255,t&255,1)}function B1(t,e,n,i){return i<=0&&(t=e=n=NaN),new Wt(t,e,n,i)}function Xo(t){return t instanceof ze||(t=Re(t)),t?(t=t.rgb(),new Wt(t.r,t.g,t.b,t.opacity)):new Wt}function Zn(t,e,n,i){return arguments.length===1?Xo(t):new Wt(t,e,n,i??1)}function Wt(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}T1(Wt,Zn,Sn(ze,{brighter(t){return t=t==null?nn:Math.pow(nn,t),new Wt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?b1:Math.pow(b1,t),new Wt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Wt(Ie(this.r),Ie(this.g),Ie(this.b),rn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ar,formatHex:Ar,formatHex8:P0,formatRgb:Sr,toString:Sr}));function Ar(){return`#${Be(this.r)}${Be(this.g)}${Be(this.b)}`}function P0(){return`#${Be(this.r)}${Be(this.g)}${Be(this.b)}${Be((isNaN(this.opacity)?1:this.opacity)*255)}`}function Sr(){const t=rn(this.opacity);return`${t===1?"rgb(":"rgba("}${Ie(this.r)}, ${Ie(this.g)}, ${Ie(this.b)}${t===1?")":`, ${t})`}`}function rn(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ie(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Be(t){return t=Ie(t),(t<16?"0":"")+t.toString(16)}function Cr(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ae(t,e,n,i)}function Yo(t){if(t instanceof ae)return new ae(t.h,t.s,t.l,t.opacity);if(t instanceof ze||(t=Re(t)),!t)return new ae;if(t instanceof ae)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),l=NaN,c=o-r,a=(o+r)/2;return c?(e===o?l=(n-i)/c+(n<i)*6:n===o?l=(i-e)/c+2:l=(e-n)/c+4,c/=a<.5?o+r:2-o-r,l*=60):c=a>0&&a<1?0:l,new ae(l,c,a,t.opacity)}function D0(t,e,n,i){return arguments.length===1?Yo(t):new ae(t,e,n,i??1)}function ae(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}T1(ae,D0,Sn(ze,{brighter(t){return t=t==null?nn:Math.pow(nn,t),new ae(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?b1:Math.pow(b1,t),new ae(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Wt(Pn(t>=240?t-240:t+120,r,i),Pn(t,r,i),Pn(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new ae(Nr(this.h),V1(this.s),V1(this.l),rn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=rn(this.opacity);return`${t===1?"hsl(":"hsla("}${Nr(this.h)}, ${V1(this.s)*100}%, ${V1(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Nr(t){return t=(t||0)%360,t<0?t+360:t}function V1(t){return Math.max(0,Math.min(1,t||0))}function Pn(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const q0=Math.PI/180,B0=180/Math.PI,on=18,zo=.96422,Uo=1,Fo=.82521,Go=4/29,i1=6/29,Wo=3*i1*i1,V0=i1*i1*i1;function _o(t){if(t instanceof de)return new de(t.l,t.a,t.b,t.opacity);if(t instanceof Ae)return Zo(t);t instanceof Wt||(t=Xo(t));var e=Vn(t.r),n=Vn(t.g),i=Vn(t.b),r=Dn((.2225045*e+.7168786*n+.0606169*i)/Uo),o,l;return e===n&&n===i?o=l=r:(o=Dn((.4360747*e+.3850649*n+.1430804*i)/zo),l=Dn((.0139322*e+.0971045*n+.7141733*i)/Fo)),new de(116*r-16,500*(o-r),200*(r-l),t.opacity)}function Qn(t,e,n,i){return arguments.length===1?_o(t):new de(t,e,n,i??1)}function de(t,e,n,i){this.l=+t,this.a=+e,this.b=+n,this.opacity=+i}T1(de,Qn,Sn(ze,{brighter(t){return new de(this.l+on*(t??1),this.a,this.b,this.opacity)},darker(t){return new de(this.l-on*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=zo*qn(e),t=Uo*qn(t),n=Fo*qn(n),new Wt(Bn(3.1338561*e-1.6168667*t-.4906146*n),Bn(-.9787684*e+1.9161415*t+.033454*n),Bn(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Dn(t){return t>V0?Math.pow(t,1/3):t/Wo+Go}function qn(t){return t>i1?t*t*t:Wo*(t-Go)}function Bn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Vn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function I0(t){if(t instanceof Ae)return new Ae(t.h,t.c,t.l,t.opacity);if(t instanceof de||(t=_o(t)),t.a===0&&t.b===0)return new Ae(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*B0;return new Ae(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Ko(t,e,n,i){return arguments.length===1?I0(t):new Ae(t,e,n,i??1)}function Ae(t,e,n,i){this.h=+t,this.c=+e,this.l=+n,this.opacity=+i}function Zo(t){if(isNaN(t.h))return new de(t.l,0,0,t.opacity);var e=t.h*q0;return new de(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}T1(Ae,Ko,Sn(ze,{brighter(t){return new Ae(this.h,this.c,this.l+on*(t??1),this.opacity)},darker(t){return new Ae(this.h,this.c,this.l-on*(t??1),this.opacity)},rgb(){return Zo(this).rgb()}}));const wi=t=>()=>t;function R0(t,e){return function(n){return t+n*e}}function H0(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function X0(t){return(t=+t)==1?Je:function(e,n){return n-e?H0(e,n,t):wi(isNaN(e)?n:e)}}function Je(t,e){var n=e-t;return n?R0(t,n):wi(isNaN(t)?e:t)}const sn=(function t(e){var n=X0(e);function i(r,o){var l=n((r=Zn(r)).r,(o=Zn(o)).r),c=n(r.g,o.g),a=n(r.b,o.b),s=Je(r.opacity,o.opacity);return function(u){return r.r=l(u),r.g=c(u),r.b=a(u),r.opacity=s(u),r+""}}return i.gamma=t,i})(1);function Y0(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,i=e.slice(),r;return function(o){for(r=0;r<n;++r)i[r]=t[r]*(1-o)+e[r]*o;return i}}function z0(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function U0(t,e){var n=e?e.length:0,i=t?Math.min(n,t.length):0,r=new Array(i),o=new Array(n),l;for(l=0;l<i;++l)r[l]=ki(t[l],e[l]);for(;l<n;++l)o[l]=e[l];return function(c){for(l=0;l<i;++l)o[l]=r[l](c);return o}}function F0(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function le(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function G0(t,e){var n={},i={},r;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(r in e)r in t?n[r]=ki(t[r],e[r]):i[r]=e[r];return function(o){for(r in n)i[r]=n[r](o);return i}}var Jn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,In=new RegExp(Jn.source,"g");function W0(t){return function(){return t}}function _0(t){return function(e){return t(e)+""}}function Qo(t,e){var n=Jn.lastIndex=In.lastIndex=0,i,r,o,l=-1,c=[],a=[];for(t=t+"",e=e+"";(i=Jn.exec(t))&&(r=In.exec(e));)(o=r.index)>n&&(o=e.slice(n,o),c[l]?c[l]+=o:c[++l]=o),(i=i[0])===(r=r[0])?c[l]?c[l]+=r:c[++l]=r:(c[++l]=null,a.push({i:l,x:le(i,r)})),n=In.lastIndex;return n<e.length&&(o=e.slice(n),c[l]?c[l]+=o:c[++l]=o),c.length<2?a[0]?_0(a[0].x):W0(e):(e=a.length,function(s){for(var u=0,m;u<e;++u)c[(m=a[u]).i]=m.x(s);return c.join("")})}function ki(t,e){var n=typeof e,i;return e==null||n==="boolean"?wi(e):(n==="number"?le:n==="string"?(i=Re(e))?(e=i,sn):Qo:e instanceof Re?sn:e instanceof Date?F0:z0(e)?Y0:Array.isArray(e)?U0:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?G0:le)(t,e)}function K0(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Mr=180/Math.PI,ti={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Jo(t,e,n,i,r,o){var l,c,a;return(l=Math.sqrt(t*t+e*e))&&(t/=l,e/=l),(a=t*n+e*i)&&(n-=t*a,i-=e*a),(c=Math.sqrt(n*n+i*i))&&(n/=c,i/=c,a/=c),t*i<e*n&&(t=-t,e=-e,a=-a,l=-l),{translateX:r,translateY:o,rotate:Math.atan2(e,t)*Mr,skewX:Math.atan(a)*Mr,scaleX:l,scaleY:c}}var I1;function Z0(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?ti:Jo(e.a,e.b,e.c,e.d,e.e,e.f)}function Q0(t){return t==null||(I1||(I1=document.createElementNS("http://www.w3.org/2000/svg","g")),I1.setAttribute("transform",t),!(t=I1.transform.baseVal.consolidate()))?ti:(t=t.matrix,Jo(t.a,t.b,t.c,t.d,t.e,t.f))}function ts(t,e,n,i){function r(s){return s.length?s.pop()+" ":""}function o(s,u,m,f,h,d){if(s!==m||u!==f){var y=h.push("translate(",null,e,null,n);d.push({i:y-4,x:le(s,m)},{i:y-2,x:le(u,f)})}else(m||f)&&h.push("translate("+m+e+f+n)}function l(s,u,m,f){s!==u?(s-u>180?u+=360:u-s>180&&(s+=360),f.push({i:m.push(r(m)+"rotate(",null,i)-2,x:le(s,u)})):u&&m.push(r(m)+"rotate("+u+i)}function c(s,u,m,f){s!==u?f.push({i:m.push(r(m)+"skewX(",null,i)-2,x:le(s,u)}):u&&m.push(r(m)+"skewX("+u+i)}function a(s,u,m,f,h,d){if(s!==m||u!==f){var y=h.push(r(h)+"scale(",null,",",null,")");d.push({i:y-4,x:le(s,m)},{i:y-2,x:le(u,f)})}else(m!==1||f!==1)&&h.push(r(h)+"scale("+m+","+f+")")}return function(s,u){var m=[],f=[];return s=t(s),u=t(u),o(s.translateX,s.translateY,u.translateX,u.translateY,m,f),l(s.rotate,u.rotate,m,f),c(s.skewX,u.skewX,m,f),a(s.scaleX,s.scaleY,u.scaleX,u.scaleY,m,f),s=u=null,function(h){for(var d=-1,y=f.length,v;++d<y;)m[(v=f[d]).i]=v.x(h);return m.join("")}}}var J0=ts(Z0,"px, ","px)","deg)"),tu=ts(Q0,", ",")",")");function ei(t,e){var n=Je((t=Qn(t)).l,(e=Qn(e)).l),i=Je(t.a,e.a),r=Je(t.b,e.b),o=Je(t.opacity,e.opacity);return function(l){return t.l=n(l),t.a=i(l),t.b=r(l),t.opacity=o(l),t+""}}var l1=0,y1=0,f1=0,es=1e3,ln,x1,an=0,He=0,Cn=0,k1=typeof performance=="object"&&performance.now?performance:Date,ns=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ai(){return He||(ns(eu),He=k1.now()+Cn)}function eu(){He=0}function cn(){this._call=this._time=this._next=null}cn.prototype=is.prototype={constructor:cn,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Ai():+n)+(e==null?0:+e),!this._next&&x1!==this&&(x1?x1._next=this:ln=this,x1=this),this._call=t,this._time=n,ni()},stop:function(){this._call&&(this._call=null,this._time=1/0,ni())}};function is(t,e,n){var i=new cn;return i.restart(t,e,n),i}function nu(){Ai(),++l1;for(var t=ln,e;t;)(e=He-t._time)>=0&&t._call.call(void 0,e),t=t._next;--l1}function Tr(){He=(an=k1.now())+Cn,l1=y1=0;try{nu()}finally{l1=0,ru(),He=0}}function iu(){var t=k1.now(),e=t-an;e>es&&(Cn-=e,an=t)}function ru(){for(var t,e=ln,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:ln=n);x1=t,ni(i)}function ni(t){if(!l1){y1&&(y1=clearTimeout(y1));var e=t-He;e>24?(t<1/0&&(y1=setTimeout(Tr,t-k1.now()-Cn)),f1&&(f1=clearInterval(f1))):(f1||(an=k1.now(),f1=setInterval(iu,es)),l1=1,ns(Tr))}}function $r(t,e,n){var i=new cn;return e=e==null?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,n),i}var ou=Eo("start","end","cancel","interrupt"),su=[],rs=0,Er=1,ii=2,W1=3,Lr=4,ri=5,_1=6;function Nn(t,e,n,i,r,o){var l=t.__transition;if(!l)t.__transition={};else if(n in l)return;lu(t,n,{name:e,index:i,group:r,on:ou,tween:su,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:rs})}function Si(t,e){var n=ue(t,e);if(n.state>rs)throw new Error("too late; already scheduled");return n}function ge(t,e){var n=ue(t,e);if(n.state>W1)throw new Error("too late; already running");return n}function ue(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function lu(t,e,n){var i=t.__transition,r;i[e]=n,n.timer=is(o,0,n.time);function o(s){n.state=Er,n.timer.restart(l,n.delay,n.time),n.delay<=s&&l(s-n.delay)}function l(s){var u,m,f,h;if(n.state!==Er)return a();for(u in i)if(h=i[u],h.name===n.name){if(h.state===W1)return $r(l);h.state===Lr?(h.state=_1,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[u]):+u<e&&(h.state=_1,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[u])}if($r(function(){n.state===W1&&(n.state=Lr,n.timer.restart(c,n.delay,n.time),c(s))}),n.state=ii,n.on.call("start",t,t.__data__,n.index,n.group),n.state===ii){for(n.state=W1,r=new Array(f=n.tween.length),u=0,m=-1;u<f;++u)(h=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++m]=h);r.length=m+1}}function c(s){for(var u=s<n.duration?n.ease.call(null,s/n.duration):(n.timer.restart(a),n.state=ri,1),m=-1,f=r.length;++m<f;)r[m].call(t,u);n.state===ri&&(n.on.call("end",t,t.__data__,n.index,n.group),a())}function a(){n.state=_1,n.timer.stop(),delete i[e];for(var s in i)return;delete t.__transition}}function au(t,e){var n=t.__transition,i,r,o=!0,l;if(n){e=e==null?null:e+"";for(l in n){if((i=n[l]).name!==e){o=!1;continue}r=i.state>ii&&i.state<ri,i.state=_1,i.timer.stop(),i.on.call(r?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete n[l]}o&&delete t.__transition}}function cu(t){return this.each(function(){au(this,t)})}function uu(t,e){var n,i;return function(){var r=ge(this,t),o=r.tween;if(o!==n){i=n=o;for(var l=0,c=i.length;l<c;++l)if(i[l].name===e){i=i.slice(),i.splice(l,1);break}}r.tween=i}}function hu(t,e,n){var i,r;if(typeof n!="function")throw new Error;return function(){var o=ge(this,t),l=o.tween;if(l!==i){r=(i=l).slice();for(var c={name:e,value:n},a=0,s=r.length;a<s;++a)if(r[a].name===e){r[a]=c;break}a===s&&r.push(c)}o.tween=r}}function fu(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i=ue(this.node(),n).tween,r=0,o=i.length,l;r<o;++r)if((l=i[r]).name===t)return l.value;return null}return this.each((e==null?uu:hu)(n,t,e))}function Ci(t,e,n){var i=t._id;return t.each(function(){var r=ge(this,i);(r.value||(r.value={}))[e]=n.apply(this,arguments)}),function(r){return ue(r,i).value[e]}}function os(t,e){var n;return(typeof e=="number"?le:e instanceof Re?sn:(n=Re(e))?(e=n,sn):Qo)(t,e)}function mu(t){return function(){this.removeAttribute(t)}}function du(t){return function(){this.removeAttributeNS(t.space,t.local)}}function gu(t,e,n){var i,r=n+"",o;return function(){var l=this.getAttribute(t);return l===r?null:l===i?o:o=e(i=l,n)}}function yu(t,e,n){var i,r=n+"",o;return function(){var l=this.getAttributeNS(t.space,t.local);return l===r?null:l===i?o:o=e(i=l,n)}}function xu(t,e,n){var i,r,o;return function(){var l,c=n(this),a;return c==null?void this.removeAttribute(t):(l=this.getAttribute(t),a=c+"",l===a?null:l===i&&a===r?o:(r=a,o=e(i=l,c)))}}function vu(t,e,n){var i,r,o;return function(){var l,c=n(this),a;return c==null?void this.removeAttributeNS(t.space,t.local):(l=this.getAttributeNS(t.space,t.local),a=c+"",l===a?null:l===i&&a===r?o:(r=a,o=e(i=l,c)))}}function pu(t,e){var n=An(t),i=n==="transform"?tu:os;return this.attrTween(t,typeof e=="function"?(n.local?vu:xu)(n,i,Ci(this,"attr."+t,e)):e==null?(n.local?du:mu)(n):(n.local?yu:gu)(n,i,e))}function bu(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function wu(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function ku(t,e){var n,i;function r(){var o=e.apply(this,arguments);return o!==i&&(n=(i=o)&&wu(t,o)),n}return r._value=e,r}function Au(t,e){var n,i;function r(){var o=e.apply(this,arguments);return o!==i&&(n=(i=o)&&bu(t,o)),n}return r._value=e,r}function Su(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var i=An(t);return this.tween(n,(i.local?ku:Au)(i,e))}function Cu(t,e){return function(){Si(this,t).delay=+e.apply(this,arguments)}}function Nu(t,e){return e=+e,function(){Si(this,t).delay=e}}function Mu(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Cu:Nu)(e,t)):ue(this.node(),e).delay}function Tu(t,e){return function(){ge(this,t).duration=+e.apply(this,arguments)}}function $u(t,e){return e=+e,function(){ge(this,t).duration=e}}function Eu(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Tu:$u)(e,t)):ue(this.node(),e).duration}function Lu(t,e){if(typeof e!="function")throw new Error;return function(){ge(this,t).ease=e}}function Ou(t){var e=this._id;return arguments.length?this.each(Lu(e,t)):ue(this.node(),e).ease}function ju(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;ge(this,t).ease=n}}function Pu(t){if(typeof t!="function")throw new Error;return this.each(ju(this._id,t))}function Du(t){typeof t!="function"&&(t=jo(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],l=o.length,c=i[r]=[],a,s=0;s<l;++s)(a=o[s])&&t.call(a,a.__data__,s,o)&&c.push(a);return new Ce(i,this._parents,this._name,this._id)}function qu(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,o=Math.min(i,r),l=new Array(i),c=0;c<o;++c)for(var a=e[c],s=n[c],u=a.length,m=l[c]=new Array(u),f,h=0;h<u;++h)(f=a[h]||s[h])&&(m[h]=f);for(;c<i;++c)l[c]=e[c];return new Ce(l,this._parents,this._name,this._id)}function Bu(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function Vu(t,e,n){var i,r,o=Bu(e)?Si:ge;return function(){var l=o(this,t),c=l.on;c!==i&&(r=(i=c).copy()).on(e,n),l.on=r}}function Iu(t,e){var n=this._id;return arguments.length<2?ue(this.node(),n).on.on(t):this.each(Vu(n,t,e))}function Ru(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Hu(){return this.on("end.remove",Ru(this._id))}function Xu(t){var e=this._name,n=this._id;typeof t!="function"&&(t=pi(t));for(var i=this._groups,r=i.length,o=new Array(r),l=0;l<r;++l)for(var c=i[l],a=c.length,s=o[l]=new Array(a),u,m,f=0;f<a;++f)(u=c[f])&&(m=t.call(u,u.__data__,f,c))&&("__data__"in u&&(m.__data__=u.__data__),s[f]=m,Nn(s[f],e,n,f,s,ue(u,n)));return new Ce(o,this._parents,e,n)}function Yu(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Oo(t));for(var i=this._groups,r=i.length,o=[],l=[],c=0;c<r;++c)for(var a=i[c],s=a.length,u,m=0;m<s;++m)if(u=a[m]){for(var f=t.call(u,u.__data__,m,a),h,d=ue(u,n),y=0,v=f.length;y<v;++y)(h=f[y])&&Nn(h,e,n,y,f,d);o.push(f),l.push(u)}return new Ce(o,l,e,n)}var zu=M1.prototype.constructor;function Uu(){return new zu(this._groups,this._parents)}function Fu(t,e){var n,i,r;return function(){var o=s1(this,t),l=(this.style.removeProperty(t),s1(this,t));return o===l?null:o===n&&l===i?r:r=e(n=o,i=l)}}function ss(t){return function(){this.style.removeProperty(t)}}function Gu(t,e,n){var i,r=n+"",o;return function(){var l=s1(this,t);return l===r?null:l===i?o:o=e(i=l,n)}}function Wu(t,e,n){var i,r,o;return function(){var l=s1(this,t),c=n(this),a=c+"";return c==null&&(a=c=(this.style.removeProperty(t),s1(this,t))),l===a?null:l===i&&a===r?o:(r=a,o=e(i=l,c))}}function _u(t,e){var n,i,r,o="style."+e,l="end."+o,c;return function(){var a=ge(this,t),s=a.on,u=a.value[o]==null?c||(c=ss(e)):void 0;(s!==n||r!==u)&&(i=(n=s).copy()).on(l,r=u),a.on=i}}function Ku(t,e,n){var i=(t+="")=="transform"?J0:os;return e==null?this.styleTween(t,Fu(t,i)).on("end.style."+t,ss(t)):typeof e=="function"?this.styleTween(t,Wu(t,i,Ci(this,"style."+t,e))).each(_u(this._id,t)):this.styleTween(t,Gu(t,i,e),n).on("end.style."+t,null)}function Zu(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}function Qu(t,e,n){var i,r;function o(){var l=e.apply(this,arguments);return l!==r&&(i=(r=l)&&Zu(t,l,n)),i}return o._value=e,o}function Ju(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,Qu(t,e,n??""))}function t2(t){return function(){this.textContent=t}}function e2(t){return function(){var e=t(this);this.textContent=e??""}}function n2(t){return this.tween("text",typeof t=="function"?e2(Ci(this,"text",t)):t2(t==null?"":t+""))}function i2(t){return function(e){this.textContent=t.call(this,e)}}function r2(t){var e,n;function i(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&i2(r)),e}return i._value=t,i}function o2(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,r2(t))}function s2(){for(var t=this._name,e=this._id,n=ls(),i=this._groups,r=i.length,o=0;o<r;++o)for(var l=i[o],c=l.length,a,s=0;s<c;++s)if(a=l[s]){var u=ue(a,e);Nn(a,t,n,s,l,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Ce(i,this._parents,t,n)}function l2(){var t,e,n=this,i=n._id,r=n.size();return new Promise(function(o,l){var c={value:l},a={value:function(){--r===0&&o()}};n.each(function(){var s=ge(this,i),u=s.on;u!==t&&(e=(t=u).copy(),e._.cancel.push(c),e._.interrupt.push(c),e._.end.push(a)),s.on=e}),r===0&&o()})}var a2=0;function Ce(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function ls(){return++a2}var be=M1.prototype;Ce.prototype={constructor:Ce,select:Xu,selectAll:Yu,selectChild:be.selectChild,selectChildren:be.selectChildren,filter:Du,merge:qu,selection:Uu,transition:s2,call:be.call,nodes:be.nodes,node:be.node,size:be.size,empty:be.empty,each:be.each,on:Iu,attr:pu,attrTween:Su,style:Ku,styleTween:Ju,text:n2,textTween:o2,remove:Hu,tween:fu,delay:Mu,duration:Eu,ease:Ou,easeVarying:Pu,end:l2,[Symbol.iterator]:be[Symbol.iterator]};function c2(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var u2={time:null,delay:0,duration:250,ease:c2};function h2(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function f2(t){var e,n;t instanceof Ce?(e=t._id,t=t._name):(e=ls(),(n=u2).time=Ai(),t=t==null?null:t+"");for(var i=this._groups,r=i.length,o=0;o<r;++o)for(var l=i[o],c=l.length,a,s=0;s<c;++s)(a=l[s])&&Nn(a,t,e,s,l,n||h2(a,e));return new Ce(i,this._parents,t,e)}M1.prototype.interrupt=cu;M1.prototype.transition=f2;const oi=Math.PI,si=2*oi,Pe=1e-6,m2=si-Pe;function as(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function d2(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return as;const n=10**e;return function(i){this._+=i[0];for(let r=1,o=i.length;r<o;++r)this._+=Math.round(arguments[r]*n)/n+i[r]}}class g2{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?as:d2(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,i,r){this._append`Q${+e},${+n},${this._x1=+i},${this._y1=+r}`}bezierCurveTo(e,n,i,r,o,l){this._append`C${+e},${+n},${+i},${+r},${this._x1=+o},${this._y1=+l}`}arcTo(e,n,i,r,o){if(e=+e,n=+n,i=+i,r=+r,o=+o,o<0)throw new Error(`negative radius: ${o}`);let l=this._x1,c=this._y1,a=i-e,s=r-n,u=l-e,m=c-n,f=u*u+m*m;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>Pe)if(!(Math.abs(m*a-s*u)>Pe)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let h=i-l,d=r-c,y=a*a+s*s,v=h*h+d*d,p=Math.sqrt(y),T=Math.sqrt(f),A=o*Math.tan((oi-Math.acos((y+f-v)/(2*p*T)))/2),O=A/T,j=A/p;Math.abs(O-1)>Pe&&this._append`L${e+O*u},${n+O*m}`,this._append`A${o},${o},0,0,${+(m*h>u*d)},${this._x1=e+j*a},${this._y1=n+j*s}`}}arc(e,n,i,r,o,l){if(e=+e,n=+n,i=+i,l=!!l,i<0)throw new Error(`negative radius: ${i}`);let c=i*Math.cos(r),a=i*Math.sin(r),s=e+c,u=n+a,m=1^l,f=l?r-o:o-r;this._x1===null?this._append`M${s},${u}`:(Math.abs(this._x1-s)>Pe||Math.abs(this._y1-u)>Pe)&&this._append`L${s},${u}`,i&&(f<0&&(f=f%si+si),f>m2?this._append`A${i},${i},0,1,${m},${e-c},${n-a}A${i},${i},0,1,${m},${this._x1=s},${this._y1=u}`:f>Pe&&this._append`A${i},${i},0,${+(f>=oi)},${m},${this._x1=e+i*Math.cos(o)},${this._y1=n+i*Math.sin(o)}`)}rect(e,n,i,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function y2(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function un(t,e){if(!isFinite(t)||t===0)return null;var n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function a1(t){return t=un(Math.abs(t)),t?t[1]:NaN}function x2(t,e){return function(n,i){for(var r=n.length,o=[],l=0,c=t[0],a=0;r>0&&c>0&&(a+c+1>i&&(c=Math.max(1,i-a)),o.push(n.substring(r-=c,r+c)),!((a+=c+1)>i));)c=t[l=(l+1)%t.length];return o.reverse().join(e)}}function v2(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var p2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function hn(t){if(!(e=p2.exec(t)))throw new Error("invalid format: "+t);var e;return new Ni({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}hn.prototype=Ni.prototype;function Ni(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}Ni.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function b2(t){t:for(var e=t.length,n=1,i=-1,r;n<e;++n)switch(t[n]){case".":i=r=n;break;case"0":i===0&&(i=n),r=n;break;default:if(!+t[n])break t;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(r+1):t}var fn;function w2(t,e){var n=un(t,e);if(!n)return fn=void 0,t.toPrecision(e);var i=n[0],r=n[1],o=r-(fn=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,l=i.length;return o===l?i:o>l?i+new Array(o-l+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+un(t,Math.max(0,e+o-1))[0]}function Or(t,e){var n=un(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const jr={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:y2,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Or(t*100,e),r:Or,s:w2,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Pr(t){return t}var Dr=Array.prototype.map,qr=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function k2(t){var e=t.grouping===void 0||t.thousands===void 0?Pr:x2(Dr.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",r=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?Pr:v2(Dr.call(t.numerals,String)),l=t.percent===void 0?"%":t.percent+"",c=t.minus===void 0?"\u2212":t.minus+"",a=t.nan===void 0?"NaN":t.nan+"";function s(m,f){m=hn(m);var h=m.fill,d=m.align,y=m.sign,v=m.symbol,p=m.zero,T=m.width,A=m.comma,O=m.precision,j=m.trim,N=m.type;N==="n"?(A=!0,N="g"):jr[N]||(O===void 0&&(O=12),j=!0,N="g"),(p||h==="0"&&d==="=")&&(p=!0,h="0",d="=");var M=(f&&f.prefix!==void 0?f.prefix:"")+(v==="$"?n:v==="#"&&/[boxX]/.test(N)?"0"+N.toLowerCase():""),g=(v==="$"?i:/[%p]/.test(N)?l:"")+(f&&f.suffix!==void 0?f.suffix:""),b=jr[N],k=/[defgprs%]/.test(N);O=O===void 0?6:/[gprs]/.test(N)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function C(S){var R=M,q=g,Y,U,F;if(N==="c")q=b(S)+q,S="";else{S=+S;var V=S<0||1/S<0;if(S=isNaN(S)?a:b(Math.abs(S),O),j&&(S=b2(S)),V&&+S==0&&y!=="+"&&(V=!1),R=(V?y==="("?y:c:y==="-"||y==="("?"":y)+R,q=(N==="s"&&!isNaN(S)&&fn!==void 0?qr[8+fn/3]:"")+q+(V&&y==="("?")":""),k){for(Y=-1,U=S.length;++Y<U;)if(F=S.charCodeAt(Y),48>F||F>57){q=(F===46?r+S.slice(Y+1):S.slice(Y))+q,S=S.slice(0,Y);break}}}A&&!p&&(S=e(S,1/0));var X=R.length+S.length+q.length,z=X<T?new Array(T-X+1).join(h):"";switch(A&&p&&(S=e(z+S,z.length?T-q.length:1/0),z=""),d){case"<":S=R+S+q+z;break;case"=":S=R+z+S+q;break;case"^":S=z.slice(0,X=z.length>>1)+R+S+q+z.slice(X);break;default:S=z+R+S+q;break}return o(S)}return C.toString=function(){return m+""},C}function u(m,f){var h=Math.max(-8,Math.min(8,Math.floor(a1(f)/3)))*3,d=Math.pow(10,-h),y=s((m=hn(m),m.type="f",m),{suffix:qr[8+h/3]});return function(v){return y(d*v)}}return{format:s,formatPrefix:u}}var R1,cs,us;A2({thousands:",",grouping:[3],currency:["$",""]});function A2(t){return R1=k2(t),cs=R1.format,us=R1.formatPrefix,R1}function S2(t){return Math.max(0,-a1(Math.abs(t)))}function C2(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(a1(e)/3)))*3-a1(Math.abs(t)))}function N2(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,a1(e)-a1(t))+1}function M2(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function T2(t){return function(){return t}}function $2(t){return+t}var Br=[0,1];function t1(t){return t}function li(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:T2(isNaN(e)?NaN:.5)}function E2(t,e){var n;return t>e&&(n=t,t=e,e=n),function(i){return Math.max(t,Math.min(e,i))}}function L2(t,e,n){var i=t[0],r=t[1],o=e[0],l=e[1];return r<i?(i=li(r,i),o=n(l,o)):(i=li(i,r),o=n(o,l)),function(c){return o(i(c))}}function O2(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),o=new Array(i),l=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++l<i;)r[l]=li(t[l],t[l+1]),o[l]=n(e[l],e[l+1]);return function(c){var a=Ba(t,c,1,i)-1;return o[a](r[a](c))}}function j2(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function P2(){var t=Br,e=Br,n=ki,i,r,o,l=t1,c,a,s;function u(){var f=Math.min(t.length,e.length);return l!==t1&&(l=E2(t[0],t[f-1])),c=f>2?O2:L2,a=s=null,m}function m(f){return f==null||isNaN(f=+f)?o:(a||(a=c(t.map(i),e,n)))(i(l(f)))}return m.invert=function(f){return l(r((s||(s=c(e,t.map(i),le)))(f)))},m.domain=function(f){return arguments.length?(t=Array.from(f,$2),u()):t.slice()},m.range=function(f){return arguments.length?(e=Array.from(f),u()):e.slice()},m.rangeRound=function(f){return e=Array.from(f),n=K0,u()},m.clamp=function(f){return arguments.length?(l=f?!0:t1,u()):l!==t1},m.interpolate=function(f){return arguments.length?(n=f,u()):n},m.unknown=function(f){return arguments.length?(o=f,m):o},function(f,h){return i=f,r=h,u()}}function D2(){return P2()(t1,t1)}function q2(t,e,n,i){var r=Xa(t,e,n),o;switch(i=hn(i??",f"),i.type){case"s":{var l=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(o=C2(r,l))&&(i.precision=o),us(i,l)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(o=N2(r,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=o-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(o=S2(r))&&(i.precision=o-(i.type==="%")*2);break}}return cs(i)}function B2(t){var e=t.domain;return t.ticks=function(n){var i=e();return Ha(i[0],i[i.length-1],n??10)},t.tickFormat=function(n,i){var r=e();return q2(r[0],r[r.length-1],n??10,i)},t.nice=function(n){n==null&&(n=10);var i=e(),r=0,o=i.length-1,l=i[r],c=i[o],a,s,u=10;for(c<l&&(s=l,l=c,c=s,s=r,r=o,o=s);u-- >0;){if(s=_n(l,c,n),s===a)return i[r]=l,i[o]=c,e(i);if(s>0)l=Math.floor(l/s)*s,c=Math.ceil(c/s)*s;else if(s<0)l=Math.ceil(l*s)/s,c=Math.floor(c*s)/s;else break;a=s}return t},t}function hs(){var t=D2();return t.copy=function(){return j2(t,hs())},M2.apply(t,arguments),B2(t)}function Ke(t){return function(){return t}}const Vr=1e-12;function V2(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const i=Math.floor(n);if(!(i>=0))throw new RangeError(`invalid digits: ${n}`);e=i}return t},()=>new g2(e)}function I2(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function fs(t){this._context=t}fs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Mi(t){return new fs(t)}function R2(t){return t[0]}function H2(t){return t[1]}function X2(t,e){var n=Ke(!0),i=null,r=Mi,o=null,l=V2(c);t=typeof t=="function"?t:t===void 0?R2:Ke(t),e=typeof e=="function"?e:e===void 0?H2:Ke(e);function c(a){var s,u=(a=I2(a)).length,m,f=!1,h;for(i==null&&(o=r(h=l())),s=0;s<=u;++s)!(s<u&&n(m=a[s],s,a))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(m,s,a),+e(m,s,a));if(h)return o=null,h+""||null}return c.x=function(a){return arguments.length?(t=typeof a=="function"?a:Ke(+a),c):t},c.y=function(a){return arguments.length?(e=typeof a=="function"?a:Ke(+a),c):e},c.defined=function(a){return arguments.length?(n=typeof a=="function"?a:Ke(!!a),c):n},c.curve=function(a){return arguments.length?(r=a,i!=null&&(o=r(i)),c):r},c.context=function(a){return arguments.length?(a==null?i=o=null:o=r(i=a),c):i},c}function Ir(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Ti(t,e){this._context=t,this._k=(1-e)/6}Ti.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ir(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Ir(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ms=(function t(e){function n(i){return new Ti(i,e)}return n.tension=function(i){return t(+i)},n})(0);function Y2(t,e,n){var i=t._x1,r=t._y1,o=t._x2,l=t._y2;if(t._l01_a>Vr){var c=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,a=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*c-t._x0*t._l12_2a+t._x2*t._l01_2a)/a,r=(r*c-t._y0*t._l12_2a+t._y2*t._l01_2a)/a}if(t._l23_a>Vr){var s=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*s+t._x1*t._l23_2a-e*t._l12_2a)/u,l=(l*s+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(i,r,o,l,t._x2,t._y2)}function ds(t,e){this._context=t,this._alpha=e}ds.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Y2(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const gs=(function t(e){function n(i){return e?new ds(i,e):new Ti(i,0)}return n.alpha=function(i){return t(+i)},n})(.5);function ys(t){this._context=t}ys.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var i=Rr(t),r=Rr(e),o=0,l=1;l<n;++o,++l)this._context.bezierCurveTo(i[0][o],r[0][o],i[1][o],r[1][o],t[l],e[l]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Rr(t){var e,n=t.length-1,i,r=new Array(n),o=new Array(n),l=new Array(n);for(r[0]=0,o[0]=2,l[0]=t[0]+2*t[1],e=1;e<n-1;++e)r[e]=1,o[e]=4,l[e]=4*t[e]+2*t[e+1];for(r[n-1]=2,o[n-1]=7,l[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)i=r[e]/o[e-1],o[e]-=i,l[e]-=i*l[e-1];for(r[n-1]=l[n-1]/o[n-1],e=n-2;e>=0;--e)r[e]=(l[e]-r[e+1])/o[e];for(o[n-1]=(t[n]+r[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-r[e+1];return[r,o]}function mn(t){return new ys(t)}function v1(t,e,n){this.k=t,this.x=e,this.y=n}v1.prototype={constructor:v1,scale:function(t){return t===1?this:new v1(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new v1(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};v1.prototype;const z2={censor:Oe,squish(t,{min:e,max:n}){return isFinite(t)?t<e?e:t>n?n:t:t},squish_any:yt,squish_infinite:Wn,discard(t,{min:e,max:n}){return t<e||t>n?null:t}};function Qe(t,{title:e,...n}={}){return Object.assign(function(i){return i.map(t)},{title:e},n)}function xs({values:t={},na_value:e=null,title:n,...i}={}){let r;return Array.isArray(t)?r=function(o){return o.map(l=>t[+l]??e)}:r=function(o){return o.map(l=>t[l]??e)},Object.assign(r,{title:n},i)}function Ze({limits:t,oob:e=Oe,range:n=[0,1],na_value:i=null,null_value:r=null,title:o,...l}={}){return Object.assign(function(a){let s=this?.limits?.min??this?.limits?.[0]??a.extent?.[0],u=this?.limits?.max??this?.limits?.[1]??a.extent?.[1],m=u-s,f=n?.min??n[0],h=n?.max??n[1],d=h-f;return a.map(y=>(y=this.oob(y,{min:s,max:u}),y===null?r:isNaN(y)?i:f+(y-s)/m*d))},{title:o,limits:t,oob:e},l)}function Hr({title:t,...e}={}){return Object.assign(function(n){return n.map(i=>+i)},{asis:!0,title:t},e)}function ai({title:t,...e}={}){return Object.assign(function(n){return n.map(i=>String(i??""))},{asis:!0,title:t},e)}function dn({h:t=[15,375],c:e=100,l:n=65,h_start:i=0,alpha:r=1,direction:o=1,limits:l,oob:c=Oe,na_value:a="#7f7f7f",null_value:s=null,title:u,...m}={}){return Object.assign(function(h){let d=this?.limits?.min??this?.limits?.[0]??h.extent?.[0],y=this?.limits?.max??this?.limits?.[1]??h.extent?.[1],v=y-d,p=t?.min??t[0],T=t?.max??t[1],A=T-p;return h.map(O=>(O=this.oob(O,{min:d,max:y}),O===null?s:isNaN(O)?a:Ko(i+p+A*(O-d)/v*o,e,n,r).toString()))},{title:u,limits:l,oob:c},m)}function U2({values:t,na_value:e="#7f7f7f",title:n,...i}={}){return xs({values:t,na_value:e,title:n,...i})}function gn({low:t="#132B43",high:e="#56B1F7",limits:n,oob:i=Oe,na_value:r="#7f7f7f",null_value:o=null,title:l,...c}={}){return Object.assign(function(s){let u=this?.limits?.min??this?.limits?.[0]??s.extent?.[0],m=this?.limits?.max??this?.limits?.[1]??s.extent?.[1],f=ei(t,e);return s.map(h=>(h=this.oob(h,{min:u,max:m}),h===null?o:isNaN(h)?r:u===m?f(.5):h>m?e:h<u?t:f((h-u)/(m-u))))},{title:l,limits:n,oob:i},c)}function F2({low:t="#832424",mid:e="white",high:n="#3A3A98",midpoint:i=0,limits:r,oob:o=Oe,na_value:l="#7f7f7f",null_value:c=null,title:a,...s}={}){return Object.assign(function(m){let f=this?.limits?.min??this?.limits?.[0]??m.extent?.[0],h=this?.limits?.max??this?.limits?.[1]??m.extent?.[1],d=i??(f+h)/2,y=ei(t,e),v=ei(e,n);return m.map(p=>(p=this.oob(p,{min:f,max:h}),p===null?c:isNaN(p)?l:p<d?y((p-f)/(d-f)):v((p-d)/(h-d))))},{title:a,limits:r,oob:o},s)}function G2({colors:t=[],values:e,anchors:n,limits:i,oob:r=Oe,na_value:o="#7f7f7f",null_value:l=null,title:c,...a}={}){return Object.assign(function(u){let m=this?.limits?.min??this?.limits?.[0]??u.extent?.[0],f=this?.limits?.max??this?.limits?.[1]??u.extent?.[1],h=e??n?.map?.(y=>m+(f-m)*y);h??=Array(t.length).fill(0).map((y,v)=>m+(f-m)*v/(t.length-1)),t=t.filter((y,v)=>!isNaN(h[v])),h=h.filter(y=>!isNaN(y));let d=hs(h,t);return u.map(y=>(y=this.oob(y,{min:m,max:f}),y===null?l:isNaN(y)?o:d(y)))},{title:c,limits:i,oob:r},a)}function Xr({alpha:t,limits:e,oob:n=Oe,title:i,...r}={}){let o=dn({alpha:t}),l=gn();return Object.assign(function(a){return a.level!=null?o.call(this,a):l.call(this,a)},{title:i,limits:e,oob:n},r)}function W2({discrete:t=dn(),continuous:e=gn(),limits:n,oob:i=Oe,title:r,...o}={}){return Object.assign(function(c){return c.level!=null?t.call(this,c):e.call(this,c)},{title:r,limits:n,oob:i},o)}function Yr({title:t,...e}={}){let n=["circle","square","triangle","diamond","plus"];return Object.assign(function(r){return r.map(o=>n[+o])},{title:t},e)}function zr({title:t,...e}={}){let n=["solid","22","42","44","13","1343","73","2262","12223242","F282","F4448444","224282F2","F1"];return Object.assign(function(r){return r.map(o=>n[+o])},{title:t},e)}const Rn={identity:({title:t,...e}={})=>ai({legend:!1,title:t,...e}),discrete:dn,hue:dn,manual:U2,continuous:gn,gradient:gn,gradient2:F2,gradientn:G2,dynamic:W2,auto:Xr,custom:Qe,default:Xr},vs={color:Rn,stroke:Rn,fill:Rn,alpha:{continuous:Ze,custom:Qe,default:({title:t,...e}={})=>Ze({range:[.1,1],title:t,...e})},size:{identity:({title:t,...e}={})=>Hr({legend:!1,title:t,...e}),continuous:Ze,custom:Qe,default:({title:t,...e}={})=>Ze({range:[1,6],title:t,...e})},linewidth:{identity:({title:t,...e}={})=>Hr({legend:!1,title:t,...e}),continuous:Ze,manual:xs,custom:Qe,default:({title:t,...e}={})=>Ze({range:[1,6],title:t,...e})},linetype:{identity:({title:t,...e}={})=>ai({legend:!1,title:t,...e}),discrete:zr,default:zr,custom:Qe},shape:{identity:({title:t,...e}={})=>ai({legend:!1,title:t,...e}),discrete:Yr,default:Yr,custom:Qe}};function _2({step:t,minor:e=!1}={}){return function({min:n,max:i,minor:r=e}={}){let o=i-n,l=t;if(isNaN(o)||o<0)return[];if(o==0)return[n];let c=10**Math.floor(Math.log10(o)-1),a=o/c;l==null&&(l=([5,10,20].find(m=>m*5>a)??20)*c),r&&(l/=2);let s=Math.ceil(n/l),u=Math.floor(i/l);return new Array(u-s+1).fill(null).map((m,f)=>(s+f)*l)}}function K2(){return function({min:t,max:e}={}){let n=e-t;if(isNaN(n)||n<0)return[];if(n==0)return[new Date(t)];let i=new Date(t),r=new Date(e),o=i.getUTCFullYear(),l=i.getUTCMonth(),c=i.getUTCDate(),a=i.getUTCHours(),s=i.getUTCMinutes(),u=i.getUTCSeconds(),m=[];if(n>3*31536e6){let f=n/31536e6,h=10**Math.floor(Math.log10(f)-1),d=f/h,y=Math.max((d>50?10:d>25?5:2)*h,1);i=new Date(Date.UTC(Math.ceil(o/y)*y));do m.push(new Date(i));while(i.setUTCFullYear(i.getUTCFullYear()+y)<r)}else if(n>3*2592e6){let f=n/2592e6,h=[2,3,6].findLast(d=>d*3<=f)||1;i=new Date(Date.UTC(o,Math.ceil(l/h)*h));do m.push(new Date(i));while(i.setUTCMonth(i.getUTCMonth()+h)<r)}else if(n>21*864e5){i=new Date(Date.UTC(o,l,c+(7-i.getUTCDay())%7));do m.push(new Date(i));while(i.setUTCDate(i.getUTCDate()+7)<r)}else if(n>3*864e5){let f=n/864e5,h=[2,3].findLast(d=>d*3<=f)||1;i=new Date(Date.UTC(o,l,Math.ceil(c)));do m.push(new Date(i));while(i.setUTCDate(i.getUTCDate()+h)<r)}else if(n>3*36e5){let f=n/36e5,h=[2,3,6].findLast(d=>d*3<=f)||1;i=new Date(Date.UTC(o,l,c,Math.ceil(a/h)*h));do m.push(new Date(i));while(i.setUTCHours(i.getUTCHours()+h)<r)}else if(n>3*6e4){let f=n/6e4,h=[2,5,10,30].findLast(d=>d*3<=f)||1;i=new Date(Date.UTC(o,l,c,a,Math.ceil(s/h)*h));do m.push(new Date(i));while(i.setUTCMinutes(i.getUTCMinutes()+h)<r)}else if(n>3e3){let f=n/1e3,h=[2,5,10,30].findLast(d=>d*3<=f)||1;i=new Date(Date.UTC(o,l,c,a,s,Math.ceil(u/h)*h));do m.push(new Date(i));while(i.setUTCSeconds(i.getUTCSeconds()+h)<r)}else{let f=10**Math.floor(Math.log10(n)-1),h=n/f,d=(h>50?20:h>25?10:5)*f,y=Math.ceil(t/d),v=Math.floor(e/d);return new Array(v-y+1).fill(null).map((p,T)=>new Date((y+T)*d))}return m}}const Mn={number:_2,datetime:K2};let Z2={y:t=>t.getUTCFullYear(),M:t=>t.getUTCMonth()+1,d:t=>t.getUTCDate(),h:t=>t.getUTCHours(),m:t=>t.getUTCMinutes(),s:t=>t.getUTCSeconds()};function ci(t,e="yyyy-MM-dd hh:mm:ss"){return e.replace(/(y|M|d|h|m|s)\1*/g,(n,i)=>{let r=String(Z2[i](t)),o=n.length;return i=="y"?r.slice(-o):r.padStart(o,"0")})}const ps={default:{"":1,k:1e3,M:1e6,G:1e9,T:1e12,P:1e15,E:1e18,Z:1e21,Y:1e24},si:{y:1e-24,z:1e-21,a:1e-18,f:1e-15,p:1e-12,n:1e-9,\u03BC:1e-6,m:.001,"":1,k:1e3,M:1e6,G:1e9,T:1e12,P:1e15,E:1e18,Z:1e21,Y:1e24},binary:{"":1,Ki:1024,Mi:1024**2,Gi:1024**3,Ti:1024**4,Pi:1024**5,Ei:1024**6,Zi:1024**7,Yi:1024**8},time:{ns:1e-9,\u03BCs:1e-6,ms:.001,s:1,m:60,h:3600,d:86400,w:604800,M:2592e3,y:31536e3}};function Q2(){return function(t){return t==null?"":t instanceof Date?ci(t):String(t)}}function bs({accuracy:t,scale:e=1,prefix:n="",suffix:i="",big_mark:r=" ",style_positive:o="none",style_negative:l="hyphen",scale_cut:c={"":1}}={}){let a={plus:"+",space:" "}[o]??"",s={hyphen:"-",minus:"\u2212",parens:"("}[l]??"";return function(u,m,f=[u]){let h;if(t)h=t;else if(f.length>1){let A=f.filter(j=>isFinite(j)).sort((j,N)=>j-N);h=A.slice(1).map((j,N)=>j-A[N]).reduce((j,N)=>j<N?j:N)*e}else h=u||1;let d=Object.entries(c).sort((A,O)=>O[1]-A[1]).find(A=>A[1]<=h)?.[0]??"",y=(d==""?"":" ")+d+i;h=h/(c[d]??1);let v=Math.max(0,Math.ceil(-Math.log10(h))),p=Math.round(u*e/(c[d]??1)/h)*h,T=n+(p>0?a:p<0?s:"");return p<0&&l=="parens"&&(y=")"+y),p=Math.abs(p).toFixed(v).replace(new RegExp("(?<!\\..*)(\\d)(?=(?:\\d{3})+(?:\\.|$))","g"),"$1"+r),T+p+y}}function ui({format:t}={}){let e={y:31536e3,M:2678400,d:86400,h:3600,m:60,s:1},n={y:0,M:5,d:8,h:11,m:14,s:17},i={y:4,M:7,d:10,h:13,m:16,s:19};return function(r,o,l=[r]){if(l.length<=1)return ci(new Date(r),t);if(t==null){let c=Array.from(l).sort((f,h)=>f-h),a=c.slice(1).map((f,h)=>f-c[h]).reduce((f,h)=>f<h?f:h)/1e3,s=(c[c.length-1]-c[0])/1e3,u=["y","M","d","m","s"].find(f=>e[f]<=a),m=s>2678400?"y":s>86400?"M":"h";t="yyyy-MM-dd hh:mm:ss".slice(n[m],i[u])}return ci(new Date(r),t)}}function Ur(t){let e=bs(t),n=ui(t);return function(i,r,o=[i]){return i instanceof Co?String(i):i instanceof Date?n(i,r,o):e(i,r,o)}}const hi={number:bs,datetime:ui,timestamp:ui,asis:Q2,auto:Ur,default:function(t){return Ur({scale_cut:ps.default,...t})}};function J2(t,e){return t==null?{}:Object.fromEntries(Object.entries(t).map(([n,i])=>[n,e(n,i)]))}function fi(t){return typeof t=="string"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="object"&&typeof t.valueOf()!="number"&&typeof t.valueOf()!="bigint"}class t9{constructor(e,n){let{data:i=[],aes:r,extendX:o,extendY:l}=n,{geom:c,stat:a,data:s,aes:u,levels:m={},scales:f={},attrs:h,args:d,vBind:y,extendX:v,extendY:p}=e;if(!Le[c]){console.error(`Invalid geom "${c}"`,"in layer",e,", plot",n);return}let T=typeof a=="function"?a:Oa[a];if(T==null){console.error(`Invalid stat "${a}"`,"in layer",e,", plot",n);return}this.geom=c,this.vBind=Object.assign(y,{extendX:v??o??0,extendY:p??l??0}),this.scales={},typeof s=="function"&&(s=s(i)),s==null&&(s=i),u={...r,...u};let A={};this.$fnames={};for(const N in u)this.$fnames[N]=String(u[N]),A[N]=s.map(u[N]);A.$raw=s;let O=T?.core_attrs??["x","y","xnudge","ynudge"],j=s.length;j==0&&(j=O.map(N=>h[N]).filter(N=>N!=null).reduce((N,M)=>Math.max(Array.isArray(M)?M.length:1,N),0));for(const N in h)if(O.includes(N))if(Array.isArray(h[N])){if(h[N].length!=j)throw new Error(`Attribute "${N}" must have the same length as data (${j})`);A[N]=h[N]}else{if(h[N]==null)continue;A[N]=new Array(j).fill(h[N])}try{if(A=T(A,d||{}),A.$group??=A.group,A.$group==null){let N=Object.values(A).filter(M=>Array.isArray(M)).reduce((M,g)=>Math.max(M,g.length),0);A.$group=new Array(N).fill(null)}}catch(N){console.error("Error",N,"in layer",e,", plot",n);return}this.localScales=new Set([...Object.keys(m).filter(N=>m[N]!=null),...Object.keys(f).filter(N=>f[N]!=null)]),this.aes=new Set([...this.localScales,...Le[c]?.scale_attrs??[]]),this.$data=A,this.data={...A};for(const N in A)if(f[N]!=null){let M=new Tn(f[N]);M.aesthetics=N,M._title=this.$fnames[N];let g=this.$data[N];if(!g?.length)continue;M.asis||(m?.[N]!=null?M.level=m[N]:g.some(fi)?M.level=Ve.from(g):M.extent=Yt.extent(g)),this.applyScale(N,M)}this.attrs={};for(const N in h)if(!O.includes(N))if(Array.isArray(h[N])){if(h[N].length!=j)throw new Error(`Attribute "${N}" must have the same length as data (${j})`);this.data[N]=h[N]}else this.attrs[N]=h[N],h[N]!=null&&(this.data[N]=new Array(j).fill(h[N]))}applyScale(e,n){let i=this.$data[e];i!=null&&(n.level&&(i=n.level.apply(i)),n.limits&&(i.extent=n.limits),n.aes=e,this.data[e]=n(i),this.scales[e]=n)}applyCoordScale(e){try{Object.assign(this.data,Le[this.geom]?.coord_scale?.(this.$data,e))}catch(n){console.error(n)}}}class e9{constructor(e,n){this.levels={},this.extents={},this.layers=[],this.coordScales={};for(let i in n)this.layers.push(new t9(n[i],e));this.layers=this.layers.filter(i=>i.$data!=null),this.aes=new Set(this.layers.flatMap(i=>Array.from(i.aes))),this.scales=new Map}useScales(e,n){this.scales=new Map;for(const i of this.aes){let r=this.layers.filter(o=>!o.localScales.has(i)).flatMap(o=>o.$data[i]??[]);if(r.length!=0){let o=new Tn(e?.[i]??vs[i].default());o.aesthetics=i,o.asis||(n?.[i]!=null?o.level=n[i]:r.some(fi)?o.level=Ve.from(r):o.extent=Yt.extent(r)),o._title=this.layers.reduce((l,c)=>l??c.$fnames?.[i],null);for(const l of this.layers)l.localScales.has(i)||l.applyScale(i,o)}for(const o of this.layers){let l=o.scales?.[i];if(l!=null&&!l.asis){this.scales.has(l)||this.scales.set(l,{});let c=this.scales.get(l);c[o.geom]==null&&(c[o.geom]={});for(let a of Le[o.geom]?.scale_attrs)o.attrs[a]!=null&&(c[o.geom][a]=o.attrs[a])}}}return this}useCoordLevels(e={}){for(const n of["x","y"])if(e[n])this.levels[n]=new Ve(...e[n]);else{let i=this.layers.flatMap(r=>(Le[r.geom].get_values??Le[r.geom].get_range)?.(r.$data,n));i.some(fi)?this.levels[n]=Ve.from(i):(i=this.layers.flatMap(r=>Le[r.geom].get_range?.(r.$data,n)).filter(r=>!isNaN(r)),this.extents[n]=Yt.extent(i))}for(const n of this.layers)n.applyCoordScale(this.levels);return this}getComputedLayers(){return this.layers.map(e=>({data:Object.values(Object.groupBy(e.data.$group.map((i,r)=>Le[e.geom].validate(J2(e.data,(o,l)=>l?.[r]))).filter(i=>i!=null),i=>i.$group)),geom:e.geom,vBind:e.vBind}))}getCoordScales(e,n,i){let r={};if(this._range=e,this.levels.x){let o=+(e?.xmin??-.5)-(+n.x?.min||0),l=+(e?.xmax??this.levels.x.length-.5)+(+n.x?.max||0);r.x=new yn(this.levels.x,{min:o,max:l})}else{let o=e?.xmin??this.extents.x?.min??0,l=e?.xmax??this.extents.x?.max??0,c=ht(o,-n.x?.min||0),a=ht(l,+n.x?.max||0),s=i?.x??1;if(a-c<s)if(e?.xmax==null&&e?.xmin!=null)a=ht(c,+s);else if(e?.xmax!=null&&e?.xmin==null)c=ht(a,-s);else{let u=a-c;a=ht(a,-u/2+s/2),c=ht(a,-s)}c instanceof Date||a instanceof Date?r.x=new xn({min:c,max:a}):r.x=new A1({min:c,max:a})}if(this.levels.y){let o=+(e?.ymin??-.5)-(+n.y?.min||0),l=+(e?.ymax??this.levels.y.length-.5)+(+n.y?.max||0);r.y=new yn(this.levels.y,{min:o,max:l})}else{let o=e?.ymin??this.extents.y?.min??0,l=e?.ymax??this.extents.y?.max??0,c=ht(o,-n.y?.min),a=ht(l,+n.y?.max||0),s=i?.y??1;if(a-c<s)if(e?.ymax==null&&e?.ymin!=null)a=ht(c,+s);else if(e?.ymax!=null&&e?.ymin==null)c=ht(a,-s);else{let u=a-c;a=ht(a,-u/2+s/2),c=ht(a,-s)}c instanceof Date||a instanceof Date?r.y=new xn({min:c,max:a}):r.y=new A1({min:c,max:a})}return r}render(e,n,i){let r=this.getCoordScales(e,n,i);return{layers:this.getComputedLayers(),coordScales:r,scales:this.scales}}}class Tn extends Function{constructor(e){let n=e._fn??e;function i(){return n.apply(i,arguments)}return Object.setPrototypeOf(i,Tn.prototype),Object.assign(i,e),i._fn=n,i}set extent({min:e,max:n,0:i,1:r}={}){e??=i,n??=r,this._limits={0:e,1:n,length:2,min:e,max:n}}get extent(){return this.limits}set limits({min:e,max:n,0:i,1:r}={}){e??=i,n??=r,this.$limits={0:e,1:n,length:2,min:e,max:n}}get limits(){let e=this.$limits?.min??(this.level?0:this._limits?.min),n=this.$limits?.max??this.level?.length??this._limits?.max;return{0:e,1:n,length:2,min:e,max:n}}toString(){return this.title??String(this._fn)}}class yn extends Function{constructor(e,{min:n,max:i}={}){const r=n==i?o=>0:o=>(+o-n)/(i-n);return r.range={min:n,max:i},r.level=e,Object.setPrototypeOf(r,yn.prototype),r}invert(e){let{min:n,max:i}=this.range;return e*(i-n)+n}get breaks(){return Array.from(this.level)}get minorBreaks(){return[]}}class A1 extends Function{constructor(e){let{min:n,max:i}=e;const r=n==i?o=>isFinite(o)?.5:o:o=>(+o-n)/(i-n);return r.range={min:n,max:i},Object.setPrototypeOf(r,A1.prototype),r}invert(e){let{min:n,max:i}=this.range;return ht(n,e*(i-n))}get breaks(){return Mn.number()}}class xn extends A1{constructor(e){let n=super(e);return Object.setPrototypeOf(n,xn.prototype),n}get breaks(){return Mn.datetime()}get minorBreaks(){return[]}}class n9{constructor(e,{breaks:n,labels:i,minorBreaks:r,titles:o}={}){this.scale=e,this.range=e?.range,this.breaks=n??e.breaks,this.labels=i??hi.auto(),this.titles=o??hi.asis(),this.minorBreaks=r??n??e.minorBreaks??e.breaks}getBindings({range:e,expandMult:n}={}){let i=this.breaks,r=this.minorBreaks,o=this.labels,l=this.titles,c=e?.min??this?.range?.min,a=e?.max??this?.range?.max,s=a-c||0;c=c==null?c:ht(c,-(n?.min??0)*s),a=a==null?a:ht(a,+(n?.max??0)*s);function u(f){return f.position!=null?f:{position:f}}typeof i=="function"&&(i=i({min:c,max:a})),i=Array.isArray(i)?i.map(u):[];let m=i.map(f=>f.position);if(typeof r=="function"&&(r=r({min:c,max:a,minor:!0})),r=Array.isArray(r)?r.map(u):[],typeof o=="function"&&(o=m.map(o)),!Array.isArray(o))o=[];else if(o.length!=m.length)throw new Error("Length of labels must be the same as breaks");if(typeof l=="function"&&(l=m.map(l)),!Array.isArray(l))l=[];else if(l.length!=m.length)throw new Error("Length of titles must be the same as breaks");return{majorBreaks:i,minorBreaks:r,ticks:m.map((f,h)=>({position:f,label:o[h],title:l[h]}))}}}const i9=["font-size"],r9={key:0},c1={__name:"CoreText",props:{x:{type:Number,default:0},y:{type:Number,default:0},text:null,title:null,size:Number,color:String,stroke:String,linewidth:Number,linetype:String,alpha:{type:Number,default:1},angle:{type:Number,default:0},translateX:{type:Number,default:0},translateY:{type:Number,default:0},anchorX:Number,anchorY:Number,dockX:Number,dockY:Number,fontFamily:String,fontSize:Number,textLength:Number,textAnchor:{type:String,default:"middle"}},setup(t){const e=Pt("ele"),n=Lt({width:0,height:0});St([e,()=>t.fontSize,()=>t.size,()=>t.text,()=>t.textLength,()=>t.fontFamily],async([r])=>{if(!r)return;await kn();let{width:o,height:l}=r.getBBox();n.width=o,n.height=l});const i=H(()=>{let{width:r,height:o}=n,l=[],c=({start:-.5,end:.5}[t.textAnchor]??0)*r;if(t.dockX!=null||t.dockY!=null){let a={left:0,center:.5,right:1}[t.dockX]??+(t.dockX??.5),s={bottom:0,center:.5,top:1}[t.dockY]??+(t.dockY??.5);isNaN(a)&&(a=.5),isNaN(s)&&(s=.5);let u=r*Math.abs(Math.cos(t.angle*Math.PI/180))+o*Math.abs(Math.sin(t.angle*Math.PI/180)),m=r*Math.abs(Math.sin(t.angle*Math.PI/180))+o*Math.abs(Math.cos(t.angle*Math.PI/180)),f=t.translateX,h=t.translateY;l.push(`translate(${u*(.5-a)+f},${m*(s-.5)+h})`),t.angle&&l.push(`rotate(${t.angle})`),l.push(`translate(${c},0)`)}else{let a={left:0,center:.5,right:1}[t.anchorX]??+(t.anchorX??.5),s={bottom:0,center:.5,top:1}[t.anchorY]??+(t.anchorY??.5);isNaN(a)&&(a=.5),isNaN(s)&&(s=.5);let u=r,m=o,f=t.translateX*Math.cos(t.angle*Math.PI/180)+t.translateY*Math.sin(t.angle*Math.PI/180),h=t.translateY*Math.cos(t.angle*Math.PI/180)-t.translateX*Math.sin(t.angle*Math.PI/180);t.angle&&l.push(`rotate(${t.angle})`),l.push(`translate(${u*(.5-a)+f+c},${m*(s-.5)+h})`)}return{x:t.x,y:t.y,fill:t.color||null,"fill-opacity":t.alpha==1?null:t.alpha,stroke:t.stroke||null,"stroke-width":t.linewidth,"stroke-dasharray":Bt(t.linetype).join(" ")||null,"stroke-opacity":t.alpha==1?null:t.alpha,transform:l.join(" ")||null,"font-family":t.fontFamily||null,textLength:t.textLength,lengthAdjust:t.textLength?"spacingAndGlyphs":null,"transform-origin":`${t.x} ${t.y}`,"text-anchor":t.textAnchor,"dominant-baseline":"central"}});return(r,o)=>(L(),I("text",tt({ref_key:"ele",ref:e},i.value,{"font-size":(t.fontSize??t.size*4)||null}),[rl(r.$slots,"default",{},()=>[t.title?(L(),I("title",r9,qt(t.title),1)):Et("",!0),mt(" "+qt(t.text.replace(/ /g,"\xA0")),1)])],16,i9))}};function ws(t){switch(t._type){case"document":case"block_quote":case"list":case"item":case"paragraph":case"heading":case"emph":case"strong":case"link":case"image":case"custom_inline":case"custom_block":return!0;default:return!1}}var o9=function(t,e){this.current=t,this.entering=e===!0},s9=function(){var t=this.current,e=this.entering;if(t===null)return null;var n=ws(t);return e&&n?t._firstChild?(this.current=t._firstChild,this.entering=!0):this.entering=!1:t===this.root?this.current=null:t._next===null?(this.current=t._parent,this.entering=!1):(this.current=t._next,this.entering=!0),{entering:e,node:t}},l9=function(t){return{current:t,root:t,entering:!0,next:s9,resumeAt:o9}},Dt=function(t,e){this._type=t,this._parent=null,this._firstChild=null,this._lastChild=null,this._prev=null,this._next=null,this._sourcepos=e,this._open=!0,this._string_content=null,this._literal=null,this._listData={},this._info=null,this._destination=null,this._title=null,this._isFenced=!1,this._fenceChar=null,this._fenceLength=0,this._fenceOffset=null,this._level=null,this._onEnter=null,this._onExit=null},Vt=Dt.prototype;Object.defineProperty(Vt,"isContainer",{get:function(){return ws(this)}});Object.defineProperty(Vt,"type",{get:function(){return this._type}});Object.defineProperty(Vt,"firstChild",{get:function(){return this._firstChild}});Object.defineProperty(Vt,"lastChild",{get:function(){return this._lastChild}});Object.defineProperty(Vt,"next",{get:function(){return this._next}});Object.defineProperty(Vt,"prev",{get:function(){return this._prev}});Object.defineProperty(Vt,"parent",{get:function(){return this._parent}});Object.defineProperty(Vt,"sourcepos",{get:function(){return this._sourcepos}});Object.defineProperty(Vt,"literal",{get:function(){return this._literal},set:function(t){this._literal=t}});Object.defineProperty(Vt,"destination",{get:function(){return this._destination},set:function(t){this._destination=t}});Object.defineProperty(Vt,"title",{get:function(){return this._title},set:function(t){this._title=t}});Object.defineProperty(Vt,"info",{get:function(){return this._info},set:function(t){this._info=t}});Object.defineProperty(Vt,"level",{get:function(){return this._level},set:function(t){this._level=t}});Object.defineProperty(Vt,"listType",{get:function(){return this._listData.type},set:function(t){this._listData.type=t}});Object.defineProperty(Vt,"listTight",{get:function(){return this._listData.tight},set:function(t){this._listData.tight=t}});Object.defineProperty(Vt,"listStart",{get:function(){return this._listData.start},set:function(t){this._listData.start=t}});Object.defineProperty(Vt,"listDelimiter",{get:function(){return this._listData.delimiter},set:function(t){this._listData.delimiter=t}});Object.defineProperty(Vt,"onEnter",{get:function(){return this._onEnter},set:function(t){this._onEnter=t}});Object.defineProperty(Vt,"onExit",{get:function(){return this._onExit},set:function(t){this._onExit=t}});Dt.prototype.appendChild=function(t){t.unlink(),t._parent=this,this._lastChild?(this._lastChild._next=t,t._prev=this._lastChild,this._lastChild=t):(this._firstChild=t,this._lastChild=t)};Dt.prototype.prependChild=function(t){t.unlink(),t._parent=this,this._firstChild?(this._firstChild._prev=t,t._next=this._firstChild,this._firstChild=t):(this._firstChild=t,this._lastChild=t)};Dt.prototype.unlink=function(){this._prev?this._prev._next=this._next:this._parent&&(this._parent._firstChild=this._next),this._next?this._next._prev=this._prev:this._parent&&(this._parent._lastChild=this._prev),this._parent=null,this._next=null,this._prev=null};Dt.prototype.insertAfter=function(t){t.unlink(),t._next=this._next,t._next&&(t._next._prev=t),t._prev=this,this._next=t,t._parent=this._parent,t._next||(t._parent._lastChild=t)};Dt.prototype.insertBefore=function(t){t.unlink(),t._prev=this._prev,t._prev&&(t._prev._next=t),t._next=this,this._prev=t,t._parent=this._parent,t._prev||(t._parent._firstChild=t)};Dt.prototype.walker=function(){var t=new l9(this);return t};function a9(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Hn,Fr;function c9(){if(Fr)return Hn;Fr=1;var t={};function e(i){var r,o,l=t[i];if(l)return l;for(l=t[i]=[],r=0;r<128;r++)o=String.fromCharCode(r),/^[0-9a-z]$/i.test(o)?l.push(o):l.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2));for(r=0;r<i.length;r++)l[i.charCodeAt(r)]=i[r];return l}function n(i,r,o){var l,c,a,s,u,m="";for(typeof r!="string"&&(o=r,r=n.defaultChars),typeof o>"u"&&(o=!0),u=e(r),l=0,c=i.length;l<c;l++){if(a=i.charCodeAt(l),o&&a===37&&l+2<c&&/^[0-9a-f]{2}$/i.test(i.slice(l+1,l+3))){m+=i.slice(l,l+3),l+=2;continue}if(a<128){m+=u[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&l+1<c&&(s=i.charCodeAt(l+1),s>=56320&&s<=57343)){m+=encodeURIComponent(i[l]+i[l+1]),l++;continue}m+="%EF%BF%BD";continue}m+=encodeURIComponent(i[l])}return m}return n.defaultChars=";/?:@&=+$,-_.!~*'()#",n.componentChars="-_.!~*'()",Hn=n,Hn}var u9=c9();const h9=a9(u9);var Xn={},m1={},H1={},Gr;function f9(){return Gr||(Gr=1,Object.defineProperty(H1,"__esModule",{value:!0}),H1.default=new Uint16Array([14866,60,237,340,721,1312,1562,1654,1838,1957,2183,2239,2301,2958,3037,3893,4123,4298,4330,4801,5191,5395,5752,5903,5943,5972,6050,0,0,0,0,0,0,6135,6565,7422,8183,8738,9242,9503,9938,10189,10573,10637,10715,11950,12246,13539,13950,14445,14533,15364,16514,16980,17390,17763,17849,18036,18125,4096,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,92,100,106,115,122,137,142,151,157,163,167,182,196,204,220,229,108,105,103,33024,198,59,32768,198,80,33024,38,59,32768,38,99,117,116,101,33024,193,59,32768,193,114,101,118,101,59,32768,258,512,105,121,127,134,114,99,33024,194,59,32768,194,59,32768,1040,114,59,32896,55349,56580,114,97,118,101,33024,192,59,32768,192,112,104,97,59,32768,913,97,99,114,59,32768,256,100,59,32768,10835,512,103,112,172,177,111,110,59,32768,260,102,59,32896,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,32768,8289,105,110,103,33024,197,59,32768,197,512,99,115,209,214,114,59,32896,55349,56476,105,103,110,59,32768,8788,105,108,100,101,33024,195,59,32768,195,109,108,33024,196,59,32768,196,2048,97,99,101,102,111,114,115,117,253,278,282,310,315,321,327,332,512,99,114,258,267,107,115,108,97,115,104,59,32768,8726,583,271,274,59,32768,10983,101,100,59,32768,8966,121,59,32768,1041,768,99,114,116,289,296,306,97,117,115,101,59,32768,8757,110,111,117,108,108,105,115,59,32768,8492,97,59,32768,914,114,59,32896,55349,56581,112,102,59,32896,55349,56633,101,118,101,59,32768,728,99,114,59,32768,8492,109,112,101,113,59,32768,8782,3584,72,79,97,99,100,101,102,104,105,108,111,114,115,117,368,373,380,426,461,466,487,491,495,533,593,695,701,707,99,121,59,32768,1063,80,89,33024,169,59,32768,169,768,99,112,121,387,393,419,117,116,101,59,32768,262,512,59,105,398,400,32768,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,32768,8517,108,101,121,115,59,32768,8493,1024,97,101,105,111,435,441,449,454,114,111,110,59,32768,268,100,105,108,33024,199,59,32768,199,114,99,59,32768,264,110,105,110,116,59,32768,8752,111,116,59,32768,266,512,100,110,471,478,105,108,108,97,59,32768,184,116,101,114,68,111,116,59,32768,183,114,59,32768,8493,105,59,32768,935,114,99,108,101,1024,68,77,80,84,508,513,520,526,111,116,59,32768,8857,105,110,117,115,59,32768,8854,108,117,115,59,32768,8853,105,109,101,115,59,32768,8855,111,512,99,115,539,562,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,32768,8754,101,67,117,114,108,121,512,68,81,573,586,111,117,98,108,101,81,117,111,116,101,59,32768,8221,117,111,116,101,59,32768,8217,1024,108,110,112,117,602,614,648,664,111,110,512,59,101,609,611,32768,8759,59,32768,10868,768,103,105,116,621,629,634,114,117,101,110,116,59,32768,8801,110,116,59,32768,8751,111,117,114,73,110,116,101,103,114,97,108,59,32768,8750,512,102,114,653,656,59,32768,8450,111,100,117,99,116,59,32768,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,32768,8755,111,115,115,59,32768,10799,99,114,59,32896,55349,56478,112,512,59,67,713,715,32768,8915,97,112,59,32768,8781,2816,68,74,83,90,97,99,101,102,105,111,115,743,758,763,768,773,795,809,821,826,910,1295,512,59,111,748,750,32768,8517,116,114,97,104,100,59,32768,10513,99,121,59,32768,1026,99,121,59,32768,1029,99,121,59,32768,1039,768,103,114,115,780,786,790,103,101,114,59,32768,8225,114,59,32768,8609,104,118,59,32768,10980,512,97,121,800,806,114,111,110,59,32768,270,59,32768,1044,108,512,59,116,815,817,32768,8711,97,59,32768,916,114,59,32896,55349,56583,512,97,102,831,897,512,99,109,836,891,114,105,116,105,99,97,108,1024,65,68,71,84,852,859,877,884,99,117,116,101,59,32768,180,111,581,864,867,59,32768,729,98,108,101,65,99,117,116,101,59,32768,733,114,97,118,101,59,32768,96,105,108,100,101,59,32768,732,111,110,100,59,32768,8900,102,101,114,101,110,116,105,97,108,68,59,32768,8518,2113,920,0,0,0,925,946,0,1139,102,59,32896,55349,56635,768,59,68,69,931,933,938,32768,168,111,116,59,32768,8412,113,117,97,108,59,32768,8784,98,108,101,1536,67,68,76,82,85,86,961,978,996,1080,1101,1125,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,32768,8751,111,1093,985,0,0,988,59,32768,168,110,65,114,114,111,119,59,32768,8659,512,101,111,1001,1034,102,116,768,65,82,84,1010,1017,1029,114,114,111,119,59,32768,8656,105,103,104,116,65,114,114,111,119,59,32768,8660,101,101,59,32768,10980,110,103,512,76,82,1041,1068,101,102,116,512,65,82,1049,1056,114,114,111,119,59,32768,10232,105,103,104,116,65,114,114,111,119,59,32768,10234,105,103,104,116,65,114,114,111,119,59,32768,10233,105,103,104,116,512,65,84,1089,1096,114,114,111,119,59,32768,8658,101,101,59,32768,8872,112,1042,1108,0,0,1115,114,114,111,119,59,32768,8657,111,119,110,65,114,114,111,119,59,32768,8661,101,114,116,105,99,97,108,66,97,114,59,32768,8741,110,1536,65,66,76,82,84,97,1152,1179,1186,1236,1272,1288,114,114,111,119,768,59,66,85,1163,1165,1170,32768,8595,97,114,59,32768,10515,112,65,114,114,111,119,59,32768,8693,114,101,118,101,59,32768,785,101,102,116,1315,1196,0,1209,0,1220,105,103,104,116,86,101,99,116,111,114,59,32768,10576,101,101,86,101,99,116,111,114,59,32768,10590,101,99,116,111,114,512,59,66,1229,1231,32768,8637,97,114,59,32768,10582,105,103,104,116,805,1245,0,1256,101,101,86,101,99,116,111,114,59,32768,10591,101,99,116,111,114,512,59,66,1265,1267,32768,8641,97,114,59,32768,10583,101,101,512,59,65,1279,1281,32768,8868,114,114,111,119,59,32768,8615,114,114,111,119,59,32768,8659,512,99,116,1300,1305,114,59,32896,55349,56479,114,111,107,59,32768,272,4096,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1344,1348,1354,1363,1386,1391,1396,1405,1413,1460,1475,1483,1514,1527,1531,1538,71,59,32768,330,72,33024,208,59,32768,208,99,117,116,101,33024,201,59,32768,201,768,97,105,121,1370,1376,1383,114,111,110,59,32768,282,114,99,33024,202,59,32768,202,59,32768,1069,111,116,59,32768,278,114,59,32896,55349,56584,114,97,118,101,33024,200,59,32768,200,101,109,101,110,116,59,32768,8712,512,97,112,1418,1423,99,114,59,32768,274,116,121,1060,1431,0,0,1444,109,97,108,108,83,113,117,97,114,101,59,32768,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,32768,9643,512,103,112,1465,1470,111,110,59,32768,280,102,59,32896,55349,56636,115,105,108,111,110,59,32768,917,117,512,97,105,1489,1504,108,512,59,84,1495,1497,32768,10869,105,108,100,101,59,32768,8770,108,105,98,114,105,117,109,59,32768,8652,512,99,105,1519,1523,114,59,32768,8496,109,59,32768,10867,97,59,32768,919,109,108,33024,203,59,32768,203,512,105,112,1543,1549,115,116,115,59,32768,8707,111,110,101,110,116,105,97,108,69,59,32768,8519,1280,99,102,105,111,115,1572,1576,1581,1620,1648,121,59,32768,1060,114,59,32896,55349,56585,108,108,101,100,1060,1591,0,0,1604,109,97,108,108,83,113,117,97,114,101,59,32768,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,32768,9642,1601,1628,0,1633,0,0,1639,102,59,32896,55349,56637,65,108,108,59,32768,8704,114,105,101,114,116,114,102,59,32768,8497,99,114,59,32768,8497,3072,74,84,97,98,99,100,102,103,111,114,115,116,1678,1683,1688,1701,1708,1729,1734,1739,1742,1748,1828,1834,99,121,59,32768,1027,33024,62,59,32768,62,109,109,97,512,59,100,1696,1698,32768,915,59,32768,988,114,101,118,101,59,32768,286,768,101,105,121,1715,1721,1726,100,105,108,59,32768,290,114,99,59,32768,284,59,32768,1043,111,116,59,32768,288,114,59,32896,55349,56586,59,32768,8921,112,102,59,32896,55349,56638,101,97,116,101,114,1536,69,70,71,76,83,84,1766,1783,1794,1803,1809,1821,113,117,97,108,512,59,76,1775,1777,32768,8805,101,115,115,59,32768,8923,117,108,108,69,113,117,97,108,59,32768,8807,114,101,97,116,101,114,59,32768,10914,101,115,115,59,32768,8823,108,97,110,116,69,113,117,97,108,59,32768,10878,105,108,100,101,59,32768,8819,99,114,59,32896,55349,56482,59,32768,8811,2048,65,97,99,102,105,111,115,117,1854,1861,1874,1880,1884,1897,1919,1934,82,68,99,121,59,32768,1066,512,99,116,1866,1871,101,107,59,32768,711,59,32768,94,105,114,99,59,32768,292,114,59,32768,8460,108,98,101,114,116,83,112,97,99,101,59,32768,8459,833,1902,0,1906,102,59,32768,8461,105,122,111,110,116,97,108,76,105,110,101,59,32768,9472,512,99,116,1924,1928,114,59,32768,8459,114,111,107,59,32768,294,109,112,533,1940,1950,111,119,110,72,117,109,112,59,32768,8782,113,117,97,108,59,32768,8783,3584,69,74,79,97,99,100,102,103,109,110,111,115,116,117,1985,1990,1996,2001,2010,2025,2030,2034,2043,2077,2134,2155,2160,2167,99,121,59,32768,1045,108,105,103,59,32768,306,99,121,59,32768,1025,99,117,116,101,33024,205,59,32768,205,512,105,121,2015,2022,114,99,33024,206,59,32768,206,59,32768,1048,111,116,59,32768,304,114,59,32768,8465,114,97,118,101,33024,204,59,32768,204,768,59,97,112,2050,2052,2070,32768,8465,512,99,103,2057,2061,114,59,32768,298,105,110,97,114,121,73,59,32768,8520,108,105,101,115,59,32768,8658,837,2082,0,2110,512,59,101,2086,2088,32768,8748,512,103,114,2093,2099,114,97,108,59,32768,8747,115,101,99,116,105,111,110,59,32768,8898,105,115,105,98,108,101,512,67,84,2120,2127,111,109,109,97,59,32768,8291,105,109,101,115,59,32768,8290,768,103,112,116,2141,2146,2151,111,110,59,32768,302,102,59,32896,55349,56640,97,59,32768,921,99,114,59,32768,8464,105,108,100,101,59,32768,296,828,2172,0,2177,99,121,59,32768,1030,108,33024,207,59,32768,207,1280,99,102,111,115,117,2193,2206,2211,2217,2232,512,105,121,2198,2203,114,99,59,32768,308,59,32768,1049,114,59,32896,55349,56589,112,102,59,32896,55349,56641,820,2222,0,2227,114,59,32896,55349,56485,114,99,121,59,32768,1032,107,99,121,59,32768,1028,1792,72,74,97,99,102,111,115,2253,2258,2263,2269,2283,2288,2294,99,121,59,32768,1061,99,121,59,32768,1036,112,112,97,59,32768,922,512,101,121,2274,2280,100,105,108,59,32768,310,59,32768,1050,114,59,32896,55349,56590,112,102,59,32896,55349,56642,99,114,59,32896,55349,56486,2816,74,84,97,99,101,102,108,109,111,115,116,2323,2328,2333,2374,2396,2775,2780,2797,2804,2934,2954,99,121,59,32768,1033,33024,60,59,32768,60,1280,99,109,110,112,114,2344,2350,2356,2360,2370,117,116,101,59,32768,313,98,100,97,59,32768,923,103,59,32768,10218,108,97,99,101,116,114,102,59,32768,8466,114,59,32768,8606,768,97,101,121,2381,2387,2393,114,111,110,59,32768,317,100,105,108,59,32768,315,59,32768,1051,512,102,115,2401,2702,116,2560,65,67,68,70,82,84,85,86,97,114,2423,2470,2479,2530,2537,2561,2618,2666,2683,2690,512,110,114,2428,2441,103,108,101,66,114,97,99,107,101,116,59,32768,10216,114,111,119,768,59,66,82,2451,2453,2458,32768,8592,97,114,59,32768,8676,105,103,104,116,65,114,114,111,119,59,32768,8646,101,105,108,105,110,103,59,32768,8968,111,838,2485,0,2498,98,108,101,66,114,97,99,107,101,116,59,32768,10214,110,805,2503,0,2514,101,101,86,101,99,116,111,114,59,32768,10593,101,99,116,111,114,512,59,66,2523,2525,32768,8643,97,114,59,32768,10585,108,111,111,114,59,32768,8970,105,103,104,116,512,65,86,2546,2553,114,114,111,119,59,32768,8596,101,99,116,111,114,59,32768,10574,512,101,114,2566,2591,101,768,59,65,86,2574,2576,2583,32768,8867,114,114,111,119,59,32768,8612,101,99,116,111,114,59,32768,10586,105,97,110,103,108,101,768,59,66,69,2604,2606,2611,32768,8882,97,114,59,32768,10703,113,117,97,108,59,32768,8884,112,768,68,84,86,2626,2638,2649,111,119,110,86,101,99,116,111,114,59,32768,10577,101,101,86,101,99,116,111,114,59,32768,10592,101,99,116,111,114,512,59,66,2659,2661,32768,8639,97,114,59,32768,10584,101,99,116,111,114,512,59,66,2676,2678,32768,8636,97,114,59,32768,10578,114,114,111,119,59,32768,8656,105,103,104,116,97,114,114,111,119,59,32768,8660,115,1536,69,70,71,76,83,84,2716,2730,2741,2750,2756,2768,113,117,97,108,71,114,101,97,116,101,114,59,32768,8922,117,108,108,69,113,117,97,108,59,32768,8806,114,101,97,116,101,114,59,32768,8822,101,115,115,59,32768,10913,108,97,110,116,69,113,117,97,108,59,32768,10877,105,108,100,101,59,32768,8818,114,59,32896,55349,56591,512,59,101,2785,2787,32768,8920,102,116,97,114,114,111,119,59,32768,8666,105,100,111,116,59,32768,319,768,110,112,119,2811,2899,2904,103,1024,76,82,108,114,2821,2848,2860,2887,101,102,116,512,65,82,2829,2836,114,114,111,119,59,32768,10229,105,103,104,116,65,114,114,111,119,59,32768,10231,105,103,104,116,65,114,114,111,119,59,32768,10230,101,102,116,512,97,114,2868,2875,114,114,111,119,59,32768,10232,105,103,104,116,97,114,114,111,119,59,32768,10234,105,103,104,116,97,114,114,111,119,59,32768,10233,102,59,32896,55349,56643,101,114,512,76,82,2911,2922,101,102,116,65,114,114,111,119,59,32768,8601,105,103,104,116,65,114,114,111,119,59,32768,8600,768,99,104,116,2941,2945,2948,114,59,32768,8466,59,32768,8624,114,111,107,59,32768,321,59,32768,8810,2048,97,99,101,102,105,111,115,117,2974,2978,2982,3007,3012,3022,3028,3033,112,59,32768,10501,121,59,32768,1052,512,100,108,2987,2998,105,117,109,83,112,97,99,101,59,32768,8287,108,105,110,116,114,102,59,32768,8499,114,59,32896,55349,56592,110,117,115,80,108,117,115,59,32768,8723,112,102,59,32896,55349,56644,99,114,59,32768,8499,59,32768,924,2304,74,97,99,101,102,111,115,116,117,3055,3060,3067,3089,3201,3206,3874,3880,3889,99,121,59,32768,1034,99,117,116,101,59,32768,323,768,97,101,121,3074,3080,3086,114,111,110,59,32768,327,100,105,108,59,32768,325,59,32768,1053,768,103,115,119,3096,3160,3194,97,116,105,118,101,768,77,84,86,3108,3121,3145,101,100,105,117,109,83,112,97,99,101,59,32768,8203,104,105,512,99,110,3128,3137,107,83,112,97,99,101,59,32768,8203,83,112,97,99,101,59,32768,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,32768,8203,116,101,100,512,71,76,3168,3184,114,101,97,116,101,114,71,114,101,97,116,101,114,59,32768,8811,101,115,115,76,101,115,115,59,32768,8810,76,105,110,101,59,32768,10,114,59,32896,55349,56593,1024,66,110,112,116,3215,3222,3238,3242,114,101,97,107,59,32768,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,32768,160,102,59,32768,8469,3328,59,67,68,69,71,72,76,78,80,82,83,84,86,3269,3271,3293,3312,3352,3430,3455,3551,3589,3625,3678,3821,3861,32768,10988,512,111,117,3276,3286,110,103,114,117,101,110,116,59,32768,8802,112,67,97,112,59,32768,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,32768,8742,768,108,113,120,3319,3327,3345,101,109,101,110,116,59,32768,8713,117,97,108,512,59,84,3335,3337,32768,8800,105,108,100,101,59,32896,8770,824,105,115,116,115,59,32768,8708,114,101,97,116,101,114,1792,59,69,70,71,76,83,84,3373,3375,3382,3394,3404,3410,3423,32768,8815,113,117,97,108,59,32768,8817,117,108,108,69,113,117,97,108,59,32896,8807,824,114,101,97,116,101,114,59,32896,8811,824,101,115,115,59,32768,8825,108,97,110,116,69,113,117,97,108,59,32896,10878,824,105,108,100,101,59,32768,8821,117,109,112,533,3437,3448,111,119,110,72,117,109,112,59,32896,8782,824,113,117,97,108,59,32896,8783,824,101,512,102,115,3461,3492,116,84,114,105,97,110,103,108,101,768,59,66,69,3477,3479,3485,32768,8938,97,114,59,32896,10703,824,113,117,97,108,59,32768,8940,115,1536,59,69,71,76,83,84,3506,3508,3515,3524,3531,3544,32768,8814,113,117,97,108,59,32768,8816,114,101,97,116,101,114,59,32768,8824,101,115,115,59,32896,8810,824,108,97,110,116,69,113,117,97,108,59,32896,10877,824,105,108,100,101,59,32768,8820,101,115,116,101,100,512,71,76,3561,3578,114,101,97,116,101,114,71,114,101,97,116,101,114,59,32896,10914,824,101,115,115,76,101,115,115,59,32896,10913,824,114,101,99,101,100,101,115,768,59,69,83,3603,3605,3613,32768,8832,113,117,97,108,59,32896,10927,824,108,97,110,116,69,113,117,97,108,59,32768,8928,512,101,105,3630,3645,118,101,114,115,101,69,108,101,109,101,110,116,59,32768,8716,103,104,116,84,114,105,97,110,103,108,101,768,59,66,69,3663,3665,3671,32768,8939,97,114,59,32896,10704,824,113,117,97,108,59,32768,8941,512,113,117,3683,3732,117,97,114,101,83,117,512,98,112,3694,3712,115,101,116,512,59,69,3702,3705,32896,8847,824,113,117,97,108,59,32768,8930,101,114,115,101,116,512,59,69,3722,3725,32896,8848,824,113,117,97,108,59,32768,8931,768,98,99,112,3739,3757,3801,115,101,116,512,59,69,3747,3750,32896,8834,8402,113,117,97,108,59,32768,8840,99,101,101,100,115,1024,59,69,83,84,3771,3773,3781,3793,32768,8833,113,117,97,108,59,32896,10928,824,108,97,110,116,69,113,117,97,108,59,32768,8929,105,108,100,101,59,32896,8831,824,101,114,115,101,116,512,59,69,3811,3814,32896,8835,8402,113,117,97,108,59,32768,8841,105,108,100,101,1024,59,69,70,84,3834,3836,3843,3854,32768,8769,113,117,97,108,59,32768,8772,117,108,108,69,113,117,97,108,59,32768,8775,105,108,100,101,59,32768,8777,101,114,116,105,99,97,108,66,97,114,59,32768,8740,99,114,59,32896,55349,56489,105,108,100,101,33024,209,59,32768,209,59,32768,925,3584,69,97,99,100,102,103,109,111,112,114,115,116,117,118,3921,3927,3936,3951,3958,3963,3972,3996,4002,4034,4037,4055,4071,4078,108,105,103,59,32768,338,99,117,116,101,33024,211,59,32768,211,512,105,121,3941,3948,114,99,33024,212,59,32768,212,59,32768,1054,98,108,97,99,59,32768,336,114,59,32896,55349,56594,114,97,118,101,33024,210,59,32768,210,768,97,101,105,3979,3984,3989,99,114,59,32768,332,103,97,59,32768,937,99,114,111,110,59,32768,927,112,102,59,32896,55349,56646,101,110,67,117,114,108,121,512,68,81,4014,4027,111,117,98,108,101,81,117,111,116,101,59,32768,8220,117,111,116,101,59,32768,8216,59,32768,10836,512,99,108,4042,4047,114,59,32896,55349,56490,97,115,104,33024,216,59,32768,216,105,573,4060,4067,100,101,33024,213,59,32768,213,101,115,59,32768,10807,109,108,33024,214,59,32768,214,101,114,512,66,80,4085,4109,512,97,114,4090,4094,114,59,32768,8254,97,99,512,101,107,4101,4104,59,32768,9182,101,116,59,32768,9140,97,114,101,110,116,104,101,115,105,115,59,32768,9180,2304,97,99,102,104,105,108,111,114,115,4141,4150,4154,4159,4163,4166,4176,4198,4284,114,116,105,97,108,68,59,32768,8706,121,59,32768,1055,114,59,32896,55349,56595,105,59,32768,934,59,32768,928,117,115,77,105,110,117,115,59,32768,177,512,105,112,4181,4194,110,99,97,114,101,112,108,97,110,101,59,32768,8460,102,59,32768,8473,1024,59,101,105,111,4207,4209,4251,4256,32768,10939,99,101,100,101,115,1024,59,69,83,84,4223,4225,4232,4244,32768,8826,113,117,97,108,59,32768,10927,108,97,110,116,69,113,117,97,108,59,32768,8828,105,108,100,101,59,32768,8830,109,101,59,32768,8243,512,100,112,4261,4267,117,99,116,59,32768,8719,111,114,116,105,111,110,512,59,97,4278,4280,32768,8759,108,59,32768,8733,512,99,105,4289,4294,114,59,32896,55349,56491,59,32768,936,1024,85,102,111,115,4306,4313,4318,4323,79,84,33024,34,59,32768,34,114,59,32896,55349,56596,112,102,59,32768,8474,99,114,59,32896,55349,56492,3072,66,69,97,99,101,102,104,105,111,114,115,117,4354,4360,4366,4395,4417,4473,4477,4481,4743,4764,4776,4788,97,114,114,59,32768,10512,71,33024,174,59,32768,174,768,99,110,114,4373,4379,4383,117,116,101,59,32768,340,103,59,32768,10219,114,512,59,116,4389,4391,32768,8608,108,59,32768,10518,768,97,101,121,4402,4408,4414,114,111,110,59,32768,344,100,105,108,59,32768,342,59,32768,1056,512,59,118,4422,4424,32768,8476,101,114,115,101,512,69,85,4433,4458,512,108,113,4438,4446,101,109,101,110,116,59,32768,8715,117,105,108,105,98,114,105,117,109,59,32768,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,32768,10607,114,59,32768,8476,111,59,32768,929,103,104,116,2048,65,67,68,70,84,85,86,97,4501,4547,4556,4607,4614,4671,4719,4736,512,110,114,4506,4519,103,108,101,66,114,97,99,107,101,116,59,32768,10217,114,111,119,768,59,66,76,4529,4531,4536,32768,8594,97,114,59,32768,8677,101,102,116,65,114,114,111,119,59,32768,8644,101,105,108,105,110,103,59,32768,8969,111,838,4562,0,4575,98,108,101,66,114,97,99,107,101,116,59,32768,10215,110,805,4580,0,4591,101,101,86,101,99,116,111,114,59,32768,10589,101,99,116,111,114,512,59,66,4600,4602,32768,8642,97,114,59,32768,10581,108,111,111,114,59,32768,8971,512,101,114,4619,4644,101,768,59,65,86,4627,4629,4636,32768,8866,114,114,111,119,59,32768,8614,101,99,116,111,114,59,32768,10587,105,97,110,103,108,101,768,59,66,69,4657,4659,4664,32768,8883,97,114,59,32768,10704,113,117,97,108,59,32768,8885,112,768,68,84,86,4679,4691,4702,111,119,110,86,101,99,116,111,114,59,32768,10575,101,101,86,101,99,116,111,114,59,32768,10588,101,99,116,111,114,512,59,66,4712,4714,32768,8638,97,114,59,32768,10580,101,99,116,111,114,512,59,66,4729,4731,32768,8640,97,114,59,32768,10579,114,114,111,119,59,32768,8658,512,112,117,4748,4752,102,59,32768,8477,110,100,73,109,112,108,105,101,115,59,32768,10608,105,103,104,116,97,114,114,111,119,59,32768,8667,512,99,104,4781,4785,114,59,32768,8475,59,32768,8625,108,101,68,101,108,97,121,101,100,59,32768,10740,3328,72,79,97,99,102,104,105,109,111,113,115,116,117,4827,4842,4849,4856,4889,4894,4949,4955,4967,4973,5059,5065,5070,512,67,99,4832,4838,72,99,121,59,32768,1065,121,59,32768,1064,70,84,99,121,59,32768,1068,99,117,116,101,59,32768,346,1280,59,97,101,105,121,4867,4869,4875,4881,4886,32768,10940,114,111,110,59,32768,352,100,105,108,59,32768,350,114,99,59,32768,348,59,32768,1057,114,59,32896,55349,56598,111,114,116,1024,68,76,82,85,4906,4917,4928,4940,111,119,110,65,114,114,111,119,59,32768,8595,101,102,116,65,114,114,111,119,59,32768,8592,105,103,104,116,65,114,114,111,119,59,32768,8594,112,65,114,114,111,119,59,32768,8593,103,109,97,59,32768,931,97,108,108,67,105,114,99,108,101,59,32768,8728,112,102,59,32896,55349,56650,1091,4979,0,0,4983,116,59,32768,8730,97,114,101,1024,59,73,83,85,4994,4996,5010,5052,32768,9633,110,116,101,114,115,101,99,116,105,111,110,59,32768,8851,117,512,98,112,5016,5033,115,101,116,512,59,69,5024,5026,32768,8847,113,117,97,108,59,32768,8849,101,114,115,101,116,512,59,69,5043,5045,32768,8848,113,117,97,108,59,32768,8850,110,105,111,110,59,32768,8852,99,114,59,32896,55349,56494,97,114,59,32768,8902,1024,98,99,109,112,5079,5102,5155,5158,512,59,115,5084,5086,32768,8912,101,116,512,59,69,5093,5095,32768,8912,113,117,97,108,59,32768,8838,512,99,104,5107,5148,101,101,100,115,1024,59,69,83,84,5120,5122,5129,5141,32768,8827,113,117,97,108,59,32768,10928,108,97,110,116,69,113,117,97,108,59,32768,8829,105,108,100,101,59,32768,8831,84,104,97,116,59,32768,8715,59,32768,8721,768,59,101,115,5165,5167,5185,32768,8913,114,115,101,116,512,59,69,5176,5178,32768,8835,113,117,97,108,59,32768,8839,101,116,59,32768,8913,2816,72,82,83,97,99,102,104,105,111,114,115,5213,5221,5227,5241,5252,5274,5279,5323,5362,5368,5378,79,82,78,33024,222,59,32768,222,65,68,69,59,32768,8482,512,72,99,5232,5237,99,121,59,32768,1035,121,59,32768,1062,512,98,117,5246,5249,59,32768,9,59,32768,932,768,97,101,121,5259,5265,5271,114,111,110,59,32768,356,100,105,108,59,32768,354,59,32768,1058,114,59,32896,55349,56599,512,101,105,5284,5300,835,5289,0,5297,101,102,111,114,101,59,32768,8756,97,59,32768,920,512,99,110,5305,5315,107,83,112,97,99,101,59,32896,8287,8202,83,112,97,99,101,59,32768,8201,108,100,101,1024,59,69,70,84,5335,5337,5344,5355,32768,8764,113,117,97,108,59,32768,8771,117,108,108,69,113,117,97,108,59,32768,8773,105,108,100,101,59,32768,8776,112,102,59,32896,55349,56651,105,112,108,101,68,111,116,59,32768,8411,512,99,116,5383,5388,114,59,32896,55349,56495,114,111,107,59,32768,358,5426,5417,5444,5458,5473,0,5480,5485,0,0,0,0,0,5494,5500,5564,5579,0,5726,5732,5738,5745,512,99,114,5421,5429,117,116,101,33024,218,59,32768,218,114,512,59,111,5435,5437,32768,8607,99,105,114,59,32768,10569,114,820,5449,0,5453,121,59,32768,1038,118,101,59,32768,364,512,105,121,5462,5469,114,99,33024,219,59,32768,219,59,32768,1059,98,108,97,99,59,32768,368,114,59,32896,55349,56600,114,97,118,101,33024,217,59,32768,217,97,99,114,59,32768,362,512,100,105,5504,5548,101,114,512,66,80,5511,5535,512,97,114,5516,5520,114,59,32768,95,97,99,512,101,107,5527,5530,59,32768,9183,101,116,59,32768,9141,97,114,101,110,116,104,101,115,105,115,59,32768,9181,111,110,512,59,80,5555,5557,32768,8899,108,117,115,59,32768,8846,512,103,112,5568,5573,111,110,59,32768,370,102,59,32896,55349,56652,2048,65,68,69,84,97,100,112,115,5595,5624,5635,5648,5664,5671,5682,5712,114,114,111,119,768,59,66,68,5606,5608,5613,32768,8593,97,114,59,32768,10514,111,119,110,65,114,114,111,119,59,32768,8645,111,119,110,65,114,114,111,119,59,32768,8597,113,117,105,108,105,98,114,105,117,109,59,32768,10606,101,101,512,59,65,5655,5657,32768,8869,114,114,111,119,59,32768,8613,114,114,111,119,59,32768,8657,111,119,110,97,114,114,111,119,59,32768,8661,101,114,512,76,82,5689,5700,101,102,116,65,114,114,111,119,59,32768,8598,105,103,104,116,65,114,114,111,119,59,32768,8599,105,512,59,108,5718,5720,32768,978,111,110,59,32768,933,105,110,103,59,32768,366,99,114,59,32896,55349,56496,105,108,100,101,59,32768,360,109,108,33024,220,59,32768,220,2304,68,98,99,100,101,102,111,115,118,5770,5776,5781,5785,5798,5878,5883,5889,5895,97,115,104,59,32768,8875,97,114,59,32768,10987,121,59,32768,1042,97,115,104,512,59,108,5793,5795,32768,8873,59,32768,10982,512,101,114,5803,5806,59,32768,8897,768,98,116,121,5813,5818,5866,97,114,59,32768,8214,512,59,105,5823,5825,32768,8214,99,97,108,1024,66,76,83,84,5837,5842,5848,5859,97,114,59,32768,8739,105,110,101,59,32768,124,101,112,97,114,97,116,111,114,59,32768,10072,105,108,100,101,59,32768,8768,84,104,105,110,83,112,97,99,101,59,32768,8202,114,59,32896,55349,56601,112,102,59,32896,55349,56653,99,114,59,32896,55349,56497,100,97,115,104,59,32768,8874,1280,99,101,102,111,115,5913,5919,5925,5930,5936,105,114,99,59,32768,372,100,103,101,59,32768,8896,114,59,32896,55349,56602,112,102,59,32896,55349,56654,99,114,59,32896,55349,56498,1024,102,105,111,115,5951,5956,5959,5965,114,59,32896,55349,56603,59,32768,926,112,102,59,32896,55349,56655,99,114,59,32896,55349,56499,2304,65,73,85,97,99,102,111,115,117,5990,5995,6e3,6005,6014,6027,6032,6038,6044,99,121,59,32768,1071,99,121,59,32768,1031,99,121,59,32768,1070,99,117,116,101,33024,221,59,32768,221,512,105,121,6019,6024,114,99,59,32768,374,59,32768,1067,114,59,32896,55349,56604,112,102,59,32896,55349,56656,99,114,59,32896,55349,56500,109,108,59,32768,376,2048,72,97,99,100,101,102,111,115,6066,6071,6078,6092,6097,6119,6123,6128,99,121,59,32768,1046,99,117,116,101,59,32768,377,512,97,121,6083,6089,114,111,110,59,32768,381,59,32768,1047,111,116,59,32768,379,835,6102,0,6116,111,87,105,100,116,104,83,112,97,99,101,59,32768,8203,97,59,32768,918,114,59,32768,8488,112,102,59,32768,8484,99,114,59,32896,55349,56501,5938,6159,6168,6175,0,6214,6222,6233,0,0,0,0,6242,6267,6290,6429,6444,0,6495,6503,6531,6540,0,6547,99,117,116,101,33024,225,59,32768,225,114,101,118,101,59,32768,259,1536,59,69,100,105,117,121,6187,6189,6193,6196,6203,6210,32768,8766,59,32896,8766,819,59,32768,8767,114,99,33024,226,59,32768,226,116,101,33024,180,59,32768,180,59,32768,1072,108,105,103,33024,230,59,32768,230,512,59,114,6226,6228,32768,8289,59,32896,55349,56606,114,97,118,101,33024,224,59,32768,224,512,101,112,6246,6261,512,102,112,6251,6257,115,121,109,59,32768,8501,104,59,32768,8501,104,97,59,32768,945,512,97,112,6271,6284,512,99,108,6276,6280,114,59,32768,257,103,59,32768,10815,33024,38,59,32768,38,1077,6295,0,0,6326,1280,59,97,100,115,118,6305,6307,6312,6315,6322,32768,8743,110,100,59,32768,10837,59,32768,10844,108,111,112,101,59,32768,10840,59,32768,10842,1792,59,101,108,109,114,115,122,6340,6342,6345,6349,6391,6410,6422,32768,8736,59,32768,10660,101,59,32768,8736,115,100,512,59,97,6356,6358,32768,8737,2098,6368,6371,6374,6377,6380,6383,6386,6389,59,32768,10664,59,32768,10665,59,32768,10666,59,32768,10667,59,32768,10668,59,32768,10669,59,32768,10670,59,32768,10671,116,512,59,118,6397,6399,32768,8735,98,512,59,100,6405,6407,32768,8894,59,32768,10653,512,112,116,6415,6419,104,59,32768,8738,59,32768,197,97,114,114,59,32768,9084,512,103,112,6433,6438,111,110,59,32768,261,102,59,32896,55349,56658,1792,59,69,97,101,105,111,112,6458,6460,6463,6469,6472,6476,6480,32768,8776,59,32768,10864,99,105,114,59,32768,10863,59,32768,8778,100,59,32768,8779,115,59,32768,39,114,111,120,512,59,101,6488,6490,32768,8776,113,59,32768,8778,105,110,103,33024,229,59,32768,229,768,99,116,121,6509,6514,6517,114,59,32896,55349,56502,59,32768,42,109,112,512,59,101,6524,6526,32768,8776,113,59,32768,8781,105,108,100,101,33024,227,59,32768,227,109,108,33024,228,59,32768,228,512,99,105,6551,6559,111,110,105,110,116,59,32768,8755,110,116,59,32768,10769,4096,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,6597,6602,6673,6688,6701,6707,6768,6773,6891,6898,6999,7023,7309,7316,7334,7383,111,116,59,32768,10989,512,99,114,6607,6652,107,1024,99,101,112,115,6617,6623,6632,6639,111,110,103,59,32768,8780,112,115,105,108,111,110,59,32768,1014,114,105,109,101,59,32768,8245,105,109,512,59,101,6646,6648,32768,8765,113,59,32768,8909,583,6656,6661,101,101,59,32768,8893,101,100,512,59,103,6667,6669,32768,8965,101,59,32768,8965,114,107,512,59,116,6680,6682,32768,9141,98,114,107,59,32768,9142,512,111,121,6693,6698,110,103,59,32768,8780,59,32768,1073,113,117,111,59,32768,8222,1280,99,109,112,114,116,6718,6731,6738,6743,6749,97,117,115,512,59,101,6726,6728,32768,8757,59,32768,8757,112,116,121,118,59,32768,10672,115,105,59,32768,1014,110,111,117,59,32768,8492,768,97,104,119,6756,6759,6762,59,32768,946,59,32768,8502,101,101,110,59,32768,8812,114,59,32896,55349,56607,103,1792,99,111,115,116,117,118,119,6789,6809,6834,6850,6872,6879,6884,768,97,105,117,6796,6800,6805,112,59,32768,8898,114,99,59,32768,9711,112,59,32768,8899,768,100,112,116,6816,6821,6827,111,116,59,32768,10752,108,117,115,59,32768,10753,105,109,101,115,59,32768,10754,1090,6840,0,0,6846,99,117,112,59,32768,10758,97,114,59,32768,9733,114,105,97,110,103,108,101,512,100,117,6862,6868,111,119,110,59,32768,9661,112,59,32768,9651,112,108,117,115,59,32768,10756,101,101,59,32768,8897,101,100,103,101,59,32768,8896,97,114,111,119,59,32768,10509,768,97,107,111,6905,6976,6994,512,99,110,6910,6972,107,768,108,115,116,6918,6927,6935,111,122,101,110,103,101,59,32768,10731,113,117,97,114,101,59,32768,9642,114,105,97,110,103,108,101,1024,59,100,108,114,6951,6953,6959,6965,32768,9652,111,119,110,59,32768,9662,101,102,116,59,32768,9666,105,103,104,116,59,32768,9656,107,59,32768,9251,770,6981,0,6991,771,6985,0,6988,59,32768,9618,59,32768,9617,52,59,32768,9619,99,107,59,32768,9608,512,101,111,7004,7019,512,59,113,7009,7012,32896,61,8421,117,105,118,59,32896,8801,8421,116,59,32768,8976,1024,112,116,119,120,7032,7037,7049,7055,102,59,32896,55349,56659,512,59,116,7042,7044,32768,8869,111,109,59,32768,8869,116,105,101,59,32768,8904,3072,68,72,85,86,98,100,104,109,112,116,117,118,7080,7101,7126,7147,7182,7187,7208,7233,7240,7246,7253,7274,1024,76,82,108,114,7089,7092,7095,7098,59,32768,9559,59,32768,9556,59,32768,9558,59,32768,9555,1280,59,68,85,100,117,7112,7114,7117,7120,7123,32768,9552,59,32768,9574,59,32768,9577,59,32768,9572,59,32768,9575,1024,76,82,108,114,7135,7138,7141,7144,59,32768,9565,59,32768,9562,59,32768,9564,59,32768,9561,1792,59,72,76,82,104,108,114,7162,7164,7167,7170,7173,7176,7179,32768,9553,59,32768,9580,59,32768,9571,59,32768,9568,59,32768,9579,59,32768,9570,59,32768,9567,111,120,59,32768,10697,1024,76,82,108,114,7196,7199,7202,7205,59,32768,9557,59,32768,9554,59,32768,9488,59,32768,9484,1280,59,68,85,100,117,7219,7221,7224,7227,7230,32768,9472,59,32768,9573,59,32768,9576,59,32768,9516,59,32768,9524,105,110,117,115,59,32768,8863,108,117,115,59,32768,8862,105,109,101,115,59,32768,8864,1024,76,82,108,114,7262,7265,7268,7271,59,32768,9563,59,32768,9560,59,32768,9496,59,32768,9492,1792,59,72,76,82,104,108,114,7289,7291,7294,7297,7300,7303,7306,32768,9474,59,32768,9578,59,32768,9569,59,32768,9566,59,32768,9532,59,32768,9508,59,32768,9500,114,105,109,101,59,32768,8245,512,101,118,7321,7326,118,101,59,32768,728,98,97,114,33024,166,59,32768,166,1024,99,101,105,111,7343,7348,7353,7364,114,59,32896,55349,56503,109,105,59,32768,8271,109,512,59,101,7359,7361,32768,8765,59,32768,8909,108,768,59,98,104,7372,7374,7377,32768,92,59,32768,10693,115,117,98,59,32768,10184,573,7387,7399,108,512,59,101,7392,7394,32768,8226,116,59,32768,8226,112,768,59,69,101,7406,7408,7411,32768,8782,59,32768,10926,512,59,113,7416,7418,32768,8783,59,32768,8783,6450,7448,0,7523,7571,7576,7613,0,7618,7647,0,0,7764,0,0,7779,0,0,7899,7914,7949,7955,0,8158,0,8176,768,99,112,114,7454,7460,7509,117,116,101,59,32768,263,1536,59,97,98,99,100,115,7473,7475,7480,7487,7500,7505,32768,8745,110,100,59,32768,10820,114,99,117,112,59,32768,10825,512,97,117,7492,7496,112,59,32768,10827,112,59,32768,10823,111,116,59,32768,10816,59,32896,8745,65024,512,101,111,7514,7518,116,59,32768,8257,110,59,32768,711,1024,97,101,105,117,7531,7544,7552,7557,833,7536,0,7540,115,59,32768,10829,111,110,59,32768,269,100,105,108,33024,231,59,32768,231,114,99,59,32768,265,112,115,512,59,115,7564,7566,32768,10828,109,59,32768,10832,111,116,59,32768,267,768,100,109,110,7582,7589,7596,105,108,33024,184,59,32768,184,112,116,121,118,59,32768,10674,116,33280,162,59,101,7603,7605,32768,162,114,100,111,116,59,32768,183,114,59,32896,55349,56608,768,99,101,105,7624,7628,7643,121,59,32768,1095,99,107,512,59,109,7635,7637,32768,10003,97,114,107,59,32768,10003,59,32768,967,114,1792,59,69,99,101,102,109,115,7662,7664,7667,7742,7745,7752,7757,32768,9675,59,32768,10691,768,59,101,108,7674,7676,7680,32768,710,113,59,32768,8791,101,1074,7687,0,0,7709,114,114,111,119,512,108,114,7695,7701,101,102,116,59,32768,8634,105,103,104,116,59,32768,8635,1280,82,83,97,99,100,7719,7722,7725,7730,7736,59,32768,174,59,32768,9416,115,116,59,32768,8859,105,114,99,59,32768,8858,97,115,104,59,32768,8861,59,32768,8791,110,105,110,116,59,32768,10768,105,100,59,32768,10991,99,105,114,59,32768,10690,117,98,115,512,59,117,7771,7773,32768,9827,105,116,59,32768,9827,1341,7785,7804,7850,0,7871,111,110,512,59,101,7791,7793,32768,58,512,59,113,7798,7800,32768,8788,59,32768,8788,1086,7809,0,0,7820,97,512,59,116,7814,7816,32768,44,59,32768,64,768,59,102,108,7826,7828,7832,32768,8705,110,59,32768,8728,101,512,109,120,7838,7844,101,110,116,59,32768,8705,101,115,59,32768,8450,824,7854,0,7866,512,59,100,7858,7860,32768,8773,111,116,59,32768,10861,110,116,59,32768,8750,768,102,114,121,7877,7881,7886,59,32896,55349,56660,111,100,59,32768,8720,33280,169,59,115,7892,7894,32768,169,114,59,32768,8471,512,97,111,7903,7908,114,114,59,32768,8629,115,115,59,32768,10007,512,99,117,7918,7923,114,59,32896,55349,56504,512,98,112,7928,7938,512,59,101,7933,7935,32768,10959,59,32768,10961,512,59,101,7943,7945,32768,10960,59,32768,10962,100,111,116,59,32768,8943,1792,100,101,108,112,114,118,119,7969,7983,7996,8009,8057,8147,8152,97,114,114,512,108,114,7977,7980,59,32768,10552,59,32768,10549,1089,7989,0,0,7993,114,59,32768,8926,99,59,32768,8927,97,114,114,512,59,112,8004,8006,32768,8630,59,32768,10557,1536,59,98,99,100,111,115,8022,8024,8031,8044,8049,8053,32768,8746,114,99,97,112,59,32768,10824,512,97,117,8036,8040,112,59,32768,10822,112,59,32768,10826,111,116,59,32768,8845,114,59,32768,10821,59,32896,8746,65024,1024,97,108,114,118,8066,8078,8116,8123,114,114,512,59,109,8073,8075,32768,8631,59,32768,10556,121,768,101,118,119,8086,8104,8109,113,1089,8093,0,0,8099,114,101,99,59,32768,8926,117,99,99,59,32768,8927,101,101,59,32768,8910,101,100,103,101,59,32768,8911,101,110,33024,164,59,32768,164,101,97,114,114,111,119,512,108,114,8134,8140,101,102,116,59,32768,8630,105,103,104,116,59,32768,8631,101,101,59,32768,8910,101,100,59,32768,8911,512,99,105,8162,8170,111,110,105,110,116,59,32768,8754,110,116,59,32768,8753,108,99,116,121,59,32768,9005,4864,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8221,8226,8231,8267,8282,8296,8327,8351,8366,8379,8466,8471,8487,8621,8647,8676,8697,8712,8720,114,114,59,32768,8659,97,114,59,32768,10597,1024,103,108,114,115,8240,8246,8252,8256,103,101,114,59,32768,8224,101,116,104,59,32768,8504,114,59,32768,8595,104,512,59,118,8262,8264,32768,8208,59,32768,8867,572,8271,8278,97,114,111,119,59,32768,10511,97,99,59,32768,733,512,97,121,8287,8293,114,111,110,59,32768,271,59,32768,1076,768,59,97,111,8303,8305,8320,32768,8518,512,103,114,8310,8316,103,101,114,59,32768,8225,114,59,32768,8650,116,115,101,113,59,32768,10871,768,103,108,109,8334,8339,8344,33024,176,59,32768,176,116,97,59,32768,948,112,116,121,118,59,32768,10673,512,105,114,8356,8362,115,104,116,59,32768,10623,59,32896,55349,56609,97,114,512,108,114,8373,8376,59,32768,8643,59,32768,8642,1280,97,101,103,115,118,8390,8418,8421,8428,8433,109,768,59,111,115,8398,8400,8415,32768,8900,110,100,512,59,115,8407,8409,32768,8900,117,105,116,59,32768,9830,59,32768,9830,59,32768,168,97,109,109,97,59,32768,989,105,110,59,32768,8946,768,59,105,111,8440,8442,8461,32768,247,100,101,33280,247,59,111,8450,8452,32768,247,110,116,105,109,101,115,59,32768,8903,110,120,59,32768,8903,99,121,59,32768,1106,99,1088,8478,0,0,8483,114,110,59,32768,8990,111,112,59,32768,8973,1280,108,112,116,117,119,8498,8504,8509,8556,8570,108,97,114,59,32768,36,102,59,32896,55349,56661,1280,59,101,109,112,115,8520,8522,8535,8542,8548,32768,729,113,512,59,100,8528,8530,32768,8784,111,116,59,32768,8785,105,110,117,115,59,32768,8760,108,117,115,59,32768,8724,113,117,97,114,101,59,32768,8865,98,108,101,98,97,114,119,101,100,103,101,59,32768,8966,110,768,97,100,104,8578,8585,8597,114,114,111,119,59,32768,8595,111,119,110,97,114,114,111,119,115,59,32768,8650,97,114,112,111,111,110,512,108,114,8608,8614,101,102,116,59,32768,8643,105,103,104,116,59,32768,8642,563,8625,8633,107,97,114,111,119,59,32768,10512,1088,8638,0,0,8643,114,110,59,32768,8991,111,112,59,32768,8972,768,99,111,116,8654,8666,8670,512,114,121,8659,8663,59,32896,55349,56505,59,32768,1109,108,59,32768,10742,114,111,107,59,32768,273,512,100,114,8681,8686,111,116,59,32768,8945,105,512,59,102,8692,8694,32768,9663,59,32768,9662,512,97,104,8702,8707,114,114,59,32768,8693,97,114,59,32768,10607,97,110,103,108,101,59,32768,10662,512,99,105,8725,8729,121,59,32768,1119,103,114,97,114,114,59,32768,10239,4608,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,8774,8788,8807,8844,8849,8852,8866,8895,8929,8977,8989,9004,9046,9136,9151,9171,9184,9199,512,68,111,8779,8784,111,116,59,32768,10871,116,59,32768,8785,512,99,115,8793,8801,117,116,101,33024,233,59,32768,233,116,101,114,59,32768,10862,1024,97,105,111,121,8816,8822,8835,8841,114,111,110,59,32768,283,114,512,59,99,8828,8830,32768,8790,33024,234,59,32768,234,108,111,110,59,32768,8789,59,32768,1101,111,116,59,32768,279,59,32768,8519,512,68,114,8857,8862,111,116,59,32768,8786,59,32896,55349,56610,768,59,114,115,8873,8875,8883,32768,10906,97,118,101,33024,232,59,32768,232,512,59,100,8888,8890,32768,10902,111,116,59,32768,10904,1024,59,105,108,115,8904,8906,8914,8917,32768,10905,110,116,101,114,115,59,32768,9191,59,32768,8467,512,59,100,8922,8924,32768,10901,111,116,59,32768,10903,768,97,112,115,8936,8941,8960,99,114,59,32768,275,116,121,768,59,115,118,8950,8952,8957,32768,8709,101,116,59,32768,8709,59,32768,8709,112,512,49,59,8966,8975,516,8970,8973,59,32768,8196,59,32768,8197,32768,8195,512,103,115,8982,8985,59,32768,331,112,59,32768,8194,512,103,112,8994,8999,111,110,59,32768,281,102,59,32896,55349,56662,768,97,108,115,9011,9023,9028,114,512,59,115,9017,9019,32768,8917,108,59,32768,10723,117,115,59,32768,10865,105,768,59,108,118,9036,9038,9043,32768,949,111,110,59,32768,949,59,32768,1013,1024,99,115,117,118,9055,9071,9099,9128,512,105,111,9060,9065,114,99,59,32768,8790,108,111,110,59,32768,8789,1082,9077,0,0,9081,109,59,32768,8770,97,110,116,512,103,108,9088,9093,116,114,59,32768,10902,101,115,115,59,32768,10901,768,97,101,105,9106,9111,9116,108,115,59,32768,61,115,116,59,32768,8799,118,512,59,68,9122,9124,32768,8801,68,59,32768,10872,112,97,114,115,108,59,32768,10725,512,68,97,9141,9146,111,116,59,32768,8787,114,114,59,32768,10609,768,99,100,105,9158,9162,9167,114,59,32768,8495,111,116,59,32768,8784,109,59,32768,8770,512,97,104,9176,9179,59,32768,951,33024,240,59,32768,240,512,109,114,9189,9195,108,33024,235,59,32768,235,111,59,32768,8364,768,99,105,112,9206,9210,9215,108,59,32768,33,115,116,59,32768,8707,512,101,111,9220,9230,99,116,97,116,105,111,110,59,32768,8496,110,101,110,116,105,97,108,101,59,32768,8519,4914,9262,0,9276,0,9280,9287,0,0,9318,9324,0,9331,0,9352,9357,9386,0,9395,9497,108,108,105,110,103,100,111,116,115,101,113,59,32768,8786,121,59,32768,1092,109,97,108,101,59,32768,9792,768,105,108,114,9293,9299,9313,108,105,103,59,32768,64259,1082,9305,0,0,9309,103,59,32768,64256,105,103,59,32768,64260,59,32896,55349,56611,108,105,103,59,32768,64257,108,105,103,59,32896,102,106,768,97,108,116,9337,9341,9346,116,59,32768,9837,105,103,59,32768,64258,110,115,59,32768,9649,111,102,59,32768,402,833,9361,0,9366,102,59,32896,55349,56663,512,97,107,9370,9375,108,108,59,32768,8704,512,59,118,9380,9382,32768,8916,59,32768,10969,97,114,116,105,110,116,59,32768,10765,512,97,111,9399,9491,512,99,115,9404,9487,1794,9413,9443,9453,9470,9474,0,9484,1795,9421,9426,9429,9434,9437,0,9440,33024,189,59,32768,189,59,32768,8531,33024,188,59,32768,188,59,32768,8533,59,32768,8537,59,32768,8539,772,9447,0,9450,59,32768,8532,59,32768,8534,1285,9459,9464,0,0,9467,33024,190,59,32768,190,59,32768,8535,59,32768,8540,53,59,32768,8536,775,9478,0,9481,59,32768,8538,59,32768,8541,56,59,32768,8542,108,59,32768,8260,119,110,59,32768,8994,99,114,59,32896,55349,56507,4352,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,9537,9547,9575,9582,9595,9600,9679,9684,9694,9700,9705,9725,9773,9779,9785,9810,9917,512,59,108,9542,9544,32768,8807,59,32768,10892,768,99,109,112,9554,9560,9572,117,116,101,59,32768,501,109,97,512,59,100,9567,9569,32768,947,59,32768,989,59,32768,10886,114,101,118,101,59,32768,287,512,105,121,9587,9592,114,99,59,32768,285,59,32768,1075,111,116,59,32768,289,1024,59,108,113,115,9609,9611,9614,9633,32768,8805,59,32768,8923,768,59,113,115,9621,9623,9626,32768,8805,59,32768,8807,108,97,110,116,59,32768,10878,1024,59,99,100,108,9642,9644,9648,9667,32768,10878,99,59,32768,10921,111,116,512,59,111,9655,9657,32768,10880,512,59,108,9662,9664,32768,10882,59,32768,10884,512,59,101,9672,9675,32896,8923,65024,115,59,32768,10900,114,59,32896,55349,56612,512,59,103,9689,9691,32768,8811,59,32768,8921,109,101,108,59,32768,8503,99,121,59,32768,1107,1024,59,69,97,106,9714,9716,9719,9722,32768,8823,59,32768,10898,59,32768,10917,59,32768,10916,1024,69,97,101,115,9734,9737,9751,9768,59,32768,8809,112,512,59,112,9743,9745,32768,10890,114,111,120,59,32768,10890,512,59,113,9756,9758,32768,10888,512,59,113,9763,9765,32768,10888,59,32768,8809,105,109,59,32768,8935,112,102,59,32896,55349,56664,97,118,101,59,32768,96,512,99,105,9790,9794,114,59,32768,8458,109,768,59,101,108,9802,9804,9807,32768,8819,59,32768,10894,59,32768,10896,34304,62,59,99,100,108,113,114,9824,9826,9838,9843,9849,9856,32768,62,512,99,105,9831,9834,59,32768,10919,114,59,32768,10874,111,116,59,32768,8919,80,97,114,59,32768,10645,117,101,115,116,59,32768,10876,1280,97,100,101,108,115,9867,9882,9887,9906,9912,833,9872,0,9879,112,114,111,120,59,32768,10886,114,59,32768,10616,111,116,59,32768,8919,113,512,108,113,9893,9899,101,115,115,59,32768,8923,108,101,115,115,59,32768,10892,101,115,115,59,32768,8823,105,109,59,32768,8819,512,101,110,9922,9932,114,116,110,101,113,113,59,32896,8809,65024,69,59,32896,8809,65024,2560,65,97,98,99,101,102,107,111,115,121,9958,9963,10015,10020,10026,10060,10065,10085,10147,10171,114,114,59,32768,8660,1024,105,108,109,114,9972,9978,9982,9988,114,115,112,59,32768,8202,102,59,32768,189,105,108,116,59,32768,8459,512,100,114,9993,9998,99,121,59,32768,1098,768,59,99,119,10005,10007,10012,32768,8596,105,114,59,32768,10568,59,32768,8621,97,114,59,32768,8463,105,114,99,59,32768,293,768,97,108,114,10033,10048,10054,114,116,115,512,59,117,10041,10043,32768,9829,105,116,59,32768,9829,108,105,112,59,32768,8230,99,111,110,59,32768,8889,114,59,32896,55349,56613,115,512,101,119,10071,10078,97,114,111,119,59,32768,10533,97,114,111,119,59,32768,10534,1280,97,109,111,112,114,10096,10101,10107,10136,10141,114,114,59,32768,8703,116,104,116,59,32768,8763,107,512,108,114,10113,10124,101,102,116,97,114,114,111,119,59,32768,8617,105,103,104,116,97,114,114,111,119,59,32768,8618,102,59,32896,55349,56665,98,97,114,59,32768,8213,768,99,108,116,10154,10159,10165,114,59,32896,55349,56509,97,115,104,59,32768,8463,114,111,107,59,32768,295,512,98,112,10176,10182,117,108,108,59,32768,8259,104,101,110,59,32768,8208,5426,10211,0,10220,0,10239,10255,10267,0,10276,10312,0,0,10318,10371,10458,10485,10491,0,10500,10545,10558,99,117,116,101,33024,237,59,32768,237,768,59,105,121,10226,10228,10235,32768,8291,114,99,33024,238,59,32768,238,59,32768,1080,512,99,120,10243,10247,121,59,32768,1077,99,108,33024,161,59,32768,161,512,102,114,10259,10262,59,32768,8660,59,32896,55349,56614,114,97,118,101,33024,236,59,32768,236,1024,59,105,110,111,10284,10286,10300,10306,32768,8520,512,105,110,10291,10296,110,116,59,32768,10764,116,59,32768,8749,102,105,110,59,32768,10716,116,97,59,32768,8489,108,105,103,59,32768,307,768,97,111,112,10324,10361,10365,768,99,103,116,10331,10335,10357,114,59,32768,299,768,101,108,112,10342,10345,10351,59,32768,8465,105,110,101,59,32768,8464,97,114,116,59,32768,8465,104,59,32768,305,102,59,32768,8887,101,100,59,32768,437,1280,59,99,102,111,116,10381,10383,10389,10403,10409,32768,8712,97,114,101,59,32768,8453,105,110,512,59,116,10396,10398,32768,8734,105,101,59,32768,10717,100,111,116,59,32768,305,1280,59,99,101,108,112,10420,10422,10427,10444,10451,32768,8747,97,108,59,32768,8890,512,103,114,10432,10438,101,114,115,59,32768,8484,99,97,108,59,32768,8890,97,114,104,107,59,32768,10775,114,111,100,59,32768,10812,1024,99,103,112,116,10466,10470,10475,10480,121,59,32768,1105,111,110,59,32768,303,102,59,32896,55349,56666,97,59,32768,953,114,111,100,59,32768,10812,117,101,115,116,33024,191,59,32768,191,512,99,105,10504,10509,114,59,32896,55349,56510,110,1280,59,69,100,115,118,10521,10523,10526,10531,10541,32768,8712,59,32768,8953,111,116,59,32768,8949,512,59,118,10536,10538,32768,8948,59,32768,8947,59,32768,8712,512,59,105,10549,10551,32768,8290,108,100,101,59,32768,297,828,10562,0,10567,99,121,59,32768,1110,108,33024,239,59,32768,239,1536,99,102,109,111,115,117,10585,10598,10603,10609,10615,10630,512,105,121,10590,10595,114,99,59,32768,309,59,32768,1081,114,59,32896,55349,56615,97,116,104,59,32768,567,112,102,59,32896,55349,56667,820,10620,0,10625,114,59,32896,55349,56511,114,99,121,59,32768,1112,107,99,121,59,32768,1108,2048,97,99,102,103,104,106,111,115,10653,10666,10680,10685,10692,10697,10702,10708,112,112,97,512,59,118,10661,10663,32768,954,59,32768,1008,512,101,121,10671,10677,100,105,108,59,32768,311,59,32768,1082,114,59,32896,55349,56616,114,101,101,110,59,32768,312,99,121,59,32768,1093,99,121,59,32768,1116,112,102,59,32896,55349,56668,99,114,59,32896,55349,56512,5888,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,10761,10783,10789,10799,10804,10957,11011,11047,11094,11349,11372,11382,11409,11414,11451,11478,11526,11698,11711,11755,11823,11910,11929,768,97,114,116,10768,10773,10777,114,114,59,32768,8666,114,59,32768,8656,97,105,108,59,32768,10523,97,114,114,59,32768,10510,512,59,103,10794,10796,32768,8806,59,32768,10891,97,114,59,32768,10594,4660,10824,0,10830,0,10838,0,0,0,0,0,10844,10850,0,10867,10870,10877,0,10933,117,116,101,59,32768,314,109,112,116,121,118,59,32768,10676,114,97,110,59,32768,8466,98,100,97,59,32768,955,103,768,59,100,108,10857,10859,10862,32768,10216,59,32768,10641,101,59,32768,10216,59,32768,10885,117,111,33024,171,59,32768,171,114,2048,59,98,102,104,108,112,115,116,10894,10896,10907,10911,10915,10919,10923,10928,32768,8592,512,59,102,10901,10903,32768,8676,115,59,32768,10527,115,59,32768,10525,107,59,32768,8617,112,59,32768,8619,108,59,32768,10553,105,109,59,32768,10611,108,59,32768,8610,768,59,97,101,10939,10941,10946,32768,10923,105,108,59,32768,10521,512,59,115,10951,10953,32768,10925,59,32896,10925,65024,768,97,98,114,10964,10969,10974,114,114,59,32768,10508,114,107,59,32768,10098,512,97,107,10979,10991,99,512,101,107,10985,10988,59,32768,123,59,32768,91,512,101,115,10996,10999,59,32768,10635,108,512,100,117,11005,11008,59,32768,10639,59,32768,10637,1024,97,101,117,121,11020,11026,11040,11044,114,111,110,59,32768,318,512,100,105,11031,11036,105,108,59,32768,316,108,59,32768,8968,98,59,32768,123,59,32768,1083,1024,99,113,114,115,11056,11060,11072,11090,97,59,32768,10550,117,111,512,59,114,11067,11069,32768,8220,59,32768,8222,512,100,117,11077,11083,104,97,114,59,32768,10599,115,104,97,114,59,32768,10571,104,59,32768,8626,1280,59,102,103,113,115,11105,11107,11228,11231,11250,32768,8804,116,1280,97,104,108,114,116,11119,11136,11157,11169,11216,114,114,111,119,512,59,116,11128,11130,32768,8592,97,105,108,59,32768,8610,97,114,112,111,111,110,512,100,117,11147,11153,111,119,110,59,32768,8637,112,59,32768,8636,101,102,116,97,114,114,111,119,115,59,32768,8647,105,103,104,116,768,97,104,115,11180,11194,11204,114,114,111,119,512,59,115,11189,11191,32768,8596,59,32768,8646,97,114,112,111,111,110,115,59,32768,8651,113,117,105,103,97,114,114,111,119,59,32768,8621,104,114,101,101,116,105,109,101,115,59,32768,8907,59,32768,8922,768,59,113,115,11238,11240,11243,32768,8804,59,32768,8806,108,97,110,116,59,32768,10877,1280,59,99,100,103,115,11261,11263,11267,11286,11298,32768,10877,99,59,32768,10920,111,116,512,59,111,11274,11276,32768,10879,512,59,114,11281,11283,32768,10881,59,32768,10883,512,59,101,11291,11294,32896,8922,65024,115,59,32768,10899,1280,97,100,101,103,115,11309,11317,11322,11339,11344,112,112,114,111,120,59,32768,10885,111,116,59,32768,8918,113,512,103,113,11328,11333,116,114,59,32768,8922,103,116,114,59,32768,10891,116,114,59,32768,8822,105,109,59,32768,8818,768,105,108,114,11356,11362,11368,115,104,116,59,32768,10620,111,111,114,59,32768,8970,59,32896,55349,56617,512,59,69,11377,11379,32768,8822,59,32768,10897,562,11386,11405,114,512,100,117,11391,11394,59,32768,8637,512,59,108,11399,11401,32768,8636,59,32768,10602,108,107,59,32768,9604,99,121,59,32768,1113,1280,59,97,99,104,116,11425,11427,11432,11440,11446,32768,8810,114,114,59,32768,8647,111,114,110,101,114,59,32768,8990,97,114,100,59,32768,10603,114,105,59,32768,9722,512,105,111,11456,11462,100,111,116,59,32768,320,117,115,116,512,59,97,11470,11472,32768,9136,99,104,101,59,32768,9136,1024,69,97,101,115,11487,11490,11504,11521,59,32768,8808,112,512,59,112,11496,11498,32768,10889,114,111,120,59,32768,10889,512,59,113,11509,11511,32768,10887,512,59,113,11516,11518,32768,10887,59,32768,8808,105,109,59,32768,8934,2048,97,98,110,111,112,116,119,122,11543,11556,11561,11616,11640,11660,11667,11680,512,110,114,11548,11552,103,59,32768,10220,114,59,32768,8701,114,107,59,32768,10214,103,768,108,109,114,11569,11596,11604,101,102,116,512,97,114,11577,11584,114,114,111,119,59,32768,10229,105,103,104,116,97,114,114,111,119,59,32768,10231,97,112,115,116,111,59,32768,10236,105,103,104,116,97,114,114,111,119,59,32768,10230,112,97,114,114,111,119,512,108,114,11627,11633,101,102,116,59,32768,8619,105,103,104,116,59,32768,8620,768,97,102,108,11647,11651,11655,114,59,32768,10629,59,32896,55349,56669,117,115,59,32768,10797,105,109,101,115,59,32768,10804,562,11671,11676,115,116,59,32768,8727,97,114,59,32768,95,768,59,101,102,11687,11689,11695,32768,9674,110,103,101,59,32768,9674,59,32768,10731,97,114,512,59,108,11705,11707,32768,40,116,59,32768,10643,1280,97,99,104,109,116,11722,11727,11735,11747,11750,114,114,59,32768,8646,111,114,110,101,114,59,32768,8991,97,114,512,59,100,11742,11744,32768,8651,59,32768,10605,59,32768,8206,114,105,59,32768,8895,1536,97,99,104,105,113,116,11768,11774,11779,11782,11798,11817,113,117,111,59,32768,8249,114,59,32896,55349,56513,59,32768,8624,109,768,59,101,103,11790,11792,11795,32768,8818,59,32768,10893,59,32768,10895,512,98,117,11803,11806,59,32768,91,111,512,59,114,11812,11814,32768,8216,59,32768,8218,114,111,107,59,32768,322,34816,60,59,99,100,104,105,108,113,114,11841,11843,11855,11860,11866,11872,11878,11885,32768,60,512,99,105,11848,11851,59,32768,10918,114,59,32768,10873,111,116,59,32768,8918,114,101,101,59,32768,8907,109,101,115,59,32768,8905,97,114,114,59,32768,10614,117,101,115,116,59,32768,10875,512,80,105,11890,11895,97,114,59,32768,10646,768,59,101,102,11902,11904,11907,32768,9667,59,32768,8884,59,32768,9666,114,512,100,117,11916,11923,115,104,97,114,59,32768,10570,104,97,114,59,32768,10598,512,101,110,11934,11944,114,116,110,101,113,113,59,32896,8808,65024,69,59,32896,8808,65024,3584,68,97,99,100,101,102,104,105,108,110,111,112,115,117,11978,11984,12061,12075,12081,12095,12100,12104,12170,12181,12188,12204,12207,12223,68,111,116,59,32768,8762,1024,99,108,112,114,11993,11999,12019,12055,114,33024,175,59,32768,175,512,101,116,12004,12007,59,32768,9794,512,59,101,12012,12014,32768,10016,115,101,59,32768,10016,512,59,115,12024,12026,32768,8614,116,111,1024,59,100,108,117,12037,12039,12045,12051,32768,8614,111,119,110,59,32768,8615,101,102,116,59,32768,8612,112,59,32768,8613,107,101,114,59,32768,9646,512,111,121,12066,12072,109,109,97,59,32768,10793,59,32768,1084,97,115,104,59,32768,8212,97,115,117,114,101,100,97,110,103,108,101,59,32768,8737,114,59,32896,55349,56618,111,59,32768,8487,768,99,100,110,12111,12118,12146,114,111,33024,181,59,32768,181,1024,59,97,99,100,12127,12129,12134,12139,32768,8739,115,116,59,32768,42,105,114,59,32768,10992,111,116,33024,183,59,32768,183,117,115,768,59,98,100,12155,12157,12160,32768,8722,59,32768,8863,512,59,117,12165,12167,32768,8760,59,32768,10794,564,12174,12178,112,59,32768,10971,114,59,32768,8230,112,108,117,115,59,32768,8723,512,100,112,12193,12199,101,108,115,59,32768,8871,102,59,32896,55349,56670,59,32768,8723,512,99,116,12212,12217,114,59,32896,55349,56514,112,111,115,59,32768,8766,768,59,108,109,12230,12232,12240,32768,956,116,105,109,97,112,59,32768,8888,97,112,59,32768,8888,6144,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,12294,12315,12364,12376,12393,12472,12496,12547,12553,12636,12641,12703,12725,12747,12752,12876,12881,12957,13033,13089,13294,13359,13384,13499,512,103,116,12299,12303,59,32896,8921,824,512,59,118,12308,12311,32896,8811,8402,59,32896,8811,824,768,101,108,116,12322,12348,12352,102,116,512,97,114,12329,12336,114,114,111,119,59,32768,8653,105,103,104,116,97,114,114,111,119,59,32768,8654,59,32896,8920,824,512,59,118,12357,12360,32896,8810,8402,59,32896,8810,824,105,103,104,116,97,114,114,111,119,59,32768,8655,512,68,100,12381,12387,97,115,104,59,32768,8879,97,115,104,59,32768,8878,1280,98,99,110,112,116,12404,12409,12415,12420,12452,108,97,59,32768,8711,117,116,101,59,32768,324,103,59,32896,8736,8402,1280,59,69,105,111,112,12431,12433,12437,12442,12446,32768,8777,59,32896,10864,824,100,59,32896,8779,824,115,59,32768,329,114,111,120,59,32768,8777,117,114,512,59,97,12459,12461,32768,9838,108,512,59,115,12467,12469,32768,9838,59,32768,8469,836,12477,0,12483,112,33024,160,59,32768,160,109,112,512,59,101,12489,12492,32896,8782,824,59,32896,8783,824,1280,97,101,111,117,121,12507,12519,12525,12540,12544,833,12512,0,12515,59,32768,10819,111,110,59,32768,328,100,105,108,59,32768,326,110,103,512,59,100,12532,12534,32768,8775,111,116,59,32896,10861,824,112,59,32768,10818,59,32768,1085,97,115,104,59,32768,8211,1792,59,65,97,100,113,115,120,12568,12570,12575,12596,12602,12608,12623,32768,8800,114,114,59,32768,8663,114,512,104,114,12581,12585,107,59,32768,10532,512,59,111,12590,12592,32768,8599,119,59,32768,8599,111,116,59,32896,8784,824,117,105,118,59,32768,8802,512,101,105,12613,12618,97,114,59,32768,10536,109,59,32896,8770,824,105,115,116,512,59,115,12631,12633,32768,8708,59,32768,8708,114,59,32896,55349,56619,1024,69,101,115,116,12650,12654,12688,12693,59,32896,8807,824,768,59,113,115,12661,12663,12684,32768,8817,768,59,113,115,12670,12672,12676,32768,8817,59,32896,8807,824,108,97,110,116,59,32896,10878,824,59,32896,10878,824,105,109,59,32768,8821,512,59,114,12698,12700,32768,8815,59,32768,8815,768,65,97,112,12710,12715,12720,114,114,59,32768,8654,114,114,59,32768,8622,97,114,59,32768,10994,768,59,115,118,12732,12734,12744,32768,8715,512,59,100,12739,12741,32768,8956,59,32768,8954,59,32768,8715,99,121,59,32768,1114,1792,65,69,97,100,101,115,116,12767,12772,12776,12781,12785,12853,12858,114,114,59,32768,8653,59,32896,8806,824,114,114,59,32768,8602,114,59,32768,8229,1024,59,102,113,115,12794,12796,12821,12842,32768,8816,116,512,97,114,12802,12809,114,114,111,119,59,32768,8602,105,103,104,116,97,114,114,111,119,59,32768,8622,768,59,113,115,12828,12830,12834,32768,8816,59,32896,8806,824,108,97,110,116,59,32896,10877,824,512,59,115,12847,12850,32896,10877,824,59,32768,8814,105,109,59,32768,8820,512,59,114,12863,12865,32768,8814,105,512,59,101,12871,12873,32768,8938,59,32768,8940,105,100,59,32768,8740,512,112,116,12886,12891,102,59,32896,55349,56671,33536,172,59,105,110,12899,12901,12936,32768,172,110,1024,59,69,100,118,12911,12913,12917,12923,32768,8713,59,32896,8953,824,111,116,59,32896,8949,824,818,12928,12931,12934,59,32768,8713,59,32768,8951,59,32768,8950,105,512,59,118,12942,12944,32768,8716,818,12949,12952,12955,59,32768,8716,59,32768,8958,59,32768,8957,768,97,111,114,12964,12992,12999,114,1024,59,97,115,116,12974,12976,12983,12988,32768,8742,108,108,101,108,59,32768,8742,108,59,32896,11005,8421,59,32896,8706,824,108,105,110,116,59,32768,10772,768,59,99,101,13006,13008,13013,32768,8832,117,101,59,32768,8928,512,59,99,13018,13021,32896,10927,824,512,59,101,13026,13028,32768,8832,113,59,32896,10927,824,1024,65,97,105,116,13042,13047,13066,13077,114,114,59,32768,8655,114,114,768,59,99,119,13056,13058,13062,32768,8603,59,32896,10547,824,59,32896,8605,824,103,104,116,97,114,114,111,119,59,32768,8603,114,105,512,59,101,13084,13086,32768,8939,59,32768,8941,1792,99,104,105,109,112,113,117,13104,13128,13151,13169,13174,13179,13194,1024,59,99,101,114,13113,13115,13120,13124,32768,8833,117,101,59,32768,8929,59,32896,10928,824,59,32896,55349,56515,111,114,116,1086,13137,0,0,13142,105,100,59,32768,8740,97,114,97,108,108,101,108,59,32768,8742,109,512,59,101,13157,13159,32768,8769,512,59,113,13164,13166,32768,8772,59,32768,8772,105,100,59,32768,8740,97,114,59,32768,8742,115,117,512,98,112,13186,13190,101,59,32768,8930,101,59,32768,8931,768,98,99,112,13201,13241,13254,1024,59,69,101,115,13210,13212,13216,13219,32768,8836,59,32896,10949,824,59,32768,8840,101,116,512,59,101,13226,13229,32896,8834,8402,113,512,59,113,13235,13237,32768,8840,59,32896,10949,824,99,512,59,101,13247,13249,32768,8833,113,59,32896,10928,824,1024,59,69,101,115,13263,13265,13269,13272,32768,8837,59,32896,10950,824,59,32768,8841,101,116,512,59,101,13279,13282,32896,8835,8402,113,512,59,113,13288,13290,32768,8841,59,32896,10950,824,1024,103,105,108,114,13303,13307,13315,13319,108,59,32768,8825,108,100,101,33024,241,59,32768,241,103,59,32768,8824,105,97,110,103,108,101,512,108,114,13330,13344,101,102,116,512,59,101,13338,13340,32768,8938,113,59,32768,8940,105,103,104,116,512,59,101,13353,13355,32768,8939,113,59,32768,8941,512,59,109,13364,13366,32768,957,768,59,101,115,13373,13375,13380,32768,35,114,111,59,32768,8470,112,59,32768,8199,2304,68,72,97,100,103,105,108,114,115,13403,13409,13415,13420,13426,13439,13446,13476,13493,97,115,104,59,32768,8877,97,114,114,59,32768,10500,112,59,32896,8781,8402,97,115,104,59,32768,8876,512,101,116,13431,13435,59,32896,8805,8402,59,32896,62,8402,110,102,105,110,59,32768,10718,768,65,101,116,13453,13458,13462,114,114,59,32768,10498,59,32896,8804,8402,512,59,114,13467,13470,32896,60,8402,105,101,59,32896,8884,8402,512,65,116,13481,13486,114,114,59,32768,10499,114,105,101,59,32896,8885,8402,105,109,59,32896,8764,8402,768,65,97,110,13506,13511,13532,114,114,59,32768,8662,114,512,104,114,13517,13521,107,59,32768,10531,512,59,111,13526,13528,32768,8598,119,59,32768,8598,101,97,114,59,32768,10535,9252,13576,0,0,0,0,0,0,0,0,0,0,0,0,0,13579,0,13596,13617,13653,13659,13673,13695,13708,0,0,13713,13750,0,13788,13794,0,13815,13890,13913,13937,13944,59,32768,9416,512,99,115,13583,13591,117,116,101,33024,243,59,32768,243,116,59,32768,8859,512,105,121,13600,13613,114,512,59,99,13606,13608,32768,8858,33024,244,59,32768,244,59,32768,1086,1280,97,98,105,111,115,13627,13632,13638,13642,13646,115,104,59,32768,8861,108,97,99,59,32768,337,118,59,32768,10808,116,59,32768,8857,111,108,100,59,32768,10684,108,105,103,59,32768,339,512,99,114,13663,13668,105,114,59,32768,10687,59,32896,55349,56620,1600,13680,0,0,13684,0,13692,110,59,32768,731,97,118,101,33024,242,59,32768,242,59,32768,10689,512,98,109,13699,13704,97,114,59,32768,10677,59,32768,937,110,116,59,32768,8750,1024,97,99,105,116,13721,13726,13741,13746,114,114,59,32768,8634,512,105,114,13731,13735,114,59,32768,10686,111,115,115,59,32768,10683,110,101,59,32768,8254,59,32768,10688,768,97,101,105,13756,13761,13766,99,114,59,32768,333,103,97,59,32768,969,768,99,100,110,13773,13779,13782,114,111,110,59,32768,959,59,32768,10678,117,115,59,32768,8854,112,102,59,32896,55349,56672,768,97,101,108,13800,13804,13809,114,59,32768,10679,114,112,59,32768,10681,117,115,59,32768,8853,1792,59,97,100,105,111,115,118,13829,13831,13836,13869,13875,13879,13886,32768,8744,114,114,59,32768,8635,1024,59,101,102,109,13845,13847,13859,13864,32768,10845,114,512,59,111,13853,13855,32768,8500,102,59,32768,8500,33024,170,59,32768,170,33024,186,59,32768,186,103,111,102,59,32768,8886,114,59,32768,10838,108,111,112,101,59,32768,10839,59,32768,10843,768,99,108,111,13896,13900,13908,114,59,32768,8500,97,115,104,33024,248,59,32768,248,108,59,32768,8856,105,573,13917,13924,100,101,33024,245,59,32768,245,101,115,512,59,97,13930,13932,32768,8855,115,59,32768,10806,109,108,33024,246,59,32768,246,98,97,114,59,32768,9021,5426,13972,0,14013,0,14017,14053,0,14058,14086,0,0,14107,14199,0,14202,0,0,14229,14425,0,14438,114,1024,59,97,115,116,13981,13983,13997,14009,32768,8741,33280,182,59,108,13989,13991,32768,182,108,101,108,59,32768,8741,1082,14003,0,0,14007,109,59,32768,10995,59,32768,11005,59,32768,8706,121,59,32768,1087,114,1280,99,105,109,112,116,14028,14033,14038,14043,14046,110,116,59,32768,37,111,100,59,32768,46,105,108,59,32768,8240,59,32768,8869,101,110,107,59,32768,8241,114,59,32896,55349,56621,768,105,109,111,14064,14074,14080,512,59,118,14069,14071,32768,966,59,32768,981,109,97,116,59,32768,8499,110,101,59,32768,9742,768,59,116,118,14092,14094,14103,32768,960,99,104,102,111,114,107,59,32768,8916,59,32768,982,512,97,117,14111,14132,110,512,99,107,14117,14128,107,512,59,104,14123,14125,32768,8463,59,32768,8462,118,59,32768,8463,115,2304,59,97,98,99,100,101,109,115,116,14152,14154,14160,14163,14168,14179,14182,14188,14193,32768,43,99,105,114,59,32768,10787,59,32768,8862,105,114,59,32768,10786,512,111,117,14173,14176,59,32768,8724,59,32768,10789,59,32768,10866,110,33024,177,59,32768,177,105,109,59,32768,10790,119,111,59,32768,10791,59,32768,177,768,105,112,117,14208,14216,14221,110,116,105,110,116,59,32768,10773,102,59,32896,55349,56673,110,100,33024,163,59,32768,163,2560,59,69,97,99,101,105,110,111,115,117,14249,14251,14254,14258,14263,14336,14348,14367,14413,14418,32768,8826,59,32768,10931,112,59,32768,10935,117,101,59,32768,8828,512,59,99,14268,14270,32768,10927,1536,59,97,99,101,110,115,14283,14285,14293,14302,14306,14331,32768,8826,112,112,114,111,120,59,32768,10935,117,114,108,121,101,113,59,32768,8828,113,59,32768,10927,768,97,101,115,14313,14321,14326,112,112,114,111,120,59,32768,10937,113,113,59,32768,10933,105,109,59,32768,8936,105,109,59,32768,8830,109,101,512,59,115,14343,14345,32768,8242,59,32768,8473,768,69,97,115,14355,14358,14362,59,32768,10933,112,59,32768,10937,105,109,59,32768,8936,768,100,102,112,14374,14377,14402,59,32768,8719,768,97,108,115,14384,14390,14396,108,97,114,59,32768,9006,105,110,101,59,32768,8978,117,114,102,59,32768,8979,512,59,116,14407,14409,32768,8733,111,59,32768,8733,105,109,59,32768,8830,114,101,108,59,32768,8880,512,99,105,14429,14434,114,59,32896,55349,56517,59,32768,968,110,99,115,112,59,32768,8200,1536,102,105,111,112,115,117,14457,14462,14467,14473,14480,14486,114,59,32896,55349,56622,110,116,59,32768,10764,112,102,59,32896,55349,56674,114,105,109,101,59,32768,8279,99,114,59,32896,55349,56518,768,97,101,111,14493,14513,14526,116,512,101,105,14499,14508,114,110,105,111,110,115,59,32768,8461,110,116,59,32768,10774,115,116,512,59,101,14520,14522,32768,63,113,59,32768,8799,116,33024,34,59,32768,34,5376,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,14575,14597,14603,14608,14775,14829,14865,14901,14943,14966,15e3,15139,15159,15176,15182,15236,15261,15267,15309,15352,15360,768,97,114,116,14582,14587,14591,114,114,59,32768,8667,114,59,32768,8658,97,105,108,59,32768,10524,97,114,114,59,32768,10511,97,114,59,32768,10596,1792,99,100,101,110,113,114,116,14623,14637,14642,14650,14672,14679,14751,512,101,117,14628,14632,59,32896,8765,817,116,101,59,32768,341,105,99,59,32768,8730,109,112,116,121,118,59,32768,10675,103,1024,59,100,101,108,14660,14662,14665,14668,32768,10217,59,32768,10642,59,32768,10661,101,59,32768,10217,117,111,33024,187,59,32768,187,114,2816,59,97,98,99,102,104,108,112,115,116,119,14703,14705,14709,14720,14723,14727,14731,14735,14739,14744,14748,32768,8594,112,59,32768,10613,512,59,102,14714,14716,32768,8677,115,59,32768,10528,59,32768,10547,115,59,32768,10526,107,59,32768,8618,112,59,32768,8620,108,59,32768,10565,105,109,59,32768,10612,108,59,32768,8611,59,32768,8605,512,97,105,14756,14761,105,108,59,32768,10522,111,512,59,110,14767,14769,32768,8758,97,108,115,59,32768,8474,768,97,98,114,14782,14787,14792,114,114,59,32768,10509,114,107,59,32768,10099,512,97,107,14797,14809,99,512,101,107,14803,14806,59,32768,125,59,32768,93,512,101,115,14814,14817,59,32768,10636,108,512,100,117,14823,14826,59,32768,10638,59,32768,10640,1024,97,101,117,121,14838,14844,14858,14862,114,111,110,59,32768,345,512,100,105,14849,14854,105,108,59,32768,343,108,59,32768,8969,98,59,32768,125,59,32768,1088,1024,99,108,113,115,14874,14878,14885,14897,97,59,32768,10551,100,104,97,114,59,32768,10601,117,111,512,59,114,14892,14894,32768,8221,59,32768,8221,104,59,32768,8627,768,97,99,103,14908,14934,14938,108,1024,59,105,112,115,14918,14920,14925,14931,32768,8476,110,101,59,32768,8475,97,114,116,59,32768,8476,59,32768,8477,116,59,32768,9645,33024,174,59,32768,174,768,105,108,114,14950,14956,14962,115,104,116,59,32768,10621,111,111,114,59,32768,8971,59,32896,55349,56623,512,97,111,14971,14990,114,512,100,117,14977,14980,59,32768,8641,512,59,108,14985,14987,32768,8640,59,32768,10604,512,59,118,14995,14997,32768,961,59,32768,1009,768,103,110,115,15007,15123,15127,104,116,1536,97,104,108,114,115,116,15022,15039,15060,15086,15099,15111,114,114,111,119,512,59,116,15031,15033,32768,8594,97,105,108,59,32768,8611,97,114,112,111,111,110,512,100,117,15050,15056,111,119,110,59,32768,8641,112,59,32768,8640,101,102,116,512,97,104,15068,15076,114,114,111,119,115,59,32768,8644,97,114,112,111,111,110,115,59,32768,8652,105,103,104,116,97,114,114,111,119,115,59,32768,8649,113,117,105,103,97,114,114,111,119,59,32768,8605,104,114,101,101,116,105,109,101,115,59,32768,8908,103,59,32768,730,105,110,103,100,111,116,115,101,113,59,32768,8787,768,97,104,109,15146,15151,15156,114,114,59,32768,8644,97,114,59,32768,8652,59,32768,8207,111,117,115,116,512,59,97,15168,15170,32768,9137,99,104,101,59,32768,9137,109,105,100,59,32768,10990,1024,97,98,112,116,15191,15204,15209,15229,512,110,114,15196,15200,103,59,32768,10221,114,59,32768,8702,114,107,59,32768,10215,768,97,102,108,15216,15220,15224,114,59,32768,10630,59,32896,55349,56675,117,115,59,32768,10798,105,109,101,115,59,32768,10805,512,97,112,15241,15253,114,512,59,103,15247,15249,32768,41,116,59,32768,10644,111,108,105,110,116,59,32768,10770,97,114,114,59,32768,8649,1024,97,99,104,113,15276,15282,15287,15290,113,117,111,59,32768,8250,114,59,32896,55349,56519,59,32768,8625,512,98,117,15295,15298,59,32768,93,111,512,59,114,15304,15306,32768,8217,59,32768,8217,768,104,105,114,15316,15322,15328,114,101,101,59,32768,8908,109,101,115,59,32768,8906,105,1024,59,101,102,108,15338,15340,15343,15346,32768,9657,59,32768,8885,59,32768,9656,116,114,105,59,32768,10702,108,117,104,97,114,59,32768,10600,59,32768,8478,6706,15391,15398,15404,15499,15516,15592,0,15606,15660,0,0,15752,15758,0,15827,15863,15886,16e3,16006,16038,16086,0,16467,0,0,16506,99,117,116,101,59,32768,347,113,117,111,59,32768,8218,2560,59,69,97,99,101,105,110,112,115,121,15424,15426,15429,15441,15446,15458,15463,15482,15490,15495,32768,8827,59,32768,10932,833,15434,0,15437,59,32768,10936,111,110,59,32768,353,117,101,59,32768,8829,512,59,100,15451,15453,32768,10928,105,108,59,32768,351,114,99,59,32768,349,768,69,97,115,15470,15473,15477,59,32768,10934,112,59,32768,10938,105,109,59,32768,8937,111,108,105,110,116,59,32768,10771,105,109,59,32768,8831,59,32768,1089,111,116,768,59,98,101,15507,15509,15512,32768,8901,59,32768,8865,59,32768,10854,1792,65,97,99,109,115,116,120,15530,15535,15556,15562,15566,15572,15587,114,114,59,32768,8664,114,512,104,114,15541,15545,107,59,32768,10533,512,59,111,15550,15552,32768,8600,119,59,32768,8600,116,33024,167,59,32768,167,105,59,32768,59,119,97,114,59,32768,10537,109,512,105,110,15578,15584,110,117,115,59,32768,8726,59,32768,8726,116,59,32768,10038,114,512,59,111,15597,15600,32896,55349,56624,119,110,59,32768,8994,1024,97,99,111,121,15614,15619,15632,15654,114,112,59,32768,9839,512,104,121,15624,15629,99,121,59,32768,1097,59,32768,1096,114,116,1086,15640,0,0,15645,105,100,59,32768,8739,97,114,97,108,108,101,108,59,32768,8741,33024,173,59,32768,173,512,103,109,15664,15681,109,97,768,59,102,118,15673,15675,15678,32768,963,59,32768,962,59,32768,962,2048,59,100,101,103,108,110,112,114,15698,15700,15705,15715,15725,15735,15739,15745,32768,8764,111,116,59,32768,10858,512,59,113,15710,15712,32768,8771,59,32768,8771,512,59,69,15720,15722,32768,10910,59,32768,10912,512,59,69,15730,15732,32768,10909,59,32768,10911,101,59,32768,8774,108,117,115,59,32768,10788,97,114,114,59,32768,10610,97,114,114,59,32768,8592,1024,97,101,105,116,15766,15788,15796,15808,512,108,115,15771,15783,108,115,101,116,109,105,110,117,115,59,32768,8726,104,112,59,32768,10803,112,97,114,115,108,59,32768,10724,512,100,108,15801,15804,59,32768,8739,101,59,32768,8995,512,59,101,15813,15815,32768,10922,512,59,115,15820,15822,32768,10924,59,32896,10924,65024,768,102,108,112,15833,15839,15857,116,99,121,59,32768,1100,512,59,98,15844,15846,32768,47,512,59,97,15851,15853,32768,10692,114,59,32768,9023,102,59,32896,55349,56676,97,512,100,114,15868,15882,101,115,512,59,117,15875,15877,32768,9824,105,116,59,32768,9824,59,32768,8741,768,99,115,117,15892,15921,15977,512,97,117,15897,15909,112,512,59,115,15903,15905,32768,8851,59,32896,8851,65024,112,512,59,115,15915,15917,32768,8852,59,32896,8852,65024,117,512,98,112,15927,15952,768,59,101,115,15934,15936,15939,32768,8847,59,32768,8849,101,116,512,59,101,15946,15948,32768,8847,113,59,32768,8849,768,59,101,115,15959,15961,15964,32768,8848,59,32768,8850,101,116,512,59,101,15971,15973,32768,8848,113,59,32768,8850,768,59,97,102,15984,15986,15996,32768,9633,114,566,15991,15994,59,32768,9633,59,32768,9642,59,32768,9642,97,114,114,59,32768,8594,1024,99,101,109,116,16014,16019,16025,16031,114,59,32896,55349,56520,116,109,110,59,32768,8726,105,108,101,59,32768,8995,97,114,102,59,32768,8902,512,97,114,16042,16053,114,512,59,102,16048,16050,32768,9734,59,32768,9733,512,97,110,16058,16081,105,103,104,116,512,101,112,16067,16076,112,115,105,108,111,110,59,32768,1013,104,105,59,32768,981,115,59,32768,175,1280,98,99,109,110,112,16096,16221,16288,16291,16295,2304,59,69,100,101,109,110,112,114,115,16115,16117,16120,16125,16137,16143,16154,16160,16166,32768,8834,59,32768,10949,111,116,59,32768,10941,512,59,100,16130,16132,32768,8838,111,116,59,32768,10947,117,108,116,59,32768,10945,512,69,101,16148,16151,59,32768,10955,59,32768,8842,108,117,115,59,32768,10943,97,114,114,59,32768,10617,768,101,105,117,16173,16206,16210,116,768,59,101,110,16181,16183,16194,32768,8834,113,512,59,113,16189,16191,32768,8838,59,32768,10949,101,113,512,59,113,16201,16203,32768,8842,59,32768,10955,109,59,32768,10951,512,98,112,16215,16218,59,32768,10965,59,32768,10963,99,1536,59,97,99,101,110,115,16235,16237,16245,16254,16258,16283,32768,8827,112,112,114,111,120,59,32768,10936,117,114,108,121,101,113,59,32768,8829,113,59,32768,10928,768,97,101,115,16265,16273,16278,112,112,114,111,120,59,32768,10938,113,113,59,32768,10934,105,109,59,32768,8937,105,109,59,32768,8831,59,32768,8721,103,59,32768,9834,3328,49,50,51,59,69,100,101,104,108,109,110,112,115,16322,16327,16332,16337,16339,16342,16356,16368,16382,16388,16394,16405,16411,33024,185,59,32768,185,33024,178,59,32768,178,33024,179,59,32768,179,32768,8835,59,32768,10950,512,111,115,16347,16351,116,59,32768,10942,117,98,59,32768,10968,512,59,100,16361,16363,32768,8839,111,116,59,32768,10948,115,512,111,117,16374,16378,108,59,32768,10185,98,59,32768,10967,97,114,114,59,32768,10619,117,108,116,59,32768,10946,512,69,101,16399,16402,59,32768,10956,59,32768,8843,108,117,115,59,32768,10944,768,101,105,117,16418,16451,16455,116,768,59,101,110,16426,16428,16439,32768,8835,113,512,59,113,16434,16436,32768,8839,59,32768,10950,101,113,512,59,113,16446,16448,32768,8843,59,32768,10956,109,59,32768,10952,512,98,112,16460,16463,59,32768,10964,59,32768,10966,768,65,97,110,16473,16478,16499,114,114,59,32768,8665,114,512,104,114,16484,16488,107,59,32768,10534,512,59,111,16493,16495,32768,8601,119,59,32768,8601,119,97,114,59,32768,10538,108,105,103,33024,223,59,32768,223,5938,16538,16552,16557,16579,16584,16591,0,16596,16692,0,0,0,0,0,16731,16780,0,16787,16908,0,0,0,16938,1091,16543,0,0,16549,103,101,116,59,32768,8982,59,32768,964,114,107,59,32768,9140,768,97,101,121,16563,16569,16575,114,111,110,59,32768,357,100,105,108,59,32768,355,59,32768,1090,111,116,59,32768,8411,108,114,101,99,59,32768,8981,114,59,32896,55349,56625,1024,101,105,107,111,16604,16641,16670,16684,835,16609,0,16624,101,512,52,102,16614,16617,59,32768,8756,111,114,101,59,32768,8756,97,768,59,115,118,16631,16633,16638,32768,952,121,109,59,32768,977,59,32768,977,512,99,110,16646,16665,107,512,97,115,16652,16660,112,112,114,111,120,59,32768,8776,105,109,59,32768,8764,115,112,59,32768,8201,512,97,115,16675,16679,112,59,32768,8776,105,109,59,32768,8764,114,110,33024,254,59,32768,254,829,16696,16701,16727,100,101,59,32768,732,101,115,33536,215,59,98,100,16710,16712,16723,32768,215,512,59,97,16717,16719,32768,8864,114,59,32768,10801,59,32768,10800,116,59,32768,8749,768,101,112,115,16737,16741,16775,97,59,32768,10536,1024,59,98,99,102,16750,16752,16757,16762,32768,8868,111,116,59,32768,9014,105,114,59,32768,10993,512,59,111,16767,16770,32896,55349,56677,114,107,59,32768,10970,97,59,32768,10537,114,105,109,101,59,32768,8244,768,97,105,112,16793,16798,16899,100,101,59,32768,8482,1792,97,100,101,109,112,115,116,16813,16868,16873,16876,16883,16889,16893,110,103,108,101,1280,59,100,108,113,114,16828,16830,16836,16850,16853,32768,9653,111,119,110,59,32768,9663,101,102,116,512,59,101,16844,16846,32768,9667,113,59,32768,8884,59,32768,8796,105,103,104,116,512,59,101,16862,16864,32768,9657,113,59,32768,8885,111,116,59,32768,9708,59,32768,8796,105,110,117,115,59,32768,10810,108,117,115,59,32768,10809,98,59,32768,10701,105,109,101,59,32768,10811,101,122,105,117,109,59,32768,9186,768,99,104,116,16914,16926,16931,512,114,121,16919,16923,59,32896,55349,56521,59,32768,1094,99,121,59,32768,1115,114,111,107,59,32768,359,512,105,111,16942,16947,120,116,59,32768,8812,104,101,97,100,512,108,114,16956,16967,101,102,116,97,114,114,111,119,59,32768,8606,105,103,104,116,97,114,114,111,119,59,32768,8608,4608,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,17016,17021,17026,17043,17057,17072,17095,17110,17119,17139,17172,17187,17202,17290,17330,17336,17365,17381,114,114,59,32768,8657,97,114,59,32768,10595,512,99,114,17031,17039,117,116,101,33024,250,59,32768,250,114,59,32768,8593,114,820,17049,0,17053,121,59,32768,1118,118,101,59,32768,365,512,105,121,17062,17069,114,99,33024,251,59,32768,251,59,32768,1091,768,97,98,104,17079,17084,17090,114,114,59,32768,8645,108,97,99,59,32768,369,97,114,59,32768,10606,512,105,114,17100,17106,115,104,116,59,32768,10622,59,32896,55349,56626,114,97,118,101,33024,249,59,32768,249,562,17123,17135,114,512,108,114,17128,17131,59,32768,8639,59,32768,8638,108,107,59,32768,9600,512,99,116,17144,17167,1088,17150,0,0,17163,114,110,512,59,101,17156,17158,32768,8988,114,59,32768,8988,111,112,59,32768,8975,114,105,59,32768,9720,512,97,108,17177,17182,99,114,59,32768,363,33024,168,59,32768,168,512,103,112,17192,17197,111,110,59,32768,371,102,59,32896,55349,56678,1536,97,100,104,108,115,117,17215,17222,17233,17257,17262,17280,114,114,111,119,59,32768,8593,111,119,110,97,114,114,111,119,59,32768,8597,97,114,112,111,111,110,512,108,114,17244,17250,101,102,116,59,32768,8639,105,103,104,116,59,32768,8638,117,115,59,32768,8846,105,768,59,104,108,17270,17272,17275,32768,965,59,32768,978,111,110,59,32768,965,112,97,114,114,111,119,115,59,32768,8648,768,99,105,116,17297,17320,17325,1088,17303,0,0,17316,114,110,512,59,101,17309,17311,32768,8989,114,59,32768,8989,111,112,59,32768,8974,110,103,59,32768,367,114,105,59,32768,9721,99,114,59,32896,55349,56522,768,100,105,114,17343,17348,17354,111,116,59,32768,8944,108,100,101,59,32768,361,105,512,59,102,17360,17362,32768,9653,59,32768,9652,512,97,109,17370,17375,114,114,59,32768,8648,108,33024,252,59,32768,252,97,110,103,108,101,59,32768,10663,3840,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,17420,17425,17437,17443,17613,17617,17623,17667,17672,17678,17693,17699,17705,17711,17754,114,114,59,32768,8661,97,114,512,59,118,17432,17434,32768,10984,59,32768,10985,97,115,104,59,32768,8872,512,110,114,17448,17454,103,114,116,59,32768,10652,1792,101,107,110,112,114,115,116,17469,17478,17485,17494,17515,17526,17578,112,115,105,108,111,110,59,32768,1013,97,112,112,97,59,32768,1008,111,116,104,105,110,103,59,32768,8709,768,104,105,114,17501,17505,17508,105,59,32768,981,59,32768,982,111,112,116,111,59,32768,8733,512,59,104,17520,17522,32768,8597,111,59,32768,1009,512,105,117,17531,17537,103,109,97,59,32768,962,512,98,112,17542,17560,115,101,116,110,101,113,512,59,113,17553,17556,32896,8842,65024,59,32896,10955,65024,115,101,116,110,101,113,512,59,113,17571,17574,32896,8843,65024,59,32896,10956,65024,512,104,114,17583,17589,101,116,97,59,32768,977,105,97,110,103,108,101,512,108,114,17600,17606,101,102,116,59,32768,8882,105,103,104,116,59,32768,8883,121,59,32768,1074,97,115,104,59,32768,8866,768,101,108,114,17630,17648,17654,768,59,98,101,17637,17639,17644,32768,8744,97,114,59,32768,8891,113,59,32768,8794,108,105,112,59,32768,8942,512,98,116,17659,17664,97,114,59,32768,124,59,32768,124,114,59,32896,55349,56627,116,114,105,59,32768,8882,115,117,512,98,112,17685,17689,59,32896,8834,8402,59,32896,8835,8402,112,102,59,32896,55349,56679,114,111,112,59,32768,8733,116,114,105,59,32768,8883,512,99,117,17716,17721,114,59,32896,55349,56523,512,98,112,17726,17740,110,512,69,101,17732,17736,59,32896,10955,65024,59,32896,8842,65024,110,512,69,101,17746,17750,59,32896,10956,65024,59,32896,8843,65024,105,103,122,97,103,59,32768,10650,1792,99,101,102,111,112,114,115,17777,17783,17815,17820,17826,17829,17842,105,114,99,59,32768,373,512,100,105,17788,17809,512,98,103,17793,17798,97,114,59,32768,10847,101,512,59,113,17804,17806,32768,8743,59,32768,8793,101,114,112,59,32768,8472,114,59,32896,55349,56628,112,102,59,32896,55349,56680,59,32768,8472,512,59,101,17834,17836,32768,8768,97,116,104,59,32768,8768,99,114,59,32896,55349,56524,5428,17871,17891,0,17897,0,17902,17917,0,0,17920,17935,17940,17945,0,0,17977,17992,0,18008,18024,18029,768,97,105,117,17877,17881,17886,112,59,32768,8898,114,99,59,32768,9711,112,59,32768,8899,116,114,105,59,32768,9661,114,59,32896,55349,56629,512,65,97,17906,17911,114,114,59,32768,10234,114,114,59,32768,10231,59,32768,958,512,65,97,17924,17929,114,114,59,32768,10232,114,114,59,32768,10229,97,112,59,32768,10236,105,115,59,32768,8955,768,100,112,116,17951,17956,17970,111,116,59,32768,10752,512,102,108,17961,17965,59,32896,55349,56681,117,115,59,32768,10753,105,109,101,59,32768,10754,512,65,97,17981,17986,114,114,59,32768,10233,114,114,59,32768,10230,512,99,113,17996,18001,114,59,32896,55349,56525,99,117,112,59,32768,10758,512,112,116,18012,18018,108,117,115,59,32768,10756,114,105,59,32768,9651,101,101,59,32768,8897,101,100,103,101,59,32768,8896,2048,97,99,101,102,105,111,115,117,18052,18068,18081,18087,18092,18097,18103,18109,99,512,117,121,18058,18065,116,101,33024,253,59,32768,253,59,32768,1103,512,105,121,18073,18078,114,99,59,32768,375,59,32768,1099,110,33024,165,59,32768,165,114,59,32896,55349,56630,99,121,59,32768,1111,112,102,59,32896,55349,56682,99,114,59,32896,55349,56526,512,99,109,18114,18118,121,59,32768,1102,108,33024,255,59,32768,255,2560,97,99,100,101,102,104,105,111,115,119,18145,18152,18166,18171,18186,18191,18196,18204,18210,18216,99,117,116,101,59,32768,378,512,97,121,18157,18163,114,111,110,59,32768,382,59,32768,1079,111,116,59,32768,380,512,101,116,18176,18182,116,114,102,59,32768,8488,97,59,32768,950,114,59,32896,55349,56631,99,121,59,32768,1078,103,114,97,114,114,59,32768,8669,112,102,59,32896,55349,56683,99,114,59,32896,55349,56527,512,106,110,18221,18224,59,32768,8205,106,59,32768,8204])),H1}var X1={},Wr;function m9(){return Wr||(Wr=1,Object.defineProperty(X1,"__esModule",{value:!0}),X1.default=new Uint16Array([1024,97,103,108,113,9,23,27,31,1086,15,0,0,19,112,59,32768,38,111,115,59,32768,39,116,59,32768,62,116,59,32768,60,117,111,116,59,32768,34])),X1}var Y1={},_r;function d9(){if(_r)return Y1;_r=1,Object.defineProperty(Y1,"__esModule",{value:!0});var t=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),e=String.fromCodePoint||function(i){var r="";return i>65535&&(i-=65536,r+=String.fromCharCode(i>>>10&1023|55296),i=56320|i&1023),r+=String.fromCharCode(i),r};function n(i){var r;return i>=55296&&i<=57343||i>1114111?"\uFFFD":e((r=t.get(i))!==null&&r!==void 0?r:i)}return Y1.default=n,Y1}var Kr;function Zr(){return Kr||(Kr=1,(function(t){var e=m1&&m1.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXML=t.decodeHTMLStrict=t.decodeHTML=t.determineBranch=t.JUMP_OFFSET_BASE=t.BinTrieFlags=t.xmlDecodeTree=t.htmlDecodeTree=void 0;var n=e(f9());t.htmlDecodeTree=n.default;var i=e(m9());t.xmlDecodeTree=i.default;var r=e(d9()),o;(function(h){h[h.HAS_VALUE=32768]="HAS_VALUE",h[h.BRANCH_LENGTH=32512]="BRANCH_LENGTH",h[h.MULTI_BYTE=128]="MULTI_BYTE",h[h.JUMP_TABLE=127]="JUMP_TABLE"})(o=t.BinTrieFlags||(t.BinTrieFlags={})),t.JUMP_OFFSET_BASE=47;function l(h){return function(y,v){for(var p="",T=0,A=0;(A=y.indexOf("&",A))>=0;){if(p+=y.slice(T,A),T=A,A+=1,y.charCodeAt(A)===35){var O=A+1,j=10,N=y.charCodeAt(O);for((N|32)===120&&(j=16,A+=1,O+=1);(N=y.charCodeAt(++A))>=48&&N<=57||j===16&&(N|32)>=97&&(N|32)<=102;);if(O!==A){var M=y.substring(O,A),g=parseInt(M,j);if(y.charCodeAt(A)===59)A+=1;else if(v)continue;p+=r.default(g),T=A}continue}for(var b=null,k=1,C=0,S=h[C];A<y.length&&(C=c(h,S,C+1,y.charCodeAt(A)),!(C<0));A++,k++)S=h[C],S&o.HAS_VALUE&&(v&&y.charCodeAt(A)!==59?C+=1:(b=S&o.MULTI_BYTE?String.fromCharCode(h[++C],h[++C]):String.fromCharCode(h[++C]),k=0));b!=null&&(p+=b,T=A-k+1)}return p+y.slice(T)}}function c(h,d,y,v){if(d<=128)return v===d?y:-1;var p=(d&o.BRANCH_LENGTH)>>8;if(p===0)return-1;if(p===1)return v===h[y]?y+1:-1;var T=d&o.JUMP_TABLE;if(T){var A=v-t.JUMP_OFFSET_BASE-T;return A<0||A>p?-1:h[y+A]-1}for(var O=y,j=O+p-1;O<=j;){var N=O+j>>>1,M=h[N];if(M<v)O=N+1;else if(M>v)j=N-1;else return h[N+p]}return-1}t.determineBranch=c;var a=l(n.default),s=l(i.default);function u(h){return a(h,!1)}t.decodeHTML=u;function m(h){return a(h,!0)}t.decodeHTMLStrict=m;function f(h){return s(h,!0)}t.decodeXML=f})(m1)),m1}var Zt={};const g9="&",y9="'",x9=">",v9="<",p9='"',b9={amp:g9,apos:y9,gt:x9,lt:v9,quot:p9};var d1={};const w9="\xC1",k9="\xE1",A9="\u0102",S9="\u0103",C9="\u223E",N9="\u223F",M9="\u223E\u0333",T9="\xC2",$9="\xE2",E9="\xB4",L9="\u0410",O9="\u0430",j9="\xC6",P9="\xE6",D9="\u2061",q9="\u{1D504}",B9="\u{1D51E}",V9="\xC0",I9="\xE0",R9="\u2135",H9="\u2135",X9="\u0391",Y9="\u03B1",z9="\u0100",U9="\u0101",F9="\u2A3F",G9="&",W9="&",_9="\u2A55",K9="\u2A53",Z9="\u2227",Q9="\u2A5C",J9="\u2A58",t8="\u2A5A",e8="\u2220",n8="\u29A4",i8="\u2220",r8="\u29A8",o8="\u29A9",s8="\u29AA",l8="\u29AB",a8="\u29AC",c8="\u29AD",u8="\u29AE",h8="\u29AF",f8="\u2221",m8="\u221F",d8="\u22BE",g8="\u299D",y8="\u2222",x8="\xC5",v8="\u237C",p8="\u0104",b8="\u0105",w8="\u{1D538}",k8="\u{1D552}",A8="\u2A6F",S8="\u2248",C8="\u2A70",N8="\u224A",M8="\u224B",T8="'",$8="\u2061",E8="\u2248",L8="\u224A",O8="\xC5",j8="\xE5",P8="\u{1D49C}",D8="\u{1D4B6}",q8="\u2254",B8="*",V8="\u2248",I8="\u224D",R8="\xC3",H8="\xE3",X8="\xC4",Y8="\xE4",z8="\u2233",U8="\u2A11",F8="\u224C",G8="\u03F6",W8="\u2035",_8="\u223D",K8="\u22CD",Z8="\u2216",Q8="\u2AE7",J8="\u22BD",t5="\u2305",e5="\u2306",n5="\u2305",i5="\u23B5",r5="\u23B6",o5="\u224C",s5="\u0411",l5="\u0431",a5="\u201E",c5="\u2235",u5="\u2235",h5="\u2235",f5="\u29B0",m5="\u03F6",d5="\u212C",g5="\u212C",y5="\u0392",x5="\u03B2",v5="\u2136",p5="\u226C",b5="\u{1D505}",w5="\u{1D51F}",k5="\u22C2",A5="\u25EF",S5="\u22C3",C5="\u2A00",N5="\u2A01",M5="\u2A02",T5="\u2A06",$5="\u2605",E5="\u25BD",L5="\u25B3",O5="\u2A04",j5="\u22C1",P5="\u22C0",D5="\u290D",q5="\u29EB",B5="\u25AA",V5="\u25B4",I5="\u25BE",R5="\u25C2",H5="\u25B8",X5="\u2423",Y5="\u2592",z5="\u2591",U5="\u2593",F5="\u2588",G5="=\u20E5",W5="\u2261\u20E5",_5="\u2AED",K5="\u2310",Z5="\u{1D539}",Q5="\u{1D553}",J5="\u22A5",t6="\u22A5",e6="\u22C8",n6="\u29C9",i6="\u2510",r6="\u2555",o6="\u2556",s6="\u2557",l6="\u250C",a6="\u2552",c6="\u2553",u6="\u2554",h6="\u2500",f6="\u2550",m6="\u252C",d6="\u2564",g6="\u2565",y6="\u2566",x6="\u2534",v6="\u2567",p6="\u2568",b6="\u2569",w6="\u229F",k6="\u229E",A6="\u22A0",S6="\u2518",C6="\u255B",N6="\u255C",M6="\u255D",T6="\u2514",$6="\u2558",E6="\u2559",L6="\u255A",O6="\u2502",j6="\u2551",P6="\u253C",D6="\u256A",q6="\u256B",B6="\u256C",V6="\u2524",I6="\u2561",R6="\u2562",H6="\u2563",X6="\u251C",Y6="\u255E",z6="\u255F",U6="\u2560",F6="\u2035",G6="\u02D8",W6="\u02D8",_6="\xA6",K6="\u{1D4B7}",Z6="\u212C",Q6="\u204F",J6="\u223D",t7="\u22CD",e7="\u29C5",n7="\\",i7="\u27C8",r7="\u2022",o7="\u2022",s7="\u224E",l7="\u2AAE",a7="\u224F",c7="\u224E",u7="\u224F",h7="\u0106",f7="\u0107",m7="\u2A44",d7="\u2A49",g7="\u2A4B",y7="\u2229",x7="\u22D2",v7="\u2A47",p7="\u2A40",b7="\u2145",w7="\u2229\uFE00",k7="\u2041",A7="\u02C7",S7="\u212D",C7="\u2A4D",N7="\u010C",M7="\u010D",T7="\xC7",$7="\xE7",E7="\u0108",L7="\u0109",O7="\u2230",j7="\u2A4C",P7="\u2A50",D7="\u010A",q7="\u010B",B7="\xB8",V7="\xB8",I7="\u29B2",R7="\xA2",H7="\xB7",X7="\xB7",Y7="\u{1D520}",z7="\u212D",U7="\u0427",F7="\u0447",G7="\u2713",W7="\u2713",_7="\u03A7",K7="\u03C7",Z7="\u02C6",Q7="\u2257",J7="\u21BA",th="\u21BB",eh="\u229B",nh="\u229A",ih="\u229D",rh="\u2299",oh="\xAE",sh="\u24C8",lh="\u2296",ah="\u2295",ch="\u2297",uh="\u25CB",hh="\u29C3",fh="\u2257",mh="\u2A10",dh="\u2AEF",gh="\u29C2",yh="\u2232",xh="\u201D",vh="\u2019",ph="\u2663",bh="\u2663",wh=":",kh="\u2237",Ah="\u2A74",Sh="\u2254",Ch="\u2254",Nh=",",Mh="@",Th="\u2201",$h="\u2218",Eh="\u2201",Lh="\u2102",Oh="\u2245",jh="\u2A6D",Ph="\u2261",Dh="\u222E",qh="\u222F",Bh="\u222E",Vh="\u{1D554}",Ih="\u2102",Rh="\u2210",Hh="\u2210",Xh="\xA9",Yh="\xA9",zh="\u2117",Uh="\u2233",Fh="\u21B5",Gh="\u2717",Wh="\u2A2F",_h="\u{1D49E}",Kh="\u{1D4B8}",Zh="\u2ACF",Qh="\u2AD1",Jh="\u2AD0",t3="\u2AD2",e3="\u22EF",n3="\u2938",i3="\u2935",r3="\u22DE",o3="\u22DF",s3="\u21B6",l3="\u293D",a3="\u2A48",c3="\u2A46",u3="\u224D",h3="\u222A",f3="\u22D3",m3="\u2A4A",d3="\u228D",g3="\u2A45",y3="\u222A\uFE00",x3="\u21B7",v3="\u293C",p3="\u22DE",b3="\u22DF",w3="\u22CE",k3="\u22CF",A3="\xA4",S3="\u21B6",C3="\u21B7",N3="\u22CE",M3="\u22CF",T3="\u2232",$3="\u2231",E3="\u232D",L3="\u2020",O3="\u2021",j3="\u2138",P3="\u2193",D3="\u21A1",q3="\u21D3",B3="\u2010",V3="\u2AE4",I3="\u22A3",R3="\u290F",H3="\u02DD",X3="\u010E",Y3="\u010F",z3="\u0414",U3="\u0434",F3="\u2021",G3="\u21CA",W3="\u2145",_3="\u2146",K3="\u2911",Z3="\u2A77",Q3="\xB0",J3="\u2207",tf="\u0394",ef="\u03B4",nf="\u29B1",rf="\u297F",of="\u{1D507}",sf="\u{1D521}",lf="\u2965",af="\u21C3",cf="\u21C2",uf="\xB4",hf="\u02D9",ff="\u02DD",mf="`",df="\u02DC",gf="\u22C4",yf="\u22C4",xf="\u22C4",vf="\u2666",pf="\u2666",bf="\xA8",wf="\u2146",kf="\u03DD",Af="\u22F2",Sf="\xF7",Cf="\xF7",Nf="\u22C7",Mf="\u22C7",Tf="\u0402",$f="\u0452",Ef="\u231E",Lf="\u230D",Of="$",jf="\u{1D53B}",Pf="\u{1D555}",Df="\xA8",qf="\u02D9",Bf="\u20DC",Vf="\u2250",If="\u2251",Rf="\u2250",Hf="\u2238",Xf="\u2214",Yf="\u22A1",zf="\u2306",Uf="\u222F",Ff="\xA8",Gf="\u21D3",Wf="\u21D0",_f="\u21D4",Kf="\u2AE4",Zf="\u27F8",Qf="\u27FA",Jf="\u27F9",tm="\u21D2",em="\u22A8",nm="\u21D1",im="\u21D5",rm="\u2225",om="\u2913",sm="\u2193",lm="\u2193",am="\u21D3",cm="\u21F5",um="\u0311",hm="\u21CA",fm="\u21C3",mm="\u21C2",dm="\u2950",gm="\u295E",ym="\u2956",xm="\u21BD",vm="\u295F",pm="\u2957",bm="\u21C1",wm="\u21A7",km="\u22A4",Am="\u2910",Sm="\u231F",Cm="\u230C",Nm="\u{1D49F}",Mm="\u{1D4B9}",Tm="\u0405",$m="\u0455",Em="\u29F6",Lm="\u0110",Om="\u0111",jm="\u22F1",Pm="\u25BF",Dm="\u25BE",qm="\u21F5",Bm="\u296F",Vm="\u29A6",Im="\u040F",Rm="\u045F",Hm="\u27FF",Xm="\xC9",Ym="\xE9",zm="\u2A6E",Um="\u011A",Fm="\u011B",Gm="\xCA",Wm="\xEA",_m="\u2256",Km="\u2255",Zm="\u042D",Qm="\u044D",Jm="\u2A77",td="\u0116",ed="\u0117",nd="\u2251",id="\u2147",rd="\u2252",od="\u{1D508}",sd="\u{1D522}",ld="\u2A9A",ad="\xC8",cd="\xE8",ud="\u2A96",hd="\u2A98",fd="\u2A99",md="\u2208",dd="\u23E7",gd="\u2113",yd="\u2A95",xd="\u2A97",vd="\u0112",pd="\u0113",bd="\u2205",wd="\u2205",kd="\u25FB",Ad="\u2205",Sd="\u25AB",Cd="\u2004",Nd="\u2005",Md="\u2003",Td="\u014A",$d="\u014B",Ed="\u2002",Ld="\u0118",Od="\u0119",jd="\u{1D53C}",Pd="\u{1D556}",Dd="\u22D5",qd="\u29E3",Bd="\u2A71",Vd="\u03B5",Id="\u0395",Rd="\u03B5",Hd="\u03F5",Xd="\u2256",Yd="\u2255",zd="\u2242",Ud="\u2A96",Fd="\u2A95",Gd="\u2A75",Wd="=",_d="\u2242",Kd="\u225F",Zd="\u21CC",Qd="\u2261",Jd="\u2A78",t4="\u29E5",e4="\u2971",n4="\u2253",i4="\u212F",r4="\u2130",o4="\u2250",s4="\u2A73",l4="\u2242",a4="\u0397",c4="\u03B7",u4="\xD0",h4="\xF0",f4="\xCB",m4="\xEB",d4="\u20AC",g4="!",y4="\u2203",x4="\u2203",v4="\u2130",p4="\u2147",b4="\u2147",w4="\u2252",k4="\u0424",A4="\u0444",S4="\u2640",C4="\uFB03",N4="\uFB00",M4="\uFB04",T4="\u{1D509}",$4="\u{1D523}",E4="\uFB01",L4="\u25FC",O4="\u25AA",j4="fj",P4="\u266D",D4="\uFB02",q4="\u25B1",B4="\u0192",V4="\u{1D53D}",I4="\u{1D557}",R4="\u2200",H4="\u2200",X4="\u22D4",Y4="\u2AD9",z4="\u2131",U4="\u2A0D",F4="\xBD",G4="\u2153",W4="\xBC",_4="\u2155",K4="\u2159",Z4="\u215B",Q4="\u2154",J4="\u2156",tg="\xBE",eg="\u2157",ng="\u215C",ig="\u2158",rg="\u215A",og="\u215D",sg="\u215E",lg="\u2044",ag="\u2322",cg="\u{1D4BB}",ug="\u2131",hg="\u01F5",fg="\u0393",mg="\u03B3",dg="\u03DC",gg="\u03DD",yg="\u2A86",xg="\u011E",vg="\u011F",pg="\u0122",bg="\u011C",wg="\u011D",kg="\u0413",Ag="\u0433",Sg="\u0120",Cg="\u0121",Ng="\u2265",Mg="\u2267",Tg="\u2A8C",$g="\u22DB",Eg="\u2265",Lg="\u2267",Og="\u2A7E",jg="\u2AA9",Pg="\u2A7E",Dg="\u2A80",qg="\u2A82",Bg="\u2A84",Vg="\u22DB\uFE00",Ig="\u2A94",Rg="\u{1D50A}",Hg="\u{1D524}",Xg="\u226B",Yg="\u22D9",zg="\u22D9",Ug="\u2137",Fg="\u0403",Gg="\u0453",Wg="\u2AA5",_g="\u2277",Kg="\u2A92",Zg="\u2AA4",Qg="\u2A8A",Jg="\u2A8A",ty="\u2A88",ey="\u2269",ny="\u2A88",iy="\u2269",ry="\u22E7",oy="\u{1D53E}",sy="\u{1D558}",ly="`",ay="\u2265",cy="\u22DB",uy="\u2267",hy="\u2AA2",fy="\u2277",my="\u2A7E",dy="\u2273",gy="\u{1D4A2}",yy="\u210A",xy="\u2273",vy="\u2A8E",py="\u2A90",by="\u2AA7",wy="\u2A7A",ky=">",Ay=">",Sy="\u226B",Cy="\u22D7",Ny="\u2995",My="\u2A7C",Ty="\u2A86",$y="\u2978",Ey="\u22D7",Ly="\u22DB",Oy="\u2A8C",jy="\u2277",Py="\u2273",Dy="\u2269\uFE00",qy="\u2269\uFE00",By="\u02C7",Vy="\u200A",Iy="\xBD",Ry="\u210B",Hy="\u042A",Xy="\u044A",Yy="\u2948",zy="\u2194",Uy="\u21D4",Fy="\u21AD",Gy="^",Wy="\u210F",_y="\u0124",Ky="\u0125",Zy="\u2665",Qy="\u2665",Jy="\u2026",tx="\u22B9",ex="\u{1D525}",nx="\u210C",ix="\u210B",rx="\u2925",ox="\u2926",sx="\u21FF",lx="\u223B",ax="\u21A9",cx="\u21AA",ux="\u{1D559}",hx="\u210D",fx="\u2015",mx="\u2500",dx="\u{1D4BD}",gx="\u210B",yx="\u210F",xx="\u0126",vx="\u0127",px="\u224E",bx="\u224F",wx="\u2043",kx="\u2010",Ax="\xCD",Sx="\xED",Cx="\u2063",Nx="\xCE",Mx="\xEE",Tx="\u0418",$x="\u0438",Ex="\u0130",Lx="\u0415",Ox="\u0435",jx="\xA1",Px="\u21D4",Dx="\u{1D526}",qx="\u2111",Bx="\xCC",Vx="\xEC",Ix="\u2148",Rx="\u2A0C",Hx="\u222D",Xx="\u29DC",Yx="\u2129",zx="\u0132",Ux="\u0133",Fx="\u012A",Gx="\u012B",Wx="\u2111",_x="\u2148",Kx="\u2110",Zx="\u2111",Qx="\u0131",Jx="\u2111",tv="\u22B7",ev="\u01B5",nv="\u21D2",iv="\u2105",rv="\u221E",ov="\u29DD",sv="\u0131",lv="\u22BA",av="\u222B",cv="\u222C",uv="\u2124",hv="\u222B",fv="\u22BA",mv="\u22C2",dv="\u2A17",gv="\u2A3C",yv="\u2063",xv="\u2062",vv="\u0401",pv="\u0451",bv="\u012E",wv="\u012F",kv="\u{1D540}",Av="\u{1D55A}",Sv="\u0399",Cv="\u03B9",Nv="\u2A3C",Mv="\xBF",Tv="\u{1D4BE}",$v="\u2110",Ev="\u2208",Lv="\u22F5",Ov="\u22F9",jv="\u22F4",Pv="\u22F3",Dv="\u2208",qv="\u2062",Bv="\u0128",Vv="\u0129",Iv="\u0406",Rv="\u0456",Hv="\xCF",Xv="\xEF",Yv="\u0134",zv="\u0135",Uv="\u0419",Fv="\u0439",Gv="\u{1D50D}",Wv="\u{1D527}",_v="\u0237",Kv="\u{1D541}",Zv="\u{1D55B}",Qv="\u{1D4A5}",Jv="\u{1D4BF}",tp="\u0408",ep="\u0458",np="\u0404",ip="\u0454",rp="\u039A",op="\u03BA",sp="\u03F0",lp="\u0136",ap="\u0137",cp="\u041A",up="\u043A",hp="\u{1D50E}",fp="\u{1D528}",mp="\u0138",dp="\u0425",gp="\u0445",yp="\u040C",xp="\u045C",vp="\u{1D542}",pp="\u{1D55C}",bp="\u{1D4A6}",wp="\u{1D4C0}",kp="\u21DA",Ap="\u0139",Sp="\u013A",Cp="\u29B4",Np="\u2112",Mp="\u039B",Tp="\u03BB",$p="\u27E8",Ep="\u27EA",Lp="\u2991",Op="\u27E8",jp="\u2A85",Pp="\u2112",Dp="\xAB",qp="\u21E4",Bp="\u291F",Vp="\u2190",Ip="\u219E",Rp="\u21D0",Hp="\u291D",Xp="\u21A9",Yp="\u21AB",zp="\u2939",Up="\u2973",Fp="\u21A2",Gp="\u2919",Wp="\u291B",_p="\u2AAB",Kp="\u2AAD",Zp="\u2AAD\uFE00",Qp="\u290C",Jp="\u290E",tb="\u2772",eb="{",nb="[",ib="\u298B",rb="\u298F",ob="\u298D",sb="\u013D",lb="\u013E",ab="\u013B",cb="\u013C",ub="\u2308",hb="{",fb="\u041B",mb="\u043B",db="\u2936",gb="\u201C",yb="\u201E",xb="\u2967",vb="\u294B",pb="\u21B2",bb="\u2264",wb="\u2266",kb="\u27E8",Ab="\u21E4",Sb="\u2190",Cb="\u2190",Nb="\u21D0",Mb="\u21C6",Tb="\u21A2",$b="\u2308",Eb="\u27E6",Lb="\u2961",Ob="\u2959",jb="\u21C3",Pb="\u230A",Db="\u21BD",qb="\u21BC",Bb="\u21C7",Vb="\u2194",Ib="\u2194",Rb="\u21D4",Hb="\u21C6",Xb="\u21CB",Yb="\u21AD",zb="\u294E",Ub="\u21A4",Fb="\u22A3",Gb="\u295A",Wb="\u22CB",_b="\u29CF",Kb="\u22B2",Zb="\u22B4",Qb="\u2951",Jb="\u2960",tw="\u2958",ew="\u21BF",nw="\u2952",iw="\u21BC",rw="\u2A8B",ow="\u22DA",sw="\u2264",lw="\u2266",aw="\u2A7D",cw="\u2AA8",uw="\u2A7D",hw="\u2A7F",fw="\u2A81",mw="\u2A83",dw="\u22DA\uFE00",gw="\u2A93",yw="\u2A85",xw="\u22D6",vw="\u22DA",pw="\u2A8B",bw="\u22DA",ww="\u2266",kw="\u2276",Aw="\u2276",Sw="\u2AA1",Cw="\u2272",Nw="\u2A7D",Mw="\u2272",Tw="\u297C",$w="\u230A",Ew="\u{1D50F}",Lw="\u{1D529}",Ow="\u2276",jw="\u2A91",Pw="\u2962",Dw="\u21BD",qw="\u21BC",Bw="\u296A",Vw="\u2584",Iw="\u0409",Rw="\u0459",Hw="\u21C7",Xw="\u226A",Yw="\u22D8",zw="\u231E",Uw="\u21DA",Fw="\u296B",Gw="\u25FA",Ww="\u013F",_w="\u0140",Kw="\u23B0",Zw="\u23B0",Qw="\u2A89",Jw="\u2A89",tk="\u2A87",ek="\u2268",nk="\u2A87",ik="\u2268",rk="\u22E6",ok="\u27EC",sk="\u21FD",lk="\u27E6",ak="\u27F5",ck="\u27F5",uk="\u27F8",hk="\u27F7",fk="\u27F7",mk="\u27FA",dk="\u27FC",gk="\u27F6",yk="\u27F6",xk="\u27F9",vk="\u21AB",pk="\u21AC",bk="\u2985",wk="\u{1D543}",kk="\u{1D55D}",Ak="\u2A2D",Sk="\u2A34",Ck="\u2217",Nk="_",Mk="\u2199",Tk="\u2198",$k="\u25CA",Ek="\u25CA",Lk="\u29EB",Ok="(",jk="\u2993",Pk="\u21C6",Dk="\u231F",qk="\u21CB",Bk="\u296D",Vk="\u200E",Ik="\u22BF",Rk="\u2039",Hk="\u{1D4C1}",Xk="\u2112",Yk="\u21B0",zk="\u21B0",Uk="\u2272",Fk="\u2A8D",Gk="\u2A8F",Wk="[",_k="\u2018",Kk="\u201A",Zk="\u0141",Qk="\u0142",Jk="\u2AA6",tA="\u2A79",eA="<",nA="<",iA="\u226A",rA="\u22D6",oA="\u22CB",sA="\u22C9",lA="\u2976",aA="\u2A7B",cA="\u25C3",uA="\u22B4",hA="\u25C2",fA="\u2996",mA="\u294A",dA="\u2966",gA="\u2268\uFE00",yA="\u2268\uFE00",xA="\xAF",vA="\u2642",pA="\u2720",bA="\u2720",wA="\u21A6",kA="\u21A6",AA="\u21A7",SA="\u21A4",CA="\u21A5",NA="\u25AE",MA="\u2A29",TA="\u041C",$A="\u043C",EA="\u2014",LA="\u223A",OA="\u2221",jA="\u205F",PA="\u2133",DA="\u{1D510}",qA="\u{1D52A}",BA="\u2127",VA="\xB5",IA="*",RA="\u2AF0",HA="\u2223",XA="\xB7",YA="\u229F",zA="\u2212",UA="\u2238",FA="\u2A2A",GA="\u2213",WA="\u2ADB",_A="\u2026",KA="\u2213",ZA="\u22A7",QA="\u{1D544}",JA="\u{1D55E}",tS="\u2213",eS="\u{1D4C2}",nS="\u2133",iS="\u223E",rS="\u039C",oS="\u03BC",sS="\u22B8",lS="\u22B8",aS="\u2207",cS="\u0143",uS="\u0144",hS="\u2220\u20D2",fS="\u2249",mS="\u2A70\u0338",dS="\u224B\u0338",gS="\u0149",yS="\u2249",xS="\u266E",vS="\u2115",pS="\u266E",bS="\xA0",wS="\u224E\u0338",kS="\u224F\u0338",AS="\u2A43",SS="\u0147",CS="\u0148",NS="\u0145",MS="\u0146",TS="\u2247",$S="\u2A6D\u0338",ES="\u2A42",LS="\u041D",OS="\u043D",jS="\u2013",PS="\u2924",DS="\u2197",qS="\u21D7",BS="\u2197",VS="\u2260",IS="\u2250\u0338",RS="\u200B",HS="\u200B",XS="\u200B",YS="\u200B",zS="\u2262",US="\u2928",FS="\u2242\u0338",GS="\u226B",WS="\u226A",_S=`
|
|
3
|
+
`,KS="\u2204",ZS="\u2204",QS="\u{1D511}",JS="\u{1D52B}",tC="\u2267\u0338",eC="\u2271",nC="\u2271",iC="\u2267\u0338",rC="\u2A7E\u0338",oC="\u2A7E\u0338",sC="\u22D9\u0338",lC="\u2275",aC="\u226B\u20D2",cC="\u226F",uC="\u226F",hC="\u226B\u0338",fC="\u21AE",mC="\u21CE",dC="\u2AF2",gC="\u220B",yC="\u22FC",xC="\u22FA",vC="\u220B",pC="\u040A",bC="\u045A",wC="\u219A",kC="\u21CD",AC="\u2025",SC="\u2266\u0338",CC="\u2270",NC="\u219A",MC="\u21CD",TC="\u21AE",$C="\u21CE",EC="\u2270",LC="\u2266\u0338",OC="\u2A7D\u0338",jC="\u2A7D\u0338",PC="\u226E",DC="\u22D8\u0338",qC="\u2274",BC="\u226A\u20D2",VC="\u226E",IC="\u22EA",RC="\u22EC",HC="\u226A\u0338",XC="\u2224",YC="\u2060",zC="\xA0",UC="\u{1D55F}",FC="\u2115",GC="\u2AEC",WC="\xAC",_C="\u2262",KC="\u226D",ZC="\u2226",QC="\u2209",JC="\u2260",tN="\u2242\u0338",eN="\u2204",nN="\u226F",iN="\u2271",rN="\u2267\u0338",oN="\u226B\u0338",sN="\u2279",lN="\u2A7E\u0338",aN="\u2275",cN="\u224E\u0338",uN="\u224F\u0338",hN="\u2209",fN="\u22F5\u0338",mN="\u22F9\u0338",dN="\u2209",gN="\u22F7",yN="\u22F6",xN="\u29CF\u0338",vN="\u22EA",pN="\u22EC",bN="\u226E",wN="\u2270",kN="\u2278",AN="\u226A\u0338",SN="\u2A7D\u0338",CN="\u2274",NN="\u2AA2\u0338",MN="\u2AA1\u0338",TN="\u220C",$N="\u220C",EN="\u22FE",LN="\u22FD",ON="\u2280",jN="\u2AAF\u0338",PN="\u22E0",DN="\u220C",qN="\u29D0\u0338",BN="\u22EB",VN="\u22ED",IN="\u228F\u0338",RN="\u22E2",HN="\u2290\u0338",XN="\u22E3",YN="\u2282\u20D2",zN="\u2288",UN="\u2281",FN="\u2AB0\u0338",GN="\u22E1",WN="\u227F\u0338",_N="\u2283\u20D2",KN="\u2289",ZN="\u2241",QN="\u2244",JN="\u2247",tM="\u2249",eM="\u2224",nM="\u2226",iM="\u2226",rM="\u2AFD\u20E5",oM="\u2202\u0338",sM="\u2A14",lM="\u2280",aM="\u22E0",cM="\u2280",uM="\u2AAF\u0338",hM="\u2AAF\u0338",fM="\u2933\u0338",mM="\u219B",dM="\u21CF",gM="\u219D\u0338",yM="\u219B",xM="\u21CF",vM="\u22EB",pM="\u22ED",bM="\u2281",wM="\u22E1",kM="\u2AB0\u0338",AM="\u{1D4A9}",SM="\u{1D4C3}",CM="\u2224",NM="\u2226",MM="\u2241",TM="\u2244",$M="\u2244",EM="\u2224",LM="\u2226",OM="\u22E2",jM="\u22E3",PM="\u2284",DM="\u2AC5\u0338",qM="\u2288",BM="\u2282\u20D2",VM="\u2288",IM="\u2AC5\u0338",RM="\u2281",HM="\u2AB0\u0338",XM="\u2285",YM="\u2AC6\u0338",zM="\u2289",UM="\u2283\u20D2",FM="\u2289",GM="\u2AC6\u0338",WM="\u2279",_M="\xD1",KM="\xF1",ZM="\u2278",QM="\u22EA",JM="\u22EC",tT="\u22EB",eT="\u22ED",nT="\u039D",iT="\u03BD",rT="#",oT="\u2116",sT="\u2007",lT="\u224D\u20D2",aT="\u22AC",cT="\u22AD",uT="\u22AE",hT="\u22AF",fT="\u2265\u20D2",mT=">\u20D2",dT="\u2904",gT="\u29DE",yT="\u2902",xT="\u2264\u20D2",vT="<\u20D2",pT="\u22B4\u20D2",bT="\u2903",wT="\u22B5\u20D2",kT="\u223C\u20D2",AT="\u2923",ST="\u2196",CT="\u21D6",NT="\u2196",MT="\u2927",TT="\xD3",$T="\xF3",ET="\u229B",LT="\xD4",OT="\xF4",jT="\u229A",PT="\u041E",DT="\u043E",qT="\u229D",BT="\u0150",VT="\u0151",IT="\u2A38",RT="\u2299",HT="\u29BC",XT="\u0152",YT="\u0153",zT="\u29BF",UT="\u{1D512}",FT="\u{1D52C}",GT="\u02DB",WT="\xD2",_T="\xF2",KT="\u29C1",ZT="\u29B5",QT="\u03A9",JT="\u222E",t$="\u21BA",e$="\u29BE",n$="\u29BB",i$="\u203E",r$="\u29C0",o$="\u014C",s$="\u014D",l$="\u03A9",a$="\u03C9",c$="\u039F",u$="\u03BF",h$="\u29B6",f$="\u2296",m$="\u{1D546}",d$="\u{1D560}",g$="\u29B7",y$="\u201C",x$="\u2018",v$="\u29B9",p$="\u2295",b$="\u21BB",w$="\u2A54",k$="\u2228",A$="\u2A5D",S$="\u2134",C$="\u2134",N$="\xAA",M$="\xBA",T$="\u22B6",$$="\u2A56",E$="\u2A57",L$="\u2A5B",O$="\u24C8",j$="\u{1D4AA}",P$="\u2134",D$="\xD8",q$="\xF8",B$="\u2298",V$="\xD5",I$="\xF5",R$="\u2A36",H$="\u2A37",X$="\u2297",Y$="\xD6",z$="\xF6",U$="\u233D",F$="\u203E",G$="\u23DE",W$="\u23B4",_$="\u23DC",K$="\xB6",Z$="\u2225",Q$="\u2225",J$="\u2AF3",tE="\u2AFD",eE="\u2202",nE="\u2202",iE="\u041F",rE="\u043F",oE="%",sE=".",lE="\u2030",aE="\u22A5",cE="\u2031",uE="\u{1D513}",hE="\u{1D52D}",fE="\u03A6",mE="\u03C6",dE="\u03D5",gE="\u2133",yE="\u260E",xE="\u03A0",vE="\u03C0",pE="\u22D4",bE="\u03D6",wE="\u210F",kE="\u210E",AE="\u210F",SE="\u2A23",CE="\u229E",NE="\u2A22",ME="+",TE="\u2214",$E="\u2A25",EE="\u2A72",LE="\xB1",OE="\xB1",jE="\u2A26",PE="\u2A27",DE="\xB1",qE="\u210C",BE="\u2A15",VE="\u{1D561}",IE="\u2119",RE="\xA3",HE="\u2AB7",XE="\u2ABB",YE="\u227A",zE="\u227C",UE="\u2AB7",FE="\u227A",GE="\u227C",WE="\u227A",_E="\u2AAF",KE="\u227C",ZE="\u227E",QE="\u2AAF",JE="\u2AB9",tL="\u2AB5",eL="\u22E8",nL="\u2AAF",iL="\u2AB3",rL="\u227E",oL="\u2032",sL="\u2033",lL="\u2119",aL="\u2AB9",cL="\u2AB5",uL="\u22E8",hL="\u220F",fL="\u220F",mL="\u232E",dL="\u2312",gL="\u2313",yL="\u221D",xL="\u221D",vL="\u2237",pL="\u221D",bL="\u227E",wL="\u22B0",kL="\u{1D4AB}",AL="\u{1D4C5}",SL="\u03A8",CL="\u03C8",NL="\u2008",ML="\u{1D514}",TL="\u{1D52E}",$L="\u2A0C",EL="\u{1D562}",LL="\u211A",OL="\u2057",jL="\u{1D4AC}",PL="\u{1D4C6}",DL="\u210D",qL="\u2A16",BL="?",VL="\u225F",IL='"',RL='"',HL="\u21DB",XL="\u223D\u0331",YL="\u0154",zL="\u0155",UL="\u221A",FL="\u29B3",GL="\u27E9",WL="\u27EB",_L="\u2992",KL="\u29A5",ZL="\u27E9",QL="\xBB",JL="\u2975",tO="\u21E5",eO="\u2920",nO="\u2933",iO="\u2192",rO="\u21A0",oO="\u21D2",sO="\u291E",lO="\u21AA",aO="\u21AC",cO="\u2945",uO="\u2974",hO="\u2916",fO="\u21A3",mO="\u219D",dO="\u291A",gO="\u291C",yO="\u2236",xO="\u211A",vO="\u290D",pO="\u290F",bO="\u2910",wO="\u2773",kO="}",AO="]",SO="\u298C",CO="\u298E",NO="\u2990",MO="\u0158",TO="\u0159",$O="\u0156",EO="\u0157",LO="\u2309",OO="}",jO="\u0420",PO="\u0440",DO="\u2937",qO="\u2969",BO="\u201D",VO="\u201D",IO="\u21B3",RO="\u211C",HO="\u211B",XO="\u211C",YO="\u211D",zO="\u211C",UO="\u25AD",FO="\xAE",GO="\xAE",WO="\u220B",_O="\u21CB",KO="\u296F",ZO="\u297D",QO="\u230B",JO="\u{1D52F}",tj="\u211C",ej="\u2964",nj="\u21C1",ij="\u21C0",rj="\u296C",oj="\u03A1",sj="\u03C1",lj="\u03F1",aj="\u27E9",cj="\u21E5",uj="\u2192",hj="\u2192",fj="\u21D2",mj="\u21C4",dj="\u21A3",gj="\u2309",yj="\u27E7",xj="\u295D",vj="\u2955",pj="\u21C2",bj="\u230B",wj="\u21C1",kj="\u21C0",Aj="\u21C4",Sj="\u21CC",Cj="\u21C9",Nj="\u219D",Mj="\u21A6",Tj="\u22A2",$j="\u295B",Ej="\u22CC",Lj="\u29D0",Oj="\u22B3",jj="\u22B5",Pj="\u294F",Dj="\u295C",qj="\u2954",Bj="\u21BE",Vj="\u2953",Ij="\u21C0",Rj="\u02DA",Hj="\u2253",Xj="\u21C4",Yj="\u21CC",zj="\u200F",Uj="\u23B1",Fj="\u23B1",Gj="\u2AEE",Wj="\u27ED",_j="\u21FE",Kj="\u27E7",Zj="\u2986",Qj="\u{1D563}",Jj="\u211D",tP="\u2A2E",eP="\u2A35",nP="\u2970",iP=")",rP="\u2994",oP="\u2A12",sP="\u21C9",lP="\u21DB",aP="\u203A",cP="\u{1D4C7}",uP="\u211B",hP="\u21B1",fP="\u21B1",mP="]",dP="\u2019",gP="\u2019",yP="\u22CC",xP="\u22CA",vP="\u25B9",pP="\u22B5",bP="\u25B8",wP="\u29CE",kP="\u29F4",AP="\u2968",SP="\u211E",CP="\u015A",NP="\u015B",MP="\u201A",TP="\u2AB8",$P="\u0160",EP="\u0161",LP="\u2ABC",OP="\u227B",jP="\u227D",PP="\u2AB0",DP="\u2AB4",qP="\u015E",BP="\u015F",VP="\u015C",IP="\u015D",RP="\u2ABA",HP="\u2AB6",XP="\u22E9",YP="\u2A13",zP="\u227F",UP="\u0421",FP="\u0441",GP="\u22A1",WP="\u22C5",_P="\u2A66",KP="\u2925",ZP="\u2198",QP="\u21D8",JP="\u2198",tD="\xA7",eD=";",nD="\u2929",iD="\u2216",rD="\u2216",oD="\u2736",sD="\u{1D516}",lD="\u{1D530}",aD="\u2322",cD="\u266F",uD="\u0429",hD="\u0449",fD="\u0428",mD="\u0448",dD="\u2193",gD="\u2190",yD="\u2223",xD="\u2225",vD="\u2192",pD="\u2191",bD="\xAD",wD="\u03A3",kD="\u03C3",AD="\u03C2",SD="\u03C2",CD="\u223C",ND="\u2A6A",MD="\u2243",TD="\u2243",$D="\u2A9E",ED="\u2AA0",LD="\u2A9D",OD="\u2A9F",jD="\u2246",PD="\u2A24",DD="\u2972",qD="\u2190",BD="\u2218",VD="\u2216",ID="\u2A33",RD="\u29E4",HD="\u2223",XD="\u2323",YD="\u2AAA",zD="\u2AAC",UD="\u2AAC\uFE00",FD="\u042C",GD="\u044C",WD="\u233F",_D="\u29C4",KD="/",ZD="\u{1D54A}",QD="\u{1D564}",JD="\u2660",tq="\u2660",eq="\u2225",nq="\u2293",iq="\u2293\uFE00",rq="\u2294",oq="\u2294\uFE00",sq="\u221A",lq="\u228F",aq="\u2291",cq="\u228F",uq="\u2291",hq="\u2290",fq="\u2292",mq="\u2290",dq="\u2292",gq="\u25A1",yq="\u25A1",xq="\u2293",vq="\u228F",pq="\u2291",bq="\u2290",wq="\u2292",kq="\u2294",Aq="\u25AA",Sq="\u25A1",Cq="\u25AA",Nq="\u2192",Mq="\u{1D4AE}",Tq="\u{1D4C8}",$q="\u2216",Eq="\u2323",Lq="\u22C6",Oq="\u22C6",jq="\u2606",Pq="\u2605",Dq="\u03F5",qq="\u03D5",Bq="\xAF",Vq="\u2282",Iq="\u22D0",Rq="\u2ABD",Hq="\u2AC5",Xq="\u2286",Yq="\u2AC3",zq="\u2AC1",Uq="\u2ACB",Fq="\u228A",Gq="\u2ABF",Wq="\u2979",_q="\u2282",Kq="\u22D0",Zq="\u2286",Qq="\u2AC5",Jq="\u2286",tB="\u228A",eB="\u2ACB",nB="\u2AC7",iB="\u2AD5",rB="\u2AD3",oB="\u2AB8",sB="\u227B",lB="\u227D",aB="\u227B",cB="\u2AB0",uB="\u227D",hB="\u227F",fB="\u2AB0",mB="\u2ABA",dB="\u2AB6",gB="\u22E9",yB="\u227F",xB="\u220B",vB="\u2211",pB="\u2211",bB="\u266A",wB="\xB9",kB="\xB2",AB="\xB3",SB="\u2283",CB="\u22D1",NB="\u2ABE",MB="\u2AD8",TB="\u2AC6",$B="\u2287",EB="\u2AC4",LB="\u2283",OB="\u2287",jB="\u27C9",PB="\u2AD7",DB="\u297B",qB="\u2AC2",BB="\u2ACC",VB="\u228B",IB="\u2AC0",RB="\u2283",HB="\u22D1",XB="\u2287",YB="\u2AC6",zB="\u228B",UB="\u2ACC",FB="\u2AC8",GB="\u2AD4",WB="\u2AD6",_B="\u2926",KB="\u2199",ZB="\u21D9",QB="\u2199",JB="\u292A",tV="\xDF",eV=" ",nV="\u2316",iV="\u03A4",rV="\u03C4",oV="\u23B4",sV="\u0164",lV="\u0165",aV="\u0162",cV="\u0163",uV="\u0422",hV="\u0442",fV="\u20DB",mV="\u2315",dV="\u{1D517}",gV="\u{1D531}",yV="\u2234",xV="\u2234",vV="\u2234",pV="\u0398",bV="\u03B8",wV="\u03D1",kV="\u03D1",AV="\u2248",SV="\u223C",CV="\u205F\u200A",NV="\u2009",MV="\u2009",TV="\u2248",$V="\u223C",EV="\xDE",LV="\xFE",OV="\u02DC",jV="\u223C",PV="\u2243",DV="\u2245",qV="\u2248",BV="\u2A31",VV="\u22A0",IV="\xD7",RV="\u2A30",HV="\u222D",XV="\u2928",YV="\u2336",zV="\u2AF1",UV="\u22A4",FV="\u{1D54B}",GV="\u{1D565}",WV="\u2ADA",_V="\u2929",KV="\u2034",ZV="\u2122",QV="\u2122",JV="\u25B5",tI="\u25BF",eI="\u25C3",nI="\u22B4",iI="\u225C",rI="\u25B9",oI="\u22B5",sI="\u25EC",lI="\u225C",aI="\u2A3A",cI="\u20DB",uI="\u2A39",hI="\u29CD",fI="\u2A3B",mI="\u23E2",dI="\u{1D4AF}",gI="\u{1D4C9}",yI="\u0426",xI="\u0446",vI="\u040B",pI="\u045B",bI="\u0166",wI="\u0167",kI="\u226C",AI="\u219E",SI="\u21A0",CI="\xDA",NI="\xFA",MI="\u2191",TI="\u219F",$I="\u21D1",EI="\u2949",LI="\u040E",OI="\u045E",jI="\u016C",PI="\u016D",DI="\xDB",qI="\xFB",BI="\u0423",VI="\u0443",II="\u21C5",RI="\u0170",HI="\u0171",XI="\u296E",YI="\u297E",zI="\u{1D518}",UI="\u{1D532}",FI="\xD9",GI="\xF9",WI="\u2963",_I="\u21BF",KI="\u21BE",ZI="\u2580",QI="\u231C",JI="\u231C",tR="\u230F",eR="\u25F8",nR="\u016A",iR="\u016B",rR="\xA8",oR="_",sR="\u23DF",lR="\u23B5",aR="\u23DD",cR="\u22C3",uR="\u228E",hR="\u0172",fR="\u0173",mR="\u{1D54C}",dR="\u{1D566}",gR="\u2912",yR="\u2191",xR="\u2191",vR="\u21D1",pR="\u21C5",bR="\u2195",wR="\u2195",kR="\u21D5",AR="\u296E",SR="\u21BF",CR="\u21BE",NR="\u228E",MR="\u2196",TR="\u2197",$R="\u03C5",ER="\u03D2",LR="\u03D2",OR="\u03A5",jR="\u03C5",PR="\u21A5",DR="\u22A5",qR="\u21C8",BR="\u231D",VR="\u231D",IR="\u230E",RR="\u016E",HR="\u016F",XR="\u25F9",YR="\u{1D4B0}",zR="\u{1D4CA}",UR="\u22F0",FR="\u0168",GR="\u0169",WR="\u25B5",_R="\u25B4",KR="\u21C8",ZR="\xDC",QR="\xFC",JR="\u29A7",tH="\u299C",eH="\u03F5",nH="\u03F0",iH="\u2205",rH="\u03D5",oH="\u03D6",sH="\u221D",lH="\u2195",aH="\u21D5",cH="\u03F1",uH="\u03C2",hH="\u228A\uFE00",fH="\u2ACB\uFE00",mH="\u228B\uFE00",dH="\u2ACC\uFE00",gH="\u03D1",yH="\u22B2",xH="\u22B3",vH="\u2AE8",pH="\u2AEB",bH="\u2AE9",wH="\u0412",kH="\u0432",AH="\u22A2",SH="\u22A8",CH="\u22A9",NH="\u22AB",MH="\u2AE6",TH="\u22BB",$H="\u2228",EH="\u22C1",LH="\u225A",OH="\u22EE",jH="|",PH="\u2016",DH="|",qH="\u2016",BH="\u2223",VH="|",IH="\u2758",RH="\u2240",HH="\u200A",XH="\u{1D519}",YH="\u{1D533}",zH="\u22B2",UH="\u2282\u20D2",FH="\u2283\u20D2",GH="\u{1D54D}",WH="\u{1D567}",_H="\u221D",KH="\u22B3",ZH="\u{1D4B1}",QH="\u{1D4CB}",JH="\u2ACB\uFE00",tX="\u228A\uFE00",eX="\u2ACC\uFE00",nX="\u228B\uFE00",iX="\u22AA",rX="\u299A",oX="\u0174",sX="\u0175",lX="\u2A5F",aX="\u2227",cX="\u22C0",uX="\u2259",hX="\u2118",fX="\u{1D51A}",mX="\u{1D534}",dX="\u{1D54E}",gX="\u{1D568}",yX="\u2118",xX="\u2240",vX="\u2240",pX="\u{1D4B2}",bX="\u{1D4CC}",wX="\u22C2",kX="\u25EF",AX="\u22C3",SX="\u25BD",CX="\u{1D51B}",NX="\u{1D535}",MX="\u27F7",TX="\u27FA",$X="\u039E",EX="\u03BE",LX="\u27F5",OX="\u27F8",jX="\u27FC",PX="\u22FB",DX="\u2A00",qX="\u{1D54F}",BX="\u{1D569}",VX="\u2A01",IX="\u2A02",RX="\u27F6",HX="\u27F9",XX="\u{1D4B3}",YX="\u{1D4CD}",zX="\u2A06",UX="\u2A04",FX="\u25B3",GX="\u22C1",WX="\u22C0",_X="\xDD",KX="\xFD",ZX="\u042F",QX="\u044F",JX="\u0176",tY="\u0177",eY="\u042B",nY="\u044B",iY="\xA5",rY="\u{1D51C}",oY="\u{1D536}",sY="\u0407",lY="\u0457",aY="\u{1D550}",cY="\u{1D56A}",uY="\u{1D4B4}",hY="\u{1D4CE}",fY="\u042E",mY="\u044E",dY="\xFF",gY="\u0178",yY="\u0179",xY="\u017A",vY="\u017D",pY="\u017E",bY="\u0417",wY="\u0437",kY="\u017B",AY="\u017C",SY="\u2128",CY="\u200B",NY="\u0396",MY="\u03B6",TY="\u{1D537}",$Y="\u2128",EY="\u0416",LY="\u0436",OY="\u21DD",jY="\u{1D56B}",PY="\u2124",DY="\u{1D4B5}",qY="\u{1D4CF}",BY="\u200D",VY="\u200C",ks={Aacute:w9,aacute:k9,Abreve:A9,abreve:S9,ac:C9,acd:N9,acE:M9,Acirc:T9,acirc:$9,acute:E9,Acy:L9,acy:O9,AElig:j9,aelig:P9,af:D9,Afr:q9,afr:B9,Agrave:V9,agrave:I9,alefsym:R9,aleph:H9,Alpha:X9,alpha:Y9,Amacr:z9,amacr:U9,amalg:F9,amp:G9,AMP:W9,andand:_9,And:K9,and:Z9,andd:Q9,andslope:J9,andv:t8,ang:e8,ange:n8,angle:i8,angmsdaa:r8,angmsdab:o8,angmsdac:s8,angmsdad:l8,angmsdae:a8,angmsdaf:c8,angmsdag:u8,angmsdah:h8,angmsd:f8,angrt:m8,angrtvb:d8,angrtvbd:g8,angsph:y8,angst:x8,angzarr:v8,Aogon:p8,aogon:b8,Aopf:w8,aopf:k8,apacir:A8,ap:S8,apE:C8,ape:N8,apid:M8,apos:T8,ApplyFunction:$8,approx:E8,approxeq:L8,Aring:O8,aring:j8,Ascr:P8,ascr:D8,Assign:q8,ast:B8,asymp:V8,asympeq:I8,Atilde:R8,atilde:H8,Auml:X8,auml:Y8,awconint:z8,awint:U8,backcong:F8,backepsilon:G8,backprime:W8,backsim:_8,backsimeq:K8,Backslash:Z8,Barv:Q8,barvee:J8,barwed:t5,Barwed:e5,barwedge:n5,bbrk:i5,bbrktbrk:r5,bcong:o5,Bcy:s5,bcy:l5,bdquo:a5,becaus:c5,because:u5,Because:h5,bemptyv:f5,bepsi:m5,bernou:d5,Bernoullis:g5,Beta:y5,beta:x5,beth:v5,between:p5,Bfr:b5,bfr:w5,bigcap:k5,bigcirc:A5,bigcup:S5,bigodot:C5,bigoplus:N5,bigotimes:M5,bigsqcup:T5,bigstar:$5,bigtriangledown:E5,bigtriangleup:L5,biguplus:O5,bigvee:j5,bigwedge:P5,bkarow:D5,blacklozenge:q5,blacksquare:B5,blacktriangle:V5,blacktriangledown:I5,blacktriangleleft:R5,blacktriangleright:H5,blank:X5,blk12:Y5,blk14:z5,blk34:U5,block:F5,bne:G5,bnequiv:W5,bNot:_5,bnot:K5,Bopf:Z5,bopf:Q5,bot:J5,bottom:t6,bowtie:e6,boxbox:n6,boxdl:i6,boxdL:r6,boxDl:o6,boxDL:s6,boxdr:l6,boxdR:a6,boxDr:c6,boxDR:u6,boxh:h6,boxH:f6,boxhd:m6,boxHd:d6,boxhD:g6,boxHD:y6,boxhu:x6,boxHu:v6,boxhU:p6,boxHU:b6,boxminus:w6,boxplus:k6,boxtimes:A6,boxul:S6,boxuL:C6,boxUl:N6,boxUL:M6,boxur:T6,boxuR:$6,boxUr:E6,boxUR:L6,boxv:O6,boxV:j6,boxvh:P6,boxvH:D6,boxVh:q6,boxVH:B6,boxvl:V6,boxvL:I6,boxVl:R6,boxVL:H6,boxvr:X6,boxvR:Y6,boxVr:z6,boxVR:U6,bprime:F6,breve:G6,Breve:W6,brvbar:_6,bscr:K6,Bscr:Z6,bsemi:Q6,bsim:J6,bsime:t7,bsolb:e7,bsol:n7,bsolhsub:i7,bull:r7,bullet:o7,bump:s7,bumpE:l7,bumpe:a7,Bumpeq:c7,bumpeq:u7,Cacute:h7,cacute:f7,capand:m7,capbrcup:d7,capcap:g7,cap:y7,Cap:x7,capcup:v7,capdot:p7,CapitalDifferentialD:b7,caps:w7,caret:k7,caron:A7,Cayleys:S7,ccaps:C7,Ccaron:N7,ccaron:M7,Ccedil:T7,ccedil:$7,Ccirc:E7,ccirc:L7,Cconint:O7,ccups:j7,ccupssm:P7,Cdot:D7,cdot:q7,cedil:B7,Cedilla:V7,cemptyv:I7,cent:R7,centerdot:H7,CenterDot:X7,cfr:Y7,Cfr:z7,CHcy:U7,chcy:F7,check:G7,checkmark:W7,Chi:_7,chi:K7,circ:Z7,circeq:Q7,circlearrowleft:J7,circlearrowright:th,circledast:eh,circledcirc:nh,circleddash:ih,CircleDot:rh,circledR:oh,circledS:sh,CircleMinus:lh,CirclePlus:ah,CircleTimes:ch,cir:uh,cirE:hh,cire:fh,cirfnint:mh,cirmid:dh,cirscir:gh,ClockwiseContourIntegral:yh,CloseCurlyDoubleQuote:xh,CloseCurlyQuote:vh,clubs:ph,clubsuit:bh,colon:wh,Colon:kh,Colone:Ah,colone:Sh,coloneq:Ch,comma:Nh,commat:Mh,comp:Th,compfn:$h,complement:Eh,complexes:Lh,cong:Oh,congdot:jh,Congruent:Ph,conint:Dh,Conint:qh,ContourIntegral:Bh,copf:Vh,Copf:Ih,coprod:Rh,Coproduct:Hh,copy:Xh,COPY:Yh,copysr:zh,CounterClockwiseContourIntegral:Uh,crarr:Fh,cross:Gh,Cross:Wh,Cscr:_h,cscr:Kh,csub:Zh,csube:Qh,csup:Jh,csupe:t3,ctdot:e3,cudarrl:n3,cudarrr:i3,cuepr:r3,cuesc:o3,cularr:s3,cularrp:l3,cupbrcap:a3,cupcap:c3,CupCap:u3,cup:h3,Cup:f3,cupcup:m3,cupdot:d3,cupor:g3,cups:y3,curarr:x3,curarrm:v3,curlyeqprec:p3,curlyeqsucc:b3,curlyvee:w3,curlywedge:k3,curren:A3,curvearrowleft:S3,curvearrowright:C3,cuvee:N3,cuwed:M3,cwconint:T3,cwint:$3,cylcty:E3,dagger:L3,Dagger:O3,daleth:j3,darr:P3,Darr:D3,dArr:q3,dash:B3,Dashv:V3,dashv:I3,dbkarow:R3,dblac:H3,Dcaron:X3,dcaron:Y3,Dcy:z3,dcy:U3,ddagger:F3,ddarr:G3,DD:W3,dd:_3,DDotrahd:K3,ddotseq:Z3,deg:Q3,Del:J3,Delta:tf,delta:ef,demptyv:nf,dfisht:rf,Dfr:of,dfr:sf,dHar:lf,dharl:af,dharr:cf,DiacriticalAcute:uf,DiacriticalDot:hf,DiacriticalDoubleAcute:ff,DiacriticalGrave:mf,DiacriticalTilde:df,diam:gf,diamond:yf,Diamond:xf,diamondsuit:vf,diams:pf,die:bf,DifferentialD:wf,digamma:kf,disin:Af,div:Sf,divide:Cf,divideontimes:Nf,divonx:Mf,DJcy:Tf,djcy:$f,dlcorn:Ef,dlcrop:Lf,dollar:Of,Dopf:jf,dopf:Pf,Dot:Df,dot:qf,DotDot:Bf,doteq:Vf,doteqdot:If,DotEqual:Rf,dotminus:Hf,dotplus:Xf,dotsquare:Yf,doublebarwedge:zf,DoubleContourIntegral:Uf,DoubleDot:Ff,DoubleDownArrow:Gf,DoubleLeftArrow:Wf,DoubleLeftRightArrow:_f,DoubleLeftTee:Kf,DoubleLongLeftArrow:Zf,DoubleLongLeftRightArrow:Qf,DoubleLongRightArrow:Jf,DoubleRightArrow:tm,DoubleRightTee:em,DoubleUpArrow:nm,DoubleUpDownArrow:im,DoubleVerticalBar:rm,DownArrowBar:om,downarrow:sm,DownArrow:lm,Downarrow:am,DownArrowUpArrow:cm,DownBreve:um,downdownarrows:hm,downharpoonleft:fm,downharpoonright:mm,DownLeftRightVector:dm,DownLeftTeeVector:gm,DownLeftVectorBar:ym,DownLeftVector:xm,DownRightTeeVector:vm,DownRightVectorBar:pm,DownRightVector:bm,DownTeeArrow:wm,DownTee:km,drbkarow:Am,drcorn:Sm,drcrop:Cm,Dscr:Nm,dscr:Mm,DScy:Tm,dscy:$m,dsol:Em,Dstrok:Lm,dstrok:Om,dtdot:jm,dtri:Pm,dtrif:Dm,duarr:qm,duhar:Bm,dwangle:Vm,DZcy:Im,dzcy:Rm,dzigrarr:Hm,Eacute:Xm,eacute:Ym,easter:zm,Ecaron:Um,ecaron:Fm,Ecirc:Gm,ecirc:Wm,ecir:_m,ecolon:Km,Ecy:Zm,ecy:Qm,eDDot:Jm,Edot:td,edot:ed,eDot:nd,ee:id,efDot:rd,Efr:od,efr:sd,eg:ld,Egrave:ad,egrave:cd,egs:ud,egsdot:hd,el:fd,Element:md,elinters:dd,ell:gd,els:yd,elsdot:xd,Emacr:vd,emacr:pd,empty:bd,emptyset:wd,EmptySmallSquare:kd,emptyv:Ad,EmptyVerySmallSquare:Sd,emsp13:Cd,emsp14:Nd,emsp:Md,ENG:Td,eng:$d,ensp:Ed,Eogon:Ld,eogon:Od,Eopf:jd,eopf:Pd,epar:Dd,eparsl:qd,eplus:Bd,epsi:Vd,Epsilon:Id,epsilon:Rd,epsiv:Hd,eqcirc:Xd,eqcolon:Yd,eqsim:zd,eqslantgtr:Ud,eqslantless:Fd,Equal:Gd,equals:Wd,EqualTilde:_d,equest:Kd,Equilibrium:Zd,equiv:Qd,equivDD:Jd,eqvparsl:t4,erarr:e4,erDot:n4,escr:i4,Escr:r4,esdot:o4,Esim:s4,esim:l4,Eta:a4,eta:c4,ETH:u4,eth:h4,Euml:f4,euml:m4,euro:d4,excl:g4,exist:y4,Exists:x4,expectation:v4,exponentiale:p4,ExponentialE:b4,fallingdotseq:w4,Fcy:k4,fcy:A4,female:S4,ffilig:C4,fflig:N4,ffllig:M4,Ffr:T4,ffr:$4,filig:E4,FilledSmallSquare:L4,FilledVerySmallSquare:O4,fjlig:j4,flat:P4,fllig:D4,fltns:q4,fnof:B4,Fopf:V4,fopf:I4,forall:R4,ForAll:H4,fork:X4,forkv:Y4,Fouriertrf:z4,fpartint:U4,frac12:F4,frac13:G4,frac14:W4,frac15:_4,frac16:K4,frac18:Z4,frac23:Q4,frac25:J4,frac34:tg,frac35:eg,frac38:ng,frac45:ig,frac56:rg,frac58:og,frac78:sg,frasl:lg,frown:ag,fscr:cg,Fscr:ug,gacute:hg,Gamma:fg,gamma:mg,Gammad:dg,gammad:gg,gap:yg,Gbreve:xg,gbreve:vg,Gcedil:pg,Gcirc:bg,gcirc:wg,Gcy:kg,gcy:Ag,Gdot:Sg,gdot:Cg,ge:Ng,gE:Mg,gEl:Tg,gel:$g,geq:Eg,geqq:Lg,geqslant:Og,gescc:jg,ges:Pg,gesdot:Dg,gesdoto:qg,gesdotol:Bg,gesl:Vg,gesles:Ig,Gfr:Rg,gfr:Hg,gg:Xg,Gg:Yg,ggg:zg,gimel:Ug,GJcy:Fg,gjcy:Gg,gla:Wg,gl:_g,glE:Kg,glj:Zg,gnap:Qg,gnapprox:Jg,gne:ty,gnE:ey,gneq:ny,gneqq:iy,gnsim:ry,Gopf:oy,gopf:sy,grave:ly,GreaterEqual:ay,GreaterEqualLess:cy,GreaterFullEqual:uy,GreaterGreater:hy,GreaterLess:fy,GreaterSlantEqual:my,GreaterTilde:dy,Gscr:gy,gscr:yy,gsim:xy,gsime:vy,gsiml:py,gtcc:by,gtcir:wy,gt:ky,GT:Ay,Gt:Sy,gtdot:Cy,gtlPar:Ny,gtquest:My,gtrapprox:Ty,gtrarr:$y,gtrdot:Ey,gtreqless:Ly,gtreqqless:Oy,gtrless:jy,gtrsim:Py,gvertneqq:Dy,gvnE:qy,Hacek:By,hairsp:Vy,half:Iy,hamilt:Ry,HARDcy:Hy,hardcy:Xy,harrcir:Yy,harr:zy,hArr:Uy,harrw:Fy,Hat:Gy,hbar:Wy,Hcirc:_y,hcirc:Ky,hearts:Zy,heartsuit:Qy,hellip:Jy,hercon:tx,hfr:ex,Hfr:nx,HilbertSpace:ix,hksearow:rx,hkswarow:ox,hoarr:sx,homtht:lx,hookleftarrow:ax,hookrightarrow:cx,hopf:ux,Hopf:hx,horbar:fx,HorizontalLine:mx,hscr:dx,Hscr:gx,hslash:yx,Hstrok:xx,hstrok:vx,HumpDownHump:px,HumpEqual:bx,hybull:wx,hyphen:kx,Iacute:Ax,iacute:Sx,ic:Cx,Icirc:Nx,icirc:Mx,Icy:Tx,icy:$x,Idot:Ex,IEcy:Lx,iecy:Ox,iexcl:jx,iff:Px,ifr:Dx,Ifr:qx,Igrave:Bx,igrave:Vx,ii:Ix,iiiint:Rx,iiint:Hx,iinfin:Xx,iiota:Yx,IJlig:zx,ijlig:Ux,Imacr:Fx,imacr:Gx,image:Wx,ImaginaryI:_x,imagline:Kx,imagpart:Zx,imath:Qx,Im:Jx,imof:tv,imped:ev,Implies:nv,incare:iv,in:"\u2208",infin:rv,infintie:ov,inodot:sv,intcal:lv,int:av,Int:cv,integers:uv,Integral:hv,intercal:fv,Intersection:mv,intlarhk:dv,intprod:gv,InvisibleComma:yv,InvisibleTimes:xv,IOcy:vv,iocy:pv,Iogon:bv,iogon:wv,Iopf:kv,iopf:Av,Iota:Sv,iota:Cv,iprod:Nv,iquest:Mv,iscr:Tv,Iscr:$v,isin:Ev,isindot:Lv,isinE:Ov,isins:jv,isinsv:Pv,isinv:Dv,it:qv,Itilde:Bv,itilde:Vv,Iukcy:Iv,iukcy:Rv,Iuml:Hv,iuml:Xv,Jcirc:Yv,jcirc:zv,Jcy:Uv,jcy:Fv,Jfr:Gv,jfr:Wv,jmath:_v,Jopf:Kv,jopf:Zv,Jscr:Qv,jscr:Jv,Jsercy:tp,jsercy:ep,Jukcy:np,jukcy:ip,Kappa:rp,kappa:op,kappav:sp,Kcedil:lp,kcedil:ap,Kcy:cp,kcy:up,Kfr:hp,kfr:fp,kgreen:mp,KHcy:dp,khcy:gp,KJcy:yp,kjcy:xp,Kopf:vp,kopf:pp,Kscr:bp,kscr:wp,lAarr:kp,Lacute:Ap,lacute:Sp,laemptyv:Cp,lagran:Np,Lambda:Mp,lambda:Tp,lang:$p,Lang:Ep,langd:Lp,langle:Op,lap:jp,Laplacetrf:Pp,laquo:Dp,larrb:qp,larrbfs:Bp,larr:Vp,Larr:Ip,lArr:Rp,larrfs:Hp,larrhk:Xp,larrlp:Yp,larrpl:zp,larrsim:Up,larrtl:Fp,latail:Gp,lAtail:Wp,lat:_p,late:Kp,lates:Zp,lbarr:Qp,lBarr:Jp,lbbrk:tb,lbrace:eb,lbrack:nb,lbrke:ib,lbrksld:rb,lbrkslu:ob,Lcaron:sb,lcaron:lb,Lcedil:ab,lcedil:cb,lceil:ub,lcub:hb,Lcy:fb,lcy:mb,ldca:db,ldquo:gb,ldquor:yb,ldrdhar:xb,ldrushar:vb,ldsh:pb,le:bb,lE:wb,LeftAngleBracket:kb,LeftArrowBar:Ab,leftarrow:Sb,LeftArrow:Cb,Leftarrow:Nb,LeftArrowRightArrow:Mb,leftarrowtail:Tb,LeftCeiling:$b,LeftDoubleBracket:Eb,LeftDownTeeVector:Lb,LeftDownVectorBar:Ob,LeftDownVector:jb,LeftFloor:Pb,leftharpoondown:Db,leftharpoonup:qb,leftleftarrows:Bb,leftrightarrow:Vb,LeftRightArrow:Ib,Leftrightarrow:Rb,leftrightarrows:Hb,leftrightharpoons:Xb,leftrightsquigarrow:Yb,LeftRightVector:zb,LeftTeeArrow:Ub,LeftTee:Fb,LeftTeeVector:Gb,leftthreetimes:Wb,LeftTriangleBar:_b,LeftTriangle:Kb,LeftTriangleEqual:Zb,LeftUpDownVector:Qb,LeftUpTeeVector:Jb,LeftUpVectorBar:tw,LeftUpVector:ew,LeftVectorBar:nw,LeftVector:iw,lEg:rw,leg:ow,leq:sw,leqq:lw,leqslant:aw,lescc:cw,les:uw,lesdot:hw,lesdoto:fw,lesdotor:mw,lesg:dw,lesges:gw,lessapprox:yw,lessdot:xw,lesseqgtr:vw,lesseqqgtr:pw,LessEqualGreater:bw,LessFullEqual:ww,LessGreater:kw,lessgtr:Aw,LessLess:Sw,lesssim:Cw,LessSlantEqual:Nw,LessTilde:Mw,lfisht:Tw,lfloor:$w,Lfr:Ew,lfr:Lw,lg:Ow,lgE:jw,lHar:Pw,lhard:Dw,lharu:qw,lharul:Bw,lhblk:Vw,LJcy:Iw,ljcy:Rw,llarr:Hw,ll:Xw,Ll:Yw,llcorner:zw,Lleftarrow:Uw,llhard:Fw,lltri:Gw,Lmidot:Ww,lmidot:_w,lmoustache:Kw,lmoust:Zw,lnap:Qw,lnapprox:Jw,lne:tk,lnE:ek,lneq:nk,lneqq:ik,lnsim:rk,loang:ok,loarr:sk,lobrk:lk,longleftarrow:ak,LongLeftArrow:ck,Longleftarrow:uk,longleftrightarrow:hk,LongLeftRightArrow:fk,Longleftrightarrow:mk,longmapsto:dk,longrightarrow:gk,LongRightArrow:yk,Longrightarrow:xk,looparrowleft:vk,looparrowright:pk,lopar:bk,Lopf:wk,lopf:kk,loplus:Ak,lotimes:Sk,lowast:Ck,lowbar:Nk,LowerLeftArrow:Mk,LowerRightArrow:Tk,loz:$k,lozenge:Ek,lozf:Lk,lpar:Ok,lparlt:jk,lrarr:Pk,lrcorner:Dk,lrhar:qk,lrhard:Bk,lrm:Vk,lrtri:Ik,lsaquo:Rk,lscr:Hk,Lscr:Xk,lsh:Yk,Lsh:zk,lsim:Uk,lsime:Fk,lsimg:Gk,lsqb:Wk,lsquo:_k,lsquor:Kk,Lstrok:Zk,lstrok:Qk,ltcc:Jk,ltcir:tA,lt:eA,LT:nA,Lt:iA,ltdot:rA,lthree:oA,ltimes:sA,ltlarr:lA,ltquest:aA,ltri:cA,ltrie:uA,ltrif:hA,ltrPar:fA,lurdshar:mA,luruhar:dA,lvertneqq:gA,lvnE:yA,macr:xA,male:vA,malt:pA,maltese:bA,Map:"\u2905",map:wA,mapsto:kA,mapstodown:AA,mapstoleft:SA,mapstoup:CA,marker:NA,mcomma:MA,Mcy:TA,mcy:$A,mdash:EA,mDDot:LA,measuredangle:OA,MediumSpace:jA,Mellintrf:PA,Mfr:DA,mfr:qA,mho:BA,micro:VA,midast:IA,midcir:RA,mid:HA,middot:XA,minusb:YA,minus:zA,minusd:UA,minusdu:FA,MinusPlus:GA,mlcp:WA,mldr:_A,mnplus:KA,models:ZA,Mopf:QA,mopf:JA,mp:tS,mscr:eS,Mscr:nS,mstpos:iS,Mu:rS,mu:oS,multimap:sS,mumap:lS,nabla:aS,Nacute:cS,nacute:uS,nang:hS,nap:fS,napE:mS,napid:dS,napos:gS,napprox:yS,natural:xS,naturals:vS,natur:pS,nbsp:bS,nbump:wS,nbumpe:kS,ncap:AS,Ncaron:SS,ncaron:CS,Ncedil:NS,ncedil:MS,ncong:TS,ncongdot:$S,ncup:ES,Ncy:LS,ncy:OS,ndash:jS,nearhk:PS,nearr:DS,neArr:qS,nearrow:BS,ne:VS,nedot:IS,NegativeMediumSpace:RS,NegativeThickSpace:HS,NegativeThinSpace:XS,NegativeVeryThinSpace:YS,nequiv:zS,nesear:US,nesim:FS,NestedGreaterGreater:GS,NestedLessLess:WS,NewLine:_S,nexist:KS,nexists:ZS,Nfr:QS,nfr:JS,ngE:tC,nge:eC,ngeq:nC,ngeqq:iC,ngeqslant:rC,nges:oC,nGg:sC,ngsim:lC,nGt:aC,ngt:cC,ngtr:uC,nGtv:hC,nharr:fC,nhArr:mC,nhpar:dC,ni:gC,nis:yC,nisd:xC,niv:vC,NJcy:pC,njcy:bC,nlarr:wC,nlArr:kC,nldr:AC,nlE:SC,nle:CC,nleftarrow:NC,nLeftarrow:MC,nleftrightarrow:TC,nLeftrightarrow:$C,nleq:EC,nleqq:LC,nleqslant:OC,nles:jC,nless:PC,nLl:DC,nlsim:qC,nLt:BC,nlt:VC,nltri:IC,nltrie:RC,nLtv:HC,nmid:XC,NoBreak:YC,NonBreakingSpace:zC,nopf:UC,Nopf:FC,Not:GC,not:WC,NotCongruent:_C,NotCupCap:KC,NotDoubleVerticalBar:ZC,NotElement:QC,NotEqual:JC,NotEqualTilde:tN,NotExists:eN,NotGreater:nN,NotGreaterEqual:iN,NotGreaterFullEqual:rN,NotGreaterGreater:oN,NotGreaterLess:sN,NotGreaterSlantEqual:lN,NotGreaterTilde:aN,NotHumpDownHump:cN,NotHumpEqual:uN,notin:hN,notindot:fN,notinE:mN,notinva:dN,notinvb:gN,notinvc:yN,NotLeftTriangleBar:xN,NotLeftTriangle:vN,NotLeftTriangleEqual:pN,NotLess:bN,NotLessEqual:wN,NotLessGreater:kN,NotLessLess:AN,NotLessSlantEqual:SN,NotLessTilde:CN,NotNestedGreaterGreater:NN,NotNestedLessLess:MN,notni:TN,notniva:$N,notnivb:EN,notnivc:LN,NotPrecedes:ON,NotPrecedesEqual:jN,NotPrecedesSlantEqual:PN,NotReverseElement:DN,NotRightTriangleBar:qN,NotRightTriangle:BN,NotRightTriangleEqual:VN,NotSquareSubset:IN,NotSquareSubsetEqual:RN,NotSquareSuperset:HN,NotSquareSupersetEqual:XN,NotSubset:YN,NotSubsetEqual:zN,NotSucceeds:UN,NotSucceedsEqual:FN,NotSucceedsSlantEqual:GN,NotSucceedsTilde:WN,NotSuperset:_N,NotSupersetEqual:KN,NotTilde:ZN,NotTildeEqual:QN,NotTildeFullEqual:JN,NotTildeTilde:tM,NotVerticalBar:eM,nparallel:nM,npar:iM,nparsl:rM,npart:oM,npolint:sM,npr:lM,nprcue:aM,nprec:cM,npreceq:uM,npre:hM,nrarrc:fM,nrarr:mM,nrArr:dM,nrarrw:gM,nrightarrow:yM,nRightarrow:xM,nrtri:vM,nrtrie:pM,nsc:bM,nsccue:wM,nsce:kM,Nscr:AM,nscr:SM,nshortmid:CM,nshortparallel:NM,nsim:MM,nsime:TM,nsimeq:$M,nsmid:EM,nspar:LM,nsqsube:OM,nsqsupe:jM,nsub:PM,nsubE:DM,nsube:qM,nsubset:BM,nsubseteq:VM,nsubseteqq:IM,nsucc:RM,nsucceq:HM,nsup:XM,nsupE:YM,nsupe:zM,nsupset:UM,nsupseteq:FM,nsupseteqq:GM,ntgl:WM,Ntilde:_M,ntilde:KM,ntlg:ZM,ntriangleleft:QM,ntrianglelefteq:JM,ntriangleright:tT,ntrianglerighteq:eT,Nu:nT,nu:iT,num:rT,numero:oT,numsp:sT,nvap:lT,nvdash:aT,nvDash:cT,nVdash:uT,nVDash:hT,nvge:fT,nvgt:mT,nvHarr:dT,nvinfin:gT,nvlArr:yT,nvle:xT,nvlt:vT,nvltrie:pT,nvrArr:bT,nvrtrie:wT,nvsim:kT,nwarhk:AT,nwarr:ST,nwArr:CT,nwarrow:NT,nwnear:MT,Oacute:TT,oacute:$T,oast:ET,Ocirc:LT,ocirc:OT,ocir:jT,Ocy:PT,ocy:DT,odash:qT,Odblac:BT,odblac:VT,odiv:IT,odot:RT,odsold:HT,OElig:XT,oelig:YT,ofcir:zT,Ofr:UT,ofr:FT,ogon:GT,Ograve:WT,ograve:_T,ogt:KT,ohbar:ZT,ohm:QT,oint:JT,olarr:t$,olcir:e$,olcross:n$,oline:i$,olt:r$,Omacr:o$,omacr:s$,Omega:l$,omega:a$,Omicron:c$,omicron:u$,omid:h$,ominus:f$,Oopf:m$,oopf:d$,opar:g$,OpenCurlyDoubleQuote:y$,OpenCurlyQuote:x$,operp:v$,oplus:p$,orarr:b$,Or:w$,or:k$,ord:A$,order:S$,orderof:C$,ordf:N$,ordm:M$,origof:T$,oror:$$,orslope:E$,orv:L$,oS:O$,Oscr:j$,oscr:P$,Oslash:D$,oslash:q$,osol:B$,Otilde:V$,otilde:I$,otimesas:R$,Otimes:H$,otimes:X$,Ouml:Y$,ouml:z$,ovbar:U$,OverBar:F$,OverBrace:G$,OverBracket:W$,OverParenthesis:_$,para:K$,parallel:Z$,par:Q$,parsim:J$,parsl:tE,part:eE,PartialD:nE,Pcy:iE,pcy:rE,percnt:oE,period:sE,permil:lE,perp:aE,pertenk:cE,Pfr:uE,pfr:hE,Phi:fE,phi:mE,phiv:dE,phmmat:gE,phone:yE,Pi:xE,pi:vE,pitchfork:pE,piv:bE,planck:wE,planckh:kE,plankv:AE,plusacir:SE,plusb:CE,pluscir:NE,plus:ME,plusdo:TE,plusdu:$E,pluse:EE,PlusMinus:LE,plusmn:OE,plussim:jE,plustwo:PE,pm:DE,Poincareplane:qE,pointint:BE,popf:VE,Popf:IE,pound:RE,prap:HE,Pr:XE,pr:YE,prcue:zE,precapprox:UE,prec:FE,preccurlyeq:GE,Precedes:WE,PrecedesEqual:_E,PrecedesSlantEqual:KE,PrecedesTilde:ZE,preceq:QE,precnapprox:JE,precneqq:tL,precnsim:eL,pre:nL,prE:iL,precsim:rL,prime:oL,Prime:sL,primes:lL,prnap:aL,prnE:cL,prnsim:uL,prod:hL,Product:fL,profalar:mL,profline:dL,profsurf:gL,prop:yL,Proportional:xL,Proportion:vL,propto:pL,prsim:bL,prurel:wL,Pscr:kL,pscr:AL,Psi:SL,psi:CL,puncsp:NL,Qfr:ML,qfr:TL,qint:$L,qopf:EL,Qopf:LL,qprime:OL,Qscr:jL,qscr:PL,quaternions:DL,quatint:qL,quest:BL,questeq:VL,quot:IL,QUOT:RL,rAarr:HL,race:XL,Racute:YL,racute:zL,radic:UL,raemptyv:FL,rang:GL,Rang:WL,rangd:_L,range:KL,rangle:ZL,raquo:QL,rarrap:JL,rarrb:tO,rarrbfs:eO,rarrc:nO,rarr:iO,Rarr:rO,rArr:oO,rarrfs:sO,rarrhk:lO,rarrlp:aO,rarrpl:cO,rarrsim:uO,Rarrtl:hO,rarrtl:fO,rarrw:mO,ratail:dO,rAtail:gO,ratio:yO,rationals:xO,rbarr:vO,rBarr:pO,RBarr:bO,rbbrk:wO,rbrace:kO,rbrack:AO,rbrke:SO,rbrksld:CO,rbrkslu:NO,Rcaron:MO,rcaron:TO,Rcedil:$O,rcedil:EO,rceil:LO,rcub:OO,Rcy:jO,rcy:PO,rdca:DO,rdldhar:qO,rdquo:BO,rdquor:VO,rdsh:IO,real:RO,realine:HO,realpart:XO,reals:YO,Re:zO,rect:UO,reg:FO,REG:GO,ReverseElement:WO,ReverseEquilibrium:_O,ReverseUpEquilibrium:KO,rfisht:ZO,rfloor:QO,rfr:JO,Rfr:tj,rHar:ej,rhard:nj,rharu:ij,rharul:rj,Rho:oj,rho:sj,rhov:lj,RightAngleBracket:aj,RightArrowBar:cj,rightarrow:uj,RightArrow:hj,Rightarrow:fj,RightArrowLeftArrow:mj,rightarrowtail:dj,RightCeiling:gj,RightDoubleBracket:yj,RightDownTeeVector:xj,RightDownVectorBar:vj,RightDownVector:pj,RightFloor:bj,rightharpoondown:wj,rightharpoonup:kj,rightleftarrows:Aj,rightleftharpoons:Sj,rightrightarrows:Cj,rightsquigarrow:Nj,RightTeeArrow:Mj,RightTee:Tj,RightTeeVector:$j,rightthreetimes:Ej,RightTriangleBar:Lj,RightTriangle:Oj,RightTriangleEqual:jj,RightUpDownVector:Pj,RightUpTeeVector:Dj,RightUpVectorBar:qj,RightUpVector:Bj,RightVectorBar:Vj,RightVector:Ij,ring:Rj,risingdotseq:Hj,rlarr:Xj,rlhar:Yj,rlm:zj,rmoustache:Uj,rmoust:Fj,rnmid:Gj,roang:Wj,roarr:_j,robrk:Kj,ropar:Zj,ropf:Qj,Ropf:Jj,roplus:tP,rotimes:eP,RoundImplies:nP,rpar:iP,rpargt:rP,rppolint:oP,rrarr:sP,Rrightarrow:lP,rsaquo:aP,rscr:cP,Rscr:uP,rsh:hP,Rsh:fP,rsqb:mP,rsquo:dP,rsquor:gP,rthree:yP,rtimes:xP,rtri:vP,rtrie:pP,rtrif:bP,rtriltri:wP,RuleDelayed:kP,ruluhar:AP,rx:SP,Sacute:CP,sacute:NP,sbquo:MP,scap:TP,Scaron:$P,scaron:EP,Sc:LP,sc:OP,sccue:jP,sce:PP,scE:DP,Scedil:qP,scedil:BP,Scirc:VP,scirc:IP,scnap:RP,scnE:HP,scnsim:XP,scpolint:YP,scsim:zP,Scy:UP,scy:FP,sdotb:GP,sdot:WP,sdote:_P,searhk:KP,searr:ZP,seArr:QP,searrow:JP,sect:tD,semi:eD,seswar:nD,setminus:iD,setmn:rD,sext:oD,Sfr:sD,sfr:lD,sfrown:aD,sharp:cD,SHCHcy:uD,shchcy:hD,SHcy:fD,shcy:mD,ShortDownArrow:dD,ShortLeftArrow:gD,shortmid:yD,shortparallel:xD,ShortRightArrow:vD,ShortUpArrow:pD,shy:bD,Sigma:wD,sigma:kD,sigmaf:AD,sigmav:SD,sim:CD,simdot:ND,sime:MD,simeq:TD,simg:$D,simgE:ED,siml:LD,simlE:OD,simne:jD,simplus:PD,simrarr:DD,slarr:qD,SmallCircle:BD,smallsetminus:VD,smashp:ID,smeparsl:RD,smid:HD,smile:XD,smt:YD,smte:zD,smtes:UD,SOFTcy:FD,softcy:GD,solbar:WD,solb:_D,sol:KD,Sopf:ZD,sopf:QD,spades:JD,spadesuit:tq,spar:eq,sqcap:nq,sqcaps:iq,sqcup:rq,sqcups:oq,Sqrt:sq,sqsub:lq,sqsube:aq,sqsubset:cq,sqsubseteq:uq,sqsup:hq,sqsupe:fq,sqsupset:mq,sqsupseteq:dq,square:gq,Square:yq,SquareIntersection:xq,SquareSubset:vq,SquareSubsetEqual:pq,SquareSuperset:bq,SquareSupersetEqual:wq,SquareUnion:kq,squarf:Aq,squ:Sq,squf:Cq,srarr:Nq,Sscr:Mq,sscr:Tq,ssetmn:$q,ssmile:Eq,sstarf:Lq,Star:Oq,star:jq,starf:Pq,straightepsilon:Dq,straightphi:qq,strns:Bq,sub:Vq,Sub:Iq,subdot:Rq,subE:Hq,sube:Xq,subedot:Yq,submult:zq,subnE:Uq,subne:Fq,subplus:Gq,subrarr:Wq,subset:_q,Subset:Kq,subseteq:Zq,subseteqq:Qq,SubsetEqual:Jq,subsetneq:tB,subsetneqq:eB,subsim:nB,subsub:iB,subsup:rB,succapprox:oB,succ:sB,succcurlyeq:lB,Succeeds:aB,SucceedsEqual:cB,SucceedsSlantEqual:uB,SucceedsTilde:hB,succeq:fB,succnapprox:mB,succneqq:dB,succnsim:gB,succsim:yB,SuchThat:xB,sum:vB,Sum:pB,sung:bB,sup1:wB,sup2:kB,sup3:AB,sup:SB,Sup:CB,supdot:NB,supdsub:MB,supE:TB,supe:$B,supedot:EB,Superset:LB,SupersetEqual:OB,suphsol:jB,suphsub:PB,suplarr:DB,supmult:qB,supnE:BB,supne:VB,supplus:IB,supset:RB,Supset:HB,supseteq:XB,supseteqq:YB,supsetneq:zB,supsetneqq:UB,supsim:FB,supsub:GB,supsup:WB,swarhk:_B,swarr:KB,swArr:ZB,swarrow:QB,swnwar:JB,szlig:tV,Tab:eV,target:nV,Tau:iV,tau:rV,tbrk:oV,Tcaron:sV,tcaron:lV,Tcedil:aV,tcedil:cV,Tcy:uV,tcy:hV,tdot:fV,telrec:mV,Tfr:dV,tfr:gV,there4:yV,therefore:xV,Therefore:vV,Theta:pV,theta:bV,thetasym:wV,thetav:kV,thickapprox:AV,thicksim:SV,ThickSpace:CV,ThinSpace:NV,thinsp:MV,thkap:TV,thksim:$V,THORN:EV,thorn:LV,tilde:OV,Tilde:jV,TildeEqual:PV,TildeFullEqual:DV,TildeTilde:qV,timesbar:BV,timesb:VV,times:IV,timesd:RV,tint:HV,toea:XV,topbot:YV,topcir:zV,top:UV,Topf:FV,topf:GV,topfork:WV,tosa:_V,tprime:KV,trade:ZV,TRADE:QV,triangle:JV,triangledown:tI,triangleleft:eI,trianglelefteq:nI,triangleq:iI,triangleright:rI,trianglerighteq:oI,tridot:sI,trie:lI,triminus:aI,TripleDot:cI,triplus:uI,trisb:hI,tritime:fI,trpezium:mI,Tscr:dI,tscr:gI,TScy:yI,tscy:xI,TSHcy:vI,tshcy:pI,Tstrok:bI,tstrok:wI,twixt:kI,twoheadleftarrow:AI,twoheadrightarrow:SI,Uacute:CI,uacute:NI,uarr:MI,Uarr:TI,uArr:$I,Uarrocir:EI,Ubrcy:LI,ubrcy:OI,Ubreve:jI,ubreve:PI,Ucirc:DI,ucirc:qI,Ucy:BI,ucy:VI,udarr:II,Udblac:RI,udblac:HI,udhar:XI,ufisht:YI,Ufr:zI,ufr:UI,Ugrave:FI,ugrave:GI,uHar:WI,uharl:_I,uharr:KI,uhblk:ZI,ulcorn:QI,ulcorner:JI,ulcrop:tR,ultri:eR,Umacr:nR,umacr:iR,uml:rR,UnderBar:oR,UnderBrace:sR,UnderBracket:lR,UnderParenthesis:aR,Union:cR,UnionPlus:uR,Uogon:hR,uogon:fR,Uopf:mR,uopf:dR,UpArrowBar:gR,uparrow:yR,UpArrow:xR,Uparrow:vR,UpArrowDownArrow:pR,updownarrow:bR,UpDownArrow:wR,Updownarrow:kR,UpEquilibrium:AR,upharpoonleft:SR,upharpoonright:CR,uplus:NR,UpperLeftArrow:MR,UpperRightArrow:TR,upsi:$R,Upsi:ER,upsih:LR,Upsilon:OR,upsilon:jR,UpTeeArrow:PR,UpTee:DR,upuparrows:qR,urcorn:BR,urcorner:VR,urcrop:IR,Uring:RR,uring:HR,urtri:XR,Uscr:YR,uscr:zR,utdot:UR,Utilde:FR,utilde:GR,utri:WR,utrif:_R,uuarr:KR,Uuml:ZR,uuml:QR,uwangle:JR,vangrt:tH,varepsilon:eH,varkappa:nH,varnothing:iH,varphi:rH,varpi:oH,varpropto:sH,varr:lH,vArr:aH,varrho:cH,varsigma:uH,varsubsetneq:hH,varsubsetneqq:fH,varsupsetneq:mH,varsupsetneqq:dH,vartheta:gH,vartriangleleft:yH,vartriangleright:xH,vBar:vH,Vbar:pH,vBarv:bH,Vcy:wH,vcy:kH,vdash:AH,vDash:SH,Vdash:CH,VDash:NH,Vdashl:MH,veebar:TH,vee:$H,Vee:EH,veeeq:LH,vellip:OH,verbar:jH,Verbar:PH,vert:DH,Vert:qH,VerticalBar:BH,VerticalLine:VH,VerticalSeparator:IH,VerticalTilde:RH,VeryThinSpace:HH,Vfr:XH,vfr:YH,vltri:zH,vnsub:UH,vnsup:FH,Vopf:GH,vopf:WH,vprop:_H,vrtri:KH,Vscr:ZH,vscr:QH,vsubnE:JH,vsubne:tX,vsupnE:eX,vsupne:nX,Vvdash:iX,vzigzag:rX,Wcirc:oX,wcirc:sX,wedbar:lX,wedge:aX,Wedge:cX,wedgeq:uX,weierp:hX,Wfr:fX,wfr:mX,Wopf:dX,wopf:gX,wp:yX,wr:xX,wreath:vX,Wscr:pX,wscr:bX,xcap:wX,xcirc:kX,xcup:AX,xdtri:SX,Xfr:CX,xfr:NX,xharr:MX,xhArr:TX,Xi:$X,xi:EX,xlarr:LX,xlArr:OX,xmap:jX,xnis:PX,xodot:DX,Xopf:qX,xopf:BX,xoplus:VX,xotime:IX,xrarr:RX,xrArr:HX,Xscr:XX,xscr:YX,xsqcup:zX,xuplus:UX,xutri:FX,xvee:GX,xwedge:WX,Yacute:_X,yacute:KX,YAcy:ZX,yacy:QX,Ycirc:JX,ycirc:tY,Ycy:eY,ycy:nY,yen:iY,Yfr:rY,yfr:oY,YIcy:sY,yicy:lY,Yopf:aY,yopf:cY,Yscr:uY,yscr:hY,YUcy:fY,yucy:mY,yuml:dY,Yuml:gY,Zacute:yY,zacute:xY,Zcaron:vY,zcaron:pY,Zcy:bY,zcy:wY,Zdot:kY,zdot:AY,zeetrf:SY,ZeroWidthSpace:CY,Zeta:NY,zeta:MY,zfr:TY,Zfr:$Y,ZHcy:EY,zhcy:LY,zigrarr:OY,zopf:jY,Zopf:PY,Zscr:DY,zscr:qY,zwj:BY,zwnj:VY};var Qr;function IY(){return Qr||(Qr=1,(function(t){var e=d1&&d1.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(t,"__esModule",{value:!0}),t.getTrie=t.encodeHTMLTrieRe=t.getCodePoint=void 0;var n=e(ks);function i(c){return(c&64512)===55296}t.getCodePoint=String.prototype.codePointAt!=null?function(c,a){return c.codePointAt(a)}:(function(c,a){return i(c.charCodeAt(a))?(c.charCodeAt(a)-55296)*1024+c.charCodeAt(a+1)-56320+65536:c.charCodeAt(a)});var r=l(n.default);function o(c,a){for(var s,u="",m=0,f;(f=c.exec(a))!==null;){var h=f.index,d=a.charCodeAt(h),y=r.get(d);if(y){if(y.next!=null&&h+1<a.length){var v=(s=y.next.get(a.charCodeAt(h+1)))===null||s===void 0?void 0:s.value;if(v!=null){u+=a.substring(m,h)+v,c.lastIndex+=1,m=h+2;continue}}u+=a.substring(m,h)+y.value,m=h+1}else u+=a.substring(m,h)+"&#x"+t.getCodePoint(a,h).toString(16)+";",m=c.lastIndex+=Number(i(d))}return u+a.substr(m)}t.encodeHTMLTrieRe=o;function l(c){for(var a,s,u,m,f=new Map,h=0,d=Object.keys(c);h<d.length;h++){for(var y=d[h],v=c[y],p=f,T=0;T<v.length-1;T++){var A=v.charCodeAt(T),O=(a=p.get(A))!==null&&a!==void 0?a:{};p.set(A,O),p=(s=O.next)!==null&&s!==void 0?s:O.next=new Map}var j=(u=p.get(v.charCodeAt(v.length-1)))!==null&&u!==void 0?u:{};(m=j.value)!==null&&m!==void 0||(j.value="&"+y+";"),p.set(v.charCodeAt(v.length-1),j)}return f}t.getTrie=l})(d1)),d1}var Jr;function to(){if(Jr)return Zt;Jr=1;var t=Zt&&Zt.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.escapeUTF8=Zt.escape=Zt.encodeNonAsciiHTML=Zt.encodeHTML=Zt.encodeXML=void 0;var e=t(b9),n=IY(),i=t(ks),r=m(i.default,!0),o=m(e.default,!0),l=m(e.default,!1),c=new Map(Object.keys(e.default).map(function(h){return[e.default[h].charCodeAt(0),"&"+h+";"]}));function a(h){for(var d="",y=0,v;(v=o.exec(h))!==null;){var p=v.index,T=h.charCodeAt(p),A=c.get(T);A?(d+=h.substring(y,p)+A,y=p+1):(d+=h.substring(y,p)+"&#x"+n.getCodePoint(h,p).toString(16)+";",y=o.lastIndex+=+((T&65408)===55296))}return d+h.substr(y)}Zt.encodeXML=a;function s(h){return n.encodeHTMLTrieRe(r,h)}Zt.encodeHTML=s;function u(h){return n.encodeHTMLTrieRe(o,h)}Zt.encodeNonAsciiHTML=u;function m(h,d){for(var y=Object.keys(h).map(function(A){return"\\"+h[A].charAt(0)}).filter(function(A){return!d||A.charCodeAt(1)<128}).sort(function(A,O){return A.charCodeAt(1)-O.charCodeAt(1)}).filter(function(A,O,j){return A!==j[O+1]}),v=0;v<y.length-1;v++){for(var p=v;p<y.length-1&&y[p].charCodeAt(1)+1===y[p+1].charCodeAt(1);)p+=1;var T=1+p-v;T<3||y.splice(v,T,y[v]+"-"+y[p])}return new RegExp("["+y.join("")+(d?"\\x80-\\uFFFF":"")+"]","g")}Zt.escape=a;function f(h){for(var d,y=0,v="";d=l.exec(h);)y!==d.index&&(v+=h.substring(y,d.index)),v+=c.get(d[0].charCodeAt(0)),y=d.index+1;return v+h.substring(y)}return Zt.escapeUTF8=f,Zt}var eo;function RY(){return eo||(eo=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.encodeHTML5=t.encodeHTML4=t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=t.encode=t.decodeStrict=t.decode=t.EncodingMode=t.DecodingMode=t.EntityLevel=void 0;var e=Zr(),n=to(),i;(function(m){m[m.XML=0]="XML",m[m.HTML=1]="HTML"})(i=t.EntityLevel||(t.EntityLevel={}));var r;(function(m){m[m.Legacy=0]="Legacy",m[m.Strict=1]="Strict"})(r=t.DecodingMode||(t.DecodingMode={}));var o;(function(m){m[m.UTF8=0]="UTF8",m[m.ASCII=1]="ASCII",m[m.Extensive=2]="Extensive"})(o=t.EncodingMode||(t.EncodingMode={}));function l(m,f){f===void 0&&(f=i.XML);var h=typeof f=="number"?{level:f}:f;return h.level===i.HTML?h.mode===r.Strict?e.decodeHTMLStrict(m):e.decodeHTML(m):e.decodeXML(m)}t.decode=l;function c(m,f){f===void 0&&(f=i.XML);var h=typeof f=="number"?{level:f}:f;return h.level===i.HTML?h.mode===r.Legacy?e.decodeHTML(m):e.decodeHTMLStrict(m):e.decodeXML(m)}t.decodeStrict=c;function a(m,f){f===void 0&&(f=i.XML);var h=typeof f=="number"?{level:f}:f;return h.mode===o.UTF8?n.escapeUTF8(m):h.level===i.HTML?h.mode===o.ASCII?n.encodeNonAsciiHTML(m):n.encodeHTML(m):n.encodeXML(m)}t.encode=a;var s=to();Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return s.encodeXML}}),Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return s.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return s.encodeNonAsciiHTML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return s.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return s.escapeUTF8}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return s.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return s.encodeHTML}});var u=Zr();Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return u.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return u.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return u.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return u.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return u.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return u.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return u.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return u.decodeXML}})})(Xn)),Xn}var As=RY(),HY=92,Ss="&(?:#x[a-f0-9]{1,6}|#[0-9]{1,7}|[a-z][a-z0-9]{1,31});",Cs="[A-Za-z][A-Za-z0-9-]*",XY="[a-zA-Z_:][a-zA-Z0-9:._-]*",YY="[^\"'=<>`\\x00-\\x20]+",zY="'[^']*'",UY='"[^"]*"',FY="(?:"+YY+"|"+zY+"|"+UY+")",GY="(?:\\s*=\\s*"+FY+")",WY="(?:\\s+"+XY+GY+"?)",Ns="<"+Cs+WY+"*\\s*/?>",Ms="</"+Cs+"\\s*[>]",_Y="<!-->|<!--->|<!--[\\s\\S]*?-->",KY="[<][?][\\s\\S]*?[?][>]",ZY="<![A-Za-z]+[^>]*>",QY="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",JY="(?:"+Ns+"|"+Ms+"|"+_Y+"|"+KY+"|"+ZY+"|"+QY+")",tz=new RegExp("^"+JY),ez=/[\\&]/,Ts="[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^_`{|}~-]",nz=new RegExp("\\\\"+Ts+"|"+Ss,"gi"),iz='[&<>"]',no=new RegExp(iz,"g"),rz=function(t){return t.charCodeAt(0)===HY?t.charAt(1):As.decodeHTMLStrict(t)},$s=function(t){return ez.test(t)?t.replace(nz,rz):t},oz=function(t){try{return h9(t)}catch{return t}},sz=function(t){switch(t){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";default:return t}},$n=function(t){return no.test(t)?t.replace(no,sz):t},mi;function $i(t){return mi(t)}if(String.fromCodePoint)mi=function(t){try{return String.fromCodePoint(t)}catch(e){if(e instanceof RangeError)return"\uFFFD";throw e}};else{var lz=String.fromCharCode,az=Math.floor;mi=function(){var t=16384,e=[],n,i,r=-1,o=arguments.length;if(!o)return"";for(var l="";++r<o;){var c=Number(arguments[r]);if(!isFinite(c)||c<0||c>1114111||az(c)!==c)return"\uFFFD";c<=65535?e.push(c):(c-=65536,n=(c>>10)+55296,i=c%1024+56320,e.push(n,i)),(r+1===o||e.length>t)&&(l+=lz.apply(null,e),e.length=0)}return l}}var vn=oz,di=$s,Es=10,gi=42,pn=95,cz=96,Ls=91,uz=93,Os=60,hz=33,js=92,fz=38,Ps=40,yi=41,mz=58,Xe=39,Ye=34,Ds=Ts,Yn="\\\\"+Ds,dz=Ss,gz=tz,io=new RegExp(/^[!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~\p{P}\p{S}]/u),yz=new RegExp('^(?:"('+Yn+`|\\\\[^\\\\]|[^\\\\"\\x00])*"|'(`+Yn+"|\\\\[^\\\\]|[^\\\\'\\x00])*'|\\(("+Yn+"|\\\\[^\\\\]|[^\\\\()\\x00])*\\))"),xz=/^(?:<(?:[^<>\n\\\x00]|\\.)*>)/,qs=new RegExp("^"+Ds),vz=new RegExp("^"+dz,"i"),pz=/`+/,bz=/^`+/,wz=/\.\.\./g,kz=/--+/g,Az=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,Sz=/^<[A-Za-z][A-Za-z0-9.+-]{1,31}:[^<>\x00-\x20]*>/i,Cz=/^ *(?:\n *)?/,Bs=/^[ \t\n\x0b\x0c\x0d]/,ro=/^\s/,Nz=/ *$/,Mz=/^ */,oo=/^ *(?:\n|$)/,Tz=/^\[(?:[^\\\[\]]|\\.){0,1000}\]/s,$z=/^[^\n`\[\]\\!<&*_'"]+/m,_t=function(t){var e=new Dt("text");return e._literal=t,e},Vs=function(t){return t.slice(1,t.length-1).trim().replace(/[ \t\r\n]+/g," ").toLowerCase().toUpperCase()},Ez=function(t){var e=t.exec(this.subject.slice(this.pos));return e===null?null:(this.pos+=e.index+e[0].length,e[0])},Lz=function(){return this.pos<this.subject.length?this.subject.charCodeAt(this.pos):-1},Oz=function(){return this.match(Cz),!0},jz=function(t){var e=this.match(bz);if(e===null)return!1;for(var n=this.pos,i,r,o;(i=this.match(pz))!==null;)if(i===e)return r=new Dt("code"),o=this.subject.slice(n,this.pos-e.length).replace(/\n/gm," "),o.length>0&&o.match(/[^ ]/)!==null&&o[0]==" "&&o[o.length-1]==" "?r._literal=o.slice(1,o.length-1):r._literal=o,t.appendChild(r),!0;return this.pos=n,t.appendChild(_t(e)),!0},Pz=function(t){var e=this.subject,n;return this.pos+=1,this.peek()===Es?(this.pos+=1,n=new Dt("linebreak"),t.appendChild(n)):qs.test(e.charAt(this.pos))?(t.appendChild(_t(e.charAt(this.pos))),this.pos+=1):t.appendChild(_t("\\")),!0},Dz=function(t){var e,n,i;return(e=this.match(Az))?(n=e.slice(1,e.length-1),i=new Dt("link"),i._destination=vn("mailto:"+n),i._title="",i.appendChild(_t(n)),t.appendChild(i),!0):(e=this.match(Sz))?(n=e.slice(1,e.length-1),i=new Dt("link"),i._destination=vn(n),i._title="",i.appendChild(_t(n)),t.appendChild(i),!0):!1},qz=function(t){var e=this.match(gz);if(e===null)return!1;var n=new Dt("html_inline");return n._literal=e,t.appendChild(n),!0},Bz=function(t){var e=0,n,i,r,o=this.pos,l,c,a,s,u,m,f,h;if(t===Xe||t===Ye)e++,this.pos++;else for(;this.peek()===t;)e++,this.pos++;return e===0?null:(n=o===0?`
|
|
4
|
+
`:this.subject.charAt(o-1),r=this.peek(),r===-1?i=`
|
|
5
|
+
`:i=$i(r),u=ro.test(i),m=io.test(i),f=ro.test(n),h=io.test(n),l=!u&&(!m||f||h),c=!f&&(!h||u||m),t===pn?(a=l&&(!c||h),s=c&&(!l||m)):t===Xe||t===Ye?(a=l&&!c,s=c):(a=l,s=c),this.pos=o,{numdelims:e,can_open:a,can_close:s})},Vz=function(t,e){var n=this.scanDelims(t);if(!n)return!1;var i=n.numdelims,r=this.pos,o;this.pos+=i,t===Xe?o="\u2019":t===Ye?o="\u201C":o=this.subject.slice(r,this.pos);var l=_t(o);return e.appendChild(l),(n.can_open||n.can_close)&&(this.options.smart||t!==Xe&&t!==Ye)&&(this.delimiters={cc:t,numdelims:i,origdelims:i,node:l,previous:this.delimiters,next:null,can_open:n.can_open,can_close:n.can_close},this.delimiters.previous!==null&&(this.delimiters.previous.next=this.delimiters)),!0},Iz=function(t){t.previous!==null&&(t.previous.next=t.next),t.next===null?this.delimiters=t.previous:t.next.previous=t.previous},Rz=function(t,e){t.next!==e&&(t.next=e,e.previous=t)},Hz=function(t){for(var e,n,i,r,o,l,c,a,s,u,m=[],f,h=!1,d=0;d<14;d++)m[d]=t;for(n=this.delimiters;n!==null&&n.previous!==t;)n=n.previous;for(;n!==null;){var y=n.cc;if(!n.can_close)n=n.next;else{switch(e=n.previous,u=!1,y){case Xe:f=0;break;case Ye:f=1;break;case pn:f=2+(n.can_open?3:0)+n.origdelims%3;break;case gi:f=8+(n.can_open?3:0)+n.origdelims%3;break}for(;e!==null&&e!==t&&e!==m[f];){if(h=(n.can_open||e.can_close)&&n.origdelims%3!==0&&(e.origdelims+n.origdelims)%3===0,e.cc===n.cc&&e.can_open&&!h){u=!0;break}e=e.previous}if(i=n,y===gi||y===pn)if(!u)n=n.next;else{c=n.numdelims>=2&&e.numdelims>=2?2:1,r=e.node,o=n.node,e.numdelims-=c,n.numdelims-=c,r._literal=r._literal.slice(0,r._literal.length-c),o._literal=o._literal.slice(0,o._literal.length-c);var v=new Dt(c===1?"emph":"strong");for(a=r._next;a&&a!==o;)s=a._next,a.unlink(),v.appendChild(a),a=s;r.insertAfter(v),Rz(e,n),e.numdelims===0&&(r.unlink(),this.removeDelimiter(e)),n.numdelims===0&&(o.unlink(),l=n.next,this.removeDelimiter(n),n=l)}else y===Xe?(n.node._literal="\u2019",u&&(e.node._literal="\u2018"),n=n.next):y===Ye&&(n.node._literal="\u201D",u&&(e.node.literal="\u201C"),n=n.next);u||(m[f]=i.previous,i.can_open||this.removeDelimiter(i))}}for(;this.delimiters!==null&&this.delimiters!==t;)this.removeDelimiter(this.delimiters)},Xz=function(){var t=this.match(yz);return t===null?null:di(t.slice(1,-1))},Yz=function(){var t=this.match(xz);if(t===null){if(this.peek()===Os)return null;for(var e=this.pos,n=0,i;(i=this.peek())!==-1;)if(i===js&&qs.test(this.subject.charAt(this.pos+1)))this.pos+=1,this.peek()!==-1&&(this.pos+=1);else if(i===Ps)this.pos+=1,n+=1;else if(i===yi){if(n<1)break;this.pos+=1,n-=1}else{if(Bs.exec($i(i))!==null)break;this.pos+=1}return this.pos===e&&i!==yi||n!==0?null:(t=this.subject.slice(e,this.pos),vn(di(t)))}else return vn(di(t.slice(1,-1)))},zz=function(){var t=this.match(Tz);return t===null||t.length>1001?0:t.length},Uz=function(t){var e=this.pos;this.pos+=1;var n=_t("[");return t.appendChild(n),this.addBracket(n,e,!1),!0},Fz=function(t){var e=this.pos;if(this.pos+=1,this.peek()===Ls){this.pos+=1;var n=_t("![");t.appendChild(n),this.addBracket(n,e+1,!0)}else t.appendChild(_t("!"));return!0},Gz=function(t){var e,n,i,r,o=!1,l,c;if(this.pos+=1,e=this.pos,c=this.brackets,c===null)return t.appendChild(_t("]")),!0;if(!c.active)return t.appendChild(_t("]")),this.removeBracket(),!0;n=c.image;var a=this.pos;if(this.peek()===Ps&&(this.pos++,this.spnl()&&(i=this.parseLinkDestination())!==null&&this.spnl()&&(Bs.test(this.subject.charAt(this.pos-1))&&(r=this.parseLinkTitle())||!0)&&this.spnl()&&this.peek()===yi?(this.pos+=1,o=!0):this.pos=a),!o){var s=this.pos,u=this.parseLinkLabel();if(u>2?l=this.subject.slice(s,s+u):c.bracketAfter||(l=this.subject.slice(c.index,e)),u===0&&(this.pos=a),l){var m=this.refmap[Vs(l)];m&&(i=m.destination,r=m.title,o=!0)}}if(o){var f=new Dt(n?"image":"link");f._destination=i,f._title=r||"";var h,d;for(h=c.node._next;h;)d=h._next,h.unlink(),f.appendChild(h),h=d;if(t.appendChild(f),this.processEmphasis(c.previousDelimiter),this.removeBracket(),c.node.unlink(),!n)for(c=this.brackets;c!==null;)c.image||(c.active=!1),c=c.previous;return!0}else return this.removeBracket(),this.pos=e,t.appendChild(_t("]")),!0},Wz=function(t,e,n){this.brackets!==null&&(this.brackets.bracketAfter=!0),this.brackets={node:t,previous:this.brackets,previousDelimiter:this.delimiters,index:e,image:n,active:!0}},_z=function(){this.brackets=this.brackets.previous},Kz=function(t){var e;return(e=this.match(vz))?(t.appendChild(_t(As.decodeHTMLStrict(e))),!0):!1},Zz=function(t){var e;return(e=this.match($z))?(this.options.smart?t.appendChild(_t(e.replace(wz,"\u2026").replace(kz,function(n){var i=0,r=0;return n.length%3===0?r=n.length/3:n.length%2===0?i=n.length/2:n.length%3===2?(i=1,r=(n.length-2)/3):(i=2,r=(n.length-4)/3),"\u2014".repeat(r)+"\u2013".repeat(i)}))):t.appendChild(_t(e)),!0):!1},Qz=function(t){this.pos+=1;var e=t._lastChild;if(e&&e.type==="text"&&e._literal[e._literal.length-1]===" "){var n=e._literal[e._literal.length-2]===" ";e._literal=e._literal.replace(Nz,""),t.appendChild(new Dt(n?"linebreak":"softbreak"))}else t.appendChild(new Dt("softbreak"));return this.match(Mz),!0},Jz=function(t,e){this.subject=t,this.pos=0;var n,i,r,o,l=this.pos;if(o=this.parseLinkLabel(),o===0)return 0;if(n=this.subject.slice(0,o),this.peek()===mz)this.pos++;else return this.pos=l,0;if(this.spnl(),i=this.parseLinkDestination(),i===null)return this.pos=l,0;var c=this.pos;this.spnl(),this.pos!==c&&(r=this.parseLinkTitle()),r===null&&(this.pos=c);var a=!0;if(this.match(oo)===null&&(r===null?a=!1:(r=null,this.pos=c,a=this.match(oo)!==null)),!a)return this.pos=l,0;var s=Vs(n);return s===""?(this.pos=l,0):(e[s]||(e[s]={destination:i,title:r===null?"":r}),this.pos-l)},tU=function(t){var e=!1,n=this.peek();if(n===-1)return!1;switch(n){case Es:e=this.parseNewline(t);break;case js:e=this.parseBackslash(t);break;case cz:e=this.parseBackticks(t);break;case gi:case pn:e=this.handleDelim(n,t);break;case Xe:case Ye:e=this.options.smart&&this.handleDelim(n,t);break;case Ls:e=this.parseOpenBracket(t);break;case hz:e=this.parseBang(t);break;case uz:e=this.parseCloseBracket(t);break;case Os:e=this.parseAutolink(t)||this.parseHtmlTag(t);break;case fz:e=this.parseEntity(t);break;default:e=this.parseString(t);break}return e||(this.pos+=1,t.appendChild(_t($i(n)))),!0},eU=function(t){for(this.subject=t._string_content.trim(),this.pos=0,this.delimiters=null,this.brackets=null;this.parseInline(t););t._string_content=null,this.processEmphasis(null)};function nU(t){return{subject:"",delimiters:null,brackets:null,pos:0,refmap:{},match:Ez,peek:Lz,spnl:Oz,parseBackticks:jz,parseBackslash:Pz,parseAutolink:Dz,parseHtmlTag:qz,scanDelims:Bz,handleDelim:Vz,parseLinkTitle:Xz,parseLinkDestination:Yz,parseLinkLabel:zz,parseOpenBracket:Uz,parseBang:Fz,parseCloseBracket:Gz,addBracket:Wz,removeBracket:_z,parseEntity:Kz,parseString:Zz,parseNewline:Qz,parseReference:Jz,parseInline:tU,processEmphasis:Hz,removeDelimiter:Iz,options:t||{},parse:eU}}var bn=4,Is=9,iU=10,Rs=62,rU=60,Hs=32,Xs=91,oU=[/./,/^<(?:script|pre|textarea|style)(?:\s|>|$)/i,/^<!--/,/^<[?]/,/^<![A-Za-z]/,/^<!\[CDATA\[/,/^<[/]?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[123456]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|search|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|[/]?[>]|$)/i,new RegExp("^(?:"+Ns+"|"+Ms+")\\s*$","i")],sU=[/./,/<\/(?:script|pre|textarea|style)>/i,/-->/,/\?>/,/>/,/\]\]>/],lU=/^(?:\*[ \t]*){3,}$|^(?:_[ \t]*){3,}$|^(?:-[ \t]*){3,}$/,aU=/^[#`~*+_=<>0-9-]/,Ys=/[^ \t\f\v\r\n]/,cU=/^[*+-]/,uU=/^(\d{1,9})([.)])/,hU=/^#{1,6}(?:[ \t]+|$)/,fU=/^`{3,}(?!.*`)|^~{3,}/,mU=/^(?:`{3,}|~{3,})(?=[ \t]*$)/,dU=/^(?:=+|-+)[ \t]*$/,gU=/\r\n|\n|\r/,yU=function(t){return!Ys.test(t)},S1=function(t){return t===Hs||t===Is},re=function(t,e){return e<t.length?t.charCodeAt(e):-1},so=function(t){return t.next&&t.sourcepos[1][0]!==t.next.sourcepos[0][0]-1},xU=function(){if(this.partiallyConsumedTab){this.offset+=1;var t=4-this.column%4;this.tip._string_content+=" ".repeat(t)}this.tip._string_content+=this.currentLine.slice(this.offset)+`
|
|
6
|
+
`},vU=function(t,e){for(;!this.blocks[this.tip.type].canContain(t);)this.finalize(this.tip,this.lineNumber-1);var n=e+1,i=new Dt(t,[[this.lineNumber,n],[0,0]]);return i._string_content="",this.tip.appendChild(i),this.tip=i,i},pU=function(t,e){var n=t.currentLine.slice(t.nextNonspace),i,r,o,l,c={type:null,tight:!0,bulletChar:null,start:null,delimiter:null,padding:null,markerOffset:t.indent};if(t.indent>=4)return null;if(i=n.match(cU))c.type="bullet",c.bulletChar=i[0][0];else if((i=n.match(uU))&&(e.type!=="paragraph"||i[1]==1))c.type="ordered",c.start=parseInt(i[1]),c.delimiter=i[2];else return null;if(r=re(t.currentLine,t.nextNonspace+i[0].length),!(r===-1||r===Is||r===Hs)||e.type==="paragraph"&&!t.currentLine.slice(t.nextNonspace+i[0].length).match(Ys))return null;t.advanceNextNonspace(),t.advanceOffset(i[0].length,!0),o=t.column,l=t.offset;do t.advanceOffset(1,!0),r=re(t.currentLine,t.offset);while(t.column-o<5&&S1(r));var a=re(t.currentLine,t.offset)===-1,s=t.column-o;return s>=5||s<1||a?(c.padding=i[0].length+1,t.column=o,t.offset=l,S1(re(t.currentLine,t.offset))&&t.advanceOffset(1,!0)):c.padding=i[0].length+s,c},bU=function(t,e){return t.type===e.type&&t.delimiter===e.delimiter&&t.bulletChar===e.bulletChar},wU=function(){if(!this.allClosed){for(;this.oldtip!==this.lastMatchedContainer;){var t=this.oldtip._parent;this.finalize(this.oldtip,this.lineNumber-1),this.oldtip=t}this.allClosed=!0}},kU=function(t,e){for(var n,i,r=e.walker(),o=[];n=r.next();)if(i=n.node,n.entering&&i.type==="paragraph"){for(var l,c=!1;re(i._string_content,0)===Xs&&(l=t.inlineParser.parseReference(i._string_content,t.refmap));){const a=i._string_content.slice(0,l);i._string_content=i._string_content.slice(l),c=!0;const s=a.split(`
|
|
7
|
+
`);i.sourcepos[0][0]+=s.length-1}c&&yU(i._string_content)&&o.push(i)}for(i of o)i.unlink()},zs={document:{continue:function(){return 0},finalize:function(t,e){kU(t,e)},canContain:function(t){return t!=="item"},acceptsLines:!1},list:{continue:function(){return 0},finalize:function(t,e){for(var n=e._firstChild;n;){if(n._next&&so(n)){e._listData.tight=!1;break}for(var i=n._firstChild;i;){if(i._next&&so(i)){e._listData.tight=!1;break}i=i._next}n=n._next}e.sourcepos[1]=e._lastChild.sourcepos[1]},canContain:function(t){return t==="item"},acceptsLines:!1},block_quote:{continue:function(t){var e=t.currentLine;if(!t.indented&&re(e,t.nextNonspace)===Rs)t.advanceNextNonspace(),t.advanceOffset(1,!1),S1(re(e,t.offset))&&t.advanceOffset(1,!0);else return 1;return 0},finalize:function(){},canContain:function(t){return t!=="item"},acceptsLines:!1},item:{continue:function(t,e){if(t.blank){if(e._firstChild==null)return 1;t.advanceNextNonspace()}else if(t.indent>=e._listData.markerOffset+e._listData.padding)t.advanceOffset(e._listData.markerOffset+e._listData.padding,!0);else return 1;return 0},finalize:function(t,e){e._lastChild?e.sourcepos[1]=e._lastChild.sourcepos[1]:(e.sourcepos[1][0]=e.sourcepos[0][0],e.sourcepos[1][1]=e._listData.markerOffset+e._listData.padding)},canContain:function(t){return t!=="item"},acceptsLines:!1},heading:{continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},thematic_break:{continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},code_block:{continue:function(t,e){var n=t.currentLine,i=t.indent;if(e._isFenced){var r=i<=3&&n.charAt(t.nextNonspace)===e._fenceChar&&n.slice(t.nextNonspace).match(mU);if(r&&r[0].length>=e._fenceLength)return t.lastLineLength=t.offset+i+r[0].length,t.finalize(e,t.lineNumber),2;for(var o=e._fenceOffset;o>0&&S1(re(n,t.offset));)t.advanceOffset(1,!0),o--}else if(i>=bn)t.advanceOffset(bn,!0);else if(t.blank)t.advanceNextNonspace();else return 1;return 0},finalize:function(t,e){if(e._isFenced){var n=e._string_content,i=n.indexOf(`
|
|
8
|
+
`),r=n.slice(0,i),o=n.slice(i+1);e.info=$s(r.trim()),e._literal=o}else{for(var l=e._string_content.split(`
|
|
9
|
+
`);/^[ \t]*$/.test(l[l.length-1]);)l.pop();e._literal=l.join(`
|
|
10
|
+
`)+`
|
|
11
|
+
`,e.sourcepos[1][0]=e.sourcepos[0][0]+l.length-1,e.sourcepos[1][1]=e.sourcepos[0][1]+l[l.length-1].length-1}e._string_content=null},canContain:function(){return!1},acceptsLines:!0},html_block:{continue:function(t,e){return t.blank&&(e._htmlBlockType===6||e._htmlBlockType===7)?1:0},finalize:function(t,e){e._literal=e._string_content.replace(/\n$/,""),e._string_content=null},canContain:function(){return!1},acceptsLines:!0},paragraph:{continue:function(t){return t.blank?1:0},finalize:function(){},canContain:function(){return!1},acceptsLines:!0}},AU=[function(t){return!t.indented&&re(t.currentLine,t.nextNonspace)===Rs?(t.advanceNextNonspace(),t.advanceOffset(1,!1),S1(re(t.currentLine,t.offset))&&t.advanceOffset(1,!0),t.closeUnmatchedBlocks(),t.addChild("block_quote",t.nextNonspace),1):0},function(t){var e;if(!t.indented&&(e=t.currentLine.slice(t.nextNonspace).match(hU))){t.advanceNextNonspace(),t.advanceOffset(e[0].length,!1),t.closeUnmatchedBlocks();var n=t.addChild("heading",t.nextNonspace);return n.level=e[0].trim().length,n._string_content=t.currentLine.slice(t.offset).replace(/^[ \t]*#+[ \t]*$/,"").replace(/[ \t]+#+[ \t]*$/,""),t.advanceOffset(t.currentLine.length-t.offset),2}else return 0},function(t){var e;if(!t.indented&&(e=t.currentLine.slice(t.nextNonspace).match(fU))){var n=e[0].length;t.closeUnmatchedBlocks();var i=t.addChild("code_block",t.nextNonspace);return i._isFenced=!0,i._fenceLength=n,i._fenceChar=e[0][0],i._fenceOffset=t.indent,t.advanceNextNonspace(),t.advanceOffset(n,!1),2}else return 0},function(t,e){if(!t.indented&&re(t.currentLine,t.nextNonspace)===rU){var n=t.currentLine.slice(t.nextNonspace),i;for(i=1;i<=7;i++)if(oU[i].test(n)&&(i<7||e.type!=="paragraph"&&!(!t.allClosed&&!t.blank&&t.tip.type==="paragraph"))){t.closeUnmatchedBlocks();var r=t.addChild("html_block",t.offset);return r._htmlBlockType=i,2}}return 0},function(t,e){var n;if(!t.indented&&e.type==="paragraph"&&(n=t.currentLine.slice(t.nextNonspace).match(dU))){t.closeUnmatchedBlocks();for(var i;re(e._string_content,0)===Xs&&(i=t.inlineParser.parseReference(e._string_content,t.refmap));)e._string_content=e._string_content.slice(i);if(e._string_content.length>0){var r=new Dt("heading",e.sourcepos);return r.level=n[0][0]==="="?1:2,r._string_content=e._string_content,e.insertAfter(r),e.unlink(),t.tip=r,t.advanceOffset(t.currentLine.length-t.offset,!1),2}else return 0}else return 0},function(t){return!t.indented&&lU.test(t.currentLine.slice(t.nextNonspace))?(t.closeUnmatchedBlocks(),t.addChild("thematic_break",t.nextNonspace),t.advanceOffset(t.currentLine.length-t.offset,!1),2):0},function(t,e){var n;return(!t.indented||e.type==="list")&&(n=pU(t,e))?(t.closeUnmatchedBlocks(),(t.tip.type!=="list"||!bU(e._listData,n))&&(e=t.addChild("list",t.nextNonspace),e._listData=n),e=t.addChild("item",t.nextNonspace),e._listData=n,1):0},function(t){return t.indented&&t.tip.type!=="paragraph"&&!t.blank?(t.advanceOffset(bn,!0),t.closeUnmatchedBlocks(),t.addChild("code_block",t.offset),2):0}],SU=function(t,e){for(var n=this.currentLine,i,r,o;t>0&&(o=n[this.offset]);)o===" "?(i=4-this.column%4,e?(this.partiallyConsumedTab=i>t,r=i>t?t:i,this.column+=r,this.offset+=this.partiallyConsumedTab?0:1,t-=r):(this.partiallyConsumedTab=!1,this.column+=i,this.offset+=1,t-=1)):(this.partiallyConsumedTab=!1,this.offset+=1,this.column+=1,t-=1)},CU=function(){this.offset=this.nextNonspace,this.column=this.nextNonspaceColumn,this.partiallyConsumedTab=!1},NU=function(){for(var t=this.currentLine,e=this.offset,n=this.column,i;(i=t.charAt(e))!=="";)if(i===" ")e++,n++;else if(i===" ")e++,n+=4-n%4;else break;this.blank=i===`
|
|
12
|
+
`||i==="\r"||i==="",this.nextNonspace=e,this.nextNonspaceColumn=n,this.indent=this.nextNonspaceColumn-this.column,this.indented=this.indent>=bn},MU=function(t){var e=!0,n,i=this.doc;this.oldtip=this.tip,this.offset=0,this.column=0,this.blank=!1,this.partiallyConsumedTab=!1,this.lineNumber+=1,t.indexOf("\0")!==-1&&(t=t.replace(/\0/g,"\uFFFD")),this.currentLine=t;for(var r;(r=i._lastChild)&&r._open;){switch(i=r,this.findNextNonspace(),this.blocks[i.type].continue(this,i)){case 0:break;case 1:e=!1;break;case 2:return;default:throw"continue returned illegal value, must be 0, 1, or 2"}if(!e){i=i._parent;break}}this.allClosed=i===this.oldtip,this.lastMatchedContainer=i;for(var o=i.type!=="paragraph"&&zs[i.type].acceptsLines,l=this.blockStarts,c=l.length;!o;){if(this.findNextNonspace(),!this.indented&&!aU.test(t.slice(this.nextNonspace))){this.advanceNextNonspace();break}for(var a=0;a<c;){var s=l[a](this,i);if(s===1){i=this.tip;break}else if(s===2){i=this.tip,o=!0;break}else a++}if(a===c){this.advanceNextNonspace();break}}!this.allClosed&&!this.blank&&this.tip.type==="paragraph"?this.addLine():(this.closeUnmatchedBlocks(),n=i.type,this.blocks[n].acceptsLines?(this.addLine(),n==="html_block"&&i._htmlBlockType>=1&&i._htmlBlockType<=5&&sU[i._htmlBlockType].test(this.currentLine.slice(this.offset))&&(this.lastLineLength=t.length,this.finalize(i,this.lineNumber))):this.offset<t.length&&!this.blank&&(i=this.addChild("paragraph",this.offset),this.advanceNextNonspace(),this.addLine())),this.lastLineLength=t.length},TU=function(t,e){var n=t._parent;t._open=!1,t.sourcepos[1]=[e,this.lastLineLength],this.blocks[t.type].finalize(this,t),this.tip=n},$U=function(t){var e,n,i,r=t.walker();for(this.inlineParser.refmap=this.refmap,this.inlineParser.options=this.options;n=r.next();)e=n.node,i=e.type,!n.entering&&(i==="paragraph"||i==="heading")&&this.inlineParser.parse(e)},Us=function(){var t=new Dt("document",[[1,1],[0,0]]);return t},EU=function(t){this.doc=new Us,this.tip=this.doc,this.refmap={},this.lineNumber=0,this.lastLineLength=0,this.offset=0,this.column=0,this.lastMatchedContainer=this.doc,this.currentLine="",this.options.time&&console.time("preparing input");var e=t.split(gU),n=e.length;t.charCodeAt(t.length-1)===iU&&(n-=1),this.options.time&&console.timeEnd("preparing input"),this.options.time&&console.time("block parsing");for(var i=0;i<n;i++)this.incorporateLine(e[i]);for(;this.tip;)this.finalize(this.tip,n);return this.options.time&&console.timeEnd("block parsing"),this.options.time&&console.time("inline parsing"),this.processInlines(this.doc),this.options.time&&console.timeEnd("inline parsing"),this.doc};function Fs(t){return{doc:new Us,blocks:zs,blockStarts:AU,tip:this.doc,oldtip:this.doc,currentLine:"",lineNumber:0,offset:0,column:0,nextNonspace:0,nextNonspaceColumn:0,indent:0,indented:!1,blank:!1,partiallyConsumedTab:!1,allClosed:!0,lastMatchedContainer:this.doc,refmap:{},lastLineLength:0,inlineParser:new nU(t),findNextNonspace:NU,advanceOffset:SU,advanceNextNonspace:CU,addLine:xU,addChild:vU,incorporateLine:MU,finalize:TU,processInlines:$U,closeUnmatchedBlocks:wU,parse:EU,options:t||{}}}function Ue(){}function LU(t){var e=t.walker(),n,i;for(this.buffer="",this.lastOut=`
|
|
13
|
+
`;n=e.next();)i=n.node.type,this[i]&&this[i](n.node,n.entering);return this.buffer}function OU(t){this.buffer+=t,this.lastOut=t}function jU(){this.lastOut!==`
|
|
14
|
+
`&&this.lit(`
|
|
15
|
+
`)}function PU(t){this.lit(t)}function DU(t){return t}Ue.prototype.render=LU;Ue.prototype.out=PU;Ue.prototype.lit=OU;Ue.prototype.cr=jU;Ue.prototype.esc=DU;var qU=/^javascript:|vbscript:|file:|data:/i,BU=/^data:image\/(?:png|gif|jpeg|webp)/i,Gs=function(t){return qU.test(t)&&!BU.test(t)};function VU(t,e,n){if(!(this.disableTags>0)){if(this.buffer+="<"+t,e&&e.length>0)for(var i=0,r;(r=e[i])!==void 0;)this.buffer+=" "+r[0]+'="'+r[1]+'"',i++;n&&(this.buffer+=" /"),this.buffer+=">",this.lastOut=">"}}function Ct(t){t=t||{},t.softbreak=t.softbreak||`
|
|
16
|
+
`,this.esc=t.esc||$n,this.disableTags=0,this.lastOut=`
|
|
17
|
+
`,this.options=t}function IU(t){this.out(t.literal)}function RU(){this.lit(this.options.softbreak)}function HU(){this.tag("br",[],!0),this.cr()}function XU(t,e){var n=this.attrs(t);e?(this.options.safe&&Gs(t.destination)||n.push(["href",this.esc(t.destination)]),t.title&&n.push(["title",this.esc(t.title)]),this.tag("a",n)):this.tag("/a")}function YU(t,e){e?(this.disableTags===0&&(this.options.safe&&Gs(t.destination)?this.lit('<img src="" alt="'):this.lit('<img src="'+this.esc(t.destination)+'" alt="')),this.disableTags+=1):(this.disableTags-=1,this.disableTags===0&&(t.title&&this.lit('" title="'+this.esc(t.title)),this.lit('" />')))}function zU(t,e){this.tag(e?"em":"/em")}function UU(t,e){this.tag(e?"strong":"/strong")}function FU(t,e){var n=t.parent.parent,i=this.attrs(t);n!==null&&n.type==="list"&&n.listTight||(e?(this.cr(),this.tag("p",i)):(this.tag("/p"),this.cr()))}function GU(t,e){var n="h"+t.level,i=this.attrs(t);e?(this.cr(),this.tag(n,i)):(this.tag("/"+n),this.cr())}function WU(t){this.tag("code"),this.out(t.literal),this.tag("/code")}function _U(t){var e=t.info?t.info.split(/\s+/):[],n=this.attrs(t);if(e.length>0&&e[0].length>0){var i=this.esc(e[0]);/^language-/.exec(i)||(i="language-"+i),n.push(["class",i])}this.cr(),this.tag("pre"),this.tag("code",n),this.out(t.literal),this.tag("/code"),this.tag("/pre"),this.cr()}function KU(t){var e=this.attrs(t);this.cr(),this.tag("hr",e,!0),this.cr()}function ZU(t,e){var n=this.attrs(t);e?(this.cr(),this.tag("blockquote",n),this.cr()):(this.cr(),this.tag("/blockquote"),this.cr())}function QU(t,e){var n=t.listType==="bullet"?"ul":"ol",i=this.attrs(t);if(e){var r=t.listStart;r!==null&&r!==1&&i.push(["start",r.toString()]),this.cr(),this.tag(n,i),this.cr()}else this.cr(),this.tag("/"+n),this.cr()}function JU(t,e){var n=this.attrs(t);e?this.tag("li",n):(this.tag("/li"),this.cr())}function tF(t){this.options.safe?this.lit("<!-- raw HTML omitted -->"):this.lit(t.literal)}function eF(t){this.cr(),this.options.safe?this.lit("<!-- raw HTML omitted -->"):this.lit(t.literal),this.cr()}function nF(t,e){e&&t.onEnter?this.lit(t.onEnter):!e&&t.onExit&&this.lit(t.onExit)}function iF(t,e){this.cr(),e&&t.onEnter?this.lit(t.onEnter):!e&&t.onExit&&this.lit(t.onExit),this.cr()}function rF(t){this.lit(this.esc(t))}function oF(t){var e=[];if(this.options.sourcepos){var n=t.sourcepos;n&&e.push(["data-sourcepos",String(n[0][0])+":"+String(n[0][1])+"-"+String(n[1][0])+":"+String(n[1][1])])}return e}Ct.prototype=Object.create(Ue.prototype);Ct.prototype.text=IU;Ct.prototype.html_inline=tF;Ct.prototype.html_block=eF;Ct.prototype.softbreak=RU;Ct.prototype.linebreak=HU;Ct.prototype.link=XU;Ct.prototype.image=YU;Ct.prototype.emph=zU;Ct.prototype.strong=UU;Ct.prototype.paragraph=FU;Ct.prototype.heading=GU;Ct.prototype.code=WU;Ct.prototype.code_block=_U;Ct.prototype.thematic_break=KU;Ct.prototype.block_quote=ZU;Ct.prototype.list=QU;Ct.prototype.item=JU;Ct.prototype.custom_inline=nF;Ct.prototype.custom_block=iF;Ct.prototype.esc=$n;Ct.prototype.out=rF;Ct.prototype.tag=VU;Ct.prototype.attrs=oF;var sF=/\<[^>]*\>/;function lF(t){return t.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase()}function h1(t){t=t||{},this.disableTags=0,this.lastOut=`
|
|
18
|
+
`,this.indentLevel=0,this.indent=" ",this.esc=t.esc||$n,this.options=t}function aF(t){this.buffer="";var e,n,i=t.walker(),r,o,l,c,a,s,u=this.options;for(u.time&&console.time("rendering"),this.buffer+=`<?xml version="1.0" encoding="UTF-8"?>
|
|
19
|
+
`,this.buffer+=`<!DOCTYPE document SYSTEM "CommonMark.dtd">
|
|
20
|
+
`;r=i.next();)if(l=r.entering,o=r.node,s=o.type,c=o.isContainer,a=s==="thematic_break"||s==="linebreak"||s==="softbreak",n=lF(s),l){switch(e=[],s){case"document":e.push(["xmlns","http://commonmark.org/xml/1.0"]);break;case"list":o.listType!==null&&e.push(["type",o.listType.toLowerCase()]),o.listStart!==null&&e.push(["start",String(o.listStart)]),o.listTight!==null&&e.push(["tight",o.listTight?"true":"false"]);var m=o.listDelimiter;if(m!==null){var f="";m==="."?f="period":f="paren",e.push(["delimiter",f])}break;case"code_block":o.info&&e.push(["info",o.info]);break;case"heading":e.push(["level",String(o.level)]);break;case"link":case"image":e.push(["destination",o.destination]),e.push(["title",o.title]);break;case"custom_inline":case"custom_block":e.push(["on_enter",o.onEnter]),e.push(["on_exit",o.onExit]);break}if(u.sourcepos){var h=o.sourcepos;h&&e.push(["sourcepos",String(h[0][0])+":"+String(h[0][1])+"-"+String(h[1][0])+":"+String(h[1][1])])}if(this.cr(),this.out(this.tag(n,e,a)),c)this.indentLevel+=1;else if(!c&&!a){var d=o.literal;d&&this.out(this.esc(d)),this.out(this.tag("/"+n))}}else this.indentLevel-=1,this.cr(),this.out(this.tag("/"+n));return u.time&&console.timeEnd("rendering"),this.buffer+=`
|
|
21
|
+
`,this.buffer}function cF(t){this.disableTags>0?this.buffer+=t.replace(sF,""):this.buffer+=t,this.lastOut=t}function uF(){if(this.lastOut!==`
|
|
22
|
+
`){this.buffer+=`
|
|
23
|
+
`,this.lastOut=`
|
|
24
|
+
`;for(var t=this.indentLevel;t>0;t--)this.buffer+=this.indent}}function hF(t,e,n){var i="<"+t;if(e&&e.length>0)for(var r=0,o;(o=e[r])!==void 0;)i+=" "+o[0]+'="'+this.esc(o[1])+'"',r++;return n&&(i+=" /"),i+=">",i}h1.prototype=Object.create(Ue.prototype);h1.prototype.render=aF;h1.prototype.out=cF;h1.prototype.cr=uF;h1.prototype.tag=hF;h1.prototype.esc=$n;const fF=["text-anchor","font-size"],mF={key:0},C1={__name:"CoreMarkdown",props:{x:{type:Number,default:0},y:{type:Number,default:0},text:null,title:null,size:Number,color:String,stroke:String,linewidth:Number,linetype:String,alpha:{type:Number,default:1},angle:{type:Number,default:0},translateX:{type:Number,default:0},translateY:{type:Number,default:0},anchorX:Number,anchorY:Number,dockX:Number,dockY:Number,fontFamily:String,fontSize:Number,textLength:Number,textAnchor:{type:String,default:"middle"}},setup(t){const e=new Fs,n=Pt("ele"),i=Lt({width:0,height:0});St([n,()=>t.fontSize,()=>t.size,()=>t.text,()=>t.textLength,()=>t.fontFamily],async([l])=>{if(!l)return;await kn();let{width:c,height:a}=l.getBBox();i.width=c,i.height=a});const r=H(()=>{let{width:l,height:c}=i,a=[],s=({start:-.5,end:.5}[t.textAnchor]??0)*l;if(t.dockX!=null||t.dockY!=null){let u={left:0,center:.5,right:1}[t.dockX]??+(t.dockX??.5),m={bottom:0,center:.5,top:1}[t.dockY]??+(t.dockY??.5);isNaN(u)&&(u=.5),isNaN(m)&&(m=.5);let f=l*Math.abs(Math.cos(t.angle*Math.PI/180))+c*Math.abs(Math.sin(t.angle*Math.PI/180)),h=l*Math.abs(Math.sin(t.angle*Math.PI/180))+c*Math.abs(Math.cos(t.angle*Math.PI/180)),d=t.translateX,y=t.translateY;a.push(`translate(${f*(.5-u)+d},${h*(m-.5)+y})`),t.angle&&a.push(`rotate(${t.angle})`),a.push(`translate(${s},${-c/2})`)}else{let u={left:0,center:.5,right:1}[t.anchorX]??+(t.anchorX??.5),m={bottom:0,center:.5,top:1}[t.anchorY]??+(t.anchorY??.5);isNaN(u)&&(u=.5),isNaN(m)&&(m=.5);let f=l,h=c,d=t.translateX*Math.cos(t.angle*Math.PI/180)+t.translateY*Math.sin(t.angle*Math.PI/180),y=t.translateY*Math.cos(t.angle*Math.PI/180)-t.translateX*Math.sin(t.angle*Math.PI/180);t.angle&&a.push(`rotate(${t.angle})`),a.push(`translate(${f*(.5-u)+d+s},${h*(m-.5)+y-c/2})`)}return{x:t.x,y:t.y,fill:t.color||null,"fill-opacity":t.alpha==1?null:t.alpha,stroke:t.stroke||null,"stroke-width":t.linewidth,"stroke-dasharray":Bt(t.linetype).join(" ")||null,"stroke-opacity":t.alpha==1?null:t.alpha,transform:a.join(" ")||null,"font-family":t.fontFamily||null,textLength:t.textLength,lengthAdjust:t.textLength?"spacingAndGlyphs":null,"transform-origin":`${t.x} ${t.y}`}}),o=H(()=>{const l=e.parse(String(t.text)).walker(),c=[];let a=[],s=[1],u=0,m=!0,f;for(;f=l.next();){let{node:{type:h,literal:d},entering:y}=f,v=s.at(-1);if(y){if(h==="text"||h==="code"){let p=u+(m?1:0);const T=Object.assign({x:m?t.x:null,dy:Te(p||null,"em")},...a,{"font-family":h==="code"?"monospace":null,"font-size":v===1?null:`${v}em`});u=0,m=!1,c.push({text:d,vbind:T})}else if(h==="strong")a.push({"font-weight":"bold"});else if(h==="emph")a.push({"font-style":"italic"});else if(h==="softbreak"||h==="paragraph")c.push({text:`
|
|
25
|
+
`}),m=!0;else if(h==="html_inline"){const p=d;if(p.includes("color=")){const T=p.match(/color=(['"])(.*?)\1/i)?.[2]??p.match(/color=(\S*)/)?.[1];T&&a.push({fill:T})}else p.includes("</font>")?a.pop():p.includes("<sup>")?(u-=.4*v,s.push(v*.7)):p.includes("</sup>")?(u+=.4*s.at(-1),s.pop()):p.includes("<sub>")?(u+=.25*v,s.push(v*.7)):p.includes("</sub>")&&(u-=.25*s.at(-1),s.pop())}}else["strong","emph"].includes(h)&&a.pop()}return c});return(l,c)=>(L(),I("text",tt({ref_key:"ele",ref:n},r.value,{"text-anchor":t.textAnchor,"font-size":(t.fontSize??t.size*4)||null}),[t.title?(L(),I("title",mF,qt(t.title),1)):Et("",!0),c[0]||(c[0]=mt()),(L(!0),I(rt,null,at(o.value,a=>(L(),I("tspan",tt({ref_for:!0},a.vbind),qt(a.text),17))),256))],16,fF))}},dF=["transform"],gF=["x2"],yF={class:"vvplot-interactive",fill:"transparent"},xF=["width","cursor"],vF={key:0,class:"vvplot-interactive",fill:"transparent"},pF=["x"],bF={__name:"CoreAxisH",props:{coord:String,ticks:{type:Array,default:()=>[]},title:String,coord2pos:Function,pos2coord:Function,layout:Object,theme:{type:Object,default:()=>({})},action:{type:Array,default:()=>[]},position:null,activeTransform:Object,transition:String},emits:["click","dblclick","contextmenu","pointerdown","pointerup","pointerover","pointerout","pointerenter","pointerleave","pointermove","wheel","singleclick","move","zoom","rescale","nudge","rangechange","update:transition"],setup(t,{emit:e}){const n=H(()=>t.layout.width+t.layout.l+t.layout.r),i=H(()=>t.layout.height+t.layout.t+t.layout.b),r=K1("rangePreview"),o=H(()=>{let g=0,b={bottom:"0%",center:"50%",top:"100%"}[t.position]??t.position;return typeof b=="string"&&b.endsWith("%")?g=i.value*(1-b.slice(0,-1)/100):g=t.activeTransform.translateV+t.coord2pos({v:+b}).v*t.activeTransform.scaleV+t.layout.top,`translate(0, ${g})`}),l=H(()=>{let g=t.theme.title_position??t.theme.tick_position,b=g,k=t.theme.title_dock_x,C=t.theme.title_dock_y,S=0;return typeof g!="number"&&(b={left:0,bottom:.5,top:.5,right:1}[g]??.5,k??={left:1,right:0}[g]??.5,C??={top:0,bottom:1}[g]??.5,S=({top:-1,bottom:1}[g]??0)*(t.theme.title_offset??0)),{x:n.value*b,y:S,angle:t.theme.title_angle,dockX:k,dockY:C,fontSize:t.theme.title_size,text:t.title,fill:t.theme.title_color,"font-family":"sans-serif",...t.theme.title_style}}),c=H(()=>({stroke:t.theme.line_color,"stroke-width":t.theme.line_width,"stroke-dasharray":t.theme.line_dasharray,style:t.theme.line_style})),a=H(()=>{let g=[];for(let b of t.ticks){typeof b=="number"&&(b={position:b});let k=t.coord2pos({h:b.position}).h,C=k*(t.activeTransform.scaleH-1)+t.activeTransform.translateH,S=k+t.layout.l;if(S+C<0||S+C>n.value)continue;let R=(t.theme.tick_position=="top"?-1:1)*(b.length??t.theme.tick_length);g.push({key:"line-"+b.position,y1:0,y2:R,x1:S,x2:S,stroke:b.color??t.theme.tick_color,"stroke-width":b.width??t.theme.tick_width,transform:C?`translate(${C},0)`:null,style:{transition:t.transition}})}return g.filter(b=>b.stroke!=null).sort((b,k)=>b.x1-k.x1)}),s=H(()=>{let g=t.theme.tick_position=="top",b=[];for(let k of t.ticks){typeof k=="number"&&(k={position:k,label:k});let C=t.coord2pos({h:k.position}).h,S=C*(t.activeTransform.scaleH-1)+t.activeTransform.translateH,R=C+t.layout.l;if(R+S<0||R+S>n.value)continue;let q=(g?-1:1)*(k.length??t.theme.tick_length),Y,U,F,V;t.theme.tick_anchor_x!=null||t.theme.tick_anchor_y!=null?(Y=t.theme.tick_anchor_x??.5,U=t.theme.tick_anchor_y??(g?0:1)):(F=t.theme.tick_dock_x??.5,V=t.theme.tick_dock_y??(g?0:1)),b.push({wrapper:{key:"text-"+k.position,transform:S?`translate(${S},0)`:null,style:{transition:t.transition}},text:{x:R,y:q,angle:t.theme.text_angle,anchorX:Y,anchorY:U,dockX:F,dockY:V,text:k.label,title:k.title??k.label,fontSize:k.size??t.theme.label_size,fill:k.color??t.theme.label_color,"font-family":"sans-serif",...t.theme.label_style}})}return b.filter(k=>k.text.fill!=null).sort((k,C)=>k.text.x-C.text.x)}),u=Pt("i");function m(g){let b=u.value.getBoundingClientRect(),k=b.width/u.value.getBBox().width,C=g.clientX-b.left,S=C/k-t.layout.left,R=t.layout.left+t.layout.width-C/k,q={l:S,r:R},{x:Y,y:U}=t.pos2coord({h:S});return Y&&(q.x=Y),U&&(q.y=U),q}const f=e;let h,d=0;function y(g){let b=m(g);f("pointerdown",g,b);let k=!1;function C(V){(Math.abs(V.screenX-g.screenX)>3||Math.abs(V.screenY-g.screenY)>3)&&(k=!0,V.currentTarget.removeEventListener("pointermove",C))}g.target.addEventListener("pointermove",C,{passive:!0}),g.target.addEventListener("pointerup",function(V){if(g.target.removeEventListener("pointermove",C),!k){let X=m(V);f("singleclick",new PointerEvent("singleclick",V),X)}},{once:!0});let S=t.action.find(V=>V.action=="move");if(!S)return;g.preventDefault(),g.stopPropagation(),g.target.style.cursor="grabbing",h=clearTimeout(h);let R=0,q=t.layout.width,Y=t.coord2pos(S),F=u.value.getBoundingClientRect().width/u.value.getBBox().width;g.target.setPointerCapture(g.pointerId),g.target.onpointermove=V=>{if(d+=V.movementX,!k)return;let X=yt(-d/F,{min:Y.hmin-R,max:Y.hmax-q}),{xmin:z,xmax:K,ymin:_,ymax:Z}=t.pos2coord({hmin:R+X,hmax:q+X});Object.assign(r,{xmin:z,xmax:K,ymin:_,ymax:Z})},g.target.onpointerup=V=>{g.target.onpointermove=null,g.target.onpointerup=null,g.target.style.cursor=null,k&&(h=setTimeout(()=>{N(S,V),d=0},300))}}function v(g){let b=t.action.find(z=>z.action=="rescale");if(!b)return;g.preventDefault(),g.stopPropagation();let{"min-range-h":k=0}=b,C=m(g),S=t.coord2pos(C).h,R=S-C.l,q=S+C.r,Y=t.pos2coord({hmin:R,hmax:q}),U={min:t.coord2pos(b).hmin,max:t.coord2pos({hmin:Y.hmax-k,hmax:Y.hmin+k}).hmin},V=u.value.getBoundingClientRect().width/u.value.getBBox().width,X=0;g.target.setPointerCapture(g.pointerId),g.target.onpointermove=z=>{X+=z.movementX;let{xmin:K,xmax:_,ymin:Z,ymax:nt}=t.pos2coord({hmin:yt(q-(q-R)*C.r/Math.max(C.r-X/V,1),U),hmax:q});Object.assign(r,{xmin:K,xmax:_,ymin:Z,ymax:nt})},g.target.onpointerup=z=>{g.target.onpointermove=null,g.target.onpointerup=null,N(b,z)}}function p(g){let b=t.action.find(X=>X.action=="rescale");if(!b)return;g.preventDefault(),g.stopPropagation();let{"min-range-h":k=0}=b,C=m(g),S=t.coord2pos(C).h,R=S-C.l,q=S+C.r,Y=t.pos2coord({hmin:R,hmax:q}),U={min:t.coord2pos({hmin:Y.hmax-k,hmax:Y.hmin+k}).hmax,max:t.coord2pos(b).hmax};u.value.getBoundingClientRect().width/u.value.getBBox().width;let V=0;g.target.setPointerCapture(g.pointerId),g.target.onpointermove=X=>{V+=X.movementX;let{xmin:z,xmax:K,ymin:_,ymax:Z}=t.pos2coord({hmin:R,hmax:yt(R+(q-R)*C.l/Math.max(C.l+V,1),U)});Object.assign(r,{xmin:z,xmax:K,ymin:_,ymax:Z})},g.target.onpointerup=X=>{g.target.onpointermove=null,g.target.onpointerup=null,N(b,X)}}let T=0,A;function O(g){let b=m(g);f("wheel",g,b);let k=t.action.find(C=>["zoom","nudge"].includes(C.action)&&["ctrlKey","shiftKey","altKey","metaKey"].every(S=>C[S]==g[S]));k&&(A=clearTimeout(A),g.preventDefault(),g.stopPropagation(),f("update:transition","transform 0.1s ease-out"),T+=g.deltaY,j(k,b,T),A=setTimeout(()=>{N(k,g),T=0},300))}function j(g,b,k){if(g.action=="zoom"){let{"min-range-h":C=0,sensitivity:S=1.25}=g,R=S**(k/100),q=t.coord2pos(g),Y=Math.max(b.l-Math.max(b.l,0)*R,q.hmin??-1/0),U=Math.min(b.l+Math.max(b.r,0)*R,q.hmax??1/0),{[t.coord+"min"]:F,[t.coord+"max"]:V}=t.pos2coord({hmin:Y,hmax:U});if(R<1&&V-F<C){let X=(V+F)/2;F=X-C/2,V=X+C/2}r[t.coord+"min"]=F,r[t.coord+"max"]=V}if(g.action=="nudge"){let{sensitivity:C=.1}=g,S=t.coord2pos(g),R=0,q=t.layout.width,Y=C*t.layout.width*(-k/120),U=yt(-Y,{min:S.hmin-R,max:S.hmax-q}),{xmin:F,xmax:V,ymin:X,ymax:z}=t.pos2coord({hmin:R+U,hmax:q+U});Object.assign(r,{xmin:F,xmax:V,ymin:X,ymax:z})}}function N(g,b){let k=Xt(r)??{};if(!Object.keys(k).length)return;let C=new PointerEvent(b.type,b);De(g.emit,k,C)||f(g.action,k,C),f("rangechange",k),Object.assign(r,{xmin:void 0,xmax:void 0,ymin:void 0,ymax:void 0})}const M={pointerup(g){f("pointerup",g,m(g))},pointerover(g){f("pointerover",g,m(g))},pointerout(g){f("pointerout",g,m(g))},pointerenter(g){f("pointerenter",g,m(g))},pointerleave(g){f("pointerleave",g,m(g))},dblclick(g){f("dblclick",g,m(g))},click(g){f("click",g,m(g))},contextmenu(g){f("contextmenu",g,m(g))},pointermove(g){f("pointermove",g,m(g))},pointerdown:y,wheel:O};return(g,b)=>(L(),I("g",{transform:o.value,style:N1({transition:t.transition})},[kt("line",tt({ref:"i",x1:0,x2:n.value,y1:0,y2:0},c.value),null,16,gF),b[1]||(b[1]=mt()),(L(!0),I(rt,null,at(a.value,k=>(L(),I("line",tt({ref_for:!0},k),null,16))),256)),b[2]||(b[2]=mt()),(L(!0),I(rt,null,at(s.value,k=>(L(),I("g",tt({ref_for:!0},k.wrapper),[t.theme.label_type=="markdown"?(L(),pt(C1,tt({key:0,ref_for:!0},k.text),null,16)):(L(),pt(c1,tt({key:1,ref_for:!0},k.text),null,16))],16))),256)),b[3]||(b[3]=mt()),kt("g",yF,[kt("rect",tt({width:n.value,height:10,y:-5},zt(M,!0),{cursor:t.action.some?.(k=>k.action=="move")?"grab":null}),null,16,xF)]),b[4]||(b[4]=mt()),t.action.some?.(k=>k.action=="rescale")?(L(),I("g",vF,[kt("rect",{width:20,height:10,y:-5,style:{cursor:"ew-resize"},onPointerdown:v},null,32),b[0]||(b[0]=mt()),kt("rect",{width:20,height:10,y:-5,x:n.value-20,style:{cursor:"ew-resize"},onPointerdown:p},null,40,pF)])):Et("",!0),b[5]||(b[5]=mt()),l.value.text?(L(),I(rt,{key:1},[t.theme.title_type=="markdown"?(L(),pt(C1,oe(tt({key:0},l.value)),null,16)):(L(),pt(c1,oe(tt({key:1},l.value)),null,16))],64)):Et("",!0)],12,dF))}},wF=["transform"],kF=["y2"],AF={class:"vvplot-interactive",fill:"transparent"},SF=["height","cursor"],CF={key:0,class:"vvplot-interactive",fill:"transparent"},NF=["y"],MF={__name:"CoreAxisV",props:{coord:String,ticks:{type:Array,default:()=>[]},title:String,coord2pos:Function,pos2coord:Function,layout:Object,theme:{type:Object,default:()=>({})},action:{type:Array,default:()=>[]},position:null,activeTransform:Object,transition:String},emits:["click","dblclick","contextmenu","pointerdown","pointerup","pointerover","pointerout","pointerenter","pointerleave","pointermove","wheel","singleclick","move","zoom","rescale","nudge","rangechange","update:transition"],setup(t,{emit:e}){const n=H(()=>t.layout.width+t.layout.l+t.layout.r),i=H(()=>t.layout.height+t.layout.t+t.layout.b),r=K1("rangePreview"),o=H(()=>{let g=0,b={left:"0%",center:"50%",right:"100%"}[t.position]??t.position;return typeof b=="string"&&b.endsWith("%")?g=n.value*b.slice(0,-1)/100:g=t.activeTransform.translateH+t.coord2pos({h:+b}).h*t.activeTransform.scaleH+t.layout.left,`translate(${g}, 0)`}),l=H(()=>{let g=t.theme.title_position??t.theme.tick_position,b=g,k=t.theme.title_dock_x,C=t.theme.title_dock_y,S=0;return typeof g!="number"&&(b={bottom:0,left:.5,right:.5,top:1}[g]??.5,k??={left:1,right:0}[g]??.5,C??={top:0,bottom:1}[g]??.5,S=({left:-1,right:1}[g]??0)*(t.theme.title_offset??0)),{x:S,y:i.value*(1-b),angle:t.theme.title_angle,dockX:k,dockY:C,fontSize:t.theme.title_size,text:t.title,fill:t.theme.title_color,"font-family":"sans-serif",...t.theme.title_style}}),c=H(()=>({stroke:t.theme.line_color,"stroke-width":t.theme.line_width,"stroke-dasharray":t.theme.line_dasharray,style:t.theme.line_style})),a=H(()=>{let g=[];for(let b of t.ticks){typeof b=="number"&&(b={position:b});let k=t.coord2pos({v:b.position}).v,C=k*(t.activeTransform.scaleV-1)+t.activeTransform.translateV,S=k+t.layout.t;if(S+C<0||S+C>i.value)continue;let R=(t.theme.tick_position=="right"?1:-1)*(b.length??t.theme.tick_length);g.push({key:"line-"+b.position,y1:S,y2:S,x1:0,x2:R,stroke:b.color??t.theme.tick_color,"stroke-width":b.width??t.theme.tick_width,transform:C?`translate(0,${C})`:null,style:{transition:t.transition}})}return g.filter(b=>b.stroke!=null).sort((b,k)=>b.y1-k.y1)}),s=H(()=>{let g=t.theme.tick_position=="right",b=[];for(let k of t.ticks){typeof k=="number"&&(k={position:k});let C=t.coord2pos({v:k.position}).v,S=C*(t.activeTransform.scaleV-1)+t.activeTransform.translateV,R=C+t.layout.t;if(R+S<0||R+S>i.value)continue;let q=(g?1:-1)*((k.length??t.theme.tick_length)+3),Y,U,F,V;t.theme.tick_anchor_x!=null||t.theme.tick_anchor_y!=null?(Y=t.theme.tick_anchor_x??(g?0:1),U=t.theme.tick_anchor_y??.5):(F=t.theme.tick_dock_x??(g?0:1),V=t.theme.tick_dock_y??.5),b.push({wrapper:{key:"text-"+k.position,transform:S?`translate(0,${S})`:null,style:{transition:t.transition}},text:{y:R,x:q,angle:t.theme.text_angle,anchorX:Y,anchorY:U,dockX:F,dockY:V,text:k.label,title:k.title??k.label,fontSize:k.size??t.theme.label_size,fill:k.color??t.theme.label_color,"font-family":"sans-serif",...t.theme.label_style}})}return b.filter(k=>k.text.fill!=null).sort((k,C)=>k.text.y-C.text.y)}),u=Pt("i");function m(g){let b=u.value.getBoundingClientRect(),k=b.height/u.value.getBBox().height,C=g.clientY-b.top,S=C/k-t.layout.top,R=t.layout.top+t.layout.height-C/k,q={t:S,b:R},{x:Y,y:U}=t.pos2coord({v:S});return Y&&(q.x=Y),U&&(q.y=U),q}const f=e;let h,d=0;function y(g){let b=m(g);f("pointerdown",g,b);let k=!1;function C(V){(Math.abs(V.screenX-g.screenX)>3||Math.abs(V.screenY-g.screenY)>3)&&(k=!0,V.currentTarget.removeEventListener("pointermove",C))}g.target.addEventListener("pointermove",C,{passive:!0}),g.target.addEventListener("pointerup",function(V){if(g.target.removeEventListener("pointermove",C),!k){let X=m(V);f("singleclick",new PointerEvent("singleclick",V),X)}},{once:!0});let S=t.action.find(V=>V.action=="move");if(!S)return;g.preventDefault(),g.stopPropagation(),g.target.style.cursor="grabbing",h=clearTimeout(h);let R=0,q=t.layout.height,Y=t.coord2pos(S),F=u.value.getBoundingClientRect().height/u.value.getBBox().height;g.target.setPointerCapture(g.pointerId),g.target.onpointermove=V=>{if(d+=V.movementY,!k)return;let X=yt(-d/F,{min:Y.vmin-R,max:Y.vmax-q}),{xmin:z,xmax:K,ymin:_,ymax:Z}=t.pos2coord({vmin:R+X,vmax:q+X});Object.assign(r,{xmin:z,xmax:K,ymin:_,ymax:Z})},g.target.onpointerup=V=>{g.target.onpointermove=null,g.target.onpointerup=null,g.target.style.cursor=null,k&&(h=setTimeout(()=>{N(S,V),d=0},300))}}function v(g){let b=t.action.find(z=>z.action=="rescale");if(!b)return;g.preventDefault(),g.stopPropagation();let{"min-range-v":k=0}=b,C=m(g),S=t.coord2pos(C).v,R=S-C.t,q=S+C.b,Y=t.pos2coord({vmin:R,vmax:q}),U={min:t.coord2pos(b).vmin,max:t.coord2pos({vmin:Y.vmax-k,vmax:Y.vmin+k}).vmin},V=u.value.getBoundingClientRect().height/u.value.getBBox().height,X=0;g.target.setPointerCapture(g.pointerId),g.target.onpointermove=z=>{X+=z.movementY;let{xmin:K,xmax:_,ymin:Z,ymax:nt}=t.pos2coord({vmin:yt(q-(q-R)*C.b/Math.max(C.b-X/V,1),U),vmax:q});Object.assign(r,{xmin:K,xmax:_,ymin:Z,ymax:nt})},g.target.onpointerup=z=>{g.target.onpointermove=null,g.target.onpointerup=null,N(b,z)}}function p(g){let b=t.action.find(z=>z.action=="rescale");if(!b)return;g.preventDefault(),g.stopPropagation();let{"min-range-v":k=0}=b,C=m(g),S=t.coord2pos(C).v,R=S-C.t,q=S+C.b,Y=t.pos2coord({vmin:R,vmax:q}),U={min:t.coord2pos({vmin:Y.vmax-k,vmax:Y.vmin+k}).vmax,max:t.coord2pos(b).vmax},V=u.value.getBoundingClientRect().height/u.value.getBBox().height,X=0;g.target.setPointerCapture(g.pointerId),g.target.onpointermove=z=>{X+=z.movementY;let{xmin:K,xmax:_,ymin:Z,ymax:nt}=t.pos2coord({vmin:R,vmax:yt(R+(q-R)*C.t/Math.max(C.t+X/V,1),U)});Object.assign(r,{xmin:K,xmax:_,ymin:Z,ymax:nt})},g.target.onpointerup=z=>{g.target.onpointermove=null,g.target.onpointerup=null,N(b,z)}}let T=0,A;function O(g){let b=m(g);f("wheel",g,b);let k=t.action.find(C=>["zoom","nudge"].includes(C.action)&&["ctrlKey","shiftKey","altKey","metaKey"].every(S=>C[S]==g[S]));k&&(A=clearTimeout(A),g.preventDefault(),g.stopPropagation(),f("update:transition","transform 0.1s ease-out"),T+=g.deltaY,j(k,b,T),A=setTimeout(()=>{N(k,g),T=0},300))}function j(g,b,k){if(g.action=="zoom"){let{"min-range-v":C=0,sensitivity:S=1.25}=g,R=S**(k/100),q=t.coord2pos(g),Y=Math.max(b.t-Math.max(b.t,0)*R,q.vmin??-1/0),U=Math.min(b.t+Math.max(b.b,0)*R,q.vmax??1/0),{[t.coord+"min"]:F,[t.coord+"max"]:V}=t.pos2coord({vmin:Y,vmax:U});if(R<1&&V-F<C){let X=(V+F)/2;F=X-C/2,V=X+C/2}r[t.coord+"min"]=F,r[t.coord+"max"]=V}if(g.action=="nudge"){let{sensitivity:C=.1}=g,S=t.coord2pos(g),R=0,q=t.layout.height,Y=C*t.layout.height*(-k/120),U=yt(-Y,{min:S.vmin-R,max:S.vmax-q}),{xmin:F,xmax:V,ymin:X,ymax:z}=t.pos2coord({vmin:R+U,vmax:q+U});Object.assign(r,{xmin:F,xmax:V,ymin:X,ymax:z})}}function N(g,b){let k=Xt(r)??{};if(!Object.keys(k).length)return;let C=new PointerEvent(b.type,b);De(g.emit,k,C)||f(g.action,k,C),f("rangechange",k),Object.assign(r,{xmin:void 0,xmax:void 0,ymin:void 0,ymax:void 0})}const M={pointerup(g){f("pointerup",g,m(g))},pointerover(g){f("pointerover",g,m(g))},pointerout(g){f("pointerout",g,m(g))},pointerenter(g){f("pointerenter",g,m(g))},pointerleave(g){f("pointerleave",g,m(g))},dblclick(g){f("dblclick",g,m(g))},click(g){f("click",g,m(g))},contextmenu(g){f("contextmenu",g,m(g))},pointermove(g){f("pointermove",g,m(g))},pointerdown:y,wheel:O};return(g,b)=>(L(),I("g",{transform:o.value,style:N1({transition:t.transition})},[kt("line",tt({ref:"i",x1:0,x2:0,y1:0,y2:i.value},c.value),null,16,kF),b[1]||(b[1]=mt()),(L(!0),I(rt,null,at(a.value,k=>(L(),I("line",tt({ref_for:!0},k),null,16))),256)),b[2]||(b[2]=mt()),(L(!0),I(rt,null,at(s.value,k=>(L(),I("g",tt({ref_for:!0},k.wrapper),[t.theme.label_type=="markdown"?(L(),pt(C1,tt({key:0,ref_for:!0},k.text),null,16)):(L(),pt(c1,tt({key:1,ref_for:!0},k.text),null,16))],16))),256)),b[3]||(b[3]=mt()),kt("g",AF,[kt("rect",tt({width:10,height:i.value,x:-5},zt(M,!0),{cursor:t.action.some?.(k=>k.action=="move")?"grab":null}),null,16,SF)]),b[4]||(b[4]=mt()),t.action.some?.(k=>k.action=="rescale")?(L(),I("g",CF,[kt("rect",{width:10,height:20,x:-5,style:{cursor:"ns-resize"},onPointerdown:v},null,32),b[0]||(b[0]=mt()),kt("rect",{width:10,height:20,x:-5,y:i.value-20,style:{cursor:"ns-resize"},onPointerdown:p},null,40,NF)])):Et("",!0),b[5]||(b[5]=mt()),l.value.text?(L(),I(rt,{key:1},[t.theme.title_type=="markdown"?(L(),pt(C1,oe(tt({key:0},l.value)),null,16)):(L(),pt(c1,oe(tt({key:1},l.value)),null,16))],64)):Et("",!0)],12,wF))}},lo={__name:"CoreAxis",props:{theme:{type:Object,default:()=>({})},position:null,orientation:null},setup(t){const e={h:bF,v:MF};return(n,i)=>t.position!="none"?(L(),pt(r1(e[t.orientation]),{key:0,theme:t.theme,position:t.position},null,8,["theme","position"])):Et("",!0)}},TF={__name:"CoreGridH",props:{majorBreaks:{type:Array,default:()=>[]},minorBreaks:{type:Array,default:()=>[]},coord2pos:Function,pos2coord:Function,layout:Object,theme:{type:Object,default:()=>({})},action:{type:Object,default:()=>({})},activeTransform:Object,transition:String},setup(t){const e=H(()=>t.layout.width+t.layout.l+t.layout.r),n=H(()=>t.layout.height+t.layout.t+t.layout.b),i=H(()=>{let l=[];for(let c of t.majorBreaks){let a=t.coord2pos({v:c.position}).v;if(isNaN(a))continue;let s=a*(t.activeTransform.scaleV-1)+t.activeTransform.translateV,u=a+t.layout.t;u+s<0||u+s>n.value||l.push({key:"major-"+c.position,x1:0,x2:e.value,y1:u,y2:u,stroke:c.color??t.theme.line_color_major,"stroke-width":c.width??t.theme.line_width_major??0,transform:s?`translate(0,${s})`:null,style:{transition:t.transition}})}return l.filter(c=>c.stroke!==null)}),r=H(()=>{let l=[];for(let c of t.minorBreaks){if(t.majorBreaks.some(m=>m.position==c.position))continue;let a=t.coord2pos({v:c.position}).v;if(isNaN(a))continue;let s=a*(t.activeTransform.scaleV-1)+t.activeTransform.translateV,u=a+t.layout.t;u+s<0||u+s>n.value||l.push({key:"minor-"+c.position,x1:0,x2:e.value,y1:u,y2:u,stroke:c.color??t.theme.line_color_minor,"stroke-width":c.width??t.theme.line_width_minor??0,transform:s?`translate(0,${s})`:null,style:{transition:t.transition}})}return l.filter(c=>c.stroke!==null)}),o=H(()=>r.value.concat(i.value).sort((l,c)=>l.y1-c.y1));return(l,c)=>(L(),I("g",null,[(L(!0),I(rt,null,at(o.value,a=>(L(),I("line",tt({ref_for:!0},a,{style:{transition:t.transition}}),null,16))),256))]))}},$F={__name:"CoreGridV",props:{majorBreaks:{type:Array,default:()=>[]},minorBreaks:{type:Array,default:()=>[]},coord2pos:Function,pos2coord:Function,layout:Object,theme:{type:Object,default:()=>({})},action:{type:Object,default:()=>({})},activeTransform:Object,transition:String},setup(t){const e=H(()=>t.layout.width+t.layout.l+t.layout.r),n=H(()=>t.layout.height+t.layout.t+t.layout.b),i=H(()=>{let l=[];for(let c of t.majorBreaks){let a=t.coord2pos({h:c.position}).h;if(isNaN(a))continue;let s=a*(t.activeTransform.scaleH-1)+t.activeTransform.translateH,u=a+t.layout.l;u+s<0||u+s>e.value||l.push({key:"major-"+c.position,y1:0,y2:n.value,x1:u,x2:u,stroke:c.color??t.theme.line_color_major,"stroke-width":c.width??t.theme.line_width_major??0,transform:s?`translate(${s},0)`:null,style:{transition:t.transition}})}return l.filter(c=>c.stroke!==null)}),r=H(()=>{let l=[];for(let c of t.minorBreaks){if(t.majorBreaks.some(m=>m.position==c.position))continue;let a=t.coord2pos({h:c.position}).h;if(isNaN(a))continue;let s=a*(t.activeTransform.scaleH-1)+t.activeTransform.translateH,u=a+t.layout.l;u+s<0||u+s>e.value||l.push({key:"minor-"+c.position,y1:0,y2:n.value,x1:u,x2:u,stroke:c.color??t.theme.line_color_minor,"stroke-width":c.width??t.theme.line_width_minor??0,transform:s?`translate(${s},0)`:null,style:{transition:t.transition}})}return l.filter(c=>c.stroke!==null)}),o=H(()=>r.value.concat(i.value).sort((l,c)=>l.x1-c.x1));return(l,c)=>(L(),I("g",null,[(L(!0),I(rt,null,at(o.value,a=>(L(),I("line",tt({ref_for:!0},a,{style:{transition:t.transition}}),null,16))),256))]))}},EF={__name:"CoreCanvasBoxplot",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"],setup(t,{expose:e,emit:n}){let i=["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"];const r=n,o=H(()=>({width:t.layout.fullWidth*(1+t.extendX*2),height:t.layout.fullHeight*(1+t.extendY*2),x:-t.layout.l-t.layout.fullWidth*t.extendX,y:-t.layout.t-t.layout.fullHeight*t.extendY})),l=Pt("container"),c=H(()=>{if(l.value==null)return;const a=document.createElement("canvas");a.width=t.layout.fullWidth*(1+t.extendX*2),a.height=t.layout.fullHeight*(1+t.extendY*2);const s=a.getContext("2d");s.clearRect(0,0,a.width,a.height),s.translate(t.layout.l+t.layout.fullWidth*t.extendX,t.layout.t+t.layout.fullHeight*t.extendY);let u=new Map,m=new Map;for(const f of t.data)for(let{x:h,xmin:d,xmax:y,y:v,ymin:p,ymax:T,lwisker:A,Q1:O,median:j,Q3:N,uwisker:M,outliers:g,$xmin:b,$xmax:k,$ymin:C,$ymax:S,fill:R="white",color:q="black",linewidth:Y=1,linetype:U,alpha:F,"translate-x":V=0,"translate-y":X=0,$raw:z}of f){if(q==="transparent")continue;const{hmin:K,hmax:_,vmin:Z,vmax:nt}=t.coord2pos(h==null?{ymin:p,ymax:T,xmin:O,xmax:N}:{xmin:d,xmax:y,ymin:O,ymax:N}),{h:ut,v:xt}=t.coord2pos(h==null?{y:v,x:A}:{x:h,y:A}),{h:Ut,v:ie}=t.coord2pos(h==null?{y:v,x:M}:{x:h,y:M}),{h:Rt,v:ye}=t.coord2pos(h==null?{y:p,x:j}:{x:d,y:j}),{h:xe,v:E}=t.coord2pos(h==null?{y:T,x:j}:{x:y,y:j}),{h:D,v:B}=t.coord2pos(h==null?{y:p*.25+T*.75,x:M}:{x:d*.25+y*.75,y:M}),{h:x,v:w}=t.coord2pos(h==null?{y:p*.75+T*.25,x:M}:{x:d*.75+y*.25,y:M}),{h:$,v:P}=t.coord2pos(h==null?{y:p*.25+T*.75,x:A}:{x:d*.25+y*.75,y:A}),{h:W,v:G}=t.coord2pos(h==null?{y:p*.75+T*.25,x:A}:{x:d*.75+y*.25,y:A});s.globalAlpha=F,s.setLineDash(Bt(U));const et=new Path2D;et.moveTo(ut+V,xt+X),et.lineTo(Ut+V,ie+X);const it=new Path2D;it.moveTo(D+V,B+X),it.lineTo(x+V,w+X),it.moveTo($+V,P+X),it.lineTo(W+V,G+X),s.lineWidth=Y,q!=="none"&&(s.strokeStyle=q,s.stroke(et),s.stroke(it));const st=new Path2D;st.rect(K+V,Z+X,_-K,nt-Z),R!=="none"&&(s.fillStyle=R,s.fill(st)),q!=null&&(s.strokeStyle=q,s.stroke(st)),u.set(st,z);const bt=new Path2D;bt.moveTo(Rt+V,ye+X),bt.lineTo(xe+V,E+X),s.lineWidth=Y*2,q!=="none"&&(s.strokeStyle=q,s.stroke(bt));for(let{x:vt,y:ct,$raw:lt}of g){const{h:J,v:ot}=t.coord2pos({x:vt,y:ct}),Q=new Path2D;Q.arc(J+V,ot+X,2,0,Math.PI*2),R!=="none"&&(s.fillStyle=q,s.fill(Q)),u.set(Q,lt)}}for(let f of Array.from(u.keys()).reverse())m.set(f,u.get(f));for(let f of i)a.addEventListener(f,function(h){if(h._vhandled)return;const d=a.getBoundingClientRect(),y=(h.clientX-d.left)*a.width/d.width,v=(h.clientY-d.top)*a.height/d.height;for(const[p,T]of m)if(s.isPointInPath(p,y,v)){r(f,h,t.getCoord(h),T),h._vhandled=!0;break}});return a});return St(c,a=>l.value.replaceChildren(a)),e({dispatchEvent:a=>c.value?.dispatchEvent?.(a)}),(a,s)=>(L(),I("foreignObject",tt(o.value,{ref:"container"}),null,16))}},LF={__name:"CoreCanvasCurve",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"],setup(t,{expose:e,emit:n}){let i=["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"];const r=n,o=H(()=>({width:t.layout.fullWidth*(1+t.extendX*2),height:t.layout.fullHeight*(1+t.extendY*2),x:-t.layout.l-t.layout.fullWidth*t.extendX,y:-t.layout.t-t.layout.fullHeight*t.extendY})),l=Pt("container"),c=H(()=>{if(l.value==null)return;const s=document.createElement("canvas");s.width=t.layout.fullWidth*(1+t.extendX*2),s.height=t.layout.fullHeight*(1+t.extendY*2);const u=s.getContext("2d");u.clearRect(0,0,s.width,s.height),u.translate(t.layout.l+t.layout.fullWidth*t.extendX,t.layout.t+t.layout.fullHeight*t.extendY);let m=new Map,f=new Map;for(const h of t.data)for(let{points:d,fill:y="none",color:v="black",linewidth:p,linetype:T,alpha:A,"translate-x":O=0,"translate-y":j=0,$raw:N,interpolate:M}of h){if(d=d.map(C=>(({h:S,v:R})=>({x:S,y:R}))(t.coord2pos(C))).filter(C=>C.x!=null&&C.y!=null),d.length===0)continue;const g=new Path2D;let k=(a[M]??mn)(g);k.lineStart();for(let C=0;C<d.length;C++)k.point(d[C].x+O,d[C].y+j);k.lineEnd(),m.set(g,N),u.lineWidth=p,u.globalAlpha=A,u.setLineDash(Bt(T)),y!=="none"&&(u.fillStyle=y,u.fill(g)),v!=null&&(u.strokeStyle=v,u.stroke(g))}for(let h of Array.from(m.keys()).reverse())f.set(h,m.get(h));for(let h of i)s.addEventListener(h,function(d){if(d._vhandled)return;const y=s.getBoundingClientRect(),v=(d.clientX-y.left)*s.width/y.width,p=(d.clientY-y.top)*s.height/y.height;for(const[T,A]of f)if(u.isPointInPath(T,v,p)){r(h,d,t.getCoord(d),A),d._vhandled=!0;break}});return s});St(c,s=>l.value.replaceChildren(s)),e({dispatchEvent:s=>c.value?.dispatchEvent?.(s)});const a={cardinal:ms,catmullRom:gs,linear:Mi,natural:mn};return(s,u)=>(L(),I("foreignObject",tt(o.value,{ref:"container"}),null,16))}},OF={__name:"CoreCanvasEllipse",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"],setup(t,{expose:e,emit:n}){let i=["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"];const r=n,o=H(()=>({width:t.layout.fullWidth*(1+t.extendX*2),height:t.layout.fullHeight*(1+t.extendY*2),x:-t.layout.l-t.layout.fullWidth*t.extendX,y:-t.layout.t-t.layout.fullHeight*t.extendY})),l=Pt("container"),c=H(()=>{if(l.value==null)return;const a=document.createElement("canvas");a.width=t.layout.fullWidth*(1+t.extendX*2),a.height=t.layout.fullHeight*(1+t.extendY*2);const s=a.getContext("2d");s.clearRect(0,0,a.width,a.height),s.translate(t.layout.l+t.layout.fullWidth*t.extendX,t.layout.t+t.layout.fullHeight*t.extendY);let u=new Map,m=new Map;for(const f of t.data)for(let{cx:h,cy:d,A:y,B:v,C:p,fill:T="none",color:A="black",linewidth:O,linetype:j,alpha:N,"translate-x":M=0,"translate-y":g=0,$raw:b}of f){let k=Math.sqrt(p/(y*p-v*v)),C=Math.sqrt(y/(y*p-v*v));const{h:S,v:R}=t.coord2pos({x:h,y:d});let{hmin:q,hmax:Y,vmin:U,vmax:F}=t.coord2pos({xmin:h-k,xmax:h+k,ymin:d-C,ymax:d+C}),V=(Y-q)/(2*k),X=(F-U)/(2*C);y/=V*V,v/=V*X,p/=X*X;const z=y+p,K=y*p-v*v,_=Math.sqrt(Math.max(0,z*z/4-K));let Z=1/Math.sqrt(z/2+_),nt=1/Math.sqrt(z/2-_),ut=-Math.atan2(2*v,y-p)/2;const xt=new Path2D;xt.ellipse(S+M,R+g,Z,nt,ut,0,2*Math.PI),u.set(xt,b),s.lineWidth=O,s.globalAlpha=N,s.setLineDash(Bt(j)),T!=="none"&&(s.fillStyle=T,s.fill(xt)),A!=null&&(s.strokeStyle=A,s.stroke(xt))}for(let f of Array.from(u.keys()).reverse())m.set(f,u.get(f));for(let f of i)a.addEventListener(f,function(h){if(h._vhandled)return;const d=a.getBoundingClientRect(),y=(h.clientX-d.left)*a.width/d.width,v=(h.clientY-d.top)*a.height/d.height;for(const[p,T]of m)if(s.isPointInPath(p,y,v)){r(f,h,t.getCoord(h),T),h._vhandled=!0;break}});return a});return St(c,a=>l.value.replaceChildren(a)),e({dispatchEvent:a=>c.value?.dispatchEvent?.(a)}),(a,s)=>(L(),I("foreignObject",tt(o.value,{ref:"container"}),null,16))}},ao={__name:"CoreCanvasLine",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"],setup(t,{expose:e,emit:n}){let i=["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"];const r=n,o=H(()=>({width:t.layout.fullWidth*(1+t.extendX*2),height:t.layout.fullHeight*(1+t.extendY*2),x:-t.layout.l-t.layout.fullWidth*t.extendX,y:-t.layout.t-t.layout.fullHeight*t.extendY})),l=Pt("container"),c=H(()=>{if(l.value==null)return;const a=document.createElement("canvas");a.width=t.layout.fullWidth*(1+t.extendX*2),a.height=t.layout.fullHeight*(1+t.extendY*2);const s=a.getContext("2d");s.clearRect(0,0,a.width,a.height),s.translate(t.layout.l+t.layout.fullWidth*t.extendX,t.layout.t+t.layout.fullHeight*t.extendY);let u=new Map,m=new Map;for(const f of t.data)for(let{x:h,y:d,xend:y,yend:v,color:p,linewidth:T,alpha:A,linetype:O,"translate-x":j=0,"translate-y":N=0,$raw:M}of f){if(p==="transparent")continue;const{h:g,v:b}=t.coord2pos({x:h,y:d}),{h:k,v:C}=t.coord2pos({x:y,y:v}),S=new Path2D;S.moveTo(g+j,b+N),S.lineTo(k+j,C+N),u.set(S,M),s.lineWidth=T,s.globalAlpha=A,s.setLineDash(Bt(O)),p!=="none"&&(s.strokeStyle=p,s.stroke(S))}for(let f of Array.from(u.keys()).reverse())m.set(f,u.get(f));for(let f of i)a.addEventListener(f,function(h){if(h._vhandled)return;const d=a.getBoundingClientRect(),y=(h.clientX-d.left)*a.width/d.width,v=(h.clientY-d.top)*a.height/d.height;for(const[p,T]of m)if(s.isPointInPath(p,y,v)){r(f,h,t.getCoord(h),T),h._vhandled=!0;break}});return a});return St(c,a=>l.value.replaceChildren(a)),e({dispatchEvent:a=>c.value?.dispatchEvent?.(a)}),(a,s)=>(L(),I("foreignObject",tt(o.value,{ref:"container"}),null,16))}},jF={__name:"CoreCanvasPoint",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"],setup(t,{expose:e,emit:n}){let i=["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"];const r=n,o={triangle:s=>`M0-${s*2/3}L${s*.577},${s/3}L-${s*.577},${s/3}Z`,diamond:s=>`M0-${s*.707}L${s*.707},0L0,${s*.707}L-${s*.707},0Z`,square:s=>`M-${s/2}-${s/2}H${s/2}V${s/2}H-${s/2}Z`,plus:s=>`M-${s/10}-${s/2}V-${s/10}H-${s/2}V${s/10}H-${s/10}V${s/2}H${s/10}V${s/10}H${s/2}V-${s/10}H${s/10}V-${s/2}H-${s/10}Z`,corss:s=>`M-${s*.283}-${s*.424}L-${s*.424}-${s*.283}L-${s*.141},0L-${s*.424},${s*.283}L-${s*.283},${s*.424}L0,${s*.141}L${s*.283},${s*.424}L${s*.424},${s*.283}L${s*.141},0L${s*.424},-${s*.283}L${s*.283},-${s*.424}L0,-${s*.141}Z`},l=H(()=>({width:t.layout.fullWidth*(1+t.extendX*2),height:t.layout.fullHeight*(1+t.extendY*2),x:-t.layout.l-t.layout.fullWidth*t.extendX,y:-t.layout.t-t.layout.fullHeight*t.extendY})),c=Pt("container"),a=H(()=>{if(c.value==null)return;const s=document.createElement("canvas");s.width=t.layout.fullWidth*(1+t.extendX*2),s.height=t.layout.fullHeight*(1+t.extendY*2);const u=s.getContext("2d");u.clearRect(0,0,s.width,s.height),u.translate(t.layout.l+t.layout.fullWidth*t.extendX,t.layout.t+t.layout.fullHeight*t.extendY);let m=new Map,f=new Map;for(const h of t.data)for(let{x:d,y,size:v=6,shape:p,color:T,stroke:A,linewidth:O,linetype:j,alpha:N,"translate-x":M=0,"translate-y":g=0,$raw:b}of h){const{h:k,v:C}=t.coord2pos({x:d,y}),S=new Path2D;String(p).startsWith("path:")?S.addPath(new Path2D(p.slice(5)),new DOMMatrix().translateSelf(k+M,C+g)):p in o?S.addPath(new Path2D(o[p](v)),new DOMMatrix().translate(k+M,C+g)):S.arc(k+M,C+g,v/2,0,Math.PI*2),m.set(S,b),u.lineWidth=O,u.globalAlpha=N,u.beginPath(),T!=="none"&&(u.fillStyle=T,u.fill(S)),A!=null&&(u.strokeStyle=A,u.setLineDash(Bt(j)),u.stroke(S))}for(let h of Array.from(m.keys()).reverse())f.set(h,m.get(h));for(let h of i)s.addEventListener(h,function(d){if(d._vhandled)return;const y=s.getBoundingClientRect(),v=(d.clientX-y.left)*s.width/y.width,p=(d.clientY-y.top)*s.height/y.height;for(const[T,A]of f)if(u.isPointInPath(T,v,p)){r(h,d,t.getCoord(d),A),d._vhandled=!0;break}});return s});return St(a,s=>c.value.replaceChildren(s)),e({dispatchEvent:s=>a.value?.dispatchEvent?.(s)}),(s,u)=>(L(),I("foreignObject",tt(l.value,{ref:"container"}),null,16))}},PF={__name:"CoreCanvasPolygon",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"],setup(t,{expose:e,emit:n}){let i=["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"];const r=n,o=H(()=>({width:t.layout.fullWidth*(1+t.extendX*2),height:t.layout.fullHeight*(1+t.extendY*2),x:-t.layout.l-t.layout.fullWidth*t.extendX,y:-t.layout.t-t.layout.fullHeight*t.extendY})),l=Pt("container"),c=H(()=>{if(l.value==null)return;const a=document.createElement("canvas");a.width=t.layout.fullWidth*(1+t.extendX*2),a.height=t.layout.fullHeight*(1+t.extendY*2);const s=a.getContext("2d");s.clearRect(0,0,a.width,a.height),s.translate(t.layout.l+t.layout.fullWidth*t.extendX,t.layout.t+t.layout.fullHeight*t.extendY);let u=new Map,m=new Map;for(const f of t.data)for(let{points:h,fill:d,color:y,linewidth:v,linetype:p,alpha:T,"translate-x":A=0,"translate-y":O=0,$raw:j}of f){if(h=h.map(M=>(({h:g,v:b})=>({x:g,y:b}))(t.coord2pos(M))).filter(M=>M.x!=null&&M.y!=null),h.length===0)continue;const N=new Path2D;N.moveTo(h[0].x+A,h[0].y+O);for(let M=1;M<h.length;M++)N.lineTo(h[M].x+A,h[M].y+O);N.closePath(),u.set(N,j),s.lineWidth=v,s.globalAlpha=T,s.setLineDash(Bt(p)),d!=="none"&&(s.fillStyle=d,s.fill(N)),y!=null&&(s.strokeStyle=y,s.stroke(N))}for(let f of Array.from(u.keys()).reverse())m.set(f,u.get(f));for(let f of i)a.addEventListener(f,function(h){if(h._vhandled)return;const d=a.getBoundingClientRect(),y=(h.clientX-d.left)*a.width/d.width,v=(h.clientY-d.top)*a.height/d.height;for(const[p,T]of m)if(s.isPointInPath(p,y,v)){r(f,h,t.getCoord(h),T),h._vhandled=!0;break}});return a});return St(c,a=>l.value.replaceChildren(a)),e({dispatchEvent:a=>c.value?.dispatchEvent?.(a)}),(a,s)=>(L(),I("foreignObject",tt(o.value,{ref:"container"}),null,16))}},co={__name:"CoreCanvasRect",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"],setup(t,{expose:e,emit:n}){let i=["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"];const r=n,o=H(()=>({width:t.layout.fullWidth*(1+t.extendX*2),height:t.layout.fullHeight*(1+t.extendY*2),x:-t.layout.l-t.layout.fullWidth*t.extendX,y:-t.layout.t-t.layout.fullHeight*t.extendY})),l=Pt("container"),c=H(()=>{if(l.value==null)return;const a=document.createElement("canvas");a.width=t.layout.fullWidth*(1+t.extendX*2),a.height=t.layout.fullHeight*(1+t.extendY*2);const s=a.getContext("2d");s.clearRect(0,0,a.width,a.height),s.translate(t.layout.l+t.layout.fullWidth*t.extendX,t.layout.t+t.layout.fullHeight*t.extendY);let u=new Map,m=new Map;for(const f of t.data)for(let{xmin:h,xmax:d,ymin:y,ymax:v,fill:p,color:T,linewidth:A,linetype:O,alpha:j,"translate-x":N=0,"translate-y":M=0,$raw:g}of f){const{hmin:b,hmax:k,vmin:C,vmax:S}=t.coord2pos({xmin:h,xmax:d,ymin:y,ymax:v}),R=new Path2D;R.rect(b+N,C+M,k-b,S-C),u.set(R,g),s.lineWidth=A,s.globalAlpha=j,s.setLineDash(Bt(O)),p!=="none"&&(s.fillStyle=p,s.fill(R)),T!=null&&(s.strokeStyle=T,s.stroke(R))}for(let f of Array.from(u.keys()).reverse())m.set(f,u.get(f));for(let f of i)a.addEventListener(f,function(h){if(h._vhandled)return;const d=a.getBoundingClientRect(),y=(h.clientX-d.left)*a.width/d.width,v=(h.clientY-d.top)*a.height/d.height;for(const[p,T]of m)if(s.isPointInPath(p,y,v)){r(f,h,t.getCoord(h),T),h._vhandled=!0;break}});return a});return St(c,a=>l.value.replaceChildren(a)),e({dispatchEvent:a=>c.value?.dispatchEvent?.(a)}),(a,s)=>(L(),I("foreignObject",tt(o.value,{ref:"container"}),null,16))}},DF={__name:"CoreCanvasText",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"],setup(t,{expose:e,emit:n}){let i=["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"];const r=n,o=H(()=>({width:t.layout.fullWidth*(1+t.extendX*2),height:t.layout.fullHeight*(1+t.extendY*2),x:-t.layout.l-t.layout.fullWidth*t.extendX,y:-t.layout.t-t.layout.fullHeight*t.extendY})),l=Pt("container"),c=H(()=>{if(l.value==null)return;const a=document.createElement("canvas");a.width=t.layout.fullWidth*(1+t.extendX*2),a.height=t.layout.fullHeight*(1+t.extendY*2);const s=a.getContext("2d");s.clearRect(0,0,a.width,a.height),s.translate(t.layout.l+t.layout.fullWidth*t.extendX,t.layout.t+t.layout.fullHeight*t.extendY);let u=new Map,m=new Map;for(const f of t.data)for(let{x:h,y:d,color:y,size:v=4,label:p="",title:T,stroke:A,linewidth:O,linetype:j,alpha:N,"anchor-x":M,"anchor-y":g,"dock-x":b,"dock-y":k,"translate-x":C=0,"translate-y":S=0,angle:R,"text-length":q,"font-family":Y="sans-serif",$raw:U}of f){s.save();const{h:F,v:V}=t.coord2pos({x:h,y:d});s.textAlign="center",s.textBaseline="middle",s.lineWidth=O,s.globalAlpha=N,s.font=`${v*4}px ${Y}`,s.setLineDash(Bt(j)),s.translate(F+C,V+S);let{width:X,fontBoundingBoxAscent:z,fontBoundingBoxDescent:K}=s.measureText(p),_=X,Z=z+K;if(typeof q=="object"){let{x:nt=0,y:ut=0}=q,{h:xt,v:Ut}=t.coord2pos({x:h+nt/2,y:d+ut/2}),{h:ie,v:Rt}=t.coord2pos({x:h-nt/2,y:d-ut/2});_=Math.hypot(xt-ie||0,Ut-Rt||0)}else q!=null&&(_=q);if(b!=null||k!=null){let nt={left:0,center:.5,right:1}[b]??+(b??.5),ut={bottom:0,center:.5,top:1}[k]??+(k??.5);isNaN(nt)&&(nt=.5),isNaN(ut)&&(ut=.5);let xt=_*Math.abs(Math.cos(R*Math.PI/180))+Z*Math.abs(Math.sin(R*Math.PI/180)),Ut=_*Math.abs(Math.sin(R*Math.PI/180))+Z*Math.abs(Math.cos(R*Math.PI/180));s.translate(xt*(.5-nt),Ut*(ut-.5)),s.rotate(R*Math.PI/180)}else{let nt={left:0,center:.5,right:1}[M]??+(M??.5),ut={bottom:0,center:.5,top:1}[g]??+(g??.5);isNaN(nt)&&(nt=.5),isNaN(ut)&&(ut=.5);let xt=_,Ut=Z;s.rotate(R*Math.PI/180),s.translate(xt*(.5-nt),Ut*(ut-.5))}_!=X&&s.scale(_/X,1),y!=="none"&&(s.fillStyle=y,s.fillText(p,0,0)),A!=null&&(s.strokeStyle=A,s.strokeText(p,0,0)),s.restore()}for(let f of Array.from(u.keys()).reverse())m.set(f,u.get(f));for(let f of i)a.addEventListener(f,function(h){if(h._vhandled)return;const d=a.getBoundingClientRect(),y=(h.clientX-d.left)*a.width/d.width,v=(h.clientY-d.top)*a.height/d.height;for(const[p,T]of m)if(s.isPointInPath(p,y,v)){r(f,h,t.getCoord(h),T),h._vhandled=!0;break}});return a});return St(c,a=>l.value.replaceChildren(a)),e({dispatchEvent:a=>c.value?.dispatchEvent?.(a)}),(a,s)=>(L(),I("foreignObject",tt(o.value,{ref:"container"}),null,16))}},qF={__name:"CoreCanvasTextsegment",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"],setup(t,{expose:e,emit:n}){let i=["click","contextmenu","singleclick","dblclick","pointermove","pointerdown","pointerup","wheel"];const r=n,o=H(()=>({width:t.layout.fullWidth*(1+t.extendX*2),height:t.layout.fullHeight*(1+t.extendY*2),x:-t.layout.l-t.layout.fullWidth*t.extendX,y:-t.layout.t-t.layout.fullHeight*t.extendY})),l=Pt("container"),c=H(()=>{if(l.value==null)return;const s=document.createElement("canvas");s.width=t.layout.fullWidth*(1+t.extendX*2),s.height=t.layout.fullHeight*(1+t.extendY*2);const u=s.getContext("2d");u.clearRect(0,0,s.width,s.height),u.translate(t.layout.l+t.layout.fullWidth*t.extendX,t.layout.t+t.layout.fullHeight*t.extendY);let m=new Map,f=new Map;for(const h of t.data)for(let{x:d,xend:y,y:v,yend:p,size:T=4,label:A="",title:O,color:j,stroke:N,linewidth:M,linetype:g,alpha:b,"translate-x":k=0,"translate-y":C=0,"text-length":S,"font-family":R="sans-serif","text-align":q="justify",angle:Y="auto",inset:U=0,$raw:F}of h){const{h:V,v:X}=t.coord2pos({x:d,y:v}),{h:z,v:K}=t.coord2pos({x:y,y:p});if(u.save(),u.translate(k,C),u.textBaseline="middle",u.lineWidth=M,u.globalAlpha=b,u.font=`${T*4}px ${R}`,u.setLineDash(Bt(g)),["stretch","pre","start","center","end","post"].includes(q)){let _=Math.atan2(K-X,z-V),Z=String(A).replace(/\x01|\x02/g,""),nt=Math.cos(_)*U,ut=Math.sin(_)*U;switch(q){case"stretch":case"center":u.translate((V+z)/2,(X+K)/2),u.textAlign="center";break;case"pre":u.translate(V-nt,X-ut),u.textAlign="end";break;case"start":u.translate(V+nt,X+ut),u.textAlign="start";break;case"end":u.translate(z-nt,K-ut),u.textAlign="end";break;case"post":u.translate(z+nt,K+ut),u.textAlign="start";break}u.rotate(_),q==="stretch"&&u.scale(Math.hypot(z-V||0,K-X||0)/u.measureText(Z).width,1),j!=="none"&&(u.fillStyle=j,u.fillText(Z,0,0)),N!=null&&(u.strokeStyle=N,u.strokeText(Z,0,0))}else{let _=Y==="auto"?Math.atan2(K-X,z-V):Y*Math.PI/180;u.textAlign="center";let Z=a(String(A)),nt=(z-V)/(Z.length-1||1),ut=(K-X)/(Z.length-1||1);for(let xt=0;xt<Z.length;xt++){u.save(),u.translate(V+xt*nt,X+xt*ut),u.rotate(_);let Ut=Z[xt];j!=="none"&&(u.fillStyle=j,u.fillText(Ut,0,0)),N!=null&&(u.strokeStyle=N,u.strokeText(Ut,0,0)),u.restore()}}u.restore()}for(let h of Array.from(m.keys()).reverse())f.set(h,m.get(h));for(let h of i)s.addEventListener(h,function(d){if(d._vhandled)return;const y=s.getBoundingClientRect(),v=(d.clientX-y.left)*s.width/y.width,p=(d.clientY-y.top)*s.height/y.height;for(const[T,A]of f)if(u.isPointInPath(T,v,p)){r(h,d,t.getCoord(d),A),d._vhandled=!0;break}});return s});St(c,s=>l.value.replaceChildren(s)),e({dispatchEvent:s=>c.value?.dispatchEvent?.(s)});function a(s){let u=[];for(let m=0;m<s.length;m++)if(s[m]==""){let f=m+1;for(;f<s.length&&s[f]!="";)f++;u.push(s.slice(m+1,f)),m=f}else u.push(s[m]);return u}return(s,u)=>(L(),I("foreignObject",tt(o.value,{ref:"container"}),null,16))}},BF=Object.freeze(Object.defineProperty({__proto__:null,boxplot:EF,curve:LF,ellipse:OF,line:ao,point:jF,polygon:PF,rect:co,stick:ao,text:DF,textsegment:qF,tile:co},Symbol.toStringTag,{value:"Module"})),VF={__name:"CoreSvgBlank",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup"],setup(t,{emit:e}){return(n,i)=>(L(),I("g"))}},IF={key:0},En={__name:"CoreTile",props:{x:{type:Number,default:0},y:{type:Number,default:0},width:{type:Number,default:0},height:{type:Number,default:0},fill:String,color:String,linewidth:Number,linetype:String,alpha:{type:Number,default:1},title:String,translateX:{type:Number,default:0},translateY:{type:Number,default:0}},setup(t){const e=H(()=>({x:t.x-t.width/2,y:t.y-t.height/2,width:t.width,height:t.height,fill:t.fill||null,"fill-opacity":t.alpha==1?null:t.alpha,stroke:t.color||null,"stroke-width":t.linewidth,"stroke-opacity":t.alpha==1?null:t.alpha,"stroke-dasharray":Bt(t.linetype).join(" ")||null,transform:t.translateX||t.translateY?`translate(${t.translateX}, ${t.translateY})`:null}));return(n,i)=>(L(),I("rect",oe(u1(e.value)),[t.title?(L(),I("title",IF,qt(t.title),1)):Et("",!0)],16))}},RF={key:0},HF={key:0},Ei={__name:"CorePoint",props:{x:{type:Number,default:0},y:{type:Number,default:0},shape:String,size:{type:Number,default:6},color:String,stroke:String,linewidth:Number,linetype:String,alpha:{type:Number,default:1},title:String,angle:{type:Number,default:0},translateX:{type:Number,default:0},translateY:{type:Number,default:0}},setup(t){const e={square:"M-0.5-0.5H0.5V0.5H-0.5Z",triangle:"M0-0.667L0.577,0.333L-0.577,0.333Z",diamond:"M0-0.707L0.707,0L0,0.707L-0.707,0Z",plus:"M-0.1-0.5V-0.1H-0.5V0.1H-0.1V0.5H0.1V0.1H0.5V-0.1H0.1V-0.5H-0.1Z",cross:"M-0.283-0.424L-0.424-0.283L-0.141,0L-0.424,0.283L-0.283,0.424L0,0.141L0.283,0.424L0.424,0.283L0.141,0L0.424,-0.283L0.283,-0.424L0,-0.141Z"},n=H(()=>{let i=t.shape?.startsWith?.("path:")?t.shape?.slice?.(5):e[t.shape],r={fill:t.color||null,"fill-opacity":t.alpha==1?null:t.alpha,stroke:t.stroke||null,"stroke-width":t.linewidth,"stroke-opacity":t.alpha==1?null:t.alpha,"stroke-dasharray":Bt(t.linetype).join(" ")||null};if(i!=null){let o=[],l=t.x+t.translateX,c=t.y+t.translateY;(l!==0||c!==0)&&o.push(`translate(${l},${c})`),t.size!=1&&o.push(`scale(${t.size})`),t.angle&&o.push(`rotate(${t.angle})`),Object.assign(r,{d:i,transform:o.join(" ")||null})}else{let o=t.translateX||t.translateY?`translate(${t.translateX}, ${t.translateY})`:null;Object.assign(r,{cx:t.x,cy:t.y,r:t.size/2,transform:o})}return r});return(i,r)=>n.value.d?(L(),I("path",oe(tt({key:0},n.value)),[t.title?(L(),I("title",RF,qt(t.title),1)):Et("",!0)],16)):(L(),I("circle",oe(tt({key:1},n.value)),[t.title?(L(),I("title",HF,qt(t.title),1)):Et("",!0)],16))}},XF={key:0},e1={__name:"CoreLine",props:{x1:{type:Number,default:0},y1:{type:Number,default:0},x2:{type:Number,default:0},y2:{type:Number,default:0},color:String,stroke:String,linewidth:Number,linetype:String,alpha:{type:Number,default:1},title:String,translateX:{type:Number,default:0},translateY:{type:Number,default:0}},setup(t){const e=H(()=>({x1:t.x1,x2:t.x2,y1:t.y1,y2:t.y2,stroke:t.color||null,"stroke-width":t.linewidth,"stroke-opacity":t.alpha==1?null:t.alpha,"stroke-dasharray":Bt(t.linetype).join(" ")||null,transform:t.translateX||t.translateY?`translate(${t.translateX}, ${t.translateY})`:null}));return(n,i)=>(L(),I("line",oe(u1(e.value)),[t.title?(L(),I("title",XF,qt(t.title),1)):Et("",!0)],16))}},YF={__name:"CoreSvgBoxplot",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"],setup(t,{emit:e}){let n=["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"];const i=e,r=H(()=>{let o=-t.layout.fullWidth*t.extendX-t.layout.l,l=t.layout.fullWidth*(1+t.extendX)-t.layout.l,c=-t.layout.fullHeight*t.extendY-t.layout.t,a=t.layout.fullHeight*(1+t.extendY)-t.layout.t;return t.data.map(s=>s.map(({x:u,xmin:m,xmax:f,y:h,ymin:d,ymax:y,lwisker:v,Q1:p,median:T,Q3:A,uwisker:O,outliers:j,$xmin:N,$xmax:M,$ymin:g,$ymax:b,fill:k="white",color:C="black",linewidth:S,linetype:R,alpha:q,title:Y,"translate-x":U=0,"translate-y":F=0,$raw:V})=>{const{hmin:X,hmax:z,vmin:K,vmax:_}=t.coord2pos({xmin:N,xmax:M,ymin:g,ymax:b});if(X<o&&z<o||X>l&&z>l||K<c&&_<c||K>a&&_>a)return null;const{hmin:Z,hmax:nt,vmin:ut,vmax:xt}=t.coord2pos(u==null?{ymin:d,ymax:y,xmin:p,xmax:A}:{xmin:m,xmax:f,ymin:p,ymax:A}),{h:Ut,v:ie}=t.coord2pos(u==null?{y:h,x:v}:{x:u,y:v}),{h:Rt,v:ye}=t.coord2pos(u==null?{y:h,x:O}:{x:u,y:O}),{h:xe,v:E}=t.coord2pos(u==null?{y:d,x:T}:{x:m,y:T}),{h:D,v:B}=t.coord2pos(u==null?{y,x:T}:{x:f,y:T}),{h:x,v:w}=t.coord2pos(u==null?{y:d*.25+y*.75,x:O}:{x:m*.25+f*.75,y:O}),{h:$,v:P}=t.coord2pos(u==null?{y:d*.75+y*.25,x:O}:{x:m*.75+f*.25,y:O}),{h:W,v:G}=t.coord2pos(u==null?{y:d*.25+y*.75,x:v}:{x:m*.25+f*.75,y:v}),{h:et,v:it}=t.coord2pos(u==null?{y:d*.75+y*.25,x:v}:{x:m*.75+f*.25,y:v});let st={rect:{x:(Z+nt)/2,width:nt-Z,y:(ut+xt)/2,height:xt-ut,fill:k,color:C,linetype:R,linewidth:S,alpha:q,title:Y,translateX:U,translateY:F},line:{x1:Ut,y1:ie,x2:Rt,y2:ye,color:C,linetype:R,linewidth:S,alpha:q,translateX:U,translateY:F},midline:{x1:xe,y1:E,x2:D,y2:B,color:C,linetype:R,linewidth:(S??1)*2,alpha:q,translateX:U,translateY:F},uwisker:{x1:x,y1:w,x2:$,y2:P,color:C,linetype:R,linewidth:S,alpha:q,translateX:U,translateY:F},lwisker:{x1:W,y1:G,x2:et,y2:it,color:C,linetype:R,linewidth:S,alpha:q,translateX:U,translateY:F},outliers:j?.map(({x:vt,y:ct,$raw:lt})=>{const{h:J,v:ot}=t.coord2pos({x:vt,y:ct});let Q={x:J,y:ot,shape:"circle",size:4,color:C,alpha:q,translateX:U,translateY:F},ft=Object.fromEntries(n.map(gt=>[gt,Qt=>i(gt,Qt,lt)]));return[Q,ft]})},bt=Object.fromEntries(n.map(vt=>[vt,ct=>i(vt,Object.assign(ct,{_vhandled:!0}),t.getCoord(ct),V)]));return[st,bt]}).filter(u=>u!=null))});return(o,l)=>(L(),I("g",null,[(L(!0),I(rt,null,at(r.value,c=>(L(),I("g",null,[(L(!0),I(rt,null,at(c,([a,s])=>(L(),I("g",null,[$e(e1,tt({ref_for:!0},a.line),null,16),l[0]||(l[0]=mt()),$e(En,tt({ref_for:!0},a.rect,zt(s)),null,16),l[1]||(l[1]=mt()),$e(e1,tt({ref_for:!0},a.midline),null,16),l[2]||(l[2]=mt()),$e(e1,tt({ref_for:!0},a.uwisker),null,16),l[3]||(l[3]=mt()),$e(e1,tt({ref_for:!0},a.lwisker),null,16),l[4]||(l[4]=mt()),(L(!0),I(rt,null,at(a.outliers,([u,m])=>(L(),pt(Ei,tt({ref_for:!0},u,zt(m)),null,16))),256))]))),256))]))),256))]))}},zF={key:0},Ws={__name:"CoreCurve",props:{points:{type:Array,default:()=>[]},interpolate:{default:"natural"},fill:{type:String,default:"none"},color:String,stroke:String,linewidth:Number,linetype:String,alpha:{type:Number,default:1},title:String,translateX:{type:Number,default:0},translateY:{type:Number,default:0}},setup(t){const e=H(()=>{let i=n[t.interpolate]??mn;return{d:X2().curve(i)(t.points.map(r=>[r.x,r.y])),fill:t.fill||null,stroke:t.color||null,"stroke-width":t.linewidth,"stroke-opacity":t.alpha==1?null:t.alpha,"stroke-dasharray":Bt(t.linetype).join(" ")||null,transform:t.translateX||t.translateY?`translate(${t.translateX}, ${t.translateY})`:null}}),n={cardinal:ms,catmullRom:gs,linear:Mi,natural:mn};return(i,r)=>(L(),I("path",oe(u1(e.value)),[t.title?(L(),I("title",zF,qt(t.title),1)):Et("",!0)],16))}},UF={__name:"CoreSvgCurve",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"],setup(t,{emit:e}){let n=["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"];const i=e,r=H(()=>{let o=-t.layout.fullWidth*t.extendX-t.layout.l,l=t.layout.fullWidth*(1+t.extendX)-t.layout.l,c=-t.layout.fullHeight*t.extendY-t.layout.t,a=t.layout.fullHeight*(1+t.extendY)-t.layout.t;return t.data.map(s=>s.map(({points:u,fill:m="none",color:f="black",linewidth:h,linetype:d,alpha:y,title:v,"translate-x":p=0,"translate-y":T=0,$raw:A,interpolate:O})=>{if(u=u.map(M=>(({h:g,v:b})=>({x:g,y:b}))(t.coord2pos(M))),u.every(M=>M.x<o)||u.every(M=>M.x>l)||u.every(M=>M.y<c)||u.every(M=>M.y>a))return null;let j={points:u,fill:m,color:f,linetype:d,linewidth:h,alpha:y,title:v,translateX:p,translateY:T,interpolate:O},N=Object.fromEntries(n.map(M=>[M,g=>i(M,Object.assign(g,{_vhandled:!0}),t.getCoord(g),A)]));return[j,N]}).filter(u=>u!=null))});return(o,l)=>(L(),I("g",null,[(L(!0),I(rt,null,at(r.value,c=>(L(),I("g",null,[(L(!0),I(rt,null,at(c,([a,s])=>(L(),pt(Ws,tt({ref_for:!0},a,zt(s)),null,16))),256))]))),256))]))}},FF={key:0},GF={__name:"CoreEllipse",props:{cx:{type:Number,default:0},cy:{type:Number,default:0},rx:{type:Number,default:0},ry:{type:Number,default:0},angle:{type:Number,default:0},fill:String,color:String,linewidth:Number,linetype:String,alpha:{type:Number,default:1},title:String,translateX:{type:Number,default:0},translateY:{type:Number,default:0}},setup(t){const e=H(()=>{let n=[];return(t.translateX||t.translateY)&&n.push(`translate(${t.translateX}, ${t.translateY})`),t.angle&&n.push(`rotate(${t.angle})`),{cx:t.cx,cy:t.cy,rx:t.rx,ry:t.ry,fill:t.fill||null,"fill-opacity":t.alpha==1?null:t.alpha,stroke:t.color||null,"stroke-width":t.linewidth,"stroke-opacity":t.alpha==1?null:t.alpha,"stroke-dasharray":Bt(t.linetype).join(" ")||null,transform:n.join(" ")||null,"transform-origin":`${t.cx} ${t.cy}`}});return(n,i)=>(L(),I("ellipse",oe(u1(e.value)),[t.title?(L(),I("title",FF,qt(t.title),1)):Et("",!0)],16))}},WF={__name:"CoreSvgEllipse",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"],setup(t,{emit:e}){let n=["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"];const i=e,r=H(()=>{let o=-t.layout.fullWidth*t.extendX-t.layout.l,l=t.layout.fullWidth*(1+t.extendX)-t.layout.l,c=-t.layout.fullHeight*t.extendY-t.layout.t,a=t.layout.fullHeight*(1+t.extendY)-t.layout.t;return t.data.map(s=>s.map(({cx:u,cy:m,A:f,B:h,C:d,fill:y="none",color:v="black",linewidth:p,linetype:T,alpha:A,title:O,"translate-x":j=0,"translate-y":N=0,$raw:M})=>{let g=Math.sqrt(d/(f*d-h*h)),b=Math.sqrt(f/(f*d-h*h));const{h:k,v:C}=t.coord2pos({x:u,y:m});let{hmin:S,hmax:R,vmin:q,vmax:Y}=t.coord2pos({xmin:u-g,xmax:u+g,ymin:m-b,ymax:m+b});if(R<o||S>l||Y<c||q>a)return null;let U=(R-S)/(2*g),F=(Y-q)/(2*b);f/=U*U,h/=U*F,d/=F*F;const V=f+d,X=f*d-h*h,z=Math.sqrt(Math.max(0,V*V/4-X));let K={cx:k,cy:C,rx:1/Math.sqrt(V/2+z)||0,ry:1/Math.sqrt(V/2-z)||0,angle:-Math.atan2(2*h,f-d)/2*180/Math.PI||0,fill:y,color:v,linetype:T,linewidth:p,alpha:A,title:O,translateX:j,translateY:N},_=Object.fromEntries(n.map(Z=>[Z,nt=>i(Z,Object.assign(nt,{_vhandled:!0}),t.getCoord(nt),M)]));return[K,_]}).filter(u=>u!=null))});return(o,l)=>(L(),I("g",null,[(L(!0),I(rt,null,at(r.value,c=>(L(),I("g",null,[(L(!0),I(rt,null,at(c,([a,s])=>(L(),pt(GF,tt({ref_for:!0},a,zt(s)),null,16))),256))]))),256))]))}},uo={__name:"CoreSvgLine",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"],setup(t,{emit:e}){let n=["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"];const i=e,r=H(()=>{let o=-t.layout.fullWidth*t.extendX-t.layout.l,l=t.layout.fullWidth*(1+t.extendX)-t.layout.l,c=-t.layout.fullHeight*t.extendY-t.layout.t,a=t.layout.fullHeight*(1+t.extendY)-t.layout.t;return t.data.map(s=>s.map(({x:u,y:m,xend:f,yend:h,color:d="black",linewidth:y,linetype:v,alpha:p,title:T,"translate-x":A=0,"translate-y":O=0,$raw:j})=>{const{h:N,v:M}=t.coord2pos({x:u,y:m}),{h:g,v:b}=t.coord2pos({x:f,y:h});if(N<o&&g<o||N>l&&g>l||M<c&&b<c||M>a&&b>a)return null;let k={x1:N,x2:g,y1:M,y2:b,color:d,linetype:v,linewidth:y,alpha:p,title:T,translateX:A,translateY:O},C=Object.fromEntries(n.map(S=>[S,R=>i(S,Object.assign(R,{_vhandled:!0}),t.getCoord(R),j)]));return[k,C]}).filter(u=>u!=null))});return(o,l)=>(L(),I("g",null,[(L(!0),I(rt,null,at(r.value,c=>(L(),I("g",null,[(L(!0),I(rt,null,at(c,([a,s])=>(L(),pt(e1,tt({ref_for:!0},a,zt(s)),null,16))),256))]))),256))]))}},_F={__name:"CoreSvgMarkdown",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"],setup(t,{emit:e}){let n=["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"];const i=e,r=H(()=>{let o=-t.layout.fullWidth*t.extendX-t.layout.l,l=t.layout.fullWidth*(1+t.extendX)-t.layout.l,c=-t.layout.fullHeight*t.extendY-t.layout.t,a=t.layout.fullHeight*(1+t.extendY)-t.layout.t;return t.data.map(s=>s.map(({x:u,y:m,size:f=4,label:h,title:d,color:y,stroke:v,linewidth:p,linetype:T,alpha:A,"anchor-x":O,"anchor-y":j,"dock-x":N,"dock-y":M,"translate-x":g=0,"translate-y":b=0,angle:k,"text-length":C,"font-family":S="sans-serif","text-anchor":R,$raw:q})=>{if(h==null)return null;const{h:Y,v:U}=t.coord2pos({x:u,y:m});if(Y<o||Y>l||U<c||U>a)return null;if(typeof C=="object"){let{x:X=0,y:z=0}=C,{h:K,v:_}=t.coord2pos({x:u+X/2,y:m+z/2}),{h:Z,v:nt}=t.coord2pos({x:u-X/2,y:m-z/2});C=Math.hypot(K-Z||0,_-nt||0)}let F={x:Y,y:U,text:String(h),title:String(d??h),size:f,color:y,stroke:v,linetype:T,linewidth:p,alpha:A,angle:k,translateX:g,translateY:b,anchorX:O,anchorY:j,dockX:N,dockY:M,textLength:C,fontFamily:S,textAnchor:R},V=Object.fromEntries(n.map(X=>[X,z=>i(X,Object.assign(z,{_vhandled:!0}),t.getCoord(z),q)]));return[F,V]}).filter(u=>u!=null))});return(o,l)=>(L(),I("g",null,[(L(!0),I(rt,null,at(r.value,c=>(L(),I("g",null,[(L(!0),I(rt,null,at(c,([a,s])=>(L(),pt(C1,tt({ref_for:!0},a,zt(s)),null,16))),256))]))),256))]))}},KF={__name:"CoreSvgMarkdownsegment",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"],setup(t,{emit:e}){let n=["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"];const i=e,r=H(()=>{let c=-t.layout.fullWidth*t.extendX-t.layout.l,a=t.layout.fullWidth*(1+t.extendX)-t.layout.l,s=-t.layout.fullHeight*t.extendY-t.layout.t,u=t.layout.fullHeight*(1+t.extendY)-t.layout.t;return t.data.map(m=>m.map(({x:f,xend:h,y:d,yend:y,size:v=4,label:p,title:T,color:A,stroke:O,linewidth:j,linetype:N,alpha:M,"translate-x":g=0,"translate-y":b=0,"font-family":k="sans-serif","text-align":C="start",inset:S=0,$raw:R})=>{if(p==null)return null;const{h:q,v:Y}=t.coord2pos({x:f,y:d}),{h:U,v:F}=t.coord2pos({x:h,y});if(q<c&&U<c||q>a&&U>a||Y<s&&F<s||Y>u&&F>u)return null;let V=Math.atan2(F-Y,U-q),X={fill:A,"font-size":v*4,stroke:O,"stroke-width":j,"stroke-dasharray":Bt(N).join(" ")||null,"fill-opacity":M,"stroke-opacity":M,"font-family":k},z=Object.fromEntries(n.map(ut=>[ut,xt=>i(ut,Object.assign(xt,{_vhandled:!0}),t.getCoord(xt),R)])),K,_,Z=l(String(p));switch(C){case"stretch":K=(q+U)/2,_=(Y+F)/2,X["text-anchor"]="middle",X.textLength=Math.hypot(U-q||0,F-Y||0),X.lengthAdjust="spacingAndGlyphs";break;case"center":K=(q+U)/2,_=(Y+F)/2,X["text-anchor"]="middle";break;case"pre":K=q,_=Y,g-=Math.cos(V)*S,b-=Math.sin(V)*S,X["text-anchor"]="end";break;case"end":K=U,_=F,g-=Math.cos(V)*S,b-=Math.sin(V)*S,X["text-anchor"]="end";break;case"post":K=U,_=F,g+=Math.cos(V)*S,b+=Math.sin(V)*S,X["text-anchor"]="start";break;default:K=q,_=Y,g+=Math.cos(V)*S,b+=Math.sin(V)*S,X["text-anchor"]="start"}let nt=[];return(g||b)&&nt.push(`translate(${g}, ${b})`),V&&nt.push(`rotate(${V*180/Math.PI})`),Object.assign(X,{x:K,y:_,"dominant-baseline":"central","transform-origin":`${K} ${_}`,transform:nt.join(" ")||null}),[X,z,Z,String(T??String(p).replace(/\x01|\x02/g,""))]}).filter(f=>f!=null))}),o=new Fs;function l(c){const a=o.parse(c).walker(),s=[];let u=[],m=[1],f=0,h;for(;h=a.next();){let{node:{type:d,literal:y},entering:v}=h,p=m.at(-1);if(v){if(d==="text"||d==="code"){const T=Object.assign({dy:Te(f||null,"em")},...u,{"font-family":d==="code"?"monospace":null,"font-size":p===1?null:`${p}em`});f=0,s.push({text:y,vbind:T})}else if(d==="strong")u.push({"font-weight":"bold"});else if(d==="emph")u.push({"font-style":"italic"});else if(d==="softbreak"||d==="paragraph")s.push({text:" "});else if(d==="html_inline"){const T=y;if(T.includes("color=")){const A=T.match(/color=(['"])(.*?)\1/i)?.[2]??T.match(/color=(\S*)/)?.[1];A&&u.push({fill:A})}else T.includes("</font>")?u.pop():T.includes("<sup>")?(f-=.4*p,m.push(p*.7)):T.includes("</sup>")?(f+=.4*m.at(-1),m.pop()):T.includes("<sub>")?(f+=.25*p,m.push(p*.7)):T.includes("</sub>")&&(f-=.25*m.at(-1),m.pop())}}else["strong","emph"].includes(d)&&u.pop()}return s}return(c,a)=>(L(),I("g",null,[(L(!0),I(rt,null,at(r.value,s=>(L(),I("g",null,[(L(!0),I(rt,null,at(s,([u,m,f,h])=>(L(),I("text",tt({ref_for:!0},u,zt(m,!0)),[kt("title",null,qt(h),1),a[0]||(a[0]=mt()),(L(!0),I(rt,null,at(f,d=>(L(),I("tspan",tt({ref_for:!0},d.vbind),qt(d.text),17))),256))],16))),256))]))),256))]))}},ZF={__name:"CoreSvgPoint",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"],setup(t,{emit:e}){let n=["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"];const i=e,r=H(()=>{let o=-t.layout.fullWidth*t.extendX-t.layout.l,l=t.layout.fullWidth*(1+t.extendX)-t.layout.l,c=-t.layout.fullHeight*t.extendY-t.layout.t,a=t.layout.fullHeight*(1+t.extendY)-t.layout.t;return t.data.map(s=>s.map(({x:u,y:m,shape:f,size:h=6,color:d,stroke:y,linetype:v,linewidth:p,alpha:T,title:A,"translate-x":O=0,"translate-y":j=0,angle:N,$raw:M})=>{const{h:g,v:b}=t.coord2pos({x:u,y:m});if(g<o||g>l||b<c||b>a)return null;let k={x:g,y:b,shape:f,size:h,color:d,stroke:y,linetype:v,linewidth:p,alpha:T,title:A,angle:N,translateX:O,translateY:j},C=Object.fromEntries(n.map(S=>[S,R=>i(S,Object.assign(R,{_vhandled:!0}),t.getCoord(R),M)]));return[k,C]}).filter(u=>u!=null))});return(o,l)=>(L(),I("g",null,[(L(!0),I(rt,null,at(r.value,c=>(L(),I("g",null,[(L(!0),I(rt,null,at(c,([a,s])=>(L(),pt(Ei,tt({ref_for:!0},a,zt(s)),null,16))),256))]))),256))]))}},QF={key:0},_s={__name:"CorePolygon",props:{points:{type:Array,default:()=>[]},fill:String,color:String,linewidth:Number,linetype:String,alpha:{type:Number,default:1},title:String,translateX:{type:Number,default:0},translateY:{type:Number,default:0}},setup(t){const e=H(()=>({points:t.points.map(n=>`${n.x},${n.y}`).join(" "),fill:t.fill||null,"fill-opacity":t.alpha==1?null:t.alpha,stroke:t.color||null,"stroke-width":t.linewidth,"stroke-opacity":t.alpha==1?null:t.alpha,"stroke-dasharray":Bt(t.linetype).join(" ")||null,transform:t.translateX||t.translateY?`translate(${t.translateX}, ${t.translateY})`:null}));return(n,i)=>(L(),I("polygon",oe(u1(e.value)),[t.title?(L(),I("title",QF,qt(t.title),1)):Et("",!0)],16))}},JF={__name:"CoreSvgPolygon",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"],setup(t,{emit:e}){let n=["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"];const i=e,r=H(()=>{let o=-t.layout.fullWidth*t.extendX-t.layout.l,l=t.layout.fullWidth*(1+t.extendX)-t.layout.l,c=-t.layout.fullHeight*t.extendY-t.layout.t,a=t.layout.fullHeight*(1+t.extendY)-t.layout.t;return t.data.map(s=>s.map(({points:u,fill:m,color:f,linewidth:h,linetype:d,alpha:y,title:v,"translate-x":p=0,"translate-y":T=0,$raw:A})=>{if(u=u.map(N=>(({h:M,v:g})=>({x:M,y:g}))(t.coord2pos(N))),u.every(N=>N.x<o)||u.every(N=>N.x>l)||u.every(N=>N.y<c)||u.every(N=>N.y>a))return null;let O={points:u,fill:m,color:f,linewidth:h,linetype:d,alpha:y,title:v,translateX:p,translateY:T},j=Object.fromEntries(n.map(N=>[N,M=>i(N,Object.assign(M,{_vhandled:!0}),t.getCoord(M),A)]));return[O,j]}).filter(u=>u!=null))});return(o,l)=>(L(),I("g",null,[(L(!0),I(rt,null,at(r.value,c=>(L(),I("g",null,[(L(!0),I(rt,null,at(c,([a,s])=>(L(),pt(_s,tt({ref_for:!0},a,zt(s)),null,16))),256))]))),256))]))}},ho={__name:"CoreSvgRect",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"],setup(t,{emit:e}){let n=["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"];const i=e,r=H(()=>{let o=-t.layout.fullWidth*t.extendX-t.layout.l,l=t.layout.fullWidth*(1+t.extendX)-t.layout.l,c=-t.layout.fullHeight*t.extendY-t.layout.t,a=t.layout.fullHeight*(1+t.extendY)-t.layout.t;return t.data.map(s=>s.map(({xmin:u,xmax:m,ymin:f,ymax:h,fill:d="black",color:y,linewidth:v,linetype:p,alpha:T,title:A,"translate-x":O=0,"translate-y":j=0,$raw:N})=>{const{hmin:M,hmax:g,vmin:b,vmax:k}=t.coord2pos({xmin:u,xmax:m,ymin:f,ymax:h});if(M<o&&g<o||M>l&&g>l||b<c&&k<c||b>a&&k>a)return null;let C={x:(M+g)/2,width:g-M,y:(b+k)/2,height:k-b,fill:d,color:y,linetype:p,linewidth:v,alpha:T,title:A,translateX:O,translateY:j},S=Object.fromEntries(n.map(R=>[R,q=>i(R,Object.assign(q,{_vhandled:!0}),t.getCoord(q),N)]));return[C,S]}).filter(u=>u!=null))});return(o,l)=>(L(),I("g",null,[(L(!0),I(rt,null,at(r.value,c=>(L(),I("g",null,[(L(!0),I(rt,null,at(c,([a,s])=>(L(),pt(En,tt({ref_for:!0},a,zt(s)),null,16))),256))]))),256))]))}},tG={__name:"CoreSvgText",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"],setup(t,{emit:e}){let n=["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"];const i=e,r=H(()=>{let o=-t.layout.fullWidth*t.extendX-t.layout.l,l=t.layout.fullWidth*(1+t.extendX)-t.layout.l,c=-t.layout.fullHeight*t.extendY-t.layout.t,a=t.layout.fullHeight*(1+t.extendY)-t.layout.t;return t.data.map(s=>s.map(({x:u,y:m,size:f=4,label:h,title:d,color:y,stroke:v,linewidth:p,linetype:T,alpha:A,"anchor-x":O,"anchor-y":j,"dock-x":N,"dock-y":M,"translate-x":g=0,"translate-y":b=0,angle:k,"text-length":C,"font-family":S,"text-anchor":R,$raw:q})=>{if(h==null)return null;const{h:Y,v:U}=t.coord2pos({x:u,y:m});if(Y<o||Y>l||U<c||U>a)return null;if(typeof C=="object"){let{x:X=0,y:z=0}=C,{h:K,v:_}=t.coord2pos({x:u+X/2,y:m+z/2}),{h:Z,v:nt}=t.coord2pos({x:u-X/2,y:m-z/2});C=Math.hypot(K-Z||0,_-nt||0)}let F={x:Y,y:U,text:String(h),title:String(d??h),size:f,color:y,stroke:v,linetype:T,linewidth:p,alpha:A,angle:k,translateX:g,translateY:b,anchorX:O,anchorY:j,dockX:N,dockY:M,textLength:C,fontFamily:S,textAnchor:R},V=Object.fromEntries(n.map(X=>[X,z=>i(X,Object.assign(z,{_vhandled:!0}),t.getCoord(z),q)]));return[F,V]}).filter(u=>u!=null))});return(o,l)=>(L(),I("g",null,[(L(!0),I(rt,null,at(r.value,c=>(L(),I("g",null,[(L(!0),I(rt,null,at(c,([a,s])=>(L(),pt(c1,tt({ref_for:!0},a,zt(s)),null,16))),256))]))),256))]))}},eG={__name:"CoreSvgTextsegment",props:{extendX:{type:Number,default:0},extendY:{type:Number,default:0},data:Object,coord2pos:Function,getCoord:Function,layout:Object},emits:["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"],setup(t,{emit:e}){let n=["click","contextmenu","singleclick","pointerover","pointerout","pointerenter","pointerleave","pointermove","pointerdown","pointerup","wheel"];const i=e,r=H(()=>{let l=-t.layout.fullWidth*t.extendX-t.layout.l,c=t.layout.fullWidth*(1+t.extendX)-t.layout.l,a=-t.layout.fullHeight*t.extendY-t.layout.t,s=t.layout.fullHeight*(1+t.extendY)-t.layout.t;return t.data.map(u=>u.map(({x:m,xend:f,y:h,yend:d,size:y=4,label:v,title:p,color:T,stroke:A,linewidth:O,linetype:j,alpha:N,"translate-x":M=0,"translate-y":g=0,"font-family":b="sans-serif","text-align":k="justify",angle:C="auto",inset:S=0,$raw:R})=>{if(v==null)return null;const{h:q,v:Y}=t.coord2pos({x:m,y:h}),{h:U,v:F}=t.coord2pos({x:f,y:d});if(q<l&&U<l||q>c&&U>c||Y<a&&F<a||Y>s&&F>s)return null;let V={fill:T,"font-size":y*4,stroke:A,"stroke-width":O,"stroke-dasharray":Bt(j).join(" ")||null,"fill-opacity":N,"stroke-opacity":N,"font-family":b},X=Object.fromEntries(n.map(z=>[z,K=>i(z,Object.assign(K,{_vhandled:!0}),t.getCoord(K),R)]));if(["stretch","pre","start","center","end","post"].includes(k)){let z=Math.atan2(F-Y,U-q),K,_,Z=String(v).replace(/\x01|\x02/g,""),nt=Math.cos(z)*S,ut=Math.sin(z)*S;switch(k){case"stretch":K=(q+U)/2,_=(Y+F)/2,V["text-anchor"]="middle",V.textLength=Math.hypot(U-q||0,F-Y||0),V.lengthAdjust="spacingAndGlyphs";break;case"center":K=(q+U)/2,_=(Y+F)/2,V["text-anchor"]="middle";break;case"pre":K=q,_=Y,M-=nt,g-=ut,V["text-anchor"]="end";break;case"start":K=q,_=Y,M+=nt,g+=ut,V["text-anchor"]="start";break;case"end":K=U,_=F,M-=nt,g-=ut,V["text-anchor"]="end";break;case"post":K=U,_=F,M+=nt,g+=ut,V["text-anchor"]="start";break}let xt=[];return(M||g)&&xt.push(`translate(${M}, ${g})`),z&&xt.push(`rotate(${z*180/Math.PI})`),Object.assign(V,{x:K,y:_,"dominant-baseline":"central","transform-origin":`${K} ${_}`,transform:xt.join(" ")||null}),[V,X,Z,String(p??String(v).replace(/\x01|\x02/g,""))]}else{C==="auto"&&(C=Math.atan2(F-Y,U-q)*180/Math.PI);let z=o(String(v)),K=(U-q)/(z.length-1||1),_=(F-Y)/(z.length-1||1),Z=z.map((nt,ut)=>[{x:q+ut*K,y:Y+ut*_,"text-anchor":"middle","dominant-baseline":"central",rotate:C},nt]);return(M||g)&&(V.transform=`translate(${M}, ${g})`),[V,X,Z,String(p??String(v).replace(/\x01|\x02/g,""))]}}).filter(m=>m!=null))});function o(l){let c=[];for(let a=0;a<l.length;a++)if(l[a]==""){let s=a+1;for(;s<l.length&&l[s]!="";)s++;c.push(l.slice(a+1,s)),a=s}else c.push(l[a]);return c}return(l,c)=>(L(),I("g",null,[(L(!0),I(rt,null,at(r.value,a=>(L(),I("g",null,[(L(!0),I(rt,null,at(a,([s,u,m,f])=>(L(),I("text",tt({ref_for:!0},s,zt(u,!0)),[kt("title",null,qt(f),1),c[0]||(c[0]=mt()),typeof m=="string"?(L(),I(rt,{key:0},[mt(qt(m.replace(/ /g,"\xA0")),1)],64)):(L(!0),I(rt,{key:1},at(m,([h,d])=>(L(),I(rt,null,[d?(L(),I("tspan",tt({key:0,ref_for:!0},h),qt(d),17)):Et("",!0)],64))),256))],16))),256))]))),256))]))}},nG=Object.freeze(Object.defineProperty({__proto__:null,blank:VF,boxplot:YF,curve:UF,ellipse:WF,line:uo,markdown:_F,markdownsegment:KF,point:ZF,polygon:JF,rect:ho,stick:uo,text:tG,textsegment:eG,tile:ho},Symbol.toStringTag,{value:"Module"})),iG={__name:"CoreLayer",props:{data:Object,geom:String,render:String,defaultRender:{type:String,default:"auto"}},setup(t,{expose:e}){const n={svg:nG,canvas:BF},i=H(()=>{let l=t.render??t.defaultRender;return l=="auto"?t.data.map(a=>a.length).reduce((a,s)=>a+s,0)>1e3?"canvas":"svg":n[l][t.geom]!=null?l:"svg"}),r=Pt("layer"),o=H(()=>i.value=="canvas"?"pointer-events: none;":"");return e({render:i,dispatchEvent:l=>r.value?.dispatchEvent?.(l)}),(l,c)=>(L(),pt(r1(n[i.value][t.geom]),{ref_key:"layer",ref:r,style:N1(o.value),data:t.data},null,8,["style","data"]))}},rG={key:0},oG=["onPointerdown"],fo={__name:"CoreSelection",props:o1({coord2pos:Function,pos2coord:Function,layout:Object,theme:Object,flip:Boolean,move:Boolean,resize:Boolean,dismissible:Boolean,xmin:Number,xmax:Number,ymin:Number,ymax:Number,x:Boolean,y:Boolean,minRangeX:Number,minRangeY:Number,ctrlKey:Boolean,shiftKey:Boolean,altKey:Boolean,metaKey:Boolean,buttons:Number,activeTransform:Object,transition:String},{modelValue:{default:()=>({})},modelModifiers:{}}),emits:o1(["select","selecting","selectend","click","contextmenu"],["update:modelValue"]),setup(t,{emit:e}){const n=ke(t,"modelValue"),i=xo(t,["coord2pos","pos2coord","layout","theme","flip","activeTransform","transition"]),r=H(()=>{if(n.value==null||n.value.hidden||["xmin","xmax","ymin","ymax"].every(v=>n.value?.[v]==null))return null;let{hmin:m,hmax:f,vmin:h,vmax:d}=t.coord2pos(n.value,{limited:!0}),y=t.coord2pos(n.value);return m!=null&&f!=null&&([m,f]=[m,f].sort((v,p)=>v-p)),h!=null&&d!=null&&([h,d]=[h,d].sort((v,p)=>v-p)),{hmin:m,hmax:f,vmin:h,vmax:d,pos:y}}),o=H(()=>{if(!r.value)return null;let{translateH:m,translateV:f,scaleH:h,scaleV:d}=t.activeTransform,{hmin:y,hmax:v,vmin:p,vmax:T,pos:A}=r.value,O=v-y,j=T-p,N=t.layout.left,M=t.layout.top,g=1,b=1;if(A.hmin!=null&&A.hmax!=null)N+=m,g=h;else if(A.hmin!=null){let C=m+y*(h-1);g=1-C/O,N+=C*(1+y/O)}else if(A.hmax!=null){let C=m+v*(h-1);g=1+C/O,N+=C*(1-v/O)}if(A.vmin!=null&&A.vmax!=null)M+=t.activeTransform.translateV,b=t.activeTransform.scaleV;else if(A.vmin!=null){let C=f+p*(d-1);b=1-C/j,M+=C*(1+p/j)}else if(A.vmax!=null){let C=f+T*(d-1);b=1+C/j,M+=C*(1-T/j)}let k=[];return(N!=0||M!=0)&&k.push(`translate(${N}, ${M})`),(g!=1||b!=1)&&k.push(`scale(${g}, ${b})`),k.join(" ")||null}),l=H(()=>t.activeTransform.translateH!=0||t.activeTransform.translateV!=0||t.activeTransform.scaleH!=1||t.activeTransform.scaleV!=1),c=H(()=>{if(!r.value)return null;let{hmin:m,hmax:f,vmin:h,vmax:d,pos:y}=r.value,v=t.theme?.line_width??1;y.hmin==null&&(m-=v/2),y.hmax==null&&(f+=v/2),y.vmin==null&&(h-=v/2),y.vmax==null&&(d+=v/2);let p=f-m,T=d-h;return{x:m,y:h,width:p,height:T,fill:t.theme?.background??"transparent","fill-opacity":t.theme?.opacity,stroke:t.theme?.line_color??"none","stroke-width":t.theme?.line_width,"stroke-opacity":t.theme?.opacity,transform:o.value,style:{transition:t.transition,"pointer-events":"none"}}}),a=H(()=>{if(!r.value||l.value)return null;let m=10,{hmin:f,hmax:h,vmin:d,vmax:y,pos:v}=r.value,p=h-f,T=y-d,A={};i.move&&(A.tblr={x:f,y:d,width:p,height:T,fill:"transparent",style:"cursor:move;"}),i.resize&&(v.hmin!=null&&(A.l={x:f-m/2,y:d,width:m,height:T,style:"cursor:ew-resize;",class:"vvplot-interactive"}),v.hmax!=null&&(A.r={x:h-m/2,y:d,width:m,height:T,style:"cursor:ew-resize;"}),v.vmin!=null&&(A.t={x:f,y:d-m/2,width:p,height:m,style:"cursor:ns-resize;"}),v.vmax!=null&&(A.b={x:f,y:y-m/2,width:p,height:m,style:"cursor:ns-resize;"}),v.hmin!=null&&v.vmin!=null&&(A.tl={x:f-m/2,y:d-m/2,width:m,height:m,style:"cursor:nwse-resize;"}),v.hmax!=null&&v.vmin!=null&&(A.tr={x:h-m/2,y:d-m/2,width:m,height:m,style:"cursor:nesw-resize;"}),v.hmin!=null&&v.vmax!=null&&(A.bl={x:f-m/2,y:y-m/2,width:m,height:m,style:"cursor:nesw-resize;"}),v.hmax!=null&&v.vmax!=null&&(A.br={x:h-m/2,y:y-m/2,width:m,height:m,style:"cursor:nwse-resize;"}));let O=t.layout.left,j=t.layout.top;if(O||j)for(let N in A)A[N].transform=`translate(${O}, ${j})`;return A}),s=e;function u(m,f){if(!f||!["buttons","ctrlKey","shiftKey","altKey","metaKey"].every(z=>i[z]==m[z]))return;m.stopPropagation(),m.preventDefault(),m.target.setPointerCapture(m.pointerId);let h=t.coord2pos(n.value),{h:d,v:y}=t.pos2coord({h:h.hmin,v:h.vmin}),{h:v,v:p}=t.pos2coord({h:h.hmax,v:h.vmax}),{hmin:T,hmax:A,vmin:O,vmax:j}=h,N=!1,M={min:i.xmin,max:i.xmax},g={min:i.ymin,max:i.ymax},[b=0,k=0]=t.flip?[i.minRangeY,i.minRangeX]:[i.minRangeX,i.minRangeY],C=t.coord2pos(i),S=0,R=0,q,Y,U,F,V=!1,X=!1;m.target.onpointermove=z=>{if(N=!0,S+=z.movementX,R+=z.movementY,f.includes("l")&&f.includes("r")){let K=yt(S,{min:C.hmin-T,max:C.hmax-A}),_=t.pos2coord({hmin:ht(T,K),hmax:ht(A,K)});d=_.hmin,v=_.hmax}else f.includes("l")?(d=t.pos2coord({h:T+S}).h,d=yt(d,d>v?{min:ht(v,b)}:{max:ht(v,-b)}),V=T+S>A):f.includes("r")&&(v=t.pos2coord({h:A+S}).h,v=yt(v,v>d?{min:ht(d,b)}:{max:ht(d,-b)}),V=A+S<T);if(f.includes("t")&&f.includes("b")){let K=yt(R,{min:C.vmin-O,max:C.vmax-j}),_=t.pos2coord({vmin:ht(O,K),vmax:ht(j,K)});y=_.vmin,p=_.vmax}else f.includes("t")?(y=t.pos2coord({v:O+R}).v,y=yt(y,y>p?{min:ht(p,k)}:{max:ht(p,-k)}),X=O+R>j):f.includes("b")&&(p=t.pos2coord({v:j+R}).v,p=yt(p,p>y?{min:ht(y,k)}:{max:ht(y,-k)}),X=j+R<O);q=yt(t.flip?y:d,M),Y=yt(t.flip?p:v,M),U=yt(t.flip?d:y,g),F=yt(t.flip?v:p,g),q>Y&&([q,Y]=[Y,q]),U>F&&([U,F]=[F,U]),s("selecting",{xmin:q,xmax:Y,ymin:U,ymax:F},t.theme)},m.target.onpointerup=z=>{if(z.currentTarget.onpointerup=null,z.currentTarget.onpointermove=null,i.buttons&1&&(z.currentTarget.onclick=Z=>{Z.currentTarget.onclick=null,s("click",Z)}),i.buttons&2&&(z.currentTarget.oncontextmenu=Z=>{Z.currentTarget.onclick=null,s("contextmenu",Z)}),!N)return;let K={xmin:q,xmax:Y,xreverse:!!(V^n.value.xreverse),ymin:U,ymax:F,yreverse:!!(X^n.value.yreverse)},_=new PointerEvent("select",m);n.value=Xt(K),s("selectend"),s("select",Xt(K),_)}}return(m,f)=>c.value?(L(),I("g",rG,[kt("rect",oe(u1(c.value)),null,16),f[0]||(f[0]=mt()),(L(!0),I(rt,null,at(a.value,(h,d)=>(L(),I("rect",tt({fill:"transparent"},{ref_for:!0},h,{onPointerdown:y=>u(y,d),class:"vvplot-interactive"}),null,16,oG))),256))])):Et("",!0)}},sG=["height","width"],lG=["y1","y2"],aG=["y"],cG={__name:"CoreGuideGradientbar",props:{scales:Array,appearance:{type:Object,default:()=>({})},theme:{type:Object,default:()=>({})},breaks:Array,limits:Object},setup(t){const e=H(()=>{let{min:o,max:l}=t.limits;return t.breaks.map(c=>({position:(c-o)/(l-o),label:String(c)}))}),n=H(()=>{let o=30,{min:l,max:c}=t.limits,a=(c-l)/(o-1),s=Array.from({length:o},(m,f)=>l+f*a),u=t.scales.map(m=>m(s));return s.map((m,f)=>Object.fromEntries(t.scales.map((h,d)=>[{color:"fill"}[h.aesthetics]??h.aesthetics,u[d][f]])))}),i=Z1(0),r=Pt("svg");return St(e,async()=>{await kn();let o=r.value?.getBBox?.();o&&(i.value=o.width+o.x)},{immediate:!0}),(o,l)=>(L(),I("svg",{height:n.value.length*3+20,width:i.value,ref:"svg"},[(L(!0),I(rt,null,at(n.value,(c,a)=>(L(),pt(En,tt({width:10,height:3.1,x:10,y:10+(29-a+.5)*3,alpha:t.appearance.alpha},{ref_for:!0},c),null,16,["y","alpha"]))),256)),l[1]||(l[1]=mt()),(L(!0),I(rt,null,at(e.value,(c,a)=>(L(),I("g",null,[kt("line",{x1:"15",x2:"18",y1:10+(1-c.position)*90,y2:10+(1-c.position)*90,stroke:"black"},null,8,lG),l[0]||(l[0]=mt()),kt("text",{x:"20",y:10+(1-c.position)*90,"alignment-baseline":"central"},qt(c.label),9,aG)]))),256))],8,sG))}},mo=Object.freeze(Object.defineProperty({__proto__:null,curve:Ws,line:e1,point:Ei,polygon:_s,text:c1,tile:En},Symbol.toStringTag,{value:"Module"})),uG=["height","width"],hG=["transform"],fG={transform:"translate(10, 10)"},mG={x:"20",y:"10","alignment-baseline":"central"},dG={__name:"CoreGuideLegendkey",props:{scales:Array,appearances:{type:Object,default:()=>({})},theme:{type:Object,default:()=>({})},breaks:Array},setup(t){const e=H(()=>{let o=t.scales.map(s=>s(t.breaks)),l=t.breaks.map((s,u)=>({bind:Object.fromEntries(t.scales.map((m,f)=>[m.aesthetics,o[f][u]])),label:String(s)})),c=Rl(l.map(s=>s.bind)),a=Map.groupBy(l.map(s=>s.label),(s,u)=>c.categories[c[u]]);return Array.from(a).map(([s,u])=>{let m={tile:{},line:{},point:{},text:{}};for(let f in m)for(let h of Object.keys(mo[f].props))s[h]&&(m[f][h]=s[h]);return{bind:m,label:u.join("; ")}})}),n=H(()=>{let{text:o,line:l,point:c,tile:a}=t.appearances,s={};return a!=null&&(s.tile={width:10,height:10,fill:"transparent",...a}),l!=null&&(s.line={x1:-5,x2:5,color:"black",...l}),c!=null&&(s.point={size:6,...c}),o!=null&&(s.text={size:4,text:"a",...o}),s}),i=Z1(0),r=Pt("svg");return St(e,async()=>{await kn();let o=r.value?.getBBox?.();o&&(i.value=o.width+o.x)},{immediate:!0}),(o,l)=>(L(),I("svg",{height:e.value.length*20,width:i.value,ref:"svg"},[(L(!0),I(rt,null,at(e.value,(c,a)=>(L(),I("g",{transform:`translate(0, ${a*20})`},[kt("g",fG,[(L(!0),I(rt,null,at(n.value,(s,u)=>(L(),pt(r1(mo[u]),tt({ref_for:!0},{...s,...c.bind[u]}),null,16))),256))]),l[0]||(l[0]=mt()),kt("text",mG,qt(c.label),1)],8,hG))),256))],8,uG))}},gG=Object.assign({inheritAttrs:!1},{__name:"CoreGuide",props:{scales:Array,type:{type:String,default:"legendkey"}},setup(t){const e={legendkey:dG,gradientbar:cG},n=H(()=>t.scales.reduce((o,[l])=>o??l.title,null)??t.scales.reduce((o,[l])=>o??l._title,null)),i=H(()=>{let o=t.scales.map(([c])=>c),l=o.find(c=>c.breaks!=null);return Array.isArray(l?.breaks)?Array.from(l.breaks):(l=o.find(c=>c.level!=null),l?.level?l.level.apply(Array.from(l.level)):(l=o.find(c=>c.limits!=null),Mn.number({minor:!0})(l.limits)))}),r=H(()=>{let o={scales:t.scales.map(([l])=>l)};if(t.type=="legendkey")o.appearances={tile:Tt(...t.scales.flatMap(([l,c])=>[c.rect,c.tile,c.polygon,c.ellipse])),line:Tt(...t.scales.flatMap(([l,c])=>[c.line,c.linerange,c.curve])),point:Tt(...t.scales.flatMap(([l,c])=>[c.point])),text:Tt(...t.scales.flatMap(([l,c])=>[c.text,c.markdown]))};else if(t.type=="gradientbar"){let l=t.scales.map(([a])=>a.limits?.max).filter(a=>a!=null).reduce((a,s)=>Math.min(a,s),1/0),c=t.scales.map(([a])=>a.limits?.min).filter(a=>a!=null).reduce((a,s)=>Math.max(a,s),-1/0);o.limits={min:c,max:l},o.appearance=Tt(...t.scales.flatMap(([a,s])=>Object.values(s)))}return o});return(o,l)=>(L(),I(rt,null,[kt("span",null,qt(n.value),1),l[0]||(l[0]=mt()),(L(),pt(r1(e[t.type]),tt(r.value,{breaks:i.value}),null,16,["breaks"]))],64))}}),yG={__name:"CoreLegend",props:{theme:{type:Object,default:()=>({})},scales:Map},setup(t){const e=H(()=>{let i=new Map(Array.from(t.scales).filter(([s])=>s.legend!==!1)),r=Array.from(i.keys()),o=r.map(s=>s.key),l=1;for(let s=0;s<o.length;s++){for(;o.includes("_guide_"+l);)l++;o[s]??=o.find((u,m)=>o[m]!=null&&Ve.isEqual(r[m].level,r[s].level))??"_guide_"+l}let c=r.map(s=>n(s)),a=Hl(o,c);return Map.groupBy(i,(s,u)=>a.categories[a[u]])});function n(i){return i==null?null:["gradientbar","legendkey"].includes(i.guide)?i.guide:i.level?"legendkey":["color","fill","alpha"].includes(i.aesthetics)?"gradientbar":"legendkey"}return(i,r)=>t.scales?(L(),I("div",{key:0,class:"vvplot-legend",style:N1({gap:t.theme.spacing+"px"})},[(L(!0),I(rt,null,at(e.value,([[o,l],c])=>(L(),pt(gG,{key:o,type:l,scales:c},null,8,["type","scales"]))),128))],4)):Et("",!0)}},xG=["id"],vG=["width","height"],pG=["transform","width","height","fill"],bG=["transform"],wG=["transform","clip-path"],kG=["transform"],AG=["clip-path"],SG={key:1},CG=Object.assign({inheritAttrs:!1},{__name:"CorePlot",props:o1({schema:Object,layers:Array,minRange:Object,expandAdd:Object,flip:Boolean,reverse:Object,paddings:Object,expandMult:Object,coordLevels:Object,levels:Object,scales:Object,axes:{type:Array,default:()=>[]},theme:Object,render:String,clip:Boolean,action:{type:Array,default:()=>[]},selections:{type:Array,default:()=>[]},legendTeleport:null},{selectionPreview:{},selectionPreviewModifiers:{},selectionPreviewTheme:{},selectionPreviewThemeModifiers:{},transition:{},transitionModifiers:{}}),emits:o1(["click","singleclick","dblclick","contextmenu","pointerdown","pointerup","pointerover","pointerout","pointerenter","pointerleave","pointermove","wheel","select","move","zoom","rescale","nudge"],["update:selectionPreview","update:selectionPreviewTheme","update:transition"]),setup(t,{expose:e,emit:n}){const i=ol(),r=xo(t,["schema","theme","expandAdd","expandMult","coordLevels","levels","scales","flip","reverse","paddings"]),o=n,l=K1("range"),c=K1("rangePreview"),a=ke(t,"selectionPreview"),s=ke(t,"selectionPreviewTheme");function u(E,D){a.value=E,s.value=D}const m=H(()=>Object.assign({},t.theme?.selection,s.value));function f(){a.value={}}const h=ke(t,"transition"),d=Pt("svg"),y=Pt("layers"),v=Z1(0),p=Z1(0);vo(d,E=>{let{width:D,height:B}=E[0].contentRect;v.value=D,p.value=B});const T=H(()=>new e9(t.schema,r.layers)),A=H(()=>T.value.useScales(t.scales,t.levels).useCoordLevels(t.coordLevels).render(l,t.expandAdd,r.minRange)),O=Ee(()=>{let E=Object.fromEntries(["left","right","top","bottom"].map($=>[$,t.paddings[$]&&t.theme.plot.padding[$]||0])),D=+t.theme.plot.margin.left+E.left,B=+t.theme.plot.margin.right+E.right,x=+t.theme.plot.margin.top+E.top,w=+t.theme.plot.margin.bottom+E.bottom;return x+w>p.value&&(x=p.value*(x/(x+w)),w=p.value-x),D+B>v.value&&(D=v.value*(D/(D+B)),B=v.value-D),{l:D,r:B,t:x,b:w,left:D,right:v.value-B,top:x,bottom:p.value-w,width:v.value-D-B,height:p.value-x-w}}),j=Ee(()=>{let E=A.value.coordScales,D=t.expandMult,{min:B,max:x}=C(E.x.range,D.x),{min:w,max:$}=C(E.y.range,D.y),[P,W,G,et]=t.flip?[w,$,B,x]:[B,x,w,$],{width:it,height:st}=O;return{left:it*P||0,right:it*(1-W)||0,top:st*et||0,bottom:st*(1-G)||0,l:it*P||0,r:it*W||0,t:st*et||0,b:st*G||0,width:it*(1-P-W),height:st*(1-et-G),fullWidth:it,fullHeight:st}});e({vplot:A,panel:O,svg:d});const N=H(()=>{let E=Z.value.translateH+j.left,D=Z.value.translateV+j.top,B=Z.value.scaleH,x=Z.value.scaleV,w=[];return(E!=0||D!=0)&&w.push(`translate(${E}, ${D})`),(B!=1||x!=1)&&w.push(`scale(${B}, ${x})`),{transform:w.join(" ")||null}});function M({value:E,min:D,max:B},x,w,$){let P={};return E!=null&&(P.value=x.invert(w?1-E/$:E/$)),w?(B!=null&&(P.min=x.invert(1-B/$)),D!=null&&(P.max=x.invert(1-D/$))):(D!=null&&(P.min=x.invert(D/$)),B!=null&&(P.max=x.invert(B/$))),P}function g({h:E,hmin:D,hmax:B,v:x,vmin:w,vmax:$}={}){let P=A.value.coordScales,{width:W,height:G}=j,et={},[it,st,bt]=t.flip?[x,w,$]:[E,D,B],[vt,ct,lt]=t.flip?[E,D,B]:[x,w,$];if(it!=null||st!=null||bt!=null){let{value:J,min:ot,max:Q}=M({value:it,min:st,max:bt},P.x,t.flip!=t.reverse.x,t.flip?G:W);Object.assign(et,Xt({x:J,xmin:ot,xmax:Q})),t.flip?Object.assign(et,Xt({v:J,vmin:ot,vmax:Q})):Object.assign(et,Xt({h:J,hmin:ot,hmax:Q}))}if(vt!=null||ct!=null||lt!=null){let{value:J,min:ot,max:Q}=M({value:vt,min:ct,max:lt},P.y,t.flip==t.reverse.y,t.flip?W:G);Object.assign(et,Xt({y:J,ymin:ot,ymax:Q})),t.flip?Object.assign(et,Xt({h:J,hmin:ot,hmax:Q})):Object.assign(et,Xt({v:J,vmin:ot,vmax:Q}))}return et}function b({value:E,min:D,max:B}={},{oob:x=Wn}={},w,$,P,W){let G={};return E!=null&&(G.value=P?x(P*($?1-w(E):w(E)),W):0),D==null&&B==null||($?(B!=null&&(G.min=P?x(P*(1-w(B)),W):0),D!=null&&(G.max=P?x(P*(1-w(D)),W):0)):(D!=null&&(G.min=P?x(P*w(D),W):0),B!=null&&(G.max=P?x(P*w(B),W):0))),G}function k({h:E,hmin:D,hmax:B,v:x,vmin:w,vmax:$,x:P,xmin:W,xmax:G,y:et,ymin:it,ymax:st}={},{limited:bt=!1,oob:vt=Wn}={}){let{width:ct,height:lt,l:J,r:ot,t:Q,b:ft}=j,gt={},Qt=A.value.coordScales,Kt={min:-J,max:ct+ot},ve={min:-Q,max:lt+ft};if((P!=null||W!=null||G!=null)&&(t.flip?[x,w,$]=[P,W,G]:[E,D,B]=[P,W,G]),(et!=null||it!=null||st!=null)&&(t.flip?[E,D,B]=[et,it,st]:[x,w,$]=[et,it,st]),E!=null||D!=null||B!=null){let{value:he,min:fe,max:Fe}=b({value:E,min:D,max:B},{oob:vt},Qt[t.flip?"y":"x"],t.reverse[t.flip?"y":"x"],ct,Kt);Object.assign(gt,Xt({h:he,hmin:fe,hmax:Fe}))}if(x!=null||w!=null||$!=null){let{value:he,min:fe,max:Fe}=b({value:x,min:w,max:$},{oob:vt},Qt[t.flip?"x":"y"],!t.reverse[t.flip?"x":"y"],lt,ve);Object.assign(gt,Xt({v:he,vmin:fe,vmax:Fe}))}return bt&&(gt.hmin==null&&(gt.hmin=Kt.min),gt.hmax==null&&(gt.hmax=Kt.max),gt.vmin==null&&(gt.vmin=ve.min),gt.vmax==null&&(gt.vmax=ve.max)),gt}function C({min:E,max:D}={},{min:B=0,max:x=0}={}){let w=D-E,$=+E-B*w,P=+D+x*w,W=P-$;return{min:W==0?0:(E-$)/W,max:W==0?0:(P-D)/W}}function S(E){let D=d.value.getBoundingClientRect(),B=D.width/d.value.clientWidth,x=D.height/d.value.clientHeight,w=E.clientX-D.left,$=E.clientY-D.top,P=w/B-(O.left+j.left),W=$/x-(O.top+j.top),G=O.left+j.right-w/B,et=O.top+j.bottom-$/x,{x:it,y:st}=g({h:P,v:W});return{l:P,t:W,r:G,b:et,x:it,y:st}}function R(E){let D=d.value.getBoundingClientRect(),B=D.width/d.value.clientWidth,x=D.height/d.value.clientHeight;return E.clientX-D.left>O.l*B&&D.right-E.clientX>O.r*B&&E.clientY-D.top>O.t*x&&D.bottom-E.clientY>O.b*x}function q(E){if(!y.value||E._vhandled||!R(E)||!Array.from(y.value).filter(w=>w.render=="canvas").length)return E;let B={};for(let w in E)B[w]=E[w];B.bubbles=!1;let x=new PointerEvent(E.type,B);for(let w of Object.keys(E)){let $=Object.getOwnPropertyDescriptor(x,w);$&&!$.writable&&!$.set||(x[w]=E[w])}for(let w=y.value.length-1;w>=0;w--)y.value[w].dispatchEvent(x)===!1&&E.preventDefault();for(let w of Object.keys(x)){let $=Object.getOwnPropertyDescriptor(x,w);$&&!$.writable&&!$.set||(E[w]=x[w])}return x._vhandled?x:E}let Y,U=0,F=0;function V(E){let D=q(E),B=S(E);if(o("pointerdown",D,B),D.defaultPrevented&&E.preventDefault(),r.clip&&!R(E))return;let x=E.currentTarget,w=!1;function $(G){(Math.abs(G.screenX-E.screenX)>3||Math.abs(G.screenY-E.screenY)>3)&&(w=!0,G.currentTarget.removeEventListener("pointermove",$))}E.target.addEventListener("pointermove",$,{passive:!0}),E.target.addEventListener("pointerup",function(G){if(E.target.removeEventListener("pointermove",$),!w){let et=new PointerEvent("singleclick",G);G.target.dispatchEvent(et)}},{once:!0});let P=r.selections.findLast(G=>["buttons","ctrlKey","shiftKey","altKey","metaKey"].every(et=>G[et]==E[et]));if(P){let{x:G=!1,y:et=!1,"min-range-x":it=0,"min-range-y":st=0}=P;E.target.setPointerCapture(E.pointerId),x.style.userSelect="none";let bt=(({xmin:ct,xmax:lt})=>({min:ct,max:lt}))(P),vt=(({ymin:ct,ymax:lt})=>({min:ct,max:lt}))(P);E.target.onpointermove=ct=>{if(!G&&!et||!w)return;let lt=S(ct),J={};if(G){let ot=yt(B.x,bt),Q=yt(yt(lt.x,lt.x>ot?{min:ht(ot,it)}:{max:ht(ot,-it)}),bt);J.xmin=ot>Q?Q:ot,J.xmax=ot>Q?ot:Q,J.xreverse=ot>Q}if(et){let ot=yt(B.y,vt),Q=yt(yt(lt.y,lt.y>ot?{min:ht(ot,st)}:{max:ht(ot,-st)}),vt);J.ymin=ot>Q?Q:ot,J.ymax=ot>Q?ot:Q}a.value=J,s.value=P.theme},E.target.onpointerup=ct=>{if(ct.currentTarget.onpointerup=null,ct.currentTarget.onpointermove=null,x.style.userSelect=null,a.value={},w&&(G||et)){P.buttons&1&&(ct.currentTarget.onclick=Q=>{Q.currentTarget.onclick=null,De(P.onClick,Q)}),P.buttons&2&&(ct.currentTarget.oncontextmenu=Q=>{Q.currentTarget.oncontextmenu=null,De(P.onContextmenu,Q)});let lt=S(ct),J={},ot=new PointerEvent("select",E);if(G){let Q=yt(B.x,bt),ft=yt(yt(lt.x,lt.x>Q?{min:ht(Q,it)}:{max:ht(Q,-it)}),bt);if(Q==ft)return;J.xmin=Q>ft?ft:Q,J.xmax=Q>ft?Q:ft,J.xreverse=Q>ft}if(et){let Q=yt(B.y,vt),ft=yt(yt(lt.y,lt.y>Q?{min:ht(Q,st)}:{max:ht(Q,-st)}),vt);if(Q==ft)return;J.ymin=Q>ft?ft:Q,J.ymax=Q>ft?Q:ft,J.yreverse=Q>ft}P["onUpdate:modelValue"]?.(J),De(P.onSelect,Xt(J),ot)||o("select",Xt(J),ot)}if(!w&&P.dismissible!==!1){if(ct.defaultPrevented)return;let lt=P.modelValue;if(P.dismissible!==!0&&["xmin","xmax","ymin","ymax"].every(Q=>lt?.[Q]==null))return;let J={},ot=new PointerEvent("select",E);P["onUpdate:modelValue"]?.(J),De(P.onDismiss,Xt(J),ot)||o("select",Xt(J),ot)}};return}let W=r.action.find(G=>G.action=="move"&&["buttons","ctrlKey","shiftKey","altKey","metaKey"].every(et=>G[et]==E[et]));if(W){let G=d.value.getBoundingClientRect(),et=G.width/d.value.clientWidth,it=G.height/d.value.clientHeight;E.target.setPointerCapture(E.pointerId),x.style.userSelect="none",Y=clearTimeout(Y);let st=0,bt=j.width,vt=0,ct=j.height,lt,J,ot,Q,ft=k(W);E.target.onpointermove=gt=>{let{x:Qt=!1,y:Kt=!1}=W,[ve,he]=t.flip?[Kt,Qt]:[Qt,Kt];if(ve){U+=gt.movementX;let ee=yt(-U/et,{min:ft.hmin-st,max:ft.hmax-bt});lt=st+ee,J=bt+ee}if(he){F+=gt.movementY;let ee=yt(-F/it,{min:ft.vmin-vt,max:ft.vmax-ct});ot=vt+ee,Q=ct+ee}let{xmin:fe,xmax:Fe,ymin:Ln,ymax:On}=g({hmin:lt,hmax:J,vmin:ot,vmax:Q});Object.assign(c,{xmin:fe,xmax:Fe,ymin:Ln,ymax:On})},E.target.onpointerup=gt=>{gt.currentTarget.onpointerup=null,gt.currentTarget.onpointermove=null,x.style.userSelect=null,Y=setTimeout(()=>{nt(W,gt),U=F=0},300)};return}}let X=0,z;function K(E){let D=q(E),B=S(E);if(o("wheel",D,B),D.defaultPrevented&&E.preventDefault(),r.clip&&!R(E))return;let x=r.action.find(w=>["zoom","nudge"].includes(w.action)&&["ctrlKey","shiftKey","altKey","metaKey"].every($=>w[$]==E[$]));!x||!x.x&&!x.y||(z=clearTimeout(z),E.preventDefault(),h.value="transform 0.1s ease-out",X+=E.deltaY,_(x,B,X),z=setTimeout(()=>{nt(x,E),X=0},300))}function _(E,D,B){if(E.action=="zoom"){let{x=!1,y:w=!1,"min-range-x":$=0,"min-range-y":P=0,sensitivity:W=1.25}=E,G=W**(X/100),[et,it]=t.flip?[w,x]:[x,w],st=k(E),bt,vt,ct,lt;et&&(bt=Math.max(D.l-Math.max(D.l,0)*G,st.hmin??-1/0),vt=Math.min(D.l+Math.max(D.r,0)*G,st.hmax??1/0)),it&&(ct=Math.max(D.t-Math.max(D.t,0)*G,st.vmin??-1/0),lt=Math.min(D.t+Math.max(D.b,0)*G,st.vmax??1/0));let{xmin:J,xmax:ot,ymin:Q,ymax:ft}=g({hmin:bt,hmax:vt,vmin:ct,vmax:lt});if(x&&G<1&&ot-J<$){let gt=(ot+J)/2;J=gt-$/2,ot=gt+$/2}if(w&&G<1&&ft-Q<P){let gt=(ft+Q)/2;Q=gt-P/2,ft=gt+P/2}Object.assign(c,{xmin:J,xmax:ot,ymin:Q,ymax:ft})}if(E.action=="nudge"){let{x=!1,y:w=!1,sensitivity:$=.1}=E,[P,W]=t.flip?[w,x]:[x,w],G=k(E),et=0,it=j.width,st=0,bt=j.height,vt,ct,lt,J;if(P){let Qt=$*j.width*(-B/120),Kt=yt(-Qt,{min:G.hmin-et,max:G.hmax-it});vt=et+Kt,ct=it+Kt}if(W){let Qt=$*j.height*(-B/120),Kt=yt(-Qt,{min:G.vmin-st,max:G.vmax-bt});lt=st+Kt,J=bt+Kt}let{xmin:ot,xmax:Q,ymin:ft,ymax:gt}=g({hmin:vt,hmax:ct,vmin:lt,vmax:J});Object.assign(c,{xmin:ot,xmax:Q,ymin:ft,ymax:gt})}}const Z=H(()=>{let E=0,D=j.width,B=0,x=j.height,{hmin:w=E,hmax:$=D,vmin:P=B,vmax:W=x}=k(c??{}),G=D-E,et=$-w,it=x-B,st=W-P;return{scaleH:G<1||et<1||Math.abs(G-et)<1?1:G/et,translateH:(E*$-w*D)/($-w)||0,scaleV:it<1||st<1||Math.abs(it-st)<1?1:it/st,translateV:(B*W-P*x)/(W-P)||0}});St(Z,({translateH:E,translateV:D,scaleH:B,scaleV:x})=>{!E&&!D&&B==1&&x==1&&(h.value=null)},{deep:!0});function nt(E,D){let B=Xt(c)??{};if(!Object.keys(B).length)return;let x=new PointerEvent(D.type,D);De(E.emit,B,x)||o(E.action,B,x),xt(B),Object.assign(c,{xmin:void 0,xmax:void 0,ymin:void 0,ymax:void 0})}const ut={pointerdown:V,pointerup(E){let D=q(E),B=S(E);o("pointerup",D,B),D.defaultPrevented&&E.preventDefault()},pointerover(E){o("pointerover",E,S(E))},pointerout(E){o("pointerout",E,S(E))},pointerenter(E){o("pointerenter",E,S(E))},pointerleave(E){o("pointerleave",E,S(E))},click(E){o("click",q(E),S(E))},contextmenu(E){let D=q(E),B=S(E);o("contextmenu",D,B),D.defaultPrevented&&E.preventDefault()},singleclick(E){o("singleclick",q(E),S(E))},dblclick(E){let D=q(E),B=S(E);o("dblclick",D,B),D.defaultPrevented&&E.preventDefault()},pointermove(E){let D=q(E),B=S(E);o("pointermove",D,B),D.defaultPrevented&&E.preventDefault()},wheel:K};function xt(E){let{xmin:D,xmax:B,ymin:x,ymax:w}=E,{xmin:$,xmax:P,ymin:W,ymax:G}=l;D=D!=null?ht(D,+t.expandAdd.x.min):$,B=B!=null?ht(B,-t.expandAdd.x.max):P,x=x!=null?ht(x,+t.expandAdd.y.min):W,w=w!=null?ht(w,-t.expandAdd.y.max):G,!(D==$&&B==P&&x==W&&w==G)&&Object.assign(l,{xmin:D,xmax:B,ymin:x,ymax:w})}const Ut=Ee(()=>{let E=c?.xmin??l?.xmin,D=c?.xmax??l?.xmax,B=c?.ymin??l?.ymin,x=c?.ymax??l?.ymax;return{x:E||D?{min:E,max:D}:void 0,y:B||x?{min:B,max:x}:void 0}}),ie=H(()=>{let E={x:A.value.coordScales.x,y:A.value.coordScales.y};return r.axes.filter(D=>D.coord in E).filter(D=>["h","v"].includes(D.orientation)).map(({coord:D,breaks:B,labels:x,titles:w,minorBreaks:$,...P})=>({coord:D,axis:new n9(E[D],{breaks:B,labels:x,titles:w,minorBreaks:$}),etc:P}))}),Rt=H(()=>ie.value.map(({coord:E,axis:D,etc:B})=>{let{majorBreaks:x,minorBreaks:w,ticks:$}=D.getBindings({range:Ut[E],expandMult:t.expandMult[E]}),{showGrid:P,orientation:W,...G}=B;return{majorBreaks:x,minorBreaks:w,ticks:$,showGrid:P,coord:E,orientation:W,bind:G}})),ye=H(()=>{let E=Rt.value.filter(B=>B.showGrid&&B.orientation=="v"),D=Rt.value.filter(B=>B.showGrid&&B.orientation=="h");return{h:{majorBreaks:g1(E.flatMap(B=>B.majorBreaks),B=>B.position),minorBreaks:g1(E.flatMap(B=>B.minorBreaks),B=>B.position)},v:{majorBreaks:g1(D.flatMap(B=>B.majorBreaks),B=>B.position),minorBreaks:g1(D.flatMap(B=>B.minorBreaks),B=>B.position)}}}),xe=H(()=>Rt.value.map(({orientation:E,coord:D,bind:B,ticks:x})=>{let{onMove:w=(...et)=>o("move",...et),onZoom:$=(...et)=>o("zoom",...et),onRescale:P=(...et)=>o("rescale",...et),onNudge:W=(...et)=>o("nudge",...et),...G}=B;return{orientation:E,bind:{coord:D,orientation:E,ticks:x,layout:j,coord2pos:k,pos2coord:g,...G},on:{zoom:$,move:w,rescale:P,nudge:W,rangechange:xt}}}));return(E,D)=>(L(),I("svg",tt({ref:"svg",width:"100%",height:"100%"},zt(ut,!0),E.$attrs),[kt("defs",null,[kt("clipPath",{id:`${Mt(i)}-plot-clip`},[kt("rect",{x:"0",y:"0",width:Mt(O).width,height:Mt(O).height},null,8,vG)],8,xG)]),D[6]||(D[6]=mt()),t.theme.plot.background?(L(),I("rect",{key:0,transform:`translate(${Mt(O).left}, ${Mt(O).top})`,width:Mt(O).width,height:Mt(O).height,fill:t.theme.plot.background},null,8,pG)):Et("",!0),D[7]||(D[7]=mt()),kt("g",{transform:`translate(${Mt(O).left}, ${Mt(O).top})`,style:{"pointer-events":"none"}},[t.theme.grid.h?(L(),pt(TF,tt({key:0},ye.value.h,{layout:Mt(j),theme:t.theme.grid.h,activeTransform:Z.value,coord2pos:k,transition:h.value}),null,16,["layout","theme","activeTransform","transition"])):Et("",!0),D[2]||(D[2]=mt()),t.theme.grid.v?(L(),pt($F,tt({key:1},ye.value.v,{layout:Mt(j),theme:t.theme.grid.v,activeTransform:Z.value,coord2pos:k,transition:h.value}),null,16,["layout","theme","activeTransform","transition"])):Et("",!0)],8,bG),D[8]||(D[8]=mt()),kt("g",{transform:`translate(${Mt(O).left}, ${Mt(O).top})`,"clip-path":r.clip?`url(#${Mt(i)}-plot-clip)`:null},[kt("g",tt(N.value,{style:{transition:h.value}}),[(L(!0),I(rt,null,at(A.value.layers,B=>(L(),pt(iG,tt({ref_for:!0,ref_key:"layers",ref:y,data:B.data},{ref_for:!0},B.vBind,{layout:Mt(j),geom:B.geom,coord2pos:k,getCoord:S,"default-render":r.render}),null,16,["data","layout","geom","default-render"]))),256))],16),D[3]||(D[3]=mt()),(L(!0),I(rt,null,at(r.selections,B=>(L(),pt(fo,tt({coord2pos:k,pos2coord:g,layout:Mt(j),onSelecting:u,onSelectend:f,transition:h.value,activeTransform:Z.value},{ref_for:!0},B,{flip:t.flip}),null,16,["layout","transition","activeTransform","flip"]))),256)),D[4]||(D[4]=mt()),$e(fo,{coord2pos:k,pos2coord:g,layout:Mt(j),modelValue:a.value,transition:h.value,activeTransform:Z.value,theme:m.value,flip:t.flip},null,8,["layout","modelValue","transition","activeTransform","theme","flip"])],8,wG),D[9]||(D[9]=mt()),kt("g",{transform:`translate(${Mt(O).left}, ${Mt(O).top})`},[(L(!0),I(rt,null,at(xe.value.filter(B=>typeof B.bind.position!="number"),B=>(L(),pt(lo,tt({ref_for:!0},B.bind,zt(B.on),{transition:h.value,"onUpdate:transition":D[0]||(D[0]=x=>h.value=x),activeTransform:Z.value}),null,16,["transition","activeTransform"]))),256)),D[5]||(D[5]=mt()),kt("g",{"clip-path":r.clip?`url(#${Mt(i)}-plot-clip)`:null},[(L(!0),I(rt,null,at(xe.value.filter(B=>typeof B.bind.position=="number"),B=>(L(),pt(lo,tt({ref_for:!0},B.bind,zt(B.on),{transition:h.value,"onUpdate:transition":D[1]||(D[1]=x=>h.value=x),activeTransform:Z.value}),null,16,["transition","activeTransform"]))),256))],8,AG)],8,kG),D[10]||(D[10]=mt()),r.legendTeleport?(L(),I("foreignObject",SG,[(L(),pt(sl,{defer:"",to:r.legendTeleport},[$e(yG,{scales:A.value?.scales,theme:t.theme.legend},null,8,["scales","theme"])],8,["to"]))])):Et("",!0)],16))}}),wn={$_type:"action",$_props:{}},Li={$_type:"layer"},Oi={$_props:{geom:"tile",stat:"bar"},$_type:"layer"},ji={$_props:{geom:"blank",stat:"identity"},$_type:"layer"},Pi={$_props:{geom:"boxplot",stat:"boxplot"},$_type:"layer"},Di={$_props:{geom:"curve",stat:"curve"},$_type:"layer"},qi={$_props:{geom:"curve",stat:"density"},$_type:"layer",$_argnames:["n","kernel"]},Bi={$_props:{geom:"ellipse",stat:"ellipse"},$_type:"layer",$_argnames:["CI"]},Vi={$_props:{geom:"rect",stat:"histogram"},$_type:"layer",$_argnames:["bins","binwidth","breaks"]},Ii={$_props:{geom:"line",stat:"line"},$_type:"layer",$_argnames:["orientation"]},Ri={$_props:{geom:"line",stat:"linerange"},$_type:"layer"},Hi={$_props:{geom:"markdown",stat:"text"},$_type:"layer"},Xi={$_props:{geom:"markdownsegment",stat:"textsegment"},$_type:"layer"},Yi={$_props:{geom:"line",stat:"path"},$_type:"layer"},zi={$_props:{geom:"point",stat:"point"},$_type:"layer"},Ui={$_props:{geom:"polygon",stat:"polygon"},$_type:"layer"},Fi={$_props:{geom:"rect",stat:"rect"},$_type:"layer"},Gi={$_props:{geom:"line",stat:"segment"},$_type:"layer"},Wi={$_props:{geom:"stick",stat:"stick"},$_type:"layer"},_i={$_props:{geom:"text",stat:"text"},$_type:"layer"},Ki={$_props:{geom:"textsegment",stat:"textsegment"},$_type:"layer"},Zi={$_props:{geom:"tile",stat:"tile"},$_type:"layer"},NG=Object.freeze(Object.defineProperty({__proto__:null,VVGeom:Li,VVGeomBar:Oi,VVGeomBlank:ji,VVGeomBoxplot:Pi,VVGeomCurve:Di,VVGeomDensity:qi,VVGeomEllipse:Bi,VVGeomHistogram:Vi,VVGeomLine:Ii,VVGeomLinerange:Ri,VVGeomMarkdown:Hi,VVGeomMarkdownsegment:Xi,VVGeomPath:Yi,VVGeomPoint:zi,VVGeomPolygon:Ui,VVGeomRect:Fi,VVGeomSegment:Gi,VVGeomStick:Wi,VVGeomText:_i,VVGeomTextsegment:Ki,VVGeomTile:Zi},Symbol.toStringTag,{value:"Module"})),Qi={$_type:"axis",$_props:{}},Ji={$_type:"axis",$_props:{coord:"x"}},tr={$_type:"axis",$_props:{coord:"y"}},MG=Object.freeze(Object.defineProperty({__proto__:null,VVAxis:Qi,VVAxisX:Ji,VVAxisY:tr},Symbol.toStringTag,{value:"Module"})),TG={key:0,class:"vvplot-panel",style:{"pointer-events":"auto",display:"contents"}},Ks=Object.assign({inheritAttrs:!1},{__name:"Plot",props:o1({data:Array,scales:Object,aes:Object,expandAdd:Object,expandMult:Object,extend:Object,levels:Object,range:Object,minRange:Object,rangePreview:Object,axes:[Object,Array],theme:[Object,Array],action:[Object,Array],reverse:Object,render:String,flip:Boolean,clip:{type:Boolean,default:!0},resize:null,legendTeleport:null},{selectionPreview:{default:()=>({})},selectionPreviewModifiers:{},selectionPreviewTheme:{default:()=>({})},selectionPreviewThemeModifiers:{},transition:{},transitionModifiers:{},width:{},widthModifiers:{},height:{},heightModifiers:{}}),emits:o1(["resize","rangechange","select","update:range","update:rangePreview"],["update:selectionPreview","update:selectionPreviewTheme","update:transition","update:width","update:height"]),setup(t,{expose:e,emit:n}){const i={...NG,...MG,VVAction:wn,VVSelection:wn},r={x:"y",y:"x",h:"v",v:"h",top:"bottom",bottom:"top",left:"right",right:"left"};function o(x){return x==null?x:x===""||!!x}const l=n,c=ke(t,"selectionPreview"),a=ke(t,"selectionPreviewTheme"),s=ke(t,"transition");function u(x){return x==null?[]:x.flatMap(w=>w.type==rt?u(w.children):w.type=="template"?u(w.children).map($=>($.props={...$.props,...w.props},$)):w)}function m(x){return{props:Object.fromEntries(x.props.map($=>{try{if($.type==7)return[$.arg.content,new Function("return "+$.exp.content)()];if($.type==6)return[$.name,$.value?.content??""]}catch{}}).filter($=>$!=null)),children:x.children.map($=>()=>[m($)]),type:i[x.tag]}}const f=ll(),h=al(),d=Lt({axis:{},layer:{},action:{},selection:{},dom:{}});for(let x in f)St(()=>f[x]?.(),w=>{let $=u(w).flatMap(W=>W.type?.template?Il(W.type.template,{decodeEntities:!0}).children.map(et=>m(et)):W).filter(W=>W!=null),P=Object.groupBy($,W=>W.type.$_type??"dom");for(let W in P)d[W][x]=P[W]},{immediate:!0});const y=H(()=>Object.values(d.layer).flat()),v=H(()=>Object.values(d.axis).flat()),p=H(()=>Object.values(d.action).flat()),T=H(()=>Object.values(d.selection).flat()),A=H(()=>Object.keys(d.dom).flatMap(x=>x=="panel"?[]:d.dom[x])),O=H(()=>{let x={},w={};for(let $ in h)if($.startsWith("on")){let P=Array.isArray(h[$])?h[$]:[h[$]];x[$]=P.filter(W=>typeof W=="function"),w[$]=P.filter(W=>typeof W!="function")}else w[$]=h[$];return{plot:x,wrapper:w}}),j=H(()=>{let x=[Mo,To].concat(t.theme??[]);return Zl(Kl(_l(...x),t.flip))},{deep:!0}),N=Ee(()=>{let x=v.value.map(P=>({...P.type.$_props,...P.props})),w=x.filter(P=>P.coord==="x"),$=x.filter(P=>P.coord==="y");return{x:w.find(P=>o(P.primary))??w.find(P=>P.primary==null&&!o(P.secondary)),y:$.find(P=>o(P.primary))??$.find(P=>P.primary==null&&!o(P.secondary))}}),M={levels:Lt({}),extend:Lt({}),"min-range":Lt({}),"expand-add":Lt({}),"expand-mult":Lt({}),boundary:Lt({}),reverse:Lt({}),min:Lt({}),max:Lt({}),"min-preview":Lt({}),"max-preview":Lt({})};St(N,x=>{for(let w of["x","y"])for(let $ in M)M[$][w]=x?.[w]?.[$]},{immediate:!0});const g=Ee(()=>{let x={};for(let w of["x","y"]){let $=M.boundary[w];x[w]={min:$?.min??$?.[0],max:$?.max??$?.[1]}}return x}),b=H(()=>({data:t.data,aes:t.aes,extendX:M.extend.x??t.extend?.x??0,extendY:M.extend.y??t.extend?.y??0})),k=H(()=>y.value.map(x=>{let{geom:w,stat:$,scales:P,data:W,"extend-x":G,"extend-y":et,...it}={...x.type.$_props,...x.props},st=x.type.$_argnames||[],bt={},vt={},ct={},lt={};for(let J in it)J!="key"&&(st.includes(J)?vt[J]=it[J]:J.startsWith("on")?lt[J]=it[J]:typeof it[J]=="function"?bt[J]=it[J]:["class","style","render"].includes(J)?lt[J]=it[J]:ct[J]=it[J]);return{geom:w,stat:$,data:W,aes:bt,attrs:ct,scales:P,args:vt,extendX:G,extendY:et,vBind:lt}})),C=H(()=>(({x,y:w,...$})=>$)(t.levels??{})),S=H(()=>{let x={};for(let w of["x","y"])x[w]=M.levels[w]??t.levels?.[w];return x}),R=H(()=>{let x={};for(let w of["x","y"]){let $=M.min[w]??t.range?.[w+"min"],P=M.max[w]??t.range?.[w+"max"];x[w+"min"]=isFinite($)&&!Number.isNaN($)?$:null,x[w+"max"]=isFinite(P)&&!Number.isNaN(P)?P:null}return x}),q=H(()=>{let x={};for(let w of["x","y"]){let $=M["min-preview"][w]??t.rangePreview?.[w+"min"],P=M["max-preview"][w]??t.rangePreview?.[w+"max"];x[w+"min"]=isFinite($)&&!Number.isNaN($)?$:null,x[w+"max"]=isFinite(P)&&!Number.isNaN(P)?P:null}return x}),Y=Ee(()=>({xmin:N?.x?.["onUpdate:min"],xmax:N?.x?.["onUpdate:max"],ymin:N?.y?.["onUpdate:min"],ymax:N?.y?.["onUpdate:max"]})),U=Ee(()=>({xmin:N?.x?.["onUpdate:minPreview"],xmax:N?.x?.["onUpdate:maxPreview"],ymin:N?.y?.["onUpdate:minPreview"],ymax:N?.y?.["onUpdate:maxPreview"]})),F=Lt({}),V=Lt({});St(R,(x,w)=>{x?.xmin!==w?.xmin&&(F.xmin=x.xmin),x?.xmax!==w?.xmax&&(F.xmax=x.xmax),x?.ymin!==w?.ymin&&(F.ymin=x.ymin),x?.ymax!==w?.ymax&&(F.ymax=x.ymax)},{immediate:!0}),St(q,(x,w)=>{x?.xmin!==w?.xmin&&(V.xmin=x.xmin),x?.xmax!==w?.xmax&&(V.xmax=x.xmax),x?.ymin!==w?.ymin&&(V.ymin=x.ymin),x?.ymax!==w?.ymax&&(V.ymax=x.ymax)},{immediate:!0}),St(()=>({...F}),(x,w)=>{for(let $ in Y)Y[$]?.(x[$]);l("rangechange",{...x},{...w}),l("update:range",{...x})},{deep:!0}),St(()=>V,x=>{for(let w in U)U[w]?.(x[w]);l("update:rangePreview",{...x})},{deep:!0}),nr("range",F),nr("rangePreview",V);const X=H(()=>({x:M["min-range"].x??t.minRange?.x??0,y:M["min-range"].y??t.minRange?.y??0})),z=H(()=>{let x=M["expand-add"].x??t.expandAdd?.x??0,w=M["expand-add"].y??t.expandAdd?.y??0;return Array.isArray(x)?x={min:x[0],max:x[1]}:typeof x=="number"&&(x={min:x,max:x}),Array.isArray(w)?w={min:w[0],max:w[1]}:typeof w=="number"&&(w={min:w,max:w}),{x,y:w}}),K=H(()=>{let x=M["expand-mult"].x??t.expandMult?.x??.05,w=M["expand-mult"].y??t.expandMult?.y??.05;return Array.isArray(x)?x={min:x[0],max:x[1]}:typeof x=="number"&&(x={min:x,max:x}),Array.isArray(w)?w={min:w[0],max:w[1]}:typeof w=="number"&&(w={min:w,max:w}),{x,y:w}}),_=Ee(()=>({x:o(M.reverse.x)??t.reverse?.x??!1,y:o(M.reverse.y)??t.reverse?.y??!1})),Z={left:1,right:2,middle:4,X1:8,X2:16},nt=H(()=>{let x=t.flip?{x:"v",y:"h"}:{x:"h",y:"v"},w=v.value.map($=>({...$.type.$_props,...$.props,$_children:$.children})).concat(t.axes??[]);return w.every($=>$?.coord!="x")&&w.push({coord:"x"}),w.every($=>$?.coord!="y")&&w.push({coord:"y"}),w.map(({coord:$,position:P,title:W,breaks:G,labels:et,titles:it,"minor-breaks":st,"show-grid":bt,theme:vt=[],extend:ct,boundary:lt,action:J,primary:ot,secondary:Q,"expand-mult":ft,"expand-add":gt,levels:Qt,limits:Kt,min:ve,max:he,"onUpdate:min":fe,"onUpdate:max":Fe,$_children:Ln,...On})=>{let ee=x[$];P=P??"start",P=="start"?(P={h:"bottom",v:"left"}[ee],_[r[$]]&&(P=r[P])):P=="end"&&(P={h:"top",v:"right"}[ee],_[r[$]]&&(P=r[P]));let Qs=Object.values(Ln??{}).filter(It=>typeof It=="function").flatMap(It=>u(It())).map(It=>({...It.type.$_props,...It.props})).concat(J??[]).flatMap(It=>{let er=[];for(let $1 of["move","nudge","zoom","rescale"]){let se=It[$1];if(se==null||se===!1)continue;let Js="on"+$1.charAt(0).toUpperCase()+$1.slice(1);er.push({action:$1,[ee+"min"]:se.min??It.min??lt?.min??lt?.[0]??g?.[$]?.min,[ee+"max"]:se.max??It.max??lt?.max??lt?.[1]??g?.[$]?.max,["min-range-"+ee]:se["min-range"]??It["min-range"],ctrlKey:!!(se.ctrl??o(It.ctrl)),shiftKey:!!(se.shift??o(It.shift)),altKey:!!(se.alt??o(It.alt)),metaKey:!!(se.meta??o(It.meta)),buttons:se.buttons??Z[se.button]??It.buttons??Z[It.button]??1,emit:It[Js]})}return er});return{coord:$,orientation:ee,position:P,title:W,breaks:G,labels:et,titles:it,minorBreaks:st,showGrid:o(bt)??P!=="none",extend:ct??M.extend[$],theme:Object.assign({},...[j.value?.axis?.[P]??j.value?.axis?.[ee]].concat(vt)),action:Qs,...On}}).filter($=>$!=null)}),ut=Lt({});St(nt,x=>{for(let w of["left","right","top","bottom"])ut[w]=x.some($=>$.position==w)},{immediate:!0});const xt=H(()=>p.value.map(x=>({...x.type.$_props,...x.props})).concat(t.action??[]).flatMap(x=>{let w=[];for(let $ of["select","move","nudge","zoom"]){let P=x[$];if(P==null||P===!1)continue;let W=P.x==null&&P.y==null&&x.x==null&&x.y==null,G="on"+$.charAt(0).toUpperCase()+$.slice(1);w.push({action:$,x:W||!!(P.x??o(x.x)),y:W||!!(P.y??o(x.y)),xmin:P.xmin??x.xmin??g?.x?.min,xmax:P.xmax??x.xmax??g?.x?.max,ymin:P.ymin??x.ymin??g?.y?.min,ymax:P.ymax??x.ymax??g?.y?.max,"min-range-x":P["min-range-x"]??x["min-range-x"],"min-range-y":P["min-range-y"]??x["min-range-y"],ctrlKey:!!(P.ctrl??o(x.ctrl)),shiftKey:!!(P.shift??o(x.shift)),altKey:!!(P.alt??o(x.alt)),metaKey:!!(P.meta??o(x.meta)),buttons:P.buttons??Z[P.button]??x.buttons??Z[x.button]??1,emit:x[G]})}return w})),Ut=H(()=>T.value.map(x=>({...x.type.$_props,...x.props})).map(({once:x,move:w,dismissible:$,resize:P,x:W,y:G,xmin:et,xmax:it,ymin:st,ymax:bt,ctrl:vt,shift:ct,alt:lt,meta:J,button:ot,buttons:Q,modelValue:ft,"onUpdate:modelValue":gt,theme:Qt=[],...Kt})=>{let ve=W==null&&G==null;return o(x)?(ft=Lt({}),gt=null):gt==null&&(ft=Lt(ft??{}),gt=he=>{for(let fe in ft)delete ft[fe];Object.assign(ft,he)}),{move:!!o(w),dismissible:$==null?void 0:$!==!1,resize:!!o(P),x:ve||!!o(W),y:ve||!!o(G),xmin:et??g?.x?.min,xmax:it??g?.x?.max,ymin:st??g?.y?.min,ymax:bt??g?.y?.max,ctrlKey:!!o(vt),shiftKey:!!o(ct),altKey:!!o(lt),metaKey:!!o(J),buttons:Q??Z[ot]??1,modelValue:ft,"onUpdate:modelValue":gt,theme:Object.assign({},...[j.value?.selection].concat(Qt)),onSelect:(he,fe)=>l("select",he,fe),...Kt}})),ie=Pt("wrapper"),Rt=Pt("plot"),ye=ke(t,"width"),xe=ke(t,"height");yo(()=>{St(ye,x=>{ie.value.style.width=Te(x,"px")??null},{immediate:!0}),St(xe,x=>{ie.value.style.height=Te(x,"px")??null},{immediate:!0})});let E={width:0,height:0};vo(Rt,x=>{let{width:w,height:$}=x[0].contentRect;ie.value.style.width&&(ye.value=w),ie.value.style.height&&(xe.value=$),(w>0||$>0)&&(E.width>0||E.height>0)&&l("resize",{width:w,height:$},E),E={width:w,height:$}});const D=H(()=>({position:"absolute",pointerEvents:"none",left:Te(Rt.value?.panel?.left,"px"),top:Te(Rt.value?.panel?.top,"px"),width:Te(Rt.value?.panel?.width,"px"),height:Te(Rt.value?.panel?.height,"px")})),B=H(()=>{let x={position:"relative",overflow:"hidden",boxSizing:"border-box"};return t.resize==="both"||t.resize===!0||t.resize===""?Object.assign(x,{resize:"both"}):t.resize==="horizontal"||t.resize==="x"&&!t.flip||t.resize==="y"&&t.flip?Object.assign(x,{resize:"horizontal"}):(t.resize==="vertical"||t.resize==="y"&&!t.flip||t.resize==="x"&&t.flip)&&Object.assign(x,{resize:"vertical"}),x});return e({get svg(){return Rt.value.svg},serialize(){return Xl(Rt.value.svg)}}),(x,w)=>(L(),I("div",tt({ref:"wrapper",class:"vvplot",style:B.value},O.value.wrapper),[$e(CG,tt({ref:"plot",paddings:ut,schema:b.value,layers:k.value,"min-range":X.value,"expand-add":z.value,"expand-mult":K.value,reverse:Mt(_),flip:t.flip,"coord-levels":S.value,levels:C.value,scales:t.scales,axes:nt.value,theme:j.value,selections:Ut.value,transition:s.value,"onUpdate:transition":w[0]||(w[0]=$=>s.value=$)},O.value.plot,{"selection-preview":c.value,"onUpdate:selectionPreview":w[1]||(w[1]=$=>c.value=$),"selection-preview-theme":a.value,"onUpdate:selectionPreviewTheme":w[2]||(w[2]=$=>a.value=$),action:xt.value,clip:t.clip,render:t.render,legendTeleport:t.legendTeleport,onSelect:w[3]||(w[3]=($,P)=>l("select",$,P))}),null,16,["paddings","schema","layers","min-range","expand-add","expand-mult","reverse","flip","coord-levels","levels","scales","axes","theme","selections","transition","selection-preview","selection-preview-theme","action","clip","render","legendTeleport"]),w[4]||(w[4]=mt()),kt("div",{class:"vvplot-panel-container",style:N1(D.value)},[d.dom.panel?.length?(L(),I("div",TG,[(L(!0),I(rt,null,at(d.dom.panel,$=>(L(),pt(r1($)))),256))])):Et("",!0)],4),w[5]||(w[5]=mt()),(L(!0),I(rt,null,at(A.value,$=>(L(),pt(r1($)))),256))],16))}}),Zs={$_type:"selection",$_props:{}},$G=Object.freeze(Object.defineProperty({__proto__:null,VVAction:wn,VVAxis:Qi,VVAxisX:Ji,VVAxisY:tr,VVGeom:Li,VVGeomBar:Oi,VVGeomBlank:ji,VVGeomBoxplot:Pi,VVGeomCurve:Di,VVGeomDensity:qi,VVGeomEllipse:Bi,VVGeomHistogram:Vi,VVGeomLine:Ii,VVGeomLinerange:Ri,VVGeomMarkdown:Hi,VVGeomMarkdownsegment:Xi,VVGeomPath:Yi,VVGeomPoint:zi,VVGeomPolygon:Ui,VVGeomRect:Fi,VVGeomSegment:Gi,VVGeomStick:Wi,VVGeomText:_i,VVGeomTextsegment:Ki,VVGeomTile:Zi,VVPlot:Ks,VVSelection:Zs},Symbol.toStringTag,{value:"Module"}));export{wn as VVAction,Qi as VVAxis,Ji as VVAxisX,tr as VVAxisY,Li as VVGeom,Oi as VVGeomBar,ji as VVGeomBlank,Pi as VVGeomBoxplot,Di as VVGeomCurve,qi as VVGeomDensity,Bi as VVGeomEllipse,Vi as VVGeomHistogram,Ii as VVGeomLine,Ri as VVGeomLinerange,Hi as VVGeomMarkdown,Xi as VVGeomMarkdownsegment,Yi as VVGeomPath,zi as VVGeomPoint,Ui as VVGeomPolygon,Fi as VVGeomRect,Gi as VVGeomSegment,Wi as VVGeomStick,_i as VVGeomText,Ki as VVGeomTextsegment,Zi as VVGeomTile,Ks as VVPlot,Zs as VVSelection,$G as components,ps as number_cut,z2 as oob,Mn as vvbreak,hi as vvlabel,vs as vvscale,Ql as vvtheme};
|