@tryghost/sodo-search 1.8.1 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -1
- package/package.json +20 -4
- package/umd/main.css +1 -1
- package/umd/sodo-search.min.js +3 -3
- package/umd/sodo-search.min.js.map +1 -1
package/umd/sodo-search.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Q){typeof define=="function"&&define.amd?define(Q):Q()})(function(){"use strict";var
|
|
1
|
+
(function(Q){typeof define=="function"&&define.amd?define(Q):Q()})(function(){"use strict";var Wm=Object.defineProperty;var Wf=Q=>{throw TypeError(Q)};var Qm=(Q,G,pe)=>G in Q?Wm(Q,G,{enumerable:!0,configurable:!0,writable:!0,value:pe}):Q[G]=pe;var io=(Q,G,pe)=>Qm(Q,typeof G!="symbol"?G+"":G,pe),Ym=(Q,G,pe)=>G.has(Q)||Wf("Cannot "+pe);var Qf=(Q,G,pe)=>G.has(Q)?Wf("Cannot add the same private member more than once"):G instanceof WeakSet?G.add(Q):G.set(Q,pe);var ke=(Q,G,pe)=>(Ym(Q,G,"access private method"),pe);var H,Yf,Jf,Gf,Xf,qf,Zf,bf,eh,th,lo;var Q=document.createElement("style");Q.textContent=`.App{text-align:center}.App-logo{height:40vmin;pointer-events:none}@media (prefers-reduced-motion: no-preference){.App-logo{animation:App-logo-spin infinite 20s linear}}.App-header{background-color:#282c34;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin);color:#fff}.App-link{color:#61dafb}@keyframes App-logo-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
|
2
2
|
/*$vite$:1*/`,document.head.appendChild(Q);var G=typeof document<"u"?document.currentScript:null;function pe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Al={exports:{}},An={};/*
|
|
3
3
|
object-assign
|
|
4
4
|
(c) Sindre Sorhus
|
|
@@ -39,7 +39,7 @@ object-assign
|
|
|
39
39
|
Error generating stack: `+o.message+`
|
|
40
40
|
`+o.stack}return{value:e,source:t,stack:s}}function Qi(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Bd=typeof WeakMap=="function"?WeakMap:Map;function wc(e,t,n){n=dt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Rs||(Rs=!0,nl=r),Qi(e,t)},n}function xc(e,t,n){n=dt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return Qi(e,t),r(s)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(Be===null?Be=new Set([this]):Be.add(this),Qi(e,t));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}var Hd=typeof WeakSet=="function"?WeakSet:Set;function Sc(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){xt(e,n)}else t.current=null}function Kd(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(t.flags&256&&e!==null){var n=e.memoizedProps,r=e.memoizedState;e=t.stateNode,t=e.getSnapshotBeforeUpdate(t.elementType===t.type?n:Le(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&mi(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(k(163))}function Wd(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{if((e.tag&3)===3){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{var s=e;r=s.next,s=s.tag,s&4&&s&1&&(Ic(n,e),bd(n,e)),e=r}while(e!==t)}return;case 1:e=n.stateNode,n.flags&4&&(t===null?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Le(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&Ma(n,t,e);return;case 3:if(t=n.updateQueue,t!==null){if(e=null,n.child!==null)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}Ma(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&va(n.type,n.memoizedProps)&&e.focus();return;case 6:return;case 4:return;case 12:return;case 13:n.memoizedState===null&&(n=n.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&Ru(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(k(163))}function $c(e,t){for(var n=e;;){if(n.tag===5){var r=n.stateNode;if(t)r=r.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var s=n.memoizedProps.style;s=s!=null&&s.hasOwnProperty("display")?s.display:null,r.style.display=yu("display",s)}}else if(n.tag===6)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((n.tag!==23&&n.tag!==24||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function kc(e,t){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(wi,t)}catch{}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(e=t.updateQueue,e!==null&&(e=e.lastEffect,e!==null)){var n=e=e.next;do{var r=n,s=r.destroy;if(r=r.tag,s!==void 0)if(r&4)Ic(t,n);else{r=t;try{s()}catch(o){xt(r,o)}}n=n.next}while(n!==e)}break;case 1:if(Sc(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(o){xt(t,o)}break;case 5:Sc(t);break;case 4:Tc(e,t)}}function Cc(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function Pc(e){return e.tag===5||e.tag===3||e.tag===4}function Ec(e){e:{for(var t=e.return;t!==null;){if(Pc(t))break e;t=t.return}throw Error(k(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:t=t.containerInfo,r=!0;break;case 4:t=t.containerInfo,r=!0;break;default:throw Error(k(161))}n.flags&16&&(Dn(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||Pc(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue t;n.child.return=n,n=n.child}if(!(n.flags&2)){n=n.stateNode;break e}}r?Yi(e,n,t):Ji(e,n,t)}function Yi(e,t,n){var r=e.tag,s=r===5||r===6;if(s)e=s?e.stateNode:e.stateNode.instance,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=us));else if(r!==4&&(e=e.child,e!==null))for(Yi(e,t,n),e=e.sibling;e!==null;)Yi(e,t,n),e=e.sibling}function Ji(e,t,n){var r=e.tag,s=r===5||r===6;if(s)e=s?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ji(e,t,n),e=e.sibling;e!==null;)Ji(e,t,n),e=e.sibling}function Tc(e,t){for(var n=t,r=!1,s,o;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(k(160));switch(s=r.stateNode,r.tag){case 5:o=!1;break e;case 3:s=s.containerInfo,o=!0;break e;case 4:s=s.containerInfo,o=!0;break e}r=r.return}r=!0}if(n.tag===5||n.tag===6){e:for(var i=e,l=n,u=l;;)if(kc(i,u),u.child!==null&&u.tag!==4)u.child.return=u,u=u.child;else{if(u===l)break e;for(;u.sibling===null;){if(u.return===null||u.return===l)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}o?(i=s,l=n.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):s.removeChild(n.stateNode)}else if(n.tag===4){if(n.child!==null){s=n.stateNode.containerInfo,o=!0,n.child.return=n,n=n.child;continue}}else if(kc(e,n),n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return,n.tag===4&&(r=!1)}n.sibling.return=n.return,n=n.sibling}}function Gi(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var r=n=n.next;do(r.tag&3)===3&&(e=r.destroy,r.destroy=void 0,e!==void 0&&e()),r=r.next;while(r!==n)}return;case 1:return;case 5:if(n=t.stateNode,n!=null){r=t.memoizedProps;var s=e!==null?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,o!==null){for(n[cs]=r,e==="input"&&r.type==="radio"&&r.name!=null&&cu(n,r),Io(e,s),t=Io(e,r),s=0;s<o.length;s+=2){var i=o[s],l=o[s+1];i==="style"?vu(n,l):i==="dangerouslySetInnerHTML"?mu(n,l):i==="children"?Dn(n,l):yo(n,i,l,t)}switch(e){case"input":No(n,r);break;case"textarea":du(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,o=r.value,o!=null?qt(n,!!r.multiple,o,!1):e!==!!r.multiple&&(r.defaultValue!=null?qt(n,!!r.multiple,r.defaultValue,!0):qt(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(k(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,Ru(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(el=ue(),$c(t.child,!0)),jc(t);return;case 19:jc(t);return;case 17:return;case 23:case 24:$c(t,t.memoizedState!==null);return}throw Error(k(163))}function jc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Hd),t.forEach(function(r){var s=np.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Qd(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var Yd=Math.ceil,Os=Et.ReactCurrentDispatcher,Xi=Et.ReactCurrentOwner,L=0,de=null,q=null,ce=0,Mt=0,qi=ct(0),re=0,_s=null,vn=0,vr=0,wn=0,Zi=0,bi=null,el=0,tl=1/0;function xn(){tl=ue()+500}var j=null,Rs=!1,nl=null,Be=null,mt=!1,wr=null,xr=90,rl=[],sl=[],be=null,Sr=0,ol=null,zs=-1,et=0,Is=0,$r=null,Ms=!1;function xe(){return L&48?ue():zs!==-1?zs:zs=ue()}function yt(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return dn()===99?1:2;if(et===0&&(et=vn),Rd.transition!==0){Is!==0&&(Is=bi!==null?bi.pendingLanes:0),e=et;var t=4186112&~Is;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=dn(),L&4&&e===98?e=br(12,et):(e=Ih(e),e=br(e,et)),e}function vt(e,t,n){if(50<Sr)throw Sr=0,ol=null,Error(k(185));if(e=Ds(e,t),e===null)return null;es(e,t,n),e===de&&(wn|=t,re===4&&Sn(e,ce));var r=dn();t===1?L&8&&!(L&48)?il(e):(je(e,n),L===0&&(xn(),De())):(!(L&4)||r!==98&&r!==99||(be===null?be=new Set([e]):be.add(e)),je(e,n)),bi=e}function Ds(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}function je(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,s=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var l=31-lt(i),u=1<<l,a=o[l];if(a===-1){if(!(u&r)||u&s){a=t,tn(u);var f=D;o[l]=10<=f?a+250:6<=f?a+5e3:-1}}else a<=t&&(e.expiredLanes|=u);i&=~u}if(r=Jn(e,e===de?ce:0),t=D,r===0)n!==null&&(n!==ki&&Si(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==ki&&Si(n)}t===15?(n=il.bind(null,e),Xe===null?(Xe=[n],gs=xi(ps,_a)):Xe.push(n),n=ki):t===14?n=or(99,il.bind(null,e)):(n=Mh(t),n=or(n,Nc.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function Nc(e){if(zs=-1,Is=et=0,L&48)throw Error(k(327));var t=e.callbackNode;if(wt()&&e.callbackNode!==t)return null;var n=Jn(e,e===de?ce:0);if(n===0)return null;var r=n,s=L;L|=16;var o=_c();(de!==e||ce!==r)&&(xn(),$n(e,r));do try{Xd();break}catch(l){Oc(e,l)}while(!0);if(Pi(),Os.current=o,L=s,q!==null?r=0:(de=null,ce=0,r=re),vn&wn)$n(e,0);else if(r!==0){if(r===2&&(L|=64,e.hydrate&&(e.hydrate=!1,mi(e.containerInfo)),n=Vu(e),n!==0&&(r=kr(e,n))),r===1)throw t=_s,$n(e,0),Sn(e,n),je(e,ue()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(k(345));case 2:Dt(e);break;case 3:if(Sn(e,n),(n&62914560)===n&&(r=el+500-ue(),10<r)){if(Jn(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){xe(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=wa(Dt.bind(null,e),r);break}Dt(e);break;case 4:if(Sn(e,n),(n&4186112)===n)break;for(r=e.eventTimes,s=-1;0<n;){var i=31-lt(n);o=1<<i,i=r[i],i>s&&(s=i),n&=~o}if(n=s,n=ue()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Yd(n/1960))-n,10<n){e.timeoutHandle=wa(Dt.bind(null,e),n);break}Dt(e);break;case 5:Dt(e);break;default:throw Error(k(329))}}return je(e,ue()),e.callbackNode===t?Nc.bind(null,e):null}function Sn(e,t){for(t&=~Zi,t&=~wn,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-lt(t),r=1<<n;e[n]=-1,t&=~r}}function il(e){if(L&48)throw Error(k(327));if(wt(),e===de&&e.expiredLanes&ce){var t=ce,n=kr(e,t);vn&wn&&(t=Jn(e,t),n=kr(e,t))}else t=Jn(e,0),n=kr(e,t);if(e.tag!==0&&n===2&&(L|=64,e.hydrate&&(e.hydrate=!1,mi(e.containerInfo)),t=Vu(e),t!==0&&(n=kr(e,t))),n===1)throw n=_s,$n(e,0),Sn(e,t),je(e,ue()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Dt(e),je(e,ue()),null}function Jd(){if(be!==null){var e=be;be=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,je(t,ue())})}De()}function Ac(e,t){var n=L;L|=1;try{return e(t)}finally{L=n,L===0&&(xn(),De())}}function Lc(e,t){var n=L;L&=-2,L|=8;try{return e(t)}finally{L=n,L===0&&(xn(),De())}}function Fs(e,t){K(qi,Mt),Mt|=t,vn|=t}function ll(){Mt=qi.current,U(qi)}function $n(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,jd(n)),q!==null)for(n=q.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&hs();break;case 3:mn(),U(ge),U(le),_i();break;case 5:Ai(r);break;case 4:mn();break;case 13:U(W);break;case 19:U(W);break;case 10:Ei(r);break;case 23:case 24:ll()}n=n.return}de=e,q=St(e.current,null),ce=Mt=vn=t,re=0,_s=null,Zi=wn=vr=0}function Oc(e,t){do{var n=q;try{if(Pi(),fr.current=As,Es){for(var r=Y.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Es=!1}if(hr=0,ne=ae=Y=null,dr=!1,Xi.current=null,n===null||n.return===null){re=1,_s=t,q=null;break}e:{var o=e,i=n.return,l=n,u=t;if(t=ce,l.flags|=2048,l.firstEffect=l.lastEffect=null,u!==null&&typeof u=="object"&&typeof u.then=="function"){var a=u;if(!(l.mode&2)){var f=l.alternate;f?(l.updateQueue=f.updateQueue,l.memoizedState=f.memoizedState,l.lanes=f.lanes):(l.updateQueue=null,l.memoizedState=null)}var p=(W.current&1)!==0,c=i;do{var m;if(m=c.tag===13){var v=c.memoizedState;if(v!==null)m=v.dehydrated!==null;else{var x=c.memoizedProps;m=x.fallback===void 0?!1:x.unstable_avoidThisFallback!==!0?!0:!p}}if(m){var h=c.updateQueue;if(h===null){var d=new Set;d.add(a),c.updateQueue=d}else h.add(a);if(!(c.mode&2)){if(c.flags|=64,l.flags|=16384,l.flags&=-2981,l.tag===1)if(l.alternate===null)l.tag=17;else{var g=dt(-1,1);g.tag=2,pt(l,g)}l.lanes|=1;break e}u=void 0,l=t;var w=o.pingCache;if(w===null?(w=o.pingCache=new Bd,u=new Set,w.set(a,u)):(u=w.get(a),u===void 0&&(u=new Set,w.set(a,u))),!u.has(l)){u.add(l);var y=tp.bind(null,o,a,l);a.then(y,y)}c.flags|=4096,c.lanes=t;break e}c=c.return}while(c!==null);u=Error((Xt(l.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
|
|
41
41
|
|
|
42
|
-
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}re!==5&&(re=2),u=Wi(u,l),c=i;do{switch(c.tag){case 3:o=u,c.flags|=4096,t&=-t,c.lanes|=t;var $=wc(c,o,t);Ia(c,$);break e;case 1:o=u;var S=c.type,C=c.stateNode;if(!(c.flags&64)&&(typeof S.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(Be===null||!Be.has(C)))){c.flags|=4096,t&=-t,c.lanes|=t;var T=xc(c,o,t);Ia(c,T);break e}}c=c.return}while(c!==null)}zc(n)}catch(N){t=N,q===n&&n!==null&&(q=n=n.return);continue}break}while(!0)}function _c(){var e=Os.current;return Os.current=As,e===null?As:e}function kr(e,t){var n=L;L|=16;var r=_c();de===e&&ce===t||$n(e,t);do try{Gd();break}catch(s){Oc(e,s)}while(!0);if(Pi(),L=n,Os.current=r,q!==null)throw Error(k(261));return de=null,ce=0,re}function Gd(){for(;q!==null;)Rc(q)}function Xd(){for(;q!==null&&!Ld();)Rc(q)}function Rc(e){var t=Dc(e.alternate,e,Mt);e.memoizedProps=e.pendingProps,t===null?zc(e):q=t,Xi.current=null}function zc(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=Vd(t),n!==null){n.flags&=2047,q=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=Ud(n,t,Mt),n!==null){q=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||Mt&1073741824||!(n.mode&4)){for(var r=0,s=n.child;s!==null;)r|=s.lanes|s.childLanes,s=s.sibling;n.childLanes=r}e!==null&&!(e.flags&2048)&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(e.lastEffect!==null?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}if(t=t.sibling,t!==null){q=t;return}q=t=e}while(t!==null);re===0&&(re=5)}function Dt(e){var t=dn();return _t(99,qd.bind(null,e,t)),null}function qd(e,t){do wt();while(wr!==null);if(L&48)throw Error(k(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(k(177));e.callbackNode=null;var r=n.lanes|n.childLanes,s=r,o=e.pendingLanes&~s;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=s,e.mutableReadLanes&=s,e.entangledLanes&=s,s=e.entanglements;for(var i=e.eventTimes,l=e.expirationTimes;0<o;){var u=31-lt(o),a=1<<u;s[u]=0,i[u]=-1,l[u]=-1,o&=~a}if(be!==null&&!(r&24)&&be.has(e)&&be.delete(e),e===de&&(q=de=null,ce=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(s=L,L|=32,Xi.current=null,di=ts,i=la(),ai(i)){if("selectionStart"in i)l={start:i.selectionStart,end:i.selectionEnd};else e:if(l=(l=i.ownerDocument)&&l.defaultView||window,(a=l.getSelection&&l.getSelection())&&a.rangeCount!==0){l=a.anchorNode,o=a.anchorOffset,u=a.focusNode,a=a.focusOffset;try{l.nodeType,u.nodeType}catch{l=null;break e}var f=0,p=-1,c=-1,m=0,v=0,x=i,h=null;t:for(;;){for(var d;x!==l||o!==0&&x.nodeType!==3||(p=f+o),x!==u||a!==0&&x.nodeType!==3||(c=f+a),x.nodeType===3&&(f+=x.nodeValue.length),(d=x.firstChild)!==null;)h=x,x=d;for(;;){if(x===i)break t;if(h===l&&++m===o&&(p=f),h===u&&++v===a&&(c=f),(d=x.nextSibling)!==null)break;x=h,h=x.parentNode}x=d}l=p===-1||c===-1?null:{start:p,end:c}}else l=null;l=l||{start:0,end:0}}else l=null;pi={focusedElem:i,selectionRange:l},ts=!1,$r=null,Ms=!1,j=r;do try{Zd()}catch(N){if(j===null)throw Error(k(330));xt(j,N),j=j.nextEffect}while(j!==null);$r=null,j=r;do try{for(i=e;j!==null;){var g=j.flags;if(g&16&&Dn(j.stateNode,""),g&128){var w=j.alternate;if(w!==null){var y=w.ref;y!==null&&(typeof y=="function"?y(null):y.current=null)}}switch(g&1038){case 2:Ec(j),j.flags&=-3;break;case 6:Ec(j),j.flags&=-3,Gi(j.alternate,j);break;case 1024:j.flags&=-1025;break;case 1028:j.flags&=-1025,Gi(j.alternate,j);break;case 4:Gi(j.alternate,j);break;case 8:l=j,Tc(i,l);var $=l.alternate;Cc(l),$!==null&&Cc($)}j=j.nextEffect}}catch(N){if(j===null)throw Error(k(330));xt(j,N),j=j.nextEffect}while(j!==null);if(y=pi,w=la(),g=y.focusedElem,i=y.selectionRange,w!==g&&g&&g.ownerDocument&&ia(g.ownerDocument.documentElement,g)){for(i!==null&&ai(g)&&(w=i.start,y=i.end,y===void 0&&(y=w),"selectionStart"in g?(g.selectionStart=w,g.selectionEnd=Math.min(y,g.value.length)):(y=(w=g.ownerDocument||document)&&w.defaultView||window,y.getSelection&&(y=y.getSelection(),l=g.textContent.length,$=Math.min(i.start,l),i=i.end===void 0?$:Math.min(i.end,l),!y.extend&&$>i&&(l=i,i=$,$=l),l=oa(g,$),o=oa(g,i),l&&o&&(y.rangeCount!==1||y.anchorNode!==l.node||y.anchorOffset!==l.offset||y.focusNode!==o.node||y.focusOffset!==o.offset)&&(w=w.createRange(),w.setStart(l.node,l.offset),y.removeAllRanges(),$>i?(y.addRange(w),y.extend(o.node,o.offset)):(w.setEnd(o.node,o.offset),y.addRange(w)))))),w=[],y=g;y=y.parentNode;)y.nodeType===1&&w.push({element:y,left:y.scrollLeft,top:y.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;g<w.length;g++)y=w[g],y.element.scrollLeft=y.left,y.element.scrollTop=y.top}ts=!!di,pi=di=null,e.current=n,j=r;do try{for(g=e;j!==null;){var S=j.flags;if(S&36&&Wd(g,j.alternate,j),S&128){w=void 0;var C=j.ref;if(C!==null){var T=j.stateNode;switch(j.tag){case 5:w=T;break;default:w=T}typeof C=="function"?C(w):C.current=w}}j=j.nextEffect}}catch(N){if(j===null)throw Error(k(330));xt(j,N),j=j.nextEffect}while(j!==null);j=null,_d(),L=s}else e.current=n;if(mt)mt=!1,wr=e,xr=t;else for(j=r;j!==null;)t=j.nextEffect,j.nextEffect=null,j.flags&8&&(S=j,S.sibling=null,S.stateNode=null),j=t;if(r=e.pendingLanes,r===0&&(Be=null),r===1?e===ol?Sr++:(Sr=0,ol=e):Sr=0,n=n.stateNode,Ot&&typeof Ot.onCommitFiberRoot=="function")try{Ot.onCommitFiberRoot(wi,n,void 0,(n.current.flags&64)===64)}catch{}if(je(e,ue()),Rs)throw Rs=!1,e=nl,nl=null,e;return L&8||De(),null}function Zd(){for(;j!==null;){var e=j.alternate;Ms||$r===null||(j.flags&8?Tu(j,$r)&&(Ms=!0):j.tag===13&&Qd(e,j)&&Tu(j,$r)&&(Ms=!0));var t=j.flags;t&256&&Kd(e,j),!(t&512)||mt||(mt=!0,or(97,function(){return wt(),null})),j=j.nextEffect}}function wt(){if(xr!==90){var e=97<xr?97:xr;return xr=90,_t(e,ep)}return!1}function bd(e,t){rl.push(t,e),mt||(mt=!0,or(97,function(){return wt(),null}))}function Ic(e,t){sl.push(t,e),mt||(mt=!0,or(97,function(){return wt(),null}))}function ep(){if(wr===null)return!1;var e=wr;if(wr=null,L&48)throw Error(k(331));var t=L;L|=32;var n=sl;sl=[];for(var r=0;r<n.length;r+=2){var s=n[r],o=n[r+1],i=s.destroy;if(s.destroy=void 0,typeof i=="function")try{i()}catch(u){if(o===null)throw Error(k(330));xt(o,u)}}for(n=rl,rl=[],r=0;r<n.length;r+=2){s=n[r],o=n[r+1];try{var l=s.create;s.destroy=l()}catch(u){if(o===null)throw Error(k(330));xt(o,u)}}for(l=e.current.firstEffect;l!==null;)e=l.nextEffect,l.nextEffect=null,l.flags&8&&(l.sibling=null,l.stateNode=null),l=e;return L=t,De(),!0}function Mc(e,t,n){t=Wi(n,t),t=wc(e,t,1),pt(e,t),t=xe(),e=Ds(e,1),e!==null&&(es(e,1,t),je(e,t))}function xt(e,t){if(e.tag===3)Mc(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){Mc(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Be===null||!Be.has(r))){e=Wi(t,e);var s=xc(n,e,1);if(pt(n,s),s=xe(),n=Ds(n,1),n!==null)es(n,1,s),je(n,s);else if(typeof r.componentDidCatch=="function"&&(Be===null||!Be.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function tp(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=xe(),e.pingedLanes|=e.suspendedLanes&n,de===e&&(ce&n)===n&&(re===4||re===3&&(ce&62914560)===ce&&500>ue()-el?$n(e,0):Zi|=n),je(e,t)}function np(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(et===0&&(et=vn),t=nn(62914560&~et),t===0&&(t=4194304)):t=dn()===99?1:2:t=1),n=xe(),e=Ds(e,t),e!==null&&(es(e,t,n),je(e,n))}var Dc;Dc=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||ge.current)Oe=!0;else if(n&r)Oe=!!(e.flags&16384);else{switch(Oe=!1,t.tag){case 3:ac(t),Oi();break;case 5:Ka(t);break;case 1:me(t.type)&&ds(t);break;case 4:Ni(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var s=t.type._context;K(ms,s._currentValue),s._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?cc(e,t,n):(K(W,W.current&1),t=Ze(e,t,n),t!==null?t.sibling:null);K(W,W.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return gc(e,t,n);t.flags|=64}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),K(W,W.current),r)break;return null;case 23:case 24:return t.lanes=0,Ui(e,t,n)}return Ze(e,t,n)}else Oe=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,s=hn(t,le.current),gn(t,n),s=zi(null,t,r,e,s,n),t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,me(r)){var o=!0;ds(t)}else o=!1;t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Ti(t);var i=r.getDerivedStateFromProps;typeof i=="function"&&ws(t,r,i,e),s.updater=xs,t.stateNode=s,s._reactInternals=t,ji(t,r,e,n),t=Bi(null,t,r,!0,o,n)}else t.tag=0,ve(null,t,s,n),t=t.child;return t;case 16:s=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=s._init,s=o(s._payload),t.type=s,o=t.tag=sp(s),e=Le(s,e),o){case 0:t=Vi(null,t,s,e,n);break e;case 1:t=uc(null,t,s,e,n);break e;case 11:t=sc(null,t,s,e,n);break e;case 14:t=oc(null,t,s,Le(s.type,e),r,n);break e}throw Error(k(306,s,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Le(r,s),Vi(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Le(r,s),uc(e,t,r,s,n);case 3:if(ac(t),r=t.updateQueue,e===null||r===null)throw Error(k(282));if(r=t.pendingProps,s=t.memoizedState,s=s!==null?s.element:null,za(e,t),ir(t,r,null,n),r=t.memoizedState.element,r===s)Oi(),t=Ze(e,t,n);else{if(s=t.stateNode,(o=s.hydrate)&&(gt=un(t.stateNode.containerInfo.firstChild),qe=t,o=Ue=!0),o){if(e=s.mutableSourceEagerHydrationData,e!=null)for(s=0;s<e.length;s+=2)o=e[s],o._workInProgressVersionPrimary=e[s+1],yn.push(o);for(n=Ha(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else ve(e,t,r,n),Oi();t=t.child}return t;case 5:return Ka(t),e===null&&Li(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,gi(r,s)?i=null:o!==null&&gi(r,o)&&(t.flags|=16),lc(e,t),ve(e,t,i,n),t.child;case 6:return e===null&&Li(t),null;case 13:return cc(e,t,n);case 4:return Ni(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ks(t,null,r,n):ve(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Le(r,s),sc(e,t,r,s,n);case 7:return ve(e,t,t.pendingProps,n),t.child;case 8:return ve(e,t,t.pendingProps.children,n),t.child;case 12:return ve(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value;var l=t.type._context;if(K(ms,l._currentValue),l._currentValue=o,i!==null)if(l=i.value,o=Pe(l,o)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(l,o):1073741823)|0,o===0){if(i.children===s.children&&!ge.current){t=Ze(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var u=l.dependencies;if(u!==null){i=l.child;for(var a=u.firstContext;a!==null;){if(a.context===r&&a.observedBits&o){l.tag===1&&(a=dt(-1,n&-n),a.tag=2,pt(l,a)),l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),Ra(l.return,n),u.lanes|=n;break}a=a.next}}else i=l.tag===10&&l.type===t.type?null:l.child;if(i!==null)i.return=l;else for(i=l;i!==null;){if(i===t){i=null;break}if(l=i.sibling,l!==null){l.return=i.return,i=l;break}i=i.return}l=i}ve(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,o=t.pendingProps,r=o.children,gn(t,n),s=Ee(s,o.unstable_observedBits),r=r(s),t.flags|=1,ve(e,t,r,n),t.child;case 14:return s=t.type,o=Le(s,t.pendingProps),o=Le(s.type,o),oc(e,t,s,o,r,n);case 15:return ic(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Le(r,s),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,me(r)?(e=!0,ds(t)):e=!1,gn(t,n),Ua(t,r,s),ji(t,r,s,n),Bi(null,t,r,!0,e,n);case 19:return gc(e,t,n);case 23:return Ui(e,t,n);case 24:return Ui(e,t,n)}throw Error(k(156,t.tag))};function rp(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Ne(e,t,n,r){return new rp(e,t,n,r)}function ul(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sp(e){if(typeof e=="function")return ul(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Vr)return 11;if(e===Hr)return 14}return 2}function St(e,t){var n=e.alternate;return n===null?(n=Ne(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Us(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")ul(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case nt:return kn(n.children,s,o,t);case ou:i=8,s|=16;break;case vo:i=8,s|=1;break;case Rn:return e=Ne(12,n,t,s|8),e.elementType=Rn,e.type=Rn,e.lanes=o,e;case zn:return e=Ne(13,n,t,s),e.type=zn,e.elementType=zn,e.lanes=o,e;case Br:return e=Ne(19,n,t,s),e.elementType=Br,e.lanes=o,e;case Co:return al(n,s,o,t);case Po:return e=Ne(24,n,t,s),e.elementType=Po,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case wo:i=10;break e;case xo:i=9;break e;case Vr:i=11;break e;case Hr:i=14;break e;case So:i=16,r=null;break e;case $o:i=22;break e}throw Error(k(130,e==null?e:typeof e,""))}return t=Ne(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function kn(e,t,n,r){return e=Ne(7,e,r,t),e.lanes=n,e}function al(e,t,n,r){return e=Ne(23,e,r,t),e.elementType=Co,e.lanes=n,e}function cl(e,t,n){return e=Ne(6,e,null,t),e.lanes=n,e}function fl(e,t,n){return t=Ne(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function op(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=qo(0),this.expirationTimes=qo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qo(0),this.mutableSourceEagerHydrationData=null}function ip(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Tt,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Vs(e,t,n,r){var s=t.current,o=xe(),i=yt(s);e:if(n){n=n._reactInternals;t:{if(Nt(n)!==n||n.tag!==1)throw Error(k(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(me(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(l!==null);throw Error(k(171))}if(n.tag===1){var u=n.type;if(me(u)){n=Ca(n,u,l);break e}}n=l}else n=ft;return t.context===null?t.context=n:t.pendingContext=n,t=dt(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),pt(s,t),vt(s,i,o),i}function hl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Fc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function dl(e,t){Fc(e,t),(e=e.alternate)&&Fc(e,t)}function lp(){return null}function pl(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new op(e,t,n!=null&&n.hydrate===!0),t=Ne(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,Ti(t),e[an]=n.current,da(e.nodeType===8?e.parentNode:e),r)for(e=0;e<r.length;e++){t=r[e];var s=t._getVersion;s=s(t._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[t,s]:n.mutableSourceEagerHydrationData.push(t,s)}this._internalRoot=n}pl.prototype.render=function(e){Vs(e,this._internalRoot,null,null)},pl.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Vs(null,e,null,function(){t[an]=null})};function Cr(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function up(e,t){if(t||(t=e?e.nodeType===9?e.documentElement:e.firstChild:null,t=!(!t||t.nodeType!==1||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new pl(e,0,t?{hydrate:!0}:void 0)}function Bs(e,t,n,r,s){var o=n._reactRootContainer;if(o){var i=o._internalRoot;if(typeof s=="function"){var l=s;s=function(){var a=hl(i);l.call(a)}}Vs(t,i,e,s)}else{if(o=n._reactRootContainer=up(n,r),i=o._internalRoot,typeof s=="function"){var u=s;s=function(){var a=hl(i);u.call(a)}}Lc(function(){Vs(t,i,e,s)})}return hl(i)}ju=function(e){if(e.tag===13){var t=xe();vt(e,4,t),dl(e,4)}},Wo=function(e){if(e.tag===13){var t=xe();vt(e,67108864,t),dl(e,67108864)}},Nu=function(e){if(e.tag===13){var t=xe(),n=yt(e);vt(e,n,t),dl(e,n)}},Au=function(e,t){return t()},Do=function(e,t,n){switch(t){case"input":if(No(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=fs(r);if(!s)throw Error(k(90));uu(r),No(r,s)}}}break;case"textarea":du(e,n);break;case"select":t=n.value,t!=null&&qt(e,!!n.multiple,t,!1)}},Fo=Ac,$u=function(e,t,n,r,s){var o=L;L|=4;try{return _t(98,e.bind(null,t,n,r,s))}finally{L=o,L===0&&(xn(),De())}},Uo=function(){!(L&49)&&(Jd(),wt())},ku=function(e,t){var n=L;L|=2;try{return e(t)}finally{L=n,L===0&&(xn(),De())}};function Uc(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Cr(t))throw Error(k(200));return ip(e,t,null,n)}var ap={Events:[sr,cn,fs,xu,Su,wt,{current:!1}]},Pr={findFiberByHostInstance:At,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},cp={bundleType:Pr.bundleType,version:Pr.version,rendererPackageName:Pr.rendererPackageName,rendererConfig:Pr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Et.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Eu(e),e===null?null:e.stateNode},findFiberByHostInstance:Pr.findFiberByHostInstance||lp,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hs.isDisabled&&Hs.supportsFiber)try{wi=Hs.inject(cp),Ot=Hs}catch{}}Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ap,Ce.createPortal=Uc,Ce.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(k(188)):Error(k(268,Object.keys(e)));return e=Eu(t),e=e===null?null:e.stateNode,e},Ce.flushSync=function(e,t){var n=L;if(n&48)return e(t);L|=1;try{if(e)return _t(99,e.bind(null,t))}finally{L=n,De()}},Ce.hydrate=function(e,t,n){if(!Cr(t))throw Error(k(200));return Bs(null,e,t,!0,n)},Ce.render=function(e,t,n){if(!Cr(t))throw Error(k(200));return Bs(null,e,t,!1,n)},Ce.unmountComponentAtNode=function(e){if(!Cr(e))throw Error(k(40));return e._reactRootContainer?(Lc(function(){Bs(null,null,e,!1,function(){e._reactRootContainer=null,e[an]=null})}),!0):!1},Ce.unstable_batchedUpdates=Ac,Ce.unstable_createPortal=function(e,t){return Uc(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)},Ce.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Cr(n))throw Error(k(200));if(e==null||e._reactInternals===void 0)throw Error(k(38));return Bs(e,t,n,!1,r)},Ce.version="17.0.2";function Vc(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Vc)}catch(e){console.error(e)}}Vc(),Zl.exports=Ce;var gl=Zl.exports;const fp=pe(gl),fe=tt.createContext({posts:[],authors:[],tags:[],action:"",lastPage:"",page:"",pageData:{},dispatch:(e,t)=>{},searchIndex:null,indexComplete:!1,searchValue:"",t:()=>{},dir:"ltr"});class hp extends R.Component{constructor(){super(...arguments);io(this,"handleLoad",()=>{this.setupFrameBaseStyle()})}componentDidMount(){this.node.addEventListener("load",this.handleLoad)}componentWillUnmout(){this.node.removeEventListener("load",this.handleLoad)}setupFrameBaseStyle(){this.node.contentDocument&&(this.iframeHtml=this.node.contentDocument.documentElement,this.iframeHtml.setAttribute("dir",this.props.searchdir),this.iframeHead=this.node.contentDocument.head,this.iframeRoot=this.node.contentDocument.body,this.forceUpdate())}render(){const{children:n,head:r,title:s="",style:o={},...i}=this.props;return P.jsxs("iframe",{srcDoc:"<!DOCTYPE html>",...i,ref:l=>this.node=l,title:s,style:o,frameBorder:"0",children:[this.iframeHead&&gl.createPortal(r,this.iframeHead),this.iframeRoot&&gl.createPortal(n,this.iframeRoot)]})}}const dp=e=>R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:16,width:16,...e},R.createElement("path",{d:"M23.38,21.62l-6.53-6.53a9.15,9.15,0,0,0,1.9-5.59,9.27,9.27,0,1,0-3.66,7.36l6.53,6.53a1.26,1.26,0,0,0,1.76,0A1.25,1.25,0,0,0,23.38,21.62ZM2.75,9.5A6.75,6.75,0,1,1,9.5,16.25,6.76,6.76,0,0,1,2.75,9.5Z",fill:"currentColor"})),pp=e=>R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:16,width:16,...e},R.createElement("path",{strokeLinecap:"round",strokeWidth:.4,fill:"currentColor",stroke:"#000000",strokeLinejoin:"round",d:"M.44,21.44a1.49,1.49,0,0,0,0,2.12,1.5,1.5,0,0,0,2.12,0l9.26-9.26a.25.25,0,0,1,.36,0l9.26,9.26a1.5,1.5,0,0,0,2.12,0,1.49,1.49,0,0,0,0-2.12L14.3,12.18a.25.25,0,0,1,0-.36l9.26-9.26A1.5,1.5,0,0,0,21.44.44L12.18,9.7a.25.25,0,0,1-.36,0L2.56.44A1.5,1.5,0,0,0,.44,2.56L9.7,11.82a.25.25,0,0,1,0,.36Z"})),gp=e=>R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:16,width:16,viewBox:"0 0 16 16",...e},R.createElement("title",null,"circle anim"),R.createElement("g",{fill:"#40413F",className:"nc-icon-wrapper"},R.createElement("g",{className:"nc-loop-circle-16-icon-f"},R.createElement("path",{d:"M8 16a8 8 0 1 1 8-8 8.009 8.009 0 0 1-8 8zM8 2a6 6 0 1 0 6 6 6.006 6.006 0 0 0-6-6z",fill:"#D4D4D4"}),R.createElement("path",{d:"M8 0v2a6.006 6.006 0 0 1 6 6h2a8.009 8.009 0 0 0-8-8z","data-color":"color-2"})),R.createElement("style",null,".nc-loop-circle-16-icon-f{--animation-duration:0.5s;transform-origin:8px 8px;animation:nc-loop-circle-anim var(--animation-duration) infinite linear}@keyframes nc-loop-circle-anim{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}"))),Bc=10,mp=10,yp=()=>({modalContainer:{zIndex:"3999999",position:"fixed",left:"0",top:"0",width:"100%",height:"100%",overflow:"hidden"},frame:{common:{margin:"auto",position:"relative",padding:"0",outline:"0",width:"100%",opacity:"1",overflow:"hidden",height:"100%"}},page:{links:{width:"600px"}}});class Hc extends tt.Component{componentDidMount(){this.sendContainerHeightChangeEvent()}sendContainerHeightChangeEvent(){}componentDidUpdate(){this.sendContainerHeightChangeEvent()}handlePopupClose(t){t.preventDefault(),t.target===t.currentTarget&&this.context.dispatch("update",{showPopup:!1})}render(){return P.jsx(zp,{})}}io(Hc,"contextType",fe);function vp(){const{searchValue:e,dispatch:t,inputRef:n,t:r}=R.useContext(fe),s=R.useRef(null);R.useEffect(()=>{setTimeout(()=>{var u;(u=n==null?void 0:n.current)==null||u.focus()},150);let i=u=>{u.key==="Escape"&&t("update",{showPopup:!1})};const l=s==null?void 0:s.current;return l==null||l.ownerDocument.removeEventListener("keyup",i),l==null||l.ownerDocument.addEventListener("keyup",i),()=>{l==null||l.ownerDocument.removeEventListener("keyup",i)}},[t,n]);let o="z-10 relative flex items-center py-5 px-4 sm:px-7 bg-white rounded-t-lg shadow";return e||(o="z-10 relative flex items-center py-5 px-4 sm:px-7 bg-white rounded-lg"),P.jsxs("div",{className:o,ref:s,children:[P.jsx("div",{className:"flex items-center justify-center w-4 h-4 me-3",children:P.jsx(wp,{})}),P.jsx("input",{ref:n,value:e||"",onChange:i=>{t("update",{searchValue:i.target.value})},onKeyDown:i=>{(i.key==="ArrowUp"||i.key==="ArrowDown")&&i.preventDefault()},className:"grow -my-5 py-5 -ms-3 ps-3 text-[1.65rem] focus-visible:outline-none placeholder:text-gray-400 outline-none truncate",placeholder:r("Search posts, tags and authors")}),P.jsx(xp,{}),P.jsx(Sp,{})]})}function wp(){const{searchValue:e="",dispatch:t}=R.useContext(fe);return e?P.jsx("button",{alt:"Clear",className:"-mb-[1px]",onClick:()=>{t("update",{searchValue:""})},children:P.jsx(pp,{className:"text-neutral-900 hover:text-neutral-500 h-[1.1rem] w-[1.1rem]"})}):P.jsx(dp,{className:"text-neutral-900",alt:"Search"})}function xp(){const{indexComplete:e,searchValue:t}=R.useContext(fe);return!e&&t?P.jsx(gp,{className:"shrink-0"}):null}function Sp(){const{dispatch:e,t}=R.useContext(fe);return P.jsx("button",{className:"ms-3 text-sm text-neutral-500 sm:hidden",alt:"Cancel",onClick:()=>{e("update",{showPopup:!1})},children:t("Cancel")})}function $p({tag:e,selectedResult:t,setSelectedResult:n}){const{name:r,url:s,id:o}=e;let i="flex items-center py-3 -mx-4 sm:-mx-7 px-4 sm:px-7 cursor-pointer";return o===t&&(i+=" bg-neutral-100"),P.jsxs("div",{className:i,onClick:()=>{s&&(window.location.href=s)},onMouseEnter:()=>{n(o)},children:[P.jsx("p",{className:"me-2 text-sm font-bold text-neutral-400",children:"#"}),P.jsx("h2",{className:"text-[1.65rem] font-medium leading-tight text-neutral-900 truncate",children:r})]})}function kp({tags:e,selectedResult:t,setSelectedResult:n}){const{t:r}=R.useContext(fe);if(!(e!=null&&e.length))return null;const s=e.map(o=>P.jsx($p,{tag:o,selectedResult:t,setSelectedResult:n},o.name));return P.jsxs("div",{className:"border-t border-gray-200 py-3 px-4 sm:px-7",children:[P.jsx("h1",{className:"uppercase text-xs text-neutral-400 font-semibold mb-1 tracking-wide",children:r("Tags")}),s]})}function Cp({post:e,selectedResult:t,setSelectedResult:n}){const{searchValue:r}=R.useContext(fe),{title:s,excerpt:o,url:i,id:l}=e;let u="py-3 -mx-4 sm:-mx-7 px-4 sm:px-7 cursor-pointer";return l===t&&(u+=" bg-neutral-100"),P.jsxs("div",{className:u,onClick:()=>{i&&(window.location.href=i)},onMouseEnter:()=>{n(l)},children:[P.jsx("h2",{className:"text-[1.65rem] font-medium leading-tight text-neutral-800",children:P.jsx(Wc,{text:s,highlight:r,isExcerpt:!1})}),P.jsx("p",{className:"text-neutral-400 leading-normal text-sm mt-0 mb-0 truncate",children:P.jsx(Wc,{text:o,highlight:r,isExcerpt:!0})})]})}function Pp({text:e,highlight:t}){let n="";t==null||t.split(" ").forEach((i,l)=>{const u=String(i).replace(/\W/g,"\\&");l>0?n+="|^"+u+"|\\s"+u:n="^"+u+"|\\s"+u});const r=new RegExp(`${n}`,"ig");let s=e==null?void 0:e.matchAll(r);const o=[];for(const i of s)o.push({startIdx:i==null?void 0:i.index,endIdx:((i==null?void 0:i.index)||0)+((i==null?void 0:i[0].length)||0)});return o}function Kc({text:e,highlight:t}){const n=Pp({text:e,highlight:t}),r=[];let s=0;return n.forEach(o=>{s===o.startIdx?(r.push({text:e==null?void 0:e.slice(o.startIdx,o.endIdx),type:"highlight"}),s=o.endIdx):(r.push({text:e==null?void 0:e.slice(s,o.startIdx),type:"normal"}),r.push({text:e==null?void 0:e.slice(o.startIdx,o.endIdx),type:"highlight"}),s=o.endIdx)}),s<(e==null?void 0:e.length)&&r.push({text:e==null?void 0:e.slice(s,e.length),type:"normal"}),{parts:r,highlightIndexes:n}}function Wc({text:e="",highlight:t="",isExcerpt:n}){var i;e=e||"",t=t||"";let{parts:r,highlightIndexes:s}=Kc({text:e,highlight:t});if(n&&(s!=null&&s[0])){const l=(i=s==null?void 0:s[0])==null?void 0:i.startIdx;if(l>50){e="..."+(e==null?void 0:e.slice(l-20));const{parts:u}=Kc({text:e,highlight:t});r=u}}const o=r.map((l,u)=>(l==null?void 0:l.type)==="highlight"?P.jsx(tt.Fragment,{children:P.jsx(Ep,{word:l.text,isExcerpt:n})},u):P.jsx(tt.Fragment,{children:l.text},u));return P.jsx(P.Fragment,{children:o})}function Ep({word:e,isExcerpt:t}){return t?P.jsx(P.Fragment,{children:P.jsx("span",{className:"font-bold",children:e})}):P.jsx(P.Fragment,{children:P.jsx("span",{className:"font-bold text-neutral-900",children:e})})}function Tp({posts:e,maxPosts:t,setMaxPosts:n}){const{t:r}=R.useContext(fe);return!(e!=null&&e.length)||t>=(e==null?void 0:e.length)?null:P.jsx("button",{className:"w-full my-3 p-[1rem] border border-neutral-200 hover:border-neutral-300 text-neutral-800 hover:text-black font-semibold rounded transition duration-150 ease hover:ease",onClick:()=>{const s=t+mp;n(s)},children:r("Show more results")})}function jp({posts:e,selectedResult:t,setSelectedResult:n}){const{t:r}=R.useContext(fe),[s,o]=R.useState(Bc),[i,l]=R.useState([]);if(R.useEffect(()=>{o(Bc)},[e]),R.useEffect(()=>{l(e==null?void 0:e.slice(0,s+1))},[s,e]),!(e!=null&&e.length))return null;function u(){return i.map(a=>P.jsx(Cp,{post:a,selectedResult:t,setSelectedResult:n},a.title))}return P.jsxs("div",{className:"border-t border-neutral-200 py-3 px-4 sm:px-7",children:[P.jsx("h1",{className:"uppercase text-xs text-neutral-400 font-semibold mb-1 tracking-wide",children:r("Posts")}),P.jsx(u,{}),P.jsx(Tp,{setMaxPosts:o,maxPosts:s,posts:e})]})}function Np({author:e,selectedResult:t,setSelectedResult:n}){const{name:r,profile_image:s,url:o,id:i}=e;let l="py-[1rem] -mx-4 sm:-mx-7 px-4 sm:px-7 cursor-pointer flex items-center";return i===t&&(l+=" bg-neutral-100"),P.jsxs("div",{className:l,onClick:()=>{o&&(window.location.href=o)},onMouseEnter:()=>{n(i)},children:[P.jsx(Ap,{name:r,avatar:s}),P.jsx("h2",{className:"text-[1.65rem] font-medium leading-tight text-neutral-900 truncate",children:r})]})}function Ap({name:e,avatar:t}){const n=t==null?void 0:t.length,r=e.charAt(0);return n?P.jsx("img",{className:"rounded-full bg-neutral-300 w-7 h-7 me-2 object-cover",src:t,alt:e}):P.jsx("div",{className:"rounded-full bg-neutral-200 w-7 h-7 me-2 flex items-center justify-center font-bold",children:P.jsx("span",{className:"text-neutral-400",children:r})})}function Lp({authors:e,selectedResult:t,setSelectedResult:n}){const{t:r}=R.useContext(fe);if(!(e!=null&&e.length))return null;const s=e.map(o=>P.jsx(Np,{author:o,selectedResult:t,setSelectedResult:n},o.name));return P.jsxs("div",{className:"border-t border-neutral-200 py-3 px-4 sm:px-7",children:[P.jsx("h1",{className:"uppercase text-xs text-neutral-400 font-semibold mb-1 tracking-wide",children:r("Authors")}),s]})}function Op(){const{searchValue:e="",searchIndex:t,indexComplete:n}=R.useContext(fe);let r=null,s=[],o=[],i=[];return n&&e&&(r=t==null?void 0:t.search(e),o=(r==null?void 0:r.posts)||[],i=(r==null?void 0:r.authors)||[],s=(r==null?void 0:r.tags)||[]),i=i.filter(u=>{const a=/\/404\/$/;return!(u!=null&&u.url&&a.test(u==null?void 0:u.url))}),s=s.filter(u=>{const a=/\/404\/$/;return!(u!=null&&u.url&&a.test(u==null?void 0:u.url))}),(o==null?void 0:o.length)||(i==null?void 0:i.length)||(s==null?void 0:s.length)?P.jsx(_p,{posts:o,authors:i,tags:s}):e?P.jsx(Rp,{}):null}function _p({posts:e,authors:t,tags:n}){var a;const{searchValue:r}=R.useContext(fe),s=R.useMemo(()=>[...t,...n,...e],[t,n,e]),o=((a=s==null?void 0:s[0])==null?void 0:a.id)||null,[i,l]=R.useState(o),u=R.useRef(null);return R.useEffect(()=>{var f;l(((f=s==null?void 0:s[0])==null?void 0:f.id)||null)},[s]),R.useEffect(()=>{let f=c=>{const m=s.findIndex(h=>h.id===i);let v=s[m+1],x=s[m-1];if(c.key==="ArrowUp"&&x?l(x==null?void 0:x.id):c.key==="ArrowDown"&&v&&l(v==null?void 0:v.id),c.key==="Enter"){const h=s.find(d=>d.id===i);window.location.href=h==null?void 0:h.url}};const p=u==null?void 0:u.current;return p==null||p.ownerDocument.removeEventListener("keyup",f),p==null||p.ownerDocument.addEventListener("keyup",f),()=>{var c;(c=p==null?void 0:p.ownerDocument)==null||c.removeEventListener("keyup",f)}},[s,i]),r?P.jsxs("div",{className:"overflow-y-auto max-h-[calc(100vh-172px)] sm:max-h-[70vh] -mt-[1px]",ref:u,children:[P.jsx(Lp,{authors:t,selectedResult:i,setSelectedResult:l}),P.jsx(kp,{tags:n,selectedResult:i,setSelectedResult:l}),P.jsx(jp,{posts:e,selectedResult:i,setSelectedResult:l})]}):null}function Rp(){const{t:e}=R.useContext(fe);return P.jsx("div",{className:"py-4 px-7",children:P.jsx("p",{className:"text-[1.65rem] text-neutral-400 leading-normal",children:e("No matches found")})})}function zp(){const{dispatch:e}=R.useContext(fe);return P.jsx(P.Fragment,{children:P.jsx("div",{className:"h-screen w-screen pt-20 antialiased z-50 relative ghost-display",onClick:t=>{t.preventDefault(),t.target===t.currentTarget&&e("update",{showPopup:!1})},children:P.jsxs("div",{className:"bg-white w-full max-w-[95vw] sm:max-w-lg rounded-lg shadow-xl m-auto relative translate-z-0 animate-popup",children:[P.jsx(vp,{}),P.jsx(Op,{})]})})})}class Qc extends tt.Component{constructor(t){super(t),this.state={height:null}}onHeightChange(t){this.setState({height:t})}handlePopupClose(t){t.preventDefault(),t.target===t.currentTarget&&this.context.dispatch("update",{showPopup:!1})}renderFrameStyles(){const t=`
|
|
42
|
+
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}re!==5&&(re=2),u=Wi(u,l),c=i;do{switch(c.tag){case 3:o=u,c.flags|=4096,t&=-t,c.lanes|=t;var $=wc(c,o,t);Ia(c,$);break e;case 1:o=u;var S=c.type,C=c.stateNode;if(!(c.flags&64)&&(typeof S.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(Be===null||!Be.has(C)))){c.flags|=4096,t&=-t,c.lanes|=t;var T=xc(c,o,t);Ia(c,T);break e}}c=c.return}while(c!==null)}zc(n)}catch(N){t=N,q===n&&n!==null&&(q=n=n.return);continue}break}while(!0)}function _c(){var e=Os.current;return Os.current=As,e===null?As:e}function kr(e,t){var n=L;L|=16;var r=_c();de===e&&ce===t||$n(e,t);do try{Gd();break}catch(s){Oc(e,s)}while(!0);if(Pi(),L=n,Os.current=r,q!==null)throw Error(k(261));return de=null,ce=0,re}function Gd(){for(;q!==null;)Rc(q)}function Xd(){for(;q!==null&&!Ld();)Rc(q)}function Rc(e){var t=Dc(e.alternate,e,Mt);e.memoizedProps=e.pendingProps,t===null?zc(e):q=t,Xi.current=null}function zc(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=Vd(t),n!==null){n.flags&=2047,q=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=Ud(n,t,Mt),n!==null){q=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||Mt&1073741824||!(n.mode&4)){for(var r=0,s=n.child;s!==null;)r|=s.lanes|s.childLanes,s=s.sibling;n.childLanes=r}e!==null&&!(e.flags&2048)&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(e.lastEffect!==null?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}if(t=t.sibling,t!==null){q=t;return}q=t=e}while(t!==null);re===0&&(re=5)}function Dt(e){var t=dn();return _t(99,qd.bind(null,e,t)),null}function qd(e,t){do wt();while(wr!==null);if(L&48)throw Error(k(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(k(177));e.callbackNode=null;var r=n.lanes|n.childLanes,s=r,o=e.pendingLanes&~s;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=s,e.mutableReadLanes&=s,e.entangledLanes&=s,s=e.entanglements;for(var i=e.eventTimes,l=e.expirationTimes;0<o;){var u=31-lt(o),a=1<<u;s[u]=0,i[u]=-1,l[u]=-1,o&=~a}if(be!==null&&!(r&24)&&be.has(e)&&be.delete(e),e===de&&(q=de=null,ce=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(s=L,L|=32,Xi.current=null,di=ts,i=la(),ai(i)){if("selectionStart"in i)l={start:i.selectionStart,end:i.selectionEnd};else e:if(l=(l=i.ownerDocument)&&l.defaultView||window,(a=l.getSelection&&l.getSelection())&&a.rangeCount!==0){l=a.anchorNode,o=a.anchorOffset,u=a.focusNode,a=a.focusOffset;try{l.nodeType,u.nodeType}catch{l=null;break e}var f=0,p=-1,c=-1,m=0,v=0,x=i,h=null;t:for(;;){for(var d;x!==l||o!==0&&x.nodeType!==3||(p=f+o),x!==u||a!==0&&x.nodeType!==3||(c=f+a),x.nodeType===3&&(f+=x.nodeValue.length),(d=x.firstChild)!==null;)h=x,x=d;for(;;){if(x===i)break t;if(h===l&&++m===o&&(p=f),h===u&&++v===a&&(c=f),(d=x.nextSibling)!==null)break;x=h,h=x.parentNode}x=d}l=p===-1||c===-1?null:{start:p,end:c}}else l=null;l=l||{start:0,end:0}}else l=null;pi={focusedElem:i,selectionRange:l},ts=!1,$r=null,Ms=!1,j=r;do try{Zd()}catch(N){if(j===null)throw Error(k(330));xt(j,N),j=j.nextEffect}while(j!==null);$r=null,j=r;do try{for(i=e;j!==null;){var g=j.flags;if(g&16&&Dn(j.stateNode,""),g&128){var w=j.alternate;if(w!==null){var y=w.ref;y!==null&&(typeof y=="function"?y(null):y.current=null)}}switch(g&1038){case 2:Ec(j),j.flags&=-3;break;case 6:Ec(j),j.flags&=-3,Gi(j.alternate,j);break;case 1024:j.flags&=-1025;break;case 1028:j.flags&=-1025,Gi(j.alternate,j);break;case 4:Gi(j.alternate,j);break;case 8:l=j,Tc(i,l);var $=l.alternate;Cc(l),$!==null&&Cc($)}j=j.nextEffect}}catch(N){if(j===null)throw Error(k(330));xt(j,N),j=j.nextEffect}while(j!==null);if(y=pi,w=la(),g=y.focusedElem,i=y.selectionRange,w!==g&&g&&g.ownerDocument&&ia(g.ownerDocument.documentElement,g)){for(i!==null&&ai(g)&&(w=i.start,y=i.end,y===void 0&&(y=w),"selectionStart"in g?(g.selectionStart=w,g.selectionEnd=Math.min(y,g.value.length)):(y=(w=g.ownerDocument||document)&&w.defaultView||window,y.getSelection&&(y=y.getSelection(),l=g.textContent.length,$=Math.min(i.start,l),i=i.end===void 0?$:Math.min(i.end,l),!y.extend&&$>i&&(l=i,i=$,$=l),l=oa(g,$),o=oa(g,i),l&&o&&(y.rangeCount!==1||y.anchorNode!==l.node||y.anchorOffset!==l.offset||y.focusNode!==o.node||y.focusOffset!==o.offset)&&(w=w.createRange(),w.setStart(l.node,l.offset),y.removeAllRanges(),$>i?(y.addRange(w),y.extend(o.node,o.offset)):(w.setEnd(o.node,o.offset),y.addRange(w)))))),w=[],y=g;y=y.parentNode;)y.nodeType===1&&w.push({element:y,left:y.scrollLeft,top:y.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;g<w.length;g++)y=w[g],y.element.scrollLeft=y.left,y.element.scrollTop=y.top}ts=!!di,pi=di=null,e.current=n,j=r;do try{for(g=e;j!==null;){var S=j.flags;if(S&36&&Wd(g,j.alternate,j),S&128){w=void 0;var C=j.ref;if(C!==null){var T=j.stateNode;switch(j.tag){case 5:w=T;break;default:w=T}typeof C=="function"?C(w):C.current=w}}j=j.nextEffect}}catch(N){if(j===null)throw Error(k(330));xt(j,N),j=j.nextEffect}while(j!==null);j=null,_d(),L=s}else e.current=n;if(mt)mt=!1,wr=e,xr=t;else for(j=r;j!==null;)t=j.nextEffect,j.nextEffect=null,j.flags&8&&(S=j,S.sibling=null,S.stateNode=null),j=t;if(r=e.pendingLanes,r===0&&(Be=null),r===1?e===ol?Sr++:(Sr=0,ol=e):Sr=0,n=n.stateNode,Ot&&typeof Ot.onCommitFiberRoot=="function")try{Ot.onCommitFiberRoot(wi,n,void 0,(n.current.flags&64)===64)}catch{}if(je(e,ue()),Rs)throw Rs=!1,e=nl,nl=null,e;return L&8||De(),null}function Zd(){for(;j!==null;){var e=j.alternate;Ms||$r===null||(j.flags&8?Tu(j,$r)&&(Ms=!0):j.tag===13&&Qd(e,j)&&Tu(j,$r)&&(Ms=!0));var t=j.flags;t&256&&Kd(e,j),!(t&512)||mt||(mt=!0,or(97,function(){return wt(),null})),j=j.nextEffect}}function wt(){if(xr!==90){var e=97<xr?97:xr;return xr=90,_t(e,ep)}return!1}function bd(e,t){rl.push(t,e),mt||(mt=!0,or(97,function(){return wt(),null}))}function Ic(e,t){sl.push(t,e),mt||(mt=!0,or(97,function(){return wt(),null}))}function ep(){if(wr===null)return!1;var e=wr;if(wr=null,L&48)throw Error(k(331));var t=L;L|=32;var n=sl;sl=[];for(var r=0;r<n.length;r+=2){var s=n[r],o=n[r+1],i=s.destroy;if(s.destroy=void 0,typeof i=="function")try{i()}catch(u){if(o===null)throw Error(k(330));xt(o,u)}}for(n=rl,rl=[],r=0;r<n.length;r+=2){s=n[r],o=n[r+1];try{var l=s.create;s.destroy=l()}catch(u){if(o===null)throw Error(k(330));xt(o,u)}}for(l=e.current.firstEffect;l!==null;)e=l.nextEffect,l.nextEffect=null,l.flags&8&&(l.sibling=null,l.stateNode=null),l=e;return L=t,De(),!0}function Mc(e,t,n){t=Wi(n,t),t=wc(e,t,1),pt(e,t),t=xe(),e=Ds(e,1),e!==null&&(es(e,1,t),je(e,t))}function xt(e,t){if(e.tag===3)Mc(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){Mc(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Be===null||!Be.has(r))){e=Wi(t,e);var s=xc(n,e,1);if(pt(n,s),s=xe(),n=Ds(n,1),n!==null)es(n,1,s),je(n,s);else if(typeof r.componentDidCatch=="function"&&(Be===null||!Be.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function tp(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=xe(),e.pingedLanes|=e.suspendedLanes&n,de===e&&(ce&n)===n&&(re===4||re===3&&(ce&62914560)===ce&&500>ue()-el?$n(e,0):Zi|=n),je(e,t)}function np(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(et===0&&(et=vn),t=nn(62914560&~et),t===0&&(t=4194304)):t=dn()===99?1:2:t=1),n=xe(),e=Ds(e,t),e!==null&&(es(e,t,n),je(e,n))}var Dc;Dc=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||ge.current)Oe=!0;else if(n&r)Oe=!!(e.flags&16384);else{switch(Oe=!1,t.tag){case 3:ac(t),Oi();break;case 5:Ka(t);break;case 1:me(t.type)&&ds(t);break;case 4:Ni(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var s=t.type._context;K(ms,s._currentValue),s._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?cc(e,t,n):(K(W,W.current&1),t=Ze(e,t,n),t!==null?t.sibling:null);K(W,W.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return gc(e,t,n);t.flags|=64}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),K(W,W.current),r)break;return null;case 23:case 24:return t.lanes=0,Ui(e,t,n)}return Ze(e,t,n)}else Oe=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,s=hn(t,le.current),gn(t,n),s=zi(null,t,r,e,s,n),t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,me(r)){var o=!0;ds(t)}else o=!1;t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Ti(t);var i=r.getDerivedStateFromProps;typeof i=="function"&&ws(t,r,i,e),s.updater=xs,t.stateNode=s,s._reactInternals=t,ji(t,r,e,n),t=Bi(null,t,r,!0,o,n)}else t.tag=0,ve(null,t,s,n),t=t.child;return t;case 16:s=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=s._init,s=o(s._payload),t.type=s,o=t.tag=sp(s),e=Le(s,e),o){case 0:t=Vi(null,t,s,e,n);break e;case 1:t=uc(null,t,s,e,n);break e;case 11:t=sc(null,t,s,e,n);break e;case 14:t=oc(null,t,s,Le(s.type,e),r,n);break e}throw Error(k(306,s,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Le(r,s),Vi(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Le(r,s),uc(e,t,r,s,n);case 3:if(ac(t),r=t.updateQueue,e===null||r===null)throw Error(k(282));if(r=t.pendingProps,s=t.memoizedState,s=s!==null?s.element:null,za(e,t),ir(t,r,null,n),r=t.memoizedState.element,r===s)Oi(),t=Ze(e,t,n);else{if(s=t.stateNode,(o=s.hydrate)&&(gt=un(t.stateNode.containerInfo.firstChild),qe=t,o=Ue=!0),o){if(e=s.mutableSourceEagerHydrationData,e!=null)for(s=0;s<e.length;s+=2)o=e[s],o._workInProgressVersionPrimary=e[s+1],yn.push(o);for(n=Ha(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else ve(e,t,r,n),Oi();t=t.child}return t;case 5:return Ka(t),e===null&&Li(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,gi(r,s)?i=null:o!==null&&gi(r,o)&&(t.flags|=16),lc(e,t),ve(e,t,i,n),t.child;case 6:return e===null&&Li(t),null;case 13:return cc(e,t,n);case 4:return Ni(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ks(t,null,r,n):ve(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Le(r,s),sc(e,t,r,s,n);case 7:return ve(e,t,t.pendingProps,n),t.child;case 8:return ve(e,t,t.pendingProps.children,n),t.child;case 12:return ve(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value;var l=t.type._context;if(K(ms,l._currentValue),l._currentValue=o,i!==null)if(l=i.value,o=Pe(l,o)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(l,o):1073741823)|0,o===0){if(i.children===s.children&&!ge.current){t=Ze(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var u=l.dependencies;if(u!==null){i=l.child;for(var a=u.firstContext;a!==null;){if(a.context===r&&a.observedBits&o){l.tag===1&&(a=dt(-1,n&-n),a.tag=2,pt(l,a)),l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),Ra(l.return,n),u.lanes|=n;break}a=a.next}}else i=l.tag===10&&l.type===t.type?null:l.child;if(i!==null)i.return=l;else for(i=l;i!==null;){if(i===t){i=null;break}if(l=i.sibling,l!==null){l.return=i.return,i=l;break}i=i.return}l=i}ve(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,o=t.pendingProps,r=o.children,gn(t,n),s=Ee(s,o.unstable_observedBits),r=r(s),t.flags|=1,ve(e,t,r,n),t.child;case 14:return s=t.type,o=Le(s,t.pendingProps),o=Le(s.type,o),oc(e,t,s,o,r,n);case 15:return ic(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Le(r,s),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,me(r)?(e=!0,ds(t)):e=!1,gn(t,n),Ua(t,r,s),ji(t,r,s,n),Bi(null,t,r,!0,e,n);case 19:return gc(e,t,n);case 23:return Ui(e,t,n);case 24:return Ui(e,t,n)}throw Error(k(156,t.tag))};function rp(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Ne(e,t,n,r){return new rp(e,t,n,r)}function ul(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sp(e){if(typeof e=="function")return ul(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Vr)return 11;if(e===Hr)return 14}return 2}function St(e,t){var n=e.alternate;return n===null?(n=Ne(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Us(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")ul(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case nt:return kn(n.children,s,o,t);case ou:i=8,s|=16;break;case vo:i=8,s|=1;break;case Rn:return e=Ne(12,n,t,s|8),e.elementType=Rn,e.type=Rn,e.lanes=o,e;case zn:return e=Ne(13,n,t,s),e.type=zn,e.elementType=zn,e.lanes=o,e;case Br:return e=Ne(19,n,t,s),e.elementType=Br,e.lanes=o,e;case Co:return al(n,s,o,t);case Po:return e=Ne(24,n,t,s),e.elementType=Po,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case wo:i=10;break e;case xo:i=9;break e;case Vr:i=11;break e;case Hr:i=14;break e;case So:i=16,r=null;break e;case $o:i=22;break e}throw Error(k(130,e==null?e:typeof e,""))}return t=Ne(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function kn(e,t,n,r){return e=Ne(7,e,r,t),e.lanes=n,e}function al(e,t,n,r){return e=Ne(23,e,r,t),e.elementType=Co,e.lanes=n,e}function cl(e,t,n){return e=Ne(6,e,null,t),e.lanes=n,e}function fl(e,t,n){return t=Ne(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function op(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=qo(0),this.expirationTimes=qo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qo(0),this.mutableSourceEagerHydrationData=null}function ip(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Tt,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Vs(e,t,n,r){var s=t.current,o=xe(),i=yt(s);e:if(n){n=n._reactInternals;t:{if(Nt(n)!==n||n.tag!==1)throw Error(k(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(me(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(l!==null);throw Error(k(171))}if(n.tag===1){var u=n.type;if(me(u)){n=Ca(n,u,l);break e}}n=l}else n=ft;return t.context===null?t.context=n:t.pendingContext=n,t=dt(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),pt(s,t),vt(s,i,o),i}function hl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Fc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function dl(e,t){Fc(e,t),(e=e.alternate)&&Fc(e,t)}function lp(){return null}function pl(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new op(e,t,n!=null&&n.hydrate===!0),t=Ne(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,Ti(t),e[an]=n.current,da(e.nodeType===8?e.parentNode:e),r)for(e=0;e<r.length;e++){t=r[e];var s=t._getVersion;s=s(t._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[t,s]:n.mutableSourceEagerHydrationData.push(t,s)}this._internalRoot=n}pl.prototype.render=function(e){Vs(e,this._internalRoot,null,null)},pl.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Vs(null,e,null,function(){t[an]=null})};function Cr(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function up(e,t){if(t||(t=e?e.nodeType===9?e.documentElement:e.firstChild:null,t=!(!t||t.nodeType!==1||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new pl(e,0,t?{hydrate:!0}:void 0)}function Bs(e,t,n,r,s){var o=n._reactRootContainer;if(o){var i=o._internalRoot;if(typeof s=="function"){var l=s;s=function(){var a=hl(i);l.call(a)}}Vs(t,i,e,s)}else{if(o=n._reactRootContainer=up(n,r),i=o._internalRoot,typeof s=="function"){var u=s;s=function(){var a=hl(i);u.call(a)}}Lc(function(){Vs(t,i,e,s)})}return hl(i)}ju=function(e){if(e.tag===13){var t=xe();vt(e,4,t),dl(e,4)}},Wo=function(e){if(e.tag===13){var t=xe();vt(e,67108864,t),dl(e,67108864)}},Nu=function(e){if(e.tag===13){var t=xe(),n=yt(e);vt(e,n,t),dl(e,n)}},Au=function(e,t){return t()},Do=function(e,t,n){switch(t){case"input":if(No(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=fs(r);if(!s)throw Error(k(90));uu(r),No(r,s)}}}break;case"textarea":du(e,n);break;case"select":t=n.value,t!=null&&qt(e,!!n.multiple,t,!1)}},Fo=Ac,$u=function(e,t,n,r,s){var o=L;L|=4;try{return _t(98,e.bind(null,t,n,r,s))}finally{L=o,L===0&&(xn(),De())}},Uo=function(){!(L&49)&&(Jd(),wt())},ku=function(e,t){var n=L;L|=2;try{return e(t)}finally{L=n,L===0&&(xn(),De())}};function Uc(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Cr(t))throw Error(k(200));return ip(e,t,null,n)}var ap={Events:[sr,cn,fs,xu,Su,wt,{current:!1}]},Pr={findFiberByHostInstance:At,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},cp={bundleType:Pr.bundleType,version:Pr.version,rendererPackageName:Pr.rendererPackageName,rendererConfig:Pr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Et.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Eu(e),e===null?null:e.stateNode},findFiberByHostInstance:Pr.findFiberByHostInstance||lp,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hs.isDisabled&&Hs.supportsFiber)try{wi=Hs.inject(cp),Ot=Hs}catch{}}Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ap,Ce.createPortal=Uc,Ce.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(k(188)):Error(k(268,Object.keys(e)));return e=Eu(t),e=e===null?null:e.stateNode,e},Ce.flushSync=function(e,t){var n=L;if(n&48)return e(t);L|=1;try{if(e)return _t(99,e.bind(null,t))}finally{L=n,De()}},Ce.hydrate=function(e,t,n){if(!Cr(t))throw Error(k(200));return Bs(null,e,t,!0,n)},Ce.render=function(e,t,n){if(!Cr(t))throw Error(k(200));return Bs(null,e,t,!1,n)},Ce.unmountComponentAtNode=function(e){if(!Cr(e))throw Error(k(40));return e._reactRootContainer?(Lc(function(){Bs(null,null,e,!1,function(){e._reactRootContainer=null,e[an]=null})}),!0):!1},Ce.unstable_batchedUpdates=Ac,Ce.unstable_createPortal=function(e,t){return Uc(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)},Ce.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Cr(n))throw Error(k(200));if(e==null||e._reactInternals===void 0)throw Error(k(38));return Bs(e,t,n,!1,r)},Ce.version="17.0.2";function Vc(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Vc)}catch(e){console.error(e)}}Vc(),Zl.exports=Ce;var gl=Zl.exports;const fp=pe(gl),fe=tt.createContext({posts:[],authors:[],tags:[],action:"",lastPage:"",page:"",pageData:{},dispatch:(e,t)=>{},searchIndex:null,indexComplete:!1,searchValue:"",t:()=>{},dir:"ltr"});class hp extends R.Component{constructor(){super(...arguments);io(this,"handleLoad",()=>{this.setupFrameBaseStyle()})}componentDidMount(){this.node.addEventListener("load",this.handleLoad)}componentWillUnmout(){this.node.removeEventListener("load",this.handleLoad)}setupFrameBaseStyle(){this.node.contentDocument&&(this.iframeHtml=this.node.contentDocument.documentElement,this.iframeHtml.setAttribute("dir",this.props.searchdir),this.iframeHead=this.node.contentDocument.head,this.iframeRoot=this.node.contentDocument.body,this.forceUpdate())}render(){const{children:n,head:r,title:s="",style:o={},...i}=this.props;return P.jsxs("iframe",{srcDoc:"<!DOCTYPE html>",...i,ref:l=>this.node=l,title:s,style:o,frameBorder:"0",children:[this.iframeHead&&gl.createPortal(r,this.iframeHead),this.iframeRoot&&gl.createPortal(n,this.iframeRoot)]})}}const dp=e=>R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:16,width:16,viewBox:"0 0 16 16",...e},R.createElement("title",null,"circle anim"),R.createElement("g",{fill:"#40413F",className:"nc-icon-wrapper"},R.createElement("g",{className:"nc-loop-circle-16-icon-f"},R.createElement("path",{d:"M8 16a8 8 0 1 1 8-8 8.009 8.009 0 0 1-8 8zM8 2a6 6 0 1 0 6 6 6.006 6.006 0 0 0-6-6z",fill:"#D4D4D4"}),R.createElement("path",{d:"M8 0v2a6.006 6.006 0 0 1 6 6h2a8.009 8.009 0 0 0-8-8z","data-color":"color-2"})),R.createElement("style",null,".nc-loop-circle-16-icon-f{--animation-duration:0.5s;transform-origin:8px 8px;animation:nc-loop-circle-anim var(--animation-duration) infinite linear}@keyframes nc-loop-circle-anim{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}"))),pp=e=>R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:16,width:16,...e},R.createElement("path",{strokeLinecap:"round",strokeWidth:.4,fill:"currentColor",stroke:"#000000",strokeLinejoin:"round",d:"M.44,21.44a1.49,1.49,0,0,0,0,2.12,1.5,1.5,0,0,0,2.12,0l9.26-9.26a.25.25,0,0,1,.36,0l9.26,9.26a1.5,1.5,0,0,0,2.12,0,1.49,1.49,0,0,0,0-2.12L14.3,12.18a.25.25,0,0,1,0-.36l9.26-9.26A1.5,1.5,0,0,0,21.44.44L12.18,9.7a.25.25,0,0,1-.36,0L2.56.44A1.5,1.5,0,0,0,.44,2.56L9.7,11.82a.25.25,0,0,1,0,.36Z"})),gp=e=>R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:16,width:16,...e},R.createElement("path",{d:"M23.38,21.62l-6.53-6.53a9.15,9.15,0,0,0,1.9-5.59,9.27,9.27,0,1,0-3.66,7.36l6.53,6.53a1.26,1.26,0,0,0,1.76,0A1.25,1.25,0,0,0,23.38,21.62ZM2.75,9.5A6.75,6.75,0,1,1,9.5,16.25,6.76,6.76,0,0,1,2.75,9.5Z",fill:"currentColor"})),Bc=10,mp=10,yp=()=>({modalContainer:{zIndex:"3999999",position:"fixed",left:"0",top:"0",width:"100%",height:"100%",overflow:"hidden"},frame:{common:{margin:"auto",position:"relative",padding:"0",outline:"0",width:"100%",opacity:"1",overflow:"hidden",height:"100%"}},page:{links:{width:"600px"}}});class Hc extends tt.Component{componentDidMount(){this.sendContainerHeightChangeEvent()}sendContainerHeightChangeEvent(){}componentDidUpdate(){this.sendContainerHeightChangeEvent()}handlePopupClose(t){t.preventDefault(),t.target===t.currentTarget&&this.context.dispatch("update",{showPopup:!1})}render(){return P.jsx(zp,{})}}io(Hc,"contextType",fe);function vp(){const{searchValue:e,dispatch:t,inputRef:n,t:r}=R.useContext(fe),s=R.useRef(null);R.useEffect(()=>{setTimeout(()=>{var u;(u=n==null?void 0:n.current)==null||u.focus()},150);let i=u=>{u.key==="Escape"&&t("update",{showPopup:!1})};const l=s==null?void 0:s.current;return l==null||l.ownerDocument.removeEventListener("keyup",i),l==null||l.ownerDocument.addEventListener("keyup",i),()=>{l==null||l.ownerDocument.removeEventListener("keyup",i)}},[t,n]);let o="z-10 relative flex items-center py-5 px-4 sm:px-7 bg-white rounded-t-lg shadow";return e||(o="z-10 relative flex items-center py-5 px-4 sm:px-7 bg-white rounded-lg"),P.jsxs("div",{className:o,ref:s,children:[P.jsx("div",{className:"flex items-center justify-center w-4 h-4 me-3",children:P.jsx(wp,{})}),P.jsx("input",{ref:n,value:e||"",onChange:i=>{t("update",{searchValue:i.target.value})},onKeyDown:i=>{(i.key==="ArrowUp"||i.key==="ArrowDown")&&i.preventDefault()},className:"grow -my-5 py-5 -ms-3 ps-3 text-[1.65rem] focus-visible:outline-none placeholder:text-gray-400 outline-none truncate",placeholder:r("Search posts, tags and authors")}),P.jsx(xp,{}),P.jsx(Sp,{})]})}function wp(){const{searchValue:e="",dispatch:t}=R.useContext(fe);return e?P.jsx("button",{alt:"Clear",className:"-mb-[1px]",onClick:()=>{t("update",{searchValue:""})},children:P.jsx(pp,{className:"text-neutral-900 hover:text-neutral-500 h-[1.1rem] w-[1.1rem]"})}):P.jsx(gp,{className:"text-neutral-900",alt:"Search"})}function xp(){const{indexComplete:e,searchValue:t}=R.useContext(fe);return!e&&t?P.jsx(dp,{className:"shrink-0"}):null}function Sp(){const{dispatch:e,t}=R.useContext(fe);return P.jsx("button",{className:"ms-3 text-sm text-neutral-500 sm:hidden",alt:"Cancel",onClick:()=>{e("update",{showPopup:!1})},children:t("Cancel")})}function $p({tag:e,selectedResult:t,setSelectedResult:n}){const{name:r,url:s,id:o}=e;let i="flex items-center py-3 -mx-4 sm:-mx-7 px-4 sm:px-7 cursor-pointer";return o===t&&(i+=" bg-neutral-100"),P.jsxs("div",{className:i,onClick:()=>{s&&(window.location.href=s)},onMouseEnter:()=>{n(o)},children:[P.jsx("p",{className:"me-2 text-sm font-bold text-neutral-400",children:"#"}),P.jsx("h2",{className:"text-[1.65rem] font-medium leading-tight text-neutral-900 truncate",children:r})]})}function kp({tags:e,selectedResult:t,setSelectedResult:n}){const{t:r}=R.useContext(fe);if(!(e!=null&&e.length))return null;const s=e.map(o=>P.jsx($p,{tag:o,selectedResult:t,setSelectedResult:n},o.name));return P.jsxs("div",{className:"border-t border-gray-200 py-3 px-4 sm:px-7",children:[P.jsx("h1",{className:"uppercase text-xs text-neutral-400 font-semibold mb-1 tracking-wide",children:r("Tags")}),s]})}function Cp({post:e,selectedResult:t,setSelectedResult:n}){const{searchValue:r}=R.useContext(fe),{title:s,excerpt:o,url:i,id:l}=e;let u="py-3 -mx-4 sm:-mx-7 px-4 sm:px-7 cursor-pointer";return l===t&&(u+=" bg-neutral-100"),P.jsxs("div",{className:u,onClick:()=>{i&&(window.location.href=i)},onMouseEnter:()=>{n(l)},children:[P.jsx("h2",{className:"text-[1.65rem] font-medium leading-tight text-neutral-800",children:P.jsx(Wc,{text:s,highlight:r,isExcerpt:!1})}),P.jsx("p",{className:"text-neutral-400 leading-normal text-sm mt-0 mb-0 truncate",children:P.jsx(Wc,{text:o,highlight:r,isExcerpt:!0})})]})}function Pp({text:e,highlight:t}){let n="";t==null||t.split(" ").forEach((i,l)=>{const u=String(i).replace(/\W/g,"\\&");l>0?n+="|^"+u+"|\\s"+u:n="^"+u+"|\\s"+u});const r=new RegExp(`${n}`,"ig");let s=e==null?void 0:e.matchAll(r);const o=[];for(const i of s)o.push({startIdx:i==null?void 0:i.index,endIdx:((i==null?void 0:i.index)||0)+((i==null?void 0:i[0].length)||0)});return o}function Kc({text:e,highlight:t}){const n=Pp({text:e,highlight:t}),r=[];let s=0;return n.forEach(o=>{s===o.startIdx?(r.push({text:e==null?void 0:e.slice(o.startIdx,o.endIdx),type:"highlight"}),s=o.endIdx):(r.push({text:e==null?void 0:e.slice(s,o.startIdx),type:"normal"}),r.push({text:e==null?void 0:e.slice(o.startIdx,o.endIdx),type:"highlight"}),s=o.endIdx)}),s<(e==null?void 0:e.length)&&r.push({text:e==null?void 0:e.slice(s,e.length),type:"normal"}),{parts:r,highlightIndexes:n}}function Wc({text:e="",highlight:t="",isExcerpt:n}){var i;e=e||"",t=t||"";let{parts:r,highlightIndexes:s}=Kc({text:e,highlight:t});if(n&&(s!=null&&s[0])){const l=(i=s==null?void 0:s[0])==null?void 0:i.startIdx;if(l>50){e="..."+(e==null?void 0:e.slice(l-20));const{parts:u}=Kc({text:e,highlight:t});r=u}}const o=r.map((l,u)=>(l==null?void 0:l.type)==="highlight"?P.jsx(tt.Fragment,{children:P.jsx(Ep,{word:l.text,isExcerpt:n})},u):P.jsx(tt.Fragment,{children:l.text},u));return P.jsx(P.Fragment,{children:o})}function Ep({word:e,isExcerpt:t}){return t?P.jsx(P.Fragment,{children:P.jsx("span",{className:"font-bold",children:e})}):P.jsx(P.Fragment,{children:P.jsx("span",{className:"font-bold text-neutral-900",children:e})})}function Tp({posts:e,maxPosts:t,setMaxPosts:n}){const{t:r}=R.useContext(fe);return!(e!=null&&e.length)||t>=(e==null?void 0:e.length)?null:P.jsx("button",{className:"w-full my-3 p-[1rem] border border-neutral-200 hover:border-neutral-300 text-neutral-800 hover:text-black font-semibold rounded transition duration-150 ease hover:ease",onClick:()=>{const s=t+mp;n(s)},children:r("Show more results")})}function jp({posts:e,selectedResult:t,setSelectedResult:n}){const{t:r}=R.useContext(fe),[s,o]=R.useState(Bc),[i,l]=R.useState([]);if(R.useEffect(()=>{o(Bc)},[e]),R.useEffect(()=>{l(e==null?void 0:e.slice(0,s+1))},[s,e]),!(e!=null&&e.length))return null;function u(){return i.map(a=>P.jsx(Cp,{post:a,selectedResult:t,setSelectedResult:n},a.title))}return P.jsxs("div",{className:"border-t border-neutral-200 py-3 px-4 sm:px-7",children:[P.jsx("h1",{className:"uppercase text-xs text-neutral-400 font-semibold mb-1 tracking-wide",children:r("Posts")}),P.jsx(u,{}),P.jsx(Tp,{setMaxPosts:o,maxPosts:s,posts:e})]})}function Np({author:e,selectedResult:t,setSelectedResult:n}){const{name:r,profile_image:s,url:o,id:i}=e;let l="py-[1rem] -mx-4 sm:-mx-7 px-4 sm:px-7 cursor-pointer flex items-center";return i===t&&(l+=" bg-neutral-100"),P.jsxs("div",{className:l,onClick:()=>{o&&(window.location.href=o)},onMouseEnter:()=>{n(i)},children:[P.jsx(Ap,{name:r,avatar:s}),P.jsx("h2",{className:"text-[1.65rem] font-medium leading-tight text-neutral-900 truncate",children:r})]})}function Ap({name:e,avatar:t}){const n=t==null?void 0:t.length,r=e.charAt(0);return n?P.jsx("img",{className:"rounded-full bg-neutral-300 w-7 h-7 me-2 object-cover",src:t,alt:e}):P.jsx("div",{className:"rounded-full bg-neutral-200 w-7 h-7 me-2 flex items-center justify-center font-bold",children:P.jsx("span",{className:"text-neutral-400",children:r})})}function Lp({authors:e,selectedResult:t,setSelectedResult:n}){const{t:r}=R.useContext(fe);if(!(e!=null&&e.length))return null;const s=e.map(o=>P.jsx(Np,{author:o,selectedResult:t,setSelectedResult:n},o.name));return P.jsxs("div",{className:"border-t border-neutral-200 py-3 px-4 sm:px-7",children:[P.jsx("h1",{className:"uppercase text-xs text-neutral-400 font-semibold mb-1 tracking-wide",children:r("Authors")}),s]})}function Op(){const{searchValue:e="",searchIndex:t,indexComplete:n}=R.useContext(fe);let r=null,s=[],o=[],i=[];return n&&e&&(r=t==null?void 0:t.search(e),o=(r==null?void 0:r.posts)||[],i=(r==null?void 0:r.authors)||[],s=(r==null?void 0:r.tags)||[]),i=i.filter(u=>{const a=/\/404\/$/;return!(u!=null&&u.url&&a.test(u==null?void 0:u.url))}),s=s.filter(u=>{const a=/\/404\/$/;return!(u!=null&&u.url&&a.test(u==null?void 0:u.url))}),(o==null?void 0:o.length)||(i==null?void 0:i.length)||(s==null?void 0:s.length)?P.jsx(_p,{posts:o,authors:i,tags:s}):e?P.jsx(Rp,{}):null}function _p({posts:e,authors:t,tags:n}){var a;const{searchValue:r}=R.useContext(fe),s=R.useMemo(()=>[...t,...n,...e],[t,n,e]),o=((a=s==null?void 0:s[0])==null?void 0:a.id)||null,[i,l]=R.useState(o),u=R.useRef(null);return R.useEffect(()=>{var f;l(((f=s==null?void 0:s[0])==null?void 0:f.id)||null)},[s]),R.useEffect(()=>{let f=c=>{const m=s.findIndex(h=>h.id===i);let v=s[m+1],x=s[m-1];if(c.key==="ArrowUp"&&x?l(x==null?void 0:x.id):c.key==="ArrowDown"&&v&&l(v==null?void 0:v.id),c.key==="Enter"){const h=s.find(d=>d.id===i);window.location.href=h==null?void 0:h.url}};const p=u==null?void 0:u.current;return p==null||p.ownerDocument.removeEventListener("keyup",f),p==null||p.ownerDocument.addEventListener("keyup",f),()=>{var c;(c=p==null?void 0:p.ownerDocument)==null||c.removeEventListener("keyup",f)}},[s,i]),r?P.jsxs("div",{className:"overflow-y-auto max-h-[calc(100vh-172px)] sm:max-h-[70vh] -mt-[1px]",ref:u,children:[P.jsx(Lp,{authors:t,selectedResult:i,setSelectedResult:l}),P.jsx(kp,{tags:n,selectedResult:i,setSelectedResult:l}),P.jsx(jp,{posts:e,selectedResult:i,setSelectedResult:l})]}):null}function Rp(){const{t:e}=R.useContext(fe);return P.jsx("div",{className:"py-4 px-7",children:P.jsx("p",{className:"text-[1.65rem] text-neutral-400 leading-normal",children:e("No matches found")})})}function zp(){const{dispatch:e}=R.useContext(fe);return P.jsx(P.Fragment,{children:P.jsx("div",{className:"h-screen w-screen pt-20 antialiased z-50 relative ghost-display",onClick:t=>{t.preventDefault(),t.target===t.currentTarget&&e("update",{showPopup:!1})},children:P.jsxs("div",{className:"bg-white w-full max-w-[95vw] sm:max-w-lg rounded-lg shadow-xl m-auto relative translate-z-0 animate-popup",children:[P.jsx(vp,{}),P.jsx(Op,{})]})})})}class Qc extends tt.Component{constructor(t){super(t),this.state={height:null}}onHeightChange(t){this.setState({height:t})}handlePopupClose(t){t.preventDefault(),t.target===t.currentTarget&&this.context.dispatch("update",{showPopup:!1})}renderFrameStyles(){const t=`
|
|
43
43
|
:root {
|
|
44
44
|
--brandcolor: ${this.context.brandColor||""}
|
|
45
45
|
}
|
|
@@ -47,5 +47,5 @@ Add a <Suspense fallback=...> component higher in the tree to provide a loading
|
|
|
47
47
|
.ghost-display {
|
|
48
48
|
display: none;
|
|
49
49
|
}
|
|
50
|
-
`,n=this.context.stylesUrl;return n?P.jsxs(P.Fragment,{children:[P.jsx("link",{rel:"stylesheet",href:n}),P.jsx("style",{dangerouslySetInnerHTML:{__html:t}}),P.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]}):P.jsxs(P.Fragment,{children:[P.jsx("style",{dangerouslySetInnerHTML:{__html:t}}),P.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]})}renderFrameContainer(){const t=yp(),n={...t.frame.common};return P.jsx("div",{style:t.modalContainer,className:"gh-root-frame",children:P.jsxs(hp,{style:n,title:"portal-popup",head:this.renderFrameStyles(),searchdir:this.context.dir,children:[P.jsx("div",{onClick:r=>this.handlePopupClose(r),className:"absolute top-0 bottom-0 left-0 right-0 block backdrop-blur-[2px] animate-fadein z-0 bg-gradient-to-br from-[rgba(0,0,0,0.2)] to-[rgba(0,0,0,0.1)]"}),P.jsx(Hc,{})]})})}render(){const{showPopup:t}=this.context;return t?this.renderFrameContainer():null}}io(Qc,"contextType",fe);var A;function se(e,t,n){const r=typeof n,s=typeof e;if(r!=="undefined"){if(s!=="undefined"){if(n){if(s==="function"&&r===s)return function(l){return e(n(l))};if(t=e.constructor,t===n.constructor){if(t===Array)return n.concat(e);if(t===Map){var o=new Map(n);for(var i of e)o.set(i[0],i[1]);return o}if(t===Set){i=new Set(n);for(o of e.values())i.add(o);return i}}}return e}return n}return s==="undefined"?t:e}function X(){return Object.create(null)}function _e(e){return typeof e=="string"}function Er(e){return typeof e=="object"}function Ip(e){const t=[];for(const n of e.keys())t.push(n);return t}function Tr(e,t){if(_e(t))e=e[t];else for(let n=0;e&&n<t.length;n++)e=e[t[n]];return e}function Mp(e){let t=0;for(let n=0,r;n<e.length;n++)(r=e[n])&&t<r.length&&(t=r.length);return t}const Dp=/[^\p{L}\p{N}]+/u,Fp=/(\d{3})/g,Up=/(\D)(\d{3})/g,Vp=/(\d{3})(\D)/g,Yc=/[\u0300-\u036f]/g;function jr(e={}){if(!this||this.constructor!==jr)return new jr(...arguments);if(arguments.length)for(e=0;e<arguments.length;e++)this.assign(arguments[e]);else this.assign(e)}A=jr.prototype,A.assign=function(e){this.normalize=se(e.normalize,!0,this.normalize);let t=e.include,n=t||e.exclude||e.split,r;if(n||n===""){if(typeof n=="object"&&n.constructor!==RegExp){let s="";r=!t,t||(s+="\\p{Z}"),n.letter&&(s+="\\p{L}"),n.number&&(s+="\\p{N}",r=!!t),n.symbol&&(s+="\\p{S}"),n.punctuation&&(s+="\\p{P}"),n.control&&(s+="\\p{C}"),(n=n.char)&&(s+=typeof n=="object"?n.join(""):n);try{this.split=new RegExp("["+(t?"^":"")+s+"]+","u")}catch{this.split=/\s+/}}else this.split=n,r=n===!1||2>"a1a".split(n).length;this.numeric=se(e.numeric,r)}else{try{this.split=se(this.split,Dp)}catch{this.split=/\s+/}this.numeric=se(e.numeric,se(this.numeric,!0))}if(this.prepare=se(e.prepare,null,this.prepare),this.finalize=se(e.finalize,null,this.finalize),n=e.filter,this.filter=typeof n=="function"?n:se(n&&new Set(n),null,this.filter),this.dedupe=se(e.dedupe,!0,this.dedupe),this.matcher=se((n=e.matcher)&&new Map(n),null,this.matcher),this.mapper=se((n=e.mapper)&&new Map(n),null,this.mapper),this.stemmer=se((n=e.stemmer)&&new Map(n),null,this.stemmer),this.replacer=se(e.replacer,null,this.replacer),this.minlength=se(e.minlength,1,this.minlength),this.maxlength=se(e.maxlength,1024,this.maxlength),this.rtl=se(e.rtl,!1,this.rtl),(this.cache=n=se(e.cache,!0,this.cache))&&(this.H=null,this.S=typeof n=="number"?n:2e5,this.B=new Map,this.G=new Map,this.L=this.K=128),this.h="",this.M=null,this.A="",this.N=null,this.matcher)for(const s of this.matcher.keys())this.h+=(this.h?"|":"")+s;if(this.stemmer)for(const s of this.stemmer.keys())this.A+=(this.A?"|":"")+s;return this},A.addStemmer=function(e,t){return this.stemmer||(this.stemmer=new Map),this.stemmer.set(e,t),this.A+=(this.A?"|":"")+e,this.N=null,this.cache&&Ft(this),this},A.addFilter=function(e){return typeof e=="function"?this.filter=e:(this.filter||(this.filter=new Set),this.filter.add(e)),this.cache&&Ft(this),this},A.addMapper=function(e,t){return typeof e=="object"?this.addReplacer(e,t):1<e.length?this.addMatcher(e,t):(this.mapper||(this.mapper=new Map),this.mapper.set(e,t),this.cache&&Ft(this),this)},A.addMatcher=function(e,t){return typeof e=="object"?this.addReplacer(e,t):2>e.length&&(this.dedupe||this.mapper)?this.addMapper(e,t):(this.matcher||(this.matcher=new Map),this.matcher.set(e,t),this.h+=(this.h?"|":"")+e,this.M=null,this.cache&&Ft(this),this)},A.addReplacer=function(e,t){return typeof e=="string"?this.addMatcher(e,t):(this.replacer||(this.replacer=[]),this.replacer.push(e,t),this.cache&&Ft(this),this)},A.encode=function(e){if(this.cache&&e.length<=this.K)if(this.H){if(this.B.has(e))return this.B.get(e)}else this.H=setTimeout(Ft,50,this);this.normalize&&(typeof this.normalize=="function"?e=this.normalize(e):e=Yc?e.normalize("NFKD").replace(Yc,"").toLowerCase():e.toLowerCase()),this.prepare&&(e=this.prepare(e)),this.numeric&&3<e.length&&(e=e.replace(Up,"$1 $2").replace(Vp,"$1 $2").replace(Fp,"$1 "));const t=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer);let n=[],r=this.split||this.split===""?e.split(this.split):e;for(let o=0,i,l;o<r.length;o++)if((i=l=r[o])&&!(i.length<this.minlength||i.length>this.maxlength)){if(t)n.push(i);else if(!this.filter||(typeof this.filter=="function"?this.filter(i):!this.filter.has(i))){if(this.cache&&i.length<=this.L)if(this.H){var s=this.G.get(i);if(s||s===""){s&&n.push(s);continue}}else this.H=setTimeout(Ft,50,this);if(this.stemmer&&2<i.length&&(this.N||(this.N=new RegExp("(?!^)("+this.A+")$")),i=i.replace(this.N,u=>this.stemmer.get(u))),i&&(this.mapper||this.dedupe&&1<i.length)){s="";for(let u=0,a="",f,p;u<i.length;u++)f=i.charAt(u),f===a&&this.dedupe||((p=this.mapper&&this.mapper.get(f))||p===""?p===a&&this.dedupe||!(a=p)||(s+=p):s+=a=f);i=s}if(this.matcher&&1<i.length&&(this.M||(this.M=new RegExp("("+this.h+")","g")),i=i.replace(this.M,u=>this.matcher.get(u))),i&&this.replacer)for(s=0;i&&s<this.replacer.length;s+=2)i=i.replace(this.replacer[s],this.replacer[s+1]);this.cache&&l.length<=this.L&&(this.G.set(l,i),this.G.size>this.S&&(this.G.clear(),this.L=this.L/1.1|0)),i&&n.push(i)}}return this.finalize&&(n=this.finalize(n)||n),this.cache&&e.length<=this.K&&(this.B.set(e,n),this.B.size>this.S&&(this.B.clear(),this.K=this.K/1.1|0)),n};function Ft(e){e.H=null,e.B.clear(),e.G.clear()}let Cn,Nr;async function Bp(e){e=e.data;var t=e.task;const n=e.id;let r=e.args;switch(t){case"init":Nr=e.options||{},(t=e.factory)?(Function("return "+t)()(self),Cn=new self.FlexSearch.Index(Nr),delete self.FlexSearch):Cn=new Ke(Nr),postMessage({id:n});break;default:let s;t==="export"&&(r[1]?(r[0]=Nr.export,r[2]=0,r[3]=1):r=null),t==="import"?r[0]&&(e=await Nr.import.call(Cn,r[0]),Cn.import(r[0],e)):(s=r&&Cn[t].apply(Cn,r))&&s.then&&(s=await s),postMessage(t==="search"?{id:n,msg:s}:{id:n})}}function ml(e){Ar.call(e,"add"),Ar.call(e,"append"),Ar.call(e,"search"),Ar.call(e,"update"),Ar.call(e,"remove")}let yl,Jc,Ks;function Hp(){yl=Ks=0}function Ar(e){this[e+"Async"]=function(){const t=arguments;var n=t[t.length-1];let r;if(typeof n=="function"&&(r=n,delete t[t.length-1]),yl?Ks||(Ks=Date.now()-Jc>=this.priority*this.priority*3):(yl=setTimeout(Hp,0),Jc=Date.now()),Ks){const o=this;return new Promise(i=>{setTimeout(function(){i(o[e+"Async"].apply(o,t))},0)})}const s=this[e].apply(this,t);return n=s.then?s:new Promise(o=>o(s)),r&&n.then(r),n}}let Pn=0;function Lr(e={}){function t(i){function l(u){u=u.data||u;const a=u.id,f=a&&s.h[a];f&&(f(u.msg),delete s.h[a])}if(this.worker=i,this.h=X(),this.worker)return r?this.worker.on("message",l):this.worker.onmessage=l,e.config?new Promise(function(u){s.h[++Pn]=function(){u(s),1e9<Pn&&(Pn=0)},s.worker.postMessage({id:Pn,task:"init",factory:n,options:e})}):(this.worker.postMessage({task:"init",factory:n,options:e}),this.priority=e.priority||4,this)}if(!this||this.constructor!==Lr)return new Lr(e);let n=typeof self<"u"?self._factory:typeof window<"u"?window._factory:null;n&&(n=n.toString());const r=typeof window>"u",s=this,o=Kp(n,r,e.worker);return o.then?o.then(function(i){return t.call(s,i)}):t.call(this,o)}$t("add"),$t("append"),$t("search"),$t("update"),$t("remove"),$t("clear"),$t("export"),$t("import"),ml(Lr.prototype);function $t(e){Lr.prototype[e]=function(){const t=this,n=[].slice.call(arguments);var r=n[n.length-1];let s;return typeof r=="function"&&(s=r,n.pop()),r=new Promise(function(o){e==="export"&&typeof n[0]=="function"&&(n[0]=null),t.h[++Pn]=o,t.worker.postMessage({task:e,id:Pn,args:n})}),s?(r.then(s),this):r}}function Kp(e,t,n){return t?typeof module<"u"?new(require("worker_threads")).Worker(__dirname+"/worker/node.js"):Promise.resolve().then(()=>Hm).then(function(r){return new r.Worker("undefined/node/node.mjs")}):e?new window.Worker(URL.createObjectURL(new Blob(["onmessage="+Bp.toString()],{type:"text/javascript"}))):new window.Worker(typeof n=="string"?n:(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:G&&G.tagName.toUpperCase()==="SCRIPT"&&G.src||new URL("sodo-search.min.js",document.baseURI).href).replace("/worker.js","/worker/worker.js").replace("flexsearch.bundle.module.min.js","module/worker/worker.js"),{type:"module"})}function vl(e,t=0){let n=[],r=[];t&&(t=25e4/t*5e3|0);for(const s of e.entries())r.push(s),r.length===t&&(n.push(r),r=[]);return r.length&&n.push(r),n}function wl(e,t){t||(t=new Map);for(let n=0,r;n<e.length;n++)r=e[n],t.set(r[0],r[1]);return t}function Gc(e,t=0){let n=[],r=[];t&&(t=25e4/t*1e3|0);for(const s of e.entries())r.push([s[0],vl(s[1])[0]]),r.length===t&&(n.push(r),r=[]);return r.length&&n.push(r),n}function Xc(e,t){t||(t=new Map);for(let n=0,r,s;n<e.length;n++)r=e[n],s=t.get(r[0]),t.set(r[0],wl(r[1],s));return t}function qc(e){let t=[],n=[];for(const r of e.keys())n.push(r),n.length===25e4&&(t.push(n),n=[]);return n.length&&t.push(n),t}function Zc(e,t){t||(t=new Set);for(let n=0;n<e.length;n++)t.add(e[n]);return t}function Ws(e,t,n,r,s,o,i=0){const l=r&&r.constructor===Array;var u=l?r.shift():r;if(!u)return this.export(e,t,s,o+1);if((u=e((t?t+".":"")+(i+1)+"."+n,JSON.stringify(u)))&&u.then){const a=this;return u.then(function(){return Ws.call(a,e,t,n,l?r:null,s,o,i+1)})}return Ws.call(this,e,t,n,l?r:null,s,o,i+1)}function bc(e,t){let n="";for(const r of e.entries()){e=r[0];const s=r[1];let o="";for(let i=0,l;i<s.length;i++){l=s[i]||[""];let u="";for(let a=0;a<l.length;a++)u+=(u?",":"")+(t==="string"?'"'+l[a]+'"':l[a]);u="["+u+"]",o+=(o?",":"")+u}o='["'+e+'",['+o+"]]",n+=(n?",":"")+o}return n}function ef(e,t,n,r){let s=[];for(let o=0,i;o<e.index.length;o++)if(i=e.index[o],t>=i.length)t-=i.length;else{t=i[r?"splice":"slice"](t,n);const l=t.length;if(l&&(s=s.length?s.concat(t):t,n-=l,r&&(e.length-=l),!n))break;t=0}return s}function Ut(e){if(!this||this.constructor!==Ut)return new Ut(e);this.index=e?[e]:[],this.length=e?e.length:0;const t=this;return new Proxy([],{get(n,r){if(r==="length")return t.length;if(r==="push")return function(s){t.index[t.index.length-1].push(s),t.length++};if(r==="pop")return function(){if(t.length)return t.length--,t.index[t.index.length-1].pop()};if(r==="indexOf")return function(s){let o=0;for(let i=0,l,u;i<t.index.length;i++){if(l=t.index[i],u=l.indexOf(s),0<=u)return o+u;o+=l.length}return-1};if(r==="includes")return function(s){for(let o=0;o<t.index.length;o++)if(t.index[o].includes(s))return!0;return!1};if(r==="slice")return function(s,o){return ef(t,s||0,o||t.length,!1)};if(r==="splice")return function(s,o){return ef(t,s||0,o||t.length,!0)};if(r==="constructor")return Array;if(typeof r!="symbol")return(n=t.index[r/2**31|0])&&n[r]},set(n,r,s){return n=r/2**31|0,(t.index[n]||(t.index[n]=[]))[r]=s,t.length++,!0}})}Ut.prototype.clear=function(){this.index.length=0},Ut.prototype.destroy=function(){this.proxy=this.index=null},Ut.prototype.push=function(){};function He(e=8){if(!this||this.constructor!==He)return new He(e);this.index=X(),this.h=[],this.size=0,32<e?(this.B=nf,this.A=BigInt(e)):(this.B=tf,this.A=e)}He.prototype.get=function(e){const t=this.index[this.B(e)];return t&&t.get(e)},He.prototype.set=function(e,t){var n=this.B(e);let r=this.index[n];r?(n=r.size,r.set(e,t),(n-=r.size)&&this.size++):(this.index[n]=r=new Map([[e,t]]),this.h.push(r),this.size++)};function Re(e=8){if(!this||this.constructor!==Re)return new Re(e);this.index=X(),this.h=[],this.size=0,32<e?(this.B=nf,this.A=BigInt(e)):(this.B=tf,this.A=e)}Re.prototype.add=function(e){var t=this.B(e);let n=this.index[t];n?(t=n.size,n.add(e),(t-=n.size)&&this.size++):(this.index[t]=n=new Set([e]),this.h.push(n),this.size++)},A=He.prototype,A.has=Re.prototype.has=function(e){const t=this.index[this.B(e)];return t&&t.has(e)},A.delete=Re.prototype.delete=function(e){const t=this.index[this.B(e)];t&&t.delete(e)&&this.size--},A.clear=Re.prototype.clear=function(){this.index=X(),this.h=[],this.size=0},A.values=Re.prototype.values=function*(){for(let e=0;e<this.h.length;e++)for(let t of this.h[e].values())yield t},A.keys=Re.prototype.keys=function*(){for(let e=0;e<this.h.length;e++)for(let t of this.h[e].keys())yield t},A.entries=Re.prototype.entries=function*(){for(let e=0;e<this.h.length;e++)for(let t of this.h[e].entries())yield t};function tf(e){let t=2**this.A-1;if(typeof e=="number")return e&t;let n=0,r=this.A+1;for(let s=0;s<e.length;s++)n=(n*r^e.charCodeAt(s))&t;return this.A===32?n+2**31:n}function nf(e){let t=BigInt(2)**this.A-BigInt(1);var n=typeof e;if(n==="bigint")return e&t;if(n==="number")return BigInt(e)&t;n=BigInt(0);let r=this.A+BigInt(1);for(let s=0;s<e.length;s++)n=(n*r^BigInt(e.charCodeAt(s)))&t;return n}Vt.prototype.add=function(e,t,n){if(Er(e)&&(t=e,e=Tr(t,this.key)),t&&(e||e===0)){if(!n&&this.reg.has(e))return this.update(e,t);for(let l=0,u;l<this.field.length;l++){u=this.D[l];var r=this.index.get(this.field[l]);if(typeof u=="function"){var s=u(t);s&&r.add(e,s,!1,!0)}else s=u.I,(!s||s(t))&&(u.constructor===String?u=[""+u]:_e(u)&&(u=[u]),Sl(t,u,this.J,0,r,e,u[0],n))}if(this.tag)for(r=0;r<this.F.length;r++){var o=this.F[r];s=this.tag.get(this.R[r]);let l=X();if(typeof o=="function"){if(o=o(t),!o)continue}else{var i=o.I;if(i&&!i(t))continue;o.constructor===String&&(o=""+o),o=Tr(t,o)}if(s&&o){_e(o)&&(o=[o]);for(let u=0,a,f;u<o.length;u++)if(a=o[u],!l[a]&&(l[a]=1,(i=s.get(a))?f=i:s.set(a,f=[]),!n||!f.includes(e))){if(f.length===2**31-1){if(i=new Ut(f),this.fastupdate)for(let p of this.reg.values())p.includes(f)&&(p[p.indexOf(f)]=i);s.set(a,f=i)}f.push(e),this.fastupdate&&((i=this.reg.get(e))?i.push(f):this.reg.set(e,[f]))}}}if(this.store&&(!n||!this.store.has(e))){let l;if(this.C){l=X();for(let u=0,a;u<this.C.length;u++){if(a=this.C[u],(n=a.I)&&!n(t))continue;let f;if(typeof a=="function"){if(f=a(t),!f)continue;a=[a.V]}else if(_e(a)||a.constructor===String){l[a]=t[a];continue}xl(t,l,a,0,a[0],f)}}this.store.set(e,l||t)}this.worker&&(this.fastupdate||this.reg.add(e))}return this};function xl(e,t,n,r,s,o){if(e=e[s],r===n.length-1)t[s]=o||e;else if(e)if(e.constructor===Array)for(t=t[s]=Array(e.length),s=0;s<e.length;s++)xl(e,t,n,r,s);else t=t[s]||(t[s]=X()),s=n[++r],xl(e,t,n,r,s)}function Sl(e,t,n,r,s,o,i,l){if(e=e[i])if(r===t.length-1){if(e.constructor===Array){if(n[r]){for(t=0;t<e.length;t++)s.add(o,e[t],!0,!0);return}e=e.join(" ")}s.add(o,e,l,!0)}else if(e.constructor===Array)for(i=0;i<e.length;i++)Sl(e,t,n,r,s,o,i,l);else i=t[++r],Sl(e,t,n,r,s,o,i,l);else s.db&&s.remove(o)}function rf(e,t,n,r,s,o,i){const l=e.length;let u=[],a,f;a=X();for(let p=0,c,m,v,x;p<t;p++)for(let h=0;h<l;h++)if(v=e[h],p<v.length&&(c=v[p]))for(let d=0;d<c.length;d++){if(m=c[d],(f=a[m])?a[m]++:(f=0,a[m]=1),x=u[f]||(u[f]=[]),!i){let g=p+(h||!s?0:o||0);x=x[g]||(x[g]=[])}if(x.push(m),i&&n&&f===l-1&&x.length-r===n)return r?x.slice(r):x}if(e=u.length)if(s)u=1<u.length?sf(u,n,r,i,o):(u=u[0]).length>n||r?u.slice(r,n+r):u;else{if(e<l)return[];if(u=u[e-1],n||r)if(i)(u.length>n||r)&&(u=u.slice(r,n+r));else{s=[];for(let p=0,c;p<u.length;p++)if(c=u[p],c.length>r)r-=c.length;else if((c.length>n||r)&&(c=c.slice(r,n+r),n-=c.length,r&&(r-=c.length)),s.push(c),!n)break;u=1<s.length?[].concat.apply([],s):s[0]}}return u}function sf(e,t,n,r,s){const o=[],i=X();let l;var u=e.length;let a;if(r){for(s=u-1;0<=s;s--)if(a=(r=e[s])&&r.length){for(u=0;u<a;u++)if(l=r[u],!i[l]){if(i[l]=1,n)n--;else if(o.push(l),o.length===t)return o}}}else for(let f=u-1,p,c=0;0<=f;f--){p=e[f];for(let m=0;m<p.length;m++)if(a=(r=p[m])&&r.length){for(let v=0;v<a;v++)if(l=r[v],!i[l])if(i[l]=1,n)n--;else{let x=(m+(f<u-1&&s||0))/(f+1)|0;if((o[x]||(o[x]=[])).push(l),++c===t)return o}}}return o}function Wp(e,t,n){const r=X(),s=[];for(let o=0,i;o<t.length;o++){i=t[o];for(let l=0;l<i.length;l++)r[i[l]]=1}if(n)for(let o=0,i;o<e.length;o++)i=e[o],r[i]&&(s.push(i),r[i]=0);else for(let o=0,i,l;o<e.result.length;o++)for(i=e.result[o],t=0;t<i.length;t++)l=i[t],r[l]&&((s[o]||(s[o]=[])).push(l),r[l]=0);return s}function $l(e,t,n,r){if(!e.length)return e;if(e.length===1)return e=e[0],e=n||e.length>t?t?e.slice(n,n+t):e.slice(n):e,r?kt.call(this,e):e;let s=[];for(let o=0,i,l;o<e.length;o++)if((i=e[o])&&(l=i.length)){if(n){if(n>=l){n-=l;continue}n<l&&(i=t?i.slice(n,n+t):i.slice(n),l=i.length,n=0)}if(l>t&&(i=i.slice(0,t),l=t),!s.length&&l>=t)return r?kt.call(this,i):i;if(s.push(i),t-=l,!t)break}return s=1<s.length?[].concat.apply([],s):s[0],r?kt.call(this,s):s}function Qs(e,t,n){var r=n[0];if(r.then)return Promise.all(n).then(function(f){return e[t].apply(e,f)});if(r[0]&&r[0].index)return e[t].apply(e,r);r=[];let s=[],o=0,i=0,l,u,a;for(let f=0,p;f<n.length;f++)if(p=n[f]){let c;if(p.constructor===B)c=p.result;else if(p.constructor===Array)c=p;else if(o=p.limit||0,i=p.offset||0,a=p.suggest,u=p.resolve,l=p.enrich&&u,p.index)p.resolve=!1,c=p.index.search(p).result,p.resolve=u;else if(p.and)c=e.and(p.and);else if(p.or)c=e.or(p.or);else if(p.xor)c=e.xor(p.xor);else if(p.not)c=e.not(p.not);else continue;if(c.then)s.push(c);else if(c.length)r[f]=c;else if(!a&&(t==="and"||t==="xor")){r=[];break}}return{O:r,P:s,limit:o,offset:i,enrich:l,resolve:u,suggest:a}}B.prototype.or=function(){const{O:e,P:t,limit:n,offset:r,enrich:s,resolve:o}=Qs(this,"or",arguments);return of.call(this,e,t,n,r,s,o)};function of(e,t,n,r,s,o){if(t.length){const i=this;return Promise.all(t).then(function(l){e=[];for(let u=0,a;u<l.length;u++)(a=l[u]).length&&(e[u]=a);return of.call(i,e,[],n,r,s,o)})}return e.length&&(this.result.length&&e.push(this.result),2>e.length?this.result=e[0]:(this.result=sf(e,n,r,!1,this.h),r=0)),o?this.resolve(n,r,s):this}B.prototype.and=function(){let e=this.result.length,t,n,r,s;if(!e){const o=arguments[0];o&&(e=!!o.suggest,s=o.resolve,t=o.limit,n=o.offset,r=o.enrich&&s)}if(e){const{O:o,P:i,limit:l,offset:u,enrich:a,resolve:f,suggest:p}=Qs(this,"and",arguments);return lf.call(this,o,i,l,u,a,f,p)}return s?this.resolve(t,n,r):this};function lf(e,t,n,r,s,o,i){if(t.length){const l=this;return Promise.all(t).then(function(u){e=[];for(let a=0,f;a<u.length;a++)(f=u[a]).length&&(e[a]=f);return lf.call(l,e,[],n,r,s,o,i)})}if(e.length)if(this.result.length&&e.unshift(this.result),2>e.length)this.result=e[0];else{if(t=Mp(e))return this.result=rf(e,t,n,r,i,this.h,o),o?s?kt.call(this.index,this.result):this.result:this;this.result=[]}else i||(this.result=e);return o?this.resolve(n,r,s):this}B.prototype.xor=function(){const{O:e,P:t,limit:n,offset:r,enrich:s,resolve:o,suggest:i}=Qs(this,"xor",arguments);return uf.call(this,e,t,n,r,s,o,i)};function uf(e,t,n,r,s,o,i){if(t.length){const l=this;return Promise.all(t).then(function(u){e=[];for(let a=0,f;a<u.length;a++)(f=u[a]).length&&(e[a]=f);return uf.call(l,e,[],n,r,s,o,i)})}if(e.length)if(this.result.length&&e.unshift(this.result),2>e.length)this.result=e[0];else return this.result=Qp.call(this,e,n,r,o,this.h),o?s?kt.call(this.index,this.result):this.result:this;else i||(this.result=e);return o?this.resolve(n,r,s):this}function Qp(e,t,n,r,s){const o=[],i=X();let l=0;for(let u=0,a;u<e.length;u++)if(a=e[u]){l<a.length&&(l=a.length);for(let f=0,p;f<a.length;f++)if(p=a[f])for(let c=0,m;c<p.length;c++)m=p[c],i[m]=i[m]?2:1}for(let u=0,a,f=0;u<l;u++)for(let p=0,c;p<e.length;p++)if((c=e[p])&&(a=c[u])){for(let m=0,v;m<a.length;m++)if(v=a[m],i[v]===1)if(n)n--;else if(r){if(o.push(v),o.length===t)return o}else{const x=u+(p?s:0);if(o[x]||(o[x]=[]),o[x].push(v),++f===t)return o}}return o}B.prototype.not=function(){const{O:e,P:t,limit:n,offset:r,enrich:s,resolve:o,suggest:i}=Qs(this,"not",arguments);return af.call(this,e,t,n,r,s,o,i)};function af(e,t,n,r,s,o,i){if(t.length){const l=this;return Promise.all(t).then(function(u){e=[];for(let a=0,f;a<u.length;a++)(f=u[a]).length&&(e[a]=f);return af.call(l,e,[],n,r,s,o,i)})}if(e.length&&this.result.length)this.result=Yp.call(this,e,n,r,o);else if(o)return this.resolve(n,r,s);return o?s?kt.call(this.index,this.result):this.result:this}function Yp(e,t,n,r){const s=[];e=new Set(e.flat().flat());for(let o=0,i,l=0;o<this.result.length;o++)if(i=this.result[o]){for(let u=0,a;u<i.length;u++)if(a=i[u],!e.has(a)){if(n)n--;else if(r){if(s.push(a),s.length===t)return s}else if(s[o]||(s[o]=[]),s[o].push(a),++l===t)return s}}return s}function B(e){if(!this||this.constructor!==B)return new B(e);if(e&&e.index)return e.resolve=!1,this.index=e.index,this.h=e.boost||0,this.result=e.index.search(e).result,this;this.index=null,this.result=e||[],this.h=0}B.prototype.limit=function(e){if(this.result.length){const t=[];for(let n=0,r;n<this.result.length;n++)if(r=this.result[n])if(r.length<=e){if(t[n]=r,e-=r.length,!e)break}else{t[n]=r.slice(0,e);break}this.result=t}return this},B.prototype.offset=function(e){if(this.result.length){const t=[];for(let n=0,r;n<this.result.length;n++)(r=this.result[n])&&(r.length<=e?e-=r.length:(t[n]=r.slice(e),e=0));this.result=t}return this},B.prototype.boost=function(e){return this.h+=e,this},B.prototype.resolve=function(e,t,n){const r=this.result,s=this.index;return this.result=this.index=null,r.length?(typeof e=="object"&&(n=e.enrich,t=e.offset,e=e.limit),$l.call(s,r,e||100,t,n)):r},Vt.prototype.search=function(e,t,n,r){n||(!t&&Er(e)?(n=e,e=""):Er(t)&&(n=t,t=0));let s=[];var o=[],i;let l,u,a,f=0;var p=!0;let c;if(n){n.constructor===Array&&(n={index:n}),e=n.query||e;var m=n.pluck;l=n.merge,u=m||n.field||(u=n.index)&&(u.index?null:u),a=this.tag&&n.tag;var v=n.suggest;p=n.resolve!==!1,p||m||!(u=u||this.field)||(_e(u)?m=u:(u.constructor===Array&&u.length===1&&(u=u[0]),m=u.field||u.index)),c=(i=this.store&&n.enrich&&p)&&n.highlight,t=n.limit||t;var x=n.offset||0;if(t||(t=100),a&&(!this.db||!r)){a.constructor!==Array&&(a=[a]);var h=[];for(let y=0,$;y<a.length;y++)if($=a[y],$.field&&$.tag){var d=$.tag;if(d.constructor===Array)for(var g=0;g<d.length;g++)h.push($.field,d[g]);else h.push($.field,d)}else{d=Object.keys($);for(let S=0,C,T;S<d.length;S++)if(C=d[S],T=$[C],T.constructor===Array)for(g=0;g<T.length;g++)h.push(C,T[g]);else h.push(C,T)}if(a=h,!e){if(p=[],h.length)for(o=0;o<h.length;o+=2){if(this.db){if(m=this.index.get(h[o]),!m)continue;p.push(m=m.db.tag(h[o+1],t,x,i))}else m=Jp.call(this,h[o],h[o+1],t,x,i);s.push({field:h[o],tag:h[o+1],result:m})}return p.length?Promise.all(p).then(function(y){for(let $=0;$<y.length;$++)s[$].result=y[$];return s}):s}}u&&u.constructor!==Array&&(u=[u])}u||(u=this.field),h=!r&&(this.worker||this.db)&&[];let w;for(let y=0,$,S,C;y<u.length;y++){if(S=u[y],this.db&&this.tag&&!this.D[y])continue;let T;if(_e(S)||(T=S,S=T.field,e=T.query||e,t=T.limit||t,x=T.offset||x,v=T.suggest||v,i=this.store&&(T.enrich||i)),r)$=r[y];else if(d=T||n,g=this.index.get(S),a&&(this.db&&(d.tag=a,w=g.db.support_tag_search,d.field=u),w||(d.enrich=!1)),h){h[y]=g.search(e,t,d),d&&i&&(d.enrich=i);continue}else $=g.search(e,t,d),d&&i&&(d.enrich=i);if(C=$&&(p?$.length:$.result.length),a&&C){if(d=[],g=0,this.db&&r){if(!w)for(let N=u.length;N<r.length;N++){let M=r[N];if(M&&M.length)g++,d.push(M);else if(!v)return p?s:new B(s)}}else for(let N=0,M,ze;N<a.length;N+=2){if(M=this.tag.get(a[N]),!M){if(v)continue;return p?s:new B(s)}if(ze=(M=M&&M.get(a[N+1]))&&M.length)g++,d.push(M);else if(!v)return p?s:new B(s)}if(g){if($=Wp($,d,p),C=$.length,!C&&!v)return p?$:new B($);g--}}if(C)o[f]=S,s.push($),f++;else if(u.length===1)return p?s:new B(s)}if(h){if(this.db&&a&&a.length&&!w)for(i=0;i<a.length;i+=2){if(o=this.index.get(a[i]),!o){if(v)continue;return p?s:new B(s)}h.push(o.db.tag(a[i+1],t,x,!1))}const y=this;return Promise.all(h).then(function($){return $.length?y.search(e,t,n,$):$})}if(!f)return p?s:new B(s);if(m&&(!i||!this.store))return s[0];for(h=[],x=0;x<o.length;x++){if(v=s[x],i&&v.length&&typeof v[0].doc>"u"&&(this.db?h.push(v=this.index.get(this.field[0]).db.enrich(v)):v=kt.call(this,v)),m)return p?v:new B(v);s[x]={field:o[x],result:v}}if(i&&this.db&&h.length){const y=this;return Promise.all(h).then(function($){for(let S=0;S<$.length;S++)s[S].result=$[S];return l?ff(s):c?cf(s,e,y.index,y.field,y.D,c):s})}return l?ff(s):c?cf(s,e,this.index,this.field,this.D,c):s};function cf(e,t,n,r,s,o){let i,l,u;for(let a=0,f,p,c,m;a<e.length;a++){if(f=e[a].field,!f)continue;let v=e[a].result;c=n.get(f),p=c.encoder,u=c.tokenize,m=s[r.indexOf(f)],p!==i&&(i=p,l=i.encode(t));for(let x=0;x<v.length;x++){let h="",d=Tr(v[x].doc,m).split(/\s+/);for(let g=0,w,y;g<d.length;g++){w=d[g],y=p.encode(w),y=1<y.length?y.join(" "):y[0];let $;if(y&&w)for(let S=0,C;S<l.length;S++)if(C=l[S],u==="strict"){if(y===C){h+=(h?" ":"")+o.replace("$1",w),$=!0;break}}else{const T=y.indexOf(C);if(-1<T){h+=(h?" ":"")+w.substring(0,T)+o.replace("$1",w.substring(T,C.length))+w.substring(T+C.length),$=!0;break}}$||(h+=(h?" ":"")+d[g])}v[x].highlight=h}}return e}function ff(e){const t=[],n=X();for(let r=0,s,o;r<e.length;r++){s=e[r],o=s.result;for(let i=0,l,u,a;i<o.length;i++)u=o[i],typeof u!="object"&&(u={id:u}),l=u.id,(a=n[l])?a.push(s.field):(u.field=n[l]=[s.field],t.push(u))}return t}function Jp(e,t,n,r,s){if(e=this.tag.get(e),!e)return[];if((t=(e=e&&e.get(t))&&e.length-r)&&0<t)return(t>n||r)&&(e=e.slice(r,r+n)),s&&(e=kt.call(this,e)),e}function kt(e){if(!this||!this.store)return e;const t=Array(e.length);for(let n=0,r;n<e.length;n++)r=e[n],t[n]={id:r,doc:this.store.get(r)};return t}function Vt(e){if(!this||this.constructor!==Vt)return new Vt(e);const t=e.document||e.doc||e;let n,r;if(this.D=[],this.field=[],this.J=[],this.key=(n=t.key||t.id)&&Ys(n,this.J)||"id",(r=e.keystore||0)&&(this.keystore=r),this.fastupdate=!!e.fastupdate,this.reg=!this.fastupdate||e.worker||e.db?r?new Re(r):new Set:r?new He(r):new Map,this.C=(n=t.store||null)&&n&&n!==!0&&[],this.store=n&&(r?new He(r):new Map),this.cache=(n=e.cache||null)&&new Bt(n),e.cache=!1,this.worker=e.worker,this.priority=e.priority||4,this.index=Gp.call(this,e,t),this.tag=null,(n=t.tag)&&(typeof n=="string"&&(n=[n]),n.length)){this.tag=new Map,this.F=[],this.R=[];for(let s=0,o,i;s<n.length;s++){if(o=n[s],i=o.field||o,!i)throw Error("The tag field from the document descriptor is undefined.");o.custom?this.F[s]=o.custom:(this.F[s]=Ys(i,this.J),o.filter&&(typeof this.F[s]=="string"&&(this.F[s]=new String(this.F[s])),this.F[s].I=o.filter)),this.R[s]=i,this.tag.set(i,new Map)}}if(this.worker){this.fastupdate=!1,e=[];for(const s of this.index.values())s.then&&e.push(s);if(e.length){const s=this;return Promise.all(e).then(function(o){let i=0;for(const l of s.index.entries()){const u=l[0];l[1].then&&s.index.set(u,o[i++])}return s})}}else e.db&&(this.fastupdate=!1,this.mount(e.db))}A=Vt.prototype,A.mount=function(e){let t=this.field;if(this.tag)for(let s=0,o;s<this.R.length;s++){o=this.R[s];var n=void 0;this.index.set(o,n=new Ke({},this.reg)),t===this.field&&(t=t.slice(0)),t.push(o),n.tag=this.tag.get(o)}n=[];const r={db:e.db,type:e.type,fastupdate:e.fastupdate};for(let s=0,o,i;s<t.length;s++){r.field=i=t[s],o=this.index.get(i);const l=new e.constructor(e.id,r);l.id=e.id,n[s]=l.mount(o),o.document=!0,s?o.bypass=!0:o.store=this.store}return this.db=!0,Promise.all(n)},A.commit=async function(e,t){const n=[];for(const r of this.index.values())n.push(r.commit(e,t));await Promise.all(n),this.reg.clear()},A.destroy=function(){const e=[];for(const t of this.index.values())e.push(t.destroy());return Promise.all(e)};function Gp(e,t){const n=new Map;let r=t.index||t.field||t;_e(r)&&(r=[r]);for(let s=0,o,i;s<r.length;s++){if(o=r[s],_e(o)||(i=o,o=o.field),i=Er(i)?Object.assign({},e,i):e,this.worker){const l=new Lr(i);n.set(o,l)}this.worker||n.set(o,new Ke(i,this.reg)),i.custom?this.D[s]=i.custom:(this.D[s]=Ys(o,this.J),i.filter&&(typeof this.D[s]=="string"&&(this.D[s]=new String(this.D[s])),this.D[s].I=i.filter)),this.field[s]=o}if(this.C){e=t.store,_e(e)&&(e=[e]);for(let s=0,o,i;s<e.length;s++)o=e[s],i=o.field||o,o.custom?(this.C[s]=o.custom,o.custom.V=i):(this.C[s]=Ys(i,this.J),o.filter&&(typeof this.C[s]=="string"&&(this.C[s]=new String(this.C[s])),this.C[s].I=o.filter))}return n}function Ys(e,t){const n=e.split(":");let r=0;for(let s=0;s<n.length;s++)e=n[s],e[e.length-1]==="]"&&(e=e.substring(0,e.length-2))&&(t[r]=!0),e&&(n[r++]=e);return r<n.length&&(n.length=r),1<r?n:n[0]}A.append=function(e,t){return this.add(e,t,!0)},A.update=function(e,t){return this.remove(e).add(e,t)},A.remove=function(e){Er(e)&&(e=Tr(e,this.key));for(var t of this.index.values())t.remove(e,!0);if(this.reg.has(e)){if(this.tag&&!this.fastupdate)for(let n of this.tag.values())for(let r of n){t=r[0];const s=r[1],o=s.indexOf(e);-1<o&&(1<s.length?s.splice(o,1):n.delete(t))}this.store&&this.store.delete(e),this.reg.delete(e)}return this.cache&&this.cache.remove(e),this},A.clear=function(){const e=[];for(const t of this.index.values()){const n=t.clear();n.then&&e.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(),e.length?Promise.all(e):this},A.contain=function(e){return this.db?this.index.get(this.field[0]).db.has(e):this.reg.has(e)},A.cleanup=function(){for(const e of this.index.values())e.cleanup();return this},A.get=function(e){return this.db?this.index.get(this.field[0]).db.enrich(e).then(function(t){return t[0]&&t[0].doc||null}):this.store.get(e)||null},A.set=function(e,t){return typeof e=="object"&&(t=e,e=Tr(t,this.key)),this.store.set(e,t),this},A.searchCache=hf,A.export=function(e,t,n=0,r=0){if(n<this.field.length){const i=this.field[n];if((t=this.index.get(i).export(e,i,n,r=1))&&t.then){const l=this;return t.then(function(){return l.export(e,i,n+1)})}return this.export(e,i,n+1)}let s,o;switch(r){case 0:s="reg",o=qc(this.reg),t=null;break;case 1:s="tag",o=this.tag&&Gc(this.tag,this.reg.size),t=null;break;case 2:s="doc",o=this.store&&vl(this.store),t=null;break;default:return}return Ws.call(this,e,t,s,o,n,r)},A.import=function(e,t){var n=e.split(".");n[n.length-1]==="json"&&n.pop();const r=2<n.length?n[0]:"";if(n=2<n.length?n[2]:n[1],this.worker&&r)return this.index.get(r).import(e);if(t){if(typeof t=="string"&&(t=JSON.parse(t)),r)return this.index.get(r).import(n,t);switch(n){case"reg":this.fastupdate=!1,this.reg=Zc(t,this.reg);for(let s=0,o;s<this.field.length;s++)o=this.index.get(this.field[s]),o.fastupdate=!1,o.reg=this.reg;if(this.worker){t=[];for(const s of this.index.values())t.push(s.import(e));return Promise.all(t)}break;case"tag":this.tag=Xc(t,this.tag);break;case"doc":this.store=wl(t,this.store)}}},ml(Vt.prototype);function hf(e,t,n){e=(typeof e=="object"?""+e.query:e).toLowerCase(),this.cache||(this.cache=new Bt);let r=this.cache.get(e);if(!r){if(r=this.search(e,t,n),r.then){const s=this;r.then(function(o){return s.cache.set(e,o),o})}this.cache.set(e,r)}return r}function Bt(e){this.limit=e&&e!==!0?e:1e3,this.cache=new Map,this.h=""}Bt.prototype.set=function(e,t){this.cache.set(this.h=e,t),this.cache.size>this.limit&&this.cache.delete(this.cache.keys().next().value)},Bt.prototype.get=function(e){const t=this.cache.get(e);return t&&this.h!==e&&(this.cache.delete(e),this.cache.set(this.h=e,t)),t},Bt.prototype.remove=function(e){for(const t of this.cache){const n=t[0];t[1].includes(e)&&this.cache.delete(n)}},Bt.prototype.clear=function(){this.cache.clear(),this.h=""};const df={normalize:!1,numeric:!1,dedupe:!1},Js={},kl=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"]]),pf=new Map([["ae","a"],["oe","o"],["sh","s"],["kh","k"],["th","t"],["ph","f"],["pf","f"]]),gf=[/([^aeo])h(.)/g,"$1$2",/([aeo])h([^aeo]|$)/g,"$1$2",/(.)\1+/g,"$1"],mf={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 yf={Exact:df,Default:Js,Normalize:Js,LatinBalance:{mapper:kl},LatinAdvanced:{mapper:kl,matcher:pf,replacer:gf},LatinExtra:{mapper:kl,replacer:gf.concat([/(?!^)[aeo]/g,""]),matcher:pf},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(e){for(let n=0;n<e.length;n++){var t=e[n];let r=t.charAt(0),s=mf[r];for(let o=1,i;o<t.length&&(i=t.charAt(o),i==="h"||i==="w"||!(i=mf[i])||i===s||(r+=i,s=i,r.length!==4));o++);e[n]=r}}},CJK:{split:""},LatinExact:df,LatinDefault:Js,LatinSimple:Js};Ke.prototype.remove=function(e,t){const n=this.reg.size&&(this.fastupdate?this.reg.get(e):this.reg.has(e));if(n){if(this.fastupdate){for(let r=0,s;r<n.length;r++)if(s=n[r])if(2>s.length)s.pop();else{const o=s.indexOf(e);o===n.length-1?s.pop():s.splice(o,1)}}else Or(this.map,e),this.depth&&Or(this.ctx,e);t||this.reg.delete(e)}return this.db&&(this.commit_task.push({del:e}),this.T&&Sf(this)),this.cache&&this.cache.remove(e),this};function Or(e,t){let n=0;var r=typeof t>"u";if(e.constructor===Array){for(let s=0,o,i;s<e.length;s++)if((o=e[s])&&o.length)if(r)n++;else if(i=o.indexOf(t),0<=i){1<o.length?(o.splice(i,1),n++):delete e[s];break}else n++}else for(let s of e.entries()){r=s[0];const o=Or(s[1],t);o?n+=o:e.delete(r)}return n}const Xp={memory:{resolution:1},performance:{resolution:3,fastupdate:!0,context:{depth:1,resolution:1}},match:{tokenize:"forward"},score:{resolution:9,context:{depth:2,resolution:3}}};Ke.prototype.add=function(e,t,n,r){if(t&&(e||e===0)){if(!r&&!n&&this.reg.has(e))return this.update(e,t);if(t=this.encoder.encode(t),r=t.length){const a=X(),f=X(),p=this.depth,c=this.resolution;for(let m=0;m<r;m++){let v=t[this.rtl?r-1-m:m];var s=v.length;if(s&&(p||!f[v])){var o=this.score?this.score(t,v,m,null,0):Gs(c,r,m),i="";switch(this.tokenize){case"full":if(2<s){for(let x=0,h;x<s;x++)for(o=s;o>x;o--){i=v.substring(x,o),h=this.rtl?s-1-x:x;var l=this.score?this.score(t,v,m,i,h):Gs(c,r,m,s,h);_r(this,f,i,l,e,n)}break}case"bidirectional":case"reverse":if(1<s){for(l=s-1;0<l;l--){i=v[this.rtl?s-1-l:l]+i;var u=this.score?this.score(t,v,m,i,l):Gs(c,r,m,s,l);_r(this,f,i,u,e,n)}i=""}case"forward":if(1<s){for(l=0;l<s;l++)i+=v[this.rtl?s-1-l:l],_r(this,f,i,o,e,n);break}default:if(_r(this,f,v,o,e,n),p&&1<r&&m<r-1){for(s=X(),i=this.U,o=v,l=Math.min(p+1,this.rtl?m+1:r-m),s[o]=1,u=1;u<l;u++)if((v=t[this.rtl?r-1-m-u:m+u])&&!s[v]){s[v]=1;const x=this.score?this.score(t,o,m,v,u-1):Gs(i+(r/2>i?0:1),r,m,l-1,u-1),h=this.bidirectional&&v>o;_r(this,a,h?o:v,x,e,n,h?v:o)}}}}}this.fastupdate||this.reg.add(e)}else t=""}return this.db&&(t||this.commit_task.push({del:e}),this.T&&Sf(this)),this};function _r(e,t,n,r,s,o,i){let l=i?e.ctx:e.map,u;if((!t[n]||i&&!(u=t[n])[i])&&(i?(t=u||(t[n]=X()),t[i]=1,(u=l.get(i))?l=u:l.set(i,l=new Map)):t[n]=1,(u=l.get(n))?l=u:l.set(n,l=u=[]),l=l[r]||(l[r]=[]),!o||!l.includes(s))){if(l.length===2**31-1){if(t=new Ut(l),e.fastupdate)for(let a of e.reg.values())a.includes(l)&&(a[a.indexOf(l)]=t);u[r]=l=t}l.push(s),e.fastupdate&&((r=e.reg.get(s))?r.push(l):e.reg.set(s,[l]))}}function Gs(e,t,n,r,s){return n&&1<e?t+(r||0)<=e?n+(s||0):(e-1)/(t+(r||0))*(n+(s||0))+1|0:0}Ke.prototype.search=function(e,t,n){n||(t||typeof e!="object"?typeof t=="object"&&(n=t,t=0):(n=e,e=""));let r=[],s,o,i,l=0,u,a,f,p,c;n?(e=n.query||e,t=n.limit||t,l=n.offset||0,o=n.context,i=n.suggest,c=(u=n.resolve!==!1)&&n.enrich,f=n.boost,p=n.resolution,a=this.db&&n.tag):u=this.resolve;let m=this.encoder.encode(e);if(s=m.length,t=t||(u?100:0),s===1)return wf.call(this,m[0],"",t,l,u,c,a);if(o=this.depth&&o!==!1,s===2&&o&&!i)return wf.call(this,m[1],m[0],t,l,u,c,a);let v=X(),x=0,h;if(o&&(h=m[0],x=1),p||p===0||(p=h?this.U:this.resolution),this.db){if(this.db.search&&(e=this.db.search(this,m,t,l,i,u,c,a),e!==!1))return e;const d=this;return async function(){for(let g,w;x<s;x++){if((w=m[x])&&!v[w]){if(v[w]=1,g=await Cl(d,w,h,0,0,!1,!1),g=xf(g,r,i,p)){r=g;break}h&&(i&&g&&r.length||(h=w))}i&&h&&x===s-1&&!r.length&&(p=d.resolution,h="",x=-1,v=X())}return vf(r,p,t,l,i,f,u)}()}for(let d,g;x<s;x++){if((g=m[x])&&!v[g]){if(v[g]=1,d=Cl(this,g,h,0,0,!1,!1),d=xf(d,r,i,p)){r=d;break}h&&(i&&d&&r.length||(h=g))}i&&h&&x===s-1&&!r.length&&(p=this.resolution,h="",x=-1,v=X())}return vf(r,p,t,l,i,f,u)};function vf(e,t,n,r,s,o,i){let l=e.length,u=e;if(1<l)u=rf(e,t,n,r,s,o,i);else if(l===1)return i?$l.call(null,e[0],n,r):new B(e[0]);return i?u:new B(u)}function wf(e,t,n,r,s,o,i){return e=Cl(this,e,t,n,r,s,o,i),this.db?e.then(function(l){return s?l||[]:new B(l)}):e&&e.length?s?$l.call(this,e,n,r):new B(e):s?[]:new B}function xf(e,t,n,r){let s=[];if(e&&e.length){if(e.length<=r){t.push(e);return}for(let o=0,i;o<r;o++)(i=e[o])&&(s[o]=i);if(s.length){t.push(s);return}}if(!n)return s}function Cl(e,t,n,r,s,o,i,l){let u;return n&&(u=e.bidirectional&&t>n)&&(u=n,n=t,t=u),e.db?e.db.get(t,n,r,s,o,i,l):(e=n?(e=e.ctx.get(n))&&e.get(t):e.map.get(t),e)}function Ke(e,t){if(!this||this.constructor!==Ke)return new Ke(e);if(e){var n=_e(e)?e:e.preset;n&&(e=Object.assign({},Xp[n],e))}else e={};n=e.context;const r=n===!0?{depth:1}:n||{},s=_e(e.encoder)?yf[e.encoder]:e.encode||e.encoder||{};this.encoder=s.encode?s:typeof s=="object"?new jr(s):{encode:s},this.resolution=e.resolution||9,this.tokenize=n=(n=e.tokenize)&&n!=="default"&&n!=="exact"&&n||"strict",this.depth=n==="strict"&&r.depth||0,this.bidirectional=r.bidirectional!==!1,this.fastupdate=!!e.fastupdate,this.score=e.score||null,(n=e.keystore||0)&&(this.keystore=n),this.map=n?new He(n):new Map,this.ctx=n?new He(n):new Map,this.reg=t||(this.fastupdate?n?new He(n):new Map:n?new Re(n):new Set),this.U=r.resolution||3,this.rtl=s.rtl||e.rtl||!1,this.cache=(n=e.cache||null)&&new Bt(n),this.resolve=e.resolve!==!1,(n=e.db)&&(this.db=this.mount(n)),this.T=e.commit!==!1,this.commit_task=[],this.commit_timer=null,this.priority=e.priority||4}A=Ke.prototype,A.mount=function(e){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),e.mount(this)},A.commit=function(e,t){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this,e,t)},A.destroy=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.destroy()};function Sf(e){e.commit_timer||(e.commit_timer=setTimeout(function(){e.commit_timer=null,e.db.commit(e,void 0,void 0)},1))}A.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=[{clear:!0}]),this},A.append=function(e,t){return this.add(e,t,!0)},A.contain=function(e){return this.db?this.db.has(e):this.reg.has(e)},A.update=function(e,t){const n=this,r=this.remove(e);return r&&r.then?r.then(()=>n.add(e,t)):this.add(e,t)},A.cleanup=function(){return this.fastupdate?(Or(this.map),this.depth&&Or(this.ctx),this):this},A.searchCache=hf,A.export=function(e,t,n=0,r=0){let s,o;switch(r){case 0:s="reg",o=qc(this.reg);break;case 1:s="cfg",o=null;break;case 2:s="map",o=vl(this.map,this.reg.size);break;case 3:s="ctx",o=Gc(this.ctx,this.reg.size);break;default:return}return Ws.call(this,e,t,s,o,n,r)},A.import=function(e,t){if(t)switch(typeof t=="string"&&(t=JSON.parse(t)),e=e.split("."),e[e.length-1]==="json"&&e.pop(),e.length===3&&e.shift(),e=1<e.length?e[1]:e[0],e){case"reg":this.fastupdate=!1,this.reg=Zc(t,this.reg);break;case"map":this.map=wl(t,this.map);break;case"ctx":this.ctx=Xc(t,this.ctx)}},A.serialize=function(e=!0){let t="",n="",r="";if(this.reg.size){let o;for(var s of this.reg.keys())o||(o=typeof s),t+=(t?",":"")+(o==="string"?'"'+s+'"':s);t="index.reg=new Set(["+t+"]);",n=bc(this.map,o),n="index.map=new Map(["+n+"]);";for(const i of this.ctx.entries()){s=i[0];let l=bc(i[1],o);l="new Map(["+l+"])",l='["'+s+'",'+l+"]",r+=(r?",":"")+l}r="index.ctx=new Map(["+r+"]);"}return e?"function inject(index){"+t+n+r+"}":t+n+r},ml(Ke.prototype);const $f=typeof window<"u"&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),Xs=["map","ctx","tag","reg","cfg"],Ht=X();function kf(e,t={}){if(!this)return new kf(e,t);typeof e=="object"&&(t=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=t.field?t.field.toLowerCase().replace(/[^a-z0-9_\-]/g,""):"",this.type=t.type,this.fastupdate=this.support_tag_search=!1,this.db=null,this.h={}}A=kf.prototype,A.mount=function(e){return e.encoder?(e.db=this,this.open()):e.mount(this)},A.open=function(){if(this.db)return this.db;let e=this;navigator.storage&&navigator.storage.persist(),Ht[e.id]||(Ht[e.id]=[]),Ht[e.id].push(e.field);const t=$f.open(e.id,1);return t.onupgradeneeded=function(){const n=e.db=this.result;for(let r=0,s;r<Xs.length;r++){s=Xs[r];for(let o=0,i;o<Ht[e.id].length;o++)i=Ht[e.id][o],n.objectStoreNames.contains(s+(s!=="reg"&&i?":"+i:""))||n.createObjectStore(s+(s!=="reg"&&i?":"+i:""))}},e.db=Ct(t,function(n){e.db=n,e.db.onversionchange=function(){e.close()}})},A.close=function(){this.db&&this.db.close(),this.db=null},A.destroy=function(){const e=$f.deleteDatabase(this.id);return Ct(e)},A.clear=function(){const e=[];for(let n=0,r;n<Xs.length;n++){r=Xs[n];for(let s=0,o;s<Ht[this.id].length;s++)o=Ht[this.id][s],e.push(r+(r!=="reg"&&o?":"+o:""))}const t=this.db.transaction(e,"readwrite");for(let n=0;n<e.length;n++)t.objectStore(e[n]).clear();return Ct(t)},A.get=function(e,t,n=0,r=0,s=!0,o=!1){e=this.db.transaction((t?"ctx":"map")+(this.field?":"+this.field:""),"readonly").objectStore((t?"ctx":"map")+(this.field?":"+this.field:"")).get(t?t+":"+e:e);const i=this;return Ct(e).then(function(l){let u=[];if(!l||!l.length)return u;if(s){if(!n&&!r&&l.length===1)return l[0];for(let a=0,f;a<l.length;a++)if((f=l[a])&&f.length){if(r>=f.length){r-=f.length;continue}const p=n?r+Math.min(f.length-r,n):f.length;for(let c=r;c<p;c++)u.push(f[c]);if(r=0,u.length===n)break}return o?i.enrich(u):u}return l})},A.tag=function(e,t=0,n=0,r=!1){e=this.db.transaction("tag"+(this.field?":"+this.field:""),"readonly").objectStore("tag"+(this.field?":"+this.field:"")).get(e);const s=this;return Ct(e).then(function(o){return!o||!o.length||n>=o.length?[]:!t&&!n?o:(o=o.slice(n,n+t),r?s.enrich(o):o)})},A.enrich=function(e){typeof e!="object"&&(e=[e]);const t=this.db.transaction("reg","readonly").objectStore("reg"),n=[];for(let r=0;r<e.length;r++)n[r]=Ct(t.get(e[r]));return Promise.all(n).then(function(r){for(let s=0;s<r.length;s++)r[s]={id:e[s],doc:r[s]?JSON.parse(r[s]):null};return r})},A.has=function(e){return e=this.db.transaction("reg","readonly").objectStore("reg").getKey(e),Ct(e).then(function(t){return!!t})},A.search=null,A.info=function(){},A.transaction=function(e,t,n){e+=e!=="reg"&&this.field?":"+this.field:"";let r=this.h[e+":"+t];if(r)return n.call(this,r);let s=this.db.transaction(e,t);this.h[e+":"+t]=r=s.objectStore(e);const o=n.call(this,r);return this.h[e+":"+t]=null,Ct(s).finally(function(){return s=r=null,o})},A.commit=async function(e,t,n){if(t)await this.clear(),e.commit_task=[];else{let r=e.commit_task;e.commit_task=[];for(let s=0,o;s<r.length;s++)if(o=r[s],o.clear){await this.clear(),t=!0;break}else r[s]=o.del;t||(n||(r=r.concat(Ip(e.reg))),r.length&&await this.remove(r))}e.reg.size&&(await this.transaction("map","readwrite",function(r){for(const s of e.map){const o=s[0],i=s[1];i.length&&(t?r.put(i,o):r.get(o).onsuccess=function(){let l=this.result;var u;if(l&&l.length){const a=Math.max(l.length,i.length);for(let f=0,p,c;f<a;f++)if((c=i[f])&&c.length){if((p=l[f])&&p.length)for(u=0;u<c.length;u++)p.push(c[u]);else l[f]=c;u=1}}else l=i,u=1;u&&r.put(l,o)})}}),await this.transaction("ctx","readwrite",function(r){for(const s of e.ctx){const o=s[0],i=s[1];for(const l of i){const u=l[0],a=l[1];a.length&&(t?r.put(a,o+":"+u):r.get(o+":"+u).onsuccess=function(){let f=this.result;var p;if(f&&f.length){const c=Math.max(f.length,a.length);for(let m=0,v,x;m<c;m++)if((x=a[m])&&x.length){if((v=f[m])&&v.length)for(p=0;p<x.length;p++)v.push(x[p]);else f[m]=x;p=1}}else f=a,p=1;p&&r.put(f,o+":"+u)})}}}),e.store?await this.transaction("reg","readwrite",function(r){for(const s of e.store){const o=s[0],i=s[1];r.put(typeof i=="object"?JSON.stringify(i):1,o)}}):e.bypass||await this.transaction("reg","readwrite",function(r){for(const s of e.reg.keys())r.put(1,s)}),e.tag&&await this.transaction("tag","readwrite",function(r){for(const s of e.tag){const o=s[0],i=s[1];i.length&&(r.get(o).onsuccess=function(){let l=this.result;l=l&&l.length?l.concat(i):i,r.put(l,o)})}}),e.map.clear(),e.ctx.clear(),e.tag&&e.tag.clear(),e.store&&e.store.clear(),e.document||e.reg.clear())};function Pl(e,t,n){const r=e.value;let s,o=0;for(let i=0,l;i<r.length;i++){if(l=n?r:r[i]){for(let u=0,a,f;u<t.length;u++)if(f=t[u],a=l.indexOf(f),0<=a)if(s=1,1<l.length)l.splice(a,1);else{r[i]=[];break}o+=l.length}if(n)break}o?s&&e.update(r):e.delete(),e.continue()}A.remove=function(e){return typeof e!="object"&&(e=[e]),Promise.all([this.transaction("map","readwrite",function(t){t.openCursor().onsuccess=function(){const n=this.result;n&&Pl(n,e)}}),this.transaction("ctx","readwrite",function(t){t.openCursor().onsuccess=function(){const n=this.result;n&&Pl(n,e)}}),this.transaction("tag","readwrite",function(t){t.openCursor().onsuccess=function(){const n=this.result;n&&Pl(n,e,!0)}}),this.transaction("reg","readwrite",function(t){for(let n=0;n<e.length;n++)t.delete(e[n])})])};function Ct(e,t){return new Promise((n,r)=>{e.onsuccess=e.oncomplete=function(){t&&t(this.result),t=null,n(this.result)},e.onerror=e.onblocked=r,e=null})}const qs={Encoder:jr,Document:Vt},qp=yf,Zp={finalize:e=>{let t=[];for(const n of e)t.push(...eg(n));return t}};function bp(e){return e>=19968&&e<=40959||e>=12352&&e<=12543||e>=44032&&e<=55203||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=191471||e>=196608&&e<=205743||e>=191472&&e<=192095||e>=63744&&e<=64255||e>=194560&&e<=195103}function eg(e){const t=[];let n="";for(const r of e){const s=r.codePointAt(0);bp(s)?(n&&(t.push(n),n=""),t.push(r)):n+=r}return n&&t.push(n),t}const El=new qs.Encoder(qp.Default,Zp);class tg{constructor({adminUrl:t,apiKey:n,dir:r}){Qf(this,H);const s=r==="rtl",o=r==="rtl"?"reverse":"forward";this.apiUrl=t,this.apiKey=n,this.postsIndex=new qs.Document({tokenize:o,rtl:s,document:{id:"id",index:["title","excerpt"],store:!0},encoder:El}),this.authorsIndex=new qs.Document({tokenize:o,rtl:s,document:{id:"id",index:["name"],store:!0},encoder:El}),this.tagsIndex=new qs.Document({tokenize:o,rtl:s,document:{id:"id",index:["name"],store:!0},encoder:El}),this.init=this.init.bind(this),this.search=this.search.bind(this)}async init(){await ke(this,H,Yf).call(this),await ke(this,H,Xf).call(this),await ke(this,H,bf).call(this)}search(t){const n=this.postsIndex.search(t,{enrich:!0}),r=this.authorsIndex.search(t,{enrich:!0}),s=this.tagsIndex.search(t,{enrich:!0});return{posts:ke(this,H,lo).call(this,n),authors:ke(this,H,lo).call(this,r),tags:ke(this,H,lo).call(this,s)}}}H=new WeakSet,Yf=async function(){const t=await ke(this,H,Jf).call(this);t.length>0&&ke(this,H,Gf).call(this,t)},Jf=async function(){try{const t=`${this.apiUrl}/ghost/api/content/search-index/posts/?key=${this.apiKey}`;return(await(await fetch(t)).json()).posts}catch(t){return console.error("Error fetching posts:",t),[]}},Gf=function(t){t.forEach(n=>{this.postsIndex.add(n)})},Xf=async function(){const t=await ke(this,H,qf).call(this);t.length>0&&ke(this,H,Zf).call(this,t)},qf=async function(){try{const t=`${this.apiUrl}/ghost/api/content/search-index/authors/?key=${this.apiKey}`;return(await(await fetch(t)).json()).authors}catch(t){return console.error("Error fetching authors:",t),[]}},Zf=function(t){t.forEach(n=>{this.authorsIndex.add(n)})},bf=async function(){const t=await ke(this,H,eh).call(this);t.length>0&&ke(this,H,th).call(this,t)},eh=async function(){try{const t=`${this.apiUrl}/ghost/api/content/search-index/tags/?key=${this.apiKey}`;return(await(await fetch(t)).json()).tags}catch(t){return console.error("Error fetching tags:",t),[]}},th=function(t){t.forEach(n=>{this.tagsIndex.add(n)})},lo=function(t){const n=[],r={};return t.forEach(s=>{s.result.forEach(o=>{r[o.id]||(n.push(o.doc),r[o.id]=!0)})}),n};const ng={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},rg={Authors:"الكتّاب",Cancel:"إلغاء","No matches found":"لا يوجد نتائج مطابقة",Posts:"منشورات","Search posts, tags and authors":"قم بالبحث عن المنشورات، الوسوم و الكتّاب","Show more results":"اظهر المزيد من النتائج",Tags:"الوسوم"},sg={Authors:"Автори",Cancel:"Отказ","No matches found":"Няма съвпадения",Posts:"Публикации","Search posts, tags and authors":"Търсене в публикации, етикети и автори","Show more results":"Покажи още резултати",Tags:"Етикети"},og={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},ig={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},lg={Authors:"Autors",Cancel:"Cancel·la","No matches found":"No s'ha trobat cap resultat",Posts:"Articles","Search posts, tags and authors":"Cerca articles, etiquetes i autors","Show more results":"Mostra més resultats",Tags:"Etiquetes"},ug={Authors:"Autoři",Cancel:"Zrušit","No matches found":"Nenalezeno",Posts:"Články","Search posts, tags and authors":"Prohledat články, štítky a autory","Show more results":"Zobrazit více výsledků",Tags:"Štítky"},ag={Authors:"Forfattere",Cancel:"Annuller","No matches found":"Ingen resultater fundet",Posts:"Indlæg","Search posts, tags and authors":"Søg i indlæg, tags og forfattere","Show more results":"Vis flere resultater",Tags:"Tags"},cg={Authors:"Autor*innen",Cancel:"Abbrechen","No matches found":"Keine Treffer gefunden",Posts:"Posts","Search posts, tags and authors":"Posts, Tags und Autor*innen durchsuchen","Show more results":"Mehr Ergebnisse anzeigen",Tags:"Tags"},fg={Authors:"Autoren",Cancel:"Abbrechen","No matches found":"Keine Treffer gefunden",Posts:"Beiträge","Search posts, tags and authors":"Nach Posts, Tags und Autoren suchen","Show more results":"Mehr Ergebnisse anzeigen",Tags:"Tags"},hg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},dg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},pg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},gg={Authors:"Autores",Cancel:"Cancelar","No matches found":"No se encontraron resultados",Posts:"Publicaciones","Search posts, tags and authors":"Buscar publicaciones, etiquetas y autores","Show more results":"Mostrar más resultados",Tags:"Etiquetas"},mg={Authors:"Autorid",Cancel:"Tühista","No matches found":"Vasteid ei leitud",Posts:"Postitused","Search posts, tags and authors":"Otsi postitusi, silte ja autoreid","Show more results":"Näita rohkem tulemusi",Tags:"Sildid"},yg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},vg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},wg={Authors:"Auteurs",Cancel:"Annuler","No matches found":"Aucun résultat trouvé",Posts:"Articles","Search posts, tags and authors":"Rechercher des articles, des catégories et des auteurs","Show more results":"Plus de résultats",Tags:"Catégories"},xg={Authors:"Ùghdaran",Cancel:"Sguir dheth","No matches found":"Cha deach dad a lorg a fhreagras ris na lorg thu",Posts:"Postaichean","Search posts, tags and authors":"Lorg sna postaichean, tagaichean agus ùghdaran","Show more results":"Seall barrachd thoraidhean",Tags:"Tagaichean"},Sg={Authors:"מחברים",Cancel:"ביטול","No matches found":"לא נמצאו התאמות",Posts:"פוסטים","Search posts, tags and authors":"חיפוש פוסטים, תגיות ומחברים","Show more results":"הצגת תוצאות נוספות",Tags:"תגיות"},$g={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},kg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Cg={Authors:"Szerzők",Cancel:"Mégse","No matches found":"Nincs találat",Posts:"Bejegyzések","Search posts, tags and authors":"Keresés a bejegyzések, a címkék és a szerzők között","Show more results":"További találatok megjelenítése",Tags:"Címkék"},Pg={Authors:"Penulis",Cancel:"Batalkan","No matches found":"Tidak ada hasil yang ditemukan",Posts:"Postingan","Search posts, tags and authors":"Cari postingan, tag, dan penulis","Show more results":"Tampilkan lebih banyak hasil",Tags:"Tag"},Eg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Tg={Authors:"Autori",Cancel:"Annulla","No matches found":"Nessun risultato trovato",Posts:"Articoli","Search posts, tags and authors":"Cerca articoli, tag e autori","Show more results":"Mostra più risultati",Tags:"Tag"},jg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Ng={Authors:"작성자",Cancel:"취소","No matches found":"일치하는 결과가 없어요",Posts:"게시물","Search posts, tags and authors":"게시물, 태그, 작성자 검색","Show more results":"더 많은 결과 보기",Tags:"태그"},Ag={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Lg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Og={Authors:"Autori",Cancel:"Atcelt","No matches found":"Nav atrasta neviena atbilstība",Posts:"Ziņas","Search posts, tags and authors":"Meklēt ziņas, atzīmes un autorus","Show more results":"Rādīt vairāk rezultātu",Tags:"Tagi"},_g={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Rg={Authors:"Нийтлэгчид",Cancel:"Цуцлах","No matches found":"Тохирох хайлтын үр дүн олдсонгүй",Posts:"Нийтлэлүүд","Search posts, tags and authors":"Нийтлэл, ангилал, нийтлэгчдээр хайх","Show more results":"Илүү олон үр дүн харуулах",Tags:"Ангилалууд"},zg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Ig={Authors:"Forfattere",Cancel:"Avbryt","No matches found":"Ingen treff funnet",Posts:"Innlegg","Search posts, tags and authors":"Søk i innlegg, etiketter og forfattere","Show more results":"Vis flere resultater",Tags:"Etiketter"},Mg={Authors:"लेखकहरू",Cancel:"रद्द गर्नुहोस्","No matches found":"कुनै परिणाम भेटिएन",Posts:"पोस्टहरू","Search posts, tags and authors":"पोस्टहरू, ट्यागहरू र लेखकहरू खोज्नुहोस्","Show more results":"थप परिणामहरू देखाउनुहोस्",Tags:"ट्यागहरू"},Dg={Authors:"Auteurs",Cancel:"Annuleren","No matches found":"Geen resultaten gevonden",Posts:"Berichten","Search posts, tags and authors":"Zoek berichten, tags en auteurs","Show more results":"Meer resultaten weergeven",Tags:"Tags"},Fg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Ug={Authors:"ਲੇਖਕ",Cancel:"ਰੱਦ ਕਰੋ","No matches found":"ਕੋਈ ਮੇਲ ਨਹੀਂ ਮਿਲਿਆ",Posts:"ਪੋਸਟਾਂ","Search posts, tags and authors":"ਪੋਸਟਾਂ, ਟੈਗ ਅਤੇ ਲੇਖਕ ਖੋਜੋ","Show more results":"ਹੋਰ ਨਤੀਜੇ ਦਿਖਾਓ",Tags:"ਟੈਗ"},Vg={Authors:"Autorzy",Cancel:"Anuluj","No matches found":"Nie znaleziono dopasowań",Posts:"Posty","Search posts, tags and authors":"Szukaj postów, tagów lub autorów","Show more results":"Pokaż więcej wyników",Tags:"Tagi"},Bg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Hg={Authors:"Autores",Cancel:"Cancelar","No matches found":"Nenhum resultado encontrado",Posts:"Publicações","Search posts, tags and authors":"Buscar posts, tags e autores","Show more results":"Mostrar mais resultados",Tags:"Tags"},Kg={Authors:"Autori",Cancel:"Anulează","No matches found":"Nu s-au găsit rezultate",Posts:"Postări","Search posts, tags and authors":"Caută postări, etichete și autori","Show more results":"Afișează mai multe rezultate",Tags:"Etichete"},Wg={Authors:"Авторы",Cancel:"Отмена","No matches found":"Совпадений не найдено",Posts:"Записи","Search posts, tags and authors":"Поиск по записям, тегам и авторам","Show more results":"Показать больше результатов",Tags:"Теги"},Qg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Yg={Authors:"Autori",Cancel:"Zrušiť","No matches found":"Nenašli sa žiadne výsledky",Posts:"Príspevky","Search posts, tags and authors":"Vyhľadajte príspevky, tagy a autorov","Show more results":"Zobraziť viac výsledkov",Tags:"Tagy"},Jg={Authors:"Avtorji",Cancel:"Prekliči","No matches found":"Ni najdenih zadetkov",Posts:"Članki","Search posts, tags and authors":"Iščite članke, oznake in avtorje","Show more results":"Prikaži več rezultatov",Tags:"Oznake"},Gg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Xg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},qg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Zg={Authors:"Författare",Cancel:"Avbryt","No matches found":"Inga träffar hittade",Posts:"Inlägg","Search posts, tags and authors":"Sök inlägg, taggar och författare","Show more results":"Visa fler resultat",Tags:"Taggar"},bg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},em={Authors:"Yazarlar",Cancel:"İptal","No matches found":"Eşleşme bulunamadı",Posts:"Yazılar","Search posts, tags and authors":"Yazıları, etiketleri ve yazarları ara","Show more results":"Daha fazla sonuç göster",Tags:"Etiketler"},tm={Authors:"Автори",Cancel:"Скасувати","No matches found":"Збігів не знайдено",Posts:"Публікації","Search posts, tags and authors":"Шукайте публікацій, теги та авторів","Show more results":"Показати більше результатів",Tags:"Теги"},nm={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},rm={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},sm={Authors:"Tác giả",Cancel:"Hủy","No matches found":"Không tìm thấy",Posts:"Bài viết","Search posts, tags and authors":"Tìm bài viết, chuyên mục & tác giả","Show more results":"Xem thêm kết quả",Tags:"Chuyên mục"},om={Authors:"作者",Cancel:"取消","No matches found":"未找到匹配项",Posts:"文章","Search posts, tags and authors":"搜索文章、标签和作者","Show more results":"显示更多结果",Tags:"标签"},im={Authors:"作者",Cancel:"取消","No matches found":"無相符結果",Posts:"文章","Search posts, tags and authors":"搜尋文章、標籤與作者","Show more results":"更多結果",Tags:"標籤"},lm={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},um={Authors:"ஆசிரியர்கள்",Cancel:"ரத்து செய்","No matches found":"பொருத்தங்கள் எதுவும் இல்லை",Posts:"பதிவுகள்","Search posts, tags and authors":"பதிவுகள், குறிச்சொற்கள் மற்றும் ஆசிரியர்களைத் தேடுங்கள்","Show more results":"மேலும் முடிவுகளைக் காட்டு",Tags:"குறிச்சொற்கள்"};var Cf;function Pf(){return Cf||(Cf={"/ghost/i18n/locales/af/search.json":function(){return ng},"/ghost/i18n/locales/ar/search.json":function(){return rg},"/ghost/i18n/locales/bg/search.json":function(){return sg},"/ghost/i18n/locales/bn/search.json":function(){return og},"/ghost/i18n/locales/bs/search.json":function(){return ig},"/ghost/i18n/locales/ca/search.json":function(){return lg},"/ghost/i18n/locales/cs/search.json":function(){return ug},"/ghost/i18n/locales/da/search.json":function(){return ag},"/ghost/i18n/locales/de/search.json":function(){return cg},"/ghost/i18n/locales/de-CH/search.json":function(){return fg},"/ghost/i18n/locales/el/search.json":function(){return hg},"/ghost/i18n/locales/en/search.json":function(){return dg},"/ghost/i18n/locales/eo/search.json":function(){return pg},"/ghost/i18n/locales/es/search.json":function(){return gg},"/ghost/i18n/locales/et/search.json":function(){return mg},"/ghost/i18n/locales/fa/search.json":function(){return yg},"/ghost/i18n/locales/fi/search.json":function(){return vg},"/ghost/i18n/locales/fr/search.json":function(){return wg},"/ghost/i18n/locales/gd/search.json":function(){return xg},"/ghost/i18n/locales/he/search.json":function(){return Sg},"/ghost/i18n/locales/hi/search.json":function(){return $g},"/ghost/i18n/locales/hr/search.json":function(){return kg},"/ghost/i18n/locales/hu/search.json":function(){return Cg},"/ghost/i18n/locales/id/search.json":function(){return Pg},"/ghost/i18n/locales/is/search.json":function(){return Eg},"/ghost/i18n/locales/it/search.json":function(){return Tg},"/ghost/i18n/locales/ja/search.json":function(){return jg},"/ghost/i18n/locales/ko/search.json":function(){return Ng},"/ghost/i18n/locales/kz/search.json":function(){return Ag},"/ghost/i18n/locales/lt/search.json":function(){return Lg},"/ghost/i18n/locales/lv/search.json":function(){return Og},"/ghost/i18n/locales/mk/search.json":function(){return _g},"/ghost/i18n/locales/mn/search.json":function(){return Rg},"/ghost/i18n/locales/ms/search.json":function(){return zg},"/ghost/i18n/locales/nb/search.json":function(){return Ig},"/ghost/i18n/locales/ne/search.json":function(){return Mg},"/ghost/i18n/locales/nl/search.json":function(){return Dg},"/ghost/i18n/locales/nn/search.json":function(){return Fg},"/ghost/i18n/locales/pa/search.json":function(){return Ug},"/ghost/i18n/locales/pl/search.json":function(){return Vg},"/ghost/i18n/locales/pt/search.json":function(){return Bg},"/ghost/i18n/locales/pt-BR/search.json":function(){return Hg},"/ghost/i18n/locales/ro/search.json":function(){return Kg},"/ghost/i18n/locales/ru/search.json":function(){return Wg},"/ghost/i18n/locales/si/search.json":function(){return Qg},"/ghost/i18n/locales/sk/search.json":function(){return Yg},"/ghost/i18n/locales/sl/search.json":function(){return Jg},"/ghost/i18n/locales/sq/search.json":function(){return Gg},"/ghost/i18n/locales/sr/search.json":function(){return Xg},"/ghost/i18n/locales/sr-Cyrl/search.json":function(){return qg},"/ghost/i18n/locales/sv/search.json":function(){return Zg},"/ghost/i18n/locales/th/search.json":function(){return bg},"/ghost/i18n/locales/tr/search.json":function(){return em},"/ghost/i18n/locales/uk/search.json":function(){return tm},"/ghost/i18n/locales/ur/search.json":function(){return nm},"/ghost/i18n/locales/uz/search.json":function(){return rm},"/ghost/i18n/locales/vi/search.json":function(){return sm},"/ghost/i18n/locales/zh/search.json":function(){return om},"/ghost/i18n/locales/zh-Hant/search.json":function(){return im},"/ghost/i18n/locales/sw/search.json":function(){return lm},"/ghost/i18n/locales/ta/search.json":function(){return um}})}function Ef(e){function t(n){var r=Tf(n,e);if(r!==null)return Pf()[r]();throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}return t.resolve=function(n){var r=Tf(n,e);return r!==null?r:require.resolve(n)},t}function Tf(e,t){var n=am(e);e=Zs(e);var r;e[0]==="/"&&(t="");for(var s=Pf(),o=["",".js",".json"];n?r=Zs(t+"/node_modules/"+e):r=Zs(t+"/"+e),!r.endsWith("/..");){for(var i=0;i<o.length;i++){var l=r+o[i];if(s[l])return l}if(!n)break;var u=Zs(t+"/..");if(u===t)break;t=u}return null}function am(e){var t=e[0];if(t==="/"||t==="\\")return!1;var n=e[1],r=e[2];return!(t==="."&&(!n||n==="/"||n==="\\")||t==="."&&n==="."&&(!r||r==="/"||r==="\\")||n===":"&&(r==="/"||r==="\\"))}function Zs(e){e=e.replace(/\\/g,"/");for(var t=e.split("/"),n=t[0]==="",r=1;r<t.length;r++)(t[r]==="."||t[r]==="")&&t.splice(r--,1);for(var r=1;r<t.length;r++)t[r]===".."&&r>0&&t[r-1]!==".."&&t[r-1]!=="."&&(t.splice(--r,2),r--);return e=t.join("/"),n&&e[0]!=="/"?e="/"+e:e.length===0&&(e="."),e}var bs={exports:{}};const O=e=>typeof e=="string",Rr=()=>{let e,t;const n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},jf=e=>e==null?"":""+e,cm=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},fm=/###/g,Nf=e=>e&&e.indexOf("###")>-1?e.replace(fm,"."):e,Af=e=>!e||O(e),zr=(e,t,n)=>{const r=O(t)?t.split("."):t;let s=0;for(;s<r.length-1;){if(Af(e))return{};const o=Nf(r[s]);!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++s}return Af(e)?{}:{obj:e,k:Nf(r[s])}},Lf=(e,t,n)=>{const{obj:r,k:s}=zr(e,t,Object);if(r!==void 0||t.length===1){r[s]=n;return}let o=t[t.length-1],i=t.slice(0,t.length-1),l=zr(e,i,Object);for(;l.obj===void 0&&i.length;)o=`${i[i.length-1]}.${o}`,i=i.slice(0,i.length-1),l=zr(e,i,Object),l&&l.obj&&typeof l.obj[`${l.k}.${o}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${o}`]=n},hm=(e,t,n,r)=>{const{obj:s,k:o}=zr(e,t,Object);s[o]=s[o]||[],s[o].push(n)},eo=(e,t)=>{const{obj:n,k:r}=zr(e,t);if(n)return n[r]},dm=(e,t,n)=>{const r=eo(e,n);return r!==void 0?r:eo(t,n)},Of=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?O(e[r])||e[r]instanceof String||O(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Of(e[r],t[r],n):e[r]=t[r]);return e},En=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var pm={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const gm=e=>O(e)?e.replace(/[&<>"'\/]/g,t=>pm[t]):e;class mm{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const ym=[" ",",","?","!",";"],vm=new mm(20),wm=(e,t,n)=>{t=t||"",n=n||"";const r=ym.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const s=vm.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let o=!s.test(e);if(!o){const i=e.indexOf(n);i>0&&!s.test(e.substring(0,i))&&(o=!0)}return o},Tl=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let s=e;for(let o=0;o<r.length;){if(!s||typeof s!="object")return;let i,l="";for(let u=o;u<r.length;++u)if(u!==o&&(l+=n),l+=r[u],i=s[l],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&u<r.length-1)continue;o+=u-o+1;break}s=i}return s},to=e=>e&&e.replace("_","-"),xm={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class no{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||xm,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,s){return s&&!this.debug?null:(O(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new no(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new no(this.logger,t)}}var We=new no;class ro{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(i=>{let[l,u]=i;for(let a=0;a<u;a++)l(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(i=>{let[l,u]=i;for(let a=0;a<u;a++)l.apply(l,[t,...r])})}}class _f extends ro{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,n],r&&(Array.isArray(r)?l.push(...r):O(r)&&o?l.push(...r.split(o)):l.push(r)));const u=eo(this.data,l);return!u&&!n&&!r&&t.indexOf(".")>-1&&(t=l[0],n=l[1],r=l.slice(2).join(".")),u||!i||!O(r)?u:Tl(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,s){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let l=[t,n];r&&(l=l.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(l=t.split("."),s=n,n=l[1]),this.addNamespaces(n),Lf(this.data,l,s),o.silent||this.emit("added",t,n,r,s)}addResources(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(O(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});s.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[t,n];t.indexOf(".")>-1&&(l=t.split("."),s=r,r=n,n=l[1]),this.addNamespaces(n);let u=eo(this.data,l)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?Of(u,r,o):u={...u,...r},Lf(this.data,l,u),i.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var Rf={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,s){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,s))}),t}};const zf={};class so extends ro{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),cm(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=We.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const i=r&&t.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!wm(t,r,s);if(i&&!l){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:O(o)?[o]:o};const a=t.split(r);(r!==s||r===s&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),t=a.join(s)}return{key:t,namespaces:O(o)?[o]:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:i,namespaces:l}=this.extractFromKey(t[t.length-1],n),u=l[l.length-1],a=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(a&&a.toLowerCase()==="cimode"){if(f){const y=n.nsSeparator||this.options.nsSeparator;return s?{res:`${u}${y}${i}`,usedKey:i,exactUsedKey:i,usedLng:a,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:`${u}${y}${i}`}return s?{res:i,usedKey:i,exactUsedKey:i,usedLng:a,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:i}const p=this.resolve(t,n);let c=p&&p.res;const m=p&&p.usedKey||i,v=p&&p.exactUsedKey||i,x=Object.prototype.toString.apply(c),h=["[object Number]","[object Function]","[object RegExp]"],d=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,w=!O(c)&&typeof c!="boolean"&&typeof c!="number";if(g&&c&&w&&h.indexOf(x)<0&&!(O(d)&&Array.isArray(c))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const y=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,c,{...n,ns:l}):`key '${i} (${this.language})' returned an object instead of string.`;return s?(p.res=y,p.usedParams=this.getUsedParamsDetails(n),p):y}if(o){const y=Array.isArray(c),$=y?[]:{},S=y?v:m;for(const C in c)if(Object.prototype.hasOwnProperty.call(c,C)){const T=`${S}${o}${C}`;$[C]=this.translate(T,{...n,joinArrays:!1,ns:l}),$[C]===T&&($[C]=c[C])}c=$}}else if(g&&O(d)&&Array.isArray(c))c=c.join(d),c&&(c=this.extendTranslation(c,t,n,r));else{let y=!1,$=!1;const S=n.count!==void 0&&!O(n.count),C=so.hasDefaultValue(n),T=S?this.pluralResolver.getSuffix(a,n.count,n):"",N=n.ordinal&&S?this.pluralResolver.getSuffix(a,n.count,{ordinal:!1}):"",M=S&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),ze=M&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${T}`]||n[`defaultValue${N}`]||n.defaultValue;!this.isValidLookup(c)&&C&&(y=!0,c=ze),this.isValidLookup(c)||($=!0,c=i);const ee=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&$?void 0:c,Qe=C&&ze!==c&&this.options.updateMissing;if($||y||Qe){if(this.logger.log(Qe?"updateKey":"missingKey",a,u,i,Qe?ze:c),o){const oe=this.resolve(i,{...n,keySeparator:!1});oe&&oe.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let $e=[];const Ye=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Ye&&Ye[0])for(let oe=0;oe<Ye.length;oe++)$e.push(Ye[oe]);else this.options.saveMissingTo==="all"?$e=this.languageUtils.toResolveHierarchy(n.lng||this.language):$e.push(n.lng||this.language);const jn=(oe,Ie,Kt)=>{const E=C&&Kt!==c?Kt:ee;this.options.missingKeyHandler?this.options.missingKeyHandler(oe,u,Ie,E,Qe,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(oe,u,Ie,E,Qe,n),this.emit("missingKey",oe,u,Ie,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?$e.forEach(oe=>{const Ie=this.pluralResolver.getSuffixes(oe,n);M&&n[`defaultValue${this.options.pluralSeparator}zero`]&&Ie.indexOf(`${this.options.pluralSeparator}zero`)<0&&Ie.push(`${this.options.pluralSeparator}zero`),Ie.forEach(Kt=>{jn([oe],i+Kt,n[`defaultValue${Kt}`]||ze)})}):jn($e,i,ze))}c=this.extendTranslation(c,t,n,p,r),$&&c===i&&this.options.appendNamespaceToMissingKey&&(c=`${u}:${i}`),($||y)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${i}`:i,y?c:void 0):c=this.options.parseMissingKeyHandler(c))}return s?(p.res=c,p.usedParams=this.getUsedParamsDetails(n),p):c}extendTranslation(t,n,r,s,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const a=O(t)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(a){const c=t.match(this.interpolator.nestingRegexp);f=c&&c.length}let p=r.replace&&!O(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,r.lng||this.language||s.usedLng,r),a){const c=t.match(this.interpolator.nestingRegexp),m=c&&c.length;f<m&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var c=arguments.length,m=new Array(c),v=0;v<c;v++)m[v]=arguments[v];return o&&o[0]===m[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${n[0]}`),null):i.translate(...m,n)},r)),r.interpolation&&this.interpolator.reset()}const l=r.postProcess||this.options.postProcess,u=O(l)?[l]:l;return t!=null&&u&&u.length&&r.applyPostProcessor!==!1&&(t=Rf.handle(u,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,o,i,l;return O(t)&&(t=[t]),t.forEach(u=>{if(this.isValidLookup(r))return;const a=this.extractFromKey(u,n),f=a.key;s=f;let p=a.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const c=n.count!==void 0&&!O(n.count),m=c&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),v=n.context!==void 0&&(O(n.context)||typeof n.context=="number")&&n.context!=="",x=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);p.forEach(h=>{this.isValidLookup(r)||(l=h,!zf[`${x[0]}-${h}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(zf[`${x[0]}-${h}`]=!0,this.logger.warn(`key "${s}" for languages "${x.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),x.forEach(d=>{if(this.isValidLookup(r))return;i=d;const g=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(g,f,d,h,n);else{let y;c&&(y=this.pluralResolver.getSuffix(d,n.count,n));const $=`${this.options.pluralSeparator}zero`,S=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(g.push(f+y),n.ordinal&&y.indexOf(S)===0&&g.push(f+y.replace(S,this.options.pluralSeparator)),m&&g.push(f+$)),v){const C=`${f}${this.options.contextSeparator}${n.context}`;g.push(C),c&&(g.push(C+y),n.ordinal&&y.indexOf(S)===0&&g.push(C+y.replace(S,this.options.pluralSeparator)),m&&g.push(C+$))}}let w;for(;w=g.pop();)this.isValidLookup(r)||(o=w,r=this.getResource(d,h,w,n))}))})}),{res:r,usedKey:s,exactUsedKey:o,usedLng:i,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,s):this.resourceStore.getResource(t,n,r,s)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!O(t.replace);let s=r?t.replace:t;if(r&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const o of n)delete s[o]}return s}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const jl=e=>e.charAt(0).toUpperCase()+e.slice(1);class If{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=We.create("languageUtils")}getScriptPartFromCode(t){if(t=to(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=to(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(O(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let s=Intl.getCanonicalLocales(t)[0];if(s&&this.options.lowerCaseLng&&(s=s.toLowerCase()),s)return s}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(s=>s.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=jl(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=jl(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=jl(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(o=>{if(o===s)return o;if(!(o.indexOf("-")<0&&s.indexOf("-")<0)&&(o.indexOf("-")>0&&s.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===s||o.indexOf(s)===0&&s.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),O(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),s=[],o=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return O(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):O(t)&&o(this.formatLanguageCode(t)),r.forEach(i=>{s.indexOf(i)<0&&o(this.formatLanguageCode(i))}),s}}let Sm=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],$m={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const km=["v1","v2","v3"],Cm=["v4"],Mf={zero:0,one:1,two:2,few:3,many:4,other:5},Pm=()=>{const e={};return Sm.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:$m[t.fc]}})}),e};class Em{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=We.create("pluralResolver"),(!this.options.compatibilityJSON||Cm.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Pm(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const r=to(t==="dev"?"en":t),s=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(r,{type:s})}catch{if(!t.match(/-|_/))return;const u=this.languageUtils.getLanguagePartFromCode(t);i=this.getRule(u,n)}return this.pluralRulesCache[o]=i,i}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(s=>`${n}${s}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((s,o)=>Mf[s]-Mf[o]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):r.numbers.map(s=>this.getSuffix(t,s,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(t,r);return s?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:this.getSuffixRetroCompatible(s,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let s=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const o=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!km.includes(this.options.compatibilityJSON)}}const Df=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=dm(e,t,n);return!o&&s&&O(n)&&(o=Tl(e,n,r),o===void 0&&(o=Tl(t,n,r))),o},Nl=e=>e.replace(/\$/g,"$$$$");class Tm{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=We.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:o,prefixEscaped:i,suffix:l,suffixEscaped:u,formatSeparator:a,unescapeSuffix:f,unescapePrefix:p,nestingPrefix:c,nestingPrefixEscaped:m,nestingSuffix:v,nestingSuffixEscaped:x,nestingOptionsSeparator:h,maxReplaces:d,alwaysFormat:g}=t.interpolation;this.escape=n!==void 0?n:gm,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?En(o):i||"{{",this.suffix=l?En(l):u||"}}",this.formatSeparator=a||",",this.unescapePrefix=f?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=c?En(c):m||En("$t("),this.nestingSuffix=v?En(v):x||En(")"),this.nestingOptionsSeparator=h||",",this.maxReplaces=d||1e3,this.alwaysFormat=g!==void 0?g:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,s){let o,i,l;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},a=m=>{if(m.indexOf(this.formatSeparator)<0){const d=Df(n,u,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(d,void 0,r,{...s,...n,interpolationkey:m}):d}const v=m.split(this.formatSeparator),x=v.shift().trim(),h=v.join(this.formatSeparator).trim();return this.format(Df(n,u,x,this.options.keySeparator,this.options.ignoreJSONStructure),h,r,{...s,...n,interpolationkey:x})};this.resetRegExp();const f=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,p=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>Nl(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?Nl(this.escape(m)):Nl(m)}].forEach(m=>{for(l=0;o=m.regex.exec(t);){const v=o[1].trim();if(i=a(v),i===void 0)if(typeof f=="function"){const h=f(t,o,s);i=O(h)?h:""}else if(s&&Object.prototype.hasOwnProperty.call(s,v))i="";else if(p){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`),i="";else!O(i)&&!this.useRawValueToEscape&&(i=jf(i));const x=m.safeValue(i);if(t=t.replace(o[0],x),p?(m.regex.lastIndex+=i.length,m.regex.lastIndex-=o[0].length):m.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,o,i;const l=(u,a)=>{const f=this.nestingOptionsSeparator;if(u.indexOf(f)<0)return u;const p=u.split(new RegExp(`${f}[ ]*{`));let c=`{${p[1]}`;u=p[0],c=this.interpolate(c,i);const m=c.match(/'/g),v=c.match(/"/g);(m&&m.length%2===0&&!v||v.length%2!==0)&&(c=c.replace(/'/g,'"'));try{i=JSON.parse(c),a&&(i={...a,...i})}catch(x){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,x),`${u}${f}${c}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,u};for(;s=this.nestingRegexp.exec(t);){let u=[];i={...r},i=i.replace&&!O(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let a=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const f=s[1].split(this.formatSeparator).map(p=>p.trim());s[1]=f.shift(),u=f,a=!0}if(o=n(l.call(this,s[1].trim(),i),i),o&&s[0]===t&&!O(o))return o;O(o)||(o=jf(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),o=""),a&&(o=u.reduce((f,p)=>this.format(f,p,r.lng,{...r,interpolationkey:s[1].trim()}),o.trim())),t=t.replace(s[0],o),this.regexp.lastIndex=0}return t}}const jm=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);t==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(i=>{if(i){const[l,...u]=i.split(":"),a=u.join(":").trim().replace(/^'+|'+$/g,""),f=l.trim();n[f]||(n[f]=a),a==="false"&&(n[f]=!1),a==="true"&&(n[f]=!0),isNaN(a)||(n[f]=parseInt(a,10))}})}return{formatName:t,formatOptions:n}},Tn=e=>{const t={};return(n,r,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const i=r+JSON.stringify(o);let l=t[i];return l||(l=e(to(r),s),t[i]=l),l(n)}};class Nm{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=We.create("formatter"),this.options=t,this.formats={number:Tn((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:Tn((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:Tn((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:Tn((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:Tn((n,r)=>{const s=new Intl.ListFormat(n,{...r});return o=>s.format(o)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Tn(n)}format(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(l=>l.indexOf(")")>-1)){const l=o.findIndex(u=>u.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,l)].join(this.formatSeparator)}return o.reduce((l,u)=>{const{formatName:a,formatOptions:f}=jm(u);if(this.formats[a]){let p=l;try{const c=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},m=c.locale||c.lng||s.locale||s.lng||r;p=this.formats[a](l,m,{...f,...s,...c})}catch(c){this.logger.warn(c)}return p}else this.logger.warn(`there was no format function for ${a}`);return l},t)}}const Am=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Lm extends ro{constructor(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=We.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,s.backend,s)}queueLoad(t,n,r,s){const o={},i={},l={},u={};return t.forEach(a=>{let f=!0;n.forEach(p=>{const c=`${a}|${p}`;!r.reload&&this.store.hasResourceBundle(a,p)?this.state[c]=2:this.state[c]<0||(this.state[c]===1?i[c]===void 0&&(i[c]=!0):(this.state[c]=1,f=!1,i[c]===void 0&&(i[c]=!0),o[c]===void 0&&(o[c]=!0),u[p]===void 0&&(u[p]=!0)))}),f||(l[a]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const s=t.split("|"),o=s[0],i=s[1];n&&this.emit("failedLoading",o,i,n),!n&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const l={};this.queue.forEach(u=>{hm(u.loaded,[o],i),Am(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(a=>{l[a]||(l[a]={});const f=u.loaded[a];f.length&&f.forEach(p=>{l[a][p]===void 0&&(l[a][p]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:s,wait:o,callback:i});return}this.readingCalls++;const l=(a,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(a&&f&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,s+1,o*2,i)},o);return}i(a,f)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const a=u(t,n);a&&typeof a.then=="function"?a.then(f=>l(null,f)).catch(l):l(null,a)}catch(a){l(a)}return}return u(t,n,l)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();O(t)&&(t=this.languageUtils.toResolveHierarchy(t)),O(n)&&(n=[n]);const o=this.queueLoad(t,n,r,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(i=>{this.loadOne(i)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),s=r[0],o=r[1];this.read(s,o,"read",void 0,void 0,(i,l)=>{i&&this.logger.warn(`${n}loading namespace ${o} for language ${s} failed`,i),!i&&l&&this.logger.log(`${n}loaded namespace ${o} for language ${s}`,l),this.loaded(t,i,l)})}saveMissing(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const u={...i,isUpdate:o},a=this.backend.create.bind(this.backend);if(a.length<6)try{let f;a.length===5?f=a(t,n,r,s,u):f=a(t,n,r,s),f&&typeof f.then=="function"?f.then(p=>l(null,p)).catch(l):l(null,f)}catch(f){l(f)}else a(t,n,r,s,l,u)}!t||!t[0]||this.store.addResource(t[0],n,r,s)}}}const Ff=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),O(e[1])&&(t.defaultValue=e[1]),O(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Uf=e=>(O(e.ns)&&(e.ns=[e.ns]),O(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),O(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),oo=()=>{},Om=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Ir extends ro{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Uf(t),this.services={},this.logger=We,this.modules={external:[]},Om(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(O(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=Ff();this.options={...s,...this.options,...Uf(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?We.init(o(this.modules.logger),this.options):We.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=Nm);const p=new If(this.options);this.store=new _f(this.options.resources,this.options);const c=this.services;c.logger=We,c.resourceStore=this.store,c.languageUtils=p,c.pluralResolver=new Em(p,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(c.formatter=o(f),c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new Tm(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new Lm(o(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",function(m){for(var v=arguments.length,x=new Array(v>1?v-1:0),h=1;h<v;h++)x[h-1]=arguments[h];t.emit(m,...x)}),this.modules.languageDetector&&(c.languageDetector=o(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=o(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new so(this.services,this.options),this.translator.on("*",function(m){for(var v=arguments.length,x=new Array(v>1?v-1:0),h=1;h<v;h++)x[h-1]=arguments[h];t.emit(m,...x)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=oo),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return t.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return t.store[f](...arguments),t}});const u=Rr(),a=()=>{const f=(p,c)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(c),r(p,c)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),u}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oo;const s=O(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],i=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(a=>{a!=="cimode"&&o.indexOf(a)<0&&o.push(a)})};s?i(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>i(u)),this.options.preload&&this.options.preload.forEach(l=>i(l)),this.services.backendConnector.load(o,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(l)})}else r(null)}reloadResources(t,n,r){const s=Rr();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=oo),this.services.backendConnector.reload(t,n,o=>{s.resolve(),r(o)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Rf.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const s=Rr();this.emit("languageChanging",t);const o=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},i=(u,a)=>{a?(o(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit("languageChanged",a),this.logger.log("languageChanged",a)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(u,function(){return r.t(...arguments)})},l=u=>{!t&&!u&&this.services.languageDetector&&(u=[]);const a=O(u)?u:this.services.languageUtils.getBestMatchFromCodes(u);a&&(this.language||o(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(a)),this.loadResources(a,f=>{i(f,a)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(t),s}getFixedT(t,n,r){var s=this;const o=function(i,l){let u;if(typeof l!="object"){for(var a=arguments.length,f=new Array(a>2?a-2:0),p=2;p<a;p++)f[p-2]=arguments[p];u=s.options.overloadTranslationOptionHandler([i,l].concat(f))}else u={...l};u.lng=u.lng||o.lng,u.lngs=u.lngs||o.lngs,u.ns=u.ns||o.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||r||o.keyPrefix);const c=s.options.keySeparator||".";let m;return u.keyPrefix&&Array.isArray(i)?m=i.map(v=>`${u.keyPrefix}${c}${v}`):m=u.keyPrefix?`${u.keyPrefix}${c}${i}`:i,s.t(m,u)};return O(t)?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(l,u)=>{const a=this.services.backendConnector.state[`${l}|${u}`];return a===-1||a===0||a===2};if(n.precheck){const l=n.precheck(this,i);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,t)&&(!s||i(o,t)))}loadNamespaces(t,n){const r=Rr();return this.options.ns?(O(t)&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Rr();O(t)&&(t=[t]);const s=this.options.preload||[],o=t.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return o.length?(this.options.preload=s.concat(o),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","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"],r=this.services&&this.services.languageUtils||new If(Ff());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Ir(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oo;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},o=new Ir(s);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(l=>{o[l]=this[l]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new _f(this.store.data,s),o.services.resourceStore=o.store),o.translator=new so(o.services,s),o.translator.on("*",function(l){for(var u=arguments.length,a=new Array(u>1?u-1:0),f=1;f<u;f++)a[f-1]=arguments[f];o.emit(l,...a)}),o.init(s,n),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Vf=Ir.createInstance();Vf.createInstance=Ir.createInstance;var _m=Vf;const Rm=_m,Bf=["af","ar","bg","bn","bs","ca","cs","da","de","de-CH","el","en","eo","es","et","fa","fi","fr","gd","he","hi","hr","hu","id","is","it","ja","ko","kz","lt","lv","mk","mn","ms","nb","ne","nl","nn","pa","pl","pt","pt-BR","ro","ru","si","sk","sl","sq","sr","sr-Cyrl","sv","th","tr","uk","ur","uz","vi","zh","zh-Hant","sw","ta"];function Hf(e,t){return e.reduce((n,r)=>{let s;try{s=Ef("/ghost/i18n/lib")(`../locales/${r}/${t}.json`)}catch{s=Ef("/ghost/i18n/lib")(`../locales/en/${t}.json`)}return n[r]={[t]:{...s,...s.default&&typeof s.default=="object"?s.default:{}}},n},{})}bs.exports=(e="en",t="portal")=>{const n=Rm.createInstance(),r={prefix:"{",suffix:"}"};let s=Hf(Bf,t);return n.init({lng:e,nsSeparator:!1,keySeparator:!1,returnEmptyString:!1,fallbackLng:{no:["nb","en"],default:["en"]},ns:t,defaultNS:t,interpolation:r,resources:s}),n},bs.exports.SUPPORTED_LOCALES=Bf,bs.exports.generateResources=Hf;var zm=bs.exports,Im=zm;const Mm=pe(Im);class Dm extends tt.Component{constructor(t){super(t);const n=this.props.locale||"en",r=Mm(n,"search"),s=r.dir()||"ltr",o=new tg({adminUrl:t.adminUrl,apiKey:t.apiKey,dir:s});this.state={searchIndex:o,showPopup:!1,indexStarted:!1,indexComplete:!1,t:r.t,dir:s},this.inputRef=tt.createRef()}componentDidMount(){this.initSetup()}componentDidUpdate(t,n){var r,s,o;if(n.showPopup!==this.state.showPopup)try{this.state.showPopup?(this.bodyScroll=(o=(s=(r=window.document)==null?void 0:r.body)==null?void 0:s.style)==null?void 0:o.overflow,window.document.body.style.overflow="hidden"):window.document.body.style.overflow=this.bodyScroll||""}catch{}this.state.showPopup!==(n==null?void 0:n.showPopup)&&!this.state.showPopup&&this.setState({searchValue:""}),this.state.showPopup&&!this.state.indexStarted&&this.setupSearchIndex()}async setupSearchIndex(){this.setState({indexStarted:!0}),await this.state.searchIndex.init(),this.setState({indexComplete:!0})}componentWillUnmount(){window.removeEventListener("hashchange",this.hashHandler,!1),window.removeEventListener("keydown",this.handleKeyDown,!1)}initSetup(){this.handleSearchUrl(),this.addKeyboardShortcuts(),this.setupCustomTriggerButton(),this.hashHandler=()=>{this.handleSearchUrl()},window.addEventListener("hashchange",this.hashHandler,!1)}setupCustomTriggerButton(){this.clickHandler=t=>{t.preventDefault(),this.setState({showPopup:!0});const n=document.createElement("input");n.style.opacity="0",n.style.position="fixed",n.style.top="0",document.body.appendChild(n),n.focus(),setTimeout(()=>{this.inputRef.current.focus(),document.body.removeChild(n)},150)},this.customTriggerButtons=this.getCustomTriggerButtons(),this.customTriggerButtons.forEach(t=>{t.removeEventListener("click",this.clickHandler),t.addEventListener("click",this.clickHandler)})}getCustomTriggerButtons(){return document.querySelectorAll("[data-ghost-search]")||[]}handleSearchUrl(){const[t]=window.location.hash.substr(1).split("?");(t==="/search"||t==="/search/")&&(this.setState({showPopup:!0}),window.history.replaceState("",document.title,window.location.pathname))}addKeyboardShortcuts(){const t=this.getCustomTriggerButtons();t!=null&&t.length&&(this.handleKeyDown=n=>{if(n.key==="k"&&n.metaKey)return this.setState({showPopup:!0}),n.preventDefault(),n.stopPropagation(),!1},document.addEventListener("keydown",this.handleKeyDown))}render(){return P.jsx(fe.Provider,{value:{page:"search",showPopup:this.state.showPopup,adminUrl:this.props.adminUrl,stylesUrl:this.props.stylesUrl,searchIndex:this.state.searchIndex,indexComplete:this.state.indexComplete,searchValue:this.state.searchValue,inputRef:this.inputRef,onAction:()=>{},dispatch:(t,n)=>{t==="update"&&this.setState({...this.state,...n})},t:this.state.t,dir:this.state.dir},children:P.jsx(Qc,{})})}}const Kf="sodo-search-root";function Fm(){const e=document.createElement("div");e.id=Kf,document.body.appendChild(e)}function Um(){const e=document.querySelector("script[data-sodo-search]");if(e){const t=e.dataset.sodoSearch,n=e.dataset.key,r=e.dataset.styles,s=e.dataset.locale||"en";return{adminUrl:t,apiKey:n,stylesUrl:r,locale:s}}return{}}function Vm(){Fm()}function Bm(){var o;const{adminUrl:e,apiKey:t,stylesUrl:n,locale:r}=Um(),s=(o=e||window.location.origin)==null?void 0:o.replace(/\/+$/,"");Vm(),fp.render(P.jsx(tt.StrictMode,{children:P.jsx(Dm,{adminUrl:s,apiKey:t,stylesUrl:n,locale:r})}),document.getElementById(Kf))}Bm();const Hm=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}))});
|
|
50
|
+
`,n=this.context.stylesUrl;return n?P.jsxs(P.Fragment,{children:[P.jsx("link",{rel:"stylesheet",href:n}),P.jsx("style",{dangerouslySetInnerHTML:{__html:t}}),P.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]}):P.jsxs(P.Fragment,{children:[P.jsx("style",{dangerouslySetInnerHTML:{__html:t}}),P.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]})}renderFrameContainer(){const t=yp(),n={...t.frame.common};return P.jsx("div",{style:t.modalContainer,className:"gh-root-frame",children:P.jsxs(hp,{style:n,title:"portal-popup",head:this.renderFrameStyles(),searchdir:this.context.dir,children:[P.jsx("div",{onClick:r=>this.handlePopupClose(r),className:"absolute top-0 bottom-0 left-0 right-0 block backdrop-blur-[2px] animate-fadein z-0 bg-gradient-to-br from-[rgba(0,0,0,0.2)] to-[rgba(0,0,0,0.1)]"}),P.jsx(Hc,{})]})})}render(){const{showPopup:t}=this.context;return t?this.renderFrameContainer():null}}io(Qc,"contextType",fe);var A;function se(e,t,n){const r=typeof n,s=typeof e;if(r!=="undefined"){if(s!=="undefined"){if(n){if(s==="function"&&r===s)return function(l){return e(n(l))};if(t=e.constructor,t===n.constructor){if(t===Array)return n.concat(e);if(t===Map){var o=new Map(n);for(var i of e)o.set(i[0],i[1]);return o}if(t===Set){i=new Set(n);for(o of e.values())i.add(o);return i}}}return e}return n}return s==="undefined"?t:e}function X(){return Object.create(null)}function _e(e){return typeof e=="string"}function Er(e){return typeof e=="object"}function Ip(e){const t=[];for(const n of e.keys())t.push(n);return t}function Tr(e,t){if(_e(t))e=e[t];else for(let n=0;e&&n<t.length;n++)e=e[t[n]];return e}function Mp(e){let t=0;for(let n=0,r;n<e.length;n++)(r=e[n])&&t<r.length&&(t=r.length);return t}const Dp=/[^\p{L}\p{N}]+/u,Fp=/(\d{3})/g,Up=/(\D)(\d{3})/g,Vp=/(\d{3})(\D)/g,Yc=/[\u0300-\u036f]/g;function jr(e={}){if(!this||this.constructor!==jr)return new jr(...arguments);if(arguments.length)for(e=0;e<arguments.length;e++)this.assign(arguments[e]);else this.assign(e)}A=jr.prototype,A.assign=function(e){this.normalize=se(e.normalize,!0,this.normalize);let t=e.include,n=t||e.exclude||e.split,r;if(n||n===""){if(typeof n=="object"&&n.constructor!==RegExp){let s="";r=!t,t||(s+="\\p{Z}"),n.letter&&(s+="\\p{L}"),n.number&&(s+="\\p{N}",r=!!t),n.symbol&&(s+="\\p{S}"),n.punctuation&&(s+="\\p{P}"),n.control&&(s+="\\p{C}"),(n=n.char)&&(s+=typeof n=="object"?n.join(""):n);try{this.split=new RegExp("["+(t?"^":"")+s+"]+","u")}catch{this.split=/\s+/}}else this.split=n,r=n===!1||2>"a1a".split(n).length;this.numeric=se(e.numeric,r)}else{try{this.split=se(this.split,Dp)}catch{this.split=/\s+/}this.numeric=se(e.numeric,se(this.numeric,!0))}if(this.prepare=se(e.prepare,null,this.prepare),this.finalize=se(e.finalize,null,this.finalize),n=e.filter,this.filter=typeof n=="function"?n:se(n&&new Set(n),null,this.filter),this.dedupe=se(e.dedupe,!0,this.dedupe),this.matcher=se((n=e.matcher)&&new Map(n),null,this.matcher),this.mapper=se((n=e.mapper)&&new Map(n),null,this.mapper),this.stemmer=se((n=e.stemmer)&&new Map(n),null,this.stemmer),this.replacer=se(e.replacer,null,this.replacer),this.minlength=se(e.minlength,1,this.minlength),this.maxlength=se(e.maxlength,1024,this.maxlength),this.rtl=se(e.rtl,!1,this.rtl),(this.cache=n=se(e.cache,!0,this.cache))&&(this.H=null,this.S=typeof n=="number"?n:2e5,this.B=new Map,this.G=new Map,this.L=this.K=128),this.h="",this.M=null,this.A="",this.N=null,this.matcher)for(const s of this.matcher.keys())this.h+=(this.h?"|":"")+s;if(this.stemmer)for(const s of this.stemmer.keys())this.A+=(this.A?"|":"")+s;return this},A.addStemmer=function(e,t){return this.stemmer||(this.stemmer=new Map),this.stemmer.set(e,t),this.A+=(this.A?"|":"")+e,this.N=null,this.cache&&Ft(this),this},A.addFilter=function(e){return typeof e=="function"?this.filter=e:(this.filter||(this.filter=new Set),this.filter.add(e)),this.cache&&Ft(this),this},A.addMapper=function(e,t){return typeof e=="object"?this.addReplacer(e,t):1<e.length?this.addMatcher(e,t):(this.mapper||(this.mapper=new Map),this.mapper.set(e,t),this.cache&&Ft(this),this)},A.addMatcher=function(e,t){return typeof e=="object"?this.addReplacer(e,t):2>e.length&&(this.dedupe||this.mapper)?this.addMapper(e,t):(this.matcher||(this.matcher=new Map),this.matcher.set(e,t),this.h+=(this.h?"|":"")+e,this.M=null,this.cache&&Ft(this),this)},A.addReplacer=function(e,t){return typeof e=="string"?this.addMatcher(e,t):(this.replacer||(this.replacer=[]),this.replacer.push(e,t),this.cache&&Ft(this),this)},A.encode=function(e){if(this.cache&&e.length<=this.K)if(this.H){if(this.B.has(e))return this.B.get(e)}else this.H=setTimeout(Ft,50,this);this.normalize&&(typeof this.normalize=="function"?e=this.normalize(e):e=Yc?e.normalize("NFKD").replace(Yc,"").toLowerCase():e.toLowerCase()),this.prepare&&(e=this.prepare(e)),this.numeric&&3<e.length&&(e=e.replace(Up,"$1 $2").replace(Vp,"$1 $2").replace(Fp,"$1 "));const t=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer);let n=[],r=this.split||this.split===""?e.split(this.split):e;for(let o=0,i,l;o<r.length;o++)if((i=l=r[o])&&!(i.length<this.minlength||i.length>this.maxlength)){if(t)n.push(i);else if(!this.filter||(typeof this.filter=="function"?this.filter(i):!this.filter.has(i))){if(this.cache&&i.length<=this.L)if(this.H){var s=this.G.get(i);if(s||s===""){s&&n.push(s);continue}}else this.H=setTimeout(Ft,50,this);if(this.stemmer&&2<i.length&&(this.N||(this.N=new RegExp("(?!^)("+this.A+")$")),i=i.replace(this.N,u=>this.stemmer.get(u))),i&&(this.mapper||this.dedupe&&1<i.length)){s="";for(let u=0,a="",f,p;u<i.length;u++)f=i.charAt(u),f===a&&this.dedupe||((p=this.mapper&&this.mapper.get(f))||p===""?p===a&&this.dedupe||!(a=p)||(s+=p):s+=a=f);i=s}if(this.matcher&&1<i.length&&(this.M||(this.M=new RegExp("("+this.h+")","g")),i=i.replace(this.M,u=>this.matcher.get(u))),i&&this.replacer)for(s=0;i&&s<this.replacer.length;s+=2)i=i.replace(this.replacer[s],this.replacer[s+1]);this.cache&&l.length<=this.L&&(this.G.set(l,i),this.G.size>this.S&&(this.G.clear(),this.L=this.L/1.1|0)),i&&n.push(i)}}return this.finalize&&(n=this.finalize(n)||n),this.cache&&e.length<=this.K&&(this.B.set(e,n),this.B.size>this.S&&(this.B.clear(),this.K=this.K/1.1|0)),n};function Ft(e){e.H=null,e.B.clear(),e.G.clear()}let Cn,Nr;async function Bp(e){e=e.data;var t=e.task;const n=e.id;let r=e.args;switch(t){case"init":Nr=e.options||{},(t=e.factory)?(Function("return "+t)()(self),Cn=new self.FlexSearch.Index(Nr),delete self.FlexSearch):Cn=new Ke(Nr),postMessage({id:n});break;default:let s;t==="export"&&(r[1]?(r[0]=Nr.export,r[2]=0,r[3]=1):r=null),t==="import"?r[0]&&(e=await Nr.import.call(Cn,r[0]),Cn.import(r[0],e)):(s=r&&Cn[t].apply(Cn,r))&&s.then&&(s=await s),postMessage(t==="search"?{id:n,msg:s}:{id:n})}}function ml(e){Ar.call(e,"add"),Ar.call(e,"append"),Ar.call(e,"search"),Ar.call(e,"update"),Ar.call(e,"remove")}let yl,Jc,Ks;function Hp(){yl=Ks=0}function Ar(e){this[e+"Async"]=function(){const t=arguments;var n=t[t.length-1];let r;if(typeof n=="function"&&(r=n,delete t[t.length-1]),yl?Ks||(Ks=Date.now()-Jc>=this.priority*this.priority*3):(yl=setTimeout(Hp,0),Jc=Date.now()),Ks){const o=this;return new Promise(i=>{setTimeout(function(){i(o[e+"Async"].apply(o,t))},0)})}const s=this[e].apply(this,t);return n=s.then?s:new Promise(o=>o(s)),r&&n.then(r),n}}let Pn=0;function Lr(e={}){function t(i){function l(u){u=u.data||u;const a=u.id,f=a&&s.h[a];f&&(f(u.msg),delete s.h[a])}if(this.worker=i,this.h=X(),this.worker)return r?this.worker.on("message",l):this.worker.onmessage=l,e.config?new Promise(function(u){s.h[++Pn]=function(){u(s),1e9<Pn&&(Pn=0)},s.worker.postMessage({id:Pn,task:"init",factory:n,options:e})}):(this.worker.postMessage({task:"init",factory:n,options:e}),this.priority=e.priority||4,this)}if(!this||this.constructor!==Lr)return new Lr(e);let n=typeof self<"u"?self._factory:typeof window<"u"?window._factory:null;n&&(n=n.toString());const r=typeof window>"u",s=this,o=Kp(n,r,e.worker);return o.then?o.then(function(i){return t.call(s,i)}):t.call(this,o)}$t("add"),$t("append"),$t("search"),$t("update"),$t("remove"),$t("clear"),$t("export"),$t("import"),ml(Lr.prototype);function $t(e){Lr.prototype[e]=function(){const t=this,n=[].slice.call(arguments);var r=n[n.length-1];let s;return typeof r=="function"&&(s=r,n.pop()),r=new Promise(function(o){e==="export"&&typeof n[0]=="function"&&(n[0]=null),t.h[++Pn]=o,t.worker.postMessage({task:e,id:Pn,args:n})}),s?(r.then(s),this):r}}function Kp(e,t,n){return t?typeof module<"u"?new(require("worker_threads")).Worker(__dirname+"/worker/node.js"):Promise.resolve().then(()=>Km).then(function(r){return new r.Worker("undefined/node/node.mjs")}):e?new window.Worker(URL.createObjectURL(new Blob(["onmessage="+Bp.toString()],{type:"text/javascript"}))):new window.Worker(typeof n=="string"?n:(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:G&&G.tagName.toUpperCase()==="SCRIPT"&&G.src||new URL("sodo-search.min.js",document.baseURI).href).replace("/worker.js","/worker/worker.js").replace("flexsearch.bundle.module.min.js","module/worker/worker.js"),{type:"module"})}function vl(e,t=0){let n=[],r=[];t&&(t=25e4/t*5e3|0);for(const s of e.entries())r.push(s),r.length===t&&(n.push(r),r=[]);return r.length&&n.push(r),n}function wl(e,t){t||(t=new Map);for(let n=0,r;n<e.length;n++)r=e[n],t.set(r[0],r[1]);return t}function Gc(e,t=0){let n=[],r=[];t&&(t=25e4/t*1e3|0);for(const s of e.entries())r.push([s[0],vl(s[1])[0]]),r.length===t&&(n.push(r),r=[]);return r.length&&n.push(r),n}function Xc(e,t){t||(t=new Map);for(let n=0,r,s;n<e.length;n++)r=e[n],s=t.get(r[0]),t.set(r[0],wl(r[1],s));return t}function qc(e){let t=[],n=[];for(const r of e.keys())n.push(r),n.length===25e4&&(t.push(n),n=[]);return n.length&&t.push(n),t}function Zc(e,t){t||(t=new Set);for(let n=0;n<e.length;n++)t.add(e[n]);return t}function Ws(e,t,n,r,s,o,i=0){const l=r&&r.constructor===Array;var u=l?r.shift():r;if(!u)return this.export(e,t,s,o+1);if((u=e((t?t+".":"")+(i+1)+"."+n,JSON.stringify(u)))&&u.then){const a=this;return u.then(function(){return Ws.call(a,e,t,n,l?r:null,s,o,i+1)})}return Ws.call(this,e,t,n,l?r:null,s,o,i+1)}function bc(e,t){let n="";for(const r of e.entries()){e=r[0];const s=r[1];let o="";for(let i=0,l;i<s.length;i++){l=s[i]||[""];let u="";for(let a=0;a<l.length;a++)u+=(u?",":"")+(t==="string"?'"'+l[a]+'"':l[a]);u="["+u+"]",o+=(o?",":"")+u}o='["'+e+'",['+o+"]]",n+=(n?",":"")+o}return n}function ef(e,t,n,r){let s=[];for(let o=0,i;o<e.index.length;o++)if(i=e.index[o],t>=i.length)t-=i.length;else{t=i[r?"splice":"slice"](t,n);const l=t.length;if(l&&(s=s.length?s.concat(t):t,n-=l,r&&(e.length-=l),!n))break;t=0}return s}function Ut(e){if(!this||this.constructor!==Ut)return new Ut(e);this.index=e?[e]:[],this.length=e?e.length:0;const t=this;return new Proxy([],{get(n,r){if(r==="length")return t.length;if(r==="push")return function(s){t.index[t.index.length-1].push(s),t.length++};if(r==="pop")return function(){if(t.length)return t.length--,t.index[t.index.length-1].pop()};if(r==="indexOf")return function(s){let o=0;for(let i=0,l,u;i<t.index.length;i++){if(l=t.index[i],u=l.indexOf(s),0<=u)return o+u;o+=l.length}return-1};if(r==="includes")return function(s){for(let o=0;o<t.index.length;o++)if(t.index[o].includes(s))return!0;return!1};if(r==="slice")return function(s,o){return ef(t,s||0,o||t.length,!1)};if(r==="splice")return function(s,o){return ef(t,s||0,o||t.length,!0)};if(r==="constructor")return Array;if(typeof r!="symbol")return(n=t.index[r/2**31|0])&&n[r]},set(n,r,s){return n=r/2**31|0,(t.index[n]||(t.index[n]=[]))[r]=s,t.length++,!0}})}Ut.prototype.clear=function(){this.index.length=0},Ut.prototype.destroy=function(){this.proxy=this.index=null},Ut.prototype.push=function(){};function He(e=8){if(!this||this.constructor!==He)return new He(e);this.index=X(),this.h=[],this.size=0,32<e?(this.B=nf,this.A=BigInt(e)):(this.B=tf,this.A=e)}He.prototype.get=function(e){const t=this.index[this.B(e)];return t&&t.get(e)},He.prototype.set=function(e,t){var n=this.B(e);let r=this.index[n];r?(n=r.size,r.set(e,t),(n-=r.size)&&this.size++):(this.index[n]=r=new Map([[e,t]]),this.h.push(r),this.size++)};function Re(e=8){if(!this||this.constructor!==Re)return new Re(e);this.index=X(),this.h=[],this.size=0,32<e?(this.B=nf,this.A=BigInt(e)):(this.B=tf,this.A=e)}Re.prototype.add=function(e){var t=this.B(e);let n=this.index[t];n?(t=n.size,n.add(e),(t-=n.size)&&this.size++):(this.index[t]=n=new Set([e]),this.h.push(n),this.size++)},A=He.prototype,A.has=Re.prototype.has=function(e){const t=this.index[this.B(e)];return t&&t.has(e)},A.delete=Re.prototype.delete=function(e){const t=this.index[this.B(e)];t&&t.delete(e)&&this.size--},A.clear=Re.prototype.clear=function(){this.index=X(),this.h=[],this.size=0},A.values=Re.prototype.values=function*(){for(let e=0;e<this.h.length;e++)for(let t of this.h[e].values())yield t},A.keys=Re.prototype.keys=function*(){for(let e=0;e<this.h.length;e++)for(let t of this.h[e].keys())yield t},A.entries=Re.prototype.entries=function*(){for(let e=0;e<this.h.length;e++)for(let t of this.h[e].entries())yield t};function tf(e){let t=2**this.A-1;if(typeof e=="number")return e&t;let n=0,r=this.A+1;for(let s=0;s<e.length;s++)n=(n*r^e.charCodeAt(s))&t;return this.A===32?n+2**31:n}function nf(e){let t=BigInt(2)**this.A-BigInt(1);var n=typeof e;if(n==="bigint")return e&t;if(n==="number")return BigInt(e)&t;n=BigInt(0);let r=this.A+BigInt(1);for(let s=0;s<e.length;s++)n=(n*r^BigInt(e.charCodeAt(s)))&t;return n}Vt.prototype.add=function(e,t,n){if(Er(e)&&(t=e,e=Tr(t,this.key)),t&&(e||e===0)){if(!n&&this.reg.has(e))return this.update(e,t);for(let l=0,u;l<this.field.length;l++){u=this.D[l];var r=this.index.get(this.field[l]);if(typeof u=="function"){var s=u(t);s&&r.add(e,s,!1,!0)}else s=u.I,(!s||s(t))&&(u.constructor===String?u=[""+u]:_e(u)&&(u=[u]),Sl(t,u,this.J,0,r,e,u[0],n))}if(this.tag)for(r=0;r<this.F.length;r++){var o=this.F[r];s=this.tag.get(this.R[r]);let l=X();if(typeof o=="function"){if(o=o(t),!o)continue}else{var i=o.I;if(i&&!i(t))continue;o.constructor===String&&(o=""+o),o=Tr(t,o)}if(s&&o){_e(o)&&(o=[o]);for(let u=0,a,f;u<o.length;u++)if(a=o[u],!l[a]&&(l[a]=1,(i=s.get(a))?f=i:s.set(a,f=[]),!n||!f.includes(e))){if(f.length===2**31-1){if(i=new Ut(f),this.fastupdate)for(let p of this.reg.values())p.includes(f)&&(p[p.indexOf(f)]=i);s.set(a,f=i)}f.push(e),this.fastupdate&&((i=this.reg.get(e))?i.push(f):this.reg.set(e,[f]))}}}if(this.store&&(!n||!this.store.has(e))){let l;if(this.C){l=X();for(let u=0,a;u<this.C.length;u++){if(a=this.C[u],(n=a.I)&&!n(t))continue;let f;if(typeof a=="function"){if(f=a(t),!f)continue;a=[a.V]}else if(_e(a)||a.constructor===String){l[a]=t[a];continue}xl(t,l,a,0,a[0],f)}}this.store.set(e,l||t)}this.worker&&(this.fastupdate||this.reg.add(e))}return this};function xl(e,t,n,r,s,o){if(e=e[s],r===n.length-1)t[s]=o||e;else if(e)if(e.constructor===Array)for(t=t[s]=Array(e.length),s=0;s<e.length;s++)xl(e,t,n,r,s);else t=t[s]||(t[s]=X()),s=n[++r],xl(e,t,n,r,s)}function Sl(e,t,n,r,s,o,i,l){if(e=e[i])if(r===t.length-1){if(e.constructor===Array){if(n[r]){for(t=0;t<e.length;t++)s.add(o,e[t],!0,!0);return}e=e.join(" ")}s.add(o,e,l,!0)}else if(e.constructor===Array)for(i=0;i<e.length;i++)Sl(e,t,n,r,s,o,i,l);else i=t[++r],Sl(e,t,n,r,s,o,i,l);else s.db&&s.remove(o)}function rf(e,t,n,r,s,o,i){const l=e.length;let u=[],a,f;a=X();for(let p=0,c,m,v,x;p<t;p++)for(let h=0;h<l;h++)if(v=e[h],p<v.length&&(c=v[p]))for(let d=0;d<c.length;d++){if(m=c[d],(f=a[m])?a[m]++:(f=0,a[m]=1),x=u[f]||(u[f]=[]),!i){let g=p+(h||!s?0:o||0);x=x[g]||(x[g]=[])}if(x.push(m),i&&n&&f===l-1&&x.length-r===n)return r?x.slice(r):x}if(e=u.length)if(s)u=1<u.length?sf(u,n,r,i,o):(u=u[0]).length>n||r?u.slice(r,n+r):u;else{if(e<l)return[];if(u=u[e-1],n||r)if(i)(u.length>n||r)&&(u=u.slice(r,n+r));else{s=[];for(let p=0,c;p<u.length;p++)if(c=u[p],c.length>r)r-=c.length;else if((c.length>n||r)&&(c=c.slice(r,n+r),n-=c.length,r&&(r-=c.length)),s.push(c),!n)break;u=1<s.length?[].concat.apply([],s):s[0]}}return u}function sf(e,t,n,r,s){const o=[],i=X();let l;var u=e.length;let a;if(r){for(s=u-1;0<=s;s--)if(a=(r=e[s])&&r.length){for(u=0;u<a;u++)if(l=r[u],!i[l]){if(i[l]=1,n)n--;else if(o.push(l),o.length===t)return o}}}else for(let f=u-1,p,c=0;0<=f;f--){p=e[f];for(let m=0;m<p.length;m++)if(a=(r=p[m])&&r.length){for(let v=0;v<a;v++)if(l=r[v],!i[l])if(i[l]=1,n)n--;else{let x=(m+(f<u-1&&s||0))/(f+1)|0;if((o[x]||(o[x]=[])).push(l),++c===t)return o}}}return o}function Wp(e,t,n){const r=X(),s=[];for(let o=0,i;o<t.length;o++){i=t[o];for(let l=0;l<i.length;l++)r[i[l]]=1}if(n)for(let o=0,i;o<e.length;o++)i=e[o],r[i]&&(s.push(i),r[i]=0);else for(let o=0,i,l;o<e.result.length;o++)for(i=e.result[o],t=0;t<i.length;t++)l=i[t],r[l]&&((s[o]||(s[o]=[])).push(l),r[l]=0);return s}function $l(e,t,n,r){if(!e.length)return e;if(e.length===1)return e=e[0],e=n||e.length>t?t?e.slice(n,n+t):e.slice(n):e,r?kt.call(this,e):e;let s=[];for(let o=0,i,l;o<e.length;o++)if((i=e[o])&&(l=i.length)){if(n){if(n>=l){n-=l;continue}n<l&&(i=t?i.slice(n,n+t):i.slice(n),l=i.length,n=0)}if(l>t&&(i=i.slice(0,t),l=t),!s.length&&l>=t)return r?kt.call(this,i):i;if(s.push(i),t-=l,!t)break}return s=1<s.length?[].concat.apply([],s):s[0],r?kt.call(this,s):s}function Qs(e,t,n){var r=n[0];if(r.then)return Promise.all(n).then(function(f){return e[t].apply(e,f)});if(r[0]&&r[0].index)return e[t].apply(e,r);r=[];let s=[],o=0,i=0,l,u,a;for(let f=0,p;f<n.length;f++)if(p=n[f]){let c;if(p.constructor===B)c=p.result;else if(p.constructor===Array)c=p;else if(o=p.limit||0,i=p.offset||0,a=p.suggest,u=p.resolve,l=p.enrich&&u,p.index)p.resolve=!1,c=p.index.search(p).result,p.resolve=u;else if(p.and)c=e.and(p.and);else if(p.or)c=e.or(p.or);else if(p.xor)c=e.xor(p.xor);else if(p.not)c=e.not(p.not);else continue;if(c.then)s.push(c);else if(c.length)r[f]=c;else if(!a&&(t==="and"||t==="xor")){r=[];break}}return{O:r,P:s,limit:o,offset:i,enrich:l,resolve:u,suggest:a}}B.prototype.or=function(){const{O:e,P:t,limit:n,offset:r,enrich:s,resolve:o}=Qs(this,"or",arguments);return of.call(this,e,t,n,r,s,o)};function of(e,t,n,r,s,o){if(t.length){const i=this;return Promise.all(t).then(function(l){e=[];for(let u=0,a;u<l.length;u++)(a=l[u]).length&&(e[u]=a);return of.call(i,e,[],n,r,s,o)})}return e.length&&(this.result.length&&e.push(this.result),2>e.length?this.result=e[0]:(this.result=sf(e,n,r,!1,this.h),r=0)),o?this.resolve(n,r,s):this}B.prototype.and=function(){let e=this.result.length,t,n,r,s;if(!e){const o=arguments[0];o&&(e=!!o.suggest,s=o.resolve,t=o.limit,n=o.offset,r=o.enrich&&s)}if(e){const{O:o,P:i,limit:l,offset:u,enrich:a,resolve:f,suggest:p}=Qs(this,"and",arguments);return lf.call(this,o,i,l,u,a,f,p)}return s?this.resolve(t,n,r):this};function lf(e,t,n,r,s,o,i){if(t.length){const l=this;return Promise.all(t).then(function(u){e=[];for(let a=0,f;a<u.length;a++)(f=u[a]).length&&(e[a]=f);return lf.call(l,e,[],n,r,s,o,i)})}if(e.length)if(this.result.length&&e.unshift(this.result),2>e.length)this.result=e[0];else{if(t=Mp(e))return this.result=rf(e,t,n,r,i,this.h,o),o?s?kt.call(this.index,this.result):this.result:this;this.result=[]}else i||(this.result=e);return o?this.resolve(n,r,s):this}B.prototype.xor=function(){const{O:e,P:t,limit:n,offset:r,enrich:s,resolve:o,suggest:i}=Qs(this,"xor",arguments);return uf.call(this,e,t,n,r,s,o,i)};function uf(e,t,n,r,s,o,i){if(t.length){const l=this;return Promise.all(t).then(function(u){e=[];for(let a=0,f;a<u.length;a++)(f=u[a]).length&&(e[a]=f);return uf.call(l,e,[],n,r,s,o,i)})}if(e.length)if(this.result.length&&e.unshift(this.result),2>e.length)this.result=e[0];else return this.result=Qp.call(this,e,n,r,o,this.h),o?s?kt.call(this.index,this.result):this.result:this;else i||(this.result=e);return o?this.resolve(n,r,s):this}function Qp(e,t,n,r,s){const o=[],i=X();let l=0;for(let u=0,a;u<e.length;u++)if(a=e[u]){l<a.length&&(l=a.length);for(let f=0,p;f<a.length;f++)if(p=a[f])for(let c=0,m;c<p.length;c++)m=p[c],i[m]=i[m]?2:1}for(let u=0,a,f=0;u<l;u++)for(let p=0,c;p<e.length;p++)if((c=e[p])&&(a=c[u])){for(let m=0,v;m<a.length;m++)if(v=a[m],i[v]===1)if(n)n--;else if(r){if(o.push(v),o.length===t)return o}else{const x=u+(p?s:0);if(o[x]||(o[x]=[]),o[x].push(v),++f===t)return o}}return o}B.prototype.not=function(){const{O:e,P:t,limit:n,offset:r,enrich:s,resolve:o,suggest:i}=Qs(this,"not",arguments);return af.call(this,e,t,n,r,s,o,i)};function af(e,t,n,r,s,o,i){if(t.length){const l=this;return Promise.all(t).then(function(u){e=[];for(let a=0,f;a<u.length;a++)(f=u[a]).length&&(e[a]=f);return af.call(l,e,[],n,r,s,o,i)})}if(e.length&&this.result.length)this.result=Yp.call(this,e,n,r,o);else if(o)return this.resolve(n,r,s);return o?s?kt.call(this.index,this.result):this.result:this}function Yp(e,t,n,r){const s=[];e=new Set(e.flat().flat());for(let o=0,i,l=0;o<this.result.length;o++)if(i=this.result[o]){for(let u=0,a;u<i.length;u++)if(a=i[u],!e.has(a)){if(n)n--;else if(r){if(s.push(a),s.length===t)return s}else if(s[o]||(s[o]=[]),s[o].push(a),++l===t)return s}}return s}function B(e){if(!this||this.constructor!==B)return new B(e);if(e&&e.index)return e.resolve=!1,this.index=e.index,this.h=e.boost||0,this.result=e.index.search(e).result,this;this.index=null,this.result=e||[],this.h=0}B.prototype.limit=function(e){if(this.result.length){const t=[];for(let n=0,r;n<this.result.length;n++)if(r=this.result[n])if(r.length<=e){if(t[n]=r,e-=r.length,!e)break}else{t[n]=r.slice(0,e);break}this.result=t}return this},B.prototype.offset=function(e){if(this.result.length){const t=[];for(let n=0,r;n<this.result.length;n++)(r=this.result[n])&&(r.length<=e?e-=r.length:(t[n]=r.slice(e),e=0));this.result=t}return this},B.prototype.boost=function(e){return this.h+=e,this},B.prototype.resolve=function(e,t,n){const r=this.result,s=this.index;return this.result=this.index=null,r.length?(typeof e=="object"&&(n=e.enrich,t=e.offset,e=e.limit),$l.call(s,r,e||100,t,n)):r},Vt.prototype.search=function(e,t,n,r){n||(!t&&Er(e)?(n=e,e=""):Er(t)&&(n=t,t=0));let s=[];var o=[],i;let l,u,a,f=0;var p=!0;let c;if(n){n.constructor===Array&&(n={index:n}),e=n.query||e;var m=n.pluck;l=n.merge,u=m||n.field||(u=n.index)&&(u.index?null:u),a=this.tag&&n.tag;var v=n.suggest;p=n.resolve!==!1,p||m||!(u=u||this.field)||(_e(u)?m=u:(u.constructor===Array&&u.length===1&&(u=u[0]),m=u.field||u.index)),c=(i=this.store&&n.enrich&&p)&&n.highlight,t=n.limit||t;var x=n.offset||0;if(t||(t=100),a&&(!this.db||!r)){a.constructor!==Array&&(a=[a]);var h=[];for(let y=0,$;y<a.length;y++)if($=a[y],$.field&&$.tag){var d=$.tag;if(d.constructor===Array)for(var g=0;g<d.length;g++)h.push($.field,d[g]);else h.push($.field,d)}else{d=Object.keys($);for(let S=0,C,T;S<d.length;S++)if(C=d[S],T=$[C],T.constructor===Array)for(g=0;g<T.length;g++)h.push(C,T[g]);else h.push(C,T)}if(a=h,!e){if(p=[],h.length)for(o=0;o<h.length;o+=2){if(this.db){if(m=this.index.get(h[o]),!m)continue;p.push(m=m.db.tag(h[o+1],t,x,i))}else m=Jp.call(this,h[o],h[o+1],t,x,i);s.push({field:h[o],tag:h[o+1],result:m})}return p.length?Promise.all(p).then(function(y){for(let $=0;$<y.length;$++)s[$].result=y[$];return s}):s}}u&&u.constructor!==Array&&(u=[u])}u||(u=this.field),h=!r&&(this.worker||this.db)&&[];let w;for(let y=0,$,S,C;y<u.length;y++){if(S=u[y],this.db&&this.tag&&!this.D[y])continue;let T;if(_e(S)||(T=S,S=T.field,e=T.query||e,t=T.limit||t,x=T.offset||x,v=T.suggest||v,i=this.store&&(T.enrich||i)),r)$=r[y];else if(d=T||n,g=this.index.get(S),a&&(this.db&&(d.tag=a,w=g.db.support_tag_search,d.field=u),w||(d.enrich=!1)),h){h[y]=g.search(e,t,d),d&&i&&(d.enrich=i);continue}else $=g.search(e,t,d),d&&i&&(d.enrich=i);if(C=$&&(p?$.length:$.result.length),a&&C){if(d=[],g=0,this.db&&r){if(!w)for(let N=u.length;N<r.length;N++){let M=r[N];if(M&&M.length)g++,d.push(M);else if(!v)return p?s:new B(s)}}else for(let N=0,M,ze;N<a.length;N+=2){if(M=this.tag.get(a[N]),!M){if(v)continue;return p?s:new B(s)}if(ze=(M=M&&M.get(a[N+1]))&&M.length)g++,d.push(M);else if(!v)return p?s:new B(s)}if(g){if($=Wp($,d,p),C=$.length,!C&&!v)return p?$:new B($);g--}}if(C)o[f]=S,s.push($),f++;else if(u.length===1)return p?s:new B(s)}if(h){if(this.db&&a&&a.length&&!w)for(i=0;i<a.length;i+=2){if(o=this.index.get(a[i]),!o){if(v)continue;return p?s:new B(s)}h.push(o.db.tag(a[i+1],t,x,!1))}const y=this;return Promise.all(h).then(function($){return $.length?y.search(e,t,n,$):$})}if(!f)return p?s:new B(s);if(m&&(!i||!this.store))return s[0];for(h=[],x=0;x<o.length;x++){if(v=s[x],i&&v.length&&typeof v[0].doc>"u"&&(this.db?h.push(v=this.index.get(this.field[0]).db.enrich(v)):v=kt.call(this,v)),m)return p?v:new B(v);s[x]={field:o[x],result:v}}if(i&&this.db&&h.length){const y=this;return Promise.all(h).then(function($){for(let S=0;S<$.length;S++)s[S].result=$[S];return l?ff(s):c?cf(s,e,y.index,y.field,y.D,c):s})}return l?ff(s):c?cf(s,e,this.index,this.field,this.D,c):s};function cf(e,t,n,r,s,o){let i,l,u;for(let a=0,f,p,c,m;a<e.length;a++){if(f=e[a].field,!f)continue;let v=e[a].result;c=n.get(f),p=c.encoder,u=c.tokenize,m=s[r.indexOf(f)],p!==i&&(i=p,l=i.encode(t));for(let x=0;x<v.length;x++){let h="",d=Tr(v[x].doc,m).split(/\s+/);for(let g=0,w,y;g<d.length;g++){w=d[g],y=p.encode(w),y=1<y.length?y.join(" "):y[0];let $;if(y&&w)for(let S=0,C;S<l.length;S++)if(C=l[S],u==="strict"){if(y===C){h+=(h?" ":"")+o.replace("$1",w),$=!0;break}}else{const T=y.indexOf(C);if(-1<T){h+=(h?" ":"")+w.substring(0,T)+o.replace("$1",w.substring(T,C.length))+w.substring(T+C.length),$=!0;break}}$||(h+=(h?" ":"")+d[g])}v[x].highlight=h}}return e}function ff(e){const t=[],n=X();for(let r=0,s,o;r<e.length;r++){s=e[r],o=s.result;for(let i=0,l,u,a;i<o.length;i++)u=o[i],typeof u!="object"&&(u={id:u}),l=u.id,(a=n[l])?a.push(s.field):(u.field=n[l]=[s.field],t.push(u))}return t}function Jp(e,t,n,r,s){if(e=this.tag.get(e),!e)return[];if((t=(e=e&&e.get(t))&&e.length-r)&&0<t)return(t>n||r)&&(e=e.slice(r,r+n)),s&&(e=kt.call(this,e)),e}function kt(e){if(!this||!this.store)return e;const t=Array(e.length);for(let n=0,r;n<e.length;n++)r=e[n],t[n]={id:r,doc:this.store.get(r)};return t}function Vt(e){if(!this||this.constructor!==Vt)return new Vt(e);const t=e.document||e.doc||e;let n,r;if(this.D=[],this.field=[],this.J=[],this.key=(n=t.key||t.id)&&Ys(n,this.J)||"id",(r=e.keystore||0)&&(this.keystore=r),this.fastupdate=!!e.fastupdate,this.reg=!this.fastupdate||e.worker||e.db?r?new Re(r):new Set:r?new He(r):new Map,this.C=(n=t.store||null)&&n&&n!==!0&&[],this.store=n&&(r?new He(r):new Map),this.cache=(n=e.cache||null)&&new Bt(n),e.cache=!1,this.worker=e.worker,this.priority=e.priority||4,this.index=Gp.call(this,e,t),this.tag=null,(n=t.tag)&&(typeof n=="string"&&(n=[n]),n.length)){this.tag=new Map,this.F=[],this.R=[];for(let s=0,o,i;s<n.length;s++){if(o=n[s],i=o.field||o,!i)throw Error("The tag field from the document descriptor is undefined.");o.custom?this.F[s]=o.custom:(this.F[s]=Ys(i,this.J),o.filter&&(typeof this.F[s]=="string"&&(this.F[s]=new String(this.F[s])),this.F[s].I=o.filter)),this.R[s]=i,this.tag.set(i,new Map)}}if(this.worker){this.fastupdate=!1,e=[];for(const s of this.index.values())s.then&&e.push(s);if(e.length){const s=this;return Promise.all(e).then(function(o){let i=0;for(const l of s.index.entries()){const u=l[0];l[1].then&&s.index.set(u,o[i++])}return s})}}else e.db&&(this.fastupdate=!1,this.mount(e.db))}A=Vt.prototype,A.mount=function(e){let t=this.field;if(this.tag)for(let s=0,o;s<this.R.length;s++){o=this.R[s];var n=void 0;this.index.set(o,n=new Ke({},this.reg)),t===this.field&&(t=t.slice(0)),t.push(o),n.tag=this.tag.get(o)}n=[];const r={db:e.db,type:e.type,fastupdate:e.fastupdate};for(let s=0,o,i;s<t.length;s++){r.field=i=t[s],o=this.index.get(i);const l=new e.constructor(e.id,r);l.id=e.id,n[s]=l.mount(o),o.document=!0,s?o.bypass=!0:o.store=this.store}return this.db=!0,Promise.all(n)},A.commit=async function(e,t){const n=[];for(const r of this.index.values())n.push(r.commit(e,t));await Promise.all(n),this.reg.clear()},A.destroy=function(){const e=[];for(const t of this.index.values())e.push(t.destroy());return Promise.all(e)};function Gp(e,t){const n=new Map;let r=t.index||t.field||t;_e(r)&&(r=[r]);for(let s=0,o,i;s<r.length;s++){if(o=r[s],_e(o)||(i=o,o=o.field),i=Er(i)?Object.assign({},e,i):e,this.worker){const l=new Lr(i);n.set(o,l)}this.worker||n.set(o,new Ke(i,this.reg)),i.custom?this.D[s]=i.custom:(this.D[s]=Ys(o,this.J),i.filter&&(typeof this.D[s]=="string"&&(this.D[s]=new String(this.D[s])),this.D[s].I=i.filter)),this.field[s]=o}if(this.C){e=t.store,_e(e)&&(e=[e]);for(let s=0,o,i;s<e.length;s++)o=e[s],i=o.field||o,o.custom?(this.C[s]=o.custom,o.custom.V=i):(this.C[s]=Ys(i,this.J),o.filter&&(typeof this.C[s]=="string"&&(this.C[s]=new String(this.C[s])),this.C[s].I=o.filter))}return n}function Ys(e,t){const n=e.split(":");let r=0;for(let s=0;s<n.length;s++)e=n[s],e[e.length-1]==="]"&&(e=e.substring(0,e.length-2))&&(t[r]=!0),e&&(n[r++]=e);return r<n.length&&(n.length=r),1<r?n:n[0]}A.append=function(e,t){return this.add(e,t,!0)},A.update=function(e,t){return this.remove(e).add(e,t)},A.remove=function(e){Er(e)&&(e=Tr(e,this.key));for(var t of this.index.values())t.remove(e,!0);if(this.reg.has(e)){if(this.tag&&!this.fastupdate)for(let n of this.tag.values())for(let r of n){t=r[0];const s=r[1],o=s.indexOf(e);-1<o&&(1<s.length?s.splice(o,1):n.delete(t))}this.store&&this.store.delete(e),this.reg.delete(e)}return this.cache&&this.cache.remove(e),this},A.clear=function(){const e=[];for(const t of this.index.values()){const n=t.clear();n.then&&e.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(),e.length?Promise.all(e):this},A.contain=function(e){return this.db?this.index.get(this.field[0]).db.has(e):this.reg.has(e)},A.cleanup=function(){for(const e of this.index.values())e.cleanup();return this},A.get=function(e){return this.db?this.index.get(this.field[0]).db.enrich(e).then(function(t){return t[0]&&t[0].doc||null}):this.store.get(e)||null},A.set=function(e,t){return typeof e=="object"&&(t=e,e=Tr(t,this.key)),this.store.set(e,t),this},A.searchCache=hf,A.export=function(e,t,n=0,r=0){if(n<this.field.length){const i=this.field[n];if((t=this.index.get(i).export(e,i,n,r=1))&&t.then){const l=this;return t.then(function(){return l.export(e,i,n+1)})}return this.export(e,i,n+1)}let s,o;switch(r){case 0:s="reg",o=qc(this.reg),t=null;break;case 1:s="tag",o=this.tag&&Gc(this.tag,this.reg.size),t=null;break;case 2:s="doc",o=this.store&&vl(this.store),t=null;break;default:return}return Ws.call(this,e,t,s,o,n,r)},A.import=function(e,t){var n=e.split(".");n[n.length-1]==="json"&&n.pop();const r=2<n.length?n[0]:"";if(n=2<n.length?n[2]:n[1],this.worker&&r)return this.index.get(r).import(e);if(t){if(typeof t=="string"&&(t=JSON.parse(t)),r)return this.index.get(r).import(n,t);switch(n){case"reg":this.fastupdate=!1,this.reg=Zc(t,this.reg);for(let s=0,o;s<this.field.length;s++)o=this.index.get(this.field[s]),o.fastupdate=!1,o.reg=this.reg;if(this.worker){t=[];for(const s of this.index.values())t.push(s.import(e));return Promise.all(t)}break;case"tag":this.tag=Xc(t,this.tag);break;case"doc":this.store=wl(t,this.store)}}},ml(Vt.prototype);function hf(e,t,n){e=(typeof e=="object"?""+e.query:e).toLowerCase(),this.cache||(this.cache=new Bt);let r=this.cache.get(e);if(!r){if(r=this.search(e,t,n),r.then){const s=this;r.then(function(o){return s.cache.set(e,o),o})}this.cache.set(e,r)}return r}function Bt(e){this.limit=e&&e!==!0?e:1e3,this.cache=new Map,this.h=""}Bt.prototype.set=function(e,t){this.cache.set(this.h=e,t),this.cache.size>this.limit&&this.cache.delete(this.cache.keys().next().value)},Bt.prototype.get=function(e){const t=this.cache.get(e);return t&&this.h!==e&&(this.cache.delete(e),this.cache.set(this.h=e,t)),t},Bt.prototype.remove=function(e){for(const t of this.cache){const n=t[0];t[1].includes(e)&&this.cache.delete(n)}},Bt.prototype.clear=function(){this.cache.clear(),this.h=""};const df={normalize:!1,numeric:!1,dedupe:!1},Js={},kl=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"]]),pf=new Map([["ae","a"],["oe","o"],["sh","s"],["kh","k"],["th","t"],["ph","f"],["pf","f"]]),gf=[/([^aeo])h(.)/g,"$1$2",/([aeo])h([^aeo]|$)/g,"$1$2",/(.)\1+/g,"$1"],mf={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 yf={Exact:df,Default:Js,Normalize:Js,LatinBalance:{mapper:kl},LatinAdvanced:{mapper:kl,matcher:pf,replacer:gf},LatinExtra:{mapper:kl,replacer:gf.concat([/(?!^)[aeo]/g,""]),matcher:pf},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(e){for(let n=0;n<e.length;n++){var t=e[n];let r=t.charAt(0),s=mf[r];for(let o=1,i;o<t.length&&(i=t.charAt(o),i==="h"||i==="w"||!(i=mf[i])||i===s||(r+=i,s=i,r.length!==4));o++);e[n]=r}}},CJK:{split:""},LatinExact:df,LatinDefault:Js,LatinSimple:Js};Ke.prototype.remove=function(e,t){const n=this.reg.size&&(this.fastupdate?this.reg.get(e):this.reg.has(e));if(n){if(this.fastupdate){for(let r=0,s;r<n.length;r++)if(s=n[r])if(2>s.length)s.pop();else{const o=s.indexOf(e);o===n.length-1?s.pop():s.splice(o,1)}}else Or(this.map,e),this.depth&&Or(this.ctx,e);t||this.reg.delete(e)}return this.db&&(this.commit_task.push({del:e}),this.T&&Sf(this)),this.cache&&this.cache.remove(e),this};function Or(e,t){let n=0;var r=typeof t>"u";if(e.constructor===Array){for(let s=0,o,i;s<e.length;s++)if((o=e[s])&&o.length)if(r)n++;else if(i=o.indexOf(t),0<=i){1<o.length?(o.splice(i,1),n++):delete e[s];break}else n++}else for(let s of e.entries()){r=s[0];const o=Or(s[1],t);o?n+=o:e.delete(r)}return n}const Xp={memory:{resolution:1},performance:{resolution:3,fastupdate:!0,context:{depth:1,resolution:1}},match:{tokenize:"forward"},score:{resolution:9,context:{depth:2,resolution:3}}};Ke.prototype.add=function(e,t,n,r){if(t&&(e||e===0)){if(!r&&!n&&this.reg.has(e))return this.update(e,t);if(t=this.encoder.encode(t),r=t.length){const a=X(),f=X(),p=this.depth,c=this.resolution;for(let m=0;m<r;m++){let v=t[this.rtl?r-1-m:m];var s=v.length;if(s&&(p||!f[v])){var o=this.score?this.score(t,v,m,null,0):Gs(c,r,m),i="";switch(this.tokenize){case"full":if(2<s){for(let x=0,h;x<s;x++)for(o=s;o>x;o--){i=v.substring(x,o),h=this.rtl?s-1-x:x;var l=this.score?this.score(t,v,m,i,h):Gs(c,r,m,s,h);_r(this,f,i,l,e,n)}break}case"bidirectional":case"reverse":if(1<s){for(l=s-1;0<l;l--){i=v[this.rtl?s-1-l:l]+i;var u=this.score?this.score(t,v,m,i,l):Gs(c,r,m,s,l);_r(this,f,i,u,e,n)}i=""}case"forward":if(1<s){for(l=0;l<s;l++)i+=v[this.rtl?s-1-l:l],_r(this,f,i,o,e,n);break}default:if(_r(this,f,v,o,e,n),p&&1<r&&m<r-1){for(s=X(),i=this.U,o=v,l=Math.min(p+1,this.rtl?m+1:r-m),s[o]=1,u=1;u<l;u++)if((v=t[this.rtl?r-1-m-u:m+u])&&!s[v]){s[v]=1;const x=this.score?this.score(t,o,m,v,u-1):Gs(i+(r/2>i?0:1),r,m,l-1,u-1),h=this.bidirectional&&v>o;_r(this,a,h?o:v,x,e,n,h?v:o)}}}}}this.fastupdate||this.reg.add(e)}else t=""}return this.db&&(t||this.commit_task.push({del:e}),this.T&&Sf(this)),this};function _r(e,t,n,r,s,o,i){let l=i?e.ctx:e.map,u;if((!t[n]||i&&!(u=t[n])[i])&&(i?(t=u||(t[n]=X()),t[i]=1,(u=l.get(i))?l=u:l.set(i,l=new Map)):t[n]=1,(u=l.get(n))?l=u:l.set(n,l=u=[]),l=l[r]||(l[r]=[]),!o||!l.includes(s))){if(l.length===2**31-1){if(t=new Ut(l),e.fastupdate)for(let a of e.reg.values())a.includes(l)&&(a[a.indexOf(l)]=t);u[r]=l=t}l.push(s),e.fastupdate&&((r=e.reg.get(s))?r.push(l):e.reg.set(s,[l]))}}function Gs(e,t,n,r,s){return n&&1<e?t+(r||0)<=e?n+(s||0):(e-1)/(t+(r||0))*(n+(s||0))+1|0:0}Ke.prototype.search=function(e,t,n){n||(t||typeof e!="object"?typeof t=="object"&&(n=t,t=0):(n=e,e=""));let r=[],s,o,i,l=0,u,a,f,p,c;n?(e=n.query||e,t=n.limit||t,l=n.offset||0,o=n.context,i=n.suggest,c=(u=n.resolve!==!1)&&n.enrich,f=n.boost,p=n.resolution,a=this.db&&n.tag):u=this.resolve;let m=this.encoder.encode(e);if(s=m.length,t=t||(u?100:0),s===1)return wf.call(this,m[0],"",t,l,u,c,a);if(o=this.depth&&o!==!1,s===2&&o&&!i)return wf.call(this,m[1],m[0],t,l,u,c,a);let v=X(),x=0,h;if(o&&(h=m[0],x=1),p||p===0||(p=h?this.U:this.resolution),this.db){if(this.db.search&&(e=this.db.search(this,m,t,l,i,u,c,a),e!==!1))return e;const d=this;return async function(){for(let g,w;x<s;x++){if((w=m[x])&&!v[w]){if(v[w]=1,g=await Cl(d,w,h,0,0,!1,!1),g=xf(g,r,i,p)){r=g;break}h&&(i&&g&&r.length||(h=w))}i&&h&&x===s-1&&!r.length&&(p=d.resolution,h="",x=-1,v=X())}return vf(r,p,t,l,i,f,u)}()}for(let d,g;x<s;x++){if((g=m[x])&&!v[g]){if(v[g]=1,d=Cl(this,g,h,0,0,!1,!1),d=xf(d,r,i,p)){r=d;break}h&&(i&&d&&r.length||(h=g))}i&&h&&x===s-1&&!r.length&&(p=this.resolution,h="",x=-1,v=X())}return vf(r,p,t,l,i,f,u)};function vf(e,t,n,r,s,o,i){let l=e.length,u=e;if(1<l)u=rf(e,t,n,r,s,o,i);else if(l===1)return i?$l.call(null,e[0],n,r):new B(e[0]);return i?u:new B(u)}function wf(e,t,n,r,s,o,i){return e=Cl(this,e,t,n,r,s,o,i),this.db?e.then(function(l){return s?l||[]:new B(l)}):e&&e.length?s?$l.call(this,e,n,r):new B(e):s?[]:new B}function xf(e,t,n,r){let s=[];if(e&&e.length){if(e.length<=r){t.push(e);return}for(let o=0,i;o<r;o++)(i=e[o])&&(s[o]=i);if(s.length){t.push(s);return}}if(!n)return s}function Cl(e,t,n,r,s,o,i,l){let u;return n&&(u=e.bidirectional&&t>n)&&(u=n,n=t,t=u),e.db?e.db.get(t,n,r,s,o,i,l):(e=n?(e=e.ctx.get(n))&&e.get(t):e.map.get(t),e)}function Ke(e,t){if(!this||this.constructor!==Ke)return new Ke(e);if(e){var n=_e(e)?e:e.preset;n&&(e=Object.assign({},Xp[n],e))}else e={};n=e.context;const r=n===!0?{depth:1}:n||{},s=_e(e.encoder)?yf[e.encoder]:e.encode||e.encoder||{};this.encoder=s.encode?s:typeof s=="object"?new jr(s):{encode:s},this.resolution=e.resolution||9,this.tokenize=n=(n=e.tokenize)&&n!=="default"&&n!=="exact"&&n||"strict",this.depth=n==="strict"&&r.depth||0,this.bidirectional=r.bidirectional!==!1,this.fastupdate=!!e.fastupdate,this.score=e.score||null,(n=e.keystore||0)&&(this.keystore=n),this.map=n?new He(n):new Map,this.ctx=n?new He(n):new Map,this.reg=t||(this.fastupdate?n?new He(n):new Map:n?new Re(n):new Set),this.U=r.resolution||3,this.rtl=s.rtl||e.rtl||!1,this.cache=(n=e.cache||null)&&new Bt(n),this.resolve=e.resolve!==!1,(n=e.db)&&(this.db=this.mount(n)),this.T=e.commit!==!1,this.commit_task=[],this.commit_timer=null,this.priority=e.priority||4}A=Ke.prototype,A.mount=function(e){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),e.mount(this)},A.commit=function(e,t){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this,e,t)},A.destroy=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.destroy()};function Sf(e){e.commit_timer||(e.commit_timer=setTimeout(function(){e.commit_timer=null,e.db.commit(e,void 0,void 0)},1))}A.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=[{clear:!0}]),this},A.append=function(e,t){return this.add(e,t,!0)},A.contain=function(e){return this.db?this.db.has(e):this.reg.has(e)},A.update=function(e,t){const n=this,r=this.remove(e);return r&&r.then?r.then(()=>n.add(e,t)):this.add(e,t)},A.cleanup=function(){return this.fastupdate?(Or(this.map),this.depth&&Or(this.ctx),this):this},A.searchCache=hf,A.export=function(e,t,n=0,r=0){let s,o;switch(r){case 0:s="reg",o=qc(this.reg);break;case 1:s="cfg",o=null;break;case 2:s="map",o=vl(this.map,this.reg.size);break;case 3:s="ctx",o=Gc(this.ctx,this.reg.size);break;default:return}return Ws.call(this,e,t,s,o,n,r)},A.import=function(e,t){if(t)switch(typeof t=="string"&&(t=JSON.parse(t)),e=e.split("."),e[e.length-1]==="json"&&e.pop(),e.length===3&&e.shift(),e=1<e.length?e[1]:e[0],e){case"reg":this.fastupdate=!1,this.reg=Zc(t,this.reg);break;case"map":this.map=wl(t,this.map);break;case"ctx":this.ctx=Xc(t,this.ctx)}},A.serialize=function(e=!0){let t="",n="",r="";if(this.reg.size){let o;for(var s of this.reg.keys())o||(o=typeof s),t+=(t?",":"")+(o==="string"?'"'+s+'"':s);t="index.reg=new Set(["+t+"]);",n=bc(this.map,o),n="index.map=new Map(["+n+"]);";for(const i of this.ctx.entries()){s=i[0];let l=bc(i[1],o);l="new Map(["+l+"])",l='["'+s+'",'+l+"]",r+=(r?",":"")+l}r="index.ctx=new Map(["+r+"]);"}return e?"function inject(index){"+t+n+r+"}":t+n+r},ml(Ke.prototype);const $f=typeof window<"u"&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),Xs=["map","ctx","tag","reg","cfg"],Ht=X();function kf(e,t={}){if(!this)return new kf(e,t);typeof e=="object"&&(t=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=t.field?t.field.toLowerCase().replace(/[^a-z0-9_\-]/g,""):"",this.type=t.type,this.fastupdate=this.support_tag_search=!1,this.db=null,this.h={}}A=kf.prototype,A.mount=function(e){return e.encoder?(e.db=this,this.open()):e.mount(this)},A.open=function(){if(this.db)return this.db;let e=this;navigator.storage&&navigator.storage.persist(),Ht[e.id]||(Ht[e.id]=[]),Ht[e.id].push(e.field);const t=$f.open(e.id,1);return t.onupgradeneeded=function(){const n=e.db=this.result;for(let r=0,s;r<Xs.length;r++){s=Xs[r];for(let o=0,i;o<Ht[e.id].length;o++)i=Ht[e.id][o],n.objectStoreNames.contains(s+(s!=="reg"&&i?":"+i:""))||n.createObjectStore(s+(s!=="reg"&&i?":"+i:""))}},e.db=Ct(t,function(n){e.db=n,e.db.onversionchange=function(){e.close()}})},A.close=function(){this.db&&this.db.close(),this.db=null},A.destroy=function(){const e=$f.deleteDatabase(this.id);return Ct(e)},A.clear=function(){const e=[];for(let n=0,r;n<Xs.length;n++){r=Xs[n];for(let s=0,o;s<Ht[this.id].length;s++)o=Ht[this.id][s],e.push(r+(r!=="reg"&&o?":"+o:""))}const t=this.db.transaction(e,"readwrite");for(let n=0;n<e.length;n++)t.objectStore(e[n]).clear();return Ct(t)},A.get=function(e,t,n=0,r=0,s=!0,o=!1){e=this.db.transaction((t?"ctx":"map")+(this.field?":"+this.field:""),"readonly").objectStore((t?"ctx":"map")+(this.field?":"+this.field:"")).get(t?t+":"+e:e);const i=this;return Ct(e).then(function(l){let u=[];if(!l||!l.length)return u;if(s){if(!n&&!r&&l.length===1)return l[0];for(let a=0,f;a<l.length;a++)if((f=l[a])&&f.length){if(r>=f.length){r-=f.length;continue}const p=n?r+Math.min(f.length-r,n):f.length;for(let c=r;c<p;c++)u.push(f[c]);if(r=0,u.length===n)break}return o?i.enrich(u):u}return l})},A.tag=function(e,t=0,n=0,r=!1){e=this.db.transaction("tag"+(this.field?":"+this.field:""),"readonly").objectStore("tag"+(this.field?":"+this.field:"")).get(e);const s=this;return Ct(e).then(function(o){return!o||!o.length||n>=o.length?[]:!t&&!n?o:(o=o.slice(n,n+t),r?s.enrich(o):o)})},A.enrich=function(e){typeof e!="object"&&(e=[e]);const t=this.db.transaction("reg","readonly").objectStore("reg"),n=[];for(let r=0;r<e.length;r++)n[r]=Ct(t.get(e[r]));return Promise.all(n).then(function(r){for(let s=0;s<r.length;s++)r[s]={id:e[s],doc:r[s]?JSON.parse(r[s]):null};return r})},A.has=function(e){return e=this.db.transaction("reg","readonly").objectStore("reg").getKey(e),Ct(e).then(function(t){return!!t})},A.search=null,A.info=function(){},A.transaction=function(e,t,n){e+=e!=="reg"&&this.field?":"+this.field:"";let r=this.h[e+":"+t];if(r)return n.call(this,r);let s=this.db.transaction(e,t);this.h[e+":"+t]=r=s.objectStore(e);const o=n.call(this,r);return this.h[e+":"+t]=null,Ct(s).finally(function(){return s=r=null,o})},A.commit=async function(e,t,n){if(t)await this.clear(),e.commit_task=[];else{let r=e.commit_task;e.commit_task=[];for(let s=0,o;s<r.length;s++)if(o=r[s],o.clear){await this.clear(),t=!0;break}else r[s]=o.del;t||(n||(r=r.concat(Ip(e.reg))),r.length&&await this.remove(r))}e.reg.size&&(await this.transaction("map","readwrite",function(r){for(const s of e.map){const o=s[0],i=s[1];i.length&&(t?r.put(i,o):r.get(o).onsuccess=function(){let l=this.result;var u;if(l&&l.length){const a=Math.max(l.length,i.length);for(let f=0,p,c;f<a;f++)if((c=i[f])&&c.length){if((p=l[f])&&p.length)for(u=0;u<c.length;u++)p.push(c[u]);else l[f]=c;u=1}}else l=i,u=1;u&&r.put(l,o)})}}),await this.transaction("ctx","readwrite",function(r){for(const s of e.ctx){const o=s[0],i=s[1];for(const l of i){const u=l[0],a=l[1];a.length&&(t?r.put(a,o+":"+u):r.get(o+":"+u).onsuccess=function(){let f=this.result;var p;if(f&&f.length){const c=Math.max(f.length,a.length);for(let m=0,v,x;m<c;m++)if((x=a[m])&&x.length){if((v=f[m])&&v.length)for(p=0;p<x.length;p++)v.push(x[p]);else f[m]=x;p=1}}else f=a,p=1;p&&r.put(f,o+":"+u)})}}}),e.store?await this.transaction("reg","readwrite",function(r){for(const s of e.store){const o=s[0],i=s[1];r.put(typeof i=="object"?JSON.stringify(i):1,o)}}):e.bypass||await this.transaction("reg","readwrite",function(r){for(const s of e.reg.keys())r.put(1,s)}),e.tag&&await this.transaction("tag","readwrite",function(r){for(const s of e.tag){const o=s[0],i=s[1];i.length&&(r.get(o).onsuccess=function(){let l=this.result;l=l&&l.length?l.concat(i):i,r.put(l,o)})}}),e.map.clear(),e.ctx.clear(),e.tag&&e.tag.clear(),e.store&&e.store.clear(),e.document||e.reg.clear())};function Pl(e,t,n){const r=e.value;let s,o=0;for(let i=0,l;i<r.length;i++){if(l=n?r:r[i]){for(let u=0,a,f;u<t.length;u++)if(f=t[u],a=l.indexOf(f),0<=a)if(s=1,1<l.length)l.splice(a,1);else{r[i]=[];break}o+=l.length}if(n)break}o?s&&e.update(r):e.delete(),e.continue()}A.remove=function(e){return typeof e!="object"&&(e=[e]),Promise.all([this.transaction("map","readwrite",function(t){t.openCursor().onsuccess=function(){const n=this.result;n&&Pl(n,e)}}),this.transaction("ctx","readwrite",function(t){t.openCursor().onsuccess=function(){const n=this.result;n&&Pl(n,e)}}),this.transaction("tag","readwrite",function(t){t.openCursor().onsuccess=function(){const n=this.result;n&&Pl(n,e,!0)}}),this.transaction("reg","readwrite",function(t){for(let n=0;n<e.length;n++)t.delete(e[n])})])};function Ct(e,t){return new Promise((n,r)=>{e.onsuccess=e.oncomplete=function(){t&&t(this.result),t=null,n(this.result)},e.onerror=e.onblocked=r,e=null})}const qs={Encoder:jr,Document:Vt},qp=yf,Zp={finalize:e=>{let t=[];for(const n of e)t.push(...eg(n));return t}};function bp(e){return e>=19968&&e<=40959||e>=12352&&e<=12543||e>=44032&&e<=55203||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=191471||e>=196608&&e<=205743||e>=191472&&e<=192095||e>=63744&&e<=64255||e>=194560&&e<=195103}function eg(e){const t=[];let n="";for(const r of e){const s=r.codePointAt(0);bp(s)?(n&&(t.push(n),n=""),t.push(r)):n+=r}return n&&t.push(n),t}const El=new qs.Encoder(qp.Default,Zp);class tg{constructor({adminUrl:t,apiKey:n,dir:r}){Qf(this,H);const s=r==="rtl",o=r==="rtl"?"reverse":"forward";this.apiUrl=t,this.apiKey=n,this.postsIndex=new qs.Document({tokenize:o,rtl:s,document:{id:"id",index:["title","excerpt"],store:!0},encoder:El}),this.authorsIndex=new qs.Document({tokenize:o,rtl:s,document:{id:"id",index:["name"],store:!0},encoder:El}),this.tagsIndex=new qs.Document({tokenize:o,rtl:s,document:{id:"id",index:["name"],store:!0},encoder:El}),this.init=this.init.bind(this),this.search=this.search.bind(this)}async init(){await ke(this,H,Yf).call(this),await ke(this,H,Xf).call(this),await ke(this,H,bf).call(this)}search(t){const n=this.postsIndex.search(t,{enrich:!0}),r=this.authorsIndex.search(t,{enrich:!0}),s=this.tagsIndex.search(t,{enrich:!0});return{posts:ke(this,H,lo).call(this,n),authors:ke(this,H,lo).call(this,r),tags:ke(this,H,lo).call(this,s)}}}H=new WeakSet,Yf=async function(){const t=await ke(this,H,Jf).call(this);t.length>0&&ke(this,H,Gf).call(this,t)},Jf=async function(){try{const t=`${this.apiUrl}/ghost/api/content/search-index/posts/?key=${this.apiKey}`;return(await(await fetch(t)).json()).posts}catch(t){return console.error("Error fetching posts:",t),[]}},Gf=function(t){t.forEach(n=>{this.postsIndex.add(n)})},Xf=async function(){const t=await ke(this,H,qf).call(this);t.length>0&&ke(this,H,Zf).call(this,t)},qf=async function(){try{const t=`${this.apiUrl}/ghost/api/content/search-index/authors/?key=${this.apiKey}`;return(await(await fetch(t)).json()).authors}catch(t){return console.error("Error fetching authors:",t),[]}},Zf=function(t){t.forEach(n=>{this.authorsIndex.add(n)})},bf=async function(){const t=await ke(this,H,eh).call(this);t.length>0&&ke(this,H,th).call(this,t)},eh=async function(){try{const t=`${this.apiUrl}/ghost/api/content/search-index/tags/?key=${this.apiKey}`;return(await(await fetch(t)).json()).tags}catch(t){return console.error("Error fetching tags:",t),[]}},th=function(t){t.forEach(n=>{this.tagsIndex.add(n)})},lo=function(t){const n=[],r={};return t.forEach(s=>{s.result.forEach(o=>{r[o.id]||(n.push(o.doc),r[o.id]=!0)})}),n};const ng={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},rg={Authors:"الكتّاب",Cancel:"إلغاء","No matches found":"لا يوجد نتائج مطابقة",Posts:"منشورات","Search posts, tags and authors":"قم بالبحث عن المنشورات، الوسوم و الكتّاب","Show more results":"اظهر المزيد من النتائج",Tags:"الوسوم"},sg={Authors:"Автори",Cancel:"Отказ","No matches found":"Няма съвпадения",Posts:"Публикации","Search posts, tags and authors":"Търсене в публикации, етикети и автори","Show more results":"Покажи още резултати",Tags:"Етикети"},og={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},ig={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},lg={Authors:"Autors",Cancel:"Cancel·la","No matches found":"No s'ha trobat cap resultat",Posts:"Articles","Search posts, tags and authors":"Cerca articles, etiquetes i autors","Show more results":"Mostra més resultats",Tags:"Etiquetes"},ug={Authors:"Autoři",Cancel:"Zrušit","No matches found":"Nenalezeno",Posts:"Články","Search posts, tags and authors":"Prohledat články, štítky a autory","Show more results":"Zobrazit více výsledků",Tags:"Štítky"},ag={Authors:"Forfattere",Cancel:"Annuller","No matches found":"Ingen resultater fundet",Posts:"Indlæg","Search posts, tags and authors":"Søg i indlæg, tags og forfattere","Show more results":"Vis flere resultater",Tags:"Tags"},cg={Authors:"Autor*innen",Cancel:"Abbrechen","No matches found":"Keine Treffer gefunden",Posts:"Posts","Search posts, tags and authors":"Posts, Tags und Autor*innen durchsuchen","Show more results":"Mehr Ergebnisse anzeigen",Tags:"Tags"},fg={Authors:"Autoren",Cancel:"Abbrechen","No matches found":"Keine Treffer gefunden",Posts:"Beiträge","Search posts, tags and authors":"Nach Posts, Tags und Autoren suchen","Show more results":"Mehr Ergebnisse anzeigen",Tags:"Tags"},hg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},dg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},pg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},gg={Authors:"Autores",Cancel:"Cancelar","No matches found":"No se encontraron resultados",Posts:"Publicaciones","Search posts, tags and authors":"Buscar publicaciones, etiquetas y autores","Show more results":"Mostrar más resultados",Tags:"Etiquetas"},mg={Authors:"Autorid",Cancel:"Tühista","No matches found":"Vasteid ei leitud",Posts:"Postitused","Search posts, tags and authors":"Otsi postitusi, silte ja autoreid","Show more results":"Näita rohkem tulemusi",Tags:"Sildid"},yg={Authors:"Autoreak",Cancel:"Utzi","No matches found":"Ez da bat datorren ezer topatu",Posts:"Artikuluak","Search posts, tags and authors":"Bilatu artikuluak, etiketak eta autoreak","Show more results":"Erakutsi emaitza gehiago",Tags:"Etiketak"},vg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},wg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},xg={Authors:"Auteurs",Cancel:"Annuler","No matches found":"Aucun résultat trouvé",Posts:"Articles","Search posts, tags and authors":"Rechercher des articles, des catégories et des auteurs","Show more results":"Plus de résultats",Tags:"Catégories"},Sg={Authors:"Ùghdaran",Cancel:"Sguir dheth","No matches found":"Cha deach dad a lorg a fhreagras ris na lorg thu",Posts:"Postaichean","Search posts, tags and authors":"Lorg sna postaichean, tagaichean agus ùghdaran","Show more results":"Seall barrachd thoraidhean",Tags:"Tagaichean"},$g={Authors:"מחברים",Cancel:"ביטול","No matches found":"לא נמצאו התאמות",Posts:"פוסטים","Search posts, tags and authors":"חיפוש פוסטים, תגיות ומחברים","Show more results":"הצגת תוצאות נוספות",Tags:"תגיות"},kg={Authors:"लेखक",Cancel:"रद्द करें","No matches found":"कोई मैच नहीं मिला",Posts:"पोस्ट","Search posts, tags and authors":"पोस्ट, टैग और लेखक की तलाश करें","Show more results":"और परिणाम दिखाएं",Tags:"टैग"},Cg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Pg={Authors:"Szerzők",Cancel:"Mégse","No matches found":"Nincs találat",Posts:"Bejegyzések","Search posts, tags and authors":"Keresés a bejegyzések, a címkék és a szerzők között","Show more results":"További találatok megjelenítése",Tags:"Címkék"},Eg={Authors:"Penulis",Cancel:"Batalkan","No matches found":"Tidak ada hasil yang ditemukan",Posts:"Postingan","Search posts, tags and authors":"Cari postingan, tag, dan penulis","Show more results":"Tampilkan lebih banyak hasil",Tags:"Tag"},Tg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},jg={Authors:"Autori",Cancel:"Annulla","No matches found":"Nessun risultato trovato",Posts:"Articoli","Search posts, tags and authors":"Cerca articoli, tag e autori","Show more results":"Mostra più risultati",Tags:"Tag"},Ng={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Ag={Authors:"작성자",Cancel:"취소","No matches found":"일치하는 결과가 없어요",Posts:"게시물","Search posts, tags and authors":"게시물, 태그, 작성자 검색","Show more results":"더 많은 결과 보기",Tags:"태그"},Lg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Og={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},_g={Authors:"Autori",Cancel:"Atcelt","No matches found":"Nav atrasta neviena atbilstība",Posts:"Ziņas","Search posts, tags and authors":"Meklēt ziņas, atzīmes un autorus","Show more results":"Rādīt vairāk rezultātu",Tags:"Tagi"},Rg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},zg={Authors:"Нийтлэгчид",Cancel:"Цуцлах","No matches found":"Тохирох хайлтын үр дүн олдсонгүй",Posts:"Нийтлэлүүд","Search posts, tags and authors":"Нийтлэл, ангилал, нийтлэгчдээр хайх","Show more results":"Илүү олон үр дүн харуулах",Tags:"Ангилалууд"},Ig={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Mg={Authors:"Forfattere",Cancel:"Avbryt","No matches found":"Ingen treff funnet",Posts:"Innlegg","Search posts, tags and authors":"Søk i innlegg, etiketter og forfattere","Show more results":"Vis flere resultater",Tags:"Etiketter"},Dg={Authors:"लेखकहरू",Cancel:"रद्द गर्नुहोस्","No matches found":"कुनै परिणाम भेटिएन",Posts:"पोस्टहरू","Search posts, tags and authors":"पोस्टहरू, ट्यागहरू र लेखकहरू खोज्नुहोस्","Show more results":"थप परिणामहरू देखाउनुहोस्",Tags:"ट्यागहरू"},Fg={Authors:"Auteurs",Cancel:"Annuleren","No matches found":"Geen resultaten gevonden",Posts:"Berichten","Search posts, tags and authors":"Zoek berichten, tags en auteurs","Show more results":"Meer resultaten weergeven",Tags:"Tags"},Ug={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Vg={Authors:"ਲੇਖਕ",Cancel:"ਰੱਦ ਕਰੋ","No matches found":"ਕੋਈ ਮੇਲ ਨਹੀਂ ਮਿਲਿਆ",Posts:"ਪੋਸਟਾਂ","Search posts, tags and authors":"ਪੋਸਟਾਂ, ਟੈਗ ਅਤੇ ਲੇਖਕ ਖੋਜੋ","Show more results":"ਹੋਰ ਨਤੀਜੇ ਦਿਖਾਓ",Tags:"ਟੈਗ"},Bg={Authors:"Autorzy",Cancel:"Anuluj","No matches found":"Nie znaleziono dopasowań",Posts:"Posty","Search posts, tags and authors":"Szukaj postów, tagów lub autorów","Show more results":"Pokaż więcej wyników",Tags:"Tagi"},Hg={Authors:"Autores",Cancel:"Cancelar","No matches found":"Nenhum resultado encontrado",Posts:"Publicações","Search posts, tags and authors":"Procurar publicações, marcadores e autores","Show more results":"Mostrar mais resultados",Tags:"Marcadores"},Kg={Authors:"Autores",Cancel:"Cancelar","No matches found":"Nenhum resultado encontrado",Posts:"Publicações","Search posts, tags and authors":"Buscar posts, tags e autores","Show more results":"Mostrar mais resultados",Tags:"Tags"},Wg={Authors:"Autori",Cancel:"Anulează","No matches found":"Nu s-au găsit rezultate",Posts:"Postări","Search posts, tags and authors":"Caută postări, etichete și autori","Show more results":"Afișează mai multe rezultate",Tags:"Etichete"},Qg={Authors:"Авторы",Cancel:"Отмена","No matches found":"Совпадений не найдено",Posts:"Записи","Search posts, tags and authors":"Поиск по записям, тегам и авторам","Show more results":"Показать больше результатов",Tags:"Теги"},Yg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Jg={Authors:"Autori",Cancel:"Zrušiť","No matches found":"Nenašli sa žiadne výsledky",Posts:"Príspevky","Search posts, tags and authors":"Vyhľadajte príspevky, tagy a autorov","Show more results":"Zobraziť viac výsledkov",Tags:"Tagy"},Gg={Authors:"Avtorji",Cancel:"Prekliči","No matches found":"Ni najdenih zadetkov",Posts:"Članki","Search posts, tags and authors":"Iščite članke, oznake in avtorje","Show more results":"Prikaži več rezultatov",Tags:"Oznake"},Xg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},qg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Zg={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},bg={Authors:"Författare",Cancel:"Avbryt","No matches found":"Inga träffar hittade",Posts:"Inlägg","Search posts, tags and authors":"Sök inlägg, taggar och författare","Show more results":"Visa fler resultat",Tags:"Taggar"},em={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},tm={Authors:"Yazarlar",Cancel:"İptal","No matches found":"Eşleşme bulunamadı",Posts:"Yazılar","Search posts, tags and authors":"Yazıları, etiketleri ve yazarları ara","Show more results":"Daha fazla sonuç göster",Tags:"Etiketler"},nm={Authors:"Автори",Cancel:"Скасувати","No matches found":"Збігів не знайдено",Posts:"Публікації","Search posts, tags and authors":"Шукайте публікацій, теги та авторів","Show more results":"Показати більше результатів",Tags:"Теги"},rm={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},sm={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},om={Authors:"Tác giả",Cancel:"Hủy","No matches found":"Không tìm thấy",Posts:"Bài viết","Search posts, tags and authors":"Tìm bài viết, chuyên mục & tác giả","Show more results":"Xem thêm kết quả",Tags:"Chuyên mục"},im={Authors:"作者",Cancel:"取消","No matches found":"未找到匹配项",Posts:"文章","Search posts, tags and authors":"搜索文章、标签和作者","Show more results":"显示更多结果",Tags:"标签"},lm={Authors:"作者",Cancel:"取消","No matches found":"無相符結果",Posts:"文章","Search posts, tags and authors":"搜尋文章、標籤與作者","Show more results":"更多結果",Tags:"標籤"},um={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},am={Authors:"ஆசிரியர்கள்",Cancel:"ரத்து செய்","No matches found":"பொருத்தங்கள் எதுவும் இல்லை",Posts:"பதிவுகள்","Search posts, tags and authors":"பதிவுகள், குறிச்சொற்கள் மற்றும் ஆசிரியர்களைத் தேடுங்கள்","Show more results":"மேலும் முடிவுகளைக் காட்டு",Tags:"குறிச்சொற்கள்"};var Cf;function Pf(){return Cf||(Cf={"/ghost/i18n/locales/af/search.json":function(){return ng},"/ghost/i18n/locales/ar/search.json":function(){return rg},"/ghost/i18n/locales/bg/search.json":function(){return sg},"/ghost/i18n/locales/bn/search.json":function(){return og},"/ghost/i18n/locales/bs/search.json":function(){return ig},"/ghost/i18n/locales/ca/search.json":function(){return lg},"/ghost/i18n/locales/cs/search.json":function(){return ug},"/ghost/i18n/locales/da/search.json":function(){return ag},"/ghost/i18n/locales/de/search.json":function(){return cg},"/ghost/i18n/locales/de-CH/search.json":function(){return fg},"/ghost/i18n/locales/el/search.json":function(){return hg},"/ghost/i18n/locales/en/search.json":function(){return dg},"/ghost/i18n/locales/eo/search.json":function(){return pg},"/ghost/i18n/locales/es/search.json":function(){return gg},"/ghost/i18n/locales/et/search.json":function(){return mg},"/ghost/i18n/locales/eu/search.json":function(){return yg},"/ghost/i18n/locales/fa/search.json":function(){return vg},"/ghost/i18n/locales/fi/search.json":function(){return wg},"/ghost/i18n/locales/fr/search.json":function(){return xg},"/ghost/i18n/locales/gd/search.json":function(){return Sg},"/ghost/i18n/locales/he/search.json":function(){return $g},"/ghost/i18n/locales/hi/search.json":function(){return kg},"/ghost/i18n/locales/hr/search.json":function(){return Cg},"/ghost/i18n/locales/hu/search.json":function(){return Pg},"/ghost/i18n/locales/id/search.json":function(){return Eg},"/ghost/i18n/locales/is/search.json":function(){return Tg},"/ghost/i18n/locales/it/search.json":function(){return jg},"/ghost/i18n/locales/ja/search.json":function(){return Ng},"/ghost/i18n/locales/ko/search.json":function(){return Ag},"/ghost/i18n/locales/kz/search.json":function(){return Lg},"/ghost/i18n/locales/lt/search.json":function(){return Og},"/ghost/i18n/locales/lv/search.json":function(){return _g},"/ghost/i18n/locales/mk/search.json":function(){return Rg},"/ghost/i18n/locales/mn/search.json":function(){return zg},"/ghost/i18n/locales/ms/search.json":function(){return Ig},"/ghost/i18n/locales/nb/search.json":function(){return Mg},"/ghost/i18n/locales/ne/search.json":function(){return Dg},"/ghost/i18n/locales/nl/search.json":function(){return Fg},"/ghost/i18n/locales/nn/search.json":function(){return Ug},"/ghost/i18n/locales/pa/search.json":function(){return Vg},"/ghost/i18n/locales/pl/search.json":function(){return Bg},"/ghost/i18n/locales/pt/search.json":function(){return Hg},"/ghost/i18n/locales/pt-BR/search.json":function(){return Kg},"/ghost/i18n/locales/ro/search.json":function(){return Wg},"/ghost/i18n/locales/ru/search.json":function(){return Qg},"/ghost/i18n/locales/si/search.json":function(){return Yg},"/ghost/i18n/locales/sk/search.json":function(){return Jg},"/ghost/i18n/locales/sl/search.json":function(){return Gg},"/ghost/i18n/locales/sq/search.json":function(){return Xg},"/ghost/i18n/locales/sr/search.json":function(){return qg},"/ghost/i18n/locales/sr-Cyrl/search.json":function(){return Zg},"/ghost/i18n/locales/sv/search.json":function(){return bg},"/ghost/i18n/locales/th/search.json":function(){return em},"/ghost/i18n/locales/tr/search.json":function(){return tm},"/ghost/i18n/locales/uk/search.json":function(){return nm},"/ghost/i18n/locales/ur/search.json":function(){return rm},"/ghost/i18n/locales/uz/search.json":function(){return sm},"/ghost/i18n/locales/vi/search.json":function(){return om},"/ghost/i18n/locales/zh/search.json":function(){return im},"/ghost/i18n/locales/zh-Hant/search.json":function(){return lm},"/ghost/i18n/locales/sw/search.json":function(){return um},"/ghost/i18n/locales/ta/search.json":function(){return am}})}function Ef(e){function t(n){var r=Tf(n,e);if(r!==null)return Pf()[r]();throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}return t.resolve=function(n){var r=Tf(n,e);return r!==null?r:require.resolve(n)},t}function Tf(e,t){var n=cm(e);e=Zs(e);var r;e[0]==="/"&&(t="");for(var s=Pf(),o=["",".js",".json"];n?r=Zs(t+"/node_modules/"+e):r=Zs(t+"/"+e),!r.endsWith("/..");){for(var i=0;i<o.length;i++){var l=r+o[i];if(s[l])return l}if(!n)break;var u=Zs(t+"/..");if(u===t)break;t=u}return null}function cm(e){var t=e[0];if(t==="/"||t==="\\")return!1;var n=e[1],r=e[2];return!(t==="."&&(!n||n==="/"||n==="\\")||t==="."&&n==="."&&(!r||r==="/"||r==="\\")||n===":"&&(r==="/"||r==="\\"))}function Zs(e){e=e.replace(/\\/g,"/");for(var t=e.split("/"),n=t[0]==="",r=1;r<t.length;r++)(t[r]==="."||t[r]==="")&&t.splice(r--,1);for(var r=1;r<t.length;r++)t[r]===".."&&r>0&&t[r-1]!==".."&&t[r-1]!=="."&&(t.splice(--r,2),r--);return e=t.join("/"),n&&e[0]!=="/"?e="/"+e:e.length===0&&(e="."),e}var bs={exports:{}};const O=e=>typeof e=="string",Rr=()=>{let e,t;const n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},jf=e=>e==null?"":""+e,fm=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},hm=/###/g,Nf=e=>e&&e.indexOf("###")>-1?e.replace(hm,"."):e,Af=e=>!e||O(e),zr=(e,t,n)=>{const r=O(t)?t.split("."):t;let s=0;for(;s<r.length-1;){if(Af(e))return{};const o=Nf(r[s]);!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++s}return Af(e)?{}:{obj:e,k:Nf(r[s])}},Lf=(e,t,n)=>{const{obj:r,k:s}=zr(e,t,Object);if(r!==void 0||t.length===1){r[s]=n;return}let o=t[t.length-1],i=t.slice(0,t.length-1),l=zr(e,i,Object);for(;l.obj===void 0&&i.length;)o=`${i[i.length-1]}.${o}`,i=i.slice(0,i.length-1),l=zr(e,i,Object),l&&l.obj&&typeof l.obj[`${l.k}.${o}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${o}`]=n},dm=(e,t,n,r)=>{const{obj:s,k:o}=zr(e,t,Object);s[o]=s[o]||[],s[o].push(n)},eo=(e,t)=>{const{obj:n,k:r}=zr(e,t);if(n)return n[r]},pm=(e,t,n)=>{const r=eo(e,n);return r!==void 0?r:eo(t,n)},Of=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?O(e[r])||e[r]instanceof String||O(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Of(e[r],t[r],n):e[r]=t[r]);return e},En=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var gm={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const mm=e=>O(e)?e.replace(/[&<>"'\/]/g,t=>gm[t]):e;class ym{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const vm=[" ",",","?","!",";"],wm=new ym(20),xm=(e,t,n)=>{t=t||"",n=n||"";const r=vm.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const s=wm.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let o=!s.test(e);if(!o){const i=e.indexOf(n);i>0&&!s.test(e.substring(0,i))&&(o=!0)}return o},Tl=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let s=e;for(let o=0;o<r.length;){if(!s||typeof s!="object")return;let i,l="";for(let u=o;u<r.length;++u)if(u!==o&&(l+=n),l+=r[u],i=s[l],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&u<r.length-1)continue;o+=u-o+1;break}s=i}return s},to=e=>e&&e.replace("_","-"),Sm={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class no{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||Sm,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,s){return s&&!this.debug?null:(O(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new no(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new no(this.logger,t)}}var We=new no;class ro{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(i=>{let[l,u]=i;for(let a=0;a<u;a++)l(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(i=>{let[l,u]=i;for(let a=0;a<u;a++)l.apply(l,[t,...r])})}}class _f extends ro{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,n],r&&(Array.isArray(r)?l.push(...r):O(r)&&o?l.push(...r.split(o)):l.push(r)));const u=eo(this.data,l);return!u&&!n&&!r&&t.indexOf(".")>-1&&(t=l[0],n=l[1],r=l.slice(2).join(".")),u||!i||!O(r)?u:Tl(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,s){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let l=[t,n];r&&(l=l.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(l=t.split("."),s=n,n=l[1]),this.addNamespaces(n),Lf(this.data,l,s),o.silent||this.emit("added",t,n,r,s)}addResources(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(O(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});s.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[t,n];t.indexOf(".")>-1&&(l=t.split("."),s=r,r=n,n=l[1]),this.addNamespaces(n);let u=eo(this.data,l)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?Of(u,r,o):u={...u,...r},Lf(this.data,l,u),i.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var Rf={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,s){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,s))}),t}};const zf={};class so extends ro{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),fm(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=We.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const i=r&&t.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!xm(t,r,s);if(i&&!l){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:O(o)?[o]:o};const a=t.split(r);(r!==s||r===s&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),t=a.join(s)}return{key:t,namespaces:O(o)?[o]:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:i,namespaces:l}=this.extractFromKey(t[t.length-1],n),u=l[l.length-1],a=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(a&&a.toLowerCase()==="cimode"){if(f){const y=n.nsSeparator||this.options.nsSeparator;return s?{res:`${u}${y}${i}`,usedKey:i,exactUsedKey:i,usedLng:a,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:`${u}${y}${i}`}return s?{res:i,usedKey:i,exactUsedKey:i,usedLng:a,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:i}const p=this.resolve(t,n);let c=p&&p.res;const m=p&&p.usedKey||i,v=p&&p.exactUsedKey||i,x=Object.prototype.toString.apply(c),h=["[object Number]","[object Function]","[object RegExp]"],d=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,w=!O(c)&&typeof c!="boolean"&&typeof c!="number";if(g&&c&&w&&h.indexOf(x)<0&&!(O(d)&&Array.isArray(c))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const y=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,c,{...n,ns:l}):`key '${i} (${this.language})' returned an object instead of string.`;return s?(p.res=y,p.usedParams=this.getUsedParamsDetails(n),p):y}if(o){const y=Array.isArray(c),$=y?[]:{},S=y?v:m;for(const C in c)if(Object.prototype.hasOwnProperty.call(c,C)){const T=`${S}${o}${C}`;$[C]=this.translate(T,{...n,joinArrays:!1,ns:l}),$[C]===T&&($[C]=c[C])}c=$}}else if(g&&O(d)&&Array.isArray(c))c=c.join(d),c&&(c=this.extendTranslation(c,t,n,r));else{let y=!1,$=!1;const S=n.count!==void 0&&!O(n.count),C=so.hasDefaultValue(n),T=S?this.pluralResolver.getSuffix(a,n.count,n):"",N=n.ordinal&&S?this.pluralResolver.getSuffix(a,n.count,{ordinal:!1}):"",M=S&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),ze=M&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${T}`]||n[`defaultValue${N}`]||n.defaultValue;!this.isValidLookup(c)&&C&&(y=!0,c=ze),this.isValidLookup(c)||($=!0,c=i);const ee=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&$?void 0:c,Qe=C&&ze!==c&&this.options.updateMissing;if($||y||Qe){if(this.logger.log(Qe?"updateKey":"missingKey",a,u,i,Qe?ze:c),o){const oe=this.resolve(i,{...n,keySeparator:!1});oe&&oe.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let $e=[];const Ye=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Ye&&Ye[0])for(let oe=0;oe<Ye.length;oe++)$e.push(Ye[oe]);else this.options.saveMissingTo==="all"?$e=this.languageUtils.toResolveHierarchy(n.lng||this.language):$e.push(n.lng||this.language);const jn=(oe,Ie,Kt)=>{const E=C&&Kt!==c?Kt:ee;this.options.missingKeyHandler?this.options.missingKeyHandler(oe,u,Ie,E,Qe,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(oe,u,Ie,E,Qe,n),this.emit("missingKey",oe,u,Ie,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?$e.forEach(oe=>{const Ie=this.pluralResolver.getSuffixes(oe,n);M&&n[`defaultValue${this.options.pluralSeparator}zero`]&&Ie.indexOf(`${this.options.pluralSeparator}zero`)<0&&Ie.push(`${this.options.pluralSeparator}zero`),Ie.forEach(Kt=>{jn([oe],i+Kt,n[`defaultValue${Kt}`]||ze)})}):jn($e,i,ze))}c=this.extendTranslation(c,t,n,p,r),$&&c===i&&this.options.appendNamespaceToMissingKey&&(c=`${u}:${i}`),($||y)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${i}`:i,y?c:void 0):c=this.options.parseMissingKeyHandler(c))}return s?(p.res=c,p.usedParams=this.getUsedParamsDetails(n),p):c}extendTranslation(t,n,r,s,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const a=O(t)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(a){const c=t.match(this.interpolator.nestingRegexp);f=c&&c.length}let p=r.replace&&!O(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,r.lng||this.language||s.usedLng,r),a){const c=t.match(this.interpolator.nestingRegexp),m=c&&c.length;f<m&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var c=arguments.length,m=new Array(c),v=0;v<c;v++)m[v]=arguments[v];return o&&o[0]===m[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${n[0]}`),null):i.translate(...m,n)},r)),r.interpolation&&this.interpolator.reset()}const l=r.postProcess||this.options.postProcess,u=O(l)?[l]:l;return t!=null&&u&&u.length&&r.applyPostProcessor!==!1&&(t=Rf.handle(u,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,o,i,l;return O(t)&&(t=[t]),t.forEach(u=>{if(this.isValidLookup(r))return;const a=this.extractFromKey(u,n),f=a.key;s=f;let p=a.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const c=n.count!==void 0&&!O(n.count),m=c&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),v=n.context!==void 0&&(O(n.context)||typeof n.context=="number")&&n.context!=="",x=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);p.forEach(h=>{this.isValidLookup(r)||(l=h,!zf[`${x[0]}-${h}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(zf[`${x[0]}-${h}`]=!0,this.logger.warn(`key "${s}" for languages "${x.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),x.forEach(d=>{if(this.isValidLookup(r))return;i=d;const g=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(g,f,d,h,n);else{let y;c&&(y=this.pluralResolver.getSuffix(d,n.count,n));const $=`${this.options.pluralSeparator}zero`,S=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(g.push(f+y),n.ordinal&&y.indexOf(S)===0&&g.push(f+y.replace(S,this.options.pluralSeparator)),m&&g.push(f+$)),v){const C=`${f}${this.options.contextSeparator}${n.context}`;g.push(C),c&&(g.push(C+y),n.ordinal&&y.indexOf(S)===0&&g.push(C+y.replace(S,this.options.pluralSeparator)),m&&g.push(C+$))}}let w;for(;w=g.pop();)this.isValidLookup(r)||(o=w,r=this.getResource(d,h,w,n))}))})}),{res:r,usedKey:s,exactUsedKey:o,usedLng:i,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,s):this.resourceStore.getResource(t,n,r,s)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!O(t.replace);let s=r?t.replace:t;if(r&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const o of n)delete s[o]}return s}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const jl=e=>e.charAt(0).toUpperCase()+e.slice(1);class If{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=We.create("languageUtils")}getScriptPartFromCode(t){if(t=to(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=to(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(O(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let s=Intl.getCanonicalLocales(t)[0];if(s&&this.options.lowerCaseLng&&(s=s.toLowerCase()),s)return s}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(s=>s.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=jl(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=jl(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=jl(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(o=>{if(o===s)return o;if(!(o.indexOf("-")<0&&s.indexOf("-")<0)&&(o.indexOf("-")>0&&s.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===s||o.indexOf(s)===0&&s.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),O(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),s=[],o=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return O(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):O(t)&&o(this.formatLanguageCode(t)),r.forEach(i=>{s.indexOf(i)<0&&o(this.formatLanguageCode(i))}),s}}let $m=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],km={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const Cm=["v1","v2","v3"],Pm=["v4"],Mf={zero:0,one:1,two:2,few:3,many:4,other:5},Em=()=>{const e={};return $m.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:km[t.fc]}})}),e};class Tm{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=We.create("pluralResolver"),(!this.options.compatibilityJSON||Pm.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Em(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const r=to(t==="dev"?"en":t),s=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(r,{type:s})}catch{if(!t.match(/-|_/))return;const u=this.languageUtils.getLanguagePartFromCode(t);i=this.getRule(u,n)}return this.pluralRulesCache[o]=i,i}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(s=>`${n}${s}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((s,o)=>Mf[s]-Mf[o]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):r.numbers.map(s=>this.getSuffix(t,s,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(t,r);return s?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:this.getSuffixRetroCompatible(s,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let s=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const o=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!Cm.includes(this.options.compatibilityJSON)}}const Df=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=pm(e,t,n);return!o&&s&&O(n)&&(o=Tl(e,n,r),o===void 0&&(o=Tl(t,n,r))),o},Nl=e=>e.replace(/\$/g,"$$$$");class jm{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=We.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:o,prefixEscaped:i,suffix:l,suffixEscaped:u,formatSeparator:a,unescapeSuffix:f,unescapePrefix:p,nestingPrefix:c,nestingPrefixEscaped:m,nestingSuffix:v,nestingSuffixEscaped:x,nestingOptionsSeparator:h,maxReplaces:d,alwaysFormat:g}=t.interpolation;this.escape=n!==void 0?n:mm,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?En(o):i||"{{",this.suffix=l?En(l):u||"}}",this.formatSeparator=a||",",this.unescapePrefix=f?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=c?En(c):m||En("$t("),this.nestingSuffix=v?En(v):x||En(")"),this.nestingOptionsSeparator=h||",",this.maxReplaces=d||1e3,this.alwaysFormat=g!==void 0?g:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,s){let o,i,l;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},a=m=>{if(m.indexOf(this.formatSeparator)<0){const d=Df(n,u,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(d,void 0,r,{...s,...n,interpolationkey:m}):d}const v=m.split(this.formatSeparator),x=v.shift().trim(),h=v.join(this.formatSeparator).trim();return this.format(Df(n,u,x,this.options.keySeparator,this.options.ignoreJSONStructure),h,r,{...s,...n,interpolationkey:x})};this.resetRegExp();const f=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,p=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>Nl(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?Nl(this.escape(m)):Nl(m)}].forEach(m=>{for(l=0;o=m.regex.exec(t);){const v=o[1].trim();if(i=a(v),i===void 0)if(typeof f=="function"){const h=f(t,o,s);i=O(h)?h:""}else if(s&&Object.prototype.hasOwnProperty.call(s,v))i="";else if(p){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`),i="";else!O(i)&&!this.useRawValueToEscape&&(i=jf(i));const x=m.safeValue(i);if(t=t.replace(o[0],x),p?(m.regex.lastIndex+=i.length,m.regex.lastIndex-=o[0].length):m.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,o,i;const l=(u,a)=>{const f=this.nestingOptionsSeparator;if(u.indexOf(f)<0)return u;const p=u.split(new RegExp(`${f}[ ]*{`));let c=`{${p[1]}`;u=p[0],c=this.interpolate(c,i);const m=c.match(/'/g),v=c.match(/"/g);(m&&m.length%2===0&&!v||v.length%2!==0)&&(c=c.replace(/'/g,'"'));try{i=JSON.parse(c),a&&(i={...a,...i})}catch(x){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,x),`${u}${f}${c}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,u};for(;s=this.nestingRegexp.exec(t);){let u=[];i={...r},i=i.replace&&!O(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let a=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const f=s[1].split(this.formatSeparator).map(p=>p.trim());s[1]=f.shift(),u=f,a=!0}if(o=n(l.call(this,s[1].trim(),i),i),o&&s[0]===t&&!O(o))return o;O(o)||(o=jf(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),o=""),a&&(o=u.reduce((f,p)=>this.format(f,p,r.lng,{...r,interpolationkey:s[1].trim()}),o.trim())),t=t.replace(s[0],o),this.regexp.lastIndex=0}return t}}const Nm=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);t==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(i=>{if(i){const[l,...u]=i.split(":"),a=u.join(":").trim().replace(/^'+|'+$/g,""),f=l.trim();n[f]||(n[f]=a),a==="false"&&(n[f]=!1),a==="true"&&(n[f]=!0),isNaN(a)||(n[f]=parseInt(a,10))}})}return{formatName:t,formatOptions:n}},Tn=e=>{const t={};return(n,r,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const i=r+JSON.stringify(o);let l=t[i];return l||(l=e(to(r),s),t[i]=l),l(n)}};class Am{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=We.create("formatter"),this.options=t,this.formats={number:Tn((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:Tn((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:Tn((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:Tn((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:Tn((n,r)=>{const s=new Intl.ListFormat(n,{...r});return o=>s.format(o)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Tn(n)}format(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(l=>l.indexOf(")")>-1)){const l=o.findIndex(u=>u.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,l)].join(this.formatSeparator)}return o.reduce((l,u)=>{const{formatName:a,formatOptions:f}=Nm(u);if(this.formats[a]){let p=l;try{const c=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},m=c.locale||c.lng||s.locale||s.lng||r;p=this.formats[a](l,m,{...f,...s,...c})}catch(c){this.logger.warn(c)}return p}else this.logger.warn(`there was no format function for ${a}`);return l},t)}}const Lm=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Om extends ro{constructor(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=We.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,s.backend,s)}queueLoad(t,n,r,s){const o={},i={},l={},u={};return t.forEach(a=>{let f=!0;n.forEach(p=>{const c=`${a}|${p}`;!r.reload&&this.store.hasResourceBundle(a,p)?this.state[c]=2:this.state[c]<0||(this.state[c]===1?i[c]===void 0&&(i[c]=!0):(this.state[c]=1,f=!1,i[c]===void 0&&(i[c]=!0),o[c]===void 0&&(o[c]=!0),u[p]===void 0&&(u[p]=!0)))}),f||(l[a]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const s=t.split("|"),o=s[0],i=s[1];n&&this.emit("failedLoading",o,i,n),!n&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const l={};this.queue.forEach(u=>{dm(u.loaded,[o],i),Lm(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(a=>{l[a]||(l[a]={});const f=u.loaded[a];f.length&&f.forEach(p=>{l[a][p]===void 0&&(l[a][p]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:s,wait:o,callback:i});return}this.readingCalls++;const l=(a,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(a&&f&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,s+1,o*2,i)},o);return}i(a,f)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const a=u(t,n);a&&typeof a.then=="function"?a.then(f=>l(null,f)).catch(l):l(null,a)}catch(a){l(a)}return}return u(t,n,l)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();O(t)&&(t=this.languageUtils.toResolveHierarchy(t)),O(n)&&(n=[n]);const o=this.queueLoad(t,n,r,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(i=>{this.loadOne(i)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),s=r[0],o=r[1];this.read(s,o,"read",void 0,void 0,(i,l)=>{i&&this.logger.warn(`${n}loading namespace ${o} for language ${s} failed`,i),!i&&l&&this.logger.log(`${n}loaded namespace ${o} for language ${s}`,l),this.loaded(t,i,l)})}saveMissing(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const u={...i,isUpdate:o},a=this.backend.create.bind(this.backend);if(a.length<6)try{let f;a.length===5?f=a(t,n,r,s,u):f=a(t,n,r,s),f&&typeof f.then=="function"?f.then(p=>l(null,p)).catch(l):l(null,f)}catch(f){l(f)}else a(t,n,r,s,l,u)}!t||!t[0]||this.store.addResource(t[0],n,r,s)}}}const Ff=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),O(e[1])&&(t.defaultValue=e[1]),O(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Uf=e=>(O(e.ns)&&(e.ns=[e.ns]),O(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),O(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),oo=()=>{},_m=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Ir extends ro{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Uf(t),this.services={},this.logger=We,this.modules={external:[]},_m(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(O(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=Ff();this.options={...s,...this.options,...Uf(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?We.init(o(this.modules.logger),this.options):We.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=Am);const p=new If(this.options);this.store=new _f(this.options.resources,this.options);const c=this.services;c.logger=We,c.resourceStore=this.store,c.languageUtils=p,c.pluralResolver=new Tm(p,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(c.formatter=o(f),c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new jm(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new Om(o(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",function(m){for(var v=arguments.length,x=new Array(v>1?v-1:0),h=1;h<v;h++)x[h-1]=arguments[h];t.emit(m,...x)}),this.modules.languageDetector&&(c.languageDetector=o(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=o(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new so(this.services,this.options),this.translator.on("*",function(m){for(var v=arguments.length,x=new Array(v>1?v-1:0),h=1;h<v;h++)x[h-1]=arguments[h];t.emit(m,...x)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=oo),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return t.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return t.store[f](...arguments),t}});const u=Rr(),a=()=>{const f=(p,c)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(c),r(p,c)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),u}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oo;const s=O(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],i=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(a=>{a!=="cimode"&&o.indexOf(a)<0&&o.push(a)})};s?i(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>i(u)),this.options.preload&&this.options.preload.forEach(l=>i(l)),this.services.backendConnector.load(o,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(l)})}else r(null)}reloadResources(t,n,r){const s=Rr();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=oo),this.services.backendConnector.reload(t,n,o=>{s.resolve(),r(o)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Rf.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const s=Rr();this.emit("languageChanging",t);const o=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},i=(u,a)=>{a?(o(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit("languageChanged",a),this.logger.log("languageChanged",a)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(u,function(){return r.t(...arguments)})},l=u=>{!t&&!u&&this.services.languageDetector&&(u=[]);const a=O(u)?u:this.services.languageUtils.getBestMatchFromCodes(u);a&&(this.language||o(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(a)),this.loadResources(a,f=>{i(f,a)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(t),s}getFixedT(t,n,r){var s=this;const o=function(i,l){let u;if(typeof l!="object"){for(var a=arguments.length,f=new Array(a>2?a-2:0),p=2;p<a;p++)f[p-2]=arguments[p];u=s.options.overloadTranslationOptionHandler([i,l].concat(f))}else u={...l};u.lng=u.lng||o.lng,u.lngs=u.lngs||o.lngs,u.ns=u.ns||o.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||r||o.keyPrefix);const c=s.options.keySeparator||".";let m;return u.keyPrefix&&Array.isArray(i)?m=i.map(v=>`${u.keyPrefix}${c}${v}`):m=u.keyPrefix?`${u.keyPrefix}${c}${i}`:i,s.t(m,u)};return O(t)?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(l,u)=>{const a=this.services.backendConnector.state[`${l}|${u}`];return a===-1||a===0||a===2};if(n.precheck){const l=n.precheck(this,i);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,t)&&(!s||i(o,t)))}loadNamespaces(t,n){const r=Rr();return this.options.ns?(O(t)&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Rr();O(t)&&(t=[t]);const s=this.options.preload||[],o=t.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return o.length?(this.options.preload=s.concat(o),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","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"],r=this.services&&this.services.languageUtils||new If(Ff());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Ir(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oo;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},o=new Ir(s);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(l=>{o[l]=this[l]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new _f(this.store.data,s),o.services.resourceStore=o.store),o.translator=new so(o.services,s),o.translator.on("*",function(l){for(var u=arguments.length,a=new Array(u>1?u-1:0),f=1;f<u;f++)a[f-1]=arguments[f];o.emit(l,...a)}),o.init(s,n),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Vf=Ir.createInstance();Vf.createInstance=Ir.createInstance;var Rm=Vf;const zm=Rm,Bf=["af","ar","bg","bn","bs","ca","cs","da","de","de-CH","el","en","eo","es","et","eu","fa","fi","fr","gd","he","hi","hr","hu","id","is","it","ja","ko","kz","lt","lv","mk","mn","ms","nb","ne","nl","nn","pa","pl","pt","pt-BR","ro","ru","si","sk","sl","sq","sr","sr-Cyrl","sv","th","tr","uk","ur","uz","vi","zh","zh-Hant","sw","ta"];function Hf(e,t){return e.reduce((n,r)=>{let s;try{s=Ef("/ghost/i18n/lib")(`../locales/${r}/${t}.json`)}catch{s=Ef("/ghost/i18n/lib")(`../locales/en/${t}.json`)}return n[r]={[t]:{...s,...s.default&&typeof s.default=="object"?s.default:{}}},n},{})}bs.exports=(e="en",t="portal")=>{const n=zm.createInstance(),r={prefix:"{",suffix:"}"};let s=Hf(Bf,t);return n.init({lng:e,nsSeparator:!1,keySeparator:!1,returnEmptyString:!1,fallbackLng:{no:["nb","en"],default:["en"]},ns:t,defaultNS:t,interpolation:r,resources:s}),n},bs.exports.SUPPORTED_LOCALES=Bf,bs.exports.generateResources=Hf;var Im=bs.exports,Mm=Im;const Dm=pe(Mm);class Fm extends tt.Component{constructor(t){super(t);const n=this.props.locale||"en",r=Dm(n,"search"),s=r.dir()||"ltr",o=new tg({adminUrl:t.adminUrl,apiKey:t.apiKey,dir:s});this.state={searchIndex:o,showPopup:!1,indexStarted:!1,indexComplete:!1,t:r.t,dir:s,scrollbarWidth:0},this.inputRef=tt.createRef()}componentDidMount(){const t=this.getScrollbarWidth();this.setState({scrollbarWidth:t}),this.initSetup()}componentDidUpdate(t,n){var r,s,o;if(n.showPopup!==this.state.showPopup)try{this.state.showPopup?(this.bodyScroll=(o=(s=(r=window.document)==null?void 0:r.body)==null?void 0:s.style)==null?void 0:o.overflow,this.bodyMargin=window.getComputedStyle(document.body).getPropertyValue("margin-right"),window.document.body.style.overflow="hidden",this.state.scrollbarWidth&&document.body.scrollHeight>window.innerHeight&&(window.document.body.style.marginRight=`calc(${this.bodyMargin} + ${this.state.scrollbarWidth}px)`)):(window.document.body.style.overflow=this.bodyScroll||"",!this.bodyMargin||this.bodyMargin==="0px"?window.document.body.style.marginRight="":window.document.body.style.marginRight=this.bodyMargin)}catch{}this.state.showPopup!==(n==null?void 0:n.showPopup)&&!this.state.showPopup&&this.setState({searchValue:""}),this.state.showPopup&&!this.state.indexStarted&&this.setupSearchIndex()}async setupSearchIndex(){this.setState({indexStarted:!0}),await this.state.searchIndex.init(),this.setState({indexComplete:!0})}componentWillUnmount(){window.removeEventListener("hashchange",this.hashHandler,!1),window.removeEventListener("keydown",this.handleKeyDown,!1)}initSetup(){this.handleSearchUrl(),this.addKeyboardShortcuts(),this.setupCustomTriggerButton(),this.hashHandler=()=>{this.handleSearchUrl()},window.addEventListener("hashchange",this.hashHandler,!1)}getScrollbarWidth(){const t=document.createElement("div");t.style.visibility="hidden",t.style.overflow="scroll",document.body.appendChild(t);const n=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),n}setupCustomTriggerButton(){this.clickHandler=t=>{t.preventDefault(),this.setState({showPopup:!0});const n=document.createElement("input");n.style.opacity="0",n.style.position="fixed",n.style.top="0",document.body.appendChild(n),n.focus(),setTimeout(()=>{this.inputRef.current.focus(),document.body.removeChild(n)},150)},this.customTriggerButtons=this.getCustomTriggerButtons(),this.customTriggerButtons.forEach(t=>{t.removeEventListener("click",this.clickHandler),t.addEventListener("click",this.clickHandler)})}getCustomTriggerButtons(){return document.querySelectorAll("[data-ghost-search]")||[]}handleSearchUrl(){const[t]=window.location.hash.substr(1).split("?");(t==="/search"||t==="/search/")&&(this.setState({showPopup:!0}),window.history.replaceState("",document.title,window.location.pathname))}addKeyboardShortcuts(){const t=this.getCustomTriggerButtons();t!=null&&t.length&&(this.handleKeyDown=n=>{if(n.key==="k"&&n.metaKey)return this.setState({showPopup:!0}),n.preventDefault(),n.stopPropagation(),!1},document.addEventListener("keydown",this.handleKeyDown))}render(){return P.jsx(fe.Provider,{value:{page:"search",showPopup:this.state.showPopup,adminUrl:this.props.adminUrl,stylesUrl:this.props.stylesUrl,searchIndex:this.state.searchIndex,indexComplete:this.state.indexComplete,searchValue:this.state.searchValue,inputRef:this.inputRef,onAction:()=>{},dispatch:(t,n)=>{t==="update"&&this.setState({...this.state,...n})},t:this.state.t,dir:this.state.dir},children:P.jsx(Qc,{})})}}const Kf="sodo-search-root";function Um(){const e=document.createElement("div");e.id=Kf,document.body.appendChild(e)}function Vm(){const e=document.querySelector("script[data-sodo-search]");if(e){const t=e.dataset.sodoSearch,n=e.dataset.key,r=e.dataset.styles,s=e.dataset.locale||"en";return{adminUrl:t,apiKey:n,stylesUrl:r,locale:s}}return{}}function Bm(){Um()}function Hm(){var o;const{adminUrl:e,apiKey:t,stylesUrl:n,locale:r}=Vm(),s=(o=e||window.location.origin)==null?void 0:o.replace(/\/+$/,"");Bm(),fp.render(P.jsx(tt.StrictMode,{children:P.jsx(Fm,{adminUrl:s,apiKey:t,stylesUrl:n,locale:r})}),document.getElementById(Kf))}Hm();const Km=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}))});
|
|
51
51
|
//# sourceMappingURL=sodo-search.min.js.map
|