PageSourceSearch

https://vitejs.cn/assets/chunks/VPLocalSearchBox.CVFRdmNa.js

js vitejs.cn collected 2026-09-25 21:08:01 UTC 67,079 bytes, 4 lines download raw bytes

vendor: 4,286 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunks/@localSearchIndex.C3x8xEpd.js","assets/chunks/framework.w5hPoAOn.js"])))=>i.map(i=>d[i]);
2import{J as ke,A as Ne,b6 as Rt,a3 as Xe,b7 as Ct,b8 as Mt,b9 as Lt,O as oe,d as Dt,D as Se,a2 as Pt,v as ie,a8 as et,ba as tt,r as X,bb as zt,bc as Vt,I as jt,bd as $t,Z as _e,aj as Bt,be as Wt,a9 as Kt,L as Jt,o as J,e as Gt,j as T,i as q,aa as Ut,B as P,a5 as qt,ai as Ht,bf as Qt,q as nt,k as xe,F as Le,Q as rt,S as pe,t as ve,bg as Yt,bh as it,c as Zt,an as Xt,_ as en}from"./framework.w5hPoAOn.js";import{i as tn,s as st,u as gt,e as nn}from"./theme.CFMrEqk-.js";var bt=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Fe=bt.join(","),yt=typeof Element>"u",te=yt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Oe=!yt&&Element.prototype.getRootNode?function(a){var e;return a==null||(e=a.getRootNode)===null||e===void 0?void 0:e.call(a)}:function(a){return a?.ownerDocument},Ae=function(e,t){var n;t===void 0&&(t=!0);var i=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),s=i===""||i==="true",r=s||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):Ae(e.parentNode));return r},rn=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},wt=function(e,t,n){if(Ae(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(Fe));return t&&te.call(e,Fe)&&i.unshift(e),i=i.filter(n),i},Re=function(e,t,n){for(var i=[],s=Array.from(e);s.length;){var r=s.shift();if(!Ae(r,!1))if(r.tagName==="SLOT"){var o=r.assignedElements(),l=o.length?o:r.children,c=Re(l,!0,n);n.flatten?i.push.apply(i,c):i.push({scopeParent:r,candidates:c})}else{var f=te.call(r,Fe);f&&n.filter(r)&&(t||!e.includes(r))&&i.push(r);var p=r.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(r),v=!Ae(p,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(r));if(p&&v){var b=Re(p===!0?r.children:p.children,!0,n);n.flatten?i.push.apply(i,b):i.push({scopeParent:r,candidates:b})}else s.unshift.apply(s,r.children)}}return i},St=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ee=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||rn(e))&&!St(e)?0:e.tabIndex},sn=function(e,t){var n=ee(e);return n<0&&t&&!St(e)?0:n},an=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},_t=function(e){return e.tagName==="INPUT"},on=function(e){return _t(e)&&e.type==="hidden"},ln=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},cn=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},un=function(e){if(!e.name)return!0;var t=e.form||Oe(e),n=function(o){return t.querySelectorAll('input[type="radio"][name="'+o+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(e.name));else try{i=n(e.name)}catch(r){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",r.message),!1}var s=cn(i,e.form);return!s||s===e},dn=function(e){return _t(e)&&e.type==="radio"},fn=function(e){return dn(e)&&!un(e)},hn=function(e){var t,n=e&&Oe(e),i=(t=n)===null||t===void 0?void 0:t.host,s=!1;if(n&&n!==e){var r,o,l;for(s=!!((r=i)!==null&&r!==void 0&&(o=r.ownerDocument)!==null&&o!==void 0&&o.contains(i)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!s&&i;){var c,f,p;n=Oe(i),i=(c=n)===null||c===void 0?void 0:c.host,s=!!((f=i)!==null&&f!==void 0&&(p=f.ownerDocument)!==null&&p!==void 0&&p.contains(i))}}return s}
vendor: 9,453 bytes, lines 2-4
2,at=function(e){var t=e.getBoundingClientRect(),n=t.width,i=t.height;return n===0&&i===0},pn=function(e,t){var n=t.displayCheck,i=t.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e){var s=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(e).visibility==="hidden")return!0;var r=te.call(e,"details>summary:first-of-type"),o=r?e.parentElement:e;if(te.call(o,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var l=e;e;){var c=e.parentElement,f=Oe(e);if(c&&!c.shadowRoot&&i(c)===!0)return at(e);e.assignedSlot?e=e.assignedSlot:!c&&f!==e.ownerDocument?e=f.host:e=c}e=l}if(hn(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return at(e);return!1},vn=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 i=t.children.item(n);if(i.tagName==="LEGEND")return te.call(t,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}t=t.parentElement}return!1},Ce=function(e,t){return!(t.disabled||on(t)||pn(t,e)||ln(t)||vn(t))},Be=function(e,t){return!(fn(t)||ee(t)<0||!Ce(e,t))},mn=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},xt=function(e){var t=[],n=[];return e.forEach(function(i,s){var r=!!i.scopeParent,o=r?i.scopeParent:i,l=sn(o,r),c=r?xt(i.candidates):o;l===0?r?t.push.apply(t,c):t.push(o):n.push({documentOrder:s,tabIndex:l,item:i,isScope:r,content:c})}),n.sort(an).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(t)},gn=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Re([e],t.includeContainer,{filter:Be.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:mn}):n=wt(e,t.includeContainer,Be.bind(null,t)),xt(n)},bn=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Re([e],t.includeContainer,{filter:Ce.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=wt(e,t.includeContainer,Ce.bind(null,t)),n},se=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return te.call(e,Fe)===!1?!1:Be(t,e)},yn=bt.concat("iframe:not([inert]):not([inert] *)").join(","),De=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return te.call(e,yn)===!1?!1:Ce(t,e)};function We(a,e){(e==null||e>a.length)&&(e=a.length);for(var t=0,n=Array(e);t<e;t++)n[t]=a[t];return n}function wn(a){if(Array.isArray(a))return We(a)}function ot(a,e,t,n,i,s,r){try{var o=a[s](r),l=o.value}catch(c){return void t(c)}o.done?e(l):Promise.resolve(l).then(n,i)}function lt(a){return function(){var e=this,t=arguments;return new Promise(function(n,i){var s=a.apply(e,t);function r(l){ot(s,n,i,r,o,"next",l)}function o(l){ot(s,n,i,r,o,"throw",l)}r(void 0)})}}function ct(a,e){var t=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(!t){if(Array.isArray(a)||(t=Tt(a))||e){t&&(a=t);var n=0,i=function(){};return{s:i,n:function(){return n>=a.length?{done:!0}:{done:!1,value:a[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,r=!0,o=!1;return{s:function(){t=t.call(a)},n:function(){var l=t.next();return r=l.done,l},e:function(l){o=!0,s=l},f:function(){try{r||t.return==null||t.return()}finally{if(o)throw s}}}}function Sn(a,e,t){return(e=In(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function _n(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function xn(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ut(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(a,i).enumerable})),t.push.apply(t,n)}return t}function dt(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ut(Object(t),!0).forEach(function(n){Sn(a,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):ut(Object(t)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(t,n))})}return a}function ge(){var a,e,t=typeof Symbol=="function"?Symbol:{},n=t.iterator||"@@iterator",i=t.toStringTag||"@@toStringTag";function s(b,S,w,x){var A=S&&S.prototype instanceof o?S:o,k=Object.create(A.prototype);return B(k,"_invoke",(function(G,U,j){var C,O,z,W=0,ne=j||[],R=!1,M={p:0,n:0,v:a,a:F,f:F.bind(a,4),d:function(u,d){return C=u,O=0,z=a,M.n=d,r}};function F(u,d){for(O=u,z=d,e=0;!R&&W&&!g&&e<ne.length;e++){var g,y=ne[e],I=M.p,N=y[2];u>3?(g=N===d)&&(z=y[(O=y[4])?5:(O=3,3)],y[4]=y[5]=a):y[0]<=I&&((g=u<2&&I<y[1])?(O=0,M.v=d,M.n=y[1]):I<N&&(g=u<3||y[0]>d||d>N)&&(y[4]=u,y[5]=d,M.n=N,O=0))}if(g||u>1)return r;throw R=!0,d}return function(u,d,g){if(W>1)throw TypeError("Generator is already running");for(R&&d===1&&F(d,g),O=d,z=g;(e=O<2?a:z)||!R;){C||(O?O<3?(O>1&&(M.n=-1),F(O,z)):M.n=z:M.v=z);try{if(W=2,C){if(O||(u="next"),e=C[u]){if(!(e=e.call(C,z)))throw TypeError("iterator result is not an object");if(!e.done)return e;z=e.value,O<2&&(O=0)}else O===1&&(e=C.return)&&e.call(C),O<2&&(z=TypeError("The iterator does not provide a '"+u+"' method"),O=1);C=a}else if((e=(R=M.n<0)?z:G.call(U,M))!==r)break}catch(y){C=a,O=1,z=y}finally{W=1}}return{value:e,done:R}}})(b,w,x),!0),k}var r={};function o(){}function l(){}function c(){}e=Object.getPrototypeOf;var f=[][n]?e(e([][n]())):(B(e={},n,function(){return this}),e),p=c.prototype=o.prototype=Object.create(f);function v(b){return Object.setPrototypeOf?Object.setPrototypeOf(b,c):(b.__proto__=c,B(b,i,"GeneratorFunction")),b.prototype=Object.create(p),b}return l.prototype=c,B(p,"constructor",c),B(c,"constructor",l),l.displayName="GeneratorFunction",B(c,i,"GeneratorFunction"),B(p),B(p,i,"Generator"),B(p,n,function(){return this}),B(p,"toString",function(){return"[object Generator]"}),(ge=function(){return{w:s,m:v}})()}function B(a,e,t,n){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}B=function(s,r,o,l){function c(f,p){B(s,f,function(v){return this._invoke(f,p,v)})}r?i?i(s,r,{value:o,enumerable:!l,configurable:!l,writable:!l}):s[r]=o:(c("next",0),c("throw",1),c("return",2))},B(a,e,t,n)}function Tn(a){return wn(a)||_n(a)||Tt(a)||xn()}function En(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var n=t.call(a,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function In(a){var e=En(a,"string");return typeof e=="symbol"?e:e+""}function Tt(a,e){if(a){if(typeof a=="string")return We(a,e);var t={}.toString.call(a).slice(8,-1);return t==="Object"&&a.constructor&&(t=a.constructor.name),t==="Map"||t==="Set"?Array.from(a):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?We(a,e):void 0}}var Q={getActiveTrap:function(e){return e?.length>0?e[e.length-1]:null},activateTrap:function(e,t){var n=Q.getActiveTrap(e);t!==n&&Q.pauseTrap(e);var i=e.indexOf(t);i===-1||e.splice(i,1),e.push(t)},deactivateTrap:function(e,t){var n=e.indexOf(t);n!==-1&&e.splice(n,1),Q.unpauseTrap(e)},pauseTrap:function(e){var t=Q.getActiveTrap(e);t?._setPausedState(!0)},unpauseTrap:function(e){var t=Q.getActiveTrap(e);t&&!t._isManuallyPaused()&&t._setPausedState(!1)}},kn=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Nn=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},be=function(e){return e?.key==="Tab"||e?.keyCode===9},Fn=function(e){return be(e)&&!e.shiftKey},On=function(e){return be(e)&&e.shiftKey},ft=function(e){return setTimeout(e,0)},me=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,n):e},Te=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},An=[],Rn=function(e,t){var n=t?.document||document,i=t?.trapStack||An,s=dt({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:Fn,isKeyBackward:On},t),r={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},o,l=function(u,d,g){return u&&u[d]!==void 0?u[d]:s[g||d]},c=function(u,d){var g=typeof d?.composedPath=="function"?d.composedPath():void 0;return r.containerGroups.findIndex(function(y){var I=y.container,N=y.tabbableNodes;return I.contains(u)||g?.includes(I)||N.find(function(E){return E===u})})},f=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=d.hasFallback,y=g===void 0?!1:g,I=d.params,N=I===void 0?[]:I,E=s[u];if(typeof E=="function"&&(E=E.apply(void 0,Tn(N))),E===!0&&(E=void 0),!E){if(E===void 0||E===!1)return E;throw new Error("`".concat(u,"` was specified but was not a node, or did not return a node"))}var m=E;if(typeof E=="string"){try{m=n.querySelector(E)}catch(h){throw new Error("`".concat(u,'` appears to be an invali
4d selector; error="').concat(h.message,'"'))}if(!m&&!y)throw new Error("`".concat(u,"` as selector refers to no known node"))}return m},p=function(){var u=f("initialFocus",{hasFallback:!0});if(u===!1)return!1;if(u===void 0||u&&!De(u,s.tabbableOptions))if(c(n.activeElement)>=0)u=n.activeElement;else{var d=r.tabbableGroups[0],g=d&&d.firstTabbableNode;u=g||f("fallbackFocus")}else u===null&&(u=f("fallbackFocus"));if(!u)throw new Error("Your focus-trap needs to have at least one focusable element");return u},v=function(){if(r.containerGroups=r.containers.map(function(u){var d=gn(u,s.tabbableOptions),g=bn(u,s.tabbableOptions),y=d.length>0?d[0]:void 0,I=d.length>0?d[d.length-1]:void 0,N=g.find(function(h){return se(h)}),E=g.slice().reverse().find(function(h){return se(h)}),m=!!d.find(function(h){return ee(h)>0});return{container:u,tabbableNodes:d,focusableNodes:g,posTabIndexesFound:m,firstTabbableNode:y,lastTabbableNode:I,firstDomTabbableNode:N,lastDomTabbableNode:E,nextTabbableNode:function(_){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,D=d.indexOf(_);return D<0?L?g.slice(g.indexOf(_)+1).find(function($){return se($)}):g.slice(0,g.indexOf(_)).reverse().find(function($){return se($)}):d[D+(L?1:-1)]}}}),r.tabbableGroups=r.containerGroups.filter(function(u){return u.tabbableNodes.length>0}),r.tabbableGroups.length<=0&&!f("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(r.containerGroups.find(function(u){return u.posTabIndexesFound})&&r.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.")},b=function(u){var d=u.activeElement;if(d)return d.shadowRoot&&d.shadowRoot.activeElement!==null?b(d.shadowRoot):d},S=function(u){if(u!==!1&&u!==b(document)){if(!u||!u.focus){S(p());return}u.focus({preventScroll:!!s.preventScroll}),r.mostRecentlyFocusedNode=u,kn(u)&&u.select()}},w=function(u){var d=f("setReturnFocus",{params:[u]});return d||(d===!1?!1:u)},x=function(u){var d=u.target,g=u.event,y=u.isBackward,I=y===void 0?!1:y;d=d||Te(g),v();var N=null;if(r.tabbableGroups.length>0){var E=c(d,g),m=E>=0?r.containerGroups[E]:void 0;if(E<0)I?N=r.tabbableGroups[r.tabbableGroups.length-1].lastTabbableNode:N=r.tabbableGroups[0].firstTabbableNode;else if(I){var h=r.tabbableGroups.findIndex(function(re){var ue=re.firstTabbableNode;return d===ue});if(h<0&&(m.container===d||De(d,s.tabbableOptions)&&!se(d,s.tabbableOptions)&&!m.nextTabbableNode(d,!1))&&(h=E),h>=0){var _=h===0?r.tabbableGroups.length-1:h-1,L=r.tabbableGroups[_];N=ee(d)>=0?L.lastTabbableNode:L.lastDomTabbableNode}else be(g)||(N=m.nextTabbableNode(d,!1))}else{var D=r.tabbableGroups.findIndex(function(re){var ue=re.lastTabbableNode;return d===ue});if(D<0&&(m.container===d||De(d,s.tabbableOptions)&&!se(d,s.tabbableOptions)&&!m.nextTabbableNode(d))&&(D=E),D>=0){var $=D===r.tabbableGroups.length-1?0:D+1,H=r.tabbableGroups[$];N=ee(d)>=0?H.firstTabbableNode:H.firstDomTabbableNode}else be(g)||(N=m.nextTabbableNode(d))}}else N=f("fallbackFocus");return N},A=function(u){var d=Te(u);if(!(c(d,u)>=0)){if(me(s.clickOutsideDeactivates,u)){o.deactivate({returnFocus:s.returnFocusOnDeactivate});return}me(s.allowOutsideClick,u)||u.preventDefault()}},k=function(u){var d=Te(u),g=c(d,u)>=0;if(g||d instanceof Document)g&&(r.mostRecentlyFocusedNode=d);else{u.stopImmediatePropagation();var y,I=!0;if(r.mostRecentlyFocusedNode)if(ee(r.mostRecentlyFocusedNode)>0){var N=c(r.mostRecentlyFocusedNode),E=r.containerGroups[N].tabbableNodes;if(E.length>0){var m=E.findIndex(function(h){return h===r.mostRecentlyFocusedNode});m>=0&&(s.isKeyForward(r.recentNavEvent)?m+1<E.length&&(y=E[m+1],I=!1):m-1>=0&&(y=E[m-1],I=!1))}}else r.containerGroups.some(function(h){return h.tabbableNodes.some(function(_){return ee(_)>0})})||(I=!1);else I=!1;I&&(y=x({target:r.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(r.recentNavEvent)})),S(y||r.mostRecentlyFocusedNode||p())}r.recentNavEvent=void 0},G=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;r.recentNavEvent=u;var g=x({event:u,isBackward:d});g&&(be(u)&&u.preventDefault(),S(g))},U=function(u){(s.isKeyForward(u)||s.isKeyBackward(u))&&G(u,s.isKeyBackward(u))},j=function(u){Nn(u)&&me(s.escapeDeactivates,u)!==!1&&(u.preventDefault(),o.deactivate())},C=function(u){var d=Te(u);c(d,u)>=0||me(s.clickOutsideDeactivates,u)||me(s.allowOutsideClick,u)||(u.preventDefault(),u.stopImmediatePropagation())},O=function(){if(!r.active)return Promise.resolve();Q.activateTrap(i,o);var u;
vendor: 4,284 bytes, line 4
4return s.delayInitialFocus?u=new Promise(function(d){r.delayInitialFocusTimer=ft(function(){S(p()),d()})}):(u=Promise.resolve(),S(p())),n.addEventListener("focusin",k,!0),n.addEventListener("mousedown",A,{capture:!0,passive:!1}),n.addEventListener("touchstart",A,{capture:!0,passive:!1}),n.addEventListener("click",C,{capture:!0,passive:!1}),n.addEventListener("keydown",U,{capture:!0,passive:!1}),n.addEventListener("keydown",j),u},z=function(u){r.active&&!r.paused&&o._setSubtreeIsolation(!1),r.adjacentElements.clear(),r.alreadySilent.clear();var d=new Set,g=new Set,y=ct(u),I;try{for(y.s();!(I=y.n()).done;){var N=I.value;d.add(N);for(var E=typeof ShadowRoot<"u"&&N.getRootNode()instanceof ShadowRoot,m=N;m;){d.add(m);var h=m.parentElement,_=[];h?_=h.children:!h&&E&&(_=m.getRootNode().children,h=m.getRootNode().host,E=typeof ShadowRoot<"u"&&h.getRootNode()instanceof ShadowRoot);var L=ct(_),D;try{for(L.s();!(D=L.n()).done;){var $=D.value;g.add($)}}catch(H){L.e(H)}finally{L.f()}m=h}}}catch(H){y.e(H)}finally{y.f()}d.forEach(function(H){g.delete(H)}),r.adjacentElements=g},W=function(){if(r.active)return n.removeEventListener("focusin",k,!0),n.removeEventListener("mousedown",A,!0),n.removeEventListener("touchstart",A,!0),n.removeEventListener("click",C,!0),n.removeEventListener("keydown",U,!0),n.removeEventListener("keydown",j),o},ne=function(u){var d=u.some(function(g){var y=Array.from(g.removedNodes);return y.some(function(I){return I===r.mostRecentlyFocusedNode})});d&&S(p())},R=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(ne):void 0,M=function(){R&&(R.disconnect(),r.active&&!r.paused&&r.containers.map(function(u){R.observe(u,{subtree:!0,childList:!0})}))};return o={get active(){return r.active},get paused(){return r.paused},activate:function(u){if(r.active)return this;var d=l(u,"onActivate"),g=l(u,"onPostActivate"),y=l(u,"checkCanFocusTrap"),I=Q.getActiveTrap(i),N=!1;if(I&&!I.paused){var E;(E=I._setSubtreeIsolation)===null||E===void 0||E.call(I,!1),N=!0}try{y||v(),r.active=!0,r.paused=!1,r.nodeFocusedBeforeActivation=b(n),d?.();var m=(function(){var _=lt(ge().m(function L(){return ge().w(function(D){for(;;)switch(D.n){case 0:return y&&v(),D.n=1,O();case 1:o._setSubtreeIsolation(!0),M(),g?.();case 2:return D.a(2)}},L)}));return function(){return _.apply(this,arguments)}})();if(y)return y(r.containers.concat()).then(m,m),this;m()}catch(_){if(I===Q.getActiveTrap(i)&&N){var h;(h=I._setSubtreeIsolation)===null||h===void 0||h.call(I,!0)}throw _}return this},deactivate:function(u){if(!r.active)return this;var d=dt({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},u);clearTimeout(r.delayInitialFocusTimer),r.delayInitialFocusTimer=void 0,r.paused||o._setSubtreeIsolation(!1),r.alreadySilent.clear(),W(),r.active=!1,r.paused=!1,M(),Q.deactivateTrap(i,o);var g=l(d,"onDeactivate"),y=l(d,"onPostDeactivate"),I=l(d,"checkCanReturnFocus"),N=l(d,"returnFocus","returnFocusOnDeactivate");g?.();var E=function(){ft(function(){N&&S(w(r.nodeFocusedBeforeActivation)),y?.()})};return N&&I?(I(w(r.nodeFocusedBeforeActivation)).then(E,E),this):(E(),this)},pause:function(u){return r.active?(r.manuallyPaused=!0,this._setPausedState(!0,u)):this},unpause:function(u){return r.active?(r.manuallyPaused=!1,i[i.length-1]!==this?this:this._setPausedState(!1,u)):this},updateContainerElements:function(u){var d=[].concat(u).filter(Boolean);return r.containers=d.map(function(g){return typeof g=="string"?n.querySelector(g):g}),s.isolateSubtrees&&z(r.containers),r.active&&(v(),r.paused||o._setSubtreeIsolation(!0)),M(),this}},Object.defineProperties(o,{_isManuallyPaused:{value:function(){return r.manuallyPaused}},_setPausedState:{value:function(u,d){if(r.paused===u)return this;if(r.paused=u,u){var g=l(d,"onPause"),y=l(d,"onPostPause");g?.(),W(),o._setSubtreeIsolation(!1),M(),y?.()}else{var I=l(d,"onUnpause"),N=l(d,"onPostUnpause");I?.();var E=(function(){var m=lt(ge().m(function h(){return ge().w(function(_){for(;;)switch(_.n){case 0:return v(),_.n=1,O();case 1:o._setSubtreeIsolation(!0),M(),N?.();case 2:return _.a(2)}},h)}));return function(){return m.apply(this,arguments)}})();E()}return this}},_setSubtreeIsolation:{value:function(u){s.isolateSubtrees&&r.adjacentElements.forEac
4h(function(d){var g;u?s.isolateSubtrees==="aria-hidden"?((d.ariaHidden==="true"||((g=d.getAttribute("aria-hidden"))===null||g===void 0?void 0:g.toLowerCase())==="true")&&r.alreadySilent.add(d),d.setAttribute("aria-hidden","true")):((d.inert||d.hasAttribute("inert"))&&r.alreadySilent.add(d),d.setAttribute("inert",!0)):r.alreadySilent.has(d)||(s.isolateSubtrees==="aria-hidden"?d.removeAttribute("aria-hidden"):d.removeAttribute("inert"))})}}}),o.updateContainerElements(e),o};function Cn(a,e={}){let t;const{immediate:n,...i}=e,s=oe(!1),r=oe(!1),o=p=>t&&t.activate(p),l=p=>t&&t.deactivate(p),c=()=>{t&&(t.pause(),r.value=!0)},f=()=>{t&&(t.unpause(),r.value=!1)};return ke(Ne(()=>Rt(Xe(a)).map(p=>{const v=Xe(p);return typeof v=="string"?v:Ct(v)}).filter(Mt)),p=>{if(p.length)if(!t)t=Rn(p,{...i,onActivate(){s.value=!0,e.onActivate&&e.onActivate()},onDeactivate(){s.value=!1,e.onDeactivate&&e.onDeactivate()}}),n&&o();else{const v=t?.active;t?.updateContainerElements(p),!v&&n&&o()}},{flush:"post"}),Lt(()=>l()),{hasFocus:s,isPaused:r,activate:o,deactivate:l,pause:c,unpause:f}}class le{constructor(e,t=!0,n=[],i=5e3){this.ctx=e,this.iframes=t,this.exclude=n,this.iframesTimeout=i}static matches(e,t){const n=typeof t=="string"?[t]:t,i=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(i){let s=!1;return n.every(r=>i.call(e,r)?(s=!0,!1):!0),s}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 i=t.filter(s=>s.contains(n)).length>0;t.indexOf(n)===-1&&!i&&t.push(n)}),t}getIframeContents(e,t,n=()=>{}){let i;try{const s=e.contentWindow;if(i=s.document,!s||!i)throw new Error("iframe inaccessible")}catch{n()}i&&t(i)}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 i=!1,s=null;const r=()=>{if(!i){i=!0,clearTimeout(s);try{this.isIframeBlank(e)||(e.removeEventListener("load",r),this.getIframeContents(e,t,n))}catch{n()}}};e.addEventListener("load",r),s=setTimeout(r,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,i=>{n++,this.waitForIframes(i.querySelector("html"),()=>{--n||t()})},i=>{i||t()})}forEachIframe(e,t,n,i=()=>{}){let s=e.querySelectorAll("iframe"),r=s.length,o=0;s=Array.prototype.slice.call(s);const l=()=>{--r<=0&&i(o)};r||l(),s.forEach(c=>{le.matches(c,this.exclude)?l():this.onIframeReady(c,f=>{t(c)&&(o++,n(f)),l()},l)})}createIterator(e,t,n){return document.createNodeIterator(e,t,n,!1)}createInstanceOnIframe(e){return new le(e.querySelector("html"),this.iframes)}compareNodeIframe(e,t,n){const i=e.compareDocumentPosition(n),s=Node.DOCUMENT_POSITION_PRECEDING;if(i&s)if(t!==null){const r=t.compareDocumentPosition(n),o=Node.DOCUMENT_POSITION_FOLLOWING;if(r&o)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,i){let s=!1,r=!1;return i.forEach((o,l)=>{o.val===n&&(s=l,r=o.handled)}),this.compareNodeIframe(e,t,n)?(s===!1&&!r?i.push({val:n,handled:!0}):s!==!1&&!r&&(i[s].handled=!0),!0):(s===!1&&i.push({val:n,handled:!1}),!1)}handleOpenIframes(e,t,n,i){e.forEach(s=>{s.handled||this.getIframeContents(s.val,r=>{this.createInstanceOnIframe(r).forEachNode(t,n,i)})})}iterateThroughNodes(e,t,n,i,s){const r=this.createIterator(t,e,i);let o=[],l=[],c,f,p=()=>({prevNode:f,node:c}=this.getIteratorNode(r),c);for(;p();)this.iframes&&this.forEachIframe(t,v=>this.checkIframeFilter(c,f,v,o),v=>{this.createInstanceOnIframe(v).forEachNode(e,b=>l.push(b),i)}),l.push(c);l.forEach(v=>{n(v)}),this.iframes&&this.handleOpenIframes(o,e,n,i),s()}forEachNode(e,t,n,i=()=>{}){const s=this.getContexts();let r=s.length;
vendor: 9,011 bytes, line 4
4r||i(),s.forEach(o=>{const l=()=>{this.iterateThroughNodes(e,o,t,n,()=>{--r<=0&&i()})};this.iframes?this.waitForIframes(o,l):l()})}}let Mn=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 le(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",i=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let s in t)if(t.hasOwnProperty(s)){const r=t[s],o=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(s):this.escapeStr(s),l=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(r):this.escapeStr(r);o!==""&&l!==""&&(e=e.replace(new RegExp(`(${this.escapeStr(o)}|${this.escapeStr(l)})`,`gm${n}`),i+`(${this.processSynomyms(o)}|${this.processSynomyms(l)})`+i))}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,i)=>{let s=i.charAt(n+1);return/[(|)\\]/.test(s)||s===""?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 i=[];return e.split("").forEach(s=>{n.every(r=>{if(r.indexOf(s)!==-1){if(i.indexOf(r)>-1)return!1;e=e.replace(new RegExp(`[${r}]`,`gm${t}`),`[${r}]`),i.push(r)}return!0})}),e}createMergedBlanksRegExp(e){return e.replace(/[\s]+/gmi,"[\\s]+")}createAccuracyRegExp(e){const t="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let n=this.opt.accuracy,i=typeof n=="string"?n:n.value,s=typeof n=="string"?[]:n.limiters,r="";switch(s.forEach(o=>{r+=`|${this.escapeStr(o)}`}),i){case"partially":default:return`()(${e})`;case"complementary":return r="\\s"+(r||this.escapeStr(t)),`()([^${r}]*${e}[^${r}]*)`;case"exactly":return`(^|\\s${r})(${e})(?=$|\\s${r})`}}getSeparatedKeywords(e){let t=[];return e.forEach(n=>{this.opt.separateWordSearch?n.split(" ").forEach(i=>{i.trim()&&t.indexOf(i)===-1&&t.push(i)}):n.trim()&&t.indexOf(n)===-1&&t.push(n)}),{keywords:t.sort((n,i)=>i.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((i,s)=>i.start-s.start).forEach(i=>{let{start:s,end:r,valid:o}=this.callNoMatchOnInvalidRanges(i,n);o&&(i.start=s,i.length=r-s,t.push(i),n=r)}),t}callNoMatchOnInvalidRanges(e,t){let n,i,s=!1;return e&&typeof e.start<"u"?(n=parseInt(e.start,10),i=n+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&i-t>0&&i-n>0?s=!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:i,valid:s}}checkWhitespaceRanges(e,t,n){let i,s=!0,r=n.length,o=t-r,l=parseInt(e.start,10)-o;return l=l>r?r:l,i=l+parseInt(e.length,10),i>r&&(i=r,this.log(`End range automatically set to the max value of ${r}`)),l<0||i-l<0||l>r||i>r?(s=!1,this.log(`Invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)):n.substring(l,i).replace(/\s+/g,"")===""&&(s=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:l,end:i,valid:s}}getTextNodes(e){let t="",n=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,i=>{n.push({start:t.length,end:(t+=i.textContent).length,node:i})},i=>this.matchesExclude(i.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,()=>{e({value:t,nodes:n})})}matchesExclude(e){return le.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(e,t,n){const i=this.opt.element?this.opt.element:"mark",s=e.splitText(t),r=s.splitText(n-t);let o=document.createElement(i);return o.setAttribute("data-markjs","true"),this.opt.className&&o.setAttribute("class",this.opt.className),o.textContent=s.textContent,s.parentNode.replaceChild(o,s),r}wrapRangeInMappedTextNode(e,t,n,i,s){e.nodes.every((r,o)=>{const l=e.nodes[o+1];if(typeof l>"u"||l.start>t){if(!i(r.node))return!1;const c=t-r.start,f=(n>r.end?r.end:n)-r.start,p=e.value.substr(0,r.start),v=e.value.substr(f+r.start);if(r.node=this.wrapRangeInTextNode(r.node,c,f),e.value=p+v,e.nodes.forEach((b,S)=>{S>=o&&(e.nodes[S].start>0&&S!==o&&(e.nodes[S].start-=f),e.nodes[S].end-=f)}),n-=f,s(r.node.previousSibling,r.start),n>r.end)t=r.end;else return!1}return!0})}wrapMatches(e,t,n,i,s){const r=t===0?0:t+1;this.getTextNodes(o=>{o.nodes.forEach(l=>{l=l.node;let c;for(;(c=e.exec(l.textContent))!==null&&c[r]!=="";){if(!n(c[r],l))continue;let f=c.index;if(r!==0)for(let p=1;p<r;p++)f+=c[p].length;l=this.wrapRangeInTextNode(l,f,f+c[r].length),i(l.previousSibling),e.lastIndex=0}}),s()})}wrapMatchesAcrossElements(e,t,n,i,s){const r=t===0?0:t+1;this.getTextNodes(o=>{let l;for(;(l=e.exec(o.value))!==null&&l[r]!=="";){let c=l.index;if(r!==0)for(let p=1;p<r;p++)c+=l[p].length;const f=c+l[r].length;this.wrapRangeInMappedTextNode(o,c,f,p=>n(l[r],p),(p,v)=>{e.lastIndex=v,i(p)})}s()})}wrapRangeFromIndex(e,t,n,i){this.getTextNodes(s=>{const r=s.value.length;e.forEach((o,l)=>{let{start:c,end:f,valid:p}=this.checkWhitespaceRanges(o,r,s.value);p&&this.wrapRangeInMappedTextNode(s,c,f,v=>t(v,o,s.value.substring(c,f),l),v=>{n(v,o)})}),i()})}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,i="wrapMatches";const s=r=>{n++,this.opt.each(r)};this.opt.acrossElements&&(i="wrapMatchesAcrossElements"),this[i](e,this.opt.ignoreGroups,
4(r,o)=>this.opt.filter(o,r,n),s,()=>{n===0&&this.opt.noMatch(e),this.opt.done(n)})}mark(e,t){this.opt=t;let n=0,i="wrapMatches";const{keywords:s,length:r}=this.getSeparatedKeywords(typeof e=="string"?[e]:e),o=this.opt.caseSensitive?"":"i",l=c=>{let f=new RegExp(this.createRegExp(c),`gm${o}`),p=0;this.log(`Searching with expression "${f}"`),this[i](f,1,(v,b)=>this.opt.filter(b,c,n,p),v=>{p++,n++,this.opt.each(v)},()=>{p===0&&this.opt.noMatch(c),s[r-1]===c?this.opt.done(n):l(s[s.indexOf(c)+1])})};this.opt.acrossElements&&(i="wrapMatchesAcrossElements"),r===0?this.opt.done(n):l(s[0])}markRanges(e,t){this.opt=t;let n=0,i=this.checkRanges(e);i&&i.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(i)),this.wrapRangeFromIndex(i,(s,r,o,l)=>this.opt.filter(s,r,o,l),(s,r)=>{n++,this.opt.each(s,r)},()=>{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 i=le.matches(n,t),s=this.matchesExclude(n);return!i||s?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}};function Ln(a){const e=new Mn(a);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}const Dn="ENTRIES",Et="KEYS",It="VALUES",V="";class Pe{constructor(e,t){const n=e._tree,i=Array.from(n.keys());this.set=e,this._type=t,this._path=i.length>0?[{node:n,keys:i}]:[]}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}=ae(this._path);if(ae(t)===V)return{done:!1,value:this.result()};const n=e.get(ae(t));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const e=ae(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>ae(e)).filter(e=>e!==V).join("")}value(){return ae(this._path).node.get(V)}result(){switch(this._type){case It:return this.value();case Et:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const ae=a=>a[a.length-1],Pn=(a,e,t)=>{const n=new Map;if(e===void 0)return n;const i=e.length+1,s=i+t,r=new Uint8Array(s*i).fill(t+1);for(let o=0;o<i;++o)r[o]=o;for(let o=1;o<s;++o)r[o*i]=o;return kt(a,e,t,n,r,1,i,""),n},kt=(a,e,t,n,i,s,r,o)=>{const l=s*r;e:for(const c of a.keys())if(c===V){const f=i[l-1];f<=t&&n.set(o,[a.get(c),f])}else{let f=s;for(let p=0;p<c.length;++p,++f){const v=c[p],b=r*f,S=b-r;let w=i[b];const x=Math.max(0,f-t-1),A=Math.min(r-1,f+t);for(let k=x;k<A;++k){const G=v!==e[k],U=i[S+k]+ +G,j=i[S+k+1]+1,C=i[b+k]+1,O=i[b+k+1]=Math.min(U,j,C);O<w&&(w=O)}if(w>t)continue e}kt(a.get(c),e,t,n,i,f,r,o+c)}};class Y{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]=Me(this._tree,e.slice(this._prefix.length));if(t===void 0){const[i,s]=Ue(n);for(const r of i.keys())if(r!==V&&r.startsWith(s)){const o=new Map;return o.set(r.slice(s.length),i.get(r)),new Y(o,e)}}return new Y(t,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,zn(this._tree,e)}entries(){return new Pe(this,Dn)}forEach(e){for(const[t,n]of this)e(t,n,this)}fuzzyGet(e,t){return Pn(this._tree,e,t)}get(e){const t=Ke(this._tree,e);return t!==void 0?t.get(V):void 0}has(e){const t=Ke(this._tree,e);return t!==void 0&&t.has(V)}keys(){return new Pe(this,Et)}set(e,t){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,ze(this._tree,e).set(V,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=ze(this._tree,e);return n.set(V,t(n.get(V))),this}fetch(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const n=ze(this._tree,e);let i=n.get(V);return i===void 0&&n.set(V,i=t()),i}values(){return new Pe(this,It)}[Symbol.iterator](){return this.entries()}static from(e){const t=new Y;for(const[n,i]of e)t.set(n,i);return t}static fromObject(e){return Y.from(Object.entries(e))}}const Me=(a,e,t=[])=>{if(e.length===0||a==null)return[a,t];for(const n of a.keys())if(n!==V&&e.startsWith(n))return t.push([a,n]),Me(a.get(n),e.slice(n.length),t);return t.push([a,e]),Me(void 0,"",t)},Ke=(a,e)=>{if(e.length===0||a==null)return a;for(const t of a.keys())if(t!==V&&e.startsWith(t))return Ke(a.get(t),e.slice(t.length))},ze=(a,e)=>{const t=e.length;e:for(let n=0;a&&n<t;){for(const s of a.keys())if(s!==V&&e[n]===s[0]){const r=Math.min(t-n,s.length);let o=1;for(;o<r&&e[n+o]===s[o];)++o;const l=a.get(s);if(o===s.length)a=l;else{const c=new Map;c.set(s.slice(o),l),a.set(e.slice(n,n+o),c),a.delete(s),a=c}n+=o;continue e}const i=new Map;return a.set(e.slice(n),i),i}return a},zn=(a,e)=>{const[t,n]=Me(a,e);
4if(t!==void 0){if(t.delete(V),t.size===0)Nt(n);else if(t.size===1){const[i,s]=t.entries().next().value;Ft(n,i,s)}}},Nt=a=>{if(a.length===0)return;const[e,t]=Ue(a);if(e.delete(t),e.size===0)Nt(a.slice(0,-1));else if(e.size===1){const[n,i]=e.entries().next().value;n!==V&&Ft(a.slice(0,-1),n,i)}},Ft=(a,e,t)=>{if(a.length===0)return;const[n,i]=Ue(a);n.set(i+e,t),n.delete(i)},Ue=a=>a[a.length-1],qe="or",Ot="and",Vn="and_not";class ce{constructor(e){if(e?.fields==null)throw new Error('MiniSearch: option "fields" must be provided');const t=e.autoVacuum==null||e.autoVacuum===!0?$e:e.autoVacuum;this._options={...je,...e,autoVacuum:t,searchOptions:{...ht,...e.searchOptions||{}},autoSuggestOptions:{...Kn,...e.autoSuggestOptions||{}}},this._index=new Y,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=Ge,this.addFields(this._options.fields)}add(e){const{extractField:t,stringifyField:n,tokenize:i,processTerm:s,fields:r,idField:o}=this._options,l=t(e,o);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${o}"`);if(this._idToShortId.has(l))throw new Error(`MiniSearch: duplicate ID ${l}`);const c=this.addDocumentId(l);this.saveStoredFields(c,e);for(const f of r){const p=t(e,f);if(p==null)continue;const v=i(n(p,f),f),b=this._fieldIds[f],S=new Set(v).size;this.addFieldLength(c,b,this._documentCount-1,S);for(const w of v){const x=s(w,f);if(Array.isArray(x))for(const A of x)this.addTerm(b,c,A);else x&&this.addTerm(b,c,x)}}}
4addAll(e){for(const t of e)this.add(t)}addAllAsync(e,t={}){const{chunkSize:n=10}=t,i={chunk:[],promise:Promise.resolve()},{chunk:s,promise:r}=e.reduce(({chunk:o,promise:l},c,f)=>(o.push(c),(f+1)%n===0?{chunk:[],promise:l.then(()=>new Promise(p=>setTimeout(p,0))).then(()=>this.addAll(o))}:{chunk:o,promise:l}),i);return r.then(()=>this.addAll(s))}remove(e){const{tokenize:t,processTerm:n,extractField:i,stringifyField:s,fields:r,idField:o}=this._options,l=i(e,o);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${o}"`);const c=this._idToShortId.get(l);if(c==null)throw new Error(`MiniSearch: cannot remove document with ID ${l}: it is not in the index`);for(const f of r){const p=i(e,f);if(p==null)continue;const v=t(s(p,f),f),b=this._fieldIds[f],S=new Set(v).size;this.removeFieldLength(c,b,this._documentCount,S);for(const w of v){const x=n(w,f);if(Array.isArray(x))for(const A of x)this.removeTerm(b,c,A);else x&&this.removeTerm(b,c,x)}}this._storedFields.delete(c),this._documentIds.delete(c),this._idToShortId.delete(l),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 Y,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,i)=>{this.removeFieldLength(t,i,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:i}=this._options.autoVacuum;this.conditionalVacuum({batchSize:n,batchWait:i},{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,i=n(e,t);this.discard(i),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=Ge,this.performVacuuming(e,n)}),this._enqueuedVacuum)):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}async performVacuuming(e,t){const n=this._dirtCount;if(this.vacuumConditionsMet(t)){const i=e.batchSize||Je.batchSize,s=e.batchWait||Je.batchWait;let r=1;for(const[o,l]of this._index){for(const[c,f]of l)for(const[p]of f)this._documentIds.has(p)||(f.size<=1?l.delete(c):f.delete(p));this._index.get(o).size===0&&this._index.delete(o),r%i===0&&await new Promise(c=>setTimeout(c,s)),r+=1}this._dirtCount-=n}await null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null}vacuumConditionsMet(e){if(e==null)return!0;let{minDirtCount:t,minDirtFactor:n}=e;return t=t||$e.minDirtCount,n=n||$e.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{searchOptions:n}=this._options,i={...n,...t},s=this.executeQuery(e,t),r=[];for(const[o,{score:l,terms:c,match:f}]of s){const p=c.length||1,v={id:this._documentIds.get(o),score:l*p,terms:Object.keys(f),queryTerms:c,match:f};Object.assign(v,this._storedFields.get(o)),(i.filter==null||i.filter(v))&&r.push(v)}return e===ce.wildcard&&i.boostDocument==null||r.sort(vt),r}autoSuggest(e,t={}){t={...this._options.autoSuggestOptions,...t};const n=new Map;for(const{score:s,terms:r}of this.search(e,t)){const o=r.join(" "),l=n.get(o);l!=null?(l.score+=s,l.count+=1):n.set(o,{score:s,terms:r,count:1})}const i=[];for(const[s,{score:r,terms:o,count:l}]of n)i.push({suggestion:s,terms:o,score:r/l});return i.sort(vt),i}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 async loadJSONAsync(e,t){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(je.hasOwnProperty(e))return Ve(je,e);throw new Error(`MiniSearch: unknown option "${e}"`)}static loadJS(e,t){const{index:n,documentIds:i,fieldLength:s,storedFields:r,serializationVersion:o}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=Ee(i),l._fieldLength=Ee(s),l._storedFields=Ee(r);for(const[c,f]of l._documentIds)l._idToShortId.set(f,c);for(const[c,f]of n){const p=new Map;for(const v of Object.keys(f)){let b=f[v];o===1&&(b=b.ds),p.set(parseInt(v,10),Ee(b))}l._index.set(c,p)}return l}static async loadJSAsync(e,t){const{index:n,documentIds:i,fieldLength:s,storedFields:r,serializationVersion:o}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=await Ie(i),l._fieldLength=await Ie(s),l._storedFields=await Ie(r);for(const[f,p]of l._documentIds)l._idToShortId.set(p,f);let c=0;for(const[f,p]of n){const v=new Map;for(const b of Object.keys(p)){let S=p[b];o===1&&(S=S.ds),v.set(parseInt(b,10),await Ie(S))}++c%1e3===0&&await At(0),l._index.set(f,v)}return l}static instantiateMiniSearch(e,t){const{documentCount:n,nextId:i,fieldIds:s,averageFieldLength:r,dirtCount:o,serializationVersion:l}=e;if(l!==1&&l!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const c=new ce(t);return c._documentCount=n,c._nextId=i,c._idToShortId=new Map,c._fieldIds=s,c._avgFieldLength=r,c._dirtCount=o||0,c._index=new Y,c}executeQuery(e,t={}){if(e===ce.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){const v={...t,...e,queries:void 0},b=e.queries.map(S=>this.executeQuery(S,v));return this.combineResults(b,v.combineWith)}const{tokenize:n,processTerm:i,searchOptions:s}=this._options,r={tokenize:n,processTerm:i,...s,...t},{tokenize:o,processTerm:l}=r,p=o(e).flatMap(v=>l(v)).filter(v=>!!v).map(Wn(r)).map(v=>this.executeQuerySpec(v,r));return this.combineResults(p,r.combineWith)}executeQuerySpec(e,t){const n={...this._options.searchOptions,...t},i=(n.fields||this._options.fields).reduce((w,x)=>({...w,[x]:Ve(n.boost,x)||1}),{}),{boostDocument:s,weights:r,maxFuzzy:o,bm25:l}=n,{fuzzy:c,prefix:f}={...ht.weights,...r},p=this._index.get(e.term),v=this.termResults(e.term,e.term,1,e.termBoost,p,i,s,l);
4let b,S;if(e.prefix&&(b=this._index.atPrefix(e.term)),e.fuzzy){const w=e.fuzzy===!0?.2:e.fuzzy,x=w<1?Math.min(o,Math.round(e.term.length*w)):w;x&&(S=this._index.fuzzyGet(e.term,x))}if(b)for(const[w,x]of b){const A=w.length-e.term.length;if(!A)continue;S?.delete(w);const k=f*w.length/(w.length+.3*A);this.termResults(e.term,w,k,e.termBoost,x,i,s,l,v)}if(S)for(const w of S.keys()){const[x,A]=S.get(w);if(!A)continue;const k=c*w.length/(w.length+A);this.termResults(e.term,w,k,e.termBoost,x,i,s,l,v)}return v}executeWildcardQuery(e){const t=new Map,n={...this._options.searchOptions,...e};for(const[i,s]of this._documentIds){const r=n.boostDocument?n.boostDocument(s,"",this._storedFields.get(i)):1;t.set(i,{score:r,terms:[],match:{}})}return t}combineResults(e,t=qe){if(e.length===0)return new Map;const n=t.toLowerCase(),i=jn[n];if(!i)throw new Error(`Invalid combination operator: ${t}`);return e.reduce(i)||new Map}toJSON(){const e=[];for(const[t,n]of this._index){const i={};for(const[s,r]of n)i[s]=Object.fromEntries(r);e.push([t,i])}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,i,s,r,o,l,c=new Map){if(s==null)return c;for(const f of Object.keys(r)){const p=r[f],v=this._fieldIds[f],b=s.get(v);if(b==null)continue;let S=b.size;const w=this._avgFieldLength[v];for(const x of b.keys()){if(!this._documentIds.has(x)){this.removeTerm(v,x,t),S-=1;continue}const A=o?o(this._documentIds.get(x),t,this._storedFields.get(x)):1;if(!A)continue;const k=b.get(x),G=this._fieldLength.get(x)[v],U=Bn(k,S,this._documentCount,G,w,l),j=n*i*p*A*U,C=c.get(x);if(C){C.score+=j,Jn(C.terms,e);const O=Ve(C.match,t);O?O.push(f):C.match[t]=[f]}else c.set(x,{score:j,terms:[e],match:{[t]:[f]}})}}return c}addTerm(e,t,n){const i=this._index.fetch(n,mt);let s=i.get(e);if(s==null)s=new Map,s.set(t,1),i.set(e,s);else{const r=s.get(t);s.set(t,(r||0)+1)}}removeTerm(e,t,n){if(!this._index.has(n)){this.warnDocumentChanged(t,e,n);return}const i=this._index.fetch(n,mt),s=i.get(e);s==null||s.get(t)==null?this.warnDocumentChanged(t,e,n):s.get(t)<=1?s.size<=1?i.delete(e):s.delete(t):s.set(t,s.get(t)-1),this._index.get(n).size===0&&this._index.delete(n)}warnDocumentChanged(e,t,n){for(const i of Object.keys(this._fieldIds))if(this._fieldIds[i]===t){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(e)} has changed before removal: term "${n}" was not present in field "${i}". 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,i){let s=this._fieldLength.get(e);s==null&&this._fieldLength.set(e,s=[]),s[t]=i;const o=(this._avgFieldLength[t]||0)*n+i;this._avgFieldLength[t]=o/(n+1)}removeFieldLength(e,t,n,i){if(n===1){this._avgFieldLength[t]=0;return}const s=this._avgFieldLength[t]*n-i;this._avgFieldLength[t]=s/(n-1)}saveStoredFields(e,t){const{storeFields:n,extractField:i}=this._options;if(n==null||n.length===0)return;let s=this._storedFields.get(e);s==null&&this._storedFields.set(e,s={});for(const r of n){const o=i(t,r);o!==void 0&&(s[r]=o)}}}ce.wildcard=Symbol("*");const Ve=(a,e)=>Object.prototype.hasOwnProperty.call(a,e)?a[e]:void 0,jn={[qe]:(a,e)=>{for(const t of e.keys()){const n=a.get(t);if(n==null)a.set(t,e.get(t));else{const{score:i,terms:s,match:r}=e.get(t);n.score=n.score+i,n.match=Object.assign(n.match,r),pt(n.terms,s)}}return a},[Ot]:(a,e)=>{const t=new Map;for(const n of e.keys()){const i=a.get(n);if(i==null)continue;const{score:s,terms:r,match:o}=e.get(n);pt(i.terms,r),t.set(n,{score:i.score+s,terms:i.terms,match:Object.assign(i.match,o)})}return t},[Vn]:(a,e)=>{for(const t of e.keys())a.delete(t);return a}},$n={k:1.2,b:.7,d:.5},Bn=(a,e,t,n,i,s)=>{const{k:r,b:o,d:l}=s;return Math.log(1+(t-e+.5)/(e+.5))*(l+a*(r+1)/(a+r*(1-o+o*n/i)))},Wn=a=>(e,t,n)=>{const i=typeof a.fuzzy=="function"?a.fuzzy(e,t,n):a.fuzzy||!1,s=typeof a.prefix=="function"?a.prefix(e,t,n):a.prefix===!0,r=typeof a.boostTerm=="function"?a.boostTerm(e,t,n):1;return{term:e,fuzzy:i,prefix:s,termBoost:r}},je={idField:"id",extractField:(a,e)=>a[e],stringifyField:(a,e)=>a.toString(),tokenize:a=>a.split(Gn),processTerm:a=>a.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(a,e)=>{typeof console?.[a]=="function"&&console[a](e)},autoVacuum:!0},ht={combineWith:qe,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:$n}
4,Kn={combineWith:Ot,prefix:(a,e,t)=>e===t.length-1},Je={batchSize:1e3,batchWait:10},Ge={minDirtFactor:.1,minDirtCount:20},$e={...Je,...Ge},Jn=(a,e)=>{a.includes(e)||a.push(e)},pt=(a,e)=>{for(const t of e)a.includes(t)||a.push(t)},vt=({score:a},{score:e})=>e-a,mt=()=>new Map,Ee=a=>{const e=new Map;for(const t of Object.keys(a))e.set(parseInt(t,10),a[t]);return e},Ie=async a=>{const e=new Map;let t=0;for(const n of Object.keys(a))e.set(parseInt(n,10),a[n]),++t%1e3===0&&await At(0);return e},At=a=>new Promise(e=>setTimeout(e,a)),Gn=/[\n\r\p{Z}\p{P}]+/u;function Un(a){let e=a.replace(/\.html$/,"");if(e=decodeURIComponent(e),e=e.replace(/\/$/,"/index"),tn){e=st(e.slice(1).replace(/\//g,"_")||"index")+".md";let n=globalThis.__VP_HASH_MAP__?.[e.toLowerCase()];if(n||(e=e.endsWith("_index.md")?e.slice(0,-9)+".md":e.slice(0,-3)+"_index.md",n=globalThis.__VP_HASH_MAP__?.[e.toLowerCase()]),!n)return null;e=`/${globalThis.__ASSETS_DIR__}/${e}.${n}.js`}else e=`./${st(e.slice(1).replace(/\//g,"_"))}.md.js`;return e}class qn{constructor(e=10){this.max=e,this.cache=new Map}get(e){let t=this.cache.get(e);return t!==void 0&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){this.cache.has(e)?this.cache.delete(e):this.cache.size===this.max&&this.cache.delete(this.first()),this.cache.set(e,t)}first(){return this.cache.keys().next().value}clear(){this.cache.clear()}}function Hn(a){const{localeIndex:e,theme:t}=gt();function n(i){const s=i.split("."),r=t.value.search?.options,o=r&&typeof r=="object",l=o&&r.locales?.[e.value]?.translations||null,c=o&&r.translations||null;let f=l,p=c,v=a;const b=s.pop();for(const S of s){let w=null;const x=v?.[S];x&&(w=v=x);const A=p?.[S];A&&(w=p=A);const k=f?.[S];k&&(w=f=k),x||(v=w),A||(p=w),k||(f=w)}return f?.[b]??p?.[b]??v?.[b]??""}return n}const Qn=["aria-owns"],Yn={class:"shell"},Zn={key:0,class:"search-loading"},Xn={key:1,class:"search-error"},er=["title"],tr={class:"search-actions before"},nr=["title"],rr=["aria-activedescendant","aria-controls","placeholder"],ir={class:"search-actions"},sr=["title"],ar=["disabled","title"],or=["id","role","aria-labelledby"],lr=["id","aria-selected"],cr=["href","aria-label","onMouseenter","onFocusin","data-index"],ur={class:"titles"},dr=["innerHTML"],fr={class:"title main"},hr=["innerHTML"],pr={key:0,class:"excerpt-wrapper"},vr={key:0,class:"excerpt",inert:""},mr=["innerHTML"],gr={key:0,class:"no-results"},br={class:"search-keyboard-shortcuts"},yr=["aria-label"],wr=["aria-label"],Sr=["aria-label"],_r=["aria-label"],xr=Dt({__name:"VPLocalSearchBox",emits:["close"],setup(a,{emit:e}){const t=e,n=oe(),i=oe(),s=oe(null),r=X(!0),o=X(!1);Se(async()=>{try{const m=await Pt(()=>import("./@localSearchIndex.C3x8xEpd.js"),__vite__mapDeps([0,1]));s.value=m.default,r.value=!1}catch{o.value=!0,r.value=!1,console.debug("[VPLocalSearchBox] Search index not available - this is normal during theme development")}});const l=gt(),{activate:c,deactivate:f}=Cn(n,{immediate:!1,allowOutsideClick:!0,clickOutsideDeactivates:!0,escapeDeactivates:!0,fallbackFocus:()=>n.value});ke([()=>r.value,()=>o.value],([m,h])=>{!m&&!h&&ie(()=>{c(),W()})},{immediate:!0}),et(()=>{f()});const{localeIndex:p,theme:v}=l,b=tt(async()=>{if(!s.value)return null;const m=await s.value[p.value]?.();return m?.default?it(ce.loadJSON(m.default,{fields:["title","titles","text"],storeFields:["title","titles"],searchOptions:{fuzzy:.2,prefix:!0,boost:{title:4,text:2,titles:1},...v.value.search?.provider==="local"&&v.value.search.options?.miniSearch?.searchOptions},...v.value.search?.provider==="local"&&v.value.search.options?.miniSearch?.options})):null}),w=Ne(()=>v.value.search?.provider==="local"&&v.value.search.options?.disableQueryPersistence===!0).value?X(""):zt("vitepress:local-search-filter",""),x=Vt("vitepress:local-search-detailed-list",v.value.search?.provider==="local"&&v.value.search.options?.detailedView===!0),A=Ne(()=>v.value.search?.provider==="local"&&(v.value.search.options?.disableDetailedView===!0||v.value.search.options?.detailedView===!1));jt(()=>{A.value&&(x.value=!1)});const k=oe([]),G=X(!1);ke(w,()=>{G.value=!1});const U=tt(async()=>
4{if(i.value)return it(new Ln(i.value))},null),j=new qn(16);$t(()=>[b.value,w.value,x.value],async([m,h,_],L,D)=>{L?.[0]!==m&&j.clear();let $=!1;if(D(()=>{$=!0}),!m)return;k.value=m.search(h).slice(0,16),G.value=!0;const H=_?await Promise.all(k.value.map(K=>C(K.id))):[];if($)return;for(const{id:K,mod:ye}of H){const we=K.slice(0,K.indexOf("#"));let de=j.get(we);if(de)continue;de=new Map,j.set(we,de);const fe=ye.default??ye;if(fe?.render||fe?.setup){const Z=Zt(fe);Z.config.warnHandler=()=>{},Z.provide(Xt,l),Object.defineProperties(Z.config.globalProperties,{$frontmatter:{get(){return l.frontmatter.value}},$params:{get(){return l.page.value.params}}});const He=document.createElement("div");Z.mount(He),He.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(he=>{const Qe=he.querySelector("a")?.getAttribute("href"),Ye=Qe?.startsWith("#")&&Qe.slice(1);if(!Ye)return;let Ze="";for(;(he=he.nextElementSibling)&&!/^h[1-6]$/i.test(he.tagName);)Ze+=he.outerHTML;de.set(Ye,Ze)}),Z.unmount()}if($)return}const re=new Set;if(k.value=k.value.map(K=>{const[ye,we]=K.id.split("#"),fe=j.get(ye)?.get(we)??"";for(const Z in K.match)re.add(Z);return{...K,text:fe}}),await ie(),$)return;await new Promise(K=>{U.value?.unmark({done:()=>{U.value?.markRegExp(N(re),{done:K})}})});const ue=n.value?.querySelectorAll(".result .excerpt")??[];for(const K of ue)K.querySelector('mark[data-markjs="true"]')?.scrollIntoView({block:"center"});i.value?.firstElementChild?.scrollIntoView({block:"start"})},{debounce:200,immediate:!0});async function C(m){const h=Un(m.slice(0,m.indexOf("#")));try{if(!h)throw new Error(`Cannot find file for id: ${m}`);return{id:m,mod:await import(h)}}catch(_){return console.error(_),{id:m,mod:{}}}}const O=X(),z=Ne(()=>w.value?.length<=0);function W(m=!0){O.value?.focus(),m&&O.value?.select()}Se(()=>{W()});function ne(m){m.pointerType==="mouse"&&W()}const R=X(-1),M=X(!0);ke(k,m=>{R.value=m.length?0:-1,F()});function F(){ie(()=>{document.querySelector(".result.selected")?.scrollIntoView({block:"nearest"})})}_e("ArrowUp",m=>{m.preventDefault(),R.value--,R.value<0&&(R.value=k.value.length-1),M.value=!0,F()}),_e("ArrowDown",m=>{m.preventDefault(),R.value++,R.value>=k.value.length&&(R.value=0),M.value=!0,F()});const u=Bt();_e("Enter",m=>{if(m.isComposing||m.target instanceof HTMLButtonElement&&m.target.type!=="submit")return;const h=k.value[R.value];if(m.target instanceof HTMLInputElement&&!h){m.preventDefault();return}h&&(u.go(h.id),t("close"))}),_e("Escape",()=>{t("close")});const g=Hn({button:{buttonText:"Search"},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"}}});Se(()=>{window.history.pushState(null,"",null)}),Wt("popstate",m=>{m.preventDefault(),t("close")});const y=Kt(Jt?document.body:null);Se(()=>{ie(()=>{y.value=!0,ie().then(()=>c())})}),et(()=>{y.value=!1});function I(){w.value="",ie().then(()=>W(!1))}function N(m){return new RegExp([...m].sort((h,_)=>_.length-h.length).map(h=>`(${nn(h)})`).join("|"),"gi")}function E(m){if(!M.value)return;const h=m.target?.closest(".result"),_=Number.parseInt(h?.dataset.index);_>=0&&_!==R.value&&(R.value=_),M.value=!1}return(m,h)=>(J(),Gt(Yt,{to:"body"},[T("div",{ref_key:"el",ref:n,role:"button","aria-owns":k.value?.length?"localsearch-list":void 0,"aria-expanded":"true","aria-haspopup":"listbox","aria-labelledby":"localsearch-label",class:"VPLocalSearchBox"},[T("div",{class:"backdrop",onClick:h[0]||(h[0]=_=>m.$emit("close"))}),T("div",Yn,[r.value?(J(),q("div",Zn,[h[10]||(h[10]=T("span",null,"Loading search index...",-1)),T("button",{type:"button",class:"search-loading-close",onClick:h[1]||(h[1]=_=>m.$emit("close"))},[...h[9]||(h[9]=[T("span",{class:"vpi-close local-search-icon"},null,-1)])])])):o.value?(J(),q("div",Xn,[h[12]||(h[12]=T("span",null,"Search is not available in theme development mode.",-1)),T("button",{type:"button",class:"search-error-close",onClick:h[2]||(h[2]=_=>m.$emit("close"))},[...h[11]||(h[11]=[T("span",{class:"vpi-close local-search-icon"},null,-1)])])])):(J(),q(Le,{key:2},[T("form",{class:"search-bar",onPointerup:h[6]||(h[6]=_=>ne(_)),onSubmit:h[7]||(h[7]=Ut(()=>{},["prevent"]))},[T("label",{title:P(g)("button.buttonText"),id:"localsearch-label",for:"localsearch-input"},[...h[13]||(h[13]=[T("span",{"aria-hidden":"true",class:"vpi-search search-icon local-search-icon"},null,-1)])],8,er),T("div",tr,[T("button",{class:"back-button",title:P(g)("modal.backButtonTitle"),onClick:h[3]||(h[3]=_=>m.$emit("close"))},[...h[14]||(h[14]=[T("span",{class:"vpi-arrow-left local-search-icon"},null,-1)])],8,nr)]),qt(T("input",{ref_key:"searchInput",ref:O,"onUpdate:modelValue":h[4]||(h[4]=_=>Qt(w)?w.value=_:null),"aria-activedescendant":R.value>-1?"localsearch-item-"+R.value:void 0,"aria-autocomplete":"both","aria-controls":k.value?.length?"localsearch-list":void 0,"aria-labelledby":"localsearch-label",autocapitalize:"off",autocomplete:"off",autocorrect:"off",class:"search-input",id:"localsearch-input",enterkeyhint:"go",maxlength:"64",placeholder:P(g)("button.buttonText"),spellcheck:"false",type:"search"},null,8,rr),[[Ht,P(w)]]),T("div",ir,[A.value?xe("",!0):(J(),q("button",{key:0,class:nt(["toggle-layout-button",{"detailed-list":P(x)}
4]),type:"button",title:P(g)("modal.displayDetails"),onClick:h[5]||(h[5]=_=>R.value>-1&&(x.value=!P(x)))},[...h[15]||(h[15]=[T("span",{class:"vpi-layout-list local-search-icon"},null,-1)])],10,sr)),T("button",{class:"clear-button",type:"reset",disabled:z.value,title:P(g)("modal.resetButtonTitle"),onClick:I},[...h[16]||(h[16]=[T("span",{class:"vpi-delete local-search-icon"},null,-1)])],8,ar)])],32),T("ul",{ref_key:"resultsEl",ref:i,id:k.value?.length?"localsearch-list":void 0,role:k.value?.length?"listbox":void 0,"aria-labelledby":k.value?.length?"localsearch-label":void 0,class:"results",onMousemove:E},[(J(!0),q(Le,null,rt(k.value,(_,L)=>(J(),q("li",{key:_.id,id:"localsearch-item-"+L,"aria-selected":R.value===L?"true":"false",role:"option"},[T("a",{href:_.id,class:nt(["result",{selected:R.value===L}]),"aria-label":[..._.titles,_.title].join(" > "),onMouseenter:D=>!M.value&&(R.value=L),onFocusin:D=>R.value=L,onClick:h[8]||(h[8]=D=>m.$emit("close")),"data-index":L},[T("div",null,[T("div",ur,[h[18]||(h[18]=T("span",{class:"title-icon"},"#",-1)),(J(!0),q(Le,null,rt(_.titles,(D,$)=>(J(),q("span",{key:$,class:"title"},[T("span",{class:"text",innerHTML:D},null,8,dr),h[17]||(h[17]=T("span",{class:"vpi-chevron-right local-search-icon"},null,-1))]))),128)),T("span",fr,[T("span",{class:"text",innerHTML:_.title},null,8,hr)])]),P(x)?(J(),q("div",pr,[_.text?(J(),q("div",vr,[T("div",{class:"vp-doc",innerHTML:_.text},null,8,mr)])):xe("",!0),h[19]||(h[19]=T("div",{class:"excerpt-gradient-bottom"},null,-1)),h[20]||(h[20]=T("div",{class:"excerpt-gradient-top"},null,-1))])):xe("",!0)])],42,cr)],8,lr))),128)),P(w)&&!k.value.length&&G.value?(J(),q("li",gr,[pe(ve(P(g)("modal.noResultsText"))+' "',1),T("strong",null,ve(P(w)),1),h[21]||(h[21]=pe('" ',-1))])):xe("",!0)],40,or),T("div",br,[T("span",null,[T("kbd",{"aria-label":P(g)("modal.footer.navigateUpKeyAriaLabel")},[...h[22]||(h[22]=[T("span",{class:"vpi-arrow-up navigate-icon"},null,-1)])],8,yr),T("kbd",{"aria-label":P(g)("modal.footer.navigateDownKeyAriaLabel")},[...h[23]||(h[23]=[T("span",{class:"vpi-arrow-down navigate-icon"},null,-1)])],8,wr),pe(" "+ve(P(g)("modal.footer.navigateText")),1)]),T("span",null,[T("kbd",{"aria-label":P(g)("modal.footer.selectKeyAriaLabel")},[...h[24]||(h[24]=[T("span",{class:"vpi-corner-down-left navigate-icon"},null,-1)])],8,Sr),pe(" "+ve(P(g)("modal.footer.selectText")),1)]),T("span",null,[T("kbd",{"aria-label":P(g)("modal.footer.closeKeyAriaLabel")},"esc",8,_r),pe(" "+ve(P(g)("modal.footer.closeText")),1)])])],64))])],8,Qn)]))}}),Nr=en(xr,[["__scopeId","data-v-e3597c93"]]);export{Nr as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.