mirror of
https://github.com/RainCraft-Server/raincraft-server.github.io.git
synced 2025-12-16 13:17:29 +00:00
7 lines
57 KiB
JavaScript
7 lines
57 KiB
JavaScript
var dt=Object.defineProperty;var ht=(o,e,t)=>e in o?dt(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var we=(o,e,t)=>ht(o,typeof e!="symbol"?e+"":e,t);import{g as J,h as de,t as ze,u as ft,n as pt,w as Oe,i as vt,_ as be,o as B,c as W,a as x,j as mt,k as gt,l as bt,m as yt,s as xe,p as Pe,q as wt,v as xt,x as _e,y as te,z as ae,A as _t,B as St,C as Et,D as It,E as kt,F as Tt,G as je,H as Nt,I as Ft,b as Se,J as Ot,K as Ct,L as Ve,M as Rt,N as Be,e as ne,O as se,P as Mt,T as At}from"./app-C-Q4JMDe.js";/*!
|
||
* tabbable 6.2.0
|
||
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
||
*/var Ze=["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])"],fe=Ze.join(","),Xe=typeof Element>"u",U=Xe?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,pe=!Xe&&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},ve=function o(e,t){var n;t===void 0&&(t=!0);var s=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),r=s===""||s==="true",i=r||t&&e&&o(e.parentNode);return i},Lt=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},et=function(e,t,n){if(ve(e))return[];var s=Array.prototype.slice.apply(e.querySelectorAll(fe));return t&&U.call(e,fe)&&s.unshift(e),s=s.filter(n),s},tt=function o(e,t,n){for(var s=[],r=Array.from(e);r.length;){var i=r.shift();if(!ve(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),c=a.length?a:i.children,l=o(c,!0,n);n.flatten?s.push.apply(s,l):s.push({scopeParent:i,candidates:l})}else{var h=U.call(i,fe);h&&n.filter(i)&&(t||!e.includes(i))&&s.push(i);var f=i.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(i),p=!ve(f,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(f&&p){var g=o(f===!0?i.children:f.children,!0,n);n.flatten?s.push.apply(s,g):s.push({scopeParent:i,candidates:g})}else r.unshift.apply(r,i.children)}}return s},nt=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},K=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Lt(e))&&!nt(e)?0:e.tabIndex},Dt=function(e,t){var n=K(e);return n<0&&t&&!nt(e)?0:n},zt=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},st=function(e){return e.tagName==="INPUT"},Pt=function(e){return st(e)&&e.type==="hidden"},jt=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},Vt=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},Bt=function(e){if(!e.name)return!0;var t=e.form||pe(e),n=function(a){return t.querySelectorAll('input[type="radio"][name="'+a+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=n(window.CSS.escape(e.name));else try{s=n(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var r=Vt(s,e.form);return!r||r===e},Wt=function(e){return st(e)&&e.type==="radio"},$t=function(e){return Wt(e)&&!Bt(e)},Jt=function(e){var t,n=e&&pe(e),s=(t=n)===null||t===void 0?void 0:t.host,r=!1;if(n&&n!==e){var i,a,c;for(r=!!((i=s)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(s)||e!=null&&(c=e.ownerDocument)!==null&&c!==void 0&&c.contains(e));!r&&s;){var l,h,f;n=pe(s),s=(l=n)===null||l===void 0?void 0:l.host,r=!!((h=s)!==null&&h!==void 0&&(f=h.ownerDocument)!==null&&f!==void 0&&f.contains(s))}}return r},We=function(e){var t=e.getBoundingClientRect(),n=t.width,s=t.height;return n===0&&s===0},Kt=function(e,t){var n=t.displayCheck,s=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var r=U.call(e,"details>summary:first-of-type"),i=r?e.parentElement:e;if(U.call(i,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof s=="function"){for(var a=e;e;){var c=e.parentElement,l=pe(e);if(c&&!c.shadowRoot&&s(c)===!0)return We(e);e.assignedSlot?e=e.assignedSlot:!c&&l!==e.ownerDocument?e=l.host:e=c}e=a}if(Jt(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return We(e);return!1},Ut=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n<t.children.length;n++){var s=t.children.item(n);if(s.tagName==="LEGEND")return U.call(t,"fieldset[disabled] *")?!0:!s.contains(e)}return!0}t=t.parentElement}return!1},me=function(e,t){return!(t.disabled||ve(t)||Pt(t)||Kt(t,e)||jt(t)||Ut(t))},Ce=function(e,t){return!($t(t)||K(t)<0||!me(e,t))},qt=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Gt=function o(e){var t=[],n=[];return e.forEach(function(s,r){var i=!!s.scopeParent,a=i?s.scopeParent:s,c=Dt(a,i),l=i?o(s.candidates):a;c===0?i?t.push.apply(t,l):t.push(a):n.push({documentOrder:r,tabIndex:c,item:s,isScope:i,content:l})}),n.sort(zt).reduce(function(s,r){return r.isScope?s.push.apply(s,r.content):s.push(r.content),s},[]).concat(t)},Ht=function(e,t){t=t||{};var n;return t.getShadowRoot?n=tt([e],t.includeContainer,{filter:Ce.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:qt}):n=et(e,t.includeContainer,Ce.bind(null,t)),Gt(n)},Qt=function(e,t){t=t||{};var n;return t.getShadowRoot?n=tt([e],t.includeContainer,{filter:me.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=et(e,t.includeContainer,me.bind(null,t)),n},Q=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return U.call(e,fe)===!1?!1:Ce(t,e)},Yt=Ze.concat("iframe").join(","),Ee=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return U.call(e,Yt)===!1?!1:me(t,e)};/*!
|
||
* focus-trap 7.6.0
|
||
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
||
*/function Zt(o,e,t){return(e=en(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function $e(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable})),t.push.apply(t,n)}return t}function Je(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?$e(Object(t),!0).forEach(function(n){Zt(o,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):$e(Object(t)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(t,n))})}return o}function Xt(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var n=t.call(o,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}function en(o){var e=Xt(o,"string");return typeof e=="symbol"?e:e+""}var Ke={activateTrap:function(e,t){if(e.length>0){var n=e[e.length-1];n!==t&&n.pause()}var s=e.indexOf(t);s===-1||e.splice(s,1),e.push(t)},deactivateTrap:function(e,t){var n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},tn=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},nn=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},re=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},sn=function(e){return re(e)&&!e.shiftKey},rn=function(e){return re(e)&&e.shiftKey},Ue=function(e){return setTimeout(e,0)},qe=function(e,t){var n=-1;return e.every(function(s,r){return t(s)?(n=r,!1):!0}),n},ie=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];return typeof e=="function"?e.apply(void 0,n):e},ce=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},on=[],an=function(e,t){var n=(t==null?void 0:t.document)||document,s=(t==null?void 0:t.trapStack)||on,r=Je({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:sn,isKeyBackward:rn},t),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},a,c=function(u,d,m){return u&&u[d]!==void 0?u[d]:r[m||d]},l=function(u,d){var m=typeof(d==null?void 0:d.composedPath)=="function"?d.composedPath():void 0;return i.containerGroups.findIndex(function(v){var w=v.container,S=v.tabbableNodes;return w.contains(u)||(m==null?void 0:m.includes(w))||S.find(function(T){return T===u})})},h=function(u){var d=r[u];if(typeof d=="function"){for(var m=arguments.length,v=new Array(m>1?m-1:0),w=1;w<m;w++)v[w-1]=arguments[w];d=d.apply(void 0,v)}if(d===!0&&(d=void 0),!d){if(d===void 0||d===!1)return d;throw new Error("`".concat(u,"` was specified but was not a node, or did not return a node"))}var S=d;if(typeof d=="string"&&(S=n.querySelector(d),!S))throw new Error("`".concat(u,"` as selector refers to no known node"));return S},f=function(){var u=h("initialFocus");if(u===!1)return!1;if(u===void 0||!Ee(u,r.tabbableOptions))if(l(n.activeElement)>=0)u=n.activeElement;else{var d=i.tabbableGroups[0],m=d&&d.firstTabbableNode;u=m||h("fallbackFocus")}if(!u)throw new Error("Your focus-trap needs to have at least one focusable element");return u},p=function(){if(i.containerGroups=i.containers.map(function(u){var d=Ht(u,r.tabbableOptions),m=Qt(u,r.tabbableOptions),v=d.length>0?d[0]:void 0,w=d.length>0?d[d.length-1]:void 0,S=m.find(function(F){return Q(F)}),T=m.slice().reverse().find(function(F){return Q(F)}),N=!!d.find(function(F){return K(F)>0});return{container:u,tabbableNodes:d,focusableNodes:m,posTabIndexesFound:N,firstTabbableNode:v,lastTabbableNode:w,firstDomTabbableNode:S,lastDomTabbableNode:T,nextTabbableNode:function(C){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,L=d.indexOf(C);return L<0?A?m.slice(m.indexOf(C)+1).find(function(V){return Q(V)}):m.slice(0,m.indexOf(C)).reverse().find(function(V){return Q(V)}):d[L+(A?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(u){return u.tabbableNodes.length>0}),i.tabbableGroups.length<=0&&!h("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(u){return u.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.")},g=function(u){var d=u.activeElement;if(d)return d.shadowRoot&&d.shadowRoot.activeElement!==null?g(d.shadowRoot):d},b=function(u){if(u!==!1&&u!==g(document)){if(!u||!u.focus){b(f());return}u.focus({preventScroll:!!r.preventScroll}),i.mostRecentlyFocusedNode=u,tn(u)&&u.select()}},y=function(u){var d=h("setReturnFocus",u);return d||(d===!1?!1:u)},_=function(u){var d=u.target,m=u.event,v=u.isBackward,w=v===void 0?!1:v;d=d||ce(m),p();var S=null;if(i.tabbableGroups.length>0){var T=l(d,m),N=T>=0?i.containerGroups[T]:void 0;if(T<0)w?S=i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:S=i.tabbableGroups[0].firstTabbableNode;else if(w){var F=qe(i.tabbableGroups,function(ee){var ye=ee.firstTabbableNode;return d===ye});if(F<0&&(N.container===d||Ee(d,r.tabbableOptions)&&!Q(d,r.tabbableOptions)&&!N.nextTabbableNode(d,!1))&&(F=T),F>=0){var C=F===0?i.tabbableGroups.length-1:F-1,A=i.tabbableGroups[C];S=K(d)>=0?A.lastTabbableNode:A.lastDomTabbableNode}else re(m)||(S=N.nextTabbableNode(d,!1))}else{var L=qe(i.tabbableGroups,function(ee){var ye=ee.lastTabbableNode;return d===ye});if(L<0&&(N.container===d||Ee(d,r.tabbableOptions)&&!Q(d,r.tabbableOptions)&&!N.nextTabbableNode(d))&&(L=T),L>=0){var V=L===i.tabbableGroups.length-1?0:L+1,oe=i.tabbableGroups[V];S=K(d)>=0?oe.firstTabbableNode:oe.firstDomTabbableNode}else re(m)||(S=N.nextTabbableNode(d))}}else S=h("fallbackFocus");return S},E=function(u){var d=ce(u);if(!(l(d,u)>=0)){if(ie(r.clickOutsideDeactivates,u)){a.deactivate({returnFocus:r.returnFocusOnDeactivate});return}ie(r.allowOutsideClick,u)||u.preventDefault()}},I=function(u){var d=ce(u),m=l(d,u)>=0;if(m||d instanceof Document)m&&(i.mostRecentlyFocusedNode=d);else{u.stopImmediatePropagation();var v,w=!0;if(i.mostRecentlyFocusedNode)if(K(i.mostRecentlyFocusedNode)>0){var S=l(i.mostRecentlyFocusedNode),T=i.containerGroups[S].tabbableNodes;if(T.length>0){var N=T.findIndex(function(F){return F===i.mostRecentlyFocusedNode});N>=0&&(r.isKeyForward(i.recentNavEvent)?N+1<T.length&&(v=T[N+1],w=!1):N-1>=0&&(v=T[N-1],w=!1))}}else i.containerGroups.some(function(F){return F.tabbableNodes.some(function(C){return K(C)>0})})||(w=!1);else w=!1;w&&(v=_({target:i.mostRecentlyFocusedNode,isBackward:r.isKeyBackward(i.recentNavEvent)})),b(v||i.mostRecentlyFocusedNode||f())}i.recentNavEvent=void 0},M=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;i.recentNavEvent=u;var m=_({event:u,isBackward:d});m&&(re(u)&&u.preventDefault(),b(m))},P=function(u){(r.isKeyForward(u)||r.isKeyBackward(u))&&M(u,r.isKeyBackward(u))},D=function(u){nn(u)&&ie(r.escapeDeactivates,u)!==!1&&(u.preventDefault(),a.deactivate())},z=function(u){var d=ce(u);l(d,u)>=0||ie(r.clickOutsideDeactivates,u)||ie(r.allowOutsideClick,u)||(u.preventDefault(),u.stopImmediatePropagation())},O=function(){if(i.active)return Ke.activateTrap(s,a),i.delayInitialFocusTimer=r.delayInitialFocus?Ue(function(){b(f())}):b(f()),n.addEventListener("focusin",I,!0),n.addEventListener("mousedown",E,{capture:!0,passive:!1}),n.addEventListener("touchstart",E,{capture:!0,passive:!1}),n.addEventListener("click",z,{capture:!0,passive:!1}),n.addEventListener("keydown",P,{capture:!0,passive:!1}),n.addEventListener("keydown",D),a},q=function(){if(i.active)return n.removeEventListener("focusin",I,!0),n.removeEventListener("mousedown",E,!0),n.removeEventListener("touchstart",E,!0),n.removeEventListener("click",z,!0),n.removeEventListener("keydown",P,!0),n.removeEventListener("keydown",D),a},G=function(u){var d=u.some(function(m){var v=Array.from(m.removedNodes);return v.some(function(w){return w===i.mostRecentlyFocusedNode})});d&&b(f())},H=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(G):void 0,j=function(){H&&(H.disconnect(),i.active&&!i.paused&&i.containers.map(function(u){H.observe(u,{subtree:!0,childList:!0})}))};return a={get active(){return i.active},get paused(){return i.paused},activate:function(u){if(i.active)return this;var d=c(u,"onActivate"),m=c(u,"onPostActivate"),v=c(u,"checkCanFocusTrap");v||p(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=n.activeElement,d==null||d();var w=function(){v&&p(),O(),j(),m==null||m()};return v?(v(i.containers.concat()).then(w,w),this):(w(),this)},deactivate:function(u){if(!i.active)return this;var d=Je({onDeactivate:r.onDeactivate,onPostDeactivate:r.onPostDeactivate,checkCanReturnFocus:r.checkCanReturnFocus},u);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,q(),i.active=!1,i.paused=!1,j(),Ke.deactivateTrap(s,a);var m=c(d,"onDeactivate"),v=c(d,"onPostDeactivate"),w=c(d,"checkCanReturnFocus"),S=c(d,"returnFocus","returnFocusOnDeactivate");m==null||m();var T=function(){Ue(function(){S&&b(y(i.nodeFocusedBeforeActivation)),v==null||v()})};return S&&w?(w(y(i.nodeFocusedBeforeActivation)).then(T,T),this):(T(),this)},pause:function(u){if(i.paused||!i.active)return this;var d=c(u,"onPause"),m=c(u,"onPostPause");return i.paused=!0,d==null||d(),q(),j(),m==null||m(),this},unpause:function(u){if(!i.paused||!i.active)return this;var d=c(u,"onUnpause"),m=c(u,"onPostUnpause");return i.paused=!1,d==null||d(),p(),O(),j(),m==null||m(),this},updateContainerElements:function(u){var d=[].concat(u).filter(Boolean);return i.containers=d.map(function(m){return typeof m=="string"?n.querySelector(m):m}),i.active&&p(),j(),this}},a.updateContainerElements(e),a};function cn(o,e={}){let t;const{immediate:n,...s}=e,r=J(!1),i=J(!1),a=p=>t&&t.activate(p),c=p=>t&&t.deactivate(p),l=()=>{t&&(t.pause(),i.value=!0)},h=()=>{t&&(t.unpause(),i.value=!1)},f=de(()=>{const p=ze(o);return(Array.isArray(p)?p:[p]).map(g=>{const b=ze(g);return typeof b=="string"?b:ft(b)}).filter(pt)});return Oe(f,p=>{p.length&&(t=an(p,{...s,onActivate(){r.value=!0,e.onActivate&&e.onActivate()},onDeactivate(){r.value=!1,e.onDeactivate&&e.onDeactivate()}}),n&&a())},{flush:"post"}),vt(()=>c()),{hasFocus:r,isPaused:i,activate:a,deactivate:c,pause:l,unpause:h}}class Z{constructor(e,t=!0,n=[],s=5e3){this.ctx=e,this.iframes=t,this.exclude=n,this.iframesTimeout=s}static matches(e,t){const n=typeof t=="string"?[t]:t,s=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(s){let r=!1;return n.every(i=>s.call(e,i)?(r=!0,!1):!0),r}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(n=>{const s=t.filter(r=>r.contains(n)).length>0;t.indexOf(n)===-1&&!s&&t.push(n)}),t}getIframeContents(e,t,n=()=>{}){let s;try{const r=e.contentWindow;if(s=r.document,!r||!s)throw new Error("iframe inaccessible")}catch{n()}s&&t(s)}isIframeBlank(e){const t="about:blank",n=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&n!==t&&n}observeIframeLoad(e,t,n){let s=!1,r=null;const i=()=>{if(!s){s=!0,clearTimeout(r);try{this.isIframeBlank(e)||(e.removeEventListener("load",i),this.getIframeContents(e,t,n))}catch{n()}}};e.addEventListener("load",i),r=setTimeout(i,this.iframesTimeout)}onIframeReady(e,t,n){try{e.contentWindow.document.readyState==="complete"?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch{n()}}waitForIframes(e,t){let n=0;this.forEachIframe(e,()=>!0,s=>{n++,this.waitForIframes(s.querySelector("html"),()=>{--n||t()})},s=>{s||t()})}forEachIframe(e,t,n,s=()=>{}){let r=e.querySelectorAll("iframe"),i=r.length,a=0;r=Array.prototype.slice.call(r);const c=()=>{--i<=0&&s(a)};i||c(),r.forEach(l=>{Z.matches(l,this.exclude)?c():this.onIframeReady(l,h=>{t(l)&&(a++,n(h)),c()},c)})}createIterator(e,t,n){return document.createNodeIterator(e,t,n,!1)}createInstanceOnIframe(e){return new Z(e.querySelector("html"),this.iframes)}compareNodeIframe(e,t,n){const s=e.compareDocumentPosition(n),r=Node.DOCUMENT_POSITION_PRECEDING;if(s&r)if(t!==null){const i=t.compareDocumentPosition(n),a=Node.DOCUMENT_POSITION_FOLLOWING;if(i&a)return!0}else return!0;return!1}getIteratorNode(e){const t=e.previousNode();let n;return t===null?n=e.nextNode():n=e.nextNode()&&e.nextNode(),{prevNode:t,node:n}}checkIframeFilter(e,t,n,s){let r=!1,i=!1;return s.forEach((a,c)=>{a.val===n&&(r=c,i=a.handled)}),this.compareNodeIframe(e,t,n)?(r===!1&&!i?s.push({val:n,handled:!0}):r!==!1&&!i&&(s[r].handled=!0),!0):(r===!1&&s.push({val:n,handled:!1}),!1)}handleOpenIframes(e,t,n,s){e.forEach(r=>{r.handled||this.getIframeContents(r.val,i=>{this.createInstanceOnIframe(i).forEachNode(t,n,s)})})}iterateThroughNodes(e,t,n,s,r){const i=this.createIterator(t,e,s);let a=[],c=[],l,h,f=()=>({prevNode:h,node:l}=this.getIteratorNode(i),l);for(;f();)this.iframes&&this.forEachIframe(t,p=>this.checkIframeFilter(l,h,p,a),p=>{this.createInstanceOnIframe(p).forEachNode(e,g=>c.push(g),s)}),c.push(l);c.forEach(p=>{n(p)}),this.iframes&&this.handleOpenIframes(a,e,n,s),r()}forEachNode(e,t,n,s=()=>{}){const r=this.getContexts();let i=r.length;i||s(),r.forEach(a=>{const c=()=>{this.iterateThroughNodes(e,a,t,n,()=>{--i<=0&&s()})};this.iframes?this.waitForIframes(a,c):c()})}}let ln=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 Z(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}log(e,t="debug"){const n=this.opt.log;this.opt.debug&&typeof n=="object"&&typeof n[t]=="function"&&n[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,n=this.opt.caseSensitive?"":"i",s=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let r in t)if(t.hasOwnProperty(r)){const i=t[r],a=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(r):this.escapeStr(r),c=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(i):this.escapeStr(i);a!==""&&c!==""&&(e=e.replace(new RegExp(`(${this.escapeStr(a)}|${this.escapeStr(c)})`,`gm${n}`),s+`(${this.processSynomyms(a)}|${this.processSynomyms(c)})`+s))}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,n,s)=>{let r=s.charAt(n+1);return/[(|)\\]/.test(r)||r===""?t:t+"\0"})}createJoinersRegExp(e){let t=[];const n=this.opt.ignorePunctuation;return Array.isArray(n)&&n.length&&t.push(this.escapeStr(n.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",n=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 s=[];return e.split("").forEach(r=>{n.every(i=>{if(i.indexOf(r)!==-1){if(s.indexOf(i)>-1)return!1;e=e.replace(new RegExp(`[${i}]`,`gm${t}`),`[${i}]`),s.push(i)}return!0})}),e}createMergedBlanksRegExp(e){return e.replace(/[\s]+/gmi,"[\\s]+")}createAccuracyRegExp(e){const t="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let n=this.opt.accuracy,s=typeof n=="string"?n:n.value,r=typeof n=="string"?[]:n.limiters,i="";switch(r.forEach(a=>{i+=`|${this.escapeStr(a)}`}),s){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(n=>{this.opt.separateWordSearch?n.split(" ").forEach(s=>{s.trim()&&t.indexOf(s)===-1&&t.push(s)}):n.trim()&&t.indexOf(n)===-1&&t.push(n)}),{keywords:t.sort((n,s)=>s.length-n.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 n=0;return e.sort((s,r)=>s.start-r.start).forEach(s=>{let{start:r,end:i,valid:a}=this.callNoMatchOnInvalidRanges(s,n);a&&(s.start=r,s.length=i-r,t.push(s),n=i)}),t}callNoMatchOnInvalidRanges(e,t){let n,s,r=!1;return e&&typeof e.start<"u"?(n=parseInt(e.start,10),s=n+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&s-t>0&&s-n>0?r=!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:n,end:s,valid:r}}checkWhitespaceRanges(e,t,n){let s,r=!0,i=n.length,a=t-i,c=parseInt(e.start,10)-a;return c=c>i?i:c,s=c+parseInt(e.length,10),s>i&&(s=i,this.log(`End range automatically set to the max value of ${i}`)),c<0||s-c<0||c>i||s>i?(r=!1,this.log(`Invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)):n.substring(c,s).replace(/\s+/g,"")===""&&(r=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:c,end:s,valid:r}}getTextNodes(e){let t="",n=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,s=>{n.push({start:t.length,end:(t+=s.textContent).length,node:s})},s=>this.matchesExclude(s.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,()=>{e({value:t,nodes:n})})}matchesExclude(e){return Z.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(e,t,n){const s=this.opt.element?this.opt.element:"mark",r=e.splitText(t),i=r.splitText(n-t);let a=document.createElement(s);return a.setAttribute("data-markjs","true"),this.opt.className&&a.setAttribute("class",this.opt.className),a.textContent=r.textContent,r.parentNode.replaceChild(a,r),i}wrapRangeInMappedTextNode(e,t,n,s,r){e.nodes.every((i,a)=>{const c=e.nodes[a+1];if(typeof c>"u"||c.start>t){if(!s(i.node))return!1;const l=t-i.start,h=(n>i.end?i.end:n)-i.start,f=e.value.substr(0,i.start),p=e.value.substr(h+i.start);if(i.node=this.wrapRangeInTextNode(i.node,l,h),e.value=f+p,e.nodes.forEach((g,b)=>{b>=a&&(e.nodes[b].start>0&&b!==a&&(e.nodes[b].start-=h),e.nodes[b].end-=h)}),n-=h,r(i.node.previousSibling,i.start),n>i.end)t=i.end;else return!1}return!0})}wrapMatches(e,t,n,s,r){const i=t===0?0:t+1;this.getTextNodes(a=>{a.nodes.forEach(c=>{c=c.node;let l;for(;(l=e.exec(c.textContent))!==null&&l[i]!=="";){if(!n(l[i],c))continue;let h=l.index;if(i!==0)for(let f=1;f<i;f++)h+=l[f].length;c=this.wrapRangeInTextNode(c,h,h+l[i].length),s(c.previousSibling),e.lastIndex=0}}),r()})}wrapMatchesAcrossElements(e,t,n,s,r){const i=t===0?0:t+1;this.getTextNodes(a=>{let c;for(;(c=e.exec(a.value))!==null&&c[i]!=="";){let l=c.index;if(i!==0)for(let f=1;f<i;f++)l+=c[f].length;const h=l+c[i].length;this.wrapRangeInMappedTextNode(a,l,h,f=>n(c[i],f),(f,p)=>{e.lastIndex=p,s(f)})}r()})}wrapRangeFromIndex(e,t,n,s){this.getTextNodes(r=>{const i=r.value.length;e.forEach((a,c)=>{let{start:l,end:h,valid:f}=this.checkWhitespaceRanges(a,i,r.value);f&&this.wrapRangeInMappedTextNode(r,l,h,p=>t(p,a,r.value.substring(l,h),c),p=>{n(p,a)})}),s()})}unwrapMatches(e){const t=e.parentNode;let n=document.createDocumentFragment();for(;e.firstChild;)n.appendChild(e.removeChild(e.firstChild));t.replaceChild(n,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 n=0,s="wrapMatches";const r=i=>{n++,this.opt.each(i)};this.opt.acrossElements&&(s="wrapMatchesAcrossElements"),this[s](e,this.opt.ignoreGroups,(i,a)=>this.opt.filter(a,i,n),r,()=>{n===0&&this.opt.noMatch(e),this.opt.done(n)})}mark(e,t){this.opt=t;let n=0,s="wrapMatches";const{keywords:r,length:i}=this.getSeparatedKeywords(typeof e=="string"?[e]:e),a=this.opt.caseSensitive?"":"i",c=l=>{let h=new RegExp(this.createRegExp(l),`gm${a}`),f=0;this.log(`Searching with expression "${h}"`),this[s](h,1,(p,g)=>this.opt.filter(g,l,n,f),p=>{f++,n++,this.opt.each(p)},()=>{f===0&&this.opt.noMatch(l),r[i-1]===l?this.opt.done(n):c(r[r.indexOf(l)+1])})};this.opt.acrossElements&&(s="wrapMatchesAcrossElements"),i===0?this.opt.done(n):c(r[0])}markRanges(e,t){this.opt=t;let n=0,s=this.checkRanges(e);s&&s.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(s)),this.wrapRangeFromIndex(s,(r,i,a,c)=>this.opt.filter(r,i,a,c),(r,i)=>{n++,this.opt.each(r,i)},()=>{this.opt.done(n)})):this.opt.done(n)}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,n=>{this.unwrapMatches(n)},n=>{const s=Z.matches(n,t),r=this.matchesExclude(n);return!s||r?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}};function un(o){const e=new ln(o);return this.mark=(t,n)=>(e.mark(t,n),this),this.markRegExp=(t,n)=>(e.markRegExp(t,n),this),this.markRanges=(t,n)=>(e.markRanges(t,n),this),this.unmark=t=>(e.unmark(t),this),this}function he(o,e,t,n){function s(r){return r instanceof t?r:new t(function(i){i(r)})}return new(t||(t=Promise))(function(r,i){function a(h){try{l(n.next(h))}catch(f){i(f)}}function c(h){try{l(n.throw(h))}catch(f){i(f)}}function l(h){h.done?r(h.value):s(h.value).then(a,c)}l((n=n.apply(o,[])).next())})}const dn="ENTRIES",it="KEYS",rt="VALUES",R="";class Ie{constructor(e,t){const n=e._tree,s=Array.from(n.keys());this.set=e,this._type=t,this._path=s.length>0?[{node:n,keys:s}]:[]}next(){const e=this.dive();return this.backtrack(),e}dive(){if(this._path.length===0)return{done:!0,value:void 0};const{node:e,keys:t}=Y(this._path);if(Y(t)===R)return{done:!1,value:this.result()};const n=e.get(Y(t));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const e=Y(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>Y(e)).filter(e=>e!==R).join("")}value(){return Y(this._path).node.get(R)}result(){switch(this._type){case rt:return this.value();case it:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const Y=o=>o[o.length-1],hn=(o,e,t)=>{const n=new Map;if(e===void 0)return n;const s=e.length+1,r=s+t,i=new Uint8Array(r*s).fill(t+1);for(let a=0;a<s;++a)i[a]=a;for(let a=1;a<r;++a)i[a*s]=a;return ot(o,e,t,n,i,1,s,""),n},ot=(o,e,t,n,s,r,i,a)=>{const c=r*i;e:for(const l of o.keys())if(l===R){const h=s[c-1];h<=t&&n.set(a,[o.get(l),h])}else{let h=r;for(let f=0;f<l.length;++f,++h){const p=l[f],g=i*h,b=g-i;let y=s[g];const _=Math.max(0,h-t-1),E=Math.min(i-1,h+t);for(let I=_;I<E;++I){const M=p!==e[I],P=s[b+I]+ +M,D=s[b+I+1]+1,z=s[g+I]+1,O=s[g+I+1]=Math.min(P,D,z);O<y&&(y=O)}if(y>t)continue e}ot(o.get(l),e,t,n,s,h,i,a+l)}};class ${constructor(e=new Map,t=""){this._size=void 0,this._tree=e,this._prefix=t}atPrefix(e){if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");const[t,n]=ge(this._tree,e.slice(this._prefix.length));if(t===void 0){const[s,r]=Le(n);for(const i of s.keys())if(i!==R&&i.startsWith(r)){const a=new Map;return a.set(i.slice(r.length),s.get(i)),new $(a,e)}}return new $(t,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,fn(this._tree,e)}entries(){return new Ie(this,dn)}forEach(e){for(const[t,n]of this)e(t,n,this)}fuzzyGet(e,t){return hn(this._tree,e,t)}get(e){const t=Re(this._tree,e);return t!==void 0?t.get(R):void 0}has(e){const t=Re(this._tree,e);return t!==void 0&&t.has(R)}keys(){return new Ie(this,it)}set(e,t){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,ke(this._tree,e).set(R,t),this}get size(){if(this._size)return this._size;this._size=0;const e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const n=ke(this._tree,e);return n.set(R,t(n.get(R))),this}fetch(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const n=ke(this._tree,e);let s=n.get(R);return s===void 0&&n.set(R,s=t()),s}values(){return new Ie(this,rt)}[Symbol.iterator](){return this.entries()}static from(e){const t=new $;for(const[n,s]of e)t.set(n,s);return t}static fromObject(e){return $.from(Object.entries(e))}}const ge=(o,e,t=[])=>{if(e.length===0||o==null)return[o,t];for(const n of o.keys())if(n!==R&&e.startsWith(n))return t.push([o,n]),ge(o.get(n),e.slice(n.length),t);return t.push([o,e]),ge(void 0,"",t)},Re=(o,e)=>{if(e.length===0||o==null)return o;for(const t of o.keys())if(t!==R&&e.startsWith(t))return Re(o.get(t),e.slice(t.length))},ke=(o,e)=>{const t=e.length;e:for(let n=0;o&&n<t;){for(const r of o.keys())if(r!==R&&e[n]===r[0]){const i=Math.min(t-n,r.length);let a=1;for(;a<i&&e[n+a]===r[a];)++a;const c=o.get(r);if(a===r.length)o=c;else{const l=new Map;l.set(r.slice(a),c),o.set(e.slice(n,n+a),l),o.delete(r),o=l}n+=a;continue e}const s=new Map;return o.set(e.slice(n),s),s}return o},fn=(o,e)=>{const[t,n]=ge(o,e);if(t!==void 0){if(t.delete(R),t.size===0)at(n);else if(t.size===1){const[s,r]=t.entries().next().value;ct(n,s,r)}}},at=o=>{if(o.length===0)return;const[e,t]=Le(o);if(e.delete(t),e.size===0)at(o.slice(0,-1));else if(e.size===1){const[n,s]=e.entries().next().value;n!==R&&ct(o.slice(0,-1),n,s)}},ct=(o,e,t)=>{if(o.length===0)return;const[n,s]=Le(o);n.set(s+e,t),n.delete(s)},Le=o=>o[o.length-1],De="or",lt="and",pn="and_not";class X{constructor(e){if((e==null?void 0:e.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');const t=e.autoVacuum==null||e.autoVacuum===!0?Fe:e.autoVacuum;this._options=Object.assign(Object.assign(Object.assign({},Ne),e),{autoVacuum:t,searchOptions:Object.assign(Object.assign({},Ge),e.searchOptions||{}),autoSuggestOptions:Object.assign(Object.assign({},yn),e.autoSuggestOptions||{})}),this._index=new $,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=Ae,this.addFields(this._options.fields)}add(e){const{extractField:t,tokenize:n,processTerm:s,fields:r,idField:i}=this._options,a=t(e,i);if(a==null)throw new Error(`MiniSearch: document does not have ID field "${i}"`);if(this._idToShortId.has(a))throw new Error(`MiniSearch: duplicate ID ${a}`);const c=this.addDocumentId(a);this.saveStoredFields(c,e);for(const l of r){const h=t(e,l);if(h==null)continue;const f=n(h.toString(),l),p=this._fieldIds[l],g=new Set(f).size;this.addFieldLength(c,p,this._documentCount-1,g);for(const b of f){const y=s(b,l);if(Array.isArray(y))for(const _ of y)this.addTerm(p,c,_);else y&&this.addTerm(p,c,y)}}}addAll(e){for(const t of e)this.add(t)}addAllAsync(e,t={}){const{chunkSize:n=10}=t,s={chunk:[],promise:Promise.resolve()},{chunk:r,promise:i}=e.reduce(({chunk:a,promise:c},l,h)=>(a.push(l),(h+1)%n===0?{chunk:[],promise:c.then(()=>new Promise(f=>setTimeout(f,0))).then(()=>this.addAll(a))}:{chunk:a,promise:c}),s);return i.then(()=>this.addAll(r))}remove(e){const{tokenize:t,processTerm:n,extractField:s,fields:r,idField:i}=this._options,a=s(e,i);if(a==null)throw new Error(`MiniSearch: document does not have ID field "${i}"`);const c=this._idToShortId.get(a);if(c==null)throw new Error(`MiniSearch: cannot remove document with ID ${a}: it is not in the index`);for(const l of r){const h=s(e,l);if(h==null)continue;const f=t(h.toString(),l),p=this._fieldIds[l],g=new Set(f).size;this.removeFieldLength(c,p,this._documentCount,g);for(const b of f){const y=n(b,l);if(Array.isArray(y))for(const _ of y)this.removeTerm(p,c,_);else y&&this.removeTerm(p,c,y)}}this._storedFields.delete(c),this._documentIds.delete(c),this._idToShortId.delete(a),this._fieldLength.delete(c),this._documentCount-=1}removeAll(e){if(e)for(const t of e)this.remove(t);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new $,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(e){const t=this._idToShortId.get(e);if(t==null)throw new Error(`MiniSearch: cannot discard document with ID ${e}: it is not in the index`);this._idToShortId.delete(e),this._documentIds.delete(t),this._storedFields.delete(t),(this._fieldLength.get(t)||[]).forEach((n,s)=>{this.removeFieldLength(t,s,this._documentCount,n)}),this._fieldLength.delete(t),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;const{minDirtFactor:e,minDirtCount:t,batchSize:n,batchWait:s}=this._options.autoVacuum;this.conditionalVacuum({batchSize:n,batchWait:s},{minDirtCount:t,minDirtFactor:e})}discardAll(e){const t=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const n of e)this.discard(n)}finally{this._options.autoVacuum=t}this.maybeAutoVacuum()}replace(e){const{idField:t,extractField:n}=this._options,s=n(e,t);this.discard(s),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,t){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{const n=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=Ae,this.performVacuuming(e,n)}),this._enqueuedVacuum)):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}performVacuuming(e,t){return he(this,void 0,void 0,function*(){const n=this._dirtCount;if(this.vacuumConditionsMet(t)){const s=e.batchSize||Me.batchSize,r=e.batchWait||Me.batchWait;let i=1;for(const[a,c]of this._index){for(const[l,h]of c)for(const[f]of h)this._documentIds.has(f)||(h.size<=1?c.delete(l):h.delete(f));this._index.get(a).size===0&&this._index.delete(a),i%s===0&&(yield new Promise(l=>setTimeout(l,r))),i+=1}this._dirtCount-=n}yield null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null})}vacuumConditionsMet(e){if(e==null)return!0;let{minDirtCount:t,minDirtFactor:n}=e;return t=t||Fe.minDirtCount,n=n||Fe.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=n}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){const t=this._idToShortId.get(e);if(t!=null)return this._storedFields.get(t)}search(e,t={}){const n=this.executeQuery(e,t),s=[];for(const[r,{score:i,terms:a,match:c}]of n){const l=a.length||1,h={id:this._documentIds.get(r),score:i*l,terms:Object.keys(c),queryTerms:a,match:c};Object.assign(h,this._storedFields.get(r)),(t.filter==null||t.filter(h))&&s.push(h)}return e===X.wildcard&&t.boostDocument==null&&this._options.searchOptions.boostDocument==null||s.sort(Qe),s}autoSuggest(e,t={}){t=Object.assign(Object.assign({},this._options.autoSuggestOptions),t);const n=new Map;for(const{score:r,terms:i}of this.search(e,t)){const a=i.join(" "),c=n.get(a);c!=null?(c.score+=r,c.count+=1):n.set(a,{score:r,terms:i,count:1})}const s=[];for(const[r,{score:i,terms:a,count:c}]of n)s.push({suggestion:r,terms:a,score:i/c});return s.sort(Qe),s}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(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)}static loadJSONAsync(e,t){return he(this,void 0,void 0,function*(){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(e),t)})}static getDefault(e){if(Ne.hasOwnProperty(e))return Te(Ne,e);throw new Error(`MiniSearch: unknown option "${e}"`)}static loadJS(e,t){const{index:n,documentIds:s,fieldLength:r,storedFields:i,serializationVersion:a}=e,c=this.instantiateMiniSearch(e,t);c._documentIds=le(s),c._fieldLength=le(r),c._storedFields=le(i);for(const[l,h]of c._documentIds)c._idToShortId.set(h,l);for(const[l,h]of n){const f=new Map;for(const p of Object.keys(h)){let g=h[p];a===1&&(g=g.ds),f.set(parseInt(p,10),le(g))}c._index.set(l,f)}return c}static loadJSAsync(e,t){return he(this,void 0,void 0,function*(){const{index:n,documentIds:s,fieldLength:r,storedFields:i,serializationVersion:a}=e,c=this.instantiateMiniSearch(e,t);c._documentIds=yield ue(s),c._fieldLength=yield ue(r),c._storedFields=yield ue(i);for(const[h,f]of c._documentIds)c._idToShortId.set(f,h);let l=0;for(const[h,f]of n){const p=new Map;for(const g of Object.keys(f)){let b=f[g];a===1&&(b=b.ds),p.set(parseInt(g,10),yield ue(b))}++l%1e3===0&&(yield ut(0)),c._index.set(h,p)}return c})}static instantiateMiniSearch(e,t){const{documentCount:n,nextId:s,fieldIds:r,averageFieldLength:i,dirtCount:a,serializationVersion:c}=e;if(c!==1&&c!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const l=new X(t);return l._documentCount=n,l._nextId=s,l._idToShortId=new Map,l._fieldIds=r,l._avgFieldLength=i,l._dirtCount=a||0,l._index=new $,l}executeQuery(e,t={}){if(e===X.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){const p=Object.assign(Object.assign(Object.assign({},t),e),{queries:void 0}),g=e.queries.map(b=>this.executeQuery(b,p));return this.combineResults(g,p.combineWith)}const{tokenize:n,processTerm:s,searchOptions:r}=this._options,i=Object.assign(Object.assign({tokenize:n,processTerm:s},r),t),{tokenize:a,processTerm:c}=i,f=a(e).flatMap(p=>c(p)).filter(p=>!!p).map(bn(i)).map(p=>this.executeQuerySpec(p,i));return this.combineResults(f,i.combineWith)}executeQuerySpec(e,t){const n=Object.assign(Object.assign({},this._options.searchOptions),t),s=(n.fields||this._options.fields).reduce((y,_)=>Object.assign(Object.assign({},y),{[_]:Te(n.boost,_)||1}),{}),{boostDocument:r,weights:i,maxFuzzy:a,bm25:c}=n,{fuzzy:l,prefix:h}=Object.assign(Object.assign({},Ge.weights),i),f=this._index.get(e.term),p=this.termResults(e.term,e.term,1,e.termBoost,f,s,r,c);let g,b;if(e.prefix&&(g=this._index.atPrefix(e.term)),e.fuzzy){const y=e.fuzzy===!0?.2:e.fuzzy,_=y<1?Math.min(a,Math.round(e.term.length*y)):y;_&&(b=this._index.fuzzyGet(e.term,_))}if(g)for(const[y,_]of g){const E=y.length-e.term.length;if(!E)continue;b==null||b.delete(y);const I=h*y.length/(y.length+.3*E);this.termResults(e.term,y,I,e.termBoost,_,s,r,c,p)}if(b)for(const y of b.keys()){const[_,E]=b.get(y);if(!E)continue;const I=l*y.length/(y.length+E);this.termResults(e.term,y,I,e.termBoost,_,s,r,c,p)}return p}executeWildcardQuery(e){const t=new Map,n=Object.assign(Object.assign({},this._options.searchOptions),e);for(const[s,r]of this._documentIds){const i=n.boostDocument?n.boostDocument(r,"",this._storedFields.get(s)):1;t.set(s,{score:i,terms:[],match:{}})}return t}combineResults(e,t=De){if(e.length===0)return new Map;const n=t.toLowerCase(),s=vn[n];if(!s)throw new Error(`Invalid combination operator: ${t}`);return e.reduce(s)||new Map}toJSON(){const e=[];for(const[t,n]of this._index){const s={};for(const[r,i]of n)s[r]=Object.fromEntries(i);e.push([t,s])}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:e,serializationVersion:2}}termResults(e,t,n,s,r,i,a,c,l=new Map){if(r==null)return l;for(const h of Object.keys(i)){const f=i[h],p=this._fieldIds[h],g=r.get(p);if(g==null)continue;let b=g.size;const y=this._avgFieldLength[p];for(const _ of g.keys()){if(!this._documentIds.has(_)){this.removeTerm(p,_,t),b-=1;continue}const E=a?a(this._documentIds.get(_),t,this._storedFields.get(_)):1;if(!E)continue;const I=g.get(_),M=this._fieldLength.get(_)[p],P=gn(I,b,this._documentCount,M,y,c),D=n*s*f*E*P,z=l.get(_);if(z){z.score+=D,wn(z.terms,e);const O=Te(z.match,t);O?O.push(h):z.match[t]=[h]}else l.set(_,{score:D,terms:[e],match:{[t]:[h]}})}}return l}addTerm(e,t,n){const s=this._index.fetch(n,Ye);let r=s.get(e);if(r==null)r=new Map,r.set(t,1),s.set(e,r);else{const i=r.get(t);r.set(t,(i||0)+1)}}removeTerm(e,t,n){if(!this._index.has(n)){this.warnDocumentChanged(t,e,n);return}const s=this._index.fetch(n,Ye),r=s.get(e);r==null||r.get(t)==null?this.warnDocumentChanged(t,e,n):r.get(t)<=1?r.size<=1?s.delete(e):r.delete(t):r.set(t,r.get(t)-1),this._index.get(n).size===0&&this._index.delete(n)}warnDocumentChanged(e,t,n){for(const s of Object.keys(this._fieldIds))if(this._fieldIds[s]===t){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(e)} has changed before removal: term "${n}" was not present in field "${s}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}}addDocumentId(e){const t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t}addFields(e){for(let t=0;t<e.length;t++)this._fieldIds[e[t]]=t}addFieldLength(e,t,n,s){let r=this._fieldLength.get(e);r==null&&this._fieldLength.set(e,r=[]),r[t]=s;const a=(this._avgFieldLength[t]||0)*n+s;this._avgFieldLength[t]=a/(n+1)}removeFieldLength(e,t,n,s){if(n===1){this._avgFieldLength[t]=0;return}const r=this._avgFieldLength[t]*n-s;this._avgFieldLength[t]=r/(n-1)}saveStoredFields(e,t){const{storeFields:n,extractField:s}=this._options;if(n==null||n.length===0)return;let r=this._storedFields.get(e);r==null&&this._storedFields.set(e,r={});for(const i of n){const a=s(t,i);a!==void 0&&(r[i]=a)}}}X.wildcard=Symbol("*");const Te=(o,e)=>Object.prototype.hasOwnProperty.call(o,e)?o[e]:void 0,vn={[De]:(o,e)=>{for(const t of e.keys()){const n=o.get(t);if(n==null)o.set(t,e.get(t));else{const{score:s,terms:r,match:i}=e.get(t);n.score=n.score+s,n.match=Object.assign(n.match,i),He(n.terms,r)}}return o},[lt]:(o,e)=>{const t=new Map;for(const n of e.keys()){const s=o.get(n);if(s==null)continue;const{score:r,terms:i,match:a}=e.get(n);He(s.terms,i),t.set(n,{score:s.score+r,terms:s.terms,match:Object.assign(s.match,a)})}return t},[pn]:(o,e)=>{for(const t of e.keys())o.delete(t);return o}},mn={k:1.2,b:.7,d:.5},gn=(o,e,t,n,s,r)=>{const{k:i,b:a,d:c}=r;return Math.log(1+(t-e+.5)/(e+.5))*(c+o*(i+1)/(o+i*(1-a+a*n/s)))},bn=o=>(e,t,n)=>{const s=typeof o.fuzzy=="function"?o.fuzzy(e,t,n):o.fuzzy||!1,r=typeof o.prefix=="function"?o.prefix(e,t,n):o.prefix===!0,i=typeof o.boostTerm=="function"?o.boostTerm(e,t,n):1;return{term:e,fuzzy:s,prefix:r,termBoost:i}},Ne={idField:"id",extractField:(o,e)=>o[e],tokenize:o=>o.split(xn),processTerm:o=>o.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(o,e)=>{typeof(console==null?void 0:console[o])=="function"&&console[o](e)},autoVacuum:!0},Ge={combineWith:De,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:mn},yn={combineWith:lt,prefix:(o,e,t)=>e===t.length-1},Me={batchSize:1e3,batchWait:10},Ae={minDirtFactor:.1,minDirtCount:20},Fe=Object.assign(Object.assign({},Me),Ae),wn=(o,e)=>{o.includes(e)||o.push(e)},He=(o,e)=>{for(const t of e)o.includes(t)||o.push(t)},Qe=({score:o},{score:e})=>e-o,Ye=()=>new Map,le=o=>{const e=new Map;for(const t of Object.keys(o))e.set(parseInt(t,10),o[t]);return e},ue=o=>he(void 0,void 0,void 0,function*(){const e=new Map;let t=0;for(const n of Object.keys(o))e.set(parseInt(n,10),o[n]),++t%1e3===0&&(yield ut(0));return e}),ut=o=>new Promise(e=>setTimeout(e,o)),xn=/[\n\r\p{Z}\p{P}]+/u;var _n=class{constructor(o=10){we(this,"max");we(this,"cache");this.max=o,this.cache=new Map}get(o){const e=this.cache.get(o);return e!==void 0&&(this.cache.delete(o),this.cache.set(o,e)),e}set(o,e){this.cache.has(o)?this.cache.delete(o):this.cache.size===this.max&&this.cache.delete(this.first()),this.cache.set(o,e)}first(){return this.cache.keys().next().value}clear(){this.cache.clear()}};const Sn={},En={width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true"};function In(o,e){return B(),W("svg",En,e[0]||(e[0]=[x("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 12H5m7 7l-7-7l7-7"},null,-1)]))}const kn=be(Sn,[["render",In],["__file","BackIcon.vue"]]),Tn={},Nn={width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true"};function Fn(o,e){return B(),W("svg",Nn,e[0]||(e[0]=[x("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"},null,-1)]))}const On=be(Tn,[["render",Fn],["__file","ClearIcon.vue"]]),Cn={},Rn={width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true"};function Mn(o,e){return B(),W("svg",Rn,e[0]||(e[0]=[x("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[x("circle",{cx:"11",cy:"11",r:"8"}),x("path",{d:"m21 21l-4.35-4.35"})],-1)]))}const An=be(Cn,[["render",Mn],["__file","SearchIcon.vue"]]),Ln=mt({__name:"SearchBox",props:{locales:{},options:{}},emits:["close"],setup(o,{expose:e,emit:t}){e();const n=o,s=t,r=gt(),i=bt(yt(n.locales)),a=xe(),c=xe(),l=Tt(),{activate:h}=cn(a,{immediate:!0}),f=Pe(async()=>{var v,w,S,T,N;return je(X.loadJSON((S=await((w=(v=l.value)[r.value])==null?void 0:w.call(v)))==null?void 0:S.default,{fields:["title","titles","text"],storeFields:["title","titles"],searchOptions:{fuzzy:.2,prefix:!0,boost:{title:4,text:2,titles:1}},...(T=n.options.miniSearch)==null?void 0:T.searchOptions,...(N=n.options.miniSearch)==null?void 0:N.options}))}),p=de(()=>{var v;return((v=n.options)==null?void 0:v.disableQueryPersistence)===!0}),g=p.value?J(""):wt("vuepress-plume:mini-search-filter",""),b=de(()=>i.value.buttonText||i.value.placeholder||"Search"),y=xe([]),_=J(!1);Oe(g,()=>{_.value=!1});const E=Pe(async()=>{if(c.value)return je(new un(c.value))},null),I=new _n(16);xt(()=>[f.value,g.value],async([v,w],S,T)=>{(S==null?void 0:S[0])!==v&&I.clear();let N=!1;if(T(()=>{N=!0}),!v)return;y.value=v.search(w).slice(0,16).map(C=>{var A;return C.titles=((A=C.titles)==null?void 0:A.filter(Boolean))||[],C}),_.value=!0;const F=new Set;y.value=y.value.map(C=>{const[A,L]=C.id.split("#"),V=I.get(A),oe=(V==null?void 0:V.get(L))??"";for(const ee in C.match)F.add(ee);return{...C,text:oe}}),await te(),!N&&await new Promise(C=>{var A;(A=E.value)==null||A.unmark({done:()=>{var L;(L=E.value)==null||L.markRegExp(d(F),{done:C})}})})},{debounce:200,immediate:!0});const M=J(),P=de(()=>{var v;return((v=g.value)==null?void 0:v.length)<=0});function D(v=!0){var w,S;(w=M.value)==null||w.focus(),v&&((S=M.value)==null||S.select())}_e(()=>{D()});function z(v){v.pointerType==="mouse"&&D()}const O=J(-1),q=J(!1);Oe(y,v=>{O.value=v.length?0:-1,G()});function G(){te(()=>{const v=document.querySelector(".result.selected");v&&v.scrollIntoView({block:"nearest"})})}ae("ArrowUp",v=>{v.preventDefault(),O.value--,O.value<0&&(O.value=y.value.length-1),q.value=!0,G()}),ae("ArrowDown",v=>{v.preventDefault(),O.value++,O.value>=y.value.length&&(O.value=0),q.value=!0,G()});const H=_t();ae("Enter",v=>{if(v.isComposing||v.target instanceof HTMLButtonElement&&v.target.type!=="submit")return;const w=y.value[O.value];if(v.target instanceof HTMLInputElement&&!w){v.preventDefault();return}w&&(H.go(w.id),s("close"))}),ae("Escape",()=>{s("close")}),_e(()=>{window.history.pushState(null,"",null)}),St("popstate",v=>{v.preventDefault(),s("close")});const j=Et(typeof document<"u"?document.body:null);_e(()=>{te(()=>{j.value=!0,te().then(()=>h())})}),It(()=>{j.value=!1});function k(){g.value="",te().then(()=>D(!1))}function u(v){return v.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function d(v){return new RegExp([...v].sort((w,S)=>S.length-w.length).map(w=>`(${u(w)})`).join("|"),"gi")}const m={props:n,emit:s,routeLocale:r,locale:i,el:a,resultsEl:c,searchIndexData:l,activate:h,searchIndex:f,disableQueryPersistence:p,filterText:g,buttonText:b,results:y,enableNoResults:_,mark:E,cache:I,searchInput:M,disableReset:P,focusSearchInput:D,onSearchBarClick:z,selectedIndex:O,disableMouseOver:q,scrollToSelectedResult:G,router:H,isLocked:j,resetSearch:k,escapeRegExp:u,formMarkRegex:d,get withBase(){return kt},BackIcon:kn,ClearIcon:On,SearchIcon:An};return Object.defineProperty(m,"__isScriptSetup",{enumerable:!1,value:!0}),m}}),Dn=["aria-owns"],zn={class:"shell"},Pn=["title"],jn={class:"search-actions before"},Vn=["title"],Bn=["placeholder"],Wn={class:"search-actions"},$n=["disabled","title"],Jn=["id","role","aria-labelledby"],Kn=["aria-selected"],Un=["href","aria-label","onMouseenter","onFocusin"],qn={class:"titles"},Gn=["innerHTML"],Hn={class:"title main"},Qn=["innerHTML"],Yn={key:0,class:"no-results"},Zn={class:"search-keyboard-shortcuts"},Xn=["aria-label"],es=["aria-label"],ts=["aria-label"],ns=["aria-label"];function ss(o,e,t,n,s,r){var i,a,c,l,h,f,p,g,b,y,_;return B(),Nt(At,{to:"body"},[x("div",{ref:"el",role:"button","aria-owns":(i=n.results)!=null&&i.length?"localsearch-list":void 0,"aria-expanded":"true","aria-haspopup":"listbox","aria-labelledby":"mini-search-label",class:"VPLocalSearchBox"},[x("div",{class:"backdrop",onClick:e[0]||(e[0]=E=>o.$emit("close"))}),x("div",zn,[x("form",{class:"search-bar",onPointerup:e[3]||(e[3]=E=>n.onSearchBarClick(E)),onSubmit:e[4]||(e[4]=Ft(()=>{},["prevent"]))},[x("label",{id:"localsearch-label",title:n.buttonText,for:"localsearch-input"},[Se(n.SearchIcon,{class:"search-icon"})],8,Pn),x("div",jn,[x("button",{class:"back-button",title:n.locale.backButtonTitle,onClick:e[1]||(e[1]=E=>o.$emit("close"))},[Se(n.BackIcon)],8,Vn)]),Ot(x("input",{id:"localsearch-input",ref:"searchInput","onUpdate:modelValue":e[2]||(e[2]=E=>n.filterText=E),placeholder:n.buttonText,"aria-labelledby":"localsearch-label",class:"search-input"},null,8,Bn),[[Ct,n.filterText]]),x("div",Wn,[x("button",{class:"clear-button",type:"reset",disabled:n.disableReset,title:n.locale.resetButtonTitle,onClick:n.resetSearch},[Se(n.ClearIcon)],8,$n)])],32),x("ul",{id:(a=n.results)!=null&&a.length?"localsearch-list":void 0,ref:"resultsEl",role:(c=n.results)!=null&&c.length?"listbox":void 0,"aria-labelledby":(l=n.results)!=null&&l.length?"localsearch-label":void 0,class:"results",onMousemove:e[6]||(e[6]=E=>n.disableMouseOver=!1)},[(B(!0),W(Be,null,Ve(n.results,(E,I)=>(B(),W("li",{key:E.id,role:"option","aria-selected":n.selectedIndex===I?"true":"false"},[x("a",{href:n.withBase(E.id),class:Rt(["result",{selected:n.selectedIndex===I}]),"aria-label":[...E.titles,E.title].join(" > "),onMouseenter:M=>!n.disableMouseOver&&(n.selectedIndex=I),onFocusin:M=>n.selectedIndex=I,onClick:e[5]||(e[5]=M=>o.$emit("close"))},[x("div",null,[x("div",qn,[e[8]||(e[8]=x("span",{class:"title-icon"},"#",-1)),(B(!0),W(Be,null,Ve(E.titles,(M,P)=>(B(),W("span",{key:P,class:"title"},[x("span",{class:"text",innerHTML:M},null,8,Gn),e[7]||(e[7]=x("svg",{width:"18",height:"18",viewBox:"0 0 24 24"},[x("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"})],-1))]))),128)),x("span",Hn,[x("span",{class:"text",innerHTML:E.title},null,8,Qn)])])])],42,Un)],8,Kn))),128)),n.filterText&&!n.results.length&&n.enableNoResults?(B(),W("li",Yn,[ne(se(n.locale.noResultsText)+' "',1),x("strong",null,se(n.filterText),1),e[9]||(e[9]=ne('" '))])):Mt("",!0)],40,Jn),x("div",Zn,[x("span",null,[x("kbd",{"aria-label":((h=n.locale.footer)==null?void 0:h.navigateUpKeyAriaLabel)??""},e[10]||(e[10]=[x("svg",{width:"14",height:"14",viewBox:"0 0 24 24"},[x("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 19V5m-7 7l7-7l7 7"})],-1)]),8,Xn),x("kbd",{"aria-label":((f=n.locale.footer)==null?void 0:f.navigateDownKeyAriaLabel)??""},e[11]||(e[11]=[x("svg",{width:"14",height:"14",viewBox:"0 0 24 24"},[x("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 5v14m7-7l-7 7l-7-7"})],-1)]),8,es),ne(" "+se(((p=n.locale.footer)==null?void 0:p.navigateText)??""),1)]),x("span",null,[x("kbd",{"aria-label":((g=n.locale.footer)==null?void 0:g.selectKeyAriaLabel)??""},e[12]||(e[12]=[x("svg",{width:"14",height:"14",viewBox:"0 0 24 24"},[x("g",{fill:"none",stroke:"currentcolor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[x("path",{d:"m9 10l-5 5l5 5"}),x("path",{d:"M20 4v7a4 4 0 0 1-4 4H4"})])],-1)]),8,ts),ne(" "+se(((b=n.locale.footer)==null?void 0:b.selectText)??""),1)]),x("span",null,[x("kbd",{"aria-label":((y=n.locale.footer)==null?void 0:y.closeKeyAriaLabel)??""},"esc",8,ns),ne(" "+se(((_=n.locale.footer)==null?void 0:_.closeText)??""),1)])])])],8,Dn)])}const as=be(Ln,[["render",ss],["__scopeId","data-v-fad99b4e"],["__file","SearchBox.vue"]]);export{as as default};
|