import{s as ve,e as D,b as G,f as z,d as C,g as O,i as E,N as Te,R as we,a as b,S as Ae,c as ee,m as H,y as $e,T as xe,p as oe,z as Ke,A as Ue,B as We,C as Ze,t as Qe,l as Ve}from"./scheduler.DR3HL06C.js";import{S as qe,i as Ce,g as ie,e as re,t as S,b as F,c as je,a as Oe,m as Se,d as Fe}from"./index.eTFbXueA.js";import{e as he,u as Xe,b as Ye}from"./theme.DWPIB_d8.js";function fe(e,t,n){const s=e.slice();return s[5]=t[n],s}function ue(e){let t,n,s=Q(e[5].node.content,e[1])+"";return{c(){t=D("span"),n=new we(!1),this.h()},l(i){t=G(i,"SPAN",{class:!0});var r=z(t);n=Ae(r,!1),r.forEach(C),this.h()},h(){n.a=null,O(t,"class","svelte-13pjn3x")},m(i,r){E(i,t,r),n.m(s,t)},p(i,r){r&3&&s!==(s=Q(i[5].node.content,i[1])+"")&&n.p(s)},d(i){i&&C(t)}}}function ce(e){let t,n;return t=new Be({props:{results:e[5].children,query:e[1]}}),t.$on("select",e[4]),{c(){je(t.$$.fragment)},l(s){Oe(t.$$.fragment,s)},m(s,i){Se(t,s,i),n=!0},p(s,i){const r={};i&1&&(r.results=s[5].children),i&2&&(r.query=s[1]),t.$set(r)},i(s){n||(S(t.$$.fragment,s),n=!0)},o(s){F(t.$$.fragment,s),n=!1},d(s){Fe(t,s)}}}function ae(e,t){var A;let n,s,i,r,o=Q(t[5].breadcrumbs[t[5].breadcrumbs.length-1],t[1])+"",l,h,f,a,m,g,d,u,c=((A=t[5].node)==null?void 0:A.content)&&ue(t);function q(){return t[3](t[5])}let p=t[5].children.length>0&&ce(t);return{key:e,first:null,c(){n=D("li"),s=D("a"),i=D("strong"),r=new we(!1),l=b(),c&&c.c(),a=b(),p&&p.c(),m=b(),this.h()},l(_){n=G(_,"LI",{class:!0});var w=z(n);s=G(w,"A",{"data-sveltekit-preload-data":!0,href:!0,"data-has-node":!0,class:!0});var j=z(s);i=G(j,"STRONG",{class:!0});var P=z(i);r=Ae(P,!1),P.forEach(C),l=ee(j),c&&c.l(j),j.forEach(C),a=ee(w),p&&p.l(w),m=ee(w),w.forEach(C),this.h()},h(){r.a=null,O(i,"class","svelte-13pjn3x"),O(s,"data-sveltekit-preload-data",""),O(s,"href",h=t[5].href),O(s,"data-has-node",f=t[5].node?!0:void 0),O(s,"class","svelte-13pjn3x"),O(n,"class","svelte-13pjn3x"),this.first=n},m(_,w){E(_,n,w),H(n,s),H(s,i),r.m(o,i),H(s,l),c&&c.m(s,null),H(n,a),p&&p.m(n,null),H(n,m),g=!0,d||(u=$e(s,"click",q),d=!0)},p(_,w){var j;t=_,(!g||w&3)&&o!==(o=Q(t[5].breadcrumbs[t[5].breadcrumbs.length-1],t[1])+"")&&r.p(o),(j=t[5].node)!=null&&j.content?c?c.p(t,w):(c=ue(t),c.c(),c.m(s,null)):c&&(c.d(1),c=null),(!g||w&1&&h!==(h=t[5].href))&&O(s,"href",h),(!g||w&1&&f!==(f=t[5].node?!0:void 0))&&O(s,"data-has-node",f),t[5].children.length>0?p?(p.p(t,w),w&1&&S(p,1)):(p=ce(t),p.c(),S(p,1),p.m(n,m)):p&&(ie(),F(p,1,1,()=>{p=null}),re())},i(_){g||(S(p),g=!0)},o(_){F(p),g=!1},d(_){_&&C(n),c&&c.d(),p&&p.d(),d=!1,u()}}}function be(e){let t,n=[],s=new Map,i,r=he(e[0]);const o=l=>l[5].href;for(let l=0;l<r.length;l+=1){let h=fe(e,r,l),f=o(h);s.set(f,n[l]=ae(f,h))}return{c(){t=D("ul");for(let l=0;l<n.length;l+=1)n[l].c();this.h()},l(l){t=G(l,"UL",{class:!0});var h=z(t);for(let f=0;f<n.length;f+=1)n[f].l(h);h.forEach(C),this.h()},h(){O(t,"class","svelte-13pjn3x")},m(l,h){E(l,t,h);for(let f=0;f<n.length;f+=1)n[f]&&n[f].m(t,null);i=!0},p(l,[h]){h&7&&(r=he(l[0]),ie(),n=Xe(n,h,o,1,l,r,s,t,Ye,ae,null,fe),re())},i(l){if(!i){for(let h=0;h<r.length;h+=1)S(n[h]);i=!0}},o(l){for(let h=0;h<n.length;h+=1)F(n[h]);i=!1},d(l){l&&C(t);for(let h=0;h<n.length;h+=1)n[h].d()}}}function $(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Q(e,t){const n=e.toLowerCase().indexOf(t.toLowerCase());if(n===-1)return $(e.slice(0,100));const s=n>20?`…${e.slice(n-15,n)}`:e.slice(0,n),i=e.slice(n+t.length,n+t.length+(80-(s.length+t.length)));return $(s)+`<mark>${$(e.slice(n,n+t.length))}</mark>`+$(i)}function et(e,t,n){let{results:s}=t,{query:i}=t;const r=Te(),o=h=>r("select",{href:h.href});function l(h){xe.call(this,e,h)}return e.$$set=h=>{"results"in h&&n(0,s=h.results),"query"in h&&n(1,i=h.query)},[s,i,r,o,l]}class Be extends qe{constructor(t){super(),Ce(this,t,et,be,ve,{results:0,query:1})}}const tt=e=>({}),ge=e=>({});function nt(e){let t,n;const s=e[3]["no-results"],i=Ke(s,e,e[2],ge),r=i||it();return{c(){t=D("p"),r&&r.c(),this.h()},l(o){t=G(o,"P",{class:!0});var l=z(t);r&&r.l(l),l.forEach(C),this.h()},h(){O(t,"class","info svelte-16pklco")},m(o,l){E(o,t,l),r&&r.m(t,null),n=!0},p(o,l){i&&i.p&&(!n||l&4)&&Ue(i,s,o,o[2],n?Ze(s,o[2],l,tt):We(o[2]),ge)},i(o){n||(S(r,o),n=!0)},o(o){F(r,o),n=!1},d(o){o&&C(t),r&&r.d(o)}}}function st(e){let t,n;return t=new Be({props:{results:e[0],query:e[1]}}),t.$on("select",e[4]),{c(){je(t.$$.fragment)},l(s){Oe(t.$$.fragment,s)},m(s,i){Se(t,s,i),n=!0},p(s,i){const r={};i&1&&(r.results=s[0]),i&2&&(r.query=s[1]),t.$set(r)},i(s){n||(S(t.$$.fragment,s),n=!0)},o(s){F(t.$$.fragment,s),n=!1},d(s){Fe(t,s)}}}function it(e){let t;return{c(){t=Qe("No results")},l(n){t=Ve(n,"No results")},m(n,s){E(n,t,s)},d(n){n&&C(t)}}}function rt(e){let t,n,s,i;const r=[st,nt],o=[];function l(h,f){return h[0].length>0?0:h[1]?1:-1}return~(t=l(e))&&(n=o[t]=r[t](e)),{c(){n&&n.c(),s=oe()},l(h){n&&n.l(h),s=oe()},m(h,f){~t&&o[t].m(h,f),E(h,s,f),i=!0},p(h,[f]){let a=t;t=l(h),t===a?~t&&o[t].p(h,f):(n&&(ie(),F(o[a],1,1,()=>{o[a]=null}),re()),~t?(n=o[t],n?n.p(h,f):(n=o[t]=r[t](h),n.c()),S(n,1),n.m(s.parentNode,s)):n=null)},i(h){i||(S(n),i=!0)},o(h){F(n),i=!1},d(h){h&&C(s),~t&&o[t].d(h)}}}function lt(e,t,n){let{$$slots:s={},$$scope:i}=t,{results:r}=t,{query:o}=t;function l(h){xe.call(this,e,h)}return e.$$set=h=>{"results"in h&&n(0,r=h.results),"query"in h&&n(1,o=h.query),"$$scope"in h&&n(2,i=h.$$scope)},[r,o,i,s,l]}class Ft extends qe{constructor(t){super(),Ce(this,t,lt,rt,ve,{results:0,query:1})}}var y;function W(e){return typeof e<"u"?e:!0}function de(e){const t=Array(e);for(let n=0;n<e;n++)t[n]=k();return t}function k(){return Object.create(null)}function ot(e,t){return t.length-e.length}function x(e){return typeof e=="string"}function B(e){return typeof e=="object"}function le(e){return typeof e=="function"}function De(e,t){var n=ht;if(e&&(t&&(e=Z(e,t)),this.H&&(e=Z(e,this.H)),this.J&&1<e.length&&(e=Z(e,this.J)),n||n==="")){if(t=e.split(n),this.filter){e=this.filter,n=t.length;const s=[];for(let i=0,r=0;i<n;i++){const o=t[i];o&&!e[o]&&(s[r++]=o)}e=s}else e=t;return e}return e}const ht=/[\p{Z}\p{S}\p{P}\p{C}]+/u,ft=/[\u0300-\u036f]/g;function pe(e,t){const n=Object.keys(e),s=n.length,i=[];let r="",o=0;for(let l=0,h,f;l<s;l++)h=n[l],(f=e[h])?(i[o++]=v(t?"(?!\\b)"+h+"(\\b|_)":h),i[o++]=f):r+=(r?"|":"")+h;return r&&(i[o++]=v(t?"(?!\\b)("+r+")(\\b|_)":"("+r+")"),i[o]=""),i}function Z(e,t){for(let n=0,s=t.length;n<s&&(e=e.replace(t[n],t[n+1]),e);n+=2);return e}function v(e){return new RegExp(e,"g")}function Ge(e){let t="",n="";for(let s=0,i=e.length,r;s<i;s++)(r=e[s])!==n&&(t+=n=r);return t}var ut={encode:ze,F:!1,G:""};function ze(e){return De.call(this,(""+e).toLowerCase(),!1)}const ct={},L={};function Ne(e){J(e,"add"),J(e,"append"),J(e,"search"),J(e,"update"),J(e,"remove")}function J(e,t){e[t+"Async"]=function(){const n=this,s=arguments;var i=s[s.length-1];let r;return le(i)&&(r=i,delete s[s.length-1]),i=new Promise(function(o){setTimeout(function(){n.async=!0;const l=n[t].apply(n,s);n.async=!1,o(l)})}),r?(i.then(r),this):i}}function Ee(e,t,n,s){const i=e.length;let r=[],o,l,h=0;s&&(s=[]);for(let f=i-1;0<=f;f--){const a=e[f],m=a.length,g=k();let d=!o;for(let u=0;u<m;u++){const c=a[u],q=c.length;if(q)for(let p=0,A,_;p<q;p++)if(_=c[p],o){if(o[_]){if(!f){if(n)n--;else if(r[h++]=_,h===t)return r}(f||s)&&(g[_]=1),d=!0}if(s&&(A=(l[_]||0)+1,l[_]=A,A<i)){const w=s[A-2]||(s[A-2]=[]);w[w.length]=_}}else g[_]=1}if(s)o||(l=g);else if(!d)return[];o=g}if(s)for(let f=s.length-1,a,m;0<=f;f--){a=s[f],m=a.length;for(let g=0,d;g<m;g++)if(d=a[g],!o[d]){if(n)n--;else if(r[h++]=d,h===t)return r;o[d]=1}}return r}function at(e,t){const n=k(),s=k(),i=[];for(let r=0;r<e.length;r++)n[e[r]]=1;for(let r=0,o;r<t.length;r++){o=t[r];for(let l=0,h;l<o.length;l++)h=o[l],n[h]&&!s[h]&&(s[h]=1,i[i.length]=h)}return i}function Y(e){this.l=e!==!0&&e,this.cache=k(),this.h=[]}function Le(e,t,n){B(e)&&(e=e.query);let s=this.cache.get(e);return s||(s=this.search(e,t,n),this.cache.set(e,s)),s}Y.prototype.set=function(e,t){if(!this.cache[e]){var n=this.h.length;for(n===this.l?delete this.cache[this.h[n-1]]:n++,--n;0<n;n--)this.h[n]=this.h[n-1];this.h[0]=e}this.cache[e]=t};Y.prototype.get=function(e){const t=this.cache[e];if(this.l&&t&&(e=this.h.indexOf(e))){const n=this.h[e-1];this.h[e-1]=this.h[e],this.h[e]=n}return t};const gt={memory:{charset:"latin:extra",D:3,B:4,m:!1},performance:{D:3,B:3,s:!1,context:{depth:2,D:1}},match:{charset:"latin:extra",G:"reverse"},score:{charset:"latin:advanced",D:20,B:3,context:{depth:3,D:9}},default:{}};function Pe(e,t,n,s,i,r,o,l){setTimeout(function(){const h=e(n?n+"."+s:s,JSON.stringify(o));h&&h.then?h.then(function(){t.export(e,t,n,i,r+1,l)}):t.export(e,t,n,i,r+1,l)})}function N(e,t){if(!(this instanceof N))return new N(e);var n;if(e){x(e)?e=gt[e]:(n=e.preset)&&(e=Object.assign({},n[n],e)),n=e.charset;var s=e.lang;x(n)&&(n.indexOf(":")===-1&&(n+=":default"),n=L[n]),x(s)&&(s=ct[s])}else e={};let i,r,o=e.context||{};if(this.encode=e.encode||n&&n.encode||ze,this.register=t||k(),this.D=i=e.resolution||9,this.G=t=n&&n.G||e.tokenize||"strict",this.depth=t==="strict"&&o.depth,this.l=W(o.bidirectional),this.s=r=W(e.optimize),this.m=W(e.fastupdate),this.B=e.minlength||1,this.C=e.boost,this.map=r?de(i):k(),this.A=i=o.resolution||1,this.h=r?de(i):k(),this.F=n&&n.F||e.rtl,this.H=(t=e.matcher||s&&s.H)&&pe(t,!1),this.J=(t=e.stemmer||s&&s.J)&&pe(t,!0),n=t=e.filter||s&&s.filter){n=t,s=k();for(let l=0,h=n.length;l<h;l++)s[n[l]]=1;n=s}this.filter=n,this.cache=(t=e.cache)&&new Y(t)}y=N.prototype;y.append=function(e,t){return this.add(e,t,!0)};y.add=function(e,t,n,s){if(t&&(e||e===0)){if(!s&&!n&&this.register[e])return this.update(e,t);if(t=this.encode(t),s=t.length){const f=k(),a=k(),m=this.depth,g=this.D;for(let d=0;d<s;d++){let u=t[this.F?s-1-d:d];var i=u.length;if(u&&i>=this.B&&(m||!a[u])){var r=K(g,s,d),o="";switch(this.G){case"full":if(2<i){for(r=0;r<i;r++)for(var l=i;l>r;l--)if(l-r>=this.B){var h=K(g,s,d,i,r);o=u.substring(r,l),M(this,a,o,h,e,n)}break}case"reverse":if(1<i){for(l=i-1;0<l;l--)o=u[l]+o,o.length>=this.B&&M(this,a,o,K(g,s,d,i,l),e,n);o=""}case"forward":if(1<i){for(l=0;l<i;l++)o+=u[l],o.length>=this.B&&M(this,a,o,r,e,n);break}default:if(this.C&&(r=Math.min(r/this.C(t,u,d)|0,g-1)),M(this,a,u,r,e,n),m&&1<s&&d<s-1){for(i=k(),o=this.A,r=u,l=Math.min(m+1,s-d),i[r]=1,h=1;h<l;h++)if((u=t[this.F?s-1-d-h:d+h])&&u.length>=this.B&&!i[u]){i[u]=1;const c=this.l&&u>r;M(this,f,c?r:u,K(o+(s/2>o?0:1),s,d,l-1,h-1),e,n,c?u:r)}}}}}this.m||(this.register[e]=1)}}return this};function K(e,t,n,s,i){return n&&1<e?t+(s||0)<=e?n+(i||0):(e-1)/(t+(s||0))*(n+(i||0))+1|0:0}function M(e,t,n,s,i,r,o){let l=o?e.h:e.map;(!t[n]||o&&!t[n][o])&&(e.s&&(l=l[s]),o?(t=t[n]||(t[n]=k()),t[o]=1,l=l[o]||(l[o]=k())):t[n]=1,l=l[n]||(l[n]=[]),e.s||(l=l[s]||(l[s]=[])),r&&l.includes(i)||(l[l.length]=i,e.m&&(e=e.register[i]||(e.register[i]=[]),e[e.length]=l)))}y.search=function(e,t,n){n||(!t&&B(e)?(n=e,e=n.query):B(t)&&(n=t));let s=[],i,r,o=0;if(n){e=n.query||e,t=n.limit,o=n.offset||0;var l=n.context;r=n.suggest}if(e&&(e=this.encode(""+e),i=e.length,1<i)){n=k();var h=[];for(let a=0,m=0,g;a<i;a++)if((g=e[a])&&g.length>=this.B&&!n[g])if(this.s||r||this.map[g])h[m++]=g,n[g]=1;else return s;e=h,i=e.length}if(!i)return s;t||(t=100),l=this.depth&&1<i&&l!==!1,n=0;let f;l?(f=e[0],n=1):1<i&&e.sort(ot);for(let a,m;n<i;n++){if(m=e[n],l?(a=me(this,s,r,t,o,i===2,m,f),r&&a===!1&&s.length||(f=m)):a=me(this,s,r,t,o,i===1,m),a)return a;if(r&&n===i-1){if(h=s.length,!h){if(l){l=0,n=-1;continue}return s}if(h===1)return He(s[0],t,o)}}return Ee(s,t,o,r)};function me(e,t,n,s,i,r,o,l){let h=[],f=l?e.h:e.map;if(e.s||(f=_e(f,o,l,e.l)),f){let a=0;const m=Math.min(f.length,l?e.A:e.D);for(let g=0,d=0,u,c;g<m&&!((u=f[g])&&(e.s&&(u=_e(u,o,l,e.l)),i&&u&&r&&(c=u.length,c<=i?(i-=c,u=null):(u=u.slice(i),i=0)),u&&(h[a++]=u,r&&(d+=u.length,d>=s))));g++);if(a){if(r)return He(h,s,0);t[t.length]=h;return}}return!n&&h}function He(e,t,n){return e=e.length===1?e[0]:[].concat.apply([],e),n||e.length>t?e.slice(n,n+t):e}function _e(e,t,n,s){return n?(s=s&&t>n,e=(e=e[s?t:n])&&e[s?n:t]):e=e[t],e}y.contain=function(e){return!!this.register[e]};y.update=function(e,t){return this.remove(e).add(e,t)};y.remove=function(e,t){const n=this.register[e];if(n){if(this.m)for(let s=0,i;s<n.length;s++)i=n[s],i.splice(i.indexOf(e),1);else V(this.map,e,this.D,this.s),this.depth&&V(this.h,e,this.A,this.s);if(t||delete this.register[e],this.cache){t=this.cache;for(let s=0,i,r;s<t.h.length;s++)r=t.h[s],i=t.cache[r],i.includes(e)&&(t.h.splice(s--,1),delete t.cache[r])}}return this};function V(e,t,n,s,i){let r=0;if(e.constructor===Array)if(i)t=e.indexOf(t),t!==-1?1<e.length&&(e.splice(t,1),r++):r++;else{i=Math.min(e.length,n);for(let o=0,l;o<i;o++)(l=e[o])&&(r=V(l,t,n,s,i),s||r||delete e[o])}else for(let o in e)(r=V(e[o],t,n,s,i))||delete e[o];return r}y.searchCache=Le;y.export=function(e,t,n,s,i,r){let o=!0;typeof r>"u"&&(o=new Promise(f=>{r=f}));let l,h;switch(i||(i=0)){case 0:if(l="reg",this.m){h=k();for(let f in this.register)h[f]=1}else h=this.register;break;case 1:l="cfg",h={doc:0,opt:this.s?1:0};break;case 2:l="map",h=this.map;break;case 3:l="ctx",h=this.h;break;default:typeof n>"u"&&r&&r();return}return Pe(e,t||this,n,l,s,i,h,r),o};y.import=function(e,t){if(t)switch(x(t)&&(t=JSON.parse(t)),e){case"cfg":this.s=!!t.opt;break;case"reg":this.m=!1,this.register=t;break;case"map":this.map=t;break;case"ctx":this.h=t}};Ne(N.prototype);function dt(e){e=e.data;var t=self._index;const n=e.args;var s=e.task;switch(s){case"init":s=e.options||{},e=e.factory,t=s.encode,s.cache=!1,t&&t.indexOf("function")===0&&(s.encode=Function("return "+t)()),e?(Function("return "+e)()(self),self._index=new self.FlexSearch.Index(s),delete self.FlexSearch):self._index=new N(s);break;default:e=e.id,t=t[s].apply(t,n),postMessage(s==="search"?{id:e,msg:t}:{id:e})}}let ke=0;function I(e){if(!(this instanceof I))return new I(e);var t;e?le(t=e.encode)&&(e.encode=t.toString()):e={},(t=(self||window)._factory)&&(t=t.toString());const n=typeof window>"u"&&self.exports,s=this;this.o=pt(t,n,e.worker),this.h=k(),this.o&&(n?this.o.on("message",function(i){s.h[i.id](i.msg),delete s.h[i.id]}):this.o.onmessage=function(i){i=i.data,s.h[i.id](i.msg),delete s.h[i.id]},this.o.postMessage({task:"init",factory:t,options:e}))}R("add");R("append");R("search");R("update");R("remove");function R(e){I.prototype[e]=I.prototype[e+"Async"]=function(){const t=this,n=[].slice.call(arguments);var s=n[n.length-1];let i;return le(s)&&(i=s,n.splice(n.length-1,1)),s=new Promise(function(r){setTimeout(function(){t.h[++ke]=r,t.o.postMessage({task:e,id:ke,args:n})})}),i?(s.then(i),this):s}}function pt(e,t,n){let s;try{s=t?new(require("worker_threads")).Worker(__dirname+"/node/node.js"):e?new Worker(URL.createObjectURL(new Blob(["onmessage="+dt.toString()],{type:"text/javascript"}))):new Worker(x(n)?n:"worker/worker.js",{type:"module"})}catch{}return s}function X(e){if(!(this instanceof X))return new X(e);var t=e.document||e.doc||e,n;this.K=[],this.h=[],this.A=[],this.register=k(),this.key=(n=t.key||t.id)&&U(n,this.A)||"id",this.m=W(e.fastupdate),this.C=(n=t.store)&&n!==!0&&[],this.store=n&&k(),this.I=(n=t.tag)&&U(n,this.A),this.l=n&&k(),this.cache=(n=e.cache)&&new Y(n),e.cache=!1,this.o=e.worker,this.async=!1,n=k();let s=t.index||t.field||t;x(s)&&(s=[s]);for(let i=0,r,o;i<s.length;i++)r=s[i],x(r)||(o=r,r=r.field),o=B(o)?Object.assign({},e,o):e,this.o&&(n[r]=new I(o),n[r].o||(this.o=!1)),this.o||(n[r]=new N(o,this.register)),this.K[i]=U(r,this.A),this.h[i]=r;if(this.C)for(e=t.store,x(e)&&(e=[e]),t=0;t<e.length;t++)this.C[t]=U(e[t],this.A);this.index=n}function U(e,t){const n=e.split(":");let s=0;for(let i=0;i<n.length;i++)e=n[i],0<=e.indexOf("[]")&&(e=e.substring(0,e.length-2))&&(t[s]=!0),e&&(n[s++]=e);return s<n.length&&(n.length=s),1<s?n:n[0]}function te(e,t){if(x(t))e=e[t];else for(let n=0;e&&n<t.length;n++)e=e[t[n]];return e}function ne(e,t,n,s,i){if(e=e[i],s===n.length-1)t[i]=e;else if(e)if(e.constructor===Array)for(t=t[i]=Array(e.length),i=0;i<e.length;i++)ne(e,t,n,s,i);else t=t[i]||(t[i]=k()),i=n[++s],ne(e,t,n,s,i)}function se(e,t,n,s,i,r,o,l){if(e=e[o])if(s===t.length-1){if(e.constructor===Array){if(n[s]){for(t=0;t<e.length;t++)i.add(r,e[t],!0,!0);return}e=e.join(" ")}i.add(r,e,l,!0)}else if(e.constructor===Array)for(o=0;o<e.length;o++)se(e,t,n,s,i,r,o,l);else o=t[++s],se(e,t,n,s,i,r,o,l)}y=X.prototype;y.add=function(e,t,n){if(B(e)&&(t=e,e=te(t,this.key)),t&&(e||e===0)){if(!n&&this.register[e])return this.update(e,t);for(let s=0,i,r;s<this.h.length;s++)r=this.h[s],i=this.K[s],x(i)&&(i=[i]),se(t,i,this.A,0,this.index[r],e,i[0],n);if(this.I){let s=te(t,this.I),i=k();x(s)&&(s=[s]);for(let r=0,o,l;r<s.length;r++)if(o=s[r],!i[o]&&(i[o]=1,l=this.l[o]||(this.l[o]=[]),!n||!l.includes(e))&&(l[l.length]=e,this.m)){const h=this.register[e]||(this.register[e]=[]);h[h.length]=l}}if(this.store&&(!n||!this.store[e])){let s;if(this.C){s=k();for(let i=0,r;i<this.C.length;i++)r=this.C[i],x(r)?s[r]=t[r]:ne(t,s,r,0,r[0])}this.store[e]=s||t}}return this};y.append=function(e,t){return this.add(e,t,!0)};y.update=function(e,t){return this.remove(e).add(e,t)};y.remove=function(e){if(B(e)&&(e=te(e,this.key)),this.register[e]){for(var t=0;t<this.h.length&&(this.index[this.h[t]].remove(e,!this.o),!this.m);t++);if(this.I&&!this.m)for(let n in this.l){t=this.l[n];const s=t.indexOf(e);s!==-1&&(1<t.length?t.splice(s,1):delete this.l[n])}this.store&&delete this.store[e],delete this.register[e]}return this};y.search=function(e,t,n,s){n||(!t&&B(e)?(n=e,e=""):B(t)&&(n=t,t=0));let i=[],r=[],o,l,h,f,a,m,g=0;if(n)if(n.constructor===Array)h=n,n=null;else{if(e=n.query||e,h=(o=n.pluck)||n.index||n.field,f=n.tag,l=this.store&&n.enrich,a=n.bool==="and",t=n.limit||t||100,m=n.offset||0,f&&(x(f)&&(f=[f]),!e)){for(let u=0,c;u<f.length;u++)(c=mt.call(this,f[u],t,m,l))&&(i[i.length]=c,g++);return g?i:[]}x(h)&&(h=[h])}h||(h=this.h),a=a&&(1<h.length||f&&1<f.length);const d=!s&&(this.o||this.async)&&[];for(let u=0,c,q,p;u<h.length;u++){let A;if(q=h[u],x(q)||(A=q,q=A.field,e=A.query||e,t=A.limit||t,l=A.enrich||l),d)d[u]=this.index[q].searchAsync(e,t,A||n);else{if(s?c=s[u]:c=this.index[q].search(e,t,A||n),p=c&&c.length,f&&p){const _=[];let w=0;a&&(_[0]=[c]);for(let j=0,P,T;j<f.length;j++)P=f[j],(p=(T=this.l[P])&&T.length)&&(w++,_[_.length]=a?[T]:T);w&&(c=a?Ee(_,t||100,m||0):at(c,_),p=c.length)}if(p)r[g]=q,i[g++]=c;else if(a)return[]}}if(d){const u=this;return new Promise(function(c){Promise.all(d).then(function(q){c(u.search(e,t,n,q))})})}if(!g)return[];if(o&&(!l||!this.store))return i[0];for(let u=0,c;u<r.length;u++){if(c=i[u],c.length&&l&&(c=Je.call(this,c)),o)return c;i[u]={field:r[u],result:c}}return i};function mt(e,t,n,s){let i=this.l[e],r=i&&i.length-n;if(r&&0<r)return(r>t||n)&&(i=i.slice(n,n+t)),s&&(i=Je.call(this,i)),{tag:e,result:i}}function Je(e){const t=Array(e.length);for(let n=0,s;n<e.length;n++)s=e[n],t[n]={id:s,doc:this.store[s]};return t}y.contain=function(e){return!!this.register[e]};y.get=function(e){return this.store[e]};y.set=function(e,t){return this.store[e]=t,this};y.searchCache=Le;y.export=function(e,t,n,s,i,r){let o;if(typeof r>"u"&&(o=new Promise(l=>{r=l})),i||(i=0),s||(s=0),s<this.h.length){const l=this.h[s],h=this.index[l];t=this,setTimeout(function(){h.export(e,t,i?l:"",s,i++,r)||(s++,i=1,t.export(e,t,l,s,i,r))})}else{let l,h;switch(i){case 1:l="tag",h=this.l,n=null;break;case 2:l="store",h=this.store,n=null;break;default:r();return}Pe(e,this,n,l,s,i,h,r)}return o};y.import=function(e,t){if(t)switch(x(t)&&(t=JSON.parse(t)),e){case"tag":this.l=t;break;case"reg":this.m=!1,this.register=t;for(let s=0,i;s<this.h.length;s++)i=this.index[this.h[s]],i.register=t,i.m=!1;break;case"store":this.store=t;break;default:e=e.split(".");const n=e[0];e=e[1],n&&e&&this.index[n].import(e,t)}};Ne(X.prototype);var _t={encode:Me,F:!1,G:""};const kt=[v("[àáâãäå]"),"a",v("[èéêë]"),"e",v("[ìíîï]"),"i",v("[òóôõöő]"),"o",v("[ùúûüű]"),"u",v("[ýŷÿ]"),"y",v("ñ"),"n",v("[çc]"),"k",v("ß"),"s",v(" & ")," and "];function Me(e){var t=e=""+e;return t.normalize&&(t=t.normalize("NFD").replace(ft,"")),De.call(this,t.toLowerCase(),!e.normalize&&kt)}var yt={encode:Ie,F:!1,G:"strict"};const vt=/[^a-z0-9]+/,ye={b:"p",v:"f",w:"f",z:"s",x:"s",ß:"s",d:"t",n:"m",c:"k",g:"k",j:"k",q:"k",i:"e",y:"e",u:"o"};function Ie(e){e=Me.call(this,e).join(" ");const t=[];if(e){const n=e.split(vt),s=n.length;for(let i=0,r,o=0;i<s;i++)if((e=n[i])&&(!this.filter||!this.filter[e])){r=e[0];let l=ye[r]||r,h=l;for(let f=1;f<e.length;f++){r=e[f];const a=ye[r]||r;a&&a!==h&&(l+=a,h=a)}t[o++]=l}}return t}var wt={encode:Re,F:!1,G:""};const At=[v("ae"),"a",v("oe"),"o",v("sh"),"s",v("th"),"t",v("ph"),"f",v("pf"),"f",v("(?![aeo])h(?![aeo])"),"",v("(?!^[aeo])h(?!^[aeo])"),""];function Re(e,t){return e&&(e=Ie.call(this,e).join(" "),2<e.length&&(e=Z(e,At)),t||(1<e.length&&(e=Ge(e)),e&&(e=e.split(" ")))),e||[]}var xt={encode:Ct,F:!1,G:""};const qt=v("(?!\\b)[aeo]");function Ct(e){return e&&(e=Re.call(this,e,!0),1<e.length&&(e=e.replace(qt,"")),1<e.length&&(e=Ge(e)),e&&(e=e.split(" "))),e||[]}L["latin:default"]=ut;L["latin:simple"]=_t;L["latin:balance"]=yt;L["latin:advanced"]=wt;L["latin:extra"]=xt;export{Ft as S};
