PageSourceSearch

https://help.tradingpaints.com/assets/built/search/index.min.js?v=CeyJIkayHXRzoKGR

js tradingpaints.com collected 2026-10-03 21:48:26 UTC 81,305 bytes, 8 lines download raw bytes

vendor: 6,409 bytes, line 1
1var t,e,n,i,r,s,o,l,h,a,c,u,f,d,p,g={},_=[],m=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,y=Array.isArray;function x(t,e){for(var n in e)t[n]=e[n];return t}function w(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function b(e,n,i){var r,s,o,l={};for(o in n)"key"==o?r=n[o]:"ref"==o?s=n[o]:l[o]=n[o];if(arguments.length>2&&(l.children=arguments.length>3?t.call(arguments,2):i),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===l[o]&&(l[o]=e.defaultProps[o]);return v(e,l,r,s,null)}function v(t,i,r,s,o){var l={type:t,props:i,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++n:o,__i:-1,__u:0};return null==o&&null!=e.vnode&&e.vnode(l),l}function k(t){return t.children}function A(t,e){this.props=t,this.context=e}function S(t,e){if(null==e)return t.__?S(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?S(t):null}function C(t){if(t.__P&&t.__d){var n=t.__v,i=n.__e,r=[],s=[],o=x({},n);o.__v=n.__v+1,e.vnode&&e.vnode(o),T(t.__P,o,n,t.__n,t.__P.namespaceURI,32&n.__u?[i]:null,r,null==i?S(n):i,!!(32&n.__u),s),o.__v=n.__v,o.__.__k[o.__i]=o,U(r,o,s),n.__e=n.__=null,o.__e!=i&&E(o)}}function E(t){if(null!=(t=t.__)&&null!=t.__c)return t.__e=t.__c.base=null,t.__k.some(function(e){if(null!=e&&null!=e.__e)return t.__e=t.__c.base=e.__e}),E(t)}function N(t){(!t.__d&&(t.__d=!0)&&i.push(t)&&!z.__r++||r!=e.debounceRendering)&&((r=e.debounceRendering)||s)(z)}function z(){try{for(var t,e=1;i.length;)i.length>e&&i.sort(o),t=i.shift(),e=i.length,C(t)}finally{i.length=z.__r=0}}function j(t,e,n,i,r,s,o,l,h,a,c){var u,f,d,p,m,y,x=i&&i.__k||_,w=e.length;for(h=I(n,e,x,h,w),u=0;u<w;u++)null!=(d=n.__k[u])&&(f=-1!=d.__i&&x[d.__i]||g,d.__i=u,y=T(t,d,f,r,s,o,l,h,a,c),p=d.__e,d.ref&&f.ref!=d.ref&&(f.ref&&R(f.ref,null,d),c.push(d.ref,d.__c||p,d)),null==m&&null!=p&&(m=p),4&d.__u?(h=M(d,h,t),f.__e&&(f.__e=null)):"function"==typeof d.type&&void 0!==y?h=y:p&&(h=p.nextSibling),d.__u&=-7);return n.__e=m,h}function I(t,e,n,i,r){var s,o,l,h,a,c=n.length,u=c,f=0;for(t.__k=new Array(r),s=0;s<r;s++)null!=(o=e[s])&&"boolean"!=typeof o&&"function"!=typeof o?("string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?o=t.__k[s]=v(null,o,null,null,null):y(o)?o=t.__k[s]=v(k,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?o=t.__k[s]=v(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):t.__k[s]=o,h=s+f,o.__=t,o.__b=t.__b+1,l=null,-1!=(a=o.__i=P(o,n,h,u))&&(u--,(l=n[a])&&(l.__u|=2)),null==l||null==l.__v?(-1==a&&(r>c?f--:r<c&&f++),"function"!=typeof o.type&&(o.__u|=4)):a!=h&&(a==h-1?f--:a==h+1?f++:(a>h?f--:f++,o.__u|=4))):t.__k[s]=null;if(u)for(s=0;s<c;s++)null!=(l=n[s])&&!(2&l.__u)&&(l.__e==i&&(i=S(l)),H(l,l));return i}function M(t,e,n){var i,r;if("function"==typeof t.type){for(i=t.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=t,e=M(i[r],e,n));return e}t.__e!=e&&(e&&t.type&&!e.parentNode&&(e=S(t)),e=n.insertBefore(t.__e,e||null));do{e=e&&e.nextSibling}while(null!=e&&8==e.nodeType);return e}function P(t,e,n,i){var r,s,o,l=t.key,h=t.type,a=e[n],c=null!=a&&!(2&a.__u);if(null===a&&null==l||c&&l==a.key&&h==a.type)return n;if(i>(c?1:0))for(r=n-1,s=n+1;r>=0||s<e.length;)if(null!=(a=e[o=r>=0?r--:s++])&&!(2&a.__u)&&l==a.key&&h==a.type)return o;return-1}function D(t,e,n){"-"==e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||m.test(e)?n:n+"px"}function L(t,e,n,i,r){var s,o;t:if("style"==e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof i&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||D(t.style,e,"");if(n)for(e in n)i&&n[e]==i[e]||D(t.style,e,n[e])}else if("o"==e[0]&&"n"==e[1])s=e!=(e=e.replace(c,"$1")),o=e.toLowerCase(),e=o in t||"onFocusOut"==e||"onFocusIn"==e?o.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?i?n[a]=i[a]:(n[a]=u,t.addEventListener(e,s?d:f,s)):t.removeEventListener(e,s?d:f,s);else{if("http://www.w3.org/2000/svg"==r)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=e&&"height"!=e&&"href"!=e&&"list"!=e&&"form"!=e&&"tabIndex"!=e&&"download"!=e&&"rowSpan"!=e&&"colSpan"!=e&&"role"!=e&&"popover"!=e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&"-"!=e[4]?t.removeAttribute(e):t.setAttribute(e,"popover"==e&&1==n?"":n))}}function B(t){return function(n){if(this.l){var i=this.l[n.type+t];if(null==n[h])n[h]=u++;else if(n[h]<i[a])return;return i(e.event?e.event(n):n)}}}function T(t,n,i,r,s,o,l,h,a,c){var u,f,d,p,g,m,b,v,C,E,N,z,I,M,P,D,L=n.type;if(void 0!==n.constructor)return null;128&i.__u&&(a=!!(32&i.__u),o=[h=n.__e=i.__e]),(u=e.__b)&&u(n);t:if("function"==typeof L){f=l.length;try{if(C=n.props,E=L.prototype&&L.prototype.render,N=(u=L.contextType)&&r[u.__c],z=u?N?N.props.value:u.__:r,i.__c?v=(d=n.__c=i.__c).__=d.__E:(E?n.__c=d=new L(C,z):(n.__c=d=new A(C,z),d.constructor=L,d.render=q),N&&N.sub(d),d.state||(d.state={}),d.__n=r,p=d.__d=!0,d.__h=[],d._sb=[]),E&&null==d.__s&&(d.__s=d.state),E&&null!=L.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=x({},d.__s)),x(d.__s,L.getDerivedStateFromProps(C,d.__s))),g=d.props,m=d.state,d.__v=n,p)E&&null==L.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),E&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(E&&null==L.getDerivedStateFromProps&&C!==g&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(C,z),n.__v==i.__v||!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(C,d.__s,z)){n.__v!=i.__v&&(d.props=C,d.state=d.__s,d.__d=!1),n.__e=i.__e,n.__k=i.__k,n.__k.some(function(t){t&&(t.__=n)}),_.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&l.push(d),h=S(i);break t}null!=d.componentWillUpdate&&d.componentWillUpdate(C,d.__s,z),E&&null!=d.componentDidUpdate&&d.__h.push(function(){d.componentDidUpdate(g,m,b)})}if(d.context=z,d.props=C,d.__P=t,d.__e=!1,I=e.__r,M=0,E)d.state=d.__s,d.__d=!1,I&&I(n),u=d.render(d.props,d.state,d.context),_.push.apply(d.__h,d._sb),d._sb=[];else do{d.__d=!1,I&&I(n),u=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++M<25);d.state=d.__s,null!=d.getChildContext&&(r=x(x({},r),d.getChildContext())),E&&!p&&null!=d.getSnapshotBeforeUpdate&&(b=d.getSnapshotBeforeUpdate(g,m)),P=null!=u&&u.type===k&&null==u.key?$(u.props.children):u,h=j(t,y(P)?P:[P],n,i,r,s,o,l,h,a,c),d.base=n.__e,n.__u&=-161,d.__h.length&&l.push(d),v&&(d.__E=d.__=null)}
vendor: 3,482 bytes, line 1
1catch(t){if(l.length=f,n.__v=null,a||null!=o){if(t.then){for(n.__u|=a?160:128;h&&8==h.nodeType&&h.nextSibling;)h=h.nextSibling;null!=o&&(o[o.indexOf(h)]=null),n.__e=h}else if(null!=o)for(D=o.length;D--;)w(o[D])}else n.__e=i.__e;null==n.__k&&(n.__k=i.__k||[]),t.then||O(n),e.__e(t,n,i)}}else null==o&&n.__v==i.__v?(n.__k=i.__k,n.__e=i.__e):h=n.__e=F(i.__e,n,i,r,s,o,l,a,c);return(u=e.diffed)&&u(n),128&n.__u?void 0:h}function O(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(O))}function U(t,n,i){for(var r=0;r<i.length;r++)R(i[r],i[++r],i[++r]);e.__c&&e.__c(n,t),t.some(function(n){try{t=n.__h,n.__h=[],t.some(function(t){t.call(n)})}catch(t){e.__e(t,n.__v)}})}function $(t){return"object"!=typeof t||null==t||t.__b>0?t:y(t)?t.map($):void 0!==t.constructor?null:x({},t)}function F(n,i,r,s,o,l,h,a,c){var u,f,d,p,_,m,x,b=r.props||g,v=i.props,k=i.type;if("svg"==k?o="http://www.w3.org/2000/svg":"math"==k?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=l)for(u=0;u<l.length;u++)if((_=l[u])&&"setAttribute"in _==!!k&&(k?_.localName==k:3==_.nodeType)){n=_,l[u]=null;break}if(null==n){if(null==k)return document.createTextNode(v);n=document.createElementNS(o,k,v.is&&v),a&&(e.__m&&e.__m(i,l),a=!1),l=null}if(null==k)b===v||a&&n.data==v||(n.data=v);else{if(l="textarea"==k&&null!=v.defaultValue?null:l&&t.call(n.childNodes),!a&&null!=l)for(b={},u=0;u<n.attributes.length;u++)b[(_=n.attributes[u]).name]=_.value;for(u in b)_=b[u],"dangerouslySetInnerHTML"==u?d=_:"children"==u||u in v||"value"==u&&"defaultValue"in v||"checked"==u&&"defaultChecked"in v||L(n,u,null,_,o);for(u in v)_=v[u],"children"==u?p=_:"dangerouslySetInnerHTML"==u?f=_:"value"==u?m=_:"checked"==u?x=_:a&&"function"!=typeof _||b[u]===_||L(n,u,_,b[u],o);if(f)a||d&&(f.__html==d.__html||f.__html==n.innerHTML)||(n.innerHTML=f.__html),i.__k=[];else if(d&&(n.innerHTML=""),j("template"==i.type?n.content:n,y(p)?p:[p],i,r,s,"foreignObject"==k?"http://www.w3.org/1999/xhtml":o,l,h,l?l[0]:r.__k&&S(r,0),a,c),null!=l)for(u=l.length;u--;)w(l[u]);a&&"textarea"!=k||(u="value","progress"==k&&null==m?n.removeAttribute("value"):null!=m&&(m!==n[u]||"progress"==k&&!m||"option"==k&&m!=b[u])&&L(n,u,m,b[u],o),u="checked",null!=x&&x!=n[u]&&L(n,u,x,b[u],o))}return n}function R(t,n,i){try{if("function"==typeof t){var r="function"==typeof t.__u;r&&t.__u(),r&&null==n||(t.__u=t(n))}else t.current=n}catch(t){e.__e(t,i)}}function H(t,n,i){var r,s;if(e.unmount&&e.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||R(r,null,n)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){e.__e(t,n)}r.base=r.__P=r.__n=null}if(r=t.__k)for(s=0;s<r.length;s++)r[s]&&H(r[s],n,i||"function"!=typeof t.type);i||w(t.__e),t.__c=t.__=t.__e=void 0}function q(t,e,n){return this.constructor(t,n)}t=_.slice,e={__e:function(t,e,n,i){for(var r,s,o;e=e.__;)if((r=e.__c)&&!r.__)try{if((s=r.constructor)&&null!=s.getDerivedStateFromError&&(r.setState(s.getDerivedStateFromError(t)),o=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(t,i||{}),o=r.__d),o)return r.__E=r}catch(e){t=e}throw t}},n=0,A.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=x({},this.state),"function"==typeof t&&(t=t(x({},n),this.props)),t&&x(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),N(this))},A.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),N(this))},A.prototype.render=k,i=[],s="function"==typeof Promise?Promise.prototype.then.bind(Prom
1ise.resolve()):setTimeout,o=function(t,e){return t.__v.__b-e.__v.__b},z.__r=0,l=Math.random().toString(8),h="__d"+l,a="__a"+l,c=/(PointerCapture)$|Capture$/i,u=0,f=B(!1),d=B(!0),p=0;var K,W,V,J,G=0,Q=[],X=e,Z=X.__b,Y=X.__r,tt=X.diffed,et=X.__c,nt=X.unmount,it=X.__;function rt(t,e){X.__h&&X.__h(W,t,G||e),G=0;var n=W.__H||(W.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function st(t){return G=1,function(t,e){var n=rt(K++,2);if(n.t=t,!n.__c&&(n.__=[_t(void 0,e),function(t){var e=n.__N?n.__N[0]:n.__[0],i=n.t(e,t);e!==i&&(n.__N=[i,n.__[1]],n.__c.setState({}))}],n.__c=W,!W.__f)){var i=function(t,e,i){if(!n.__c.__H)return!0;var s=!1,o=n.__c.props!==t;if(n.__c.__H.__.some(function(t){if(t.__N){s=!0;var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(o=!0)}}),r){var l=r.call(this,t,e,i);return s?l||o:l}return!s||o};W.__f=!0;var r=W.shouldComponentUpdate,s=W.componentWillUpdate;W.componentWillUpdate=function(t,e,n){if(this.__e){var o=r;r=void 0,i(t,e,n),r=o}s&&s.call(this,t,e,n)},W.shouldComponentUpdate=i}return n.__N||n.__}(_t,t)}function ot(t,e){var n=rt(K++,3);!X.__s&&gt(n.__H,e)&&(n.__=t,n.u=e,W.__H.__h.push(n))}function lt(t){return G=5,ht(function(){return{current:t}},[])}function ht(t,e){var n=rt(K++,7);return gt(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function at(t){var e=W.context[t.__c],n=rt(K++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(W)),e.props.value):t.__}function ct(){for(var t;t=Q.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(dt),e.__h.some(pt),e.__h=[]}catch(n){e.__h=[],X.__e(n,t.__v)}}}X.__b=function(t){W=null,Z&&Z(t)},X.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),it&&it(t,e)},X.__r=function(t){Y&&Y(t),K=0;var e=(W=t.__c).__H;e&&(V===W?(e.__h=[],W.__h=[],e.__.some(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(e.__h.some(dt),e.__h.some(pt),e.__h=[],K=0)),V=W},X.diffed=function(t){tt&&tt(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==Q.push(e)&&J===X.requestAnimationFrame||((J=X.requestAnimationFrame)||ft)(ct)),e.__H.__.some(function(t){t.u&&(t.__H=t.u,t.u=void 0)})),V=W=null},X.__c=function(t,e){e.some(function(t){try{t.__h.some(dt),t.__h=t.__h.filter(function(t){return!t.__||pt(t)})}catch(n){e.some(function(t){t.__h&&(t.__h=[])}),e=[],X.__e(n,t.__v)}}),et&&et(t,e)},X.unmount=function(t){nt&&nt(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(t){try{dt(t)}catch(t){e=t}}),n.__H=void 0,e&&X.__e(e,n.__v))};var ut="function"==typeof requestAnimationFrame;function ft(t){var e,n=function(){clearTimeout(i),ut&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,35);ut&&(e=requestAnimationFrame(n))}function dt(t){var e=W,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),W=e}function pt(t){var e=W;t.__c=t.__(),W=e}function gt(t,e){return!t||t.length!==e.length||e.some(function(e,n){return e!==t[n]})}function _t(t,e){return"function"==typeof e?e(t):e}const mt={showPopup:!1,setShowPopup:t=>{},searchValue:"",setSearchValue:t=>{},filter:"",searchIndex:null,indexStatus:"initial",t:t=>window.Spiritix?.t?.[t]||t,inputRef:null},yt=function(t){function e(t){var n,i;return this.getChildContext||(n=new Set,(i={})[e.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(t){this.props.value!=t.value&&n.forEach(function(t){t.__e=!0,N(t)})},this.sub=function(t){n.add(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n&&n.delete(t),e&&e.call(t)}}),t.children}return e.__c="__cC"+p++,e.__=t,e.Provider=e.__l=(e.Consumer=function(t,e){return t.children(e)}).contextType=e,e}(mt);function xt(t){return b("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",focusable:"false","aria-hidden":"true"}),b("circle",{cx:"11",cy:"11",r:"8"}),b("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}))}function wt(t){return b("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:"24",width:"24",fill:"none",stroke:"currentColor","stroke-width":"2",focusable:"false","aria-hidden":"true"}),b("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"}))}function bt(t){return b("svg",Object.assign({},t,{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:"40px",height:"40px",viewBox:"0 0 40 40","enable-background":"new 0 0 40 40",xmlSpace:"preserve",focusable:"false","aria-hidden":"true"}
1),b("path",{opacity:"0.2",fill:"currentColor",d:"M20.201,5.169c-8.254,0-14.946,6.692-14.946,14.946c0,8.255,6.692,14.946,14.946,14.946s14.946-6.691,14.946-14.946C35.146,11.861,28.455,5.169,20.201,5.169z M20.201,31.749c-6.425,0-11.634-5.208-11.634-11.634c0-6.425,5.209-11.634,11.634-11.634c6.425,0,11.633,5.209,11.633,11.634C31.834,26.541,26.626,31.749,20.201,31.749z"}),b("path",{fill:"currentColor",d:"M26.013,10.047l1.654-2.866c-2.198-1.272-4.743-2.012-7.466-2.012h0v3.312h0C22.32,8.481,24.301,9.057,26.013,10.047z"},b("animateTransform",{attributeType:"xml",attributeName:"transform",type:"rotate",from:"0 20 20",to:"360 20 20",dur:"0.5s",repeatCount:"indefinite"})))}function vt({text:t,highlight:e}){const n=function({text:t,highlight:e}){let n="";e?.split(" ").forEach((t,e)=>{const i=String(t).replace(/\W/g,"\\&");e>0?n+="|^"+i+"|\\s"+i:n="^"+i+"|\\s"+i});const i=new RegExp(`${n}`,"ig");let r=t?.matchAll(i);const s=[];for(const t of r)s.push({startIdx:t?.index,endIdx:(t?.index||0)+(t?.[0].length||0)});return s}({text:t,highlight:e}),i=[];let r=0;return n.forEach(e=>{r===e.startIdx?(i.push({text:t?.slice(e.startIdx,e.endIdx),type:"highlight"}),r=e.endIdx):(i.push({text:t?.slice(r,e.startIdx),type:"normal"}),i.push({text:t?.slice(e.startIdx,e.endIdx),type:"highlight"}),r=e.endIdx)}),r<t?.length&&i.push({text:t?.slice(r,t.length),type:"normal"}),{parts:i,highlightIndexes:n}}function kt({word:t,isExcerpt:e}){return b("span",{className:`font-bold ${!e&&"text-gray-950 dark:text-gray-50"}`},t)}function At({text:t="",highlight:e="",isExcerpt:n=!1}){t=t||"",e=e||"";let{parts:i,highlightIndexes:r}=vt({text:t,highlight:e});if(n&&r?.[0]){const n=r?.[0]?.startIdx;if(n>50){t="..."+t?.slice(n-20);const{parts:r}=vt({text:t,highlight:e});i=r}}const s=i.map((t,e)=>"highlight"===t?.type?b(kt,{key:e,word:t.text,isExcerpt:n}):b("span",{key:e},t.text));return b(k,null,s)}function St({post:t}){const{searchValue:e}=at(yt),{title:n,excerpt:i,url:r}=t;return b("a",{"data-sx-search-item":!0,className:"py-3 -mx-2 sm:-mx-3.5 px-2 sm:px-3.5 cursor-pointer block rounded-xl focus:outline-none \n                hover:bg-gray-50 dark:hover:bg-gray-50/2 focus:bg-gray-100 dark:focus:bg-gray-50/5\n            ",href:r},b("div",{className:"text-base font-medium leading-tight text-gray-900 dark:text-gray-100"},b(At,{text:n,highlight:e,isExcerpt:!1})),b("p",{className:"text-gray-600 dark:text-gray-400 leading-normal text-sm mt-0 mb-0 truncate"},b(At,{text:i,highlight:e,isExcerpt:!0})))}function Ct({posts:t}){const{t:e,filter:n}=at(yt);return t?.length?b("div",{className:"flex flex-col py-3 px-4 sm:px-7 first:border-none border-t border-gray-950/5 dark:border-gray-50/5"},n?null:b("div",{className:"uppercase text-xs text-gray-400 font-semibold mb-1 tracking-wide"},e("Posts")),t?.slice(0,50).map(t=>b(St,{key:t.slug,post:t}))):null}function Et({tag:t}){const{searchValue:e}=at(yt),{name:n,url:i}=t;return b("a",{"data-sx-search-item":!0,className:"py-3 -mx-2 sm:-mx-3.5 px-2 sm:px-3.5 cursor-pointer flex items-center rounded-xl focus:outline-none \n                hover:bg-gray-50 dark:hover:bg-gray-50/2 focus:bg-gray-100 dark:focus:bg-gray-50/5\n            ",href:i},b("p",{className:"me-2 text-sm font-bold text-gray-400"},"#"),b("div",{className:"text-base font-medium leading-tight text-gray-900 dark:text-gray-100 truncate"},b(At,{text:n,highlight:e,isExcerpt:!1})))}function Nt({tags:t}){const{t:e}=at(yt);return t?.length?b("div",{className:"py-3 px-4 sm:px-7 first:border-none border-t border-gray-950/5 dark:border-gray-50/5"},b("div",{className:"uppercase text-xs text-gray-400 font-semibold mb-1 tracking-wide"},e("Tags")),t.map(t=>b(Et,{key:t.slug,tag:t}))):null}function zt({author:t}){const{name:e,profile_image:n}=t,i=e?.charAt(0);return n?.length?b("img",{className:"rounded-full bg-gray-200 dark:bg-gray-800 w-7 h-7 me-2 object-cover",src:n,alt:e}):i?b("div",{className:"rounded-full bg-gray-200 dark:bg-gray-800 w-7 h-7 me-2 flex items-center justify-center font-bold border border-gray-950/5 dark:border-gray-50/5"},b("span",{className:"text-gray-800 dark:text-gray-200"},i)):null}function jt({author:t}){const{searchValue:e}=at(yt),{name:n,url:i}=t;return b("a",{"data-sx-search-item":!0,className:"py-3 -mx-2 sm:-mx-3.5 px-2 sm:px-3.5 cursor-pointer flex items-center rounded-xl focus:outline-none \n                hover:bg-gray-50 dark:hover:bg-gray-50/2 focus:bg-gray-100 dark:focus:bg-gray-50/5\n            ",href:i},b(zt,{author:t}),b("div",{className:"text-base font-medium leading-tight text-gray-900 dark:text-gray-100 truncate"},b(At,{text:n,highlight:e,isExcerpt:!1})))}function It({authors:t}){const{t:e}=at(yt);return t?.length?b("div",{className:"py-3 px-4 sm:px-7 first:border-none border-t border-gray-950/5 dark:border-gray-50/5"},b("div",{className:"uppercase text-xs text-gray-400 font-semibold mb-1 tracking-wide"},e("Authors")),t.map(t=>b(jt,{key:t.slug,author:t}))):null}function Mt({posts:t,authors:e,tags:n}){const i=lt(null);return ot(()=>{const t=t=>{const e=Array.from(i.current?.querySelectorAll("[data-sx-search-item]")||[]);if(document.activeElement?.hasAttribute("data-sx-search-item")){if(document.activeElement?.hasAttribute("data-sx-search-item")){const n=e.findIndex(t=>
1t===document.activeElement),i=e[n-1],r=e[n+1];"ArrowDown"===t.key&&r&&r?.focus(),"ArrowUp"===t.key&&i&&i?.focus()}}else"ArrowDown"===t.key&&e[0]?.focus(),"ArrowUp"===t.key&&e.at(-1)?.focus()};return window.addEventListener("keyup",t),()=>window.removeEventListener("keyup",t)},[]),b("div",{ref:i,className:"scrollbar-width-thin overflow-y-auto max-h-[calc(100vh-172px)] sm:max-h-[70vh] -mt-px"},b(It,{authors:e}),b(Nt,{tags:n}),b(Ct,{posts:t}))}function Pt(){const{searchValue:t="",filter:e,searchIndex:n,indexStatus:i,t:r}=at(yt);let s=[],o=[],l=[];if("completed"===i&&t){const i=n?.search(t||"");o=i?.posts||[],l=e?[]:i?.authors||[],s=e?[]:i?.tags||[]}else if("completed"===i&&!t&&e){const t=n?.sample(50);o=t?.posts||[]}return o?.length||l?.length||s?.length?b(k,null,b("div",{className:"border-t border-gray-950/5 dark:border-gray-50/5"}),b(Mt,{posts:o,authors:l,tags:s})):t&&"completed"===i?b(k,null,b("div",{className:"border-t border-gray-950/5 dark:border-gray-50/5"}),b("div",{className:"py-4 px-7"},b("p",{className:"text-base leading-normal"},r("No matches found")))):"failed"===i?b(k,null,b("div",{className:"border-t border-gray-950/5 dark:border-gray-50/5"}),b("div",{className:"py-4 px-7"},b("p",{className:"text-base leading-normal"},r("Something went wrong, please try again.")))):null}function Dt(){const{setSearchValue:t,searchValue:e="",setShowPopup:n,inputRef:i,indexStatus:r,t:s}=at(yt);return ot(()=>{setTimeout(()=>{i?.current?.focus()},150)},[i]),b("div",{className:"z-10 relative flex items-center py-5 px-4 sm:px-7"},b("div",{className:"flex-none flex items-center justify-center w-6 h-6 me-3"},e?null:b(xt,{className:"flex-none w-6 h-6 text-gray-400 dark:text-gray-500",title:s("Quick search...")}),e?b("button",{className:"relative top-px w-6 h-6",title:s("Clear"),onClick:()=>t("")},b(wt,{className:"flex-none w-6 h-6 text-gray-400 hover:text-gray-950 dark:text-gray-500 dark:hover:text-gray-50 transition-colors"})):null),b("input",{ref:i,value:e||"",onInput:e=>t(e.currentTarget.value),onKeyDown:t=>{"ArrowUp"!==t.key&&"ArrowDown"!==t.key||t.preventDefault()},name:"search",className:"grow -my-4.5 py-4.5 -ms-3 ps-3 text-base leading-7 bg-transparent focus-visible:outline-none placeholder:text-gray-400 dark:placeholder:text-gray-500 outline-none truncate",placeholder:s("Quick search..."),autoComplete:"off"}),!["completed","failed"].includes(r)&&e?b(bt,{className:"flex-none h-7 w-7 ms-1 -me-1"}):null,b("button",{className:"sm:hidden ms-3 text-sm text-gray-500",title:s("Close"),onClick:()=>n(!1)},s("Close")))}function Lt(){const{setShowPopup:t,showPopup:e}=at(yt),n=e=>{e.target===e.currentTarget&&t(!1)};return ot(()=>{const e=e=>{"Escape"===e.key&&t(!1)};return window.addEventListener("keyup",e),()=>window.removeEventListener("keyup",e)},[t]),ot(()=>{const t=document.getElementById("sx-viewport");t?.toggleAttribute("inert",e)},[e]),e?b("div",{className:"fixed z-3999999 top-0 start-0 w-full h-full overflow-hidden has-animation",style:{"--animation-duration":"150ms"},role:"dialog","aria-modal":"true"},b("div",{onClick:n,className:"absolute inset-0 z-0 block bg-black/20 dark:bg-black/50 backdrop-blur-xs animate-fade"}),b("div",{onClick:n,className:"h-screen w-screen pt-20 antialiased z-50 relative px-outer"},b("div",{className:"relative bg-white dark:bg-gray-950 w-full max-w-lg rounded-2xl shadow-pretty dark:shadow-xl m-auto translate-z-0 animate-slide-up"},b("div",{className:"hidden dark:block absolute inset-0 -z-10 rounded-inherit bg-white/5 ring-1 ring-gray-50/10"}),b(Dt,null),b(Pt,null)))):null}
2/**!
3 * FlexSearch.js v0.8.212 (Bundle/Module)
4 * Author and Copyright: Thomas Wilkerling
5 * Licence: Apache-2.0
6 * Hosted by Nextapps GmbH
7 * https://github.com/nextapps-de/flexsearch
8 */var Bt;function Tt(t,e,n){const i=typeof n,r=typeof t;if("undefined"!==i){if("undefined"!==r){if(n){if("function"===r&&i===r)return function(e){return t(n(e))};if((e=t.constructor)===n.constructor){if(e===Array)return n.concat(t);if(e===Map){var s=new Map(n);for(var o of t)s.set(o[0],o[1]);return s}if(e===Set){for(s of(o=new Set(n),t.values()))o.add(s);return o}}}return t}return n}return"undefined"===r?e:t}function Ot(t,e){return void 0===t?e:t}function Ut(){return Object.create(null)}function $t(t){return"string"==typeof t}function Ft(t){return"object"==typeof t}function Rt(t,e){if($t(e))t=t[e];else for(let n=0;t&&n<e.length;n++)t=t[e[n]];return t}const Ht=/[^\p{L}\p{N}]+/u,qt=/(\d{3})/g,Kt=/(\D)(\d{3})/g,Wt=/(\d{3})(\D)/g,Vt=/[\u0300-\u036f]/g;function Jt(t={}){if(!this||this.constructor!==Jt)return new Jt(...arguments);if(arguments.length)for(t=0;t<arguments.length;t++)this.assign(arguments[t]);else this.assign(t)}function Gt(t){t.F=null,t.B.clear(),t.D.clear()}function Qt(t,e,n){n||(e||"object"!=typeof t?"object"==typeof e&&(n=e,e=0):n=t),n&&(t=n.query||t,e=n.limit||e);let i=""+(e||0);n&&(i+=(n.offset||0)+!!n.context+!!n.suggest+(!1!==n.resolve)+(n.resolution||this.resolution)+(n.boost||0)),t=(""+t).toLowerCase(),this.cache||(this.cache=new Xt);let r=this.cache.get(t+i);if(!r){const s=n&&n.cache;s&&(n.cache=!1),r=this.search(t,e,n),s&&(n.cache=s),this.cache.set(t+i,r)}return r}function Xt(t){this.limit=t&&!0!==t?t:1e3,this.cache=new Map,this.h=""}(Bt=Jt.prototype).assign=function(t){this.normalize=Tt(t.normalize,!0,this.normalize);let e,n=t.include,i=n||t.exclude||t.split;if(i||""===i){if("object"==typeof i&&i.constructor!==RegExp){let t="";e=!n,n||(t+="\\p{Z}"),i.letter&&(t+="\\p{L}"),i.number&&(t+="\\p{N}",e=!!n),i.symbol&&(t+="\\p{S}"),i.punctuation&&(t+="\\p{P}"),i.control&&(t+="\\p{C}"),(i=i.char)&&(t+="object"==typeof i?i.join(""):i);try{this.split=new RegExp("["+(n?"^":"")+t+"]+","u")}catch(t){this.split=/\s+/}}else this.split=i,e=!1===i||"a1a".split(i).length<2;this.numeric=Tt(t.numeric,e)}else{try{this.split=Tt(this.split,Ht)}catch(t){this.split=/\s+/}this.numeric=Tt(t.numeric,Tt(this.numeric,!0))}if(this.prepare=Tt(t.prepare,null,this.prepare),this.finalize=Tt(t.finalize,null,this.finalize),i=t.filter,this.filter="function"==typeof i?i:Tt(i&&new Set(i),null,this.filter),this.dedupe=Tt(t.dedupe,!0,this.dedupe),this.matcher=Tt((i=t.matcher)&&new Map(i),null,this.matcher),this.mapper=Tt((i=t.mapper)&&new Map(i),null,this.mapper),this.stemmer=Tt((i=t.stemmer)&&new Map(i),null,this.stemmer),this.replacer=Tt(t.replacer,null,this.replacer),this.minlength=Tt(t.minlength,1,this.minlength),this.maxlength=Tt(t.maxlength,1024,this.maxlength),this.rtl=Tt(t.rtl,!1,this.rtl),(this.cache=i=Tt(t.cache,!0,this.cache))&&(this.F=null,this.L="number"==typeof i?i:2e5,this.B=new Map,this.D=new Map,this.I=this.H=128),this.h="",this.J=null,this.A="",this.K=null,this.matcher)for(const t of this.matcher.keys())this.h+=(this.h?"|":"")+t;
8if(this.stemmer)for(const t of this.stemmer.keys())this.A+=(this.A?"|":"")+t;return this},Bt.addStemmer=function(t,e){return this.stemmer||(this.stemmer=new Map),this.stemmer.set(t,e),this.A+=(this.A?"|":"")+t,this.K=null,this.cache&&Gt(this),this},Bt.addFilter=function(t){return"function"==typeof t?this.filter=t:(this.filter||(this.filter=new Set),this.filter.add(t)),this.cache&&Gt(this),this},Bt.addMapper=function(t,e){return"object"==typeof t?this.addReplacer(t,e):t.length>1?this.addMatcher(t,e):(this.mapper||(this.mapper=new Map),this.mapper.set(t,e),this.cache&&Gt(this),this)},Bt.addMatcher=function(t,e){return"object"==typeof t?this.addReplacer(t,e):t.length<2&&(this.dedupe||this.mapper)?this.addMapper(t,e):(this.matcher||(this.matcher=new Map),this.matcher.set(t,e),this.h+=(this.h?"|":"")+t,this.J=null,this.cache&&Gt(this),this)},Bt.addReplacer=function(t,e){return"string"==typeof t?this.addMatcher(t,e):(this.replacer||(this.replacer=[]),this.replacer.push(t,e),this.cache&&Gt(this),this)},Bt.encode=function(t,e){if(this.cache&&t.length<=this.H)if(this.F){if(this.B.has(t))return this.B.get(t)}else this.F=setTimeout(Gt,50,this);this.normalize&&(t="function"==typeof this.normalize?this.normalize(t):Vt?t.normalize("NFKD").replace(Vt,"").toLowerCase():t.toLowerCase()),this.prepare&&(t=this.prepare(t)),this.numeric&&t.length>3&&(t=t.replace(Kt,"$1 $2").replace(Wt,"$1 $2").replace(qt,"$1 "));const n=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer);let i,r,s=[],o=Ut(),l=this.split||""===this.split?t.split(this.split):[t];for(let t,a,c=0;c<l.length;c++)if((t=a=l[c])&&!(t.length<this.minlength||t.length>this.maxlength)){if(e){if(o[t])continue;o[t]=1}else{if(i===t)continue;i=t}if(n)s.push(t);else if(!this.filter||("function"==typeof this.filter?this.filter(t):!this.filter.has(t))){if(this.cache&&t.length<=this.I)if(this.F){var h=this.D.get(t);if(h||""===h){h&&s.push(h);continue}}else this.F=setTimeout(Gt,50,this);if(this.stemmer){let e;for(this.K||(this.K=new RegExp("(?!^)("+this.A+")$"));e!==t&&t.length>2;)e=t,t=t.replace(this.K,t=>this.stemmer.get(t))}if(t&&(this.mapper||this.dedupe&&t.length>1)){h="";for(let e,n,i=0,r="";i<t.length;i++)e=t.charAt(i),e===r&&this.dedupe||((n=this.mapper&&this.mapper.get(e))||""===n?n===r&&this.dedupe||!(r=n)||(h+=n):h+=r=e);t=h}if(this.matcher&&t.length>1&&(this.J||(this.J=new RegExp("("+this.h+")","g")),t=t.replace(this.J,t=>this.matcher.get(t))),t&&this.replacer)for(h=0;t&&h<this.replacer.length;h+=2)t=t.replace(this.replacer[h],this.replacer[h+1]);if(this.cache&&a.length<=this.I&&(this.D.set(a,t),this.D.size>this.L&&(this.D.clear(),this.I=this.I/1.1|0)),t){if(t!==a)if(e){if(o[t])continue;o[t]=1}else{if(r===t)continue;r=t}s.push(t)}}}return this.finalize&&(s=this.finalize(s)||s),this.cache&&t.length<=this.H&&(this.B.set(t,s),this.B.size>this.L&&(this.B.clear(),this.H=this.H/1.1|0)),s},Xt.prototype.set=function(t,e){this.cache.set(this.h=t,e),this.cache.size>this.limit&&this.cache.delete(this.cache.keys().next().value)},Xt.prototype.get=function(t){const e=this.cache.get(t);return e&&this.h!==t&&(this.cache.delete(t),this.cache.set(this.h=t,e)),e},Xt.prototype.remove=function(t){for(const e of this.cache){const n=e[0];e[1].includes(t)&&this.cache.delete(n)}},Xt.prototype.clear=function(){this.cache.clear(),this.h=""};const Zt={normalize:!1,numeric:!1,dedupe:!1},Yt={},te=new Map([["b","p"],["v","f"],["w","f"],["z","s"],["x","s"],["d","t"],["n","m"],["c","k"],["g","k"],["j","k"],["q","k"],["i","e"],["y","e"],["u","o"]]),ee=new Map([["ae","a"],["oe","o"],["sh","s"],["kh","k"],["th","t"],["ph","f"],["pf","f"]]),ne=[/([^aeo])h(.)/g,"$1$2",/([aeo])h([^aeo]|$)/g,"$1$2",/(.)\1+/g,"$1"],ie={a:"",e:"",i:"",o:"",u:"",y:"",b:1,f:1,p:1,v:1,c:2,g:2,j:2,k:2,q:2,s:2,x:2,z:2,"ß":2,d:3,t:3,l:4,m:5,n:5,r:6};var re={Exact:Zt,Default:Yt,Normalize:Yt,LatinBalance:{mapper:te},LatinAdvanced:{mapper:te,matcher:ee,replacer:ne},LatinExtra:{mapper:te,replacer:ne.concat([/(?!^)[aeo]/g,""]),matcher:ee},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(t){for(let n=0;n<t.length;n++){var e=t[n];let i=e.charAt(0),r=ie[i];for(let t,n=1;n<e.length&&(t=e.charAt(n),"h"===t||"w"===t||!(t=ie[t])||t===r||(i+=t,r=t,4!==i.length));n++);t[n]=i}}},CJK:{split:""},LatinExact:Zt,LatinDefault:Yt,LatinSimple:Yt};function se(t,e,n,i){let r=[];for(let s,o=0;o<t.index.length;o++)if(s=t.index[o],e>=s.length)e-=s.length;else{const o=(e=s[i?"splice":"slice"](e,n)).length;if(o&&(r=r.length?r.concat(e):e,n-=o,i&&(t.length-=o),!n))break;e=0}return r}function oe(t){if(!this||this.constructor!==oe)return new oe(t);this.index=t?[t]:[],this.length=t?t.length:0;const e=this;return new Proxy([],{get:(t,n)=>"length"===n?e.length:"push"===n?function(t){e.index[e.index.length-1].push(t),e.length++}:"pop"===n?function(){if(e.length)return e.length--,e.index[e.index.length-1].pop()}:"indexOf"===n?function(t){let n=0;for(let i,r,s=0;s<e.index.length;s++){if(i=e.index[s],r=i.indexOf(t),r>=0)return n+r;n+=i.length}return-1}:"includes"===n?function(t){for(let n=0;n<e.index.length;n++)if(e.index[n].includes(t))return!0;return!1}
8:"slice"===n?function(t,n){return se(e,t||0,n||e.length,!1)}:"splice"===n?function(t,n){return se(e,t||0,n||e.length,!0)}:"constructor"===n?Array:"symbol"!=typeof n?(t=e.index[n/2**31|0])&&t[n]:void 0,set:(t,n,i)=>(t=n/2**31|0,(e.index[t]||(e.index[t]=[]))[n]=i,e.length++,!0)})}function le(t=8){if(!this||this.constructor!==le)return new le(t);this.index=Ut(),this.h=[],this.size=0,t>32?(this.B=ce,this.A=BigInt(t)):(this.B=ae,this.A=t)}function he(t=8){if(!this||this.constructor!==he)return new he(t);this.index=Ut(),this.h=[],this.size=0,t>32?(this.B=ce,this.A=BigInt(t)):(this.B=ae,this.A=t)}function ae(t){let e=2**this.A-1;if("number"==typeof t)return t&e;let n=0,i=this.A+1;for(let r=0;r<t.length;r++)n=(n*i^t.charCodeAt(r))&e;return 32===this.A?n+2**31:n}function ce(t){let e=BigInt(2)**this.A-BigInt(1);var n=typeof t;if("bigint"===n)return t&e;if("number"===n)return BigInt(t)&e;n=BigInt(0);let i=this.A+BigInt(1);for(let r=0;r<t.length;r++)n=(n*i^BigInt(t.charCodeAt(r)))&e;return n}let ue,fe,de,pe,ge;async function _e(t){var e=(t=t.data).task;const n=t.id;let i=t.args;if("init"===e)fe=t.options||{},(e=t.factory)?(Function("return "+e)()(self),ue=new self.FlexSearch.Index(fe),delete self.FlexSearch):ue=new ln(fe),postMessage({id:n});else{let r;"export"===e&&(i[1]?(i[0]=fe.export,i[2]=0,i[3]=1):i=null),"import"===e?i[0]&&(t=await fe.import.call(ue,i[0]),ue.import(i[0],t)):((r=i&&ue[e].apply(ue,i))&&r.then&&(r=await r),r&&r.await&&(r=await r.await),"search"===e&&r.result&&(r=r.result)),postMessage("search"===e?{id:n,msg:r}:{id:n})}}function me(t){xe.call(t,"add"),xe.call(t,"append"),xe.call(t,"search"),xe.call(t,"update"),xe.call(t,"remove"),xe.call(t,"searchCache")}function ye(){de=ge=0}function xe(t){this[t+"Async"]=function(){const e=arguments;var n=e[e.length-1];let i;if("function"==typeof n&&(i=n,delete e[e.length-1]),de?ge||(ge=Date.now()-pe>=this.priority*this.priority*3):(de=setTimeout(ye,0),pe=Date.now()),ge){const n=this;return new Promise(i=>{setTimeout(function(){i(n[t+"Async"].apply(n,e))},0)})}const r=this[t].apply(this,e);return n=r.then?r:new Promise(t=>t(r)),i&&n.then(i),n}}oe.prototype.clear=function(){this.index.length=0},oe.prototype.push=function(){},le.prototype.get=function(t){const e=this.index[this.B(t)];return e&&e.get(t)},le.prototype.set=function(t,e){var n=this.B(t);let i=this.index[n];i?(n=i.size,i.set(t,e),(n-=i.size)&&this.size++):(this.index[n]=i=new Map([[t,e]]),this.h.push(i),this.size++)},he.prototype.add=function(t){var e=this.B(t);let n=this.index[e];n?(e=n.size,n.add(t),(e-=n.size)&&this.size++):(this.index[e]=n=new Set([t]),this.h.push(n),this.size++)},(Bt=le.prototype).has=he.prototype.has=function(t){const e=this.index[this.B(t)];return e&&e.has(t)},Bt.delete=he.prototype.delete=function(t){const e=this.index[this.B(t)];e&&e.delete(t)&&this.size--},Bt.clear=he.prototype.clear=function(){this.index=Ut(),this.h=[],this.size=0},Bt.values=he.prototype.values=function*(){for(let t=0;t<this.h.length;t++)for(let e of this.h[t].values())yield e},Bt.keys=he.prototype.keys=function*(){for(let t=0;t<this.h.length;t++)for(let e of this.h[t].keys())yield e},Bt.entries=he.prototype.entries=function*(){for(let t=0;t<this.h.length;t++)for(let e of this.h[t].entries())yield e};let we=0;function be(t={},e){function n(n){function o(t){const e=(t=t.data||t).id,n=e&&s.h[e];n&&(n(t.msg),delete s.h[e])}if(this.worker=n,this.h=Ut(),this.worker)return r?this.worker.on("message",o):this.worker.onmessage=o,t.config?new Promise(function(e){we>1e9&&(we=0),s.h[++we]=function(){e(s)},s.worker.postMessage({id:we,task:"init",factory:i,options:t})}):(this.priority=t.priority||4,this.encoder=e||null,this.worker.postMessage({task:"init",factory:i,options:t}),this)}if(!this||this.constructor!==be)return new be(t);let i="undefined"!=typeof self?self._factory:"undefined"!=typeof window?window._factory:null;i&&(i=i.toString());const r="undefined"==typeof window,s=this,o=function(t,e,n){return e?"undefined"!=typeof module?new(require("worker_threads").Worker)(__dirname+"/worker/node.js"):import("worker_threads").then(function(t){return new t.Worker(import.meta.dirname+"/node/node.mjs")}):t?new window.Worker(URL.createObjectURL(new Blob(["onmessage="+_e.toString()],{t
8ype:"text/javascript"}))):new window.Worker("string"==typeof n?n:import.meta.url.replace("/worker.js","/worker/worker.js").replace("flexsearch.bundle.module.min.js","module/worker/worker.js").replace("flexsearch.bundle.module.min.mjs","module/worker/worker.js"),{type:"module"})}(i,r,t.worker);return o.then?o.then(function(t){return n.call(s,t)}):n.call(this,o)}function ve(t){be.prototype[t]=function(){const e=this,n=[].slice.call(arguments);var i=n[n.length-1];let r;return"function"==typeof i&&(r=i,n.pop()),i=new Promise(function(i){"export"===t&&"function"==typeof n[0]&&(n[0]=null),we>1e9&&(we=0),e.h[++we]=i,e.worker.postMessage({task:t,id:we,args:n})}),r?(i.then(r),this):i}}function ke(t,e,n,i,r,s){if(t=t[r],i===n.length-1)e[r]=s||t;else if(t)if(t.constructor===Array)for(e=e[r]=Array(t.length),r=0;r<t.length;r++)ke(t,e,n,i,r);else e=e[r]||(e[r]=Ut()),r=n[++i],ke(t,e,n,i,r)}function Ae(t,e,n,i,r,s,o,l){if(t=t[o])if(i===e.length-1){if(t.constructor===Array){if(n[i]){for(e=0;e<t.length;e++)r.add(s,t[e],!0,!0);return}t=t.join(" ")}r.add(s,t,l,!0)}else if(t.constructor===Array)for(o=0;o<t.length;o++)Ae(t,e,n,i,r,s,o,l);else o=e[++i],Ae(t,e,n,i,r,s,o,l)}function Se(t,e,n,i){if(!t.length)return t;if(1===t.length)return t=t[0],t=n||t.length>e?t.slice(n,n+e):t,i?$e.call(this,t):t;let r=[];for(let s,o,l=0;l<t.length;l++)if((s=t[l])&&(o=s.length)){if(n){if(n>=o){n-=o;continue}s=s.slice(n,n+e),o=s.length,n=0}if(o>e&&(s=s.slice(0,e),o=e),!r.length&&o>=e)return i?$e.call(this,s):s;if(r.push(s),!(e-=o))break}return r=r.length>1?[].concat.apply([],r):r[0],i?$e.call(this,r):r}function Ce(t,e,n,i){var r=i[0];if(r[0]&&r[0].query)return t[e].apply(t,r);if(!("and"!==e&&"not"!==e||t.result.length||t.await||r.suggest))return i.length>1&&(r=i[i.length-1]),(i=r.resolve)?t.await||t.result:t;let s,o,l,h,a,c=[],u=0,f=0;for(e=0;e<i.length;e++)if(r=i[e]){var d=void 0;if(r.constructor===Pe)d=r.await||r.result;else if(r.then||r.constructor===Array)d=r;else{u=r.limit||0,f=r.offset||0,l=r.suggest,o=r.resolve,s=((h=r.highlight||t.highlight)||r.enrich)&&o,d=r.queue;let n=r.async||d,i=r.index,p=r.query;if(i?t.index||(t.index=i):i=t.index,p||r.tag){const s=r.field||r.pluck;if(s&&(!p||t.query&&!h||(t.query=p,t.field=s,t.highlight=h),i=i.index.get(s)),d&&(a||t.await)){let s;a=1;const o=t.C.length,l=new Promise(function(t){s=t});(function(e,i){l.h=function(){i.index=null,i.resolve=!1;let r=n?e.searchAsync(i):e.search(i);return r.then?r.then(function(e){return t.C[o]=e=e.result||e,s(e),e}):(r=r.result||r,s(r),r)}})(i,Object.assign({},r)),t.C.push(l),c[e]=l;continue}r.resolve=!1,r.index=null,d=n?i.searchAsync(r):i.search(r),r.resolve=o,r.index=i}else if(r.and)d=Ee(r,"and",i);else if(r.or)d=Ee(r,"or",i);else if(r.not)d=Ee(r,"not",i);else{if(!r.xor)continue;d=Ee(r,"xor",i)}}d.await?(a=1,d=d.await):d.then?(a=1,d=d.then(function(t){return t.result||t})):d=d.result||d,c[e]=d}if(a&&!t.await&&(t.await=new Promise(function(e){t.return=e})),a){const e=Promise.all(c).then(function(i){for(let r=0;r<t.C.length;r++)if(t.C[r]===e){t.C[r]=function(){return n.call(t,i,u,f,s,o,l,h)};break}De(t)});t.C.push(e)}else{if(!t.await)return n.call(t,c,u,f,s,o,l,h);t.C.push(function(){return n.call(t,c,u,f,s,o,l,h)})}return o?t.await||t.result:t}function Ee(t,e,n){const i=(t=t[e])[0]||t;return i.index||(i.index=n),n=new Pe(i),t.length>1&&(n=n[e].apply(n,t.slice(1))),n}function Ne(t,e,n,i,r,s,o){return t.length&&(this.result.length&&t.push(this.result),t.length<2?this.result=t[0]:(this.result=Be(t,e,n,!1,this.h),n=0)),r&&(this.await=null),r?this.resolve(e,n,i,o):this}function ze(t,e,n,i,r,s,o){if(!s&&!this.result.length)return r?this.result:this;let l;if(t.length)if(this.result.length&&t.unshift(this.result),t.length<2)this.result=t[0];else{let i=0;for(let e,n,r=0;r<t.length;r++)if((e=t[r])&&(n=e.length))i<n&&(i=n);else if(!s){i=0;break}i?(this.result=Le(t,i,e,n,s,this.h,r),l=!0):this.result=[]}else s||(this.result=t);return r&&(this.await=null),r?this.resolve(e,n,i,o,l):this}function je(t,e,n,i,r,s,o){if(t.length)if(this.result.length&&t.unshift(this.result),t.length<2)this.result=t[0];else{t:{s=n;var l=this.h;const i=[],o=Ut();let h=0;
8for(let e,n=0;n<t.length;n++)if(e=t[n]){h<e.length&&(h=e.length);for(let t,n=0;n<e.length;n++)if(t=e[n])for(let e,n=0;n<t.length;n++)e=t[n],o[e]=o[e]?2:1}for(let n,a=0,c=0;a<h;a++)for(let h,u=0;u<t.length;u++)if((h=t[u])&&(n=h[a]))for(let h,f=0;f<n.length;f++)if(h=n[f],1===o[h])if(s)s--;else if(r){if(i.push(h),i.length===e){t=i;break t}}else{const n=a+(u?l:0);if(i[n]||(i[n]=[]),i[n].push(h),++c===e){t=i;break t}}t=i}this.result=t,l=!0}else s||(this.result=t);return r&&(this.await=null),r?this.resolve(e,n,i,o,l):this}function Ie(t,e,n,i,r,s,o){if(!s&&!this.result.length)return r?this.result:this;if(t.length&&this.result.length){t:{s=n;var l=[];t=new Set(t.flat().flat());for(let n,i=0,o=0;i<this.result.length;i++)if(n=this.result[i])for(let h,a=0;a<n.length;a++)if(h=n[a],!t.has(h))if(s)s--;else if(r){if(l.push(h),l.length===e){t=l;break t}}else if(l[i]||(l[i]=[]),l[i].push(h),++o===e){t=l;break t}t=l}this.result=t,l=!0}return r&&(this.await=null),r?this.resolve(e,n,i,o,l):this}function Me(t,e,n,i,r){let s,o,l;"string"==typeof r?(s=r,r=""):s=r.template,o=s.indexOf("$1"),l=s.substring(o+2),o=s.substring(0,o);let h=r&&r.boundary,a=!r||!1!==r.clip,c=r&&r.merge&&l&&o&&new RegExp(l+" "+o,"g");var u=0;if("object"==typeof(r=r&&r.ellipsis)){var f=r.template;u=f.length-2,r=r.pattern}let d,p;"string"!=typeof r&&(r=!1===r?"":"..."),u&&(r=f.replace("$1",r)),f=r.length-u,"object"==typeof h&&(d=h.before,0===d&&(d=-1),p=h.after,0===p&&(p=-1),h=h.total||9e5),u=new Map;for(let P,D,L,B=0;B<e.length;B++){let T;if(i)T=e,L=i;else{var g=e[B];if(L=g.field,!L)continue;T=g.result}D=n.get(L),P=D.encoder,"string"!=typeof(g=u.get(P))&&(g=P.encode(t),u.set(P,g));for(let t=0;t<T.length;t++){var _=T[t].doc;if(!_)continue;if(!(_=Rt(_,L)))continue;var m=_.trim().split(/\s+/);if(!m.length)continue;_="";var y=[];let e=[];for(var x=-1,w=-1,b=0,v=0;v<m.length;v++){var k=m[v],A=P.encode(k);let t;if((A=A.length>1?A.join(" "):A[0])&&k){for(var S=k.length,C=(P.split?k.replace(P.split,""):k).length-A.length,E="",N=0,z=0;z<g.length;z++){var j=g[z];if(j){var I=j.length;I+=C<0?0:C,N&&I<=N||(j=A.indexOf(j))>-1&&(E=(j?k.substring(0,j):"")+o+k.substring(j,j+I)+l+(j+I<S?k.substring(j+I):""),N=I,t=!0)}}E&&(h&&(x<0&&(x=_.length+(_?1:0)),w=_.length+(_?1:0)+E.length,b+=S,e.push(y.length),y.push({match:E})),_+=(_?" ":"")+E)}if(t){if(h&&b>=h)break}else _+=(_?" ":"")+(k=m[v]),h&&y.push({text:k})}if(b=e.length*(s.length-2),d||p||h&&_.length-b>h)if(v=w-x,d>0&&(v+=d),p>0&&(v+=p),v<=(b=h+b-2*f))m=d?x-(d>0?d:0):x-((b-v)/2|0),y=p?w+(p>0?p:0):m+b,a||(m>0&&" "!==_.charAt(m)&&" "!==_.charAt(m-1)&&((m=_.indexOf(" ",m))<0&&(m=0)),y<_.length&&" "!==_.charAt(y-1)&&" "!==_.charAt(y)&&((y=_.lastIndexOf(" ",y))<w?y=w:++y)),_=(m?r:"")+_.substring(m,y)+(y<_.length?r:"");else{for(w=[],x={},b={},v={},k={},A={},E=C=S=0,z=N=1;;){var M=void 0;for(let t,n=0;n<e.length;n++){if(t=e[n],E)if(C!==E){if(v[n+1])continue;if(t+=E,x[t]){S-=f,b[n+1]=1,v[n+1]=1;continue}if(t>=y.length-1){if(t>=y.length){v[n+1]=1,t>=m.length&&(b[n+1]=1);continue}S-=f}if(_=y[t].text,I=p&&A[n]){if(!(I>0)){v[n+1]=1;continue}if(_.length>I){if(v[n+1]=1,!a)continue;_=_.substring(0,I)}(I-=_.length)||(I=-1),A[n]=I}if(S+_.length+1<=h)_=" "+_,w[n]+=_;else{if(!a){v[n+1]=1;continue}(M=h-S-1)>0&&(_=" "+_.substring(0,M),w[n]+=_),v[n+1]=1}}else{if(v[n])continue;if(t-=C,x[t]){S-=f,v[n]=1,b[n]=1;continue}if(t<=0){if(t<0){v[n]=1,b[n]=1;continue}S-=f}if(_=y[t].text,I=d&&k[n]){if(!(I>0)){v[n]=1;continue}if(_.length>I){if(v[n]=1,!a)continue;_=_.substring(_.length-I)}(I-=_.length)||(I=-1),k[n]=I}if(S+_.length+1<=h)_+=" ",w[n]=_+w[n];else{if(!a){v[n]=1;continue}(M=_.length+1-(h-S))>=0&&M<_.length&&(_=_.substring(M)+" ",w[n]=_+w[n]),v[n]=1}}else{let e;if(_=y[t].match,d&&(k[n]=d),p&&(A[n]=p),n&&S++,t?!n&&f&&(S+=f):(b[n]=1,v[n]=1),t>=m.length-1||t<y.length-1&&y[t+1].match?e=1:f&&(S+=f),S-=s.length-2,n&&!(S+_.length<=h)){M=N=z=b[n]=0;break}w[n]=_,e&&(b[n+1]=1,v[n+1]=1)}S+=_.length,M=x[t]=1}if(M)C===E?E++:C++;else{if(C===E?N=0:z=0,!N&&!z)break;N?E=++C:E++}}_="";for(let t,e=0;e<w.length;e++)t=(b[e]?e?" ":"":(e&&!r?" ":"")+r)+w[e],_+=t;r&&!b[w.length]&&(_+=r)}c&&(_=_.replace(c," ")),T[t].highlight=_}if(i)break}return e}function Pe(t,e){if(!this||this.constructor!==Pe)return new Pe(t,e);let n,i,r,s,o,l,h=0;if(t&&t.index){const n=t;
8if(e=n.index,h=n.boost||0,i=n.query){r=n.field||n.pluck,s=n.highlight;const i=n.resolve;t=n.async||n.queue,n.resolve=!1,n.index=null,t=t?e.searchAsync(n):e.search(n),n.resolve=i,n.index=e,t=t.result||t}else t=[]}if(t&&t.then){const e=this;t=t.then(function(t){e.C[0]=e.result=t.result||t,De(e)}),n=[t],t=[],o=new Promise(function(t){l=t})}this.index=e||null,this.result=t||[],this.h=h,this.C=n||[],this.await=o||null,this.return=l||null,this.highlight=s||null,this.query=i||"",this.field=r||""}function De(t,e){let n=t.result;var i=t.await;t.await=null;for(let e,r=0;r<t.C.length;r++)if(e=t.C[r])if("function"==typeof e)n=e(),t.C[r]=n=n.result||n,r--;else if(e.h)n=e.h(),t.C[r]=n=n.result||n,r--;else if(e.then)return t.await=i;return i=t.return,t.C=[],t.return=null,e||i(n),n}function Le(t,e,n,i,r,s,o){const l=t.length;let h,a,c=[];h=Ut();for(let u,f,d,p,g=0;g<e;g++)for(let e=0;e<l;e++)if(d=t[e],g<d.length&&(u=d[g]))for(let t=0;t<u.length;t++){if(f=u[t],(a=h[f])?h[f]++:(a=0,h[f]=1),p=c[a]||(c[a]=[]),!o){let t=g+(e||!r?0:s||0);p=p[t]||(p[t]=[])}if(p.push(f),o&&n&&a===l-1&&p.length-i===n)return i?p.slice(i):p}if(t=c.length)if(r)c=c.length>1?Be(c,n,i,o,s):(c=c[0])&&n&&c.length>n||i?c.slice(i,n+i):c;else{if(t<l)return[];if(c=c[t-1],n||i)if(o)(c.length>n||i)&&(c=c.slice(i,n+i));else{r=[];for(let t,e=0;e<c.length;e++)if(t=c[e])if(i&&t.length>i)i-=t.length;else if((n&&t.length>n||i)&&(t=t.slice(i,n+i),n-=t.length,i&&(i-=t.length)),r.push(t),!n)break;c=r}}return c}function Be(t,e,n,i,r){const s=[],o=Ut();let l;var h=t.length;let a;if(i){for(r=h-1;r>=0;r--)if(a=(i=t[r])&&i.length)for(h=0;h<a;h++)if(l=i[h],!o[l])if(o[l]=1,n)n--;else if(s.push(l),s.length===e)return s}else for(let c,u=h-1,f=0;u>=0;u--){c=t[u];for(let t=0;t<c.length;t++)if(a=(i=c[t])&&i.length)for(let c=0;c<a;c++)if(l=i[c],!o[l])if(o[l]=1,n)n--;else{let n=(t+(u<h-1&&r||0))/(u+1)|0;if((s[n]||(s[n]=[])).push(l),++f===e)return s}}return s}function Te(t,e,n,i,r){const s=Ut(),o=[];for(let t,n=0;n<e.length;n++){t=e[n];for(let e=0;e<t.length;e++)s[t[e]]=1}if(r){for(let e,r=0;r<t.length;r++)if(e=t[r],s[e])if(i)i--;else if(o.push(e),s[e]=0,n&&0===--n)break}else for(let n,i,r=0;r<t.result.length;r++)for(n=t.result[r],e=0;e<n.length;e++)i=n[e],s[i]&&((o[r]||(o[r]=[])).push(i),s[i]=0);return o}function Oe(t){const e=[],n=Ut(),i=Ut();for(let r,s,o,l,h,a,c,u=0;u<t.length;u++){r=t[u],s=r.field,o=r.result;for(let t=0;t<o.length;t++)h=o[t],"object"!=typeof h?h={id:l=h}:l=h.id,(a=n[l])?a.push(s):(h.field=n[l]=[s],e.push(h)),(c=h.highlight)&&(a=i[l],a||(i[l]=a={},h.highlight=a),a[s]=c)}return e}function Ue(t,e,n,i,r){return(t=this.tag.get(t))&&(t=t.get(e))?((e=t.length-i)>0&&((n&&e>n||i)&&(t=t.slice(i,i+n)),r&&(t=$e.call(this,t))),t):[]}function $e(t){if(!this||!this.store)return t;if(this.db)return this.index.get(this.field[0]).db.enrich(t);const e=Array(t.length);for(let n,i=0;i<t.length;i++)n=t[i],e[i]={id:n,doc:this.store.get(n)};return e}function Fe(t){if(!this||this.constructor!==Fe)return new Fe(t);const e=t.document||t.doc||t;let n,i;if(this.B=[],this.field=[],this.D=[],this.key=(n=e.key||e.id)&&He(n,this.D)||"id",(i=t.keystore||0)&&(this.keystore=i),this.fastupdate=!!t.fastupdate,this.reg=!this.fastupdate||t.worker||t.db?i?new he(i):new Set:i?new le(i):new Map,this.h=(n=e.store||null)&&n&&!0!==n&&[],this.store=n?i?new le(i):new Map:null,this.cache=(n=t.cache||null)&&new Xt(n),t.cache=!1,this.worker=t.worker||!1,this.priority=t.priority||4,this.index=Re.call(this,t,e),this.tag=null,(n=e.tag)&&("string"==typeof n&&(n=[n]),n.length)){this.tag=new Map,this.A=[],this.F=[];for(let t,e,i=0;i<n.length;i++){if(t=n[i],e=t.field||t,!e)throw Error("The tag field from the document descriptor is undefined.");t.custom?this.A[i]=t.custom:(this.A[i]=He(e,this.D),t.filter&&("string"==typeof this.A[i]&&(this.A[i]=new String(this.A[i])),this.A[i].G=t.filter)),this.F[i]=e,this.tag.set(e,new Map)}}if(this.worker){this.fastupdate=!1,t=[];for(const e of this.index.values())e.then&&t.push(e);if(t.length){const e=this;return Promise.all(t).then(function(t){let n=0;for(const i of e.index.entries()){const r=i[0];let s=i[1];s.then&&(s=t[n],e.index.set(r,s),n++)}return e})}}else t.db&&(this.fastupdate=!1,this.mount(t.db))}function Re(t,e){const n=new Map;let i=e.index||e.field||e;$t(i)&&(i=[i]);for(let e,s,o=0;o<i.length;o++){if(e=i[o],$t(e)||(s=e,e=e.field),s=Ft(s)?Object.assign({},t,s):t,this.worker){var r=void 0;r=new be(s,r=(r=s.encoder)&&r.encode?r:new Jt("string"==typeof r?re[r]:r||{})),n.set(e,r)}this.worker||n.set(e,new ln(s,this.reg)),s.custom?this.B[o]=s.custom:(this.B[o]=He(e,this.D),s.filter&&("string"==typeof this.B[o]&&(this.B[o]=new String(this.B[o])),this.B[o].G=s.filter)),this.field[o]=e}if(this.h){$t(t=e.store)&&(t=[t]);
8for(let e,n,i=0;i<t.length;i++)e=t[i],n=e.field||e,e.custom?(this.h[i]=e.custom,e.custom.O=n):(this.h[i]=He(n,this.D),e.filter&&("string"==typeof this.h[i]&&(this.h[i]=new String(this.h[i])),this.h[i].G=e.filter))}return n}function He(t,e){const n=t.split(":");let i=0;for(let r=0;r<n.length;r++)"]"===(t=n[r])[t.length-1]&&(t=t.substring(0,t.length-2))&&(e[i]=!0),t&&(n[i++]=t);return i<n.length&&(n.length=i),i>1?n:n[0]}function qe(t,e=0){let n=[],i=[];e&&(e=25e4/e*5e3|0);for(const r of t.entries())i.push(r),i.length===e&&(n.push(i),i=[]);return i.length&&n.push(i),n}function Ke(t,e){e||(e=new Map);for(let n,i=0;i<t.length;i++)n=t[i],e.set(n[0],n[1]);return e}function We(t,e=0){let n=[],i=[];e&&(e=25e4/e*1e3|0);for(const r of t.entries())i.push([r[0],qe(r[1])[0]||[]]),i.length===e&&(n.push(i),i=[]);return i.length&&n.push(i),n}function Ve(t,e){e||(e=new Map);for(let n,i,r=0;r<t.length;r++)n=t[r],i=e.get(n[0]),e.set(n[0],Ke(n[1],i));return e}function Je(t){let e=[],n=[];for(const i of t.keys())n.push(i),25e4===n.length&&(e.push(n),n=[]);return n.length&&e.push(n),e}function Ge(t,e){e||(e=new Set);for(let n=0;n<t.length;n++)e.add(t[n]);return e}function Qe(t,e,n,i,r,s,o=0){const l=i&&i.constructor===Array;var h=l?i.shift():i;if(!h)return this.export(t,e,r,s+1);if((h=t((e?e+".":"")+(o+1)+"."+n,JSON.stringify(h)))&&h.then){const a=this;return h.then(function(){return Qe.call(a,t,e,n,l?i:null,r,s,o+1)})}return Qe.call(this,t,e,n,l?i:null,r,s,o+1)}function Xe(t,e){let n="";for(const i of t.entries()){t=i[0];const r=i[1];let s="";for(let t,n=0;n<r.length;n++){t=r[n]||[""];let i="";for(let n=0;n<t.length;n++)i+=(i?",":"")+("string"===e?'"'+t[n]+'"':t[n]);i="["+i+"]",s+=(s?",":"")+i}s='["'+t+'",['+s+"]]",n+=(n?",":"")+s}return n}function Ze(t,e){let n=0;var i=void 0===e;if(t.constructor===Array){for(let r,s,o,l=0;l<t.length;l++)if((r=t[l])&&r.length){if(i)return 1;if(s=r.indexOf(e),s>=0){if(r.length>1)return r.splice(s,1),1;if(delete t[l],n)return 1;o=1}else{if(o)return 1;n++}}}else for(let r of t.entries())i=r[0],Ze(r[1],e)?n++:t.delete(i);return n}ve("add"),ve("append"),ve("search"),ve("update"),ve("remove"),ve("clear"),ve("export"),ve("import"),be.prototype.searchCache=Qt,me(be.prototype),Fe.prototype.add=function(t,e,n){if(Ft(t)&&(t=Rt(e=t,this.key)),e&&(t||0===t)){if(!n&&this.reg.has(t))return this.update(t,e);for(let s,o=0;o<this.field.length;o++){s=this.B[o];var i=this.index.get(this.field[o]);if("function"==typeof s){var r=s(e);r&&i.add(t,r,n,!0)}else(!(r=s.G)||r(e))&&(s.constructor===String?s=[""+s]:$t(s)&&(s=[s]),Ae(e,s,this.D,0,i,t,s[0],n))}if(this.tag)for(i=0;i<this.A.length;i++){var s=this.A[i];r=this.tag.get(this.F[i]);let l=Ut();if("function"==typeof s){if(!(s=s(e)))continue}else{var o=s.G;if(o&&!o(e))continue;s.constructor===String&&(s=""+s),s=Rt(e,s)}if(r&&s){$t(s)&&(s=[s]);for(let e,i,h=0;h<s.length;h++)if(e=s[h],!l[e]&&(l[e]=1,(o=r.get(e))?i=o:r.set(e,i=[]),!n||!i.includes(t))){if(i.length===2**31-1){if(o=new oe(i),this.fastupdate)for(let t of this.reg.values())t.includes(i)&&(t[t.indexOf(i)]=o);r.set(e,i=o)}i.push(t),this.fastupdate&&((o=this.reg.get(t))?o.push(i):this.reg.set(t,[i]))}}}if(this.store&&(!n||!this.store.has(t))){let i;if(this.h){i=Ut();for(let t,r=0;r<this.h.length;r++){if(t=this.h[r],(n=t.G)&&!n(e))continue;let s;if("function"==typeof t){if(s=t(e),!s)continue;t=[t.O]}else if($t(t)||t.constructor===String){i[t]=e[t];continue}ke(e,i,t,0,t[0],s)}}this.store.set(t,i||e)}this.worker&&(this.fastupdate||this.reg.add(t))}return this},Pe.prototype.or=function(){return Ce(this,"or",Ne,arguments)},Pe.prototype.and=function(){return Ce(this,"and",ze,arguments)},Pe.prototype.xor=function(){return Ce(this,"xor",je,arguments)},Pe.prototype.not=function(){return Ce(this,"not",Ie,arguments)},(Bt=Pe.prototype).limit=function(t){if(this.await){const e=this;this.C.push(function(){return e.limit(t).result})}else if(this.result.length){const e=[];for(let n,i=0;i<this.result.length;i++)if(n=this.result[i]){if(!(n.length<=t)){e[i]=n.slice(0,t);break}if(e[i]=n,!(t-=n.length))break}this.result=e}return this},Bt.offset=function(t){if(this.await){const e=this;this.C.push(function(){return e.offset(t).result})}else if(this.result.length){const e=[];for(let n,i=0;i<this.result.length;i++)(n=this.result[i])&&(n.length<=t?t-=n.length:(e[i]=n.slice(t),t=0));this.result=e}return this},Bt.boost=function(t){if(this.await){const e=this;this.C.push(function(){return e.boost(t).result})}else this.h+=t;return this},Bt.resolve=function(t,e,n,i,r){let s=this.await?De(this,!0):this.result;if(s.then){const o=this;return s.then(function(){return o.resolve(t,e,n,i,r)})}return s.length&&("object"==typeof t?(i=t.highlight||this.highlight,n=!!i||t.enrich,e=t.offset,t=t.limit):(i=i||this.highlight,n=!!i||n),s=r?n?$e.call(this.index,s):s:Se.call(this.index,s,t||100,e,n)),this.finalize(s,i)},Bt.finalize=function(t,e){if(t.then){const n=this;return t.then(function(t){return n.finalize(t,e)})}e&&t.length&&this.query&&(t=Me(this.query,t,this.index.index,this.field,e));const n=this.return;return this.highlight=this.index=this.result=this.C=this.await=this.return=null,this.query=this.field="",n&&n(t),t},Fe.prototype.search=function(t,e,n,i){n||(!e&&Ft(t)?(n=t,t=""):Ft(e)&&(n=e,e=0));let r=[];var s=[];let o,l,h,a,c,u,f,d,p=0,g=!0;if(n){n.constructor===Array&&(n={index:n}),t=n.query||t,o=n.pluck,l=n.merge,a=n.boost,u=o||n.field||(u=n.index)&&(u.index?null:u);var _=this.tag&&n.tag;h=n.suggest,g=!1!==n.resolve,c=n.cache,f=g&&this.store&&n.highlight;var m=!!f||g&&this.store&&n.enrich;e=n.limit||e;var y=n.offset||0;if(e||(e=g?100:0),_&&(!this.db||!i)){_.constructor!==Array&&(_=[_]);var x=[];for(let t,e=0;e<_.length;e++)if(t=_[e],t.field&&t.tag){var w=t.tag;if(w.constructor===Array)for(var b=0;b<w.length;b++)x.push(t.field,w[b]);else x.push(t.field,w)}else{w=Object.keys(t);
8for(let e,n,i=0;i<w.length;i++)if(e=w[i],n=t[e],n.constructor===Array)for(b=0;b<n.length;b++)x.push(e,n[b]);else x.push(e,n)}if(_=x,!t){if(s=[],x.length)for(_=0;_<x.length;_+=2){if(this.db){if(!(i=this.index.get(x[_])))continue;s.push(i=i.db.tag(x[_+1],e,y,m))}else i=Ue.call(this,x[_],x[_+1],e,y,m);r.push(g?{field:x[_],tag:x[_+1],result:i}:[i])}if(s.length){const t=this;return Promise.all(s).then(function(e){for(let t=0;t<e.length;t++)g?r[t].result=e[t]:r[t]=e[t];return g?r:new Pe(r.length>1?Le(r,1,0,0,h,a):r[0],t)})}return g?r:new Pe(r.length>1?Le(r,1,0,0,h,a):r[0],this)}}g||o||!(u=u||this.field)||($t(u)?o=u:(u.constructor===Array&&1===u.length&&(u=u[0]),o=u.field||u.index)),u&&u.constructor!==Array&&(u=[u])}u||(u=this.field),x=(this.worker||this.db)&&!i&&[];for(let o,l,a,k=0;k<u.length;k++){if(l=u[k],this.db&&this.tag&&!this.B[k])continue;let A;if($t(l)||(A=l,l=A.field,t=A.query||t,e=Ot(A.limit,e),y=Ot(A.offset,y),h=Ot(A.suggest,h),f=g&&this.store&&Ot(A.highlight,f),m=!!f||g&&this.store&&Ot(A.enrich,m),c=Ot(A.cache,c)),i)o=i[k];else{b=(w=A||n||{}).enrich;var v=this.index.get(l);if(_&&(this.db&&(w.tag=_,w.field=u,d=v.db.support_tag_search),!d&&b&&(w.enrich=!1),d||(w.limit=0,w.offset=0)),o=c?v.searchCache(t,_&&!d?0:e,w):v.search(t,_&&!d?0:e,w),_&&!d&&(w.limit=e,w.offset=y),b&&(w.enrich=b),x){x[k]=o;continue}}if(a=(o=o.result||o)&&o.length,_&&a){if(w=[],b=0,this.db&&i){if(!d)for(v=u.length;v<i.length;v++){let t=i[v];if(t&&t.length)b++,w.push(t);else if(!h)return g?r:new Pe(r,this)}}else for(let t,e,n=0;n<_.length;n+=2){if(t=this.tag.get(_[n]),!t){if(h)continue;return g?r:new Pe(r,this)}if(e=(t=t&&t.get(_[n+1]))&&t.length)b++,w.push(t);else if(!h)return g?r:new Pe(r,this)}if(b){if(o=Te(o,w,e,y,g),a=o.length,!a&&!h)return g?o:new Pe(o,this);b--}}if(a)s[p]=l,r.push(o),p++;else if(1===u.length)return g?r:new Pe(r,this)}if(x){if(this.db&&_&&_.length&&!d)for(m=0;m<_.length;m+=2){if(!(s=this.index.get(_[m]))){if(h)continue;return g?r:new Pe(r,this)}x.push(s.db.tag(_[m+1],e,y,!1))}const i=this;return Promise.all(x).then(function(r){return n&&(n.resolve=g),r.length&&(r=i.search(t,e,n,r)),r})}if(!p)return g?r:new Pe(r,this);if(o&&(!m||!this.store))return r=r[0],g?r:new Pe(r,this);for(x=[],y=0;y<s.length;y++){if(_=r[y],m&&_.length&&void 0===_[0].doc&&(this.db?x.push(_=this.index.get(this.field[0]).db.enrich(_)):_=$e.call(this,_)),o)return g?f?Me(t,_,this.index,o,f):_:new Pe(_,this);r[y]={field:s[y],result:_}}if(m&&this.db&&x.length){const e=this;return Promise.all(x).then(function(n){for(let t=0;t<n.length;t++)r[t].result=n[t];return f&&(r=Me(t,r,e.index,o,f)),l?Oe(r):r})}return f&&(r=Me(t,r,this.index,o,f)),l?Oe(r):r},(Bt=Fe.prototype).mount=function(t){let e=this.field;if(this.tag)for(let t,i=0;i<this.F.length;i++){t=this.F[i];var n=void 0;this.index.set(t,n=new ln({},this.reg)),e===this.field&&(e=e.slice(0)),e.push(t),n.tag=this.tag.get(t)}n=[];const i={db:t.db,type:t.type,fastupdate:t.fastupdate};for(let r,s,o=0;o<e.length;o++){i.field=s=e[o],r=this.index.get(s);const l=new t.constructor(t.id,i);l.id=t.id,n[o]=l.mount(r),r.document=!0,o?r.bypass=!0:r.store=this.store}const r=this;return this.db=Promise.all(n).then(function(){r.db=!0})},Bt.commit=async function(){const t=[];for(const e of this.index.values())t.push(e.commit());await Promise.all(t),this.reg.clear()},Bt.destroy=function(){const t=[];for(const e of this.index.values())t.push(e.destroy());return Promise.all(t)},Bt.append=function(t,e){return this.add(t,e,!0)},Bt.update=function(t,e){return this.remove(t).add(t,e)},Bt.remove=function(t){for(var e of(Ft(t)&&(t=Rt(t,this.key)),this.index.values()))e.remove(t,!0);if(this.reg.has(t)){if(this.tag&&!this.fastupdate)for(let n of this.tag.values())for(let i of n){e=i[0];const r=i[1],s=r.indexOf(t);s>-1&&(r.length>1?r.splice(s,1):n.delete(e))}this.store&&this.store.delete(t),this.reg.delete(t)}return this.cache&&this.cache.remove(t),this},Bt.clear=function(){const t=[];for(const e of this.index.values()){const n=e.clear();
8n.then&&t.push(n)}if(this.tag)for(const t of this.tag.values())t.clear();return this.store&&this.store.clear(),this.cache&&this.cache.clear(),t.length?Promise.all(t):this},Bt.contain=function(t){return this.db?this.index.get(this.field[0]).db.has(t):this.reg.has(t)},Bt.cleanup=function(){for(const t of this.index.values())t.cleanup();return this},Bt.get=function(t){return this.db?this.index.get(this.field[0]).db.enrich(t).then(function(t){return t[0]&&t[0].doc||null}):this.store.get(t)||null},Bt.set=function(t,e){return"object"==typeof t&&(t=Rt(e=t,this.key)),this.store.set(t,e),this},Bt.searchCache=Qt,Bt.export=function(t,e,n=0,i=0){if(n<this.field.length){const r=this.field[n];if((e=this.index.get(r).export(t,r,n,i=1))&&e.then){const i=this;return e.then(function(){return i.export(t,r,n+1)})}return this.export(t,r,n+1)}let r,s;switch(i){case 0:r="reg",s=Je(this.reg),e=null;break;case 1:r="tag",s=this.tag&&We(this.tag,this.reg.size),e=null;break;case 2:r="doc",s=this.store&&qe(this.store),e=null;break;default:return}return Qe.call(this,t,e,r,s||null,n,i)},Bt.import=function(t,e){var n=t.split(".");"json"===n[n.length-1]&&n.pop();const i=n.length>2?n[0]:"";if(n=n.length>2?n[2]:n[1],this.worker&&i)return this.index.get(i).import(t);if(e){if("string"==typeof e&&(e=JSON.parse(e)),i)return this.index.get(i).import(n,e);switch(n){case"reg":this.fastupdate=!1,this.reg=Ge(e,this.reg);for(let t,e=0;e<this.field.length;e++)t=this.index.get(this.field[e]),t.fastupdate=!1,t.reg=this.reg;if(this.worker){e=[];for(const n of this.index.values())e.push(n.import(t));return Promise.all(e)}break;case"tag":this.tag=Ve(e,this.tag);break;case"doc":this.store=Ke(e,this.store)}}},me(Fe.prototype),ln.prototype.remove=function(t,e){const n=this.reg.size&&(this.fastupdate?this.reg.get(t):this.reg.has(t));if(n){if(this.fastupdate){for(let e,i,r=0;r<n.length;r++)if((e=n[r])&&(i=e.length))if(e[i-1]===t)e.pop();else{const n=e.indexOf(t);n>=0&&e.splice(n,1)}}else Ze(this.map,t),this.depth&&Ze(this.ctx,t);e||this.reg.delete(t)}return this.db&&(this.commit_task.push({del:t}),this.M&&hn(this)),this.cache&&this.cache.remove(t),this};const Ye={memory:{resolution:1},performance:{resolution:3,fastupdate:!0,context:{depth:1,resolution:1}},match:{tokenize:"forward"},score:{resolution:9,context:{depth:2,resolution:3}}};function tn(t,e,n,i,r,s,o){let l,h;if(!(l=e[n])||o&&!l[o]){if(o?((e=l||(e[n]=Ut()))[o]=1,h=t.ctx,(l=h.get(o))?h=l:h.set(o,h=t.keystore?new le(t.keystore):new Map)):(h=t.map,e[n]=1),(l=h.get(n))?h=l:h.set(n,h=l=[]),s)for(let n,s=0;s<l.length;s++)if((n=l[s])&&n.includes(r)){if(s<=i)return;n.splice(n.indexOf(r),1),t.fastupdate&&(e=t.reg.get(r))&&e.splice(e.indexOf(n),1);break}if(h=h[i]||(h[i]=[]),h.push(r),h.length===2**31-1){if(e=new oe(h),t.fastupdate)for(let n of t.reg.values())n.includes(h)&&(n[n.indexOf(h)]=e);l[i]=h=e}t.fastupdate&&((i=t.reg.get(r))?i.push(h):t.reg.set(r,[h]))}}function en(t,e,n,i,r){return n&&t>1?e+(i||0)<=t?n+(r||0):(t-1)/(e+(i||0))*(n+(r||0))+1|0:0}function nn(t,e,n,i,r,s,o){let l=t.length,h=t;if(l>1)h=Le(t,e,n,i,r,s,o);else if(1===l)return o?Se.call(null,t[0],n,i):new Pe(t[0],this);return o?h:new Pe(h,this)}function rn(t,e,n,i,r,s,o){return t=on(this,t,e,n,i,r,s,o),this.db?t.then(function(t){return r?t||[]:new Pe(t,this)}):t&&t.length?r?Se.call(this,t,n,i):new Pe(t,this):r?[]:new Pe([],this)}function sn(t,e,n,i){let r=[];if(t&&t.length){if(t.length<=i)return void e.push(t);for(let e,n=0;n<i;n++)(e=t[n])&&(r[n]=e);if(r.length)return void e.push(r)}if(!n)return r}function on(t,e,n,i,r,s,o,l){let h;return n&&(h=t.bidirectional&&e>n)&&(h=n,n=e,e=h),t.db?t.db.get(e,n,i,r,s,o,l):t=n?(t=t.ctx.get(n))&&t.get(e):t.map.get(e)}function ln(t,e){if(!this||this.constructor!==ln)return new ln(t);if(t){var n=$t(t)?t:t.preset;n&&(t=Object.assign({},Ye[n],t))}else t={};const i=!0===(n=t.context)?{depth:1}:n||{},r=$t(t.encoder)?re[t.encoder]:t.encode||t.encoder||{};this.encoder=r.encode?r:"object"==typeof r?new Jt(r):{encode:r},this.resolution=t.resolution||9,this.tokenize=n=(n=t.tokenize)&&"default"!==n&&"exact"!==n&&n||"strict",this.depth="strict"===n&&i.depth||0,this.bidirectional=!1!==i.bidirectional,this.fastupdate=!!t.fastupdate,this.score=t.score||null,(n=t.keystore||0)&&(this.keystore=n),this.map=n?new le(n):new Map,this.ctx=n?new le(n):new Map,this.reg=e||(this.fastupdate?n?new le(n):new Map:n?new he(n):new Set),this.N=i.resolution||3,this.rtl=r.rtl||t.rtl||!1,this.cache=(n=t.cache||null)&&new Xt(n),this.resolve=!1!==t.resolve,(n=t.db)&&(this.db=this.mount(n)),this.M=!1!==t.commit,this.commit_task=[],this.commit_timer=null,this.priority=t.priority||4}function hn(t){t.commit_timer||(t.commit_timer=setTimeout(function(){t.commit_timer=null,t.db.commit(t)},1))}ln.prototype.add=function(t,e,n,i){if(e&&(t||0===t)){if(!i&&!n&&this.reg.has(t))return this.update(t,e);i=this.depth;const a=(e=this.encoder.encode(e,!i)).length;if(a){const c=Ut(),u=Ut(),f=this.resolution;for(let d=0;d<a;d++){let p=e[this.rtl?a-1-d:d];var r=p.length;if(r&&(i||!u[p])){var s=this.score?this.score(e,p,d,null,0):en(f,a,d),o="";switch(this.tokenize){case"tolerant":if(tn(this,u,p,s,t,n),r>2){for(let e,i,l,h,a=1;a<r-1;a++)e=p.charAt(a),i=p.charAt(a+1),l=p.substring(0,a)+i,h=p.substring(a+2),tn(this,u,o=l+e+h,s,t,n),tn(this,u,o=l+h,s,t,n);tn(this,u,p.substring(0,p.length-1),s,t,n)}break;case"full":if(r>2){for(let i,h=0;h<r;h++)for(s=r;s>h;s--){o=p.substring(h,s),i=this.rtl?r-1-h:h;var l=this.score?this.score(e,p,d,o,i):en(f,a,d,r,i);tn(this,u,o,l,t,n)}break}case"bidirectional":case"reverse":if(r>1){for(l=r-1;l>0;l--){o=p[this.rtl?r-1-l:l]+o;var h=this.score?this.score(e,p,d,o,l):en(f,a,d,r,l);tn(this,u,o,h,t,n)}o=""}case"forward":if(r>1){for(l=0;l<r;l++)tn(this,u,o+=p[this.rtl?r-1-l:l],s,t,n);break}default:if(tn(this,u,p,s,t,n),i&&a>1&&d<a-1)for(r=this.N,o=p,s=Math.min(i+1,this.rtl?d+1:a-d),l=1;l<s;l++){p=e[this.rtl?a-1-d-l:d+l];tn(this,c,(h=this.bidirectional&&p>o)?o:p,this.score?this.score(e,o,d,p,l-1):en(r+(a/2>r?0:1),a,d,s-1,l-1),t,n,h?p:o)}}}}this.fastupdate||this.reg.add(t)}}return this.db&&(this.commit_task.push(n?{ins:t}:{del:t}),this.M&&hn(this)),this},ln.prototype.search=function(t,e,n){if(n||(e||"object"!=typeof t?"object"==typeof e&&(n=e,e=0):(n=t,t="")),n&&n.cache)return n.cache=!1,t=this.searchCache(t,e,n),n.cache=!0,t;let i,r,s,o,l,h,a,c,u=[],f=0;
8n&&(t=n.query||t,e=n.limit||e,f=n.offset||0,r=n.context,s=n.suggest,c=(o=n.resolve)&&n.enrich,h=n.boost,a=n.resolution,l=this.db&&n.tag),void 0===o&&(o=this.resolve),r=this.depth&&!1!==r;let d=this.encoder.encode(t,!r);if(i=d.length,e=e||(o?100:0),1===i)return rn.call(this,d[0],"",e,f,o,c,l);if(2===i&&r&&!s)return rn.call(this,d[1],d[0],e,f,o,c,l);let p,g=Ut(),_=0;if(r&&(p=d[0],_=1),a||0===a||(a=p?this.N:this.resolution),this.db){if(this.db.search&&!1!==(n=this.db.search(this,d,e,f,s,o,c,l)))return n;const t=this;return async function(){for(let e,n;_<i;_++){if((n=d[_])&&!g[n]){if(g[n]=1,e=await on(t,n,p,0,0,!1,!1),e=sn(e,u,s,a)){u=e;break}p&&(s&&e&&u.length||(p=n))}s&&p&&_===i-1&&!u.length&&(a=t.resolution,p="",_=-1,g=Ut())}return nn(u,a,e,f,s,h,o)}()}for(let t,e;_<i;_++){if((e=d[_])&&!g[e]){if(g[e]=1,t=on(this,e,p,0,0,!1,!1),t=sn(t,u,s,a)){u=t;break}p&&(s&&t&&u.length||(p=e))}s&&p&&_===i-1&&!u.length&&(a=this.resolution,p="",_=-1,g=Ut())}return nn(u,a,e,f,s,h,o)},(Bt=ln.prototype).mount=function(t){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),t.mount(this)},Bt.commit=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this)},Bt.destroy=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.destroy()},Bt.clear=function(){return this.map.clear(),this.ctx.clear(),this.reg.clear(),this.cache&&this.cache.clear(),this.db?(this.commit_timer&&clearTimeout(this.commit_timer),this.commit_timer=null,this.commit_task=[],this.db.clear()):this},Bt.append=function(t,e){return this.add(t,e,!0)},Bt.contain=function(t){return this.db?this.db.has(t):this.reg.has(t)},Bt.update=function(t,e){const n=this,i=this.remove(t);return i&&i.then?i.then(()=>n.add(t,e)):this.add(t,e)},Bt.cleanup=function(){return this.fastupdate?(Ze(this.map),this.depth&&Ze(this.ctx),this):this},Bt.searchCache=Qt,Bt.export=function(t,e,n=0,i=0){let r,s;switch(i){case 0:r="reg",s=Je(this.reg);break;case 1:r="cfg",s=null;break;case 2:r="map",s=qe(this.map,this.reg.size);break;case 3:r="ctx",s=We(this.ctx,this.reg.size);break;default:return}return Qe.call(this,t,e,r,s,n,i)},Bt.import=function(t,e){if(e)switch("string"==typeof e&&(e=JSON.parse(e)),t=t.split("."),"json"===t[t.length-1]&&t.pop(),3===t.length&&t.shift(),t=t.length>1?t[1]:t[0],t){case"reg":this.fastupdate=!1,this.reg=Ge(e,this.reg);break;case"map":this.map=Ke(e,this.map);break;case"ctx":this.ctx=Ve(e,this.ctx)}},Bt.serialize=function(t=!0){let e="",n="",i="";if(this.reg.size){let t;for(var r of this.reg.keys())t||(t=typeof r),e+=(e?",":"")+("string"===t?'"'+r+'"':r);e="index.reg=new Set(["+e+"]);",n=Xe(this.map,t),n="index.map=new Map(["+n+"]);";for(const e of this.ctx.entries()){r=e[0];let n=Xe(e[1],t);n="new Map(["+n+"])",n='["'+r+'",'+n+"]",i+=(i?",":"")+n}i="index.ctx=new Map(["+i+"]);"}return t?"function inject(index){"+e+n+i+"}":e+n+i},me(ln.prototype);const an="undefined"!=typeof window&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),cn=["map","ctx","tag","reg","cfg"],un=Ut();function fn(t,e,n){const i=t.value;let r,s=0;for(let t,o=0;o<i.length;o++){if(t=n?i:i[o]){for(let n,s,l=0;l<e.length;l++)if(s=e[l],n=t.indexOf(s),n>=0){if(r=1,!(t.length>1)){i[o]=[];break}t.splice(n,1)}s+=t.length}if(n)break}s?r&&t.update(i):t.delete(),t.continue()}function dn(t,e){return new Promise((n,i)=>{t.onsuccess=t.oncomplete=function(){e&&e(this.result),e=null,n(this.result)},t.onerror=t.onblocked=i,t=null})}Bt=function t(e,n={}){if(!this||this.constructor!==t)return new t(e,n);"object"==typeof e&&(n=e,e=e.name),e||console.info("Default storage space was used, because a name was not passed."),this.id="flexsearch"+(e?":"+e.toLowerCase().replace(/[^a-z0-9_\-]/g,""):""),this.field=n.field?n.field.toLowerCase().replace(/[^a-z0-9_\-]/g,""):"",this.type=n.type,this.fastupdate=this.support_tag_search=!1,this.db=null,this.h={}}.prototype,Bt.mount=function(t){return t.index?t.mount(this):(t.db=this,this.open())},Bt.open=function(){if(this.db)return this.db;let t=this;navigator.storage&&navigator.storage.persist&&navigator.storage.persist(),un[t.id]||(un[t.id]=[]),un[t.id].push(t.field);const e=an.open(t.id,1);return e.onupgradeneeded=function(){const e=t.db=this.result;for(let n,i=0;i<cn.length;i++){n=cn[i];for(let i,r=0;r<un[t.id].length;r++)i=un[t.id][r],e.objectStoreNames.contains(n+("reg"!==n&&i?":"+i:""))||e.createObjectStore(n+("reg"!==n&&i?":"+i:""))}},t.db=dn(e,function(e){t.db=e,t.db.onversionchange=function(){t.close()}})},Bt.close=function(){this.db&&this.db.close(),this.db=null}
8,Bt.destroy=function(){return dn(an.deleteDatabase(this.id))},Bt.clear=function(){const t=[];for(let e,n=0;n<cn.length;n++){e=cn[n];for(let n,i=0;i<un[this.id].length;i++)n=un[this.id][i],t.push(e+("reg"!==e&&n?":"+n:""))}const e=this.db.transaction(t,"readwrite");for(let n=0;n<t.length;n++)e.objectStore(t[n]).clear();return dn(e)},Bt.get=function(t,e,n=0,i=0,r=!0,s=!1){t=this.db.transaction((e?"ctx":"map")+(this.field?":"+this.field:""),"readonly").objectStore((e?"ctx":"map")+(this.field?":"+this.field:"")).get(e?e+":"+t:t);const o=this;return dn(t).then(function(t){let e=[];if(!t||!t.length)return e;if(r){if(!n&&!i&&1===t.length)return t[0];for(let r,s=0;s<t.length;s++)if((r=t[s])&&r.length){if(i>=r.length){i-=r.length;continue}const t=n?i+Math.min(r.length-i,n):r.length;for(let n=i;n<t;n++)e.push(r[n]);if(i=0,e.length===n)break}return s?o.enrich(e):e}return t})},Bt.tag=function(t,e=0,n=0,i=!1){t=this.db.transaction("tag"+(this.field?":"+this.field:""),"readonly").objectStore("tag"+(this.field?":"+this.field:"")).get(t);const r=this;return dn(t).then(function(t){return!t||!t.length||n>=t.length?[]:e||n?(t=t.slice(n,n+e),i?r.enrich(t):t):t})},Bt.enrich=function(t){"object"!=typeof t&&(t=[t]);const e=this.db.transaction("reg","readonly").objectStore("reg"),n=[];for(let i=0;i<t.length;i++)n[i]=dn(e.get(t[i]));return Promise.all(n).then(function(e){for(let n=0;n<e.length;n++)e[n]={id:t[n],doc:e[n]?JSON.parse(e[n]):null};return e})},Bt.has=function(t){return dn(t=this.db.transaction("reg","readonly").objectStore("reg").getKey(t)).then(function(t){return!!t})},Bt.search=null,Bt.info=function(){},Bt.transaction=function(t,e,n){t+="reg"!==t&&this.field?":"+this.field:"";let i=this.h[t+":"+e];if(i)return n.call(this,i);let r=this.db.transaction(t,e);this.h[t+":"+e]=i=r.objectStore(t);const s=n.call(this,i);return this.h[t+":"+e]=null,dn(r).finally(function(){return s})},Bt.commit=async function(t){let e=t.commit_task,n=[];t.commit_task=[];for(let t,i=0;i<e.length;i++)t=e[i],t.del&&n.push(t.del);n.length&&await this.remove(n),t.reg.size&&(await this.transaction("map","readwrite",function(e){for(const n of t.map){const t=n[0],i=n[1];i.length&&(e.get(t).onsuccess=function(){let n=this.result;var r;if(n&&n.length){const t=Math.max(n.length,i.length);for(let e,s,o=0;o<t;o++)if((s=i[o])&&s.length){if((e=n[o])&&e.length)for(r=0;r<s.length;r++)e.push(s[r]);else n[o]=s;r=1}}else n=i,r=1;r&&e.put(n,t)})}}),await this.transaction("ctx","readwrite",function(e){for(const n of t.ctx){const t=n[0],i=n[1];for(const n of i){const i=n[0],r=n[1];r.length&&(e.get(t+":"+i).onsuccess=function(){let n=this.result;var s;if(n&&n.length){const t=Math.max(n.length,r.length);for(let e,i,o=0;o<t;o++)if((i=r[o])&&i.length){if((e=n[o])&&e.length)for(s=0;s<i.length;s++)e.push(i[s]);else n[o]=i;s=1}}else n=r,s=1;s&&e.put(n,t+":"+i)})}}}),t.store?await this.transaction("reg","readwrite",function(e){for(const n of t.store){const t=n[0],i=n[1];e.put("object"==typeof i?JSON.stringify(i):1,t)}}):t.bypass||await this.transaction("reg","readwrite",function(e){for(const n of t.reg.keys())e.put(1,n)}),t.tag&&await this.transaction("tag","readwrite",function(e){for(const n of t.tag){const t=n[0],i=n[1];i.length&&(e.get(t).onsuccess=function(){let n=this.result;n=n&&n.length?n.concat(i):i,e.put(n,t)})}}),t.map.clear(),t.ctx.clear(),t.tag&&t.tag.clear(),t.store&&t.store.clear(),t.document||t.reg.clear())},Bt.remove=function(t){return"object"!=typeof t&&(t=[t]),Promise.all([this.transaction("map","readwrite",function(e){e.openCursor().onsuccess=function(){const e=this.result;e&&fn(e,t)}}),this.transaction("ctx","readwrite",function(e){e.openCursor().onsuccess=function(){const e=this.result;e&&fn(e,t)}}),this.transaction("tag","readwrite",function(e){e.openCursor().onsuccess=function(){const e=this.result;e&&fn(e,t,!0)}}),this.transaction("reg","readwrite",function(e){for(let n=0;n<t.length;n++)e.delete(t[n])})])};var pn={Encoder:Jt,Document:Fe};const gn=re,_n={finalize:t=>{let e=[];for(const n of t)e.push(...yn(n));return e}};function mn(t){return t>=19968&&t<=40959||t>=12352&&t<=12543||t>=44032&&t<=55203||t>=13312&&t<=19903||t>=131072&&t<=173791||t>=173824&&t<=191471||t>=196608&&t<=205743||t>=191472&&t<=192095||t>=63744&&t<=64255||t>=194560&&t<=195103}function yn(t){const e=[];let n="";for(const i of t){const t=i.codePointAt(0);t&&mn(t)?(n&&(e.push(n),n=""),e.push(i)):n+=i}return n&&e.push(n),e}const xn=new pn.Encoder({...gn.Default,..._n});class wn{constructor({contentApiUrl:t,contentApiKey:e,dir:n="ltr",filter:i=""}){this.contentApiUrl=t,this.contentApiKey=e,this.dir=n,this.filter=i;const r="rtl"===n,s="rtl"===n?"reverse":"forward";this.postsIndex=new pn.Document({tokenize:s,rtl:r,document:{id:"id",index:["title","excerpt"],store:!0},encoder:xn}),this.authorsIndex=new pn.Document({tokenize:s,rtl:r,document:{id:"id",index:["name"],store:!0},encoder:xn}),this.tagsIndex=new pn.Document({tokenize:s,rtl:r,document:{id:"id",index:["name"],store:!0},encoder:xn}),this.init=this.init.bind(this),this.search=this.search.bind(this),this.sample=this.sample.bind(this)}async#t(){let t=[];if(!this.filter)return[];const e=async(t=1)=>{const e=new URLSearchParams({filter:`tags:[${this.filter}]`,limit:"100",fields:"id,slug,title,excerpt,url,updated_at,visibility",order:"updated_at DESC",page:`${t}`}),n=`${this.contentApiUrl}/posts/?key=${this.contentApiKey}&${e}`,i=await fetch(n);return await i.json()},n=await e(1);if(t=n?.posts||[],n?.meta?.pagination?.pages>1){const i=Math.min(n.meta.pagination.pages,10),r=[];for(let t=2;t<=i;t++)r.push(e(t));
8(await Promise.allSettled(r)).forEach((e,n)=>{"rejected"!==e.status?t.push(...e.value?.posts||[]):console.error("Error fetching filtered posts with page="+(n+2))})}return t}async#e(){if(this.filter)return this.#t();const t=`${this.contentApiUrl}/search-index/posts/?key=${this.contentApiKey}`,e=await fetch(t);return(await e.json()).posts}async#n(){try{const t=`${this.contentApiUrl}/search-index/authors/?key=${this.contentApiKey}`,e=await fetch(t);return(await e.json()).authors}catch(t){return console.error("Error fetching authors:",t),window.Spiritix.safeReportError?.(t),[]}}async#i(){try{const t=`${this.contentApiUrl}/search-index/tags/?key=${this.contentApiKey}`,e=await fetch(t);return(await e.json()).tags}catch(t){return console.error("Error fetching tags:",t),window.Spiritix.safeReportError?.(t),[]}}#r(t){t.forEach(t=>{this.postsIndex.add(t)})}#s(t){t.forEach(t=>{!t?.url||/\/404\/$/.test(t.url)||this.authorsIndex.add(t)})}#o(t){t.forEach(t=>{!t?.url||/\/404\/$/.test(t.url)||this.tagsIndex.add(t)})}async init(){const[t,e,n]=await Promise.all([this.#e(),this.#n(),this.#i()]);t.length>0&&this.#r(t),e.length>0&&this.#s(e),n.length>0&&this.#o(n)}#l(t){const e=[],n={};return t.forEach(t=>{t.result.forEach(t=>{!n[t.id]&&t.doc&&(e.push(t.doc),n[t.id]=!0)})}),e}search(t){const e=this.postsIndex.search(t,{enrich:!0}),n=this.authorsIndex.search(t,{enrich:!0}),i=this.tagsIndex.search(t,{enrich:!0});return{posts:this.#l(e),authors:this.#l(n),tags:this.#l(i)}}sample(t=100){const e=[];if(this.postsIndex.store&&"function"==typeof this.postsIndex.store[Symbol.iterator])for(const[n,i]of this.postsIndex.store){if(e.length>=t)break;i&&e.push(i)}return{posts:e,authors:[],tags:[]}}}function bn({contentApiUrl:t,contentApiKey:e,dir:n}){const[i,r]=st(!1),[s,o]=st(""),[l,h]=st(""),[a,c]=st([]),u=lt(null),f=lt(null),d=ht(()=>document.querySelectorAll("[data-ghost-search]")||[],[]),p=function(t,e){return G=8,ht(function(){return t},e)}(i=>{let r=a.find(t=>t.filter===i);if(r||(r={filter:i||"",status:"initial",index:new wn({contentApiUrl:t,contentApiKey:e,dir:n,filter:i}),retries:0},c(a.concat({...r}))),r={...r},"initial"===r.status){r.status="started",c(t=>t.map(t=>t.filter===r.filter?{...r}:t));const t=performance.now();f.current=t,r.index.init().then(()=>{r.status="completed"}).catch(t=>{r.retries+=1,r.status=r.retries>=3?"failed":"initial",window.Spiritix.safeReportError?.(t)}).finally(()=>{const e="initial"===r.status?100:0;setTimeout(()=>{t===f.current&&c(t=>t.map(t=>t.filter===r.filter?{...r}:t))},e)})}},[a,t,e,n]);ot(()=>{i&&p(s)},[i,p]),ot(()=>{const t=t=>{if(t.preventDefault(),t.currentTarget instanceof Element){const e=t.currentTarget,n=e?.getAttribute("data-ghost-search")?.trim()||"";n&&p(n)}};return d.forEach(e=>e.addEventListener("mouseenter",t)),()=>d.forEach(e=>e.removeEventListener("mouseenter",t))},[d,p]),ot(()=>{const t=t=>{if(t.preventDefault(),t.currentTarget instanceof Element){const e=t.currentTarget,n=e?.getAttribute("data-ghost-search")?.trim()||"";o(n)}r(!0);const e=document.createElement("input");e.style.opacity="0",e.style.position="fixed",e.style.top="0",document.body.appendChild(e),e.focus(),setTimeout(()=>{u?.current?.focus(),document.body.removeChild(e)},150)};return d.forEach(e=>e.addEventListener("click",t)),()=>d.forEach(e=>e.removeEventListener("click",t))},[d]),ot(()=>{const t=()=>{const[t]=window.location.hash.substring(1).split("?");"/search"!==t&&"/search/"!==t||(r(!0),window.history.replaceState("",document.title,window.location.pathname))};return t(),window.addEventListener("hashchange",t,!1),()=>window.removeEventListener("hashchange",t,!1)},[]),ot(()=>{if(!d?.length)return;const t=t=>{if("k"===t.key&&t.metaKey)return r(!0),t.preventDefault(),t.stopPropagation(),!1};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[d]),ot(()=>(document.body.classList.toggle("has-modal",i),i||(f.current=null,h(""),o(""),c(t=>t.map(t=>({...t,status:"completed"!==t.status?"initial":t.status,retries:0})))),()=>document.body.classList.toggle("has-modal",!1)),[i]);const g=a.find(t=>t.filter===s);if(!g)return null;const _={showPopup:i,setShowPopup:r,searchValue:l,setSearchValue:h,filter:s,searchIndex:g.index,indexStatus:g.status,t:t=>window.Spiritix?.t?.[t]||t,inputRef:u};return b(yt.Provider,{value:_},b(Lt,null))}function vn(t){if(t=t?.replace("_","-"),!t||t.indexOf("-")<0)return t;return function(t){if("string"==typeof t&&t.indexOf("-")>-1){let e;try{e=Intl.getCanonicalLocales(t)[0]}catch(t){}return e||t}return t}(t.split("-")[0])}function kn(){const t=document.documentElement.getAttribute("data-sx-content-api-url")?.replace(/\/+$/,""),e=document.documentElement.getAttribute("data-sx-content-api-key"),n=document.documentElement.getAttribute("lang")||"en",i=function(t){try{if(Intl?.Locale){const e=new Intl.Locale(t),n=e?.getTextInfo?.();if(n?.direction)return n.direction}}catch(t){}return t.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","aj
8p","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(vn(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}(n)||"ltr";return{contentApiUrl:t,contentApiKey:e,locale:n,dir:i}}!function(){const{contentApiUrl:n,contentApiKey:i,dir:r}=kn(),s=function(){const t=document.createElement("div");return t.id="sx-search-root",document.body.appendChild(t),t}();if(!n||!i)throw Error("Spritix Search: Content API key or URL not found!");!function(n,i){var r,s,o;i==document&&(i=document.documentElement),e.__&&e.__(n,i),r=i.__k,s=[],o=[],T(i,n=i.__k=b(k,null,[n]),r||g,g,i.namespaceURI,r?null:i.firstChild?t.call(i.childNodes):null,s,r?r.__e:i.firstChild,!1,o),U(s,n,o),n.props.children=null}(b(bn,{contentApiUrl:n,contentApiKey:i,dir:r}),s)}();

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.