(function(){var zt='',Yt='';document.addEventListener("nav",()=>{let Zt=document.getElementsByTagName("pre");for(let It=0;It{yt.blur(),yt.innerHTML=Yt,setTimeout(()=>{yt.innerHTML=zt,yt.style.borderColor=""},2e3)},Wt=>console.error(Wt))};var Nt=Jt;let pt=Kt.innerText.replace(/\n\n/g,`
`),yt=document.createElement("button");yt.className="clipboard-button",yt.type="button",yt.innerHTML=zt,yt.ariaLabel="Copy source",yt.addEventListener("click",Jt),window.addCleanup(()=>yt.removeEventListener("click",Jt)),Zt[It].prepend(yt)}}})})(),function(){var zt,Yt=new IntersectionObserver(pt=>{let yt=document.getElementById("explorer-ul");if(yt)for(let Wt of pt)Wt.isIntersecting?yt.classList.add("no-background"):yt.classList.remove("no-background")});function Zt(){this.classList.toggle("collapsed");let pt=this.nextElementSibling;pt&&(pt.classList.toggle("collapsed"),pt.style.maxHeight=pt.style.maxHeight==="0px"?pt.scrollHeight+"px":"0px")}function Nt(pt){pt.stopPropagation();let yt=pt.target;if(!yt)return;let Wt=yt.nodeName==="svg",Pt=Wt?yt.parentElement?.nextSibling:yt.parentElement?.parentElement?.nextElementSibling,ut=Wt?yt.nextElementSibling:yt.parentElement;if(!(Pt&&ut))return;Pt.classList.toggle("open");let Xt=Pt.classList.contains("open");Kt(Pt,!Xt);let At=ut.dataset.folderpath;Jt(zt,At);let gt=JSON.stringify(zt);localStorage.setItem("fileTree",gt)}function It(){let pt=document.getElementById("explorer");if(!pt)return;if(pt.dataset.behavior==="collapse")for(let At of document.getElementsByClassName("folder-button"))At.addEventListener("click",Nt),window.addCleanup(()=>At.removeEventListener("click",Nt));pt.addEventListener("click",Zt),window.addCleanup(()=>pt.removeEventListener("click",Zt));for(let At of document.getElementsByClassName("folder-icon"))At.addEventListener("click",Nt),window.addCleanup(()=>At.removeEventListener("click",Nt));let yt=localStorage.getItem("fileTree"),Wt=pt?.dataset.savestate==="true",Pt=yt&&Wt?JSON.parse(yt):[],ut=new Map(Pt.map(At=>[At.path,At.collapsed])),Xt=pt.dataset.tree?JSON.parse(pt.dataset.tree):[];zt=[];for(let{path:At,collapsed:gt}of Xt)zt.push({path:At,collapsed:ut.get(At)??gt});zt.map(At=>{let gt=document.querySelector(`[data-folderpath='${At.path}']`)?.parentElement?.nextElementSibling;gt&&Kt(gt,At.collapsed)})}window.addEventListener("resize",It),document.addEventListener("nav",()=>{It(),Yt.disconnect();let pt=document.getElementById("explorer-end");pt&&Yt.observe(pt)});function Kt(pt,yt){return yt?pt.classList.remove("open"):pt.classList.add("open")}function Jt(pt,yt){let Wt=pt.find(Pt=>Pt.path===yt);Wt&&(Wt.collapsed=!Wt.collapsed)}}(),function(){var zt=Object.create,Yt=Object.defineProperty,Zt=Object.getOwnPropertyDescriptor,Nt=Object.getOwnPropertyNames,It=Object.getPrototypeOf,Kt=Object.prototype.hasOwnProperty,Jt=(n,i)=>()=>(i||n((i={exports:{}}).exports,i),i.exports),pt=(n,i,a,u)=>{if(i&&typeof i=="object"||typeof i=="function")for(let l of Nt(i))!Kt.call(n,l)&&l!==a&&Yt(n,l,{get:()=>i[l],enumerable:!(u=Zt(i,l))||u.enumerable});return n},yt=(n,i,a)=>(a=n!=null?zt(It(n)):{},pt(i||!n||!n.__esModule?Yt(a,"default",{value:n,enumerable:!0}):a,n)),Wt=Jt(()=>{}),Pt=Jt((n,i)=>{"use strict";i.exports=u;function a(h){return h instanceof Buffer?Buffer.from(h):new h.constructor(h.buffer.slice(),h.byteOffset,h.length)}function u(h){if(h=h||{},h.circles)return l(h);return h.proto?w:m;function y(k,A){for(var b=Object.keys(k),E=new Array(b.length),M=0;M=this.B&&(b||!A[S])){var h=we(E,u,M),y="";switch(this.G){case"full":if(2h;m--)if(m-h>=this.B){var w=we(E,u,M,l,h);y=S.substring(h,m),le(this,A,y,w,n,a)}break}case"reverse":if(1=this.B&&le(this,A,y,we(E,u,M,l,m),n,a);y=""}case"forward":if(1=this.B&&le(this,A,y,h,n,a);break}default:if(this.C&&(h=Math.min(h/this.C(i,S,M)|0,E-1)),le(this,A,S,h,n,a),b&&1=this.B&&!l[S]){l[S]=1;let q=this.l&&S>h;le(this,k,q?h:S,we(y+(u/2>y?0:1),u,M,m-1,w-1),n,a,q?S:h)}}}}}this.m||(this.register[n]=1)}}return this};function we(n,i,a,u,l){return a&&1=this.B&&!a[E])if(this.s||h||this.map[E])w[b++]=E,a[E]=1;else return u;n=w,l=n.length}if(!l)return u;i||(i=100),m=this.depth&&1=u))));E++);if(A){if(h)return O(w,u,0);i[i.length]=w;return}}return!a&&w}function O(n,i,a){return n=n.length===1?n[0]:[].concat.apply([],n),a||n.length>i?n.slice(a,a+i):n}function P(n,i,a,u){return a?(u=u&&i>a,n=(n=n[u?i:a])&&n[u?a:i]):n=n[i],n}ut.contain=function(n){return!!this.register[n]},ut.update=function(n,i){return this.remove(n).add(n,i)},ut.remove=function(n,i){let a=this.register[n];if(a){if(this.m)for(let u=0,l;u"u"&&(y=new Promise(k=>{h=k}));let m,w;switch(l||(l=0)){case 0:if(m="reg",this.m){w=gt();for(let k in this.register)w[k]=1}else w=this.register;break;case 1:m="cfg",w={doc:0,opt:this.s?1:0};break;case 2:m="map",w=this.map;break;case 3:m="ctx",w=this.h;break;default:typeof a>"u"&&h&&h();return}return Ne(n,i||this,a,m,u,l,w,h),y},ut.import=function(n,i){if(i)switch(jt(i)&&(i=JSON.parse(i)),n){case"cfg":this.s=!!i.opt;break;case"reg":this.m=!1,this.register=i;break;case"map":this.map=i;break;case"ctx":this.h=i}},He(oe.prototype);function X(n){n=n.data;var i=self._index;let a=n.args;var u=n.task;switch(u){case"init":u=n.options||{},n=n.factory,i=u.encode,u.cache=!1,i&&i.indexOf("function")===0&&(u.encode=Function("return "+i)()),n?(Function("return "+n)()(self),self._index=new self.FlexSearch.Index(u),delete self.FlexSearch):self._index=new oe(u);break;default:n=n.id,i=i[u].apply(i,a),postMessage(u==="search"?{id:n,msg:i}:{id:n})}}var nt=0;function K(n){if(!(this instanceof K))return new K(n);var i;n?qt(i=n.encode)&&(n.encode=i.toString()):n={},(i=(self||window)._factory)&&(i=i.toString());let a=typeof window>"u"&&self.exports,u=this;this.o=Et(i,a,n.worker),this.h=gt(),this.o&&(a?this.o.on("message",function(l){u.h[l.id](l.msg),delete u.h[l.id]}):this.o.onmessage=function(l){l=l.data,u.h[l.id](l.msg),delete u.h[l.id]},this.o.postMessage({task:"init",factory:i,options:n}))}Z("add"),Z("append"),Z("search"),Z("update"),Z("remove");function Z(n){K.prototype[n]=K.prototype[n+"Async"]=function(){let i=this,a=[].slice.call(arguments);var u=a[a.length-1];let l;return qt(u)&&(l=u,a.splice(a.length-1,1)),u=new Promise(function(h){setTimeout(function(){i.h[++nt]=h,i.o.postMessage({task:n,id:nt,args:a})})}),l?(u.then(l),this):u}}function Et(n,i,a){let u;try{u=i?new(Wt()).Worker(__dirname+"/node/node.js"):n?new Worker(URL.createObjectURL(new Blob(["onmessage="+X.toString()],{type:"text/javascript"}))):new Worker(jt(a)?a:"worker/worker.js",{type:"module"})}catch{}return u}function mt(n){if(!(this instanceof mt))return new mt(n);var i=n.document||n.doc||n,a;this.K=[],this.h=[],this.A=[],this.register=gt(),this.key=(a=i.key||i.id)&&it(a,this.A)||"id",this.m=Xt(n.fastupdate),this.C=(a=i.store)&&a!==!0&&[],this.store=a&>(),this.I=(a=i.tag)&&it(a,this.A),this.l=a&>(),this.cache=(a=n.cache)&&new Le(a),n.cache=!1,this.o=n.worker,this.async=!1,a=gt();let u=i.index||i.field||i;jt(u)&&(u=[u]);for(let l=0,h,y;li||a)&&(l=l.slice(a,a+i)),u&&(l=tt.call(this,l)),{tag:n,result:l}}function tt(n){let i=Array(n.length);for(let a=0,u;a"u"&&(y=new Promise(m=>{h=m})),l||(l=0),u||(u=0),un?.removeEventListener("click",a)),document.addEventListener("keydown",u),window.addCleanup(()=>document.removeEventListener("keydown",u))}function Ye(n){for(;n.firstChild;)n.removeChild(n.firstChild)}var Hn=Object.hasOwnProperty,hn=yt(Pt(),1),je=(0,hn.default)();function Ln(n){let i=gn(dn(n,"index"),!0);return i.length===0?"/":i}var pn=(n,i,a)=>{let u=new URL(n.getAttribute(i),a);n.setAttribute(i,u.pathname+u.hash)};function Nn(n,i){n.querySelectorAll('[href^="./"], [href^="../"]').forEach(a=>pn(a,"href",i)),n.querySelectorAll('[src^="./"], [src^="../"]').forEach(a=>pn(a,"src",i))}function On(n){let i=n.split("/").filter(a=>a!=="").slice(0,-1).map(a=>"..").join("/");return i.length===0&&(i="."),i}function Ke(n,i){return Fe(On(n),Ln(i))}function Fe(...n){return n.filter(i=>i!=="").join("/").replace(/\/\/+/g,"/")}function nn(n,i){return n===i||n.endsWith("/"+i)}function dn(n,i){return nn(n,i)&&(n=n.slice(0,-i.length)),n}function gn(n,i){return n.startsWith("/")&&(n=n.substring(1)),!i&&n.endsWith("/")&&(n=n.slice(0,-1)),n}var xe="basic",ne="",jn=n=>n.toLowerCase().split(/([^a-z]|[^\x00-\x7F])/),$e=new en.Document({charset:"latin:extra",encode:jn,document:{id:"id",tag:"tags",index:[{field:"title",tokenize:"forward"},{field:"content",tokenize:"forward"},{field:"tags",tokenize:"forward"}]}}),Cn=new DOMParser,mn=new Map,Ue=30,rn=8,yn=5,vn=n=>{let i=n.split(/\s+/).filter(u=>u.trim()!==""),a=i.length;if(a>1)for(let u=1;ul.length-u.length)};function wn(n,i,a){let u=vn(n),l=i.split(/\s+/).filter(w=>w!==""),h=0,y=l.length-1;if(a){let w=E=>u.some(M=>E.toLowerCase().startsWith(M.toLowerCase())),k=l.map(w),A=0,b=0;for(let E=0;ES+(q?1:0),0);M>=A&&(A=M,b=E)}h=Math.max(b-Ue,0),y=Math.min(h+2*Ue,l.length-1),l=l.slice(h,y)}let m=l.map(w=>{for(let k of u)if(w.toLowerCase().includes(k.toLowerCase())){let A=new RegExp(k.toLowerCase(),"gi");return w.replace(A,'$&')}return w}).join(" ");return`${h===0?"":"..."}${m}${y===l.length-1?"":"..."}`}function xn(n,i){let a=new DOMParser,u=vn(n),l=a.parseFromString(i.innerHTML,"text/html"),h=m=>{let w=document.createElement("span");return w.className="highlight",w.textContent=m,w},y=(m,w)=>{if(m.nodeType===Node.TEXT_NODE){let k=m.nodeValue??"",A=new RegExp(w.toLowerCase(),"gi"),b=k.match(A);if(!b||b.length===0)return;let E=document.createElement("span"),M=0;for(let S of b){let q=k.indexOf(S,M);E.appendChild(document.createTextNode(k.slice(M,q))),E.appendChild(h(S)),M=q+S.length}E.appendChild(document.createTextNode(k.slice(M))),m.parentNode?.replaceChild(E,m)}else if(m.nodeType===Node.ELEMENT_NODE){if(m.classList.contains("highlight"))return;Array.from(m.childNodes).forEach(k=>y(k,w))}};for(let m of u)y(l.body,m);return l.body}document.addEventListener("nav",async n=>{let i=n.detail.url,a=await fetchData,u=document.getElementById("search-container"),l=u?.closest(".sidebar"),h=document.getElementById("search-icon"),y=document.getElementById("search-bar"),m=document.getElementById("search-layout"),w=Object.keys(a),k=U=>{m?.querySelector(`#${U.id}`)===null&&m?.appendChild(U)},A=m?.dataset?.preview==="true",b,E,M=document.createElement("div");M.id="results-container",k(M),A&&(b=document.createElement("div"),b.id="preview-container",k(b));function S(){u?.classList.remove("active"),y&&(y.value=""),l&&(l.style.zIndex="unset"),M&&Ye(M),b&&Ye(b),m&&m.classList.remove("display-results"),xe="basic"}function q(U){xe=U,l&&(l.style.zIndex="1"),u?.classList.add("active"),y?.focus()}let F=null;async function et(U){if(U.key==="k"&&(U.ctrlKey||U.metaKey)&&!U.shiftKey){U.preventDefault(),u?.classList.contains("active")?S():q("basic");return}else if(U.shiftKey&&(U.ctrlKey||U.metaKey)&&U.key.toLowerCase()==="k"){U.preventDefault(),u?.classList.contains("active")?S():q("tags"),y&&(y.value="#");return}if(F&&F.classList.remove("focus"),!!u?.classList.contains("active")){if(U.key==="Enter")if(M?.contains(document.activeElement)){let Y=document.activeElement;if(Y.classList.contains("no-match"))return;await fe(Y),Y.click()}else{let Y=document.getElementsByClassName("result-card")[0];if(!Y||Y?.classList.contains("no-match"))return;await fe(Y),Y.click()}else if(U.key==="ArrowUp"||U.shiftKey&&U.key==="Tab"){if(U.preventDefault(),M?.contains(document.activeElement)){let Y=F||document.activeElement,dt=Y?.previousElementSibling;Y?.classList.remove("focus"),dt?.focus(),dt&&(F=dt),await fe(dt)}}else if((U.key==="ArrowDown"||U.key==="Tab")&&(U.preventDefault(),document.activeElement===y||F!==null)){let Y=F||document.getElementsByClassName("result-card")[0],dt=Y?.nextElementSibling;Y?.classList.remove("focus"),dt?.focus(),dt&&(F=dt),await fe(dt)}}}let ft=(U,Y)=>{let dt=w[Y];return{id:Y,slug:dt,title:xe==="tags"?a[dt].title:wn(U,a[dt].title??""),content:wn(U,a[dt].content??"",!0),tags:xt(U.substring(1),a[dt].tags)}};function xt(U,Y){return!Y||xe!=="tags"?[]:Y.map(dt=>dt.toLowerCase().includes(U.toLowerCase())?`#${dt}
`:`#${dt}
`).slice(0,yn)}function $t(U){return new URL(Ke(i,U),location.toString())}let ae=({slug:U,title:Y,content:dt,tags:kt})=>{let bt=kt.length>0?``:"",Dt=document.createElement("a");Dt.classList.add("result-card"),Dt.id=U,Dt.href=$t(U).toString(),Dt.innerHTML=`${Y}
${bt}${A&&window.innerWidth>600?"":`${dt}
`}`,Dt.addEventListener("click",Ut=>{Ut.altKey||Ut.ctrlKey||Ut.metaKey||Ut.shiftKey||S()});let Vt=Ut=>{Ut.altKey||Ut.ctrlKey||Ut.metaKey||Ut.shiftKey||S()};async function me(Ut){if(!Ut.target)return;let Wn=Ut.target;await fe(Wn)}return Dt.addEventListener("mouseenter",me),window.addCleanup(()=>Dt.removeEventListener("mouseenter",me)),Dt.addEventListener("click",Vt),window.addCleanup(()=>Dt.removeEventListener("click",Vt)),Dt};async function re(U){if(M)if(Ye(M),U.length===0?M.innerHTML=`
No results.
Try another search term?
`:M.append(...U.map(ae)),U.length===0&&b)Ye(b);else{let Y=M.firstElementChild;Y.classList.add("focus"),F=Y,await fe(Y)}}async function Lt(U){if(mn.has(U))return mn.get(U);let Y=$t(U).toString(),dt=await fetch(Y).then(kt=>kt.text()).then(kt=>{if(kt===void 0)throw new Error(`Could not fetch ${Y}`);let bt=Cn.parseFromString(kt??"","text/html");return Nn(bt,Y),[...bt.getElementsByClassName("popover-hint")]});return mn.set(U,dt),dt}async function fe(U){if(!m||!A||!U||!b)return;let Y=U.id,dt=await Lt(Y).then(kt=>kt.flatMap(bt=>[...xn(ne,bt).children]));E=document.createElement("div"),E.classList.add("preview-inner"),E.append(...dt),b.replaceChildren(E),[...b.querySelectorAll(".highlight")].sort((kt,bt)=>bt.innerHTML.length-kt.innerHTML.length)[0]?.scrollIntoView({block:"start"})}async function Qt(U){if(!m||!$e)return;ne=U.target.value,m.classList.toggle("display-results",ne!==""),xe=ne.startsWith("#")?"tags":"basic";let Y;if(xe==="tags"){ne=ne.substring(1).trim();let bt=ne.indexOf(" ");if(bt!=-1){let Dt=ne.substring(0,bt),Vt=ne.substring(bt+1).trim();Y=await $e.searchAsync({query:Vt,limit:Math.max(rn,1e4),index:["title","content"],tag:Dt});for(let me of Y)me.result=me.result.slice(0,rn);xe="basic",ne=Vt}else Y=await $e.searchAsync({query:ne,limit:rn,index:["tags"]})}else xe==="basic"&&(Y=await $e.searchAsync({query:ne,limit:rn,index:["title","content"]}));let dt=bt=>{let Dt=Y.filter(Vt=>Vt.field===bt);return Dt.length===0?[]:[...Dt[0].result]},kt=[...new Set([...dt("title"),...dt("content"),...dt("tags")])].map(bt=>ft(ne,bt));await re(kt)}document.addEventListener("keydown",et),window.addCleanup(()=>document.removeEventListener("keydown",et)),h?.addEventListener("click",()=>q("basic")),window.addCleanup(()=>h?.removeEventListener("click",()=>q("basic"))),y?.addEventListener("input",Qt),window.addCleanup(()=>y?.removeEventListener("input",Qt)),Sn(u,S),await p(a)});async function p(n){let i=0,a=[];for(let[u,l]of Object.entries(n))a.push($e.addAsync(i++,{id:i,slug:u,title:l.title,content:l.content,tags:l.tags}));return await Promise.all(a)}}(),function(){var zt=Object.create,Yt=Object.defineProperty,Zt=Object.getOwnPropertyDescriptor,Nt=Object.getOwnPropertyNames,It=Object.getPrototypeOf,Kt=Object.prototype.hasOwnProperty,Jt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),pt=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Nt(e))!Kt.call(t,s)&&s!==r&&Yt(t,s,{get:()=>e[s],enumerable:!(o=Zt(e,s))||o.enumerable});return t},yt=(t,e,r)=>(r=t!=null?zt(It(t)):{},pt(e||!t||!t.__esModule?Yt(r,"default",{value:t,enumerable:!0}):r,t)),Wt=Jt((t,e)=>{"use strict";e.exports=o;function r(c){return c instanceof Buffer?Buffer.from(c):new c.constructor(c.buffer.slice(),c.byteOffset,c.length)}function o(c){if(c=c||{},c.circles)return s(c);return c.proto?v:d;function f(g,x){for(var L=Object.keys(g),_=new Array(L.length),N=0;N{}};function ut(){for(var t=0,e=arguments.length,r={},o;t=0&&(o=r.slice(s+1),r=r.slice(0,s)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:o}})}Xt.prototype=ut.prototype={constructor:Xt,on:function(t,e){var r=this._,o=At(t+"",r),s,c=-1,f=o.length;if(arguments.length<2){for(;++c0)for(var r=new Array(s),o=0,s,c;o=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),qt.hasOwnProperty(e)?{space:qt[e],local:t}:t}function Te(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Ft&&e.documentElement.namespaceURI===Ft?e.createElement(t):e.createElementNS(r,t)}}function ke(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ye(t){var e=pe(t);return(e.local?ke:Te)(e)}function ve(){}function Ot(t){return t==null?ve:function(){return this.querySelector(t)}}function Ge(t){typeof t!="function"&&(t=Ot(t));for(var e=this._groups,r=e.length,o=new Array(r),s=0;s=rt&&(rt=I+1);!(G=B[rt])&&++rt=0;)(f=o[s])&&(c&&f.compareDocumentPosition(c)^4&&c.parentNode.insertBefore(f,c),c=f);return this}function wt(t){t||(t=tt);function e(L,_){return L&&_?t(L.__data__,_.__data__):!L-!_}for(var r=this._groups,o=r.length,s=new Array(o),c=0;ce?1:t>=e?0:NaN}function Tt(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function ce(){return Array.from(this)}function ee(){for(var t=this._groups,e=0,r=t.length;e1?this.each((e==null?Sn:typeof e=="function"?Hn:Ye)(t,e,r??"")):je(this.node(),t)}function je(t,e){return t.style.getPropertyValue(e)||en(t).getComputedStyle(t,null).getPropertyValue(e)}function Ln(t){return function(){delete this[t]}}function pn(t,e){return function(){this[t]=e}}function Nn(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function On(t,e){return arguments.length>1?this.each((e==null?Ln:typeof e=="function"?Nn:pn)(t,e)):this.node()[t]}function Ke(t){return t.trim().split(/^|\s+/)}function Fe(t){return t.classList||new nn(t)}function nn(t){this._node=t,this._names=Ke(t.getAttribute("class")||"")}nn.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 dn(t,e){for(var r=Fe(t),o=-1,s=e.length;++o=0&&(r=e.slice(o+1),e=e.slice(0,o)),{type:e,name:r}})}function S(t){return function(){var e=this.__on;if(e){for(var r=0,o=-1,s=e.length,c;r()=>t;function ur(t,{sourceEvent:e,subject:r,target:o,identifier:s,active:c,x:f,y:d,dx:v,dy:g,dispatch:x}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:c,enumerable:!0,configurable:!0},x:{value:f,enumerable:!0,configurable:!0},y:{value:d,enumerable:!0,configurable:!0},dx:{value:v,enumerable:!0,configurable:!0},dy:{value:g,enumerable:!0,configurable:!0},_:{value:x}})}ur.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function pi(t){return!t.ctrlKey&&!t.button}function di(){return this.parentNode}function gi(t,e){return e??{x:t.x,y:t.y}}function mi(){return navigator.maxTouchPoints||"ontouchstart"in this}function yi(){var t=pi,e=di,r=gi,o=mi,s={},c=jt("start","drag","end"),f=0,d,v,g,x,L=0;function _(D){D.on("mousedown.drag",N).filter(o).on("touchstart.drag",B).on("touchmove.drag",C,Dt).on("touchend.drag touchcancel.drag",I).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function N(D,G){if(!(x||!t.call(this,D,G))){var ot=rt(this,e.call(this,D,G),D,G,"mouse");ot&&(Y(D.view).on("mousemove.drag",z,Vt).on("mouseup.drag",T,Vt),Wn(D.view),me(D),g=!1,d=D.clientX,v=D.clientY,ot("start",D))}}function z(D){if(Ut(D),!g){var G=D.clientX-d,ot=D.clientY-v;g=G*G+ot*ot>L}s.mouse("drag",D)}function T(D){Y(D.view).on("mousemove.drag mouseup.drag",null),Mr(D.view,g),Ut(D),s.mouse("end",D)}function B(D,G){if(t.call(this,D,G)){var ot=D.changedTouches,lt=e.call(this,D,G),St=ot.length,Bt,Rt;for(Bt=0;Bt>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Kn(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Kn(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=wi.exec(t))?new he(e[1],e[2],e[3],1):(e=xi.exec(t))?new he(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=bi.exec(t))?Kn(e[1],e[2],e[3],e[4]):(e=_i.exec(t))?Kn(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Ai.exec(t))?Tr(e[1],e[2]/100,e[3]/100,1):(e=Ei.exec(t))?Tr(e[1],e[2]/100,e[3]/100,e[4]):Lr.hasOwnProperty(t)?jr(Lr[t]):t==="transparent"?new he(NaN,NaN,NaN,0):null}function jr(t){return new he(t>>16&255,t>>8&255,t&255,1)}function Kn(t,e,r,o){return o<=0&&(t=e=r=NaN),new he(t,e,r,o)}function Si(t){return t instanceof Dn||(t=zn(t)),t?(t=t.rgb(),new he(t.r,t.g,t.b,t.opacity)):new he}function Fn(t,e,r,o){return arguments.length===1?Si(t):new he(t,e,r,o??1)}function he(t,e,r,o){this.r=+t,this.g=+e,this.b=+r,this.opacity=+o}lr(he,Fn,Sr(Dn,{brighter(t){return t=t==null?Yn:Math.pow(Yn,t),new he(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Tn:Math.pow(Tn,t),new he(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new he(on(this.r),on(this.g),on(this.b),Un(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:Cr,formatHex:Cr,formatHex8:Li,formatRgb:Dr,toString:Dr}));function Cr(){return`#${an(this.r)}${an(this.g)}${an(this.b)}`}function Li(){return`#${an(this.r)}${an(this.g)}${an(this.b)}${an((isNaN(this.opacity)?1:this.opacity)*255)}`}function Dr(){let t=Un(this.opacity);return`${t===1?"rgb(":"rgba("}${on(this.r)}, ${on(this.g)}, ${on(this.b)}${t===1?")":`, ${t})`}`}function Un(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function on(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function an(t){return t=on(t),(t<16?"0":"")+t.toString(16)}function Tr(t,e,r,o){return o<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new be(t,e,r,o)}function Br(t){if(t instanceof be)return new be(t.h,t.s,t.l,t.opacity);if(t instanceof Dn||(t=zn(t)),!t)return new be;if(t instanceof be)return t;t=t.rgb();var e=t.r/255,r=t.g/255,o=t.b/255,s=Math.min(e,r,o),c=Math.max(e,r,o),f=NaN,d=c-s,v=(c+s)/2;return d?(e===c?f=(r-o)/d+(r0&&v<1?0:f,new be(f,d,v,t.opacity)}function Ni(t,e,r,o){return arguments.length===1?Br(t):new be(t,e,r,o??1)}function be(t,e,r,o){this.h=+t,this.s=+e,this.l=+r,this.opacity=+o}lr(be,Ni,Sr(Dn,{brighter(t){return t=t==null?Yn:Math.pow(Yn,t),new be(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Tn:Math.pow(Tn,t),new be(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,r=this.l,o=r+(r<.5?r:1-r)*e,s=2*r-o;return new he(cr(t>=240?t-240:t+120,s,o),cr(t,s,o),cr(t<120?t+240:t-120,s,o),this.opacity)},clamp(){return new be(zr(this.h),Jn(this.s),Jn(this.l),Un(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(){let t=Un(this.opacity);return`${t===1?"hsl(":"hsla("}${zr(this.h)}, ${Jn(this.s)*100}%, ${Jn(this.l)*100}%${t===1?")":`, ${t})`}`}}));function zr(t){return t=(t||0)%360,t<0?t+360:t}function Jn(t){return Math.max(0,Math.min(1,t||0))}function cr(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}function Pr(t,e,r,o,s){var c=t*t,f=c*t;return((1-3*t+3*c-f)*e+(4-6*c+3*f)*r+(1+3*t+3*c-3*f)*o+f*s)/6}function Oi(t){var e=t.length-1;return function(r){var o=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),s=t[o],c=t[o+1],f=o>0?t[o-1]:2*s-c,d=o()=>t;function Ci(t,e){return function(r){return t+r*e}}function Di(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(o){return Math.pow(t+o*e,r)}}function Ti(t){return(t=+t)==1?qr:function(e,r){return r-e?Di(e,r,t):$r(isNaN(e)?r:e)}}function qr(t,e){var r=e-t;return r?Ci(t,r):$r(isNaN(t)?e:t)}var Rr=function t(e){var r=Ti(e);function o(s,c){var f=r((s=Fn(s)).r,(c=Fn(c)).r),d=r(s.g,c.g),v=r(s.b,c.b),g=qr(s.opacity,c.opacity);return function(x){return s.r=f(x),s.g=d(x),s.b=v(x),s.opacity=g(x),s+""}}return o.gamma=t,o}(1);function Ir(t){return function(e){var r=e.length,o=new Array(r),s=new Array(r),c=new Array(r),f,d;for(f=0;fr&&(c=e.slice(r,c),d[f]?d[f]+=c:d[++f]=c),(o=o[0])===(s=s[0])?d[f]?d[f]+=s:d[++f]=s:(d[++f]=null,v.push({i:f,x:Je(o,s)})),r=hr.lastIndex;return r180?x+=360:x-g>180&&(g+=360),_.push({i:L.push(s(L)+"rotate(",null,o)-2,x:Je(g,x)})):x&&L.push(s(L)+"rotate("+x+o)}function d(g,x,L,_){g!==x?_.push({i:L.push(s(L)+"skewX(",null,o)-2,x:Je(g,x)}):x&&L.push(s(L)+"skewX("+x+o)}function v(g,x,L,_,N,z){if(g!==L||x!==_){var T=N.push(s(N)+"scale(",null,",",null,")");z.push({i:T-4,x:Je(g,L)},{i:T-2,x:Je(x,_)})}else(L!==1||_!==1)&&N.push(s(N)+"scale("+L+","+_+")")}return function(g,x){var L=[],_=[];return g=t(g),x=t(x),c(g.translateX,g.translateY,x.translateX,x.translateY,L,_),f(g.rotate,x.rotate,L,_),d(g.skewX,x.skewX,L,_),v(g.scaleX,g.scaleY,x.scaleX,x.scaleY,L,_),g=x=null,function(N){for(var z=-1,T=_.length,B;++z=0&&t._call.call(void 0,e),t=t._next;--_n}function Fr(){sn=(Zn=Rn.now())+tr,_n=Pn=0;try{Ki()}finally{_n=0,Ui(),sn=0}}function Fi(){var t=Rn.now(),e=t-Zn;e>Yr&&(tr-=e,Zn=t)}function Ui(){for(var t,e=Qn,r,o=1/0;e;)e._call?(o>e._time&&(o=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:Qn=r);qn=t,mr(o)}function mr(t){if(!_n){Pn&&(Pn=clearTimeout(Pn));var e=t-sn;e>24?(t<1/0&&(Pn=setTimeout(Fr,t-Rn.now()-tr)),$n&&($n=clearInterval($n))):($n||(Zn=Rn.now(),$n=setInterval(Fi,Yr)),_n=1,Kr(Fr))}}function Ur(t,e,r){var o=new er;return e=e==null?0:+e,o.restart(s=>{o.stop(),t(s+e)},e,r),o}var Ji=jt("start","end","cancel","interrupt"),Gi=[],Jr=0,Gr=1,yr=2,nr=3,Qr=4,vr=5,rr=6;function ir(t,e,r,o,s,c){var f=t.__transition;if(!f)t.__transition={};else if(r in f)return;Qi(t,r,{name:e,index:o,group:s,on:Ji,tween:Gi,time:c.time,delay:c.delay,duration:c.duration,ease:c.ease,timer:null,state:Jr})}function wr(t,e){var r=_e(t,e);if(r.state>Jr)throw new Error("too late; already scheduled");return r}function De(t,e){var r=_e(t,e);if(r.state>nr)throw new Error("too late; already running");return r}function _e(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function Qi(t,e,r){var o=t.__transition,s;o[e]=r,r.timer=gr(c,0,r.time);function c(g){r.state=Gr,r.timer.restart(f,r.delay,r.time),r.delay<=g&&f(g-r.delay)}function f(g){var x,L,_,N;if(r.state!==Gr)return v();for(x in o)if(N=o[x],N.name===r.name){if(N.state===nr)return Ur(f);N.state===Qr?(N.state=rr,N.timer.stop(),N.on.call("interrupt",t,t.__data__,N.index,N.group),delete o[x]):+xyr&&o.state=0&&(e=e.slice(0,r)),!e||e==="start"})}function No(t,e,r){var o,s,c=Lo(e)?wr:De;return function(){var f=c(this,t),d=f.on;d!==o&&(s=(o=d).copy()).on(e,r),f.on=s}}function Oo(t,e){var r=this._id;return arguments.length<2?_e(this.node(),r).on.on(t):this.each(No(r,t,e))}function jo(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function Co(){return this.on("end.remove",jo(this._id))}function Do(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Ot(t));for(var o=this._groups,s=o.length,c=new Array(s),f=0;f=(L=(d+g)/2))?d=L:g=L,(B=r>=(_=(v+x)/2))?v=_:x=_,s=c,!(c=c[C=B<<1|T]))return s[C]=f,t;if(N=+t._x.call(null,c.data),z=+t._y.call(null,c.data),e===N&&r===z)return f.next=c,s?s[C]=f:t._root=f,t;do s=s?s[C]=new Array(4):t._root=new Array(4),(T=e>=(L=(d+g)/2))?d=L:g=L,(B=r>=(_=(v+x)/2))?v=_:x=_;while((C=B<<1|T)===(I=(z>=_)<<1|N>=L));return s[I]=c,s[C]=f,t}function ua(t){var e,r,o=t.length,s,c,f=new Array(o),d=new Array(o),v=1/0,g=1/0,x=-1/0,L=-1/0;for(r=0;rx&&(x=s),cL&&(L=c));if(v>x||g>L)return this;for(this.cover(v,g).cover(x,L),r=0;rt||t>=s||o>e||e>=c;)switch(g=(ex||(d=z.y0)>L||(v=z.x1)=C)<<1|t>=B)&&(z=_[_.length-1],_[_.length-1]=_[_.length-1-T],_[_.length-1-T]=z)}else{var I=t-+this._x.call(null,N.data),rt=e-+this._y.call(null,N.data),D=I*I+rt*rt;if(D=(_=(f+v)/2))?f=_:v=_,(T=L>=(N=(d+g)/2))?d=N:g=N,e=r,!(r=r[B=T<<1|z]))return this;if(!r.length)break;(e[B+1&3]||e[B+2&3]||e[B+3&3])&&(o=e,C=B)}for(;r.data!==t;)if(s=r,!(r=r.next))return this;return(c=r.next)&&delete r.next,s?(c?s.next=c:delete s.next,this):e?(c?e[B]=c:delete e[B],(r=e[0]||e[1]||e[2]||e[3])&&r===(e[3]||e[2]||e[1]||e[0])&&!r.length&&(o?o[C]=r:this._root=r),this):(this._root=c,this)}function da(t){for(var e=0,r=t.length;e[e(G,ot,f),G])),D;for(B=0,d=new Array(C);B(t=(1664525*t+1013904223)%4294967296)/4294967296}function Ma(t){return t.x}function Sa(t){return t.y}var La=10,Na=Math.PI*(3-Math.sqrt(5));function Oa(t){var e,r=1,o=.001,s=1-Math.pow(o,1/300),c=0,f=.6,d=new Map,v=gr(L),g=jt("tick","end"),x=ka();t==null&&(t=[]);function L(){_(),g.call("tick",e),r1?(B==null?d.delete(T):d.set(T,z(B)),e):d.get(T)},find:function(T,B,C){var I=0,rt=t.length,D,G,ot,lt,St;for(C==null?C=1/0:C*=C,I=0;I