import{S as vt,h as ie,s as Be,af as Ct,ag as Tt,d as Nt,C as be,ah as Xe,g as Ne,ai as It,aj as Dt,v as Ot,ak as Rt,j as Ie,M as de,Q as we,al as Mt,am as Lt,U as Pt,p as zt,an as Bt,o as Z,b as _t,k as S,Y as Vt,l as K,$ as $t,ao as Wt,ap as jt,c as ee,n as et,e as xe,B as tt,F as rt,a as he,t as ve,aq as Kt,ar as nt,as as Jt,a4 as Ut,aa as Ht,_ as Gt}from"./framework.79850ceb.js";import{u as Qt,d as qt}from"./theme.6ff56f93.js";const Yt={root:()=>vt(()=>import("./@localSearchIndexroot.9fa9cda3.js"),[])};/*! * tabbable 6.2.0 * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE */var pt=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Se=pt.join(","),yt=typeof Element>"u",se=yt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ke=!yt&&Element.prototype.getRootNode?function(o){var e;return o==null||(e=o.getRootNode)===null||e===void 0?void 0:e.call(o)}:function(o){return o==null?void 0:o.ownerDocument},Ae=function o(e,t){var r;t===void 0&&(t=!0);var a=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),n=a===""||a==="true",i=n||t&&e&&o(e.parentNode);return i},Zt=function(e){var t,r=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return r===""||r==="true"},mt=function(e,t,r){if(Ae(e))return[];var a=Array.prototype.slice.apply(e.querySelectorAll(Se));return t&&se.call(e,Se)&&a.unshift(e),a=a.filter(r),a},gt=function o(e,t,r){for(var a=[],n=Array.from(e);n.length;){var i=n.shift();if(!Ae(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),u=s.length?s:i.children,l=o(u,!0,r);r.flatten?a.push.apply(a,l):a.push({scopeParent:i,candidates:l})}else{var d=se.call(i,Se);d&&r.filter(i)&&(t||!e.includes(i))&&a.push(i);var h=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),v=!Ae(h,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(h&&v){var m=o(h===!0?i.children:h.children,!0,r);r.flatten?a.push.apply(a,m):a.push({scopeParent:i,candidates:m})}else n.unshift.apply(n,i.children)}}return a},bt=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},oe=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Zt(e))&&!bt(e)?0:e.tabIndex},Xt=function(e,t){var r=oe(e);return r<0&&t&&!bt(e)?0:r},er=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},wt=function(e){return e.tagName==="INPUT"},tr=function(e){return wt(e)&&e.type==="hidden"},rr=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return t},nr=function(e,t){for(var r=0;rsummary:first-of-type"),i=n?e.parentElement:e;if(se.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof a=="function"){for(var s=e;e;){var u=e.parentElement,l=ke(e);if(u&&!u.shadowRoot&&a(u)===!0)return at(e);e.assignedSlot?e=e.assignedSlot:!u&&l!==e.ownerDocument?e=l.host:e=u}e=s}if(sr(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return at(e);return!1},lr=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var r=0;r=0)},fr=function o(e){var t=[],r=[];return e.forEach(function(a,n){var i=!!a.scopeParent,s=i?a.scopeParent:a,u=Xt(s,i),l=i?o(a.candidates):s;u===0?i?t.push.apply(t,l):t.push(s):r.push({documentOrder:n,tabIndex:u,item:a,isScope:i,content:l})}),r.sort(er).reduce(function(a,n){return n.isScope?a.push.apply(a,n.content):a.push(n.content),a},[]).concat(t)},dr=function(e,t){t=t||{};var r;return t.getShadowRoot?r=gt([e],t.includeContainer,{filter:_e.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:cr}):r=mt(e,t.includeContainer,_e.bind(null,t)),fr(r)},hr=function(e,t){t=t||{};var r;return t.getShadowRoot?r=gt([e],t.includeContainer,{filter:Ce.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):r=mt(e,t.includeContainer,Ce.bind(null,t)),r},ue=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return se.call(e,Se)===!1?!1:_e(t,e)},vr=pt.concat("iframe").join(","),De=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return se.call(e,vr)===!1?!1:Ce(t,e)};/*! * focus-trap 7.6.0 * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE */function pr(o,e,t){return(e=mr(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function it(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(o,a).enumerable})),t.push.apply(t,r)}return t}function ot(o){for(var e=1;e0){var r=e[e.length-1];r!==t&&r.pause()}var a=e.indexOf(t);a===-1||e.splice(a,1),e.push(t)},deactivateTrap:function(e,t){var r=e.indexOf(t);r!==-1&&e.splice(r,1),e.length>0&&e[e.length-1].unpause()}},gr=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},br=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},me=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},wr=function(e){return me(e)&&!e.shiftKey},xr=function(e){return me(e)&&e.shiftKey},ut=function(e){return setTimeout(e,0)},lt=function(e,t){var r=-1;return e.every(function(a,n){return t(a)?(r=n,!1):!0}),r},pe=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a1?b-1:0),I=1;I=0)f=r.activeElement;else{var c=i.tabbableGroups[0],b=c&&c.firstTabbableNode;f=b||d("fallbackFocus")}if(!f)throw new Error("Your focus-trap needs to have at least one focusable element");return f},v=function(){if(i.containerGroups=i.containers.map(function(f){var c=dr(f,n.tabbableOptions),b=hr(f,n.tabbableOptions),T=c.length>0?c[0]:void 0,I=c.length>0?c[c.length-1]:void 0,B=b.find(function(R){return ue(R)}),y=b.slice().reverse().find(function(R){return ue(R)}),p=!!c.find(function(R){return oe(R)>0});return{container:f,tabbableNodes:c,focusableNodes:b,posTabIndexesFound:p,firstTabbableNode:T,lastTabbableNode:I,firstDomTabbableNode:B,lastDomTabbableNode:y,nextTabbableNode:function(U){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,j=c.indexOf(U);return j<0?Q?b.slice(b.indexOf(U)+1).find(function(V){return ue(V)}):b.slice(0,b.indexOf(U)).reverse().find(function(V){return ue(V)}):c[j+(Q?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(f){return f.tabbableNodes.length>0}),i.tabbableGroups.length<=0&&!d("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(i.containerGroups.find(function(f){return f.posTabIndexesFound})&&i.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},m=function(f){var c=f.activeElement;if(c)return c.shadowRoot&&c.shadowRoot.activeElement!==null?m(c.shadowRoot):c},w=function(f){if(f!==!1&&f!==m(document)){if(!f||!f.focus){w(h());return}f.focus({preventScroll:!!n.preventScroll}),i.mostRecentlyFocusedNode=f,gr(f)&&f.select()}},x=function(f){var c=d("setReturnFocus",f);return c||(c===!1?!1:f)},F=function(f){var c=f.target,b=f.event,T=f.isBackward,I=T===void 0?!1:T;c=c||Fe(b),v();var B=null;if(i.tabbableGroups.length>0){var y=l(c,b),p=y>=0?i.containerGroups[y]:void 0;if(y<0)I?B=i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:B=i.tabbableGroups[0].firstTabbableNode;else if(I){var R=lt(i.tabbableGroups,function(G){var te=G.firstTabbableNode;return c===te});if(R<0&&(p.container===c||De(c,n.tabbableOptions)&&!ue(c,n.tabbableOptions)&&!p.nextTabbableNode(c,!1))&&(R=y),R>=0){var U=R===0?i.tabbableGroups.length-1:R-1,Q=i.tabbableGroups[U];B=oe(c)>=0?Q.lastTabbableNode:Q.lastDomTabbableNode}else me(b)||(B=p.nextTabbableNode(c,!1))}else{var j=lt(i.tabbableGroups,function(G){var te=G.lastTabbableNode;return c===te});if(j<0&&(p.container===c||De(c,n.tabbableOptions)&&!ue(c,n.tabbableOptions)&&!p.nextTabbableNode(c))&&(j=y),j>=0){var V=j===i.tabbableGroups.length-1?0:j+1,H=i.tabbableGroups[V];B=oe(c)>=0?H.firstTabbableNode:H.firstDomTabbableNode}else me(b)||(B=p.nextTabbableNode(c))}}else B=d("fallbackFocus");return B},A=function(f){var c=Fe(f);if(!(l(c,f)>=0)){if(pe(n.clickOutsideDeactivates,f)){s.deactivate({returnFocus:n.returnFocusOnDeactivate});return}pe(n.allowOutsideClick,f)||f.preventDefault()}},C=function(f){var c=Fe(f),b=l(c,f)>=0;if(b||c instanceof Document)b&&(i.mostRecentlyFocusedNode=c);else{f.stopImmediatePropagation();var T,I=!0;if(i.mostRecentlyFocusedNode)if(oe(i.mostRecentlyFocusedNode)>0){var B=l(i.mostRecentlyFocusedNode),y=i.containerGroups[B].tabbableNodes;if(y.length>0){var p=y.findIndex(function(R){return R===i.mostRecentlyFocusedNode});p>=0&&(n.isKeyForward(i.recentNavEvent)?p+1=0&&(T=y[p-1],I=!1))}}else i.containerGroups.some(function(R){return R.tabbableNodes.some(function(U){return oe(U)>0})})||(I=!1);else I=!1;I&&(T=F({target:i.mostRecentlyFocusedNode,isBackward:n.isKeyBackward(i.recentNavEvent)})),w(T||i.mostRecentlyFocusedNode||h())}i.recentNavEvent=void 0},k=function(f){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;i.recentNavEvent=f;var b=F({event:f,isBackward:c});b&&(me(f)&&f.preventDefault(),w(b))},P=function(f){(n.isKeyForward(f)||n.isKeyBackward(f))&&k(f,n.isKeyBackward(f))},O=function(f){br(f)&&pe(n.escapeDeactivates,f)!==!1&&(f.preventDefault(),s.deactivate())},_=function(f){var c=Fe(f);l(c,f)>=0||pe(n.clickOutsideDeactivates,f)||pe(n.allowOutsideClick,f)||(f.preventDefault(),f.stopImmediatePropagation())},E=function(){if(i.active)return st.activateTrap(a,s),i.delayInitialFocusTimer=n.delayInitialFocus?ut(function(){w(h())}):w(h()),r.addEventListener("focusin",C,!0),r.addEventListener("mousedown",A,{capture:!0,passive:!1}),r.addEventListener("touchstart",A,{capture:!0,passive:!1}),r.addEventListener("click",_,{capture:!0,passive:!1}),r.addEventListener("keydown",P,{capture:!0,passive:!1}),r.addEventListener("keydown",O),s},N=function(){if(i.active)return r.removeEventListener("focusin",C,!0),r.removeEventListener("mousedown",A,!0),r.removeEventListener("touchstart",A,!0),r.removeEventListener("click",_,!0),r.removeEventListener("keydown",P,!0),r.removeEventListener("keydown",O),s},M=function(f){var c=f.some(function(b){var T=Array.from(b.removedNodes);return T.some(function(I){return I===i.mostRecentlyFocusedNode})});c&&w(h())},z=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(M):void 0,L=function(){z&&(z.disconnect(),i.active&&!i.paused&&i.containers.map(function(f){z.observe(f,{subtree:!0,childList:!0})}))};return s={get active(){return i.active},get paused(){return i.paused},activate:function(f){if(i.active)return this;var c=u(f,"onActivate"),b=u(f,"onPostActivate"),T=u(f,"checkCanFocusTrap");T||v(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,c==null||c();var I=function(){T&&v(),E(),L(),b==null||b()};return T?(T(i.containers.concat()).then(I,I),this):(I(),this)},deactivate:function(f){if(!i.active)return this;var c=ot({onDeactivate:n.onDeactivate,onPostDeactivate:n.onPostDeactivate,checkCanReturnFocus:n.checkCanReturnFocus},f);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,N(),i.active=!1,i.paused=!1,L(),st.deactivateTrap(a,s);var b=u(c,"onDeactivate"),T=u(c,"onPostDeactivate"),I=u(c,"checkCanReturnFocus"),B=u(c,"returnFocus","returnFocusOnDeactivate");b==null||b();var y=function(){ut(function(){B&&w(x(i.nodeFocusedBeforeActivation)),T==null||T()})};return B&&I?(I(x(i.nodeFocusedBeforeActivation)).then(y,y),this):(y(),this)},pause:function(f){if(i.paused||!i.active)return this;var c=u(f,"onPause"),b=u(f,"onPostPause");return i.paused=!0,c==null||c(),N(),L(),b==null||b(),this},unpause:function(f){if(!i.paused||!i.active)return this;var c=u(f,"onUnpause"),b=u(f,"onPostUnpause");return i.paused=!1,c==null||c(),v(),E(),L(),b==null||b(),this},updateContainerElements:function(f){var c=[].concat(f).filter(Boolean);return i.containers=c.map(function(b){return typeof b=="string"?r.querySelector(b):b}),i.active&&v(),L(),this}},s.updateContainerElements(e),s};function Sr(o,e={}){let t;const{immediate:r,...a}=e,n=ie(!1),i=ie(!1),s=h=>t&&t.activate(h),u=h=>t&&t.deactivate(h),l=()=>{t&&(t.pause(),i.value=!0)},d=()=>{t&&(t.unpause(),i.value=!1)};return Be(()=>Ct(o),h=>{h&&(t=Er(h,{...a,onActivate(){n.value=!0,e.onActivate&&e.onActivate()},onDeactivate(){n.value=!1,e.onDeactivate&&e.onDeactivate()}}),r&&s())},{flush:"post"}),Tt(()=>u()),{hasFocus:n,isPaused:i,activate:s,deactivate:u,pause:l,unpause:d}}class ce{constructor(e,t=!0,r=[],a=5e3){this.ctx=e,this.iframes=t,this.exclude=r,this.iframesTimeout=a}static matches(e,t){const r=typeof t=="string"?[t]:t,a=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(a){let n=!1;return r.every(i=>a.call(e,i)?(n=!0,!1):!0),n}else return!1}getContexts(){let e,t=[];return typeof this.ctx>"u"||!this.ctx?e=[]:NodeList.prototype.isPrototypeOf(this.ctx)?e=Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?e=this.ctx:typeof this.ctx=="string"?e=Array.prototype.slice.call(document.querySelectorAll(this.ctx)):e=[this.ctx],e.forEach(r=>{const a=t.filter(n=>n.contains(r)).length>0;t.indexOf(r)===-1&&!a&&t.push(r)}),t}getIframeContents(e,t,r=()=>{}){let a;try{const n=e.contentWindow;if(a=n.document,!n||!a)throw new Error("iframe inaccessible")}catch{r()}a&&t(a)}isIframeBlank(e){const t="about:blank",r=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&r!==t&&r}observeIframeLoad(e,t,r){let a=!1,n=null;const i=()=>{if(!a){a=!0,clearTimeout(n);try{this.isIframeBlank(e)||(e.removeEventListener("load",i),this.getIframeContents(e,t,r))}catch{r()}}};e.addEventListener("load",i),n=setTimeout(i,this.iframesTimeout)}onIframeReady(e,t,r){try{e.contentWindow.document.readyState==="complete"?this.isIframeBlank(e)?this.observeIframeLoad(e,t,r):this.getIframeContents(e,t,r):this.observeIframeLoad(e,t,r)}catch{r()}}waitForIframes(e,t){let r=0;this.forEachIframe(e,()=>!0,a=>{r++,this.waitForIframes(a.querySelector("html"),()=>{--r||t()})},a=>{a||t()})}forEachIframe(e,t,r,a=()=>{}){let n=e.querySelectorAll("iframe"),i=n.length,s=0;n=Array.prototype.slice.call(n);const u=()=>{--i<=0&&a(s)};i||u(),n.forEach(l=>{ce.matches(l,this.exclude)?u():this.onIframeReady(l,d=>{t(l)&&(s++,r(d)),u()},u)})}createIterator(e,t,r){return document.createNodeIterator(e,t,r,!1)}createInstanceOnIframe(e){return new ce(e.querySelector("html"),this.iframes)}compareNodeIframe(e,t,r){const a=e.compareDocumentPosition(r),n=Node.DOCUMENT_POSITION_PRECEDING;if(a&n)if(t!==null){const i=t.compareDocumentPosition(r),s=Node.DOCUMENT_POSITION_FOLLOWING;if(i&s)return!0}else return!0;return!1}getIteratorNode(e){const t=e.previousNode();let r;return t===null?r=e.nextNode():r=e.nextNode()&&e.nextNode(),{prevNode:t,node:r}}checkIframeFilter(e,t,r,a){let n=!1,i=!1;return a.forEach((s,u)=>{s.val===r&&(n=u,i=s.handled)}),this.compareNodeIframe(e,t,r)?(n===!1&&!i?a.push({val:r,handled:!0}):n!==!1&&!i&&(a[n].handled=!0),!0):(n===!1&&a.push({val:r,handled:!1}),!1)}handleOpenIframes(e,t,r,a){e.forEach(n=>{n.handled||this.getIframeContents(n.val,i=>{this.createInstanceOnIframe(i).forEachNode(t,r,a)})})}iterateThroughNodes(e,t,r,a,n){const i=this.createIterator(t,e,a);let s=[],u=[],l,d,h=()=>({prevNode:d,node:l}=this.getIteratorNode(i),l);for(;h();)this.iframes&&this.forEachIframe(t,v=>this.checkIframeFilter(l,d,v,s),v=>{this.createInstanceOnIframe(v).forEachNode(e,m=>u.push(m),a)}),u.push(l);u.forEach(v=>{r(v)}),this.iframes&&this.handleOpenIframes(s,e,r,a),n()}forEachNode(e,t,r,a=()=>{}){const n=this.getContexts();let i=n.length;i||a(),n.forEach(s=>{const u=()=>{this.iterateThroughNodes(e,s,t,r,()=>{--i<=0&&a()})};this.iframes?this.waitForIframes(s,u):u()})}}let kr=class{constructor(e){this.ctx=e,this.ie=!1;const t=window.navigator.userAgent;(t.indexOf("MSIE")>-1||t.indexOf("Trident")>-1)&&(this.ie=!0)}set opt(e){this._opt=Object.assign({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:()=>{},noMatch:()=>{},filter:()=>!0,done:()=>{},debug:!1,log:window.console},e)}get opt(){return this._opt}get iterator(){return new ce(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}log(e,t="debug"){const r=this.opt.log;this.opt.debug&&typeof r=="object"&&typeof r[t]=="function"&&r[t](`mark.js: ${e}`)}escapeStr(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}createRegExp(e){return this.opt.wildcards!=="disabled"&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),this.opt.wildcards!=="disabled"&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e),e}createSynonymsRegExp(e){const t=this.opt.synonyms,r=this.opt.caseSensitive?"":"i",a=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let n in t)if(t.hasOwnProperty(n)){const i=t[n],s=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(n):this.escapeStr(n),u=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(i):this.escapeStr(i);s!==""&&u!==""&&(e=e.replace(new RegExp(`(${this.escapeStr(s)}|${this.escapeStr(u)})`,`gm${r}`),a+`(${this.processSynomyms(s)}|${this.processSynomyms(u)})`+a))}return e}processSynomyms(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}setupWildcardsRegExp(e){return e=e.replace(/(?:\\)*\?/g,t=>t.charAt(0)==="\\"?"?":""),e.replace(/(?:\\)*\*/g,t=>t.charAt(0)==="\\"?"*":"")}createWildcardsRegExp(e){let t=this.opt.wildcards==="withSpaces";return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}setupIgnoreJoinersRegExp(e){return e.replace(/[^(|)\\]/g,(t,r,a)=>{let n=a.charAt(r+1);return/[(|)\\]/.test(n)||n===""?t:t+"\0"})}createJoinersRegExp(e){let t=[];const r=this.opt.ignorePunctuation;return Array.isArray(r)&&r.length&&t.push(this.escapeStr(r.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join(`[${t.join("")}]*`):e}createDiacriticsRegExp(e){const t=this.opt.caseSensitive?"":"i",r=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"];let a=[];return e.split("").forEach(n=>{r.every(i=>{if(i.indexOf(n)!==-1){if(a.indexOf(i)>-1)return!1;e=e.replace(new RegExp(`[${i}]`,`gm${t}`),`[${i}]`),a.push(i)}return!0})}),e}createMergedBlanksRegExp(e){return e.replace(/[\s]+/gmi,"[\\s]+")}createAccuracyRegExp(e){const t="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let r=this.opt.accuracy,a=typeof r=="string"?r:r.value,n=typeof r=="string"?[]:r.limiters,i="";switch(n.forEach(s=>{i+=`|${this.escapeStr(s)}`}),a){case"partially":default:return`()(${e})`;case"complementary":return i="\\s"+(i||this.escapeStr(t)),`()([^${i}]*${e}[^${i}]*)`;case"exactly":return`(^|\\s${i})(${e})(?=$|\\s${i})`}}getSeparatedKeywords(e){let t=[];return e.forEach(r=>{this.opt.separateWordSearch?r.split(" ").forEach(a=>{a.trim()&&t.indexOf(a)===-1&&t.push(a)}):r.trim()&&t.indexOf(r)===-1&&t.push(r)}),{keywords:t.sort((r,a)=>a.length-r.length),length:t.length}}isNumeric(e){return Number(parseFloat(e))==e}checkRanges(e){if(!Array.isArray(e)||Object.prototype.toString.call(e[0])!=="[object Object]")return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];const t=[];let r=0;return e.sort((a,n)=>a.start-n.start).forEach(a=>{let{start:n,end:i,valid:s}=this.callNoMatchOnInvalidRanges(a,r);s&&(a.start=n,a.length=i-n,t.push(a),r=i)}),t}callNoMatchOnInvalidRanges(e,t){let r,a,n=!1;return e&&typeof e.start<"u"?(r=parseInt(e.start,10),a=r+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&a-t>0&&a-r>0?n=!0:(this.log(`Ignoring invalid or overlapping range: ${JSON.stringify(e)}`),this.opt.noMatch(e))):(this.log(`Ignoring invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)),{start:r,end:a,valid:n}}checkWhitespaceRanges(e,t,r){let a,n=!0,i=r.length,s=t-i,u=parseInt(e.start,10)-s;return u=u>i?i:u,a=u+parseInt(e.length,10),a>i&&(a=i,this.log(`End range automatically set to the max value of ${i}`)),u<0||a-u<0||u>i||a>i?(n=!1,this.log(`Invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)):r.substring(u,a).replace(/\s+/g,"")===""&&(n=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:u,end:a,valid:n}}getTextNodes(e){let t="",r=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,a=>{r.push({start:t.length,end:(t+=a.textContent).length,node:a})},a=>this.matchesExclude(a.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,()=>{e({value:t,nodes:r})})}matchesExclude(e){return ce.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(e,t,r){const a=this.opt.element?this.opt.element:"mark",n=e.splitText(t),i=n.splitText(r-t);let s=document.createElement(a);return s.setAttribute("data-markjs","true"),this.opt.className&&s.setAttribute("class",this.opt.className),s.textContent=n.textContent,n.parentNode.replaceChild(s,n),i}wrapRangeInMappedTextNode(e,t,r,a,n){e.nodes.every((i,s)=>{const u=e.nodes[s+1];if(typeof u>"u"||u.start>t){if(!a(i.node))return!1;const l=t-i.start,d=(r>i.end?i.end:r)-i.start,h=e.value.substr(0,i.start),v=e.value.substr(d+i.start);if(i.node=this.wrapRangeInTextNode(i.node,l,d),e.value=h+v,e.nodes.forEach((m,w)=>{w>=s&&(e.nodes[w].start>0&&w!==s&&(e.nodes[w].start-=d),e.nodes[w].end-=d)}),r-=d,n(i.node.previousSibling,i.start),r>i.end)t=i.end;else return!1}return!0})}wrapMatches(e,t,r,a,n){const i=t===0?0:t+1;this.getTextNodes(s=>{s.nodes.forEach(u=>{u=u.node;let l;for(;(l=e.exec(u.textContent))!==null&&l[i]!=="";){if(!r(l[i],u))continue;let d=l.index;if(i!==0)for(let h=1;h{let u;for(;(u=e.exec(s.value))!==null&&u[i]!=="";){let l=u.index;if(i!==0)for(let h=1;hr(u[i],h),(h,v)=>{e.lastIndex=v,a(h)})}n()})}wrapRangeFromIndex(e,t,r,a){this.getTextNodes(n=>{const i=n.value.length;e.forEach((s,u)=>{let{start:l,end:d,valid:h}=this.checkWhitespaceRanges(s,i,n.value);h&&this.wrapRangeInMappedTextNode(n,l,d,v=>t(v,s,n.value.substring(l,d),u),v=>{r(v,s)})}),a()})}unwrapMatches(e){const t=e.parentNode;let r=document.createDocumentFragment();for(;e.firstChild;)r.appendChild(e.removeChild(e.firstChild));t.replaceChild(r,e),this.ie?this.normalizeTextNode(t):t.normalize()}normalizeTextNode(e){if(e){if(e.nodeType===3)for(;e.nextSibling&&e.nextSibling.nodeType===3;)e.nodeValue+=e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);else this.normalizeTextNode(e.firstChild);this.normalizeTextNode(e.nextSibling)}}markRegExp(e,t){this.opt=t,this.log(`Searching with expression "${e}"`);let r=0,a="wrapMatches";const n=i=>{r++,this.opt.each(i)};this.opt.acrossElements&&(a="wrapMatchesAcrossElements"),this[a](e,this.opt.ignoreGroups,(i,s)=>this.opt.filter(s,i,r),n,()=>{r===0&&this.opt.noMatch(e),this.opt.done(r)})}mark(e,t){this.opt=t;let r=0,a="wrapMatches";const{keywords:n,length:i}=this.getSeparatedKeywords(typeof e=="string"?[e]:e),s=this.opt.caseSensitive?"":"i",u=l=>{let d=new RegExp(this.createRegExp(l),`gm${s}`),h=0;this.log(`Searching with expression "${d}"`),this[a](d,1,(v,m)=>this.opt.filter(m,l,r,h),v=>{h++,r++,this.opt.each(v)},()=>{h===0&&this.opt.noMatch(l),n[i-1]===l?this.opt.done(r):u(n[n.indexOf(l)+1])})};this.opt.acrossElements&&(a="wrapMatchesAcrossElements"),i===0?this.opt.done(r):u(n[0])}markRanges(e,t){this.opt=t;let r=0,a=this.checkRanges(e);a&&a.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(a)),this.wrapRangeFromIndex(a,(n,i,s,u)=>this.opt.filter(n,i,s,u),(n,i)=>{r++,this.opt.each(n,i)},()=>{this.opt.done(r)})):this.opt.done(r)}unmark(e){this.opt=e;let t=this.opt.element?this.opt.element:"*";t+="[data-markjs]",this.opt.className&&(t+=`.${this.opt.className}`),this.log(`Removal selector "${t}"`),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,r=>{this.unwrapMatches(r)},r=>{const a=ce.matches(r,t),n=this.matchesExclude(r);return!a||n?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}};function Ar(o){const e=new kr(o);return this.mark=(t,r)=>(e.mark(t,r),this),this.markRegExp=(t,r)=>(e.markRegExp(t,r),this),this.markRanges=(t,r)=>(e.markRanges(t,r),this),this.unmark=t=>(e.unmark(t),this),this}var $=function(){return $=Object.assign||function(e){for(var t,r=1,a=arguments.length;r0&&n[n.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!n||l[1]>n[0]&&l[1]=o.length&&(o=void 0),{value:o&&o[r++],done:!o}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function W(o,e){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var r=t.call(o),a,n=[],i;try{for(;(e===void 0||e-- >0)&&!(a=r.next()).done;)n.push(a.value)}catch(s){i={error:s}}finally{try{a&&!a.done&&(t=r.return)&&t.call(r)}finally{if(i)throw i.error}}return n}var Nr="ENTRIES",xt="KEYS",Ft="VALUES",J="",Oe=function(){function o(e,t){var r=e._tree,a=Array.from(r.keys());this.set=e,this._type=t,this._path=a.length>0?[{node:r,keys:a}]:[]}return o.prototype.next=function(){var e=this.dive();return this.backtrack(),e},o.prototype.dive=function(){if(this._path.length===0)return{done:!0,value:void 0};var e=le(this._path),t=e.node,r=e.keys;if(le(r)===J)return{done:!1,value:this.result()};var a=t.get(le(r));return this._path.push({node:a,keys:Array.from(a.keys())}),this.dive()},o.prototype.backtrack=function(){if(this._path.length!==0){var e=le(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}},o.prototype.key=function(){return this.set._prefix+this._path.map(function(e){var t=e.keys;return le(t)}).filter(function(e){return e!==J}).join("")},o.prototype.value=function(){return le(this._path).node.get(J)},o.prototype.result=function(){switch(this._type){case Ft:return this.value();case xt:return this.key();default:return[this.key(),this.value()]}},o.prototype[Symbol.iterator]=function(){return this},o}(),le=function(o){return o[o.length-1]},Ir=function(o,e,t){var r=new Map;if(e===void 0)return r;for(var a=e.length+1,n=a+t,i=new Uint8Array(n*a).fill(t+1),s=0;st)continue e}Et(o.get(m),e,t,r,a,x,i,s+m)}}}catch(f){u={error:f}}finally{try{v&&!v.done&&(l=h.return)&&l.call(h)}finally{if(u)throw u.error}}},Re=function(){function o(e,t){e===void 0&&(e=new Map),t===void 0&&(t=""),this._size=void 0,this._tree=e,this._prefix=t}return o.prototype.atPrefix=function(e){var t,r;if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");var a=W(Te(this._tree,e.slice(this._prefix.length)),2),n=a[0],i=a[1];if(n===void 0){var s=W(je(i),2),u=s[0],l=s[1];try{for(var d=D(u.keys()),h=d.next();!h.done;h=d.next()){var v=h.value;if(v!==J&&v.startsWith(l)){var m=new Map;return m.set(v.slice(l.length),u.get(v)),new o(m,e)}}}catch(w){t={error:w}}finally{try{h&&!h.done&&(r=d.return)&&r.call(d)}finally{if(t)throw t.error}}}return new o(n,e)},o.prototype.clear=function(){this._size=void 0,this._tree.clear()},o.prototype.delete=function(e){return this._size=void 0,Dr(this._tree,e)},o.prototype.entries=function(){return new Oe(this,Nr)},o.prototype.forEach=function(e){var t,r;try{for(var a=D(this),n=a.next();!n.done;n=a.next()){var i=W(n.value,2),s=i[0],u=i[1];e(s,u,this)}}catch(l){t={error:l}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}},o.prototype.fuzzyGet=function(e,t){return Ir(this._tree,e,t)},o.prototype.get=function(e){var t=Ve(this._tree,e);return t!==void 0?t.get(J):void 0},o.prototype.has=function(e){var t=Ve(this._tree,e);return t!==void 0&&t.has(J)},o.prototype.keys=function(){return new Oe(this,xt)},o.prototype.set=function(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;var r=Me(this._tree,e);return r.set(J,t),this},Object.defineProperty(o.prototype,"size",{get:function(){if(this._size)return this._size;this._size=0;for(var e=this.entries();!e.next().done;)this._size+=1;return this._size},enumerable:!1,configurable:!0}),o.prototype.update=function(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;var r=Me(this._tree,e);return r.set(J,t(r.get(J))),this},o.prototype.fetch=function(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;var r=Me(this._tree,e),a=r.get(J);return a===void 0&&r.set(J,a=t()),a},o.prototype.values=function(){return new Oe(this,Ft)},o.prototype[Symbol.iterator]=function(){return this.entries()},o.from=function(e){var t,r,a=new o;try{for(var n=D(e),i=n.next();!i.done;i=n.next()){var s=W(i.value,2),u=s[0],l=s[1];a.set(u,l)}}catch(d){t={error:d}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return a},o.fromObject=function(e){return o.from(Object.entries(e))},o}(),Te=function(o,e,t){var r,a;if(t===void 0&&(t=[]),e.length===0||o==null)return[o,t];try{for(var n=D(o.keys()),i=n.next();!i.done;i=n.next()){var s=i.value;if(s!==J&&e.startsWith(s))return t.push([o,s]),Te(o.get(s),e.slice(s.length),t)}}catch(u){r={error:u}}finally{try{i&&!i.done&&(a=n.return)&&a.call(n)}finally{if(r)throw r.error}}return t.push([o,e]),Te(void 0,"",t)},Ve=function(o,e){var t,r;if(e.length===0||o==null)return o;try{for(var a=D(o.keys()),n=a.next();!n.done;n=a.next()){var i=n.value;if(i!==J&&e.startsWith(i))return Ve(o.get(i),e.slice(i.length))}}catch(s){t={error:s}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}},Me=function(o,e){var t,r,a=e.length;e:for(var n=0;o&&n0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new Re,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},o.prototype.discard=function(e){var t=this,r=this._idToShortId.get(e);if(r==null)throw new Error("MiniSearch: cannot discard document with ID ".concat(e,": it is not in the index"));this._idToShortId.delete(e),this._documentIds.delete(r),this._storedFields.delete(r),(this._fieldLength.get(r)||[]).forEach(function(a,n){t.removeFieldLength(r,n,t._documentCount,a)}),this._fieldLength.delete(r),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()},o.prototype.maybeAutoVacuum=function(){if(this._options.autoVacuum!==!1){var e=this._options.autoVacuum,t=e.minDirtFactor,r=e.minDirtCount,a=e.batchSize,n=e.batchWait;this.conditionalVacuum({batchSize:a,batchWait:n},{minDirtCount:r,minDirtFactor:t})}},o.prototype.discardAll=function(e){var t,r,a=this._options.autoVacuum;try{this._options.autoVacuum=!1;try{for(var n=D(e),i=n.next();!i.done;i=n.next()){var s=i.value;this.discard(s)}}catch(u){t={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}}finally{this._options.autoVacuum=a}this.maybeAutoVacuum()},o.prototype.replace=function(e){var t=this._options,r=t.idField,a=t.extractField,n=a(e,r);this.discard(n),this.add(e)},o.prototype.vacuum=function(e){return e===void 0&&(e={}),this.conditionalVacuum(e)},o.prototype.conditionalVacuum=function(e,t){var r=this;return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(function(){var a=r._enqueuedVacuumConditions;return r._enqueuedVacuumConditions=We,r.performVacuuming(e,a)}),this._enqueuedVacuum)):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)},o.prototype.performVacuuming=function(e,t){return Cr(this,void 0,void 0,function(){var r,a,n,i,s,u,l,d,h,v,m,w,x,F,A,C,k,P,O,_,E,N,M,z,L;return Tr(this,function(g){switch(g.label){case 0:if(r=this._dirtCount,!this.vacuumConditionsMet(t))return[3,10];a=e.batchSize||$e.batchSize,n=e.batchWait||$e.batchWait,i=1,g.label=1;case 1:g.trys.push([1,7,8,9]),s=D(this._index),u=s.next(),g.label=2;case 2:if(u.done)return[3,6];l=W(u.value,2),d=l[0],h=l[1];try{for(v=(N=void 0,D(h)),m=v.next();!m.done;m=v.next()){w=W(m.value,2),x=w[0],F=w[1];try{for(A=(z=void 0,D(F)),C=A.next();!C.done;C=A.next())k=W(C.value,1),P=k[0],!this._documentIds.has(P)&&(F.size<=1?h.delete(x):F.delete(P))}catch(f){z={error:f}}finally{try{C&&!C.done&&(L=A.return)&&L.call(A)}finally{if(z)throw z.error}}}}catch(f){N={error:f}}finally{try{m&&!m.done&&(M=v.return)&&M.call(v)}finally{if(N)throw N.error}}return this._index.get(d).size===0&&this._index.delete(d),i%a!==0?[3,4]:[4,new Promise(function(f){return setTimeout(f,n)})];case 3:g.sent(),g.label=4;case 4:i+=1,g.label=5;case 5:return u=s.next(),[3,2];case 6:return[3,9];case 7:return O=g.sent(),_={error:O},[3,9];case 8:try{u&&!u.done&&(E=s.return)&&E.call(s)}finally{if(_)throw _.error}return[7];case 9:this._dirtCount-=r,g.label=10;case 10:return[4,null];case 11:return g.sent(),this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null,[2]}})})},o.prototype.vacuumConditionsMet=function(e){if(e==null)return!0;var t=e.minDirtCount,r=e.minDirtFactor;return t=t||ze.minDirtCount,r=r||ze.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=r},Object.defineProperty(o.prototype,"isVacuuming",{get:function(){return this._currentVacuum!=null},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"dirtCount",{get:function(){return this._dirtCount},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"dirtFactor",{get:function(){return this._dirtCount/(1+this._documentCount+this._dirtCount)},enumerable:!1,configurable:!0}),o.prototype.has=function(e){return this._idToShortId.has(e)},o.prototype.getStoredFields=function(e){var t=this._idToShortId.get(e);if(t!=null)return this._storedFields.get(t)},o.prototype.search=function(e,t){var r,a;t===void 0&&(t={});var n=this.executeQuery(e,t),i=[];try{for(var s=D(n),u=s.next();!u.done;u=s.next()){var l=W(u.value,2),d=l[0],h=l[1],v=h.score,m=h.terms,w=h.match,x=m.length||1,F={id:this._documentIds.get(d),score:v*x,terms:Object.keys(w),queryTerms:m,match:w};Object.assign(F,this._storedFields.get(d)),(t.filter==null||t.filter(F))&&i.push(F)}}catch(A){r={error:A}}finally{try{u&&!u.done&&(a=s.return)&&a.call(s)}finally{if(r)throw r.error}}return e===o.wildcard&&t.boostDocument==null&&this._options.searchOptions.boostDocument==null||i.sort(dt),i},o.prototype.autoSuggest=function(e,t){var r,a,n,i;t===void 0&&(t={}),t=$($({},this._options.autoSuggestOptions),t);var s=new Map;try{for(var u=D(this.search(e,t)),l=u.next();!l.done;l=u.next()){var d=l.value,h=d.score,v=d.terms,m=v.join(" "),w=s.get(m);w!=null?(w.score+=h,w.count+=1):s.set(m,{score:h,terms:v,count:1})}}catch(O){r={error:O}}finally{try{l&&!l.done&&(a=u.return)&&a.call(u)}finally{if(r)throw r.error}}var x=[];try{for(var F=D(s),A=F.next();!A.done;A=F.next()){var C=W(A.value,2),w=C[0],k=C[1],h=k.score,v=k.terms,P=k.count;x.push({suggestion:w,terms:v,score:h/P})}}catch(O){n={error:O}}finally{try{A&&!A.done&&(i=F.return)&&i.call(F)}finally{if(n)throw n.error}}return x.sort(dt),x},Object.defineProperty(o.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"termCount",{get:function(){return this._index.size},enumerable:!1,configurable:!0}),o.loadJSON=function(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(e),t)},o.getDefault=function(e){if(Pe.hasOwnProperty(e))return Le(Pe,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))},o.loadJS=function(e,t){var r,a,n,i,s,u,l=e.index,d=e.documentCount,h=e.nextId,v=e.documentIds,m=e.fieldIds,w=e.fieldLength,x=e.averageFieldLength,F=e.storedFields,A=e.dirtCount,C=e.serializationVersion;if(C!==1&&C!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");var k=new o(t);k._documentCount=d,k._nextId=h,k._documentIds=Ee(v),k._idToShortId=new Map,k._fieldIds=m,k._fieldLength=Ee(w),k._avgFieldLength=x,k._storedFields=Ee(F),k._dirtCount=A||0,k._index=new Re;try{for(var P=D(k._documentIds),O=P.next();!O.done;O=P.next()){var _=W(O.value,2),E=_[0],N=_[1];k._idToShortId.set(N,E)}}catch(y){r={error:y}}finally{try{O&&!O.done&&(a=P.return)&&a.call(P)}finally{if(r)throw r.error}}try{for(var M=D(l),z=M.next();!z.done;z=M.next()){var L=W(z.value,2),g=L[0],f=L[1],c=new Map;try{for(var b=(s=void 0,D(Object.keys(f))),T=b.next();!T.done;T=b.next()){var I=T.value,B=f[I];C===1&&(B=B.ds),c.set(parseInt(I,10),Ee(B))}}catch(y){s={error:y}}finally{try{T&&!T.done&&(u=b.return)&&u.call(b)}finally{if(s)throw s.error}}k._index.set(g,c)}}catch(y){n={error:y}}finally{try{z&&!z.done&&(i=M.return)&&i.call(M)}finally{if(n)throw n.error}}return k},o.prototype.executeQuery=function(e,t){var r=this;if(t===void 0&&(t={}),e===o.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){var a=$($($({},t),e),{queries:void 0}),n=e.queries.map(function(F){return r.executeQuery(F,a)});return this.combineResults(n,a.combineWith)}var i=this._options,s=i.tokenize,u=i.processTerm,l=i.searchOptions,d=$($({tokenize:s,processTerm:u},l),t),h=d.tokenize,v=d.processTerm,m=h(e).flatMap(function(F){return v(F)}).filter(function(F){return!!F}),w=m.map(zr(d)),x=w.map(function(F){return r.executeQuerySpec(F,d)});return this.combineResults(x,d.combineWith)},o.prototype.executeQuerySpec=function(e,t){var r,a,n,i,s=$($({},this._options.searchOptions),t),u=(s.fields||this._options.fields).reduce(function(I,B){var y;return $($({},I),(y={},y[B]=Le(s.boost,B)||1,y))},{}),l=s.boostDocument,d=s.weights,h=s.maxFuzzy,v=s.bm25,m=$($({},ct.weights),d),w=m.fuzzy,x=m.prefix,F=this._index.get(e.term),A=this.termResults(e.term,e.term,1,F,u,l,v),C,k;if(e.prefix&&(C=this._index.atPrefix(e.term)),e.fuzzy){var P=e.fuzzy===!0?.2:e.fuzzy,O=P<1?Math.min(h,Math.round(e.term.length*P)):P;O&&(k=this._index.fuzzyGet(e.term,O))}if(C)try{for(var _=D(C),E=_.next();!E.done;E=_.next()){var N=W(E.value,2),M=N[0],z=N[1],L=M.length-e.term.length;if(L){k==null||k.delete(M);var g=x*M.length/(M.length+.3*L);this.termResults(e.term,M,g,z,u,l,v,A)}}}catch(I){r={error:I}}finally{try{E&&!E.done&&(a=_.return)&&a.call(_)}finally{if(r)throw r.error}}if(k)try{for(var f=D(k.keys()),c=f.next();!c.done;c=f.next()){var M=c.value,b=W(k.get(M),2),T=b[0],L=b[1];if(L){var g=w*M.length/(M.length+L);this.termResults(e.term,M,g,T,u,l,v,A)}}}catch(I){n={error:I}}finally{try{c&&!c.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}return A},o.prototype.executeWildcardQuery=function(e){var t,r,a=new Map,n=$($({},this._options.searchOptions),e);try{for(var i=D(this._documentIds),s=i.next();!s.done;s=i.next()){var u=W(s.value,2),l=u[0],d=u[1],h=n.boostDocument?n.boostDocument(d,"",this._storedFields.get(l)):1;a.set(l,{score:h,terms:[],match:{}})}}catch(v){t={error:v}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return a},o.prototype.combineResults=function(e,t){if(t===void 0&&(t=Ke),e.length===0)return new Map;var r=t.toLowerCase();return e.reduce(Mr[r])||new Map},o.prototype.toJSON=function(){var e,t,r,a,n=[];try{for(var i=D(this._index),s=i.next();!s.done;s=i.next()){var u=W(s.value,2),l=u[0],d=u[1],h={};try{for(var v=(r=void 0,D(d)),m=v.next();!m.done;m=v.next()){var w=W(m.value,2),x=w[0],F=w[1];h[x]=Object.fromEntries(F)}}catch(A){r={error:A}}finally{try{m&&!m.done&&(a=v.return)&&a.call(v)}finally{if(r)throw r.error}}n.push([l,h])}}catch(A){e={error:A}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:n,serializationVersion:2}},o.prototype.termResults=function(e,t,r,a,n,i,s,u){var l,d,h,v,m;if(u===void 0&&(u=new Map),a==null)return u;try{for(var w=D(Object.keys(n)),x=w.next();!x.done;x=w.next()){var F=x.value,A=n[F],C=this._fieldIds[F],k=a.get(C);if(k!=null){var P=k.size,O=this._avgFieldLength[C];try{for(var _=(h=void 0,D(k.keys())),E=_.next();!E.done;E=_.next()){var N=E.value;if(!this._documentIds.has(N)){this.removeTerm(C,N,t),P-=1;continue}var M=i?i(this._documentIds.get(N),t,this._storedFields.get(N)):1;if(M){var z=k.get(N),L=this._fieldLength.get(N)[C],g=Pr(z,P,this._documentCount,L,O,s),f=r*A*M*g,c=u.get(N);if(c){c.score+=f,_r(c.terms,e);var b=Le(c.match,t);b?b.push(F):c.match[t]=[F]}else u.set(N,{score:f,terms:[e],match:(m={},m[t]=[F],m)})}}}catch(T){h={error:T}}finally{try{E&&!E.done&&(v=_.return)&&v.call(_)}finally{if(h)throw h.error}}}}}catch(T){l={error:T}}finally{try{x&&!x.done&&(d=w.return)&&d.call(w)}finally{if(l)throw l.error}}return u},o.prototype.addTerm=function(e,t,r){var a=this._index.fetch(r,ht),n=a.get(e);if(n==null)n=new Map,n.set(t,1),a.set(e,n);else{var i=n.get(t);n.set(t,(i||0)+1)}},o.prototype.removeTerm=function(e,t,r){if(!this._index.has(r)){this.warnDocumentChanged(t,e,r);return}var a=this._index.fetch(r,ht),n=a.get(e);n==null||n.get(t)==null?this.warnDocumentChanged(t,e,r):n.get(t)<=1?n.size<=1?a.delete(e):n.delete(t):n.set(t,n.get(t)-1),this._index.get(r).size===0&&this._index.delete(r)},o.prototype.warnDocumentChanged=function(e,t,r){var a,n;try{for(var i=D(Object.keys(this._fieldIds)),s=i.next();!s.done;s=i.next()){var u=s.value;if(this._fieldIds[u]===t){this._options.logger("warn","MiniSearch: document with ID ".concat(this._documentIds.get(e),' has changed before removal: term "').concat(r,'" was not present in field "').concat(u,'". Removing a document after it has changed can corrupt the index!'),"version_conflict");return}}}catch(l){a={error:l}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}},o.prototype.addDocumentId=function(e){var t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t},o.prototype.addFields=function(e){for(var t=0;t{var y,p,R,U,Q,j,V,H,G;return nt(Rr.loadJSON((R=await((p=(y=n.value)[u.value])==null?void 0:p.call(y)))==null?void 0:R.default,{fields:["title","titles","text"],storeFields:["title","titles"],searchOptions:{fuzzy:.2,prefix:!0,boost:{title:4,text:2,titles:1},...((U=l.value.search)==null?void 0:U.provider)==="local"&&((j=(Q=l.value.search.options)==null?void 0:Q.miniSearch)==null?void 0:j.searchOptions)},...((V=l.value.search)==null?void 0:V.provider)==="local"&&((G=(H=l.value.search.options)==null?void 0:H.miniSearch)==null?void 0:G.options)}))}),v=Ne(()=>{var y,p;return((y=l.value.search)==null?void 0:y.provider)==="local"&&((p=l.value.search.options)==null?void 0:p.disableQueryPersistence)===!0}).value?ie(""):It("vitepress:local-search-filter",""),m=Dt("vitepress:local-search-detailed-list",((T=l.value.search)==null?void 0:T.provider)==="local"&&((I=l.value.search.options)==null?void 0:I.detailedView)===!0),w=Ne(()=>{var y,p,R;return((y=l.value.search)==null?void 0:y.provider)==="local"&&(((p=l.value.search.options)==null?void 0:p.disableDetailedView)===!0||((R=l.value.search.options)==null?void 0:R.detailedView)===!1)});Ot(()=>{w.value&&(m.value=!1)});const x=be([]),F=ie(!1);Be(v,()=>{F.value=!1});const A=Xe(async()=>{if(a.value)return nt(new Ar(a.value))},null);Rt(()=>[d.value,v.value,m.value],async([y,p,R],U,Q)=>{var Je,Ue,He,Ge;let j=!1;if(Q(()=>{j=!0}),!y)return;x.value=y.search(p).slice(0,16),F.value=!0;const V=R?await Promise.all(x.value.map(q=>C(q.id))):[];if(j)return;const H=new Map;for(const{id:q,mod:re}of V){const ne=q.slice(0,q.indexOf("#"));let X=H.get(ne);if(X)continue;X=new Map,H.set(ne,X);const Y=re.default??re;if(Y!=null&&Y.render||Y!=null&&Y.setup){const ae=Jt(Y);ae.config.warnHandler=()=>{},ae.provide(Ut,i),Object.defineProperties(ae.config.globalProperties,{$frontmatter:{get(){return i.frontmatter.value}},$params:{get(){return i.page.value.params}}});const Qe=document.createElement("div");ae.mount(Qe),Qe.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(fe=>{var Ze;const ge=(Ze=fe.querySelector("a"))==null?void 0:Ze.getAttribute("href"),qe=(ge==null?void 0:ge.startsWith("#"))&&ge.slice(1);if(!qe)return;let Ye="";for(;(fe=fe.nextElementSibling)&&!/^h[1-6]$/i.test(fe.tagName);)Ye+=fe.outerHTML;X.set(qe,Ye)}),ae.unmount()}if(j)return}const G=new Set;if(x.value=x.value.map(q=>{const[re,ne]=q.id.split("#"),X=H.get(re),Y=(X==null?void 0:X.get(ne))??"";for(const ae in q.match)G.add(ae);return{...q,text:Y}}),await de(),j)return;await new Promise(q=>{var re;(re=A.value)==null||re.unmark({done:()=>{var ne;(ne=A.value)==null||ne.markRegExp(b(G),{done:q})}})});const te=((Je=r.value)==null?void 0:Je.querySelectorAll(".result .excerpt"))??[];for(const q of te)(Ue=q.querySelector('mark[data-markjs="true"]'))==null||Ue.scrollIntoView({block:"center"});(Ge=(He=a.value)==null?void 0:He.firstElementChild)==null||Ge.scrollIntoView({block:"start"})},{debounce:200,immediate:!0});async function C(y){const p=Ht(y.slice(0,y.indexOf("#")));try{if(!p)throw new Error(`Cannot find file for id: ${y}`);return{id:y,mod:await vt(()=>import(p),[])}}catch(R){return console.error(R),{id:y,mod:{}}}}const k=ie(),P=Ne(()=>{var y;return((y=v.value)==null?void 0:y.length)<=0});function O(y=!0){var p,R;(p=k.value)==null||p.focus(),y&&((R=k.value)==null||R.select())}Ie(()=>{O()});function _(y){y.pointerType==="mouse"&&O()}const E=ie(-1),N=ie(!1);Be(x,y=>{E.value=y.length?0:-1,M()});function M(){de(()=>{const y=document.querySelector(".result.selected");y&&y.scrollIntoView({block:"nearest"})})}we("ArrowUp",y=>{y.preventDefault(),E.value--,E.value<0&&(E.value=x.value.length-1),N.value=!0,M()}),we("ArrowDown",y=>{y.preventDefault(),E.value++,E.value>=x.value.length&&(E.value=0),N.value=!0,M()});const z=Mt();we("Enter",y=>{if(y.target instanceof HTMLButtonElement&&y.target.type!=="submit")return;const p=x.value[E.value];if(y.target instanceof HTMLInputElement&&!p){y.preventDefault();return}p&&(z.go(p.id),t("close"))}),we("Escape",()=>{t("close")});const L={modal:{displayDetails:"Display detailed list",resetButtonTitle:"Reset search",backButtonTitle:"Close search",noResultsText:"No results for",footer:{selectText:"to select",selectKeyAriaLabel:"enter",navigateText:"to navigate",navigateUpKeyAriaLabel:"up arrow",navigateDownKeyAriaLabel:"down arrow",closeText:"to close",closeKeyAriaLabel:"escape"}}},g=qt((B=l.value.search)==null?void 0:B.options,L);Ie(()=>{window.history.pushState(null,"",null)}),Lt("popstate",y=>{y.preventDefault(),t("close")});const f=Pt(zt?document.body:null);Ie(()=>{de(()=>{f.value=!0,de().then(()=>s())})}),Bt(()=>{f.value=!1});function c(){v.value="",de().then(()=>O(!1))}function b(y){return new RegExp([...y].sort((p,R)=>R.length-p.length).map(p=>`(${p.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")})`).join("|"),"gi")}return(y,p)=>{var R,U,Q,j;return Z(),_t(Kt,{to:"body"},[S("div",{ref_key:"el",ref:r,role:"button","aria-owns":(R=x.value)!=null&&R.length?"localsearch-list":void 0,"aria-expanded":"true","aria-haspopup":"listbox","aria-labelledby":"localsearch-label",class:"VPLocalSearchBox"},[S("div",{class:"backdrop",onClick:p[0]||(p[0]=V=>y.$emit("close"))}),S("div",Wr,[S("form",{class:"search-bar",onPointerup:p[4]||(p[4]=V=>_(V)),onSubmit:p[5]||(p[5]=Vt(()=>{},["prevent"]))},[S("label",{title:y.placeholder,id:"localsearch-label",for:"localsearch-input"},p[8]||(p[8]=[S("svg",{class:"search-icon",width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true"},[S("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[S("circle",{cx:"11",cy:"11",r:"8"}),S("path",{d:"m21 21l-4.35-4.35"})])],-1)]),8,jr),S("div",Kr,[S("button",{class:"back-button",title:K(g)("modal.backButtonTitle"),onClick:p[1]||(p[1]=V=>y.$emit("close"))},p[9]||(p[9]=[S("svg",{width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true"},[S("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 12H5m7 7l-7-7l7-7"})],-1)]),8,Jr)]),$t(S("input",{ref_key:"searchInput",ref:k,"onUpdate:modelValue":p[2]||(p[2]=V=>jt(v)?v.value=V:null),placeholder:y.placeholder,id:"localsearch-input","aria-labelledby":"localsearch-label",class:"search-input"},null,8,Ur),[[Wt,K(v)]]),S("div",Hr,[w.value?xe("",!0):(Z(),ee("button",{key:0,class:et(["toggle-layout-button",{"detailed-list":K(m)}]),type:"button",title:K(g)("modal.displayDetails"),onClick:p[3]||(p[3]=V=>E.value>-1&&(m.value=!K(m)))},p[10]||(p[10]=[S("svg",{width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true"},[S("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 14h7v7H3zM3 3h7v7H3zm11 1h7m-7 5h7m-7 6h7m-7 5h7"})],-1)]),10,Gr)),S("button",{class:"clear-button",type:"reset",disabled:P.value,title:K(g)("modal.resetButtonTitle"),onClick:c},p[11]||(p[11]=[S("svg",{width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true"},[S("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 5H9l-7 7l7 7h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2Zm-2 4l-6 6m0-6l6 6"})],-1)]),8,Qr)])],32),S("ul",{ref_key:"resultsEl",ref:a,id:(U=x.value)!=null&&U.length?"localsearch-list":void 0,role:(Q=x.value)!=null&&Q.length?"listbox":void 0,"aria-labelledby":(j=x.value)!=null&&j.length?"localsearch-label":void 0,class:"results",onMousemove:p[7]||(p[7]=V=>N.value=!1)},[(Z(!0),ee(rt,null,tt(x.value,(V,H)=>(Z(),ee("li",{key:V.id,role:"option","aria-selected":E.value===H?"true":"false"},[S("a",{href:V.id,class:et(["result",{selected:E.value===H}]),"aria-label":[...V.titles,V.title].join(" > "),onMouseenter:G=>!N.value&&(E.value=H),onFocusin:G=>E.value=H,onClick:p[6]||(p[6]=G=>y.$emit("close"))},[S("div",null,[S("div",Xr,[p[13]||(p[13]=S("span",{class:"title-icon"},"#",-1)),(Z(!0),ee(rt,null,tt(V.titles,(G,te)=>(Z(),ee("span",{key:te,class:"title"},[S("span",{class:"text",innerHTML:G},null,8,en),p[12]||(p[12]=S("svg",{width:"18",height:"18",viewBox:"0 0 24 24"},[S("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"})],-1))]))),128)),S("span",tn,[S("span",{class:"text",innerHTML:V.title},null,8,rn)])]),K(m)?(Z(),ee("div",nn,[V.text?(Z(),ee("div",an,[S("div",{class:"vp-doc",innerHTML:V.text},null,8,on)])):xe("",!0),p[14]||(p[14]=S("div",{class:"excerpt-gradient-bottom"},null,-1)),p[15]||(p[15]=S("div",{class:"excerpt-gradient-top"},null,-1))])):xe("",!0)])],42,Zr)],8,Yr))),128)),K(v)&&!x.value.length&&F.value?(Z(),ee("li",sn,[he(ve(K(g)("modal.noResultsText"))+' "',1),S("strong",null,ve(K(v)),1),p[16]||(p[16]=he('" '))])):xe("",!0)],40,qr),S("div",un,[S("span",null,[S("kbd",{"aria-label":K(g)("modal.footer.navigateUpKeyAriaLabel")},p[17]||(p[17]=[S("svg",{width:"14",height:"14",viewBox:"0 0 24 24"},[S("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 19V5m-7 7l7-7l7 7"})],-1)]),8,ln),S("kbd",{"aria-label":K(g)("modal.footer.navigateDownKeyAriaLabel")},p[18]||(p[18]=[S("svg",{width:"14",height:"14",viewBox:"0 0 24 24"},[S("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 5v14m7-7l-7 7l-7-7"})],-1)]),8,cn),he(" "+ve(K(g)("modal.footer.navigateText")),1)]),S("span",null,[S("kbd",{"aria-label":K(g)("modal.footer.selectKeyAriaLabel")},p[19]||(p[19]=[S("svg",{width:"14",height:"14",viewBox:"0 0 24 24"},[S("g",{fill:"none",stroke:"currentcolor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[S("path",{d:"m9 10l-5 5l5 5"}),S("path",{d:"M20 4v7a4 4 0 0 1-4 4H4"})])],-1)]),8,fn),he(" "+ve(K(g)("modal.footer.selectText")),1)]),S("span",null,[S("kbd",{"aria-label":K(g)("modal.footer.closeKeyAriaLabel")},"esc",8,dn),he(" "+ve(K(g)("modal.footer.closeText")),1)])])])],8,$r)])}}});const gn=Gt(hn,[["__scopeId","data-v-9cd6a060"]]);export{gn as default};