-
Notifications
You must be signed in to change notification settings - Fork 0
/
postscript.js
5 lines (5 loc) · 56.6 KB
/
postscript.js
1
2
3
4
5
(function(){var De='<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg>',de='<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true"><path fill-rule="evenodd" fill="rgb(63, 185, 80)" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg>';document.addEventListener("nav",()=>{let ve=document.getElementsByTagName("pre");for(let pe=0;pe<ve.length;pe++){let Se=ve[pe].getElementsByTagName("code")[0];if(Se){let me=function(){navigator.clipboard.writeText(Te).then(()=>{X.blur(),X.innerHTML=de,setTimeout(()=>{X.innerHTML=De,X.style.borderColor=""},2e3)},Be=>console.error(Be))};var Ie=me;let Te=Se.innerText.replace(/\n\n/g,`
`),X=document.createElement("button");X.className="clipboard-button",X.type="button",X.innerHTML=De,X.ariaLabel="Copy source",X.addEventListener("click",me),window.addCleanup(()=>X.removeEventListener("click",me)),ve[pe].prepend(X)}}})})(),function(){var De=Object.create,de=Object.defineProperty,ve=Object.getOwnPropertyDescriptor,Ie=Object.getOwnPropertyNames,pe=Object.getPrototypeOf,Se=Object.prototype.hasOwnProperty,me=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Te=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ie(t))!Se.call(e,i)&&i!==n&&de(e,i,{get:()=>t[i],enumerable:!(r=ve(t,i))||r.enumerable});return e},X=(e,t,n)=>(n=e!=null?De(pe(e)):{},Te(t||!e||!e.__esModule?de(n,"default",{value:e,enumerable:!0}):n,e)),Be=me(()=>{}),ae=me((e,t)=>{"use strict";t.exports=r;function n(a){return a instanceof Buffer?Buffer.from(a):new a.constructor(a.buffer.slice(),a.byteOffset,a.length)}function r(a){if(a=a||{},a.circles)return i(a);return a.proto?h:s;function l(f,p){for(var d=Object.keys(f),u=new Array(d.length),y=0;y<d.length;y++){var g=d[y],v=f[g];typeof v!="object"||v===null?u[g]=v:v instanceof Date?u[g]=new Date(v):ArrayBuffer.isView(v)?u[g]=n(v):u[g]=p(v)}return u}function s(f){if(typeof f!="object"||f===null)return f;if(f instanceof Date)return new Date(f);if(Array.isArray(f))return l(f,s);if(f instanceof Map)return new Map(l(Array.from(f),s));if(f instanceof Set)return new Set(l(Array.from(f),s));var p={};for(var d in f)if(Object.hasOwnProperty.call(f,d)!==!1){var u=f[d];typeof u!="object"||u===null?p[d]=u:u instanceof Date?p[d]=new Date(u):u instanceof Map?p[d]=new Map(l(Array.from(u),s)):u instanceof Set?p[d]=new Set(l(Array.from(u),s)):ArrayBuffer.isView(u)?p[d]=n(u):p[d]=s(u)}return p}function h(f){if(typeof f!="object"||f===null)return f;if(f instanceof Date)return new Date(f);if(Array.isArray(f))return l(f,h);if(f instanceof Map)return new Map(l(Array.from(f),h));if(f instanceof Set)return new Set(l(Array.from(f),h));var p={};for(var d in f){var u=f[d];typeof u!="object"||u===null?p[d]=u:u instanceof Date?p[d]=new Date(u):u instanceof Map?p[d]=new Map(l(Array.from(u),h)):u instanceof Set?p[d]=new Set(l(Array.from(u),h)):ArrayBuffer.isView(u)?p[d]=n(u):p[d]=h(u)}return p}}function i(a){var l=[],s=[];return a.proto?p:f;function h(d,u){for(var y=Object.keys(d),g=new Array(y.length),v=0;v<y.length;v++){var k=y[v],T=d[k];if(typeof T!="object"||T===null)g[k]=T;else if(T instanceof Date)g[k]=new Date(T);else if(ArrayBuffer.isView(T))g[k]=n(T);else{var $=l.indexOf(T);$!==-1?g[k]=s[$]:g[k]=u(T)}}return g}function f(d){if(typeof d!="object"||d===null)return d;if(d instanceof Date)return new Date(d);if(Array.isArray(d))return h(d,f);if(d instanceof Map)return new Map(h(Array.from(d),f));if(d instanceof Set)return new Set(h(Array.from(d),f));var u={};l.push(d),s.push(u);for(var y in d)if(Object.hasOwnProperty.call(d,y)!==!1){var g=d[y];if(typeof g!="object"||g===null)u[y]=g;else if(g instanceof Date)u[y]=new Date(g);else if(g instanceof Map)u[y]=new Map(h(Array.from(g),f));else if(g instanceof Set)u[y]=new Set(h(Array.from(g),f));else if(ArrayBuffer.isView(g))u[y]=n(g);else{var v=l.indexOf(g);v!==-1?u[y]=s[v]:u[y]=f(g)}}return l.pop(),s.pop(),u}function p(d){if(typeof d!="object"||d===null)return d;if(d instanceof Date)return new Date(d);if(Array.isArray(d))return h(d,p);if(d instanceof Map)return new Map(h(Array.from(d),p));if(d instanceof Set)return new Set(h(Array.from(d),p));var u={};l.push(d),s.push(u);for(var y in d){var g=d[y];if(typeof g!="object"||g===null)u[y]=g;else if(g instanceof Date)u[y]=new Date(g);else if(g instanceof Map)u[y]=new Map(h(Array.from(g),p));else if(g instanceof Set)u[y]=new Set(h(Array.from(g),p));else if(ArrayBuffer.isView(g))u[y]=n(g);else{var v=l.indexOf(g);v!==-1?u[y]=s[v]:u[y]=p(g)}}return l.pop(),s.pop(),u}}}),P;function ue(e){return typeof e<"u"?e:!0}function ne(e){let t=Array(e);for(let n=0;n<e;n++)t[n]=H();return t}function H(){return Object.create(null)}function Re(e,t){return t.length-e.length}function K(e){return typeof e=="string"}function Q(e){return typeof e=="object"}function J(e){return typeof e=="function"}function Ce(e,t){var n=Pe;if(e&&(t&&(e=ge(e,t)),this.H&&(e=ge(e,this.H)),this.J&&1<e.length&&(e=ge(e,this.J)),n||n==="")){if(t=e.split(n),this.filter){e=this.filter,n=t.length;let r=[];for(let i=0,a=0;i<n;i++){let l=t[i];l&&!e[l]&&(r[a++]=l)}e=r}else e=t;return e}return e}var Pe=/[\p{Z}\p{S}\p{P}\p{C}]+/u,Oe=/[\u0300-\u036f]/g;function be(e,t){let n=Object.keys(e),r=n.length,i=[],a="",l=0;for(let s=0,h,f;s<r;s++)h=n[s],(f=e[h])?(i[l++]=W(t?"(?!\\b)"+h+"(\\b|_)":h),i[l++]=f):a+=(a?"|":"")+h;return a&&(i[l++]=W(t?"(?!\\b)("+a+")(\\b|_)":"("+a+")"),i[l]=""),i}function ge(e,t){for(let n=0,r=t.length;n<r&&(e=e.replace(t[n],t[n+1]),e);n+=2);return e}function W(e){return new RegExp(e,"g")}function Ue(e){let t="",n="";for(let r=0,i=e.length,a;r<i;r++)(a=e[r])!==n&&(t+=n=a);return t}var Ne={encode:Ge,F:!1,G:""};function Ge(e){return Ce.call(this,(""+e).toLowerCase(),!1)}var Ve={},Z={};function We(e){ye(e,"add"),ye(e,"append"),ye(e,"search"),ye(e,"update"),ye(e,"remove")}function ye(e,t){e[t+"Async"]=function(){let n=this,r=arguments;var i=r[r.length-1];let a;return J(i)&&(a=i,delete r[r.length-1]),i=new Promise(function(l){setTimeout(function(){n.async=!0;let s=n[t].apply(n,r);n.async=!1,l(s)})}),a?(i.then(a),this):i}}function ee(e,t,n,r){let i=e.length,a=[],l,s,h=0;r&&(r=[]);for(let f=i-1;0<=f;f--){let p=e[f],d=p.length,u=H(),y=!l;for(let g=0;g<d;g++){let v=p[g],k=v.length;if(k)for(let T=0,$,I;T<k;T++)if(I=v[T],l){if(l[I]){if(!f){if(n)n--;else if(a[h++]=I,h===t)return a}(f||r)&&(u[I]=1),y=!0}if(r&&($=(s[I]||0)+1,s[I]=$,$<i)){let Y=r[$-2]||(r[$-2]=[]);Y[Y.length]=I}}else u[I]=1}if(r)l||(s=u);else if(!y)return[];l=u}if(r)for(let f=r.length-1,p,d;0<=f;f--){p=r[f],d=p.length;for(let u=0,y;u<d;u++)if(y=p[u],!l[y]){if(n)n--;else if(a[h++]=y,h===t)return a;l[y]=1}}return a}function qe(e,t){let n=H(),r=H(),i=[];for(let a=0;a<e.length;a++)n[e[a]]=1;for(let a=0,l;a<t.length;a++){l=t[a];for(let s=0,h;s<l.length;s++)h=l[s],n[h]&&!r[h]&&(r[h]=1,i[i.length]=h)}return i}function Le(e){this.l=e!==!0&&e,this.cache=H(),this.h=[]}function $e(e,t,n){Q(e)&&(e=e.query);let r=this.cache.get(e);return r||(r=this.search(e,t,n),this.cache.set(e,r)),r}Le.prototype.set=function(e,t){if(!this.cache[e]){var n=this.h.length;for(n===this.l?delete this.cache[this.h[n-1]]:n++,--n;0<n;n--)this.h[n]=this.h[n-1];this.h[0]=e}this.cache[e]=t},Le.prototype.get=function(e){let t=this.cache[e];if(this.l&&t&&(e=this.h.indexOf(e))){let n=this.h[e-1];this.h[e-1]=this.h[e],this.h[e]=n}return t};var Ke={memory:{charset:"latin:extra",D:3,B:4,m:!1},performance:{D:3,B:3,s:!1,context:{depth:2,D:1}},match:{charset:"latin:extra",G:"reverse"},score:{charset:"latin:advanced",D:20,B:3,context:{depth:3,D:9}},default:{}};function ke(e,t,n,r,i,a,l,s){setTimeout(function(){let h=e(n?n+"."+r:r,JSON.stringify(l));h&&h.then?h.then(function(){t.export(e,t,n,i,a+1,s)}):t.export(e,t,n,i,a+1,s)})}function re(e,t){if(!(this instanceof re))return new re(e);var n;if(e){K(e)?e=Ke[e]:(n=e.preset)&&(e=Object.assign({},n[n],e)),n=e.charset;var r=e.lang;K(n)&&(n.indexOf(":")===-1&&(n+=":default"),n=Z[n]),K(r)&&(r=Ve[r])}else e={};let i,a,l=e.context||{};if(this.encode=e.encode||n&&n.encode||Ge,this.register=t||H(),this.D=i=e.resolution||9,this.G=t=n&&n.G||e.tokenize||"strict",this.depth=t==="strict"&&l.depth,this.l=ue(l.bidirectional),this.s=a=ue(e.optimize),this.m=ue(e.fastupdate),this.B=e.minlength||1,this.C=e.boost,this.map=a?ne(i):H(),this.A=i=l.resolution||1,this.h=a?ne(i):H(),this.F=n&&n.F||e.rtl,this.H=(t=e.matcher||r&&r.H)&&be(t,!1),this.J=(t=e.stemmer||r&&r.J)&&be(t,!0),n=t=e.filter||r&&r.filter){n=t,r=H();for(let s=0,h=n.length;s<h;s++)r[n[s]]=1;n=r}this.filter=n,this.cache=(t=e.cache)&&new Le(t)}P=re.prototype,P.append=function(e,t){return this.add(e,t,!0)},P.add=function(e,t,n,r){if(t&&(e||e===0)){if(!r&&!n&&this.register[e])return this.update(e,t);if(t=this.encode(t),r=t.length){let f=H(),p=H(),d=this.depth,u=this.D;for(let y=0;y<r;y++){let g=t[this.F?r-1-y:y];var i=g.length;if(g&&i>=this.B&&(d||!p[g])){var a=we(u,r,y),l="";switch(this.G){case"full":if(2<i){for(a=0;a<i;a++)for(var s=i;s>a;s--)if(s-a>=this.B){var h=we(u,r,y,i,a);l=g.substring(a,s),se(this,p,l,h,e,n)}break}case"reverse":if(1<i){for(s=i-1;0<s;s--)l=g[s]+l,l.length>=this.B&&se(this,p,l,we(u,r,y,i,s),e,n);l=""}case"forward":if(1<i){for(s=0;s<i;s++)l+=g[s],l.length>=this.B&&se(this,p,l,a,e,n);break}default:if(this.C&&(a=Math.min(a/this.C(t,g,y)|0,u-1)),se(this,p,g,a,e,n),d&&1<r&&y<r-1){for(i=H(),l=this.A,a=g,s=Math.min(d+1,r-y),i[a]=1,h=1;h<s;h++)if((g=t[this.F?r-1-y-h:y+h])&&g.length>=this.B&&!i[g]){i[g]=1;let v=this.l&&g>a;se(this,f,v?a:g,we(l+(r/2>l?0:1),r,y,s-1,h-1),e,n,v?g:a)}}}}}this.m||(this.register[e]=1)}}return this};function we(e,t,n,r,i){return n&&1<e?t+(r||0)<=e?n+(i||0):(e-1)/(t+(r||0))*(n+(i||0))+1|0:0}function se(e,t,n,r,i,a,l){let s=l?e.h:e.map;(!t[n]||l&&!t[n][l])&&(e.s&&(s=s[r]),l?(t=t[n]||(t[n]=H()),t[l]=1,s=s[l]||(s[l]=H())):t[n]=1,s=s[n]||(s[n]=[]),e.s||(s=s[r]||(s[r]=[])),a&&s.includes(i)||(s[s.length]=i,e.m&&(e=e.register[i]||(e.register[i]=[]),e[e.length]=s)))}P.search=function(e,t,n){n||(!t&&Q(e)?(n=e,e=n.query):Q(t)&&(n=t));let r=[],i,a,l=0;if(n){e=n.query||e,t=n.limit,l=n.offset||0;var s=n.context;a=n.suggest}if(e&&(e=this.encode(""+e),i=e.length,1<i)){n=H();var h=[];for(let p=0,d=0,u;p<i;p++)if((u=e[p])&&u.length>=this.B&&!n[u])if(this.s||a||this.map[u])h[d++]=u,n[u]=1;else return r;e=h,i=e.length}if(!i)return r;t||(t=100),s=this.depth&&1<i&&s!==!1,n=0;let f;s?(f=e[0],n=1):1<i&&e.sort(Re);for(let p,d;n<i;n++){if(d=e[n],s?(p=ie(this,r,a,t,l,i===2,d,f),a&&p===!1&&r.length||(f=d)):p=ie(this,r,a,t,l,i===1,d),p)return p;if(a&&n===i-1){if(h=r.length,!h){if(s){s=0,n=-1;continue}return r}if(h===1)return m(r[0],t,l)}}return ee(r,t,l,a)};function ie(e,t,n,r,i,a,l,s){let h=[],f=s?e.h:e.map;if(e.s||(f=w(f,l,s,e.l)),f){let p=0,d=Math.min(f.length,s?e.A:e.D);for(let u=0,y=0,g,v;u<d&&!((g=f[u])&&(e.s&&(g=w(g,l,s,e.l)),i&&g&&a&&(v=g.length,v<=i?(i-=v,g=null):(g=g.slice(i),i=0)),g&&(h[p++]=g,a&&(y+=g.length,y>=r))));u++);if(p){if(a)return m(h,r,0);t[t.length]=h;return}}return!n&&h}function m(e,t,n){return e=e.length===1?e[0]:[].concat.apply([],e),n||e.length>t?e.slice(n,n+t):e}function w(e,t,n,r){return n?(r=r&&t>n,e=(e=e[r?t:n])&&e[r?n:t]):e=e[t],e}P.contain=function(e){return!!this.register[e]},P.update=function(e,t){return this.remove(e).add(e,t)},P.remove=function(e,t){let n=this.register[e];if(n){if(this.m)for(let r=0,i;r<n.length;r++)i=n[r],i.splice(i.indexOf(e),1);else b(this.map,e,this.D,this.s),this.depth&&b(this.h,e,this.A,this.s);if(t||delete this.register[e],this.cache){t=this.cache;for(let r=0,i,a;r<t.h.length;r++)a=t.h[r],i=t.cache[a],i.includes(e)&&(t.h.splice(r--,1),delete t.cache[a])}}return this};function b(e,t,n,r,i){let a=0;if(e.constructor===Array)if(i)t=e.indexOf(t),t!==-1?1<e.length&&(e.splice(t,1),a++):a++;else{i=Math.min(e.length,n);for(let l=0,s;l<i;l++)(s=e[l])&&(a=b(s,t,n,r,i),r||a||delete e[l])}else for(let l in e)(a=b(e[l],t,n,r,i))||delete e[l];return a}P.searchCache=$e,P.export=function(e,t,n,r,i,a){let l=!0;typeof a>"u"&&(l=new Promise(f=>{a=f}));let s,h;switch(i||(i=0)){case 0:if(s="reg",this.m){h=H();for(let f in this.register)h[f]=1}else h=this.register;break;case 1:s="cfg",h={doc:0,opt:this.s?1:0};break;case 2:s="map",h=this.map;break;case 3:s="ctx",h=this.h;break;default:typeof n>"u"&&a&&a();return}return ke(e,t||this,n,s,r,i,h,a),l},P.import=function(e,t){if(t)switch(K(t)&&(t=JSON.parse(t)),e){case"cfg":this.s=!!t.opt;break;case"reg":this.m=!1,this.register=t;break;case"map":this.map=t;break;case"ctx":this.h=t}},We(re.prototype);function A(e){e=e.data;var t=self._index;let n=e.args;var r=e.task;switch(r){case"init":r=e.options||{},e=e.factory,t=r.encode,r.cache=!1,t&&t.indexOf("function")===0&&(r.encode=Function("return "+t)()),e?(Function("return "+e)()(self),self._index=new self.FlexSearch.Index(r),delete self.FlexSearch):self._index=new re(r);break;default:e=e.id,t=t[r].apply(t,n),postMessage(r==="search"?{id:e,msg:t}:{id:e})}}var O=0;function D(e){if(!(this instanceof D))return new D(e);var t;e?J(t=e.encode)&&(e.encode=t.toString()):e={},(t=(self||window)._factory)&&(t=t.toString());let n=typeof window>"u"&&self.exports,r=this;this.o=F(t,n,e.worker),this.h=H(),this.o&&(n?this.o.on("message",function(i){r.h[i.id](i.msg),delete r.h[i.id]}):this.o.onmessage=function(i){i=i.data,r.h[i.id](i.msg),delete r.h[i.id]},this.o.postMessage({task:"init",factory:t,options:e}))}C("add"),C("append"),C("search"),C("update"),C("remove");function C(e){D.prototype[e]=D.prototype[e+"Async"]=function(){let t=this,n=[].slice.call(arguments);var r=n[n.length-1];let i;return J(r)&&(i=r,n.splice(n.length-1,1)),r=new Promise(function(a){setTimeout(function(){t.h[++O]=a,t.o.postMessage({task:e,id:O,args:n})})}),i?(r.then(i),this):r}}function F(e,t,n){let r;try{r=t?new(Be()).Worker(__dirname+"/node/node.js"):e?new Worker(URL.createObjectURL(new Blob(["onmessage="+A.toString()],{type:"text/javascript"}))):new Worker(K(n)?n:"worker/worker.js",{type:"module"})}catch{}return r}function R(e){if(!(this instanceof R))return new R(e);var t=e.document||e.doc||e,n;this.K=[],this.h=[],this.A=[],this.register=H(),this.key=(n=t.key||t.id)&&M(n,this.A)||"id",this.m=ue(e.fastupdate),this.C=(n=t.store)&&n!==!0&&[],this.store=n&&H(),this.I=(n=t.tag)&&M(n,this.A),this.l=n&&H(),this.cache=(n=e.cache)&&new Le(n),e.cache=!1,this.o=e.worker,this.async=!1,n=H();let r=t.index||t.field||t;K(r)&&(r=[r]);for(let i=0,a,l;i<r.length;i++)a=r[i],K(a)||(l=a,a=a.field),l=Q(l)?Object.assign({},e,l):e,this.o&&(n[a]=new D(l),n[a].o||(this.o=!1)),this.o||(n[a]=new re(l,this.register)),this.K[i]=M(a,this.A),this.h[i]=a;if(this.C)for(e=t.store,K(e)&&(e=[e]),t=0;t<e.length;t++)this.C[t]=M(e[t],this.A);this.index=n}function M(e,t){let n=e.split(":"),r=0;for(let i=0;i<n.length;i++)e=n[i],0<=e.indexOf("[]")&&(e=e.substring(0,e.length-2))&&(t[r]=!0),e&&(n[r++]=e);return r<n.length&&(n.length=r),1<r?n:n[0]}function N(e,t){if(K(t))e=e[t];else for(let n=0;e&&n<t.length;n++)e=e[t[n]];return e}function E(e,t,n,r,i){if(e=e[i],r===n.length-1)t[i]=e;else if(e)if(e.constructor===Array)for(t=t[i]=Array(e.length),i=0;i<e.length;i++)E(e,t,n,r,i);else t=t[i]||(t[i]=H()),i=n[++r],E(e,t,n,r,i)}function x(e,t,n,r,i,a,l,s){if(e=e[l])if(r===t.length-1){if(e.constructor===Array){if(n[r]){for(t=0;t<e.length;t++)i.add(a,e[t],!0,!0);return}e=e.join(" ")}i.add(a,e,s,!0)}else if(e.constructor===Array)for(l=0;l<e.length;l++)x(e,t,n,r,i,a,l,s);else l=t[++r],x(e,t,n,r,i,a,l,s)}P=R.prototype,P.add=function(e,t,n){if(Q(e)&&(t=e,e=N(t,this.key)),t&&(e||e===0)){if(!n&&this.register[e])return this.update(e,t);for(let r=0,i,a;r<this.h.length;r++)a=this.h[r],i=this.K[r],K(i)&&(i=[i]),x(t,i,this.A,0,this.index[a],e,i[0],n);if(this.I){let r=N(t,this.I),i=H();K(r)&&(r=[r]);for(let a=0,l,s;a<r.length;a++)if(l=r[a],!i[l]&&(i[l]=1,s=this.l[l]||(this.l[l]=[]),!n||!s.includes(e))&&(s[s.length]=e,this.m)){let h=this.register[e]||(this.register[e]=[]);h[h.length]=s}}if(this.store&&(!n||!this.store[e])){let r;if(this.C){r=H();for(let i=0,a;i<this.C.length;i++)a=this.C[i],K(a)?r[a]=t[a]:E(t,r,a,0,a[0])}this.store[e]=r||t}}return this},P.append=function(e,t){return this.add(e,t,!0)},P.update=function(e,t){return this.remove(e).add(e,t)},P.remove=function(e){if(Q(e)&&(e=N(e,this.key)),this.register[e]){for(var t=0;t<this.h.length&&(this.index[this.h[t]].remove(e,!this.o),!this.m);t++);if(this.I&&!this.m)for(let n in this.l){t=this.l[n];let r=t.indexOf(e);r!==-1&&(1<t.length?t.splice(r,1):delete this.l[n])}this.store&&delete this.store[e],delete this.register[e]}return this},P.search=function(e,t,n,r){n||(!t&&Q(e)?(n=e,e=""):Q(t)&&(n=t,t=0));let i=[],a=[],l,s,h,f,p,d,u=0;if(n)if(n.constructor===Array)h=n,n=null;else{if(e=n.query||e,h=(l=n.pluck)||n.index||n.field,f=n.tag,s=this.store&&n.enrich,p=n.bool==="and",t=n.limit||t||100,d=n.offset||0,f&&(K(f)&&(f=[f]),!e)){for(let g=0,v;g<f.length;g++)(v=V.call(this,f[g],t,d,s))&&(i[i.length]=v,u++);return u?i:[]}K(h)&&(h=[h])}h||(h=this.h),p=p&&(1<h.length||f&&1<f.length);let y=!r&&(this.o||this.async)&&[];for(let g=0,v,k,T;g<h.length;g++){let $;if(k=h[g],K(k)||($=k,k=$.field,e=$.query||e,t=$.limit||t,s=$.enrich||s),y)y[g]=this.index[k].searchAsync(e,t,$||n);else{if(r?v=r[g]:v=this.index[k].search(e,t,$||n),T=v&&v.length,f&&T){let I=[],Y=0;p&&(I[0]=[v]);for(let oe=0,fe,he;oe<f.length;oe++)fe=f[oe],(T=(he=this.l[fe])&&he.length)&&(Y++,I[I.length]=p?[he]:he);Y&&(v=p?ee(I,t||100,d||0):qe(v,I),T=v.length)}if(T)a[u]=k,i[u++]=v;else if(p)return[]}}if(y){let g=this;return new Promise(function(v){Promise.all(y).then(function(k){v(g.search(e,t,n,k))})})}if(!u)return[];if(l&&(!s||!this.store))return i[0];for(let g=0,v;g<a.length;g++){if(v=i[g],v.length&&s&&(v=L.call(this,v)),l)return v;i[g]={field:a[g],result:v}}return i};function V(e,t,n,r){let i=this.l[e],a=i&&i.length-n;if(a&&0<a)return(a>t||n)&&(i=i.slice(n,n+t)),r&&(i=L.call(this,i)),{tag:e,result:i}}function L(e){let t=Array(e.length);for(let n=0,r;n<e.length;n++)r=e[n],t[n]={id:r,doc:this.store[r]};return t}P.contain=function(e){return!!this.register[e]},P.get=function(e){return this.store[e]},P.set=function(e,t){return this.store[e]=t,this},P.searchCache=$e,P.export=function(e,t,n,r,i,a){let l;if(typeof a>"u"&&(l=new Promise(s=>{a=s})),i||(i=0),r||(r=0),r<this.h.length){let s=this.h[r],h=this.index[s];t=this,setTimeout(function(){h.export(e,t,i?s:"",r,i++,a)||(r++,i=1,t.export(e,t,s,r,i,a))})}else{let s,h;switch(i){case 1:s="tag",h=this.l,n=null;break;case 2:s="store",h=this.store,n=null;break;default:a();return}ke(e,this,n,s,r,i,h,a)}return l},P.import=function(e,t){if(t)switch(K(t)&&(t=JSON.parse(t)),e){case"tag":this.l=t;break;case"reg":this.m=!1,this.register=t;for(let r=0,i;r<this.h.length;r++)i=this.index[this.h[r]],i.register=t,i.m=!1;break;case"store":this.store=t;break;default:e=e.split(".");let n=e[0];e=e[1],n&&e&&this.index[n].import(e,t)}},We(R.prototype);var _={encode:te,F:!1,G:""},le=[W("[\xE0\xE1\xE2\xE3\xE4\xE5]"),"a",W("[\xE8\xE9\xEA\xEB]"),"e",W("[\xEC\xED\xEE\xEF]"),"i",W("[\xF2\xF3\xF4\xF5\xF6\u0151]"),"o",W("[\xF9\xFA\xFB\xFC\u0171]"),"u",W("[\xFD\u0177\xFF]"),"y",W("\xF1"),"n",W("[\xE7c]"),"k",W("\xDF"),"s",W(" & ")," and "];function te(e){var t=e=""+e;return t.normalize&&(t=t.normalize("NFD").replace(Oe,"")),Ce.call(this,t.toLowerCase(),!e.normalize&&le)}var Fe={encode:Je,F:!1,G:"strict"},Me=/[^a-z0-9]+/,et={b:"p",v:"f",w:"f",z:"s",x:"s",\u00DF:"s",d:"t",n:"m",c:"k",g:"k",j:"k",q:"k",i:"e",y:"e",u:"o"};function Je(e){e=te.call(this,e).join(" ");let t=[];if(e){let n=e.split(Me),r=n.length;for(let i=0,a,l=0;i<r;i++)if((e=n[i])&&(!this.filter||!this.filter[e])){a=e[0];let s=et[a]||a,h=s;for(let f=1;f<e.length;f++){a=e[f];let p=et[a]||a;p&&p!==h&&(s+=p,h=p)}t[l++]=s}}return t}var ft={encode:tt,F:!1,G:""},He=[W("ae"),"a",W("oe"),"o",W("sh"),"s",W("th"),"t",W("ph"),"f",W("pf"),"f",W("(?![aeo])h(?![aeo])"),"",W("(?!^[aeo])h(?!^[aeo])"),""];function tt(e,t){return e&&(e=Je.call(this,e).join(" "),2<e.length&&(e=ge(e,He)),t||(1<e.length&&(e=Ue(e)),e&&(e=e.split(" ")))),e||[]}var nt={encode:ut,F:!1,G:""},ct=W("(?!\\b)[aeo]");function ut(e){return e&&(e=tt.call(this,e,!0),1<e.length&&(e=e.replace(ct,"")),1<e.length&&(e=Ue(e)),e&&(e=e.split(" "))),e||[]}Z["latin:default"]=Ne,Z["latin:simple"]=_,Z["latin:balance"]=Fe,Z["latin:advanced"]=ft,Z["latin:extra"]=nt;var rt={Index:re,Document:R,Worker:D,registerCharset:function(e,t){Z[e]=t},registerLanguage:function(e,t){Ve[e]=t}};function ht(e,t){if(!e)return;function n(i){i.target===this&&(i.preventDefault(),t())}function r(i){i.key.startsWith("Esc")&&(i.preventDefault(),t())}e?.addEventListener("click",n),window.addCleanup(()=>e?.removeEventListener("click",n)),document.addEventListener("keydown",r),window.addCleanup(()=>document.removeEventListener("keydown",r))}function _e(e){for(;e.firstChild;)e.removeChild(e.firstChild)}var At=Object.hasOwnProperty,it=X(ae(),1),dt=(0,it.default)();function pt(e){let t=vt(wt(e,"index"),!0);return t.length===0?"/":t}var ot=(e,t,n)=>{let r=new URL(e.getAttribute(t),n);e.setAttribute(t,r.pathname+r.hash)};function mt(e,t){e.querySelectorAll('[href^="./"], [href^="../"]').forEach(n=>ot(n,"href",t)),e.querySelectorAll('[src^="./"], [src^="../"]').forEach(n=>ot(n,"src",t))}function gt(e){let t=e.split("/").filter(n=>n!=="").slice(0,-1).map(n=>"..").join("/");return t.length===0&&(t="."),t}function at(e,t){return st(gt(e),pt(t))}function st(...e){return e.filter(t=>t!=="").join("/").replace(/\/\/+/g,"/")}function yt(e,t){return e===t||e.endsWith("/"+t)}function wt(e,t){return yt(e,t)&&(e=e.slice(0,-t.length)),e}function vt(e,t){return e.startsWith("/")&&(e=e.substring(1)),!t&&e.endsWith("/")&&(e=e.slice(0,-1)),e}var xe="basic",Ae="",bt=e=>e.toLowerCase().split(/([^a-z]|[^\x00-\x7F])/),ze=new rt.Document({charset:"latin:extra",encode:bt,document:{id:"id",index:[{field:"title",tokenize:"forward"},{field:"content",tokenize:"forward"},{field:"tags",tokenize:"forward"}]}}),Et=new DOMParser,Xe=new Map,Ye=30,Qe=8,xt=5,lt=e=>{let t=e.split(/\s+/).filter(r=>r.trim()!==""),n=t.length;if(n>1)for(let r=1;r<n;r++)t.push(t.slice(0,r+1).join(" "));return t.sort((r,i)=>i.length-r.length)};function Ze(e,t,n){let r=lt(e),i=t.split(/\s+/).filter(h=>h!==""),a=0,l=i.length-1;if(n){let h=u=>r.some(y=>u.toLowerCase().startsWith(y.toLowerCase())),f=i.map(h),p=0,d=0;for(let u=0;u<Math.max(i.length-Ye,0);u++){let y=f.slice(u,u+Ye).reduce((g,v)=>g+(v?1:0),0);y>=p&&(p=y,d=u)}a=Math.max(d-Ye,0),l=Math.min(a+2*Ye,i.length-1),i=i.slice(a,l)}let s=i.map(h=>{for(let f of r)if(h.toLowerCase().includes(f.toLowerCase())){let p=new RegExp(f.toLowerCase(),"gi");return h.replace(p,'<span class="highlight">$&</span>')}return h}).join(" ");return`${a===0?"":"..."}${s}${l===i.length-1?"":"..."}`}function o(e,t){let n=new DOMParser,r=lt(e),i=n.parseFromString(t.innerHTML,"text/html"),a=s=>{let h=document.createElement("span");return h.className="highlight",h.textContent=s,h},l=(s,h)=>{if(s.nodeType===Node.TEXT_NODE){let f=s.nodeValue??"",p=new RegExp(h.toLowerCase(),"gi"),d=f.match(p);if(!d||d.length===0)return;let u=document.createElement("span"),y=0;for(let g of d){let v=f.indexOf(g,y);u.appendChild(document.createTextNode(f.slice(y,v))),u.appendChild(a(g)),y=v+g.length}u.appendChild(document.createTextNode(f.slice(y))),s.parentNode?.replaceChild(u,s)}else if(s.nodeType===Node.ELEMENT_NODE){if(s.classList.contains("highlight"))return;Array.from(s.childNodes).forEach(f=>l(f,h))}};for(let s of r)l(i.body,s);return i.body}document.addEventListener("nav",async e=>{let t=e.detail.url,n=await fetchData,r=document.getElementById("search-container"),i=r?.closest(".sidebar"),a=document.getElementById("search-icon"),l=document.getElementById("search-bar"),s=document.getElementById("search-layout"),h=Object.keys(n),f=S=>{s?.querySelector(`#${S.id}`)===null&&s?.appendChild(S)},p=s?.dataset?.preview==="true",d,u,y=document.createElement("div");y.id="results-container",f(y),p&&(d=document.createElement("div"),d.id="preview-container",f(d));function g(){r?.classList.remove("active"),l&&(l.value=""),i&&(i.style.zIndex="unset"),y&&_e(y),d&&_e(d),s&&s.classList.remove("display-results"),xe="basic"}function v(S){xe=S,i&&(i.style.zIndex="1"),r?.classList.add("active"),l?.focus()}let k=null;async function T(S){if(S.key==="k"&&(S.ctrlKey||S.metaKey)&&!S.shiftKey){S.preventDefault(),r?.classList.contains("active")?g():v("basic");return}else if(S.shiftKey&&(S.ctrlKey||S.metaKey)&&S.key.toLowerCase()==="k"){S.preventDefault(),r?.classList.contains("active")?g():v("tags"),l&&(l.value="#");return}if(k&&k.classList.remove("focus"),!!r?.classList.contains("active")){if(S.key==="Enter")if(y?.contains(document.activeElement)){let j=document.activeElement;if(j.classList.contains("no-match"))return;await G(j),j.click()}else{let j=document.getElementsByClassName("result-card")[0];if(!j||j?.classList.contains("no-match"))return;await G(j),j.click()}else if(S.key==="ArrowUp"||S.shiftKey&&S.key==="Tab"){if(S.preventDefault(),y?.contains(document.activeElement)){let j=k||document.activeElement,B=j?.previousElementSibling;j?.classList.remove("focus"),B?.focus(),B&&(k=B),await G(B)}}else if((S.key==="ArrowDown"||S.key==="Tab")&&(S.preventDefault(),document.activeElement===l||k!==null)){let j=k||document.getElementsByClassName("result-card")[0],B=j?.nextElementSibling;j?.classList.remove("focus"),B?.focus(),B&&(k=B),await G(B)}}}let $=(S,j)=>{let B=h[j];return{id:j,slug:B,title:xe==="tags"?n[B].title:Ze(S,n[B].title??""),content:Ze(S,n[B].content??"",!0),tags:I(S.substring(1),n[B].tags)}};function I(S,j){return!j||xe!=="tags"?[]:j.map(B=>B.toLowerCase().includes(S.toLowerCase())?`<li><p class="match-tag">#${B}</p></li>`:`<li><p>#${B}</p></li>`).slice(0,xt)}function Y(S){return new URL(at(t,S),location.toString())}let oe=({slug:S,title:j,content:B,tags:q})=>{let z=q.length>0?`<ul class="tags">${q.join("")}</ul>`:"",U=document.createElement("a");U.classList.add("result-card"),U.id=S,U.href=Y(S).toString(),U.innerHTML=`<h3>${j}</h3>${z}${p&&window.innerWidth>600?"":`<p>${B}</p>`}`,U.addEventListener("click",ce=>{ce.altKey||ce.ctrlKey||ce.metaKey||ce.shiftKey||g()});let je=ce=>{ce.altKey||ce.ctrlKey||ce.metaKey||ce.shiftKey||g()};async function Dt(ce){if(!ce.target)return;let St=ce.target;await G(St)}return U.addEventListener("mouseenter",Dt),window.addCleanup(()=>U.removeEventListener("mouseenter",Dt)),U.addEventListener("click",je),window.addCleanup(()=>U.removeEventListener("click",je)),U};async function fe(S){if(y)if(_e(y),S.length===0?y.innerHTML=`<a class="result-card no-match">
<h3>No results.</h3>
<p>Try another search term?</p>
</a>`:y.append(...S.map(oe)),S.length===0&&d)_e(d);else{let j=y.firstElementChild;j.classList.add("focus"),k=j,await G(j)}}async function he(S){if(Xe.has(S))return Xe.get(S);let j=Y(S).toString(),B=await fetch(j).then(q=>q.text()).then(q=>{if(q===void 0)throw new Error(`Could not fetch ${j}`);let z=Et.parseFromString(q??"","text/html");return mt(z,j),[...z.getElementsByClassName("popover-hint")]});return Xe.set(S,B),B}async function G(S){if(!s||!p||!S||!d)return;let j=S.id,B=await he(j).then(q=>q.flatMap(z=>[...o(Ae,z).children]));u=document.createElement("div"),u.classList.add("preview-inner"),u.append(...B),d.replaceChildren(u),[...d.querySelectorAll(".highlight")].sort((q,z)=>z.innerHTML.length-q.innerHTML.length)[0]?.scrollIntoView({block:"start"})}async function Ee(S){if(!s||!ze)return;Ae=S.target.value,s.classList.toggle("display-results",Ae!==""),xe=Ae.startsWith("#")?"tags":"basic";let j;xe==="tags"?j=await ze.searchAsync({query:Ae.substring(1),limit:Qe,index:["tags"]}):xe==="basic"&&(j=await ze.searchAsync({query:Ae,limit:Qe,index:["title","content"]}));let B=z=>{let U=j.filter(je=>je.field===z);return U.length===0?[]:[...U[0].result]},q=[...new Set([...B("title"),...B("content"),...B("tags")])].map(z=>$(Ae,z));await fe(q)}document.addEventListener("keydown",T),window.addCleanup(()=>document.removeEventListener("keydown",T)),a?.addEventListener("click",()=>v("basic")),window.addCleanup(()=>a?.removeEventListener("click",()=>v("basic"))),l?.addEventListener("input",Ee),window.addCleanup(()=>l?.removeEventListener("input",Ee)),ht(r,g),await c(n)});async function c(e){let t=0,n=[];for(let[r,i]of Object.entries(e))n.push(ze.addAsync(t++,{id:t,slug:r,title:i.title,content:i.content,tags:i.tags}));return await Promise.all(n)}}(),function(){var De=Object.create,de=Object.defineProperty,ve=Object.getOwnPropertyDescriptor,Ie=Object.getOwnPropertyNames,pe=Object.getPrototypeOf,Se=Object.prototype.hasOwnProperty,me=(o,c)=>()=>(c||o((c={exports:{}}).exports,c),c.exports),Te=(o,c,e,t)=>{if(c&&typeof c=="object"||typeof c=="function")for(let n of Ie(c))!Se.call(o,n)&&n!==e&&de(o,n,{get:()=>c[n],enumerable:!(t=ve(c,n))||t.enumerable});return o},X=(o,c,e)=>(e=o!=null?De(pe(o)):{},Te(c||!o||!o.__esModule?de(e,"default",{value:o,enumerable:!0}):e,o)),Be=me((o,c)=>{"use strict";c.exports=t;function e(r){return r instanceof Buffer?Buffer.from(r):new r.constructor(r.buffer.slice(),r.byteOffset,r.length)}function t(r){if(r=r||{},r.circles)return n(r);return r.proto?l:a;function i(s,h){for(var f=Object.keys(s),p=new Array(f.length),d=0;d<f.length;d++){var u=f[d],y=s[u];typeof y!="object"||y===null?p[u]=y:y instanceof Date?p[u]=new Date(y):ArrayBuffer.isView(y)?p[u]=e(y):p[u]=h(y)}return p}function a(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return i(s,a);if(s instanceof Map)return new Map(i(Array.from(s),a));if(s instanceof Set)return new Set(i(Array.from(s),a));var h={};for(var f in s)if(Object.hasOwnProperty.call(s,f)!==!1){var p=s[f];typeof p!="object"||p===null?h[f]=p:p instanceof Date?h[f]=new Date(p):p instanceof Map?h[f]=new Map(i(Array.from(p),a)):p instanceof Set?h[f]=new Set(i(Array.from(p),a)):ArrayBuffer.isView(p)?h[f]=e(p):h[f]=a(p)}return h}function l(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return i(s,l);if(s instanceof Map)return new Map(i(Array.from(s),l));if(s instanceof Set)return new Set(i(Array.from(s),l));var h={};for(var f in s){var p=s[f];typeof p!="object"||p===null?h[f]=p:p instanceof Date?h[f]=new Date(p):p instanceof Map?h[f]=new Map(i(Array.from(p),l)):p instanceof Set?h[f]=new Set(i(Array.from(p),l)):ArrayBuffer.isView(p)?h[f]=e(p):h[f]=l(p)}return h}}function n(r){var i=[],a=[];return r.proto?h:s;function l(f,p){for(var d=Object.keys(f),u=new Array(d.length),y=0;y<d.length;y++){var g=d[y],v=f[g];if(typeof v!="object"||v===null)u[g]=v;else if(v instanceof Date)u[g]=new Date(v);else if(ArrayBuffer.isView(v))u[g]=e(v);else{var k=i.indexOf(v);k!==-1?u[g]=a[k]:u[g]=p(v)}}return u}function s(f){if(typeof f!="object"||f===null)return f;if(f instanceof Date)return new Date(f);if(Array.isArray(f))return l(f,s);if(f instanceof Map)return new Map(l(Array.from(f),s));if(f instanceof Set)return new Set(l(Array.from(f),s));var p={};i.push(f),a.push(p);for(var d in f)if(Object.hasOwnProperty.call(f,d)!==!1){var u=f[d];if(typeof u!="object"||u===null)p[d]=u;else if(u instanceof Date)p[d]=new Date(u);else if(u instanceof Map)p[d]=new Map(l(Array.from(u),s));else if(u instanceof Set)p[d]=new Set(l(Array.from(u),s));else if(ArrayBuffer.isView(u))p[d]=e(u);else{var y=i.indexOf(u);y!==-1?p[d]=a[y]:p[d]=s(u)}}return i.pop(),a.pop(),p}function h(f){if(typeof f!="object"||f===null)return f;if(f instanceof Date)return new Date(f);if(Array.isArray(f))return l(f,h);if(f instanceof Map)return new Map(l(Array.from(f),h));if(f instanceof Set)return new Set(l(Array.from(f),h));var p={};i.push(f),a.push(p);for(var d in f){var u=f[d];if(typeof u!="object"||u===null)p[d]=u;else if(u instanceof Date)p[d]=new Date(u);else if(u instanceof Map)p[d]=new Map(l(Array.from(u),h));else if(u instanceof Set)p[d]=new Set(l(Array.from(u),h));else if(ArrayBuffer.isView(u))p[d]=e(u);else{var y=i.indexOf(u);y!==-1?p[d]=a[y]:p[d]=h(u)}}return i.pop(),a.pop(),p}}}),ae=Math.min,P=Math.max,ue=Math.round,ne=o=>({x:o,y:o}),H={left:"right",right:"left",bottom:"top",top:"bottom"},Re={start:"end",end:"start"};function K(o,c,e){return P(o,ae(c,e))}function Q(o,c){return typeof o=="function"?o(c):o}function J(o){return o.split("-")[0]}function Ce(o){return o.split("-")[1]}function Pe(o){return o==="x"?"y":"x"}function Oe(o){return o==="y"?"height":"width"}function be(o){return["top","bottom"].includes(J(o))?"y":"x"}function ge(o){return Pe(be(o))}function W(o,c,e){e===void 0&&(e=!1);let t=Ce(o),n=ge(o),r=Oe(n),i=n==="x"?t===(e?"end":"start")?"right":"left":t==="start"?"bottom":"top";return c.reference[r]>c.floating[r]&&(i=Z(i)),[i,Z(i)]}function Ue(o){let c=Z(o);return[Ne(o),c,Ne(c)]}function Ne(o){return o.replace(/start|end/g,c=>Re[c])}function Ge(o,c,e){let t=["left","right"],n=["right","left"],r=["top","bottom"],i=["bottom","top"];switch(o){case"top":case"bottom":return e?c?n:t:c?t:n;case"left":case"right":return c?r:i;default:return[]}}function Ve(o,c,e,t){let n=Ce(o),r=Ge(J(o),e==="start",t);return n&&(r=r.map(i=>i+"-"+n),c&&(r=r.concat(r.map(Ne)))),r}function Z(o){return o.replace(/left|right|bottom|top/g,c=>H[c])}function We(o){return{top:0,right:0,bottom:0,left:0,...o}}function ye(o){return typeof o!="number"?We(o):{top:o,right:o,bottom:o,left:o}}function ee(o){return{...o,top:o.y,left:o.x,right:o.x+o.width,bottom:o.y+o.height}}function qe(o,c,e){let{reference:t,floating:n}=o,r=be(c),i=ge(c),a=Oe(i),l=J(c),s=r==="y",h=t.x+t.width/2-n.width/2,f=t.y+t.height/2-n.height/2,p=t[a]/2-n[a]/2,d;switch(l){case"top":d={x:h,y:t.y-n.height};break;case"bottom":d={x:h,y:t.y+t.height};break;case"right":d={x:t.x+t.width,y:f};break;case"left":d={x:t.x-n.width,y:f};break;default:d={x:t.x,y:t.y}}switch(Ce(c)){case"start":d[i]-=p*(e&&s?-1:1);break;case"end":d[i]+=p*(e&&s?-1:1);break}return d}var Le=async(o,c,e)=>{let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i}=e,a=r.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(c)),s=await i.getElementRects({reference:o,floating:c,strategy:n}),{x:h,y:f}=qe(s,t,l),p=t,d={},u=0;for(let y=0;y<a.length;y++){let{name:g,fn:v}=a[y],{x:k,y:T,data:$,reset:I}=await v({x:h,y:f,initialPlacement:t,placement:p,strategy:n,middlewareData:d,rects:s,platform:i,elements:{reference:o,floating:c}});h=k??h,f=T??f,d={...d,[g]:{...d[g],...$}},I&&u<=50&&(u++,typeof I=="object"&&(I.placement&&(p=I.placement),I.rects&&(s=I.rects===!0?await i.getElementRects({reference:o,floating:c,strategy:n}):I.rects),{x:h,y:f}=qe(s,p,l)),y=-1)}return{x:h,y:f,placement:p,strategy:n,middlewareData:d}};async function $e(o,c){var e;c===void 0&&(c={});let{x:t,y:n,platform:r,rects:i,elements:a,strategy:l}=o,{boundary:s="clippingAncestors",rootBoundary:h="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=Q(c,o),u=ye(d),y=a[p?f==="floating"?"reference":"floating":f],g=ee(await r.getClippingRect({element:(e=await(r.isElement==null?void 0:r.isElement(y)))==null||e?y:y.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:s,rootBoundary:h,strategy:l})),v=f==="floating"?{...i.floating,x:t,y:n}:i.reference,k=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating)),T=await(r.isElement==null?void 0:r.isElement(k))?await(r.getScale==null?void 0:r.getScale(k))||{x:1,y:1}:{x:1,y:1},$=ee(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:k,strategy:l}):v);return{top:(g.top-$.top+u.top)/T.y,bottom:($.bottom-g.bottom+u.bottom)/T.y,left:(g.left-$.left+u.left)/T.x,right:($.right-g.right+u.right)/T.x}}var Ke=function(o){return o===void 0&&(o={}),{name:"flip",options:o,async fn(c){var e,t;let{placement:n,middlewareData:r,rects:i,initialPlacement:a,platform:l,elements:s}=c,{mainAxis:h=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:u="none",flipAlignment:y=!0,...g}=Q(o,c);if((e=r.arrow)!=null&&e.alignmentOffset)return{};let v=J(n),k=J(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(s.floating)),$=p||(k||!y?[Z(a)]:Ue(a));!p&&u!=="none"&&$.push(...Ve(a,y,u,T));let I=[a,...$],Y=await $e(c,g),oe=[],fe=((t=r.flip)==null?void 0:t.overflows)||[];if(h&&oe.push(Y[v]),f){let S=W(n,i,T);oe.push(Y[S[0]],Y[S[1]])}if(fe=[...fe,{placement:n,overflows:oe}],!oe.every(S=>S<=0)){var he,G;let S=(((he=r.flip)==null?void 0:he.index)||0)+1,j=I[S];if(j)return{data:{index:S,overflows:fe},reset:{placement:j}};let B=(G=fe.filter(q=>q.overflows[0]<=0).sort((q,z)=>q.overflows[1]-z.overflows[1])[0])==null?void 0:G.placement;if(!B)switch(d){case"bestFit":{var Ee;let q=(Ee=fe.map(z=>[z.placement,z.overflows.filter(U=>U>0).reduce((U,je)=>U+je,0)]).sort((z,U)=>z[1]-U[1])[0])==null?void 0:Ee[0];q&&(B=q);break}case"initialPlacement":B=a;break}if(n!==B)return{reset:{placement:B}}}return{}}}};function ke(o){let c=ae(...o.map(r=>r.left)),e=ae(...o.map(r=>r.top)),t=P(...o.map(r=>r.right)),n=P(...o.map(r=>r.bottom));return{x:c,y:e,width:t-c,height:n-e}}function re(o){let c=o.slice().sort((n,r)=>n.y-r.y),e=[],t=null;for(let n=0;n<c.length;n++){let r=c[n];!t||r.y-t.y>t.height/2?e.push([r]):e[e.length-1].push(r),t=r}return e.map(n=>ee(ke(n)))}var we=function(o){return o===void 0&&(o={}),{name:"inline",options:o,async fn(c){let{placement:e,elements:t,rects:n,platform:r,strategy:i}=c,{padding:a=2,x:l,y:s}=Q(o,c),h=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(t.reference))||[]),f=re(h),p=ee(ke(h)),d=ye(a);function u(){if(f.length===2&&f[0].left>f[1].right&&l!=null&&s!=null)return f.find(g=>l>g.left-d.left&&l<g.right+d.right&&s>g.top-d.top&&s<g.bottom+d.bottom)||p;if(f.length>=2){if(be(e)==="y"){let G=f[0],Ee=f[f.length-1],S=J(e)==="top",j=G.top,B=Ee.bottom,q=S?G.left:Ee.left,z=S?G.right:Ee.right,U=z-q,je=B-j;return{top:j,bottom:B,left:q,right:z,width:U,height:je,x:q,y:j}}let g=J(e)==="left",v=P(...f.map(G=>G.right)),k=ae(...f.map(G=>G.left)),T=f.filter(G=>g?G.left===k:G.right===v),$=T[0].top,I=T[T.length-1].bottom,Y=k,oe=v,fe=oe-Y,he=I-$;return{top:$,bottom:I,left:Y,right:oe,width:fe,height:he,x:Y,y:$}}return p}let y=await r.getElementRects({reference:{getBoundingClientRect:u},floating:t.floating,strategy:i});return n.reference.x!==y.reference.x||n.reference.y!==y.reference.y||n.reference.width!==y.reference.width||n.reference.height!==y.reference.height?{reset:{rects:y}}:{}}}},se=function(o){return o===void 0&&(o={}),{name:"shift",options:o,async fn(c){let{x:e,y:t,placement:n}=c,{mainAxis:r=!0,crossAxis:i=!1,limiter:a={fn:g=>{let{x:v,y:k}=g;return{x:v,y:k}}},...l}=Q(o,c),s={x:e,y:t},h=await $e(c,l),f=be(J(n)),p=Pe(f),d=s[p],u=s[f];if(r){let g=p==="y"?"top":"left",v=p==="y"?"bottom":"right",k=d+h[g],T=d-h[v];d=K(k,d,T)}if(i){let g=f==="y"?"top":"left",v=f==="y"?"bottom":"right",k=u+h[g],T=u-h[v];u=K(k,u,T)}let y=a.fn({...c,[p]:d,[f]:u});return{...y,data:{x:y.x-e,y:y.y-t}}}}};function ie(o){return b(o)?(o.nodeName||"").toLowerCase():"#document"}function m(o){var c;return(o==null||(c=o.ownerDocument)==null?void 0:c.defaultView)||window}function w(o){var c;return(c=(b(o)?o.ownerDocument:o.document)||window.document)==null?void 0:c.documentElement}function b(o){return o instanceof Node||o instanceof m(o).Node}function A(o){return o instanceof Element||o instanceof m(o).Element}function O(o){return o instanceof HTMLElement||o instanceof m(o).HTMLElement}function D(o){return typeof ShadowRoot>"u"?!1:o instanceof ShadowRoot||o instanceof m(o).ShadowRoot}function C(o){let{overflow:c,overflowX:e,overflowY:t,display:n}=x(o);return/auto|scroll|overlay|hidden|clip/.test(c+t+e)&&!["inline","contents"].includes(n)}function F(o){return["table","td","th"].includes(ie(o))}function R(o){let c=N(),e=x(o);return e.transform!=="none"||e.perspective!=="none"||(e.containerType?e.containerType!=="normal":!1)||!c&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!c&&(e.filter?e.filter!=="none":!1)||["transform","perspective","filter"].some(t=>(e.willChange||"").includes(t))||["paint","layout","strict","content"].some(t=>(e.contain||"").includes(t))}function M(o){let c=L(o);for(;O(c)&&!E(c);){if(R(c))return c;c=L(c)}return null}function N(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function E(o){return["html","body","#document"].includes(ie(o))}function x(o){return m(o).getComputedStyle(o)}function V(o){return A(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:{scrollLeft:o.pageXOffset,scrollTop:o.pageYOffset}}function L(o){if(ie(o)==="html")return o;let c=o.assignedSlot||o.parentNode||D(o)&&o.host||w(o);return D(c)?c.host:c}function _(o){let c=L(o);return E(c)?o.ownerDocument?o.ownerDocument.body:o.body:O(c)&&C(c)?c:_(c)}function le(o,c,e){var t;c===void 0&&(c=[]),e===void 0&&(e=!0);let n=_(o),r=n===((t=o.ownerDocument)==null?void 0:t.body),i=m(n);return r?c.concat(i,i.visualViewport||[],C(n)?n:[],i.frameElement&&e?le(i.frameElement):[]):c.concat(n,le(n,[],e))}function te(o){let c=x(o),e=parseFloat(c.width)||0,t=parseFloat(c.height)||0,n=O(o),r=n?o.offsetWidth:e,i=n?o.offsetHeight:t,a=ue(e)!==r||ue(t)!==i;return a&&(e=r,t=i),{width:e,height:t,$:a}}function Fe(o){return A(o)?o:o.contextElement}function Me(o){let c=Fe(o);if(!O(c))return ne(1);let e=c.getBoundingClientRect(),{width:t,height:n,$:r}=te(c),i=(r?ue(e.width):e.width)/t,a=(r?ue(e.height):e.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}var et=ne(0);function Je(o){let c=m(o);return!N()||!c.visualViewport?et:{x:c.visualViewport.offsetLeft,y:c.visualViewport.offsetTop}}function ft(o,c,e){return c===void 0&&(c=!1),!e||c&&e!==m(o)?!1:c}function He(o,c,e,t){c===void 0&&(c=!1),e===void 0&&(e=!1);let n=o.getBoundingClientRect(),r=Fe(o),i=ne(1);c&&(t?A(t)&&(i=Me(t)):i=Me(o));let a=ft(r,e,t)?Je(r):ne(0),l=(n.left+a.x)/i.x,s=(n.top+a.y)/i.y,h=n.width/i.x,f=n.height/i.y;if(r){let p=m(r),d=t&&A(t)?m(t):t,u=p.frameElement;for(;u&&t&&d!==p;){let y=Me(u),g=u.getBoundingClientRect(),v=x(u),k=g.left+(u.clientLeft+parseFloat(v.paddingLeft))*y.x,T=g.top+(u.clientTop+parseFloat(v.paddingTop))*y.y;l*=y.x,s*=y.y,h*=y.x,f*=y.y,l+=k,s+=T,u=m(u).frameElement}}return ee({width:h,height:f,x:l,y:s})}var tt=[":popover-open",":modal"];function nt(o){let c=!1,e=0,t=0;function n(r){try{c=c||o.matches(r)}catch{}}if(tt.forEach(r=>{n(r)}),c){let r=M(o);if(r){let i=r.getBoundingClientRect();e=i.x,t=i.y}}return[c,e,t]}function ct(o){let{elements:c,rect:e,offsetParent:t,strategy:n}=o,r=w(t),[i]=c?nt(c.floating):[!1];if(t===r||i)return e;let a={scrollLeft:0,scrollTop:0},l=ne(1),s=ne(0),h=O(t);if((h||!h&&n!=="fixed")&&((ie(t)!=="body"||C(r))&&(a=V(t)),O(t))){let f=He(t);l=Me(t),s.x=f.x+t.clientLeft,s.y=f.y+t.clientTop}return{width:e.width*l.x,height:e.height*l.y,x:e.x*l.x-a.scrollLeft*l.x+s.x,y:e.y*l.y-a.scrollTop*l.y+s.y}}function ut(o){return Array.from(o.getClientRects())}function rt(o){return He(w(o)).left+V(o).scrollLeft}function ht(o){let c=w(o),e=V(o),t=o.ownerDocument.body,n=P(c.scrollWidth,c.clientWidth,t.scrollWidth,t.clientWidth),r=P(c.scrollHeight,c.clientHeight,t.scrollHeight,t.clientHeight),i=-e.scrollLeft+rt(o),a=-e.scrollTop;return x(t).direction==="rtl"&&(i+=P(c.clientWidth,t.clientWidth)-n),{width:n,height:r,x:i,y:a}}function _e(o,c){let e=m(o),t=w(o),n=e.visualViewport,r=t.clientWidth,i=t.clientHeight,a=0,l=0;if(n){r=n.width,i=n.height;let s=N();(!s||s&&c==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}return{width:r,height:i,x:a,y:l}}function At(o,c){let e=He(o,!0,c==="fixed"),t=e.top+o.clientTop,n=e.left+o.clientLeft,r=O(o)?Me(o):ne(1),i=o.clientWidth*r.x,a=o.clientHeight*r.y,l=n*r.x,s=t*r.y;return{width:i,height:a,x:l,y:s}}function it(o,c,e){let t;if(c==="viewport")t=_e(o,e);else if(c==="document")t=ht(w(o));else if(A(c))t=At(c,e);else{let n=Je(o);t={...c,x:c.x-n.x,y:c.y-n.y}}return ee(t)}function dt(o,c){let e=L(o);return e===c||!A(e)||E(e)?!1:x(e).position==="fixed"||dt(e,c)}function pt(o,c){let e=c.get(o);if(e)return e;let t=le(o,[],!1).filter(a=>A(a)&&ie(a)!=="body"),n=null,r=x(o).position==="fixed",i=r?L(o):o;for(;A(i)&&!E(i);){let a=x(i),l=R(i);!l&&a.position==="fixed"&&(n=null),(r?!l&&!n:!l&&a.position==="static"&&n&&["absolute","fixed"].includes(n.position)||C(i)&&!l&&dt(o,i))?t=t.filter(s=>s!==i):n=a,i=L(i)}return c.set(o,t),t}function ot(o){let{element:c,boundary:e,rootBoundary:t,strategy:n}=o,r=[...e==="clippingAncestors"?pt(c,this._c):[].concat(e),t],i=r[0],a=r.reduce((l,s)=>{let h=it(c,s,n);return l.top=P(h.top,l.top),l.right=ae(h.right,l.right),l.bottom=ae(h.bottom,l.bottom),l.left=P(h.left,l.left),l},it(c,i,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function mt(o){let{width:c,height:e}=te(o);return{width:c,height:e}}function gt(o,c,e,t){let n=O(c),r=w(c),i=e==="fixed",a=He(o,!0,i,c),l={scrollLeft:0,scrollTop:0},s=ne(0);if(n||!n&&!i)if((ie(c)!=="body"||C(r))&&(l=V(c)),n){let y=He(c,!0,i,c);s.x=y.x+c.clientLeft,s.y=y.y+c.clientTop}else r&&(s.x=rt(r));let h=a.left+l.scrollLeft-s.x,f=a.top+l.scrollTop-s.y,[p,d,u]=nt(t);return p&&(h+=d,f+=u,n&&(h+=c.clientLeft,f+=c.clientTop)),{x:h,y:f,width:a.width,height:a.height}}function at(o,c){return!O(o)||x(o).position==="fixed"?null:c?c(o):o.offsetParent}function st(o,c){let e=m(o);if(!O(o))return e;let t=at(o,c);for(;t&&F(t)&&x(t).position==="static";)t=at(t,c);return t&&(ie(t)==="html"||ie(t)==="body"&&x(t).position==="static"&&!R(t))?e:t||M(o)||e}var yt=async function(o){let c=this.getOffsetParent||st,e=this.getDimensions;return{reference:gt(o.reference,await c(o.floating),o.strategy,o.floating),floating:{x:0,y:0,...await e(o.floating)}}};function wt(o){return x(o).direction==="rtl"}var vt={convertOffsetParentRelativeRectToViewportRelativeRect:ct,getDocumentElement:w,getClippingRect:ot,getOffsetParent:st,getElementRects:yt,getClientRects:ut,getDimensions:mt,getScale:Me,isElement:A,isRTL:wt},xe=se,Ae=Ke,bt=we,ze=(o,c,e)=>{let t=new Map,n={platform:vt,...e},r={...n.platform,_c:t};return Le(o,c,{...n,platform:r})},Et=Object.hasOwnProperty,Xe=X(Be(),1),Ye=(0,Xe.default)(),Qe=(o,c,e)=>{let t=new URL(o.getAttribute(c),e);o.setAttribute(c,t.pathname+t.hash)};function xt(o,c){o.querySelectorAll('[href^="./"], [href^="../"]').forEach(e=>Qe(e,"href",c)),o.querySelectorAll('[src^="./"], [src^="../"]').forEach(e=>Qe(e,"src",c))}var lt=new DOMParser;async function Ze({clientX:o,clientY:c}){let e=this;if(e.dataset.noPopover==="true")return;async function t(d){let{x:u,y}=await ze(e,d,{middleware:[bt({x:o,y:c}),xe(),Ae()]});Object.assign(d.style,{left:`${u}px`,top:`${y}px`})}let n=()=>[...e.children].some(d=>d.classList.contains("popover"));if(n())return t(e.lastChild);let r=new URL(document.location.href);r.hash="",r.search="";let i=new URL(e.href),a=i.hash;i.hash="",i.search="";let l=await fetch(`${i}`).then(d=>d.text()).catch(d=>{console.error(d)});if(n()||!l)return;let s=lt.parseFromString(l,"text/html");xt(s,i);let h=[...s.getElementsByClassName("popover-hint")];if(h.length===0)return;let f=document.createElement("div");f.classList.add("popover");let p=document.createElement("div");if(p.classList.add("popover-inner"),f.appendChild(p),h.forEach(d=>p.appendChild(d)),t(f),e.appendChild(f),a!==""){let d=p.querySelector(a);d&&p.scroll({top:d.offsetTop-12,behavior:"instant"})}}document.addEventListener("nav",()=>{let o=[...document.getElementsByClassName("internal")];for(let c of o)c.addEventListener("mouseenter",Ze),window.addCleanup(()=>c.removeEventListener("mouseenter",Ze))})}(),function(){var De=Object.create,de=Object.defineProperty,ve=Object.getOwnPropertyDescriptor,Ie=Object.getOwnPropertyNames,pe=Object.getPrototypeOf,Se=Object.prototype.hasOwnProperty,me=(m,w)=>()=>(w||m((w={exports:{}}).exports,w),w.exports),Te=(m,w,b,A)=>{if(w&&typeof w=="object"||typeof w=="function")for(let O of Ie(w))!Se.call(m,O)&&O!==b&&de(m,O,{get:()=>w[O],enumerable:!(A=ve(w,O))||A.enumerable});return m},X=(m,w,b)=>(b=m!=null?De(pe(m)):{},Te(w||!m||!m.__esModule?de(b,"default",{value:m,enumerable:!0}):b,m)),Be=me((m,w)=>{"use strict";w.exports=A;function b(D){return D instanceof Buffer?Buffer.from(D):new D.constructor(D.buffer.slice(),D.byteOffset,D.length)}function A(D){if(D=D||{},D.circles)return O(D);return D.proto?R:F;function C(M,N){for(var E=Object.keys(M),x=new Array(E.length),V=0;V<E.length;V++){var L=E[V],_=M[L];typeof _!="object"||_===null?x[L]=_:_ instanceof Date?x[L]=new Date(_):ArrayBuffer.isView(_)?x[L]=b(_):x[L]=N(_)}return x}function F(M){if(typeof M!="object"||M===null)return M;if(M instanceof Date)return new Date(M);if(Array.isArray(M))return C(M,F);if(M instanceof Map)return new Map(C(Array.from(M),F));if(M instanceof Set)return new Set(C(Array.from(M),F));var N={};for(var E in M)if(Object.hasOwnProperty.call(M,E)!==!1){var x=M[E];typeof x!="object"||x===null?N[E]=x:x instanceof Date?N[E]=new Date(x):x instanceof Map?N[E]=new Map(C(Array.from(x),F)):x instanceof Set?N[E]=new Set(C(Array.from(x),F)):ArrayBuffer.isView(x)?N[E]=b(x):N[E]=F(x)}return N}function R(M){if(typeof M!="object"||M===null)return M;if(M instanceof Date)return new Date(M);if(Array.isArray(M))return C(M,R);if(M instanceof Map)return new Map(C(Array.from(M),R));if(M instanceof Set)return new Set(C(Array.from(M),R));var N={};for(var E in M){var x=M[E];typeof x!="object"||x===null?N[E]=x:x instanceof Date?N[E]=new Date(x):x instanceof Map?N[E]=new Map(C(Array.from(x),R)):x instanceof Set?N[E]=new Set(C(Array.from(x),R)):ArrayBuffer.isView(x)?N[E]=b(x):N[E]=R(x)}return N}}function O(D){var C=[],F=[];return D.proto?N:M;function R(E,x){for(var V=Object.keys(E),L=new Array(V.length),_=0;_<V.length;_++){var le=V[_],te=E[le];if(typeof te!="object"||te===null)L[le]=te;else if(te instanceof Date)L[le]=new Date(te);else if(ArrayBuffer.isView(te))L[le]=b(te);else{var Fe=C.indexOf(te);Fe!==-1?L[le]=F[Fe]:L[le]=x(te)}}return L}function M(E){if(typeof E!="object"||E===null)return E;if(E instanceof Date)return new Date(E);if(Array.isArray(E))return R(E,M);if(E instanceof Map)return new Map(R(Array.from(E),M));if(E instanceof Set)return new Set(R(Array.from(E),M));var x={};C.push(E),F.push(x);for(var V in E)if(Object.hasOwnProperty.call(E,V)!==!1){var L=E[V];if(typeof L!="object"||L===null)x[V]=L;else if(L instanceof Date)x[V]=new Date(L);else if(L instanceof Map)x[V]=new Map(R(Array.from(L),M));else if(L instanceof Set)x[V]=new Set(R(Array.from(L),M));else if(ArrayBuffer.isView(L))x[V]=b(L);else{var _=C.indexOf(L);_!==-1?x[V]=F[_]:x[V]=M(L)}}return C.pop(),F.pop(),x}function N(E){if(typeof E!="object"||E===null)return E;if(E instanceof Date)return new Date(E);if(Array.isArray(E))return R(E,N);if(E instanceof Map)return new Map(R(Array.from(E),N));if(E instanceof Set)return new Set(R(Array.from(E),N));var x={};C.push(E),F.push(x);for(var V in E){var L=E[V];if(typeof L!="object"||L===null)x[V]=L;else if(L instanceof Date)x[V]=new Date(L);else if(L instanceof Map)x[V]=new Map(R(Array.from(L),N));else if(L instanceof Set)x[V]=new Set(R(Array.from(L),N));else if(ArrayBuffer.isView(L))x[V]=b(L);else{var _=C.indexOf(L);_!==-1?x[V]=F[_]:x[V]=N(L)}}return C.pop(),F.pop(),x}}}),ae=m=>(w,b)=>w[`node${m}`]===b[`node${m}`],P=ae("Name"),ue=ae("Type"),ne=ae("Value");function H(m,w){if(m.attributes.length===0&&w.attributes.length===0)return[];let b=[],A=new Map,O=new Map;for(let D of m.attributes)A.set(D.name,D.value);for(let D of w.attributes){let C=A.get(D.name);D.value===C?A.delete(D.name):(typeof C<"u"&&A.delete(D.name),O.set(D.name,D.value))}for(let D of A.keys())b.push({type:5,name:D});for(let[D,C]of O.entries())b.push({type:4,name:D,value:C});return b}function Re(m,w=!0){let b=`${m.localName}`;for(let{name:A,value:O}of m.attributes)w&&A.startsWith("data-")||(b+=`[${A}=${O}]`);return b+=m.innerHTML,b}function K(m){switch(m.tagName){case"BASE":case"TITLE":return m.localName;case"META":{if(m.hasAttribute("name"))return`meta[name="${m.getAttribute("name")}"]`;if(m.hasAttribute("property"))return`meta[name="${m.getAttribute("property")}"]`;break}case"LINK":{if(m.hasAttribute("rel")&&m.hasAttribute("href"))return`link[rel="${m.getAttribute("rel")}"][href="${m.getAttribute("href")}"]`;if(m.hasAttribute("href"))return`link[href="${m.getAttribute("href")}"]`;break}}return Re(m)}function Q(m){let[w,b=""]=m.split("?");return`${w}?t=${Date.now()}&${b.replace(/t=\d+/g,"")}`}function J(m){if(m.nodeType===1&&m.hasAttribute("data-persist"))return m;if(m.nodeType===1&&m.localName==="script"){let w=document.createElement("script");for(let{name:b,value:A}of m.attributes)b==="src"&&(A=Q(A)),w.setAttribute(b,A);return w.innerHTML=m.innerHTML,w}return m.cloneNode(!0)}function Ce(m,w){if(m.children.length===0&&w.children.length===0)return[];let b=[],A=new Map,O=new Map,D=new Map;for(let C of m.children)A.set(K(C),C);for(let C of w.children){let F=K(C),R=A.get(F);R?Re(C,!1)!==Re(R,!1)&&O.set(F,J(C)):D.set(F,J(C)),A.delete(F)}for(let C of m.childNodes){if(C.nodeType===1){let F=K(C);if(A.has(F)){b.push({type:1});continue}else if(O.has(F)){let R=O.get(F);b.push({type:3,attributes:H(C,R),children:Pe(C,R)});continue}}b.push(void 0)}for(let C of D.values())b.push({type:0,node:J(C)});return b}function Pe(m,w){let b=[],A=Math.max(m.childNodes.length,w.childNodes.length);for(let O=0;O<A;O++){let D=m.childNodes.item(O),C=w.childNodes.item(O);b[O]=Oe(D,C)}return b}function Oe(m,w){if(!m)return{type:0,node:J(w)};if(!w)return{type:1};if(ue(m,w)){if(m.nodeType===3){let b=m.nodeValue,A=w.nodeValue;if(b.trim().length===0&&A.trim().length===0)return}if(m.nodeType===1){if(P(m,w)){let b=m.tagName==="HEAD"?Ce:Pe;return{type:3,attributes:H(m,w),children:b(m,w)}}return{type:2,node:J(w)}}else return m.nodeType===9?Oe(m.documentElement,w.documentElement):ne(m,w)?void 0:{type:2,value:w.nodeValue}}return{type:2,node:J(w)}}function be(m,w){if(w.length!==0)for(let{type:b,name:A,value:O}of w)b===5?m.removeAttribute(A):b===4&&m.setAttribute(A,O)}async function ge(m,w,b){if(!w)return;let A;switch(m.nodeType===9?(m=m.documentElement,A=m):b?A=b:A=m,w.type){case 0:{let{node:O}=w;m.appendChild(O);return}case 1:{if(!A)return;m.removeChild(A);return}case 2:{if(!A)return;let{node:O,value:D}=w;if(typeof D=="string"){A.nodeValue=D;return}A.replaceWith(O);return}case 3:{if(!A)return;let{attributes:O,children:D}=w;be(A,O);let C=Array.from(A.childNodes);await Promise.all(D.map((F,R)=>ge(A,F,C[R])));return}}}function W(m,w){let b=Oe(m,w);return ge(m,b)}var Ue=Object.hasOwnProperty,Ne=X(Be(),1),Ge=(0,Ne.default)();function Ve(m){return m.document.body.dataset.slug}var Z=(m,w,b)=>{let A=new URL(m.getAttribute(w),b);m.setAttribute(w,A.pathname+A.hash)};function We(m,w){m.querySelectorAll('[href^="./"], [href^="../"]').forEach(b=>Z(b,"href",w)),m.querySelectorAll('[src^="./"], [src^="../"]').forEach(b=>Z(b,"src",w))}var ye=1,ee=document.createElement("route-announcer"),qe=m=>m?.nodeType===ye,Le=m=>{try{let w=new URL(m);if(window.location.origin===w.origin)return!0}catch{}return!1},$e=m=>{let w=m.origin===window.location.origin,b=m.pathname===window.location.pathname;return w&&b},Ke=({target:m})=>{if(!qe(m)||m.attributes.getNamedItem("target")?.value==="_blank")return;let w=m.closest("a");if(!w||"routerIgnore"in w.dataset)return;let{href:b}=w;if(Le(b))return{url:new URL(b),scroll:"routerNoscroll"in w.dataset?!1:void 0}};function ke(m){let w=new CustomEvent("nav",{detail:{url:m}});document.dispatchEvent(w)}var re=new Set;window.addCleanup=m=>re.add(m);var we;async function se(m,w=!1){we=we||new DOMParser;let b=await fetch(`${m}`).then(D=>{if(D.headers.get("content-type")?.startsWith("text/html"))return D.text();window.location.assign(m)}).catch(()=>{window.location.assign(m)});if(!b)return;re.forEach(D=>D()),re.clear();let A=we.parseFromString(b,"text/html");We(A,m);let O=A.querySelector("title")?.textContent;if(O)document.title=O;else{let D=document.querySelector("h1");O=D?.innerText??D?.textContent??m.pathname}ee.textContent!==O&&(ee.textContent=O),ee.dataset.persist="",A.body.appendChild(ee),W(document.body,A.body),w||(m.hash?document.getElementById(decodeURIComponent(m.hash.substring(1)))?.scrollIntoView():window.scrollTo({top:0})),document.head.querySelectorAll(":not([spa-preserve])").forEach(D=>D.remove()),A.head.querySelectorAll(":not([spa-preserve])").forEach(D=>document.head.appendChild(D)),w||history.pushState({},"",m),ke(Ve(window)),delete ee.dataset.persist}window.spaNavigate=se;function ie(){return typeof window<"u"&&(window.addEventListener("click",async m=>{let{url:w}=Ke(m)??{};if(!(!w||m.ctrlKey||m.metaKey)){if(m.preventDefault(),$e(w)&&w.hash){document.getElementById(decodeURIComponent(w.hash.substring(1)))?.scrollIntoView(),history.pushState({},"",w);return}try{se(w,!1)}catch{window.location.assign(w)}}}),window.addEventListener("popstate",m=>{let{url:w}=Ke(m)??{};if(!(window.location.hash&&window.location.pathname===w?.pathname))try{se(new URL(window.location.toString()),!0)}catch{window.location.reload()}})),new class{go(m){let w=new URL(m,window.location.toString());return se(w,!1)}back(){return window.history.back()}forward(){return window.history.forward()}}}if(ie(),ke(Ve(window)),!customElements.get("route-announcer")){let m={"aria-live":"assertive","aria-atomic":"true",style:"position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"};customElements.define("route-announcer",class extends HTMLElement{constructor(){super()}connectedCallback(){for(let[w,b]of Object.entries(m))this.setAttribute(w,b)}})}}();