added first true commit

This commit is contained in:
liph committed 2026-05-07 14:39:10 +02:00
1 parent d8ce45f44a
commit c5605678f0
463 files changed
+175645

No files matched your search

+42
View File
@@ -0,0 +1,42 @@
{
"useCache": true,
"hideExcluded": false,
"recencyBoost": "0",
"downrankedFoldersFilters": [],
"ignoreDiacritics": true,
"ignoreArabicDiacritics": false,
"indexedFileTypes": [],
"displayTitle": "",
"PDFIndexing": false,
"officeIndexing": false,
"imagesIndexing": false,
"aiImageIndexing": false,
"unsupportedFilesIndexing": "default",
"splitCamelCase": false,
"openInNewPane": false,
"vimLikeNavigationShortcut": false,
"ribbonIcon": true,
"showExcerpt": true,
"maxEmbeds": 5,
"renderLineReturnInExcerpts": true,
"showCreateButton": false,
"highlight": true,
"showPreviousQueryResults": true,
"simpleSearch": false,
"tokenizeUrls": false,
"fuzziness": "1",
"weightBasename": 10,
"weightDirectory": 7,
"weightH1": 6,
"weightH2": 5,
"weightH3": 4,
"weightUnmarkedTags": 2,
"weightCustomProperties": [],
"httpApiEnabled": false,
"httpApiPort": "51361",
"httpApiNotice": true,
"welcomeMessage": "1.21.0",
"verboseLogging": false,
"DANGER_httpHost": null,
"DANGER_forceSaveCache": false
}
+171
View File
@@ -0,0 +1,171 @@
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var uI=Object.create;var ku=Object.defineProperty;var cI=Object.getOwnPropertyDescriptor;var lI=Object.getOwnPropertyNames;var fI=Object.getPrototypeOf,dI=Object.prototype.hasOwnProperty;var hI=(e,t,r)=>t in e?ku(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var v=(e,t)=>()=>(e&&(t=e(e=0)),t);var Mi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Nn=(e,t)=>{for(var r in t)ku(e,r,{get:t[r],enumerable:!0})},B_=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of lI(t))!dI.call(e,i)&&i!==r&&ku(e,i,{get:()=>t[i],enumerable:!(n=cI(t,i))||n.enumerable});return e};var ln=(e,t,r)=>(r=e!=null?uI(fI(e)):{},B_(t||!e||!e.__esModule?ku(r,"default",{value:e,enumerable:!0}):r,e)),$_=e=>B_(ku({},"__esModule",{value:!0}),e);var zl=(e,t,r)=>(hI(e,typeof t!="symbol"?t+"":t,r),r),hp=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var Fi=(e,t,r)=>(hp(e,t,"read from private field"),r?r.call(e):t.get(e)),Ru=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},pp=(e,t,r,n)=>(hp(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var H_=(e,t,r)=>(hp(e,t,"access private method"),r);var U_,V_=v(()=>{U_="5"});var Wn=v(()=>{V_();typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(U_)});var va,is,as,Bi,Pt,Ht,q_,z_,bt=v(()=>{va="[",is="[!",as="]",Bi={},Pt=Symbol(),Ht=Symbol("filename"),q_=Symbol("hmr"),z_="http://www.w3.org/1999/xhtml"});var Yl,Y_=v(()=>{Yl=!0});var K_,se,j_=v(()=>{K_=globalThis.process?.env?.NODE_ENV,se=K_&&!K_.toLowerCase().startsWith("prod")});var W_=v(()=>{});var mt=v(()=>{Y_();j_();W_()});var xr,ss,Lu,G_,Nt=v(()=>{xr=Symbol("$state"),ss=Symbol("$state metadata"),Lu=Symbol("legacy props"),G_=Symbol("")});function xa(e){return typeof e=="function"}function Z_(e){return e()}function os(e){for(var t=0;t<e.length;t++)e[t]()}var fn,Q_,Pu,mp,Kt,Kr,Kl,gp,X_,Ta,Ut,it=v(()=>{fn=Array.isArray,Q_=Array.prototype.indexOf,Pu=Array.from,mp=Object.keys,Kt=Object.defineProperty,Kr=Object.getOwnPropertyDescriptor,Kl=Object.getOwnPropertyDescriptors,gp=Object.prototype,X_=Array.prototype,Ta=Object.getPrototypeOf;Ut=()=>{}});function J_(){var e=Mu;Mu=[],os(e)}function eb(){var e=Fu;Fu=[],os(e)}function dn(e){Mu.length===0&&queueMicrotask(J_),Mu.push(e)}function tb(e){Fu.length===0&&pI(eb),Fu.push(e)}function _p(){Mu.length>0&&J_(),Fu.length>0&&eb()}var pI,Mu,Fu,On=v(()=>{it();pI=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback,Mu=[],Fu=[]});function jl(e){return e===this.v}function eo(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function to(e){return!eo(e,this.v)}var us=v(()=>{});function bp(){if(se){let e=new Error("bind_invalid_checkbox_value\nUsing `bind:value` together with a checkbox input is not allowed. Use `bind:checked` instead\nhttps://svelte.dev/e/bind_invalid_checkbox_value");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function rb(){if(se){let e=new Error(`derived_references_self
A derived value cannot reference itself recursively
https://svelte.dev/e/derived_references_self`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/derived_references_self")}function nb(e){if(se){let t=new Error(`effect_in_teardown
\`${e}\` cannot be used inside an effect cleanup function
https://svelte.dev/e/effect_in_teardown`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function ib(){if(se){let e=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ab(e){if(se){let t=new Error(`effect_orphan
\`${e}\` can only be used inside an effect (e.g. during component initialisation)
https://svelte.dev/e/effect_orphan`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_orphan")}function sb(){if(se){let e=new Error(`effect_update_depth_exceeded
Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops
https://svelte.dev/e/effect_update_depth_exceeded`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ob(){if(se){let e=new Error(`hydration_failed
Failed to hydrate the application
https://svelte.dev/e/hydration_failed`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/hydration_failed")}function ub(e){if(se){let t=new Error(`props_invalid_value
Cannot do \`bind:${e}={undefined}\` when \`${e}\` has a fallback value
https://svelte.dev/e/props_invalid_value`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/props_invalid_value")}function cb(e){if(se){let t=new Error(`rune_outside_svelte
The \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
https://svelte.dev/e/rune_outside_svelte`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function lb(){if(se){let e=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function fb(){if(se){let e=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function db(){if(se){let e=new Error("state_unsafe_local_read\nReading state that was created inside the same derived is forbidden. Consider using `untrack` to read locally created state\nhttps://svelte.dev/e/state_unsafe_local_read");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function hb(){if(se){let e=new Error("state_unsafe_mutation\nUpdating state inside a derived or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}var hn=v(()=>{mt()});function pb(){gi=!0}var gi,_i,$i=v(()=>{gi=!1,_i=!1});var Ep=v(()=>{mt()});var Bu=v(()=>{mt();Ep();it()});function Hi(e){let t=Error(),r=t.stack;if(r){let n=r.split(`
`),i=[`
`];for(let a=0;a<n.length;a++){let u=n[a];if(u!=="Error"){if(u.includes("validate_each_keys"))return null;u.includes("svelte/src/internal")||i.push(u)}}if(i.length===1)return null;Kt(t,"stack",{value:i.join(`
`)}),Kt(t,"name",{value:`${e}Error`})}return t}var $u,ro=v(()=>{bt();Bu();it();Nt();He();Ge();$u=null});function yp(e){cs=e}function Mt(e,t){var r={f:0,v:e,reactions:null,equals:jl,rv:0,wv:0};return se&&_i&&(r.created=t??Hi("CreatedAt"),r.debug=null),r}function Xn(e){return gb(Mt(e))}function bi(e,t=!1){let r=Mt(e);return t||(r.equals=to),gi&&Pe!==null&&Pe.l!==null&&(Pe.l.s??=[]).push(r),r}function ft(e,t=!1){return gb(bi(e,t))}function gb(e){return $e!==null&&!gn&&$e.f&2&&(Gn===null?bb([e]):Gn.push(e)),e}function oe(e,t){return $e!==null&&!gn&&Ei()&&$e.f&18&&(Gn===null||!Gn.includes(e))&&hb(),io(e,t)}function io(e,t){if(!e.equals(t)){var r=e.v;if(fs?no.set(e,t):no.set(e,r),e.v=t,e.wv=Uu(),se&&_i&&(e.updated=Hi("UpdatedAt"),Oe!=null&&(e.trace_need_increase=!0,e.trace_v??=r)),_b(e,2048),Ei()&&Oe!==null&&Oe.f&1024&&!(Oe.f&96)&&(pn===null?Eb([e]):pn.push(e)),se&&cs.size>0){let n=Array.from(cs);for(let i of n)i.f&1024&&Ar(i,4096),Vi(i)&&ds(i);cs.clear()}}return t}function _b(e,t){var r=e.reactions;if(r!==null)for(var n=Ei(),i=r.length,a=0;a<i;a++){var u=r[a],l=u.f;if(!(l&2048)&&!(!n&&u===Oe)){if(se&&l&262144){cs.add(u);continue}Ar(u,t),l&1280&&(l&2?_b(u,4096):ao(u))}}}var cs,no,yr=v(()=>{mt();Ge();us();Nt();hn();$i();ro();Ot();cs=new Set,no=new Map});function kn(e){var t=2050,r=$e!==null&&$e.f&2?$e:null;Oe===null||r!==null&&r.f&256?t|=256:Oe.f|=1048576;let n={ctx:Pe,deps:null,effects:null,equals:jl,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:r??Oe};return se&&_i&&(n.created=Hi("CreatedAt")),n}function Br(e){let t=kn(e);return t.equals=to,t}function Wl(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)lr(t[r])}}function mI(e){for(var t=e.parent;t!==null;){if(!(t.f&2))return t;t=t.parent}return null}function gI(e){var t,r=Oe;if(Wt(mI(e)),se){let n=cs;yp(new Set);try{Ap.includes(e)&&rb(),Ap.push(e),Wl(e),t=Gl(e)}finally{Wt(r),yp(n),Ap.pop()}}else try{Wl(e),t=Gl(e)}finally{Wt(r)}return t}function Sp(e){var t=gI(e),r=(qi||e.f&256)&&e.deps!==null?4096:1024;Ar(e,r),e.equals(t)||(e.v=t,e.wv=Uu())}var Ap,hs=v(()=>{mt();Nt();Ge();us();hn();He();yr();ro();$i();Ot();Ap=[]});function vb(e,t,r){se?console.warn(`%c[svelte] hydration_attribute_changed
%cThe \`${e}\` attribute on \`${t}\` changed its value between server and client renders. The client value, \`${r}\`, will be ignored in favour of the server value
https://svelte.dev/e/hydration_attribute_changed`,so,oo):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function Tb(e){se?console.warn(`%c[svelte] hydration_html_changed
%c${e?`The value of an \`{@html ...}\` block ${e} changed between server and client renders. The client value will be ignored in favour of the server value`:"The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}
https://svelte.dev/e/hydration_html_changed`,so,oo):console.warn("https://svelte.dev/e/hydration_html_changed")}function ps(e){se?console.warn(`%c[svelte] hydration_mismatch
%c${e?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${e}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
https://svelte.dev/e/hydration_mismatch`,so,oo):console.warn("https://svelte.dev/e/hydration_mismatch")}function xb(){se?console.warn(`%c[svelte] lifecycle_double_unmount
%cTried to unmount a component that was not mounted
https://svelte.dev/e/lifecycle_double_unmount`,so,oo):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function Cp(e,t){se?console.warn(`%c[svelte] ownership_invalid_mutation
%c${e?`${e} mutated a value owned by ${t}. This is strongly discouraged. Consider passing values to child components with \`bind:\`, or use a callback instead`:"Mutating a value outside the component that created it is strongly discouraged. Consider passing values to child components with `bind:`, or use a callback instead"}
https://svelte.dev/e/ownership_invalid_mutation`,so,oo):console.warn("https://svelte.dev/e/ownership_invalid_mutation")}function Ql(e){se?console.warn(`%c[svelte] state_proxy_equality_mismatch
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${e}\` will produce unexpected results
https://svelte.dev/e/state_proxy_equality_mismatch`,so,oo):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var so,oo,Wr=v(()=>{mt();so="font-weight: bold",oo="font-weight: normal"});function $r(e){ge=e}function wt(e){if(e===null)throw ps(),Bi;return De=e}function Vt(){return wt(fr(De))}function Te(e){if(ge){if(fr(De)!==null)throw ps(),Bi;De=e}}function wr(e=1){if(ge){for(var t=e,r=De;t--;)r=fr(r);De=r}}function uo(){for(var e=0,t=De;;){if(t.nodeType===8){var r=t.data;if(r===as){if(e===0)return t;e-=1}else(r===va||r===is)&&(e+=1)}var n=fr(t);t.remove(),t=n}}var ge,De,Et=v(()=>{bt();Wr();Gr();ge=!1});function er(e,t=null,r){var n=null;if(se&&_i&&(n=Hi("CreatedAt")),typeof e!="object"||e===null||xr in e)return e;let i=Ta(e);if(i!==gp&&i!==X_)return e;var a=new Map,u=fn(e),l=Mt(0);u&&a.set("length",Mt(e.length,n));var d;if(se)if(d={parent:t,owners:null},r){let p=r.v?.[ss]?.owners;d.owners=p?new Set(p):null}else d.owners=t===null?Pe!==null?new Set([Pe.function]):null:new Set;return new Proxy(e,{defineProperty(p,g,E){(!("value"in E)||E.configurable===!1||E.enumerable===!1||E.writable===!1)&&lb();var _=a.get(g);return _===void 0?(_=Mt(E.value,n),a.set(g,_)):oe(_,er(E.value,d)),!0},deleteProperty(p,g){var E=a.get(g);if(E===void 0)g in p&&a.set(g,Mt(Pt,n));else{if(u&&typeof g=="string"){var _=a.get("length"),y=Number(g);Number.isInteger(y)&&y<_.v&&oe(_,y)}oe(E,Pt),yb(l)}return!0},get(p,g,E){if(se&&g===ss)return d;if(g===xr)return e;var _=a.get(g),y=g in p;if(_===void 0&&(!y||Kr(p,g)?.writable)&&(_=Mt(er(y?p[g]:Pt,d),n),a.set(g,_)),_!==void 0){var C=q(_);if(se){var D=C?.[ss];D&&D?.parent!==d&&Ip(d,D)}return C===Pt?void 0:C}return Reflect.get(p,g,E)},getOwnPropertyDescriptor(p,g){var E=Reflect.getOwnPropertyDescriptor(p,g);if(E&&"value"in E){var _=a.get(g);_&&(E.value=q(_))}else if(E===void 0){var y=a.get(g),C=y?.v;if(y!==void 0&&C!==Pt)return{enumerable:!0,configurable:!0,value:C,writable:!0}}return E},has(p,g){if(se&&g===ss||g===xr)return!0;var E=a.get(g),_=E!==void 0&&E.v!==Pt||Reflect.has(p,g);if(E!==void 0||Oe!==null&&(!_||Kr(p,g)?.writable)){E===void 0&&(E=Mt(_?er(p[g],d):Pt,n),a.set(g,E));var y=q(E);if(y===Pt)return!1}return _},set(p,g,E,_){var y=a.get(g),C=g in p;if(u&&g==="length")for(var D=E;D<y.v;D+=1){var P=a.get(D+"");P!==void 0?oe(P,Pt):D in p&&(P=Mt(Pt,n),a.set(D+"",P))}if(y===void 0?(!C||Kr(p,g)?.writable)&&(y=Mt(void 0,n),oe(y,er(E,d)),a.set(g,y)):(C=y.v!==Pt,oe(y,er(E,d))),se){var N=E?.[ss];N&&N?.parent!==d&&Ip(d,N),Ab(d)}var L=Reflect.getOwnPropertyDescriptor(p,g);if(L?.set&&L.set.call(_,E),!C){if(u&&typeof g=="string"){var H=a.get("length"),R=Number(g);Number.isInteger(R)&&R>=H.v&&oe(H,R+1)}yb(l)}return!0},ownKeys(p){q(l);var g=Reflect.ownKeys(p).filter(y=>{var C=a.get(y);return C===void 0||C.v!==Pt});for(var[E,_]of a)_.v!==Pt&&!(E in p)&&g.push(E);return g},setPrototypeOf(){fb()}})}function yb(e,t=1){oe(e,e.v+t)}function Xl(e){return e!==null&&typeof e=="object"&&xr in e?e[xr]:e}var co=v(()=>{mt();Ge();Ot();it();Vu();yr();Nt();bt();hn();ro();$i()});function wb(){let e=Array.prototype,t=Array.__svelte_cleanup;t&&t();let{indexOf:r,lastIndexOf:n,includes:i}=e;e.indexOf=function(a,u){let l=r.call(this,a,u);if(l===-1){for(let d=u??0;d<this.length;d+=1)if(Xl(this[d])===a){Ql("array.indexOf(...)");break}}return l},e.lastIndexOf=function(a,u){let l=n.call(this,a,u??this.length-1);if(l===-1){for(let d=0;d<=(u??this.length-1);d+=1)if(Xl(this[d])===a){Ql("array.lastIndexOf(...)");break}}return l},e.includes=function(a,u){let l=i.call(this,a,u);if(!l){for(let d=0;d<this.length;d+=1)if(Xl(this[d])===a){Ql("array.includes(...)");break}}return l},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=i}}var Np=v(()=>{Wr();co()});function Zl(){if(Op===void 0){Op=window,Sb=document,qu=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype;Cb=Kr(t,"firstChild").get,Ib=Kr(t,"nextSibling").get,e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0,Text.prototype.__t=void 0,se&&(e.__svelte_meta=null,wb())}}function Qr(e=""){return document.createTextNode(e)}function qt(e){return Cb.call(e)}function fr(e){return Ib.call(e)}function xe(e,t){if(!ge)return qt(e);var r=qt(De);if(r===null)r=De.appendChild(Qr());else if(t&&r.nodeType!==3){var n=Qr();return r?.before(n),wt(n),n}return wt(r),r}function Sr(e,t){if(!ge){var r=qt(e);return r instanceof Comment&&r.data===""?fr(r):r}if(t&&De?.nodeType!==3){var n=Qr();return De?.before(n),wt(n),n}return De}function Ye(e,t=1,r=!1){let n=ge?De:e;for(var i;t--;)i=n,n=fr(n);if(!ge)return n;var a=n?.nodeType;if(r&&a!==3){var u=Qr();return n===null?i?.after(u):n.before(u),wt(u),u}return wt(n),n}function zu(e){e.textContent=""}var Op,Sb,qu,Cb,Ib,Gr=v(()=>{Et();mt();Np();it()});function Rp(e){fs=e}function tr(e){$e=e}function Wt(e){Oe=e}function bb(e){Gn=e}function Eb(e){pn=e}function Uu(){return++Lb}function Vi(e){var t=e.f;if(t&2048)return!0;if(t&4096){var r=e.deps,n=(t&256)!==0;if(r!==null){var i,a,u=( Line truncated
${i.map(g=>`
${d}in ${g}`).join("")}
`}),Kt(e,"component_stack",{value:i});let p=e.stack;if(p){let g=p.split(`
`),E=[];for(let _=0;_<g.length;_++){let y=g[_];y.includes("svelte/src/internal")||E.push(y)}Kt(e,"stack",{value:E.join(`
`)})}if(Ob(e,t),Db(t))throw e}function Pb(e,t,r=!0){var n=e.reactions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];a.f&2?Pb(a,t,!1):t===a&&(r?Ar(a,2048):a.f&1024&&Ar(a,4096),ao(a))}}function Gl(e){var t=Hr,r=bn,n=pn,i=$e,a=qi,u=Gn,l=Pe,d=gn,p=e.f;Hr=null,bn=0,pn=null,qi=(p&256)!==0&&(gn||!ms||$e===null),$e=p&96?null:e,Gn=null,Gu(e.ctx),gn=!1,rf++;try{var g=(0,e.fn)(),E=e.deps;if(Hr!==null){var _;if(Wu(e,bn),E!==null&&bn>0)for(E.length=bn+Hr.length,_=0;_<Hr.length;_++)E[bn+_]=Hr[_];else e.deps=E=Hr;if(!qi)for(_=bn;_<E.length;_++)(E[_].reactions??=[]).push(e)}else E!==null&&bn<E.length&&(Wu(e,bn),E.length=bn);if(Ei()&&pn!==null&&!gn&&E!==null&&!(e.f&6146))for(_=0;_<pn.length;_++)Pb(pn[_],e);return i!==null&&(rf++,pn!==null&&(n===null?n=pn:n.push(...pn))),g}finally{Hr=t,bn=r,pn=n,$e=i,qi=a,Gn=u,Gu(l),gn=d}}function _I(e,t){let r=t.reactions;if(r!==null){var n=Q_.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}r===null&&t.f&2&&(Hr===null||!Hr.includes(t))&&(Ar(t,4096),t.f&768||(t.f^=512),Wl(t),Wu(t,0))}function Wu(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)_I(e,r[n])}function ds(e){var t=e.f;if(!(t&16384)){Ar(e,1024);var r=Oe,n=Pe,i=ms;if(Oe=e,ms=!0,se){var a=Xr;Qu(e.component_function)}try{t&16?Mb(e):Pp(e),Lp(e);var u=Gl(e);e.teardown=typeof u=="function"?u:null,e.wv=Lb;var l=e.deps;if(se&&_i&&e.f&2048&&l!==null)for(let p=0;p<l.length;p++){var d=l[p];d.trace_need_increase&&(d.wv=Uu(),d.trace_need_increase=void 0,d.trace_v=void 0)}se&&tf.push(e)}catch(p){fo(p,e,r,n||e.ctx)}finally{ms=i,Oe=r,se&&Qu(a)}}}function kb(){console.error("Last ten effects were: ",tf.slice(-10).map(e=>e.fn)),tf=[]}function bI(){try{sb()}catch(e){if(se&&Kt(e,"stack",{value:""}),Yu!==null)if(se)try{fo(e,Yu,null,null)}catch(t){throw kb(),t}else fo(e,Yu,null,null);else throw se&&kb(),e}}function Dp(){var e=ms;try{var t=0;for(ms=!0;Ku.length>0;){t++>1e3&&bI();var r=Ku,n=r.length;Ku=[];for(var i=0;i<n;i++){var a=vI(r[i]);EI(a)}}}finally{ju=!1,ms=e,Yu=null,se&&(tf=[]),no.clear()}}function EI(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var n=e[r];if(!(n.f&24576))try{Vi(n)&&(ds(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Mp(n):n.fn=null))}catch(i){fo(i,n,null,n.ctx)}}}function ao(e){ju||(ju=!0,queueMicrotask(Dp));for(var t=Yu=e;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024))return;t.f^=1024}}Ku.push(t)}function vI(e){for(var t=[],r=e;r!==null;){var n=r.f,i=(n&96)!==0,a=i&&(n&1024)!==0;if(!a&&!(n&8192)){if(n&4)t.push(r);else if(i)r.f^=1024;else{var u=$e;try{$e=r,Vi(r)&&ds(r)}catch(p){fo(p,r,null,r.ctx)}finally{$e=u}}var l=r.first;if(l!==null){r=l;continue}}var d=r.parent;for(r=r.next;r===null&&d!==null;)r=d.next,d=d.parent}return t}function ho(e){var t;for(e&&(ju=!0,Dp(),t=e()),_p();Ku.length>0;)ju=!0,Dp(),_p();return t}async function vi(){await Promise.resolve(),ho()}function q(e){var t=e.f,r=(t&2)!==0;if(Hu!==null&&Hu.add(e),$e!==null&&!gn){Gn!==null&&Gn.includes(e)&&db();var n=$e.deps;e.rv<rf&&(e.rv=rf,Hr===null&&n!==null&&n[bn]===e?bn++:Hr===null?Hr=[e]:(!qi||!Hr.includes(e))&&Hr.push(e))}else if(r&&e.deps===null&&e.effects===null){var i=e,a=i.parent;a!==null&&!(a.f&256)&&(i.f^=256)}if(r&&(i=e,Vi(i)&&Sp(i)),se&&_i&&$u!==null&&$e!==null&&$u.reaction===$e){if(e.debug)e.debug();else if(e.created){var u=$u.entries.get(e);u===void 0&&(u={read:[]},$u.entries.set(e,u)),u.read.push(Hi("TracedAt"))}}return fs&&no.has(e)?no.get(e):e.v}function at(e){var t=gn;try{return gn=!0,e()}finally{gn=t}}function Ar(e,t){e.f=e.f&TI|t}function vt(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(xr in e)nf(e);else if(!Array.isArray(e))for(let t in e){let r=e[t];typeof r=="object"&&r&&xr in r&&nf(r)}}}function nf(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{nf(e[n],t)}catch{}let r=Ta(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){let n=Kl(r);for(let i in n){let a=n[i].get;if(a)try{a.call(e)}catch{}}}}}var Nb,Jl,ju,Yu,ms,fs,Ku,tf,$e,gn,Oe,Gn,Hr,bn,pn,Lb,rf,qi,Hu,TI,Ge=v(()=>{mt();it();He();Nt();On();yr();hs();hn();bt();$i();ro();Ot();Gr();Nb=new WeakSet,Jl=!1,ju=!1,Yu=null,ms=!1,fs=!1;Ku=[],tf=[],$e=null,gn=!1;Oe=null;Gn=null;Hr=null,bn=0,pn=null;Lb=1,rf=0,qi=!1,Hu=null;TI=-7169});function Bp(e){Oe===null&&$e===null&&ab(e),$e!==null&&$e.f&256&&Oe===null&&ib(),fs&&nb(e)}function xI(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function gs(e,t,r,n=!0){var i=Oe;if(se)for(;i!==null&&i.f&262144;)i=i.parent;var a={ctx:Pe,deps:null,nodes_start:null,nodes_end:null,f:e|2048,first:null,fn:t,last:null,next:null,parent:i,prev:null,teardown:null,transitions:null,wv:0};if(se&&(a.component_function=Xr),r)try{ds(a),a.f|=32768}catch(d){throw lr(a),d}else t!==null&&ao(a);var u=r&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&1048704)===0;if(!u&&n&&(i!==nu Line truncated
`)){let n=AI.exec(r)??wI.exec(r);n&&t.push({file:n[1],line:+n[2],column:+n[3]})}return t}function Hb(){let e=SI()?.slice(4);if(!e)return null;for(let t=0;t<e.length;t++){let r=e[t],n=yI[r.file];if(!n){if(t===0)return null;continue}for(let i of n){if(i.end==null)return null;if(i.start.line<r.line&&i.end.line>r.line)return i.component}}return null}function Ip(e,t){if(t.owners!==null)for(;e;){if(e.owners===null){t.owners=null;break}for(let r of e.owners)t.owners.add(r);e=e.parent}}function Ub(e,t){return e.owners===null?!0:e.owners.has(t)||Ht in t&&[...e.owners].some(r=>r[Ht]===t[Ht])||e.parent!==null&&Ub(e.parent,t)}function Vb(e){return e?.owners?.values().next().value??Vb(e.parent)}function Ab(e){if(II)return;let t=Hb();if(t&&!Ub(e,t)){let r=Vb(e);r[Ht]!==t[Ht]?Cp(t[Ht],r[Ht]):Cp()}}var yI,AI,wI,CI,II,Vu=v(()=>{Nt();He();Ot();it();Wr();bt();yI={},AI=/at (?:.+ \()?(.+):(\d+):(\d+)\)?$/,wI=/@(.+):(\d+):(\d+)$/;CI=Symbol("ADD_OWNER");II=!1});function mo(e){if(se){let t=new Error(`lifecycle_outside_component
\`${e}(...)\` can only be used during component initialisation
https://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var go=v(()=>{mt()});function Gu(e){Pe=e}function Qu(e){Xr=e}function dr(e,t=!1,r){var n=Pe={p:Pe,c:null,d:!1,e:null,m:!1,s:e,x:null,l:null};gi&&!t&&(Pe.l={s:null,u:null,r1:[],r2:Mt(!1)}),Cr(()=>{n.d=!0}),se&&(Pe.function=r,Xr=r)}function hr(e){let t=Pe;if(t!==null){e!==void 0&&(t.x=e);let u=t.e;if(u!==null){var r=Oe,n=$e;t.e=null;try{for(var i=0;i<u.length;i++){var a=u[i];Wt(a.effect),tr(a.reaction),Gt(a.fn)}}finally{Wt(r),tr(n)}}Pe=t.p,se&&(Xr=t.p?.function??null),t.m=!0}return e||{}}function Ei(){return!gi||Pe!==null&&Pe.l===null}var Pe,Xr,Ot=v(()=>{mt();Vu();go();yr();Ge();He();$i();Pe=null;Xr=null});function qb(e){e=e.replace(DI,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}function zb(e){return RI.includes(e)}function Hp(e){return e?.replace(/\//g,"/\u200B")}var DI,kI,mB,RI,_s=v(()=>{DI=/\r/g;kI=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"],mB=[...kI,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"],RI=["touchstart","touchmove"]});var Yb=v(()=>{_s();Ge();Wr()});var Up=v(()=>{});var Kb=v(()=>{bt();Et()});function uf(){jb||(jb=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t.__on_r?.()})},{capture:!0}))}var jb,cf=v(()=>{Et();Gr();On();jb=!1});function _o(e){var t=$e,r=Oe;tr(null),Wt(null);try{return e()}finally{tr(t),Wt(r)}}function Vp(e,t,r,n=r){e.addEventListener(t,()=>_o(r));let i=e.__on_r;i?e.__on_r=()=>{i(),n(!0)}:e.__on_r=()=>n(!0),uf()}var xi=v(()=>{He();Ge();cf()});function Gb(e,t,r,n={}){function i(a){if(n.capture||bo.call(t,a),!a.cancelBubble)return _o(()=>r?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?dn(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function pr(e,t,r,n,i){var a={capture:n,passive:i},u=Gb(e,t,r,a);(t===document.body||t===window||t===document)&&Cr(()=>{t.removeEventListener(e,u,a)})}function bo(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],a=i[0]||e.target,u=0,l=e.__root;if(l){var d=i.indexOf(l);if(d!==-1&&(t===document||t===window)){e.__root=t;return}var p=i.indexOf(t);if(p===-1)return;d<=p&&(u=d)}if(a=i[u]||e.target,a!==t){Kt(e,"currentTarget",{configurable:!0,get(){return a||r}});var g=$e,E=Oe;tr(null),Wt(null);try{for(var _,y=[];a!==null;){var C=a.assignedSlot||a.parentNode||a.host||null;try{var D=a["__"+n];if(D!=null&&(!a.disabled||e.target===a))if(fn(D)){var[P,...N]=D;P.apply(a,[e,...N])}else D.call(a,e)}catch(L){_?y.push(L):_=L}if(e.cancelBubble||C===t||C===null)break;a=C}if(_){for(let L of y)queueMicrotask(()=>{throw L});throw _}}finally{e.__root=t,delete e.currentTarget,tr(g),Wt(E)}}}var Wb,qp,Zu=v(()=>{He();it();Et();On();bt();Wr();Ge();xi();Wb=new Set,qp=new Set});function Qb(){LI=void 0}var LI,zp=v(()=>{Et();Gr();He();Nt();bt()});function Ju(e){var t=document.createElement("template");return t.innerHTML=e,t.content}var lf=v(()=>{});function Zr(e,t){var r=Oe;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function Le(e,t){var r=(t&1)!==0,n=(t&2)!==0,i,a=!e.startsWith("<!>");return()=>{if(ge)return Zr(De,null),De;i===void 0&&(i=Ju(a?e:"<!>"+e),r||(i=qt(i)));var u=n||qu?document.importNode(i,!0):i.cloneNode(!0);if(r){var l=qt(u),d=u.lastChild;Zr(l,d)}else Zr(u,u);return u}}function ec(e=""){if(!ge){var t=Qr(e+"");return Zr(t,t),t}var r=De;return r.nodeType!==3&&(r.before(r=Qr()),wt(r)),Zr(r,r),r}function zi(){if(ge)return Zr(De,null),De;var e=document.createDocumentFragment(),t=document.createComment(""),r=Qr();return e.append(t,r),Zr(t,r),e}function we(e,t){if(ge){Oe.nodes_end=De,Vt();return}e!==null&&e.before(t)}var bs=v(()=>{Et();Gr();lf();Ge();bt()});function ir(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??=e.nodeValue)&&(e.__t=r,e.nodeValue=r+"")}function Es(e,t){return Xb(e,t)}function Kp(e,t){Zl(),t.intro=t.intro??!1;let r=t.target,n=ge,i=De;try{for(var a=qt(r);a&&(a.nodeType!==8||a.data!==va);)a=fr(a);if(!a)throw Bi;$r(!0),wt(a),Vt();let u=Xb(e,{...t,anchor:a});if(De===null||De.nodeType!==8||De.data!==as)throw ps(),Bi;return $r(!1),u}catch(u){if(u===Bi)return t.recover===!1&&ob(),Zl(),zu(r),$r(!1),Es(e,t);throw u}finally{$r(n),wt(i),Qb()}}function Xb(e,{target:t,anchor:r,props:n={},events:i,context:a,intro:u=!0}){Zl();var l=new Set,d=E=>{for(var _=0;_<E.length;_++){var y=E[_];if(!l.has(y)){l.add(y);var C=zb(y);t.addEventListener(y,bo,{passive:C});v Line truncated
\r\f\xA0\v\uFEFF`]});function Ki(e,t,r,n,i,a){var u=e.__className;if(ge||u!==r){var l=vE(r,n,a);(!ge||l!==e.getAttribute("class"))&&(l==null?e.removeAttribute("class"):t?e.className=l:e.setAttribute("class",l)),e.__className=r}else if(a&&i!==a)for(var d in a){var p=!!a[d];(i==null||p!==!!i[d])&&e.classList.toggle(d,p)}return a}var Zp=v(()=>{ic();Et()});function Jp(e,t={},r,n){for(var i in r){var a=r[i];t[i]!==a&&(r[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,n))}}function ac(e,t,r,n){var i=e.__style;if(ge||i!==t){var a=TE(t,n);(!ge||a!==e.getAttribute("style"))&&(a==null?e.removeAttribute("style"):e.style.cssText=a),e.__style=t}else n&&(Array.isArray(n)?(Jp(e,r?.[0],n[0]),Jp(e,r?.[1],n[1],"important")):Jp(e,r,n));return n}var em=v(()=>{ic();Et()});function rm(e){if(ge){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;ji(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var i=e.checked;ji(e,"checked",null),e.checked=i}}};e.__on_r=r,tb(r),uf()}}function ji(e,t,r,n){var i=XI(e);if(ge&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")){n||JI(e,t,r??"");return}i[t]!==(i[t]=r)&&(t==="loading"&&(e[G_]=r),r==null?e.removeAttribute(t):typeof r!="string"&&ZI(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function XI(e){return e.__attributes??={[GI]:e.nodeName.includes("-"),[QI]:e.namespaceURI===z_}}function ZI(e){var t=xE.get(e.nodeName);if(t)return t;xE.set(e.nodeName,t=[]);for(var r,n=e,i=Element.prototype;i!==n;){r=Kl(n);for(var a in r)r[a].set&&t.push(a);n=Ta(n)}return t}function JI(e,t,r){se&&(t==="srcset"&&e3(e,r)||tm(e.getAttribute(t)??"",r)||vb(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(r)))}function tm(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function yE(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function e3(e,t){var r=yE(e.srcset),n=yE(t);return n.length===r.length&&n.every(([i,a],u)=>a===r[u][1]&&(tm(r[u][0],i)||tm(i,r[u][0])))}var jI,WI,GI,QI,xE,AE=v(()=>{mt();Et();it();Zu();cf();Wr();Nt();On();_s();Ge();ic();Zp();em();bt();jI=Symbol("class"),WI=Symbol("style"),GI=Symbol("is custom element"),QI=Symbol("is html");xE=new Map});var t3,ei,nm=v(()=>{it();mt();t3=Yl?()=>performance.now():()=>Date.now(),ei={tick:e=>(Yl?requestAnimationFrame:Ut)(e),now:()=>t3(),tasks:new Set}});function wE(){let e=ei.now();ei.tasks.forEach(t=>{t.c(e)||(ei.tasks.delete(t),t.f())}),ei.tasks.size!==0&&ei.tick(wE)}function SE(e){let t;return ei.tasks.size===0&&ei.tick(wE),{promise:new Promise(r=>{ei.tasks.add(t={c:e,f:r})}),abort(){ei.tasks.delete(t)}}}var CE=v(()=>{nm()});function hf(e,t){_o(()=>{e.dispatchEvent(new CustomEvent(t))})}function a3(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;let t=e.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("")}function IE(e){let t={},r=e.split(";");for(let n of r){let[i,a]=n.split(":");if(!i||a===void 0)break;let u=a3(i.trim());t[u]=a.trim()}return t}function am(e,t,r,n){var i=(e&1)!==0,a=(e&2)!==0,u=i&&a,l=(e&4)!==0,d=u?"both":i?"in":"out",p,g=t.inert,E=t.style.overflow,_,y;function C(){var H=$e,R=Oe;tr(null),Wt(null);try{return p??=r()(t,n?.()??{},{direction:d})}finally{tr(H),Wt(R)}}var D={is_global:l,in(){if(t.inert=g,!i){y?.abort(),y?.reset?.();return}a||_?.abort(),hf(t,"introstart"),_=im(t,C(),y,1,()=>{hf(t,"introend"),_?.abort(),_=p=void 0,t.style.overflow=E})},out(H){if(!a){H?.(),p=void 0;return}t.inert=!0,hf(t,"outrostart"),y=im(t,C(),_,0,()=>{hf(t,"outroend"),H?.()})},stop:()=>{_?.abort(),y?.abort()}},P=Oe;if((P.transitions??=[]).push(D),i&&ff){var N=l;if(!N){for(var L=P.parent;L&&L.f&65536;)for(;(L=L.parent)&&!(L.f&16););N=!L||(L.f&32768)!==0}N&&Gt(()=>{at(()=>D.in())})}}function im(e,t,r,n,i){var a=n===1;if(xa(t)){var u,l=!1;return dn(()=>{if(!l){var P=t({direction:a?"in":"out"});u=im(e,P,r,n,i)}}),{abort:()=>{l=!0,u?.abort()},deactivate:()=>u.deactivate(),reset:()=>u.reset(),t:()=>u.t()}}if(r?.deactivate(),!t?.duration)return i(),{abort:Ut,deactivate:Ut,reset:Ut,t:()=>n};let{delay:d=0,css:p,tick:g,easing:E=s3}=t;var _=[];if(a&&r===void 0&&(g&&g(0,1),p)){var y=IE(p(0,1));_.push(y,y)}var C=()=>1-n,D=e.animate(_,{duration:d});return D.onfinish=()=>{var P=r?.t()??1-n;r?.abort();var N=n-P,L=t.duration*Math.abs(N),H=[];if(L>0){var R=!1;if(p)for(var B=Math.ceil(L/16.666666666666668),V=0;V<=B;V+=1){var X=P+N*E(V/B),ce=IE(p(X,1-X));H.push(ce),R||=ce.overflow==="hidden"}R&&(e.style.overflow="hidden"),C=()=>{var ve=D.currentTime;return P+N*E(ve/L)},g&&SE(()=>{if(D.playState!=="running")return!1;var ve=C();return g(ve,1-ve),!0})}D=e.animate(H,{duration:L,fill:"forwards"}),D.onfinish=()=>{C=()=>n,g?.(n,1-n),i()}},{abort:()=>{D&&(D.cancel(),D.effect=null,D.onfinish=Ut)},deactivate:()=>{i=Ut},reset:()=>{n===0&&g?.(1,0)},t:()=>C()}}var s3,NE=v(()=>{it();He();Ge();CE();vs();df();bt();Nt();On();xi();s3=e=>e});var OE=v(()=>{xi()});function um( Line truncated
Enable this option to completely hide them.`).addToggle(i=>i.setValue(t.hideExcluded).onChange(async a=>{t.hideExcluded=a,await ke(e)})),new tn.Setting(r).setName("Folders to downrank in search results").setDesc("Folders to downrank in search results. Files in these folders will be downranked in results. They will still be indexed for tags, unlike excluded files. Folders should be comma delimited.").addText(i=>{i.setValue(t.downrankedFoldersFilters.join(",")).setPlaceholder("Example: src,p2/dir").onChange(async a=>{let u=a.split(",");u=u.map(l=>l.trim()),t.downrankedFoldersFilters=u,await ke(e)})}),new tn.Setting(r).setName("Split CamelCaseWords").setDesc(ar(`Enable this if you want to be able to search for CamelCaseWords as separate words.<br/>
\u26A0\uFE0F <span style="color: var(--text-accent)">Changing this setting will clear the cache.</span><br>
${Ao}`)).addToggle(i=>i.setValue(t.splitCamelCase).onChange(async a=>{await n.clearCache(),t.splitCamelCase=a,await ke(e)})),new tn.Setting(r).setName("Simpler search").setDesc(`Enable this if Obsidian often freezes while making searches.
Words shorter than 3 characters won't be used as prefixes; this can reduce search delay but will return fewer results.`).addToggle(i=>i.setValue(t.simpleSearch).onChange(async a=>{t.simpleSearch=a,await ke(e)})),tn.Platform.isIosApp||new tn.Setting(r).setName("Tokenize URLs").setDesc(`Enable this if you want to be able to search for URLs as separate words.
This setting has a strong impact on indexing performance, and can crash Obsidian under certain conditions.`).addToggle(i=>i.setValue(t.tokenizeUrls).onChange(async a=>{t.tokenizeUrls=a,await ke(e)})),new tn.Setting(r).setName("Open in new pane").setDesc("Open and create files in a new pane instead of the current pane.").addToggle(i=>i.setValue(t.openInNewPane).onChange(async a=>{t.openInNewPane=a,await ke(e)})),new tn.Setting(r).setName("Set Vim like navigation keys").setDesc(`Navigate down the results with ${vn()} + J/N, or navigate up with ${vn()} + K/P.`).addToggle(i=>i.setValue(t.vimLikeNavigationShortcut).onChange(async a=>{t.vimLikeNavigationShortcut=a,await ke(e)})),new tn.Setting(r).setName("Fuzziness").setDesc("Define the level of fuzziness for the search. The higher the fuzziness, the more results you'll get.").addDropdown(i=>i.addOptions({0:"Exact match",1:"Not too fuzzy",2:"Fuzzy enough"}).setValue(t.fuzziness).onChange(async a=>{["0","1","2"].includes(a)||(a="2"),t.fuzziness=a,await ke(e)}))}var tn,Tv=v(()=>{tn=require("obsidian");mr();mr();Nr()});function xv(e,t,r){let n=e.database;new Si.Setting(r).setName("Danger Zone").setHeading(),new Si.Setting(r).setName("Ignore diacritics").setDesc(ar(`Normalize diacritics in search terms. Words like "br\xFBl\xE9e" or "\u017Elu\u0165ou\u010Dk\xFD" will be indexed as "brulee" and "zlutoucky".<br/>
\u26A0\uFE0F <span style="color: var(--text-accent)">You probably should <strong>NOT</strong> disable this.</span><br>
\u26A0\uFE0F <span style="color: var(--text-accent)">Changing this setting will clear the cache.</span><br>
${Ao}`)).addToggle(a=>a.setValue(t.ignoreDiacritics).onChange(async u=>{await n.clearCache(),t.ignoreDiacritics=u,await ke(e)})),new Si.Setting(r).setName("Ignore Arabic diacritics (beta)").addToggle(a=>a.setValue(t.ignoreArabicDiacritics).onChange(async u=>{await n.clearCache(),t.ignoreArabicDiacritics=u,await ke(e)}));let i=new DocumentFragment;i.createSpan({},a=>{a.innerHTML=`Disable Omnisearch on this device only.<br>
${Ao}`}),new Si.Setting(r).setName("Disable on this device").setDesc(i).addToggle(a=>a.setValue(Nf(e.app)).onChange(async u=>{u?(e.app.saveLocalStorage(Ss,"1"),new Si.Notice("Omnisearch - Disabled. Please restart Obsidian.")):(e.app.saveLocalStorage(Ss),new Si.Notice("Omnisearch - Enabled. Please restart Obsidian."))})),new Si.Setting(r).setName("Force save the cache").setDesc(ar(`Omnisearch has a security feature that automatically disables cache writing if it cannot fully perform the operation.<br>
Use this option to force the cache to be saved, even if it causes a crash.<br>
\u26A0\uFE0F <span style="color: var(--text-accent)">Enabling this setting could lead to crash loops</span>`)).addToggle(a=>a.setValue(t.DANGER_forceSaveCache).onChange(async u=>{t.DANGER_forceSaveCache=u,await ke(e)})),Qi()&&new Si.Setting(r).setName("Clear cache data").setDesc(ar(`Erase all Omnisearch cache data.
Use this if Omnisearch results are inconsistent, missing, or appear outdated.<br>
${Ao}`)).addButton(a=>{a.setButtonText("Clear cache"),a.onClick(async()=>{await n.clearCache()})})}var Si,yv=v(()=>{Si=require("obsidian");mr();mr();mr();en()});function Av(e,t,r){Ns.Platform.isMobile||(new Ns.Setting(r).setName("API Access Through HTTP").setHeading().setDesc(ar('Omnisearch can be used through a simple HTTP server (<a href="https://publish.obsidian.md/omnisearch/Public+API+%26+URL+Scheme#HTTP+Server">more information</a>).')),new Ns.Setting(r).setName("Enable the HTTP server").addToggle(n=>n.setValue(t.httpApiEnabled).onChange(async i=>{t.httpApiEnabled=i,i?e.apiHttpServer.listen(t.httpApiPort):e.apiHttpServer.close(),await ke(e)})),new Ns.Setting(r).setName("HTTP Port").addText(n=>{n.setValue(t.httpApiPort).setPlaceholder("51361").onChange(async i=>{parseInt(i)>65535&&(i=t.httpApiPort,n.setValue(t.httpApiPort)),t.httpApiPort=i,t.httpApiEnabled&&(e.apiHttpServer.close(),e.apiHttpServer.listen(t.httpApiPort)),await ke(e)})}),new Ns.Setting(r).setName("Show a notification when the server starts").setDesc("Will display a notification if the server is enabled, at Obsidian startup.").addToggle(n=>n.setValue(t.httpApiNotice).onChange(async i=>{t.httpApiNotice=i,await ke(e)})))}var Ns,wv=v(()=>{Ns=require("obsidian");mr();mr()});var L3,Of,Dm=v(()=>{L3=typeof global=="object"&&global&&global.Object===Object&&global,Of=L3});var P3,M3,Yt,ni=v(()=>{Dm();P3=typeof self=="object"&&self&&self.Object===Object&&self,M3=Of||P3||Function("return this")(),Yt=M3});var F3,Ur,So=v(()=>{ni();F3=Yt.Symbol,Ur=F3});function H3(e){var t=B3.call(e,Ec),r=e[Ec];try{e[Ec]=void 0;var n=!0}catch{}var i=$3.call(e);return n&&(t?e[Ec]=r:delete e[Ec]),i}var Sv,B3,$3,Ec,Cv,Iv=v(()=>{So();Sv=Object.prototype,B3=Sv.hasOwnProperty,$3=Sv.toString,Ec=Ur?Ur.toStringTag:void 0;Cv=H3});function q3(e){return V3.call(e)}var U3,V3,Nv,Ov=v(()=>{U3=Object.prototype,V3=U3.toString;Nv=q3});function K3(e){return e==null?e===void 0?Y3:z3:Dv&&Dv in Object(e)?Cv(e):Nv(e)}var z3,Y3,Dv,ii,Co=v(()=>{So();Iv();Ov();z3="[object Null]",Y3="[object Undefined]",Dv=Ur?Ur.toStringTag:void 0;ii=K3});function j3(e){return e!=null&&typeof e=="object"}var ai,Io=v(()=>{ai=j3});function G3(e){return typeof e=="symbol"||ai(e)&&ii(e)==W3}var W3,si,No=v(()=>{Co();Io();W3="[object Symbol]";si=G3});function Q3(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Oo,km=v(()=>{Oo=Q3});var X3,Ft,oi=v(()=>{X3=Array.isArray,Ft=X3});function Lv(e){if(typeof e=="string")return e;if(Ft(e))return Oo(e,Lv)+"";if(si(e))return Rv?Rv.call(e):"";var t=e+"";return t=="0"&&1/e==-Z3?"-0":t}var Z3,kv,Rv,Pv,Mv=v(()=>{So();km();oi();No();Z3=1/0,kv=Ur?Ur.prototype:void 0,Rv=kv?kv.toString:void 0;Pv=Lv});function eN(e){for(var t=e.length;t--&&J3.test(e.charAt(t)););return t}var J3,Fv,Bv=v(()=>{J3=/\s/;Fv=eN});function rN(e){return e&&e.slice(0,Fv(e)+1).replace(tN,"")}var tN,$v,Hv=v(()=>{Bv();tN=/^\s+/;$v=rN});function nN(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Tn,Os=v(()=>{Tn=nN});function uN(e){if(typeof e=="number")return e;if(si(e))return Uv;if(Tn(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Tn(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=$v(e);var r=aN.test(e);return r||sN.test(e)?oN(e.slice(2),r?2:8):iN.test(e)?Uv:+e}var Uv,iN,aN,sN,oN,Rm,Vv=v(()=>{Hv();Os();No();Uv=0/0,iN=/^[-+]0x[0-9a-f]+$/i,aN=/^0b[01]+$/i,sN=/^0o[0-7]+$/i,oN=parseInt;Rm=uN});function cN(e){return e}var Ia,vc=v(()=>{Ia=cN});function pN(e){if(!Tn(e))return!1;var t=ii(e);return t==fN||t==dN||t==lN||t==hN}var lN,fN,dN,hN,Df,Lm=v(()=>{Co();Os();lN="[object AsyncFunction]",fN="[object Function]",dN="[object GeneratorFunction]",hN="[object Proxy]";Df=pN});var mN,kf,qv=v(()=>{ni();mN=Yt["__core-js_shared__"],kf=mN});function gN(e){return!!zv&&zv in e}var zv,Yv,Kv=v(()=>{qv();zv=function(){var e=/[^.]+$/.exec(kf&&kf.keys&&kf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();Yv=gN});function EN(e){if(e!=null){try{return bN.call(e)}catch{}try{return e+""}catch{}}return""}var _N,bN,Xi,Pm=v(()=>{_N=Function.prototype,bN=_N.toString;Xi=EN});function CN(e){if(!Tn(e)||Yv(e))return!1;var t=Df(e)?SN:TN;return t.test(Xi(e))}var vN,TN,xN,yN,AN,wN,SN,jv,Wv=v(()=>{Lm();Kv();Os();Pm();vN=/[\\^$.*+?()[\]{}|]/g,TN=/^\[object .+?Constructor\]$/,xN=Function.prototype,yN=Object.prototype,AN=xN.toString,wN=yN.hasOwnProperty,SN=RegExp("^"+AN.call(wN).replace(vN,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");jv=CN});function IN(e,t){return e?.[t]}var Gv,Qv=v(()=>{Gv=IN});function NN(e,t){var r=Gv(e,t);return jv(r)?r:void 0}var rn,Na=v(()=>{Wv();Qv();rn=NN});var ON,Rf,Xv=v(()=>{Na();ni();ON=rn(Yt,"WeakMap"),Rf=ON});function DN(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Zv,Jv=v(()=>{Zv=DN});function PN(e){var t=0,r=0;return function(){var n=LN(),i=RN-(n-r);if(r=n,i>0){if(++t>=kN)return arg Line truncated
${n?`\u{1F44D} You have installed <a href="https://github.com/scambier/obsidian-text-extractor">Text Extractor</a>, Omnisearch can use it to index PDFs and images contents.
<br />Text extraction only works on desktop, but the cache can be synchronized with your mobile device.`:'\u26A0\uFE0F Omnisearch requires <a href="https://github.com/scambier/obsidian-text-extractor">Text Extractor</a> to index PDFs and images.'}
${i?'<br/>\u{1F44D} You have installed <a href="https://github.com/Swaggeroo/obsidian-ai-image-analyzer">AI Image Analyzer</a>, Omnisearch can use it to index images contents with ai.':'<br/>\u26A0\uFE0F Omnisearch requires <a href="https://github.com/Swaggeroo/obsidian-ai-image-analyzer">AI Image Analyzer</a> to index images with ai.'}`)),new Ji.Setting(r).setName(`PDFs content indexing ${n?"":"\u26A0\uFE0F Disabled"}`).setDesc(ar("Omnisearch will use Text Extractor to index the content of your PDFs.")).addToggle(p=>p.setValue(t.PDFIndexing).onChange(async g=>{await a.clearCache(),t.PDFIndexing=g,await ke(e)})).setDisabled(!n),new Ji.Setting(r).setName(`Images OCR indexing ${n?"":"\u26A0\uFE0F Disabled"}`).setDesc(ar("Omnisearch will use Text Extractor to OCR your images and index their content.")).addToggle(p=>p.setValue(t.imagesIndexing).onChange(async g=>{await a.clearCache(),t.imagesIndexing=g,await ke(e)})).setDisabled(!n);let l=new DocumentFragment;l.createSpan({},p=>{p.innerHTML='Omnisearch will use Text Extractor to index the content of your office documents (currently <pre style="display:inline">.docx</pre> and <pre style="display:inline">.xlsx</pre>).'}),new Ji.Setting(r).setName(`Documents content indexing ${n?"":"\u26A0\uFE0F Disabled"}`).setDesc(l).addToggle(p=>p.setValue(t.officeIndexing).onChange(async g=>{await a.clearCache(),t.officeIndexing=g,await ke(e)})).setDisabled(!n);let d=new DocumentFragment;d.createSpan({},p=>{p.innerHTML=`Omnisearch will use AI Image Analyzer to index the content of your images with ai.<br/>
\u26A0\uFE0F <span style="color: var(--text-accent)">If both AI Image Analyzer and Text Extractor are enabled, Text Extractor will only be used as a fallback.</span>`}),new Ji.Setting(r).setName(`Images AI indexing ${i?"":"\u26A0\uFE0F Disabled"}`).setDesc(d).addToggle(p=>p.setValue(t.aiImageIndexing).onChange(async g=>{await a.clearCache(),t.aiImageIndexing=g,await ke(e)})).setDisabled(!i),new Ji.Setting(r).setName("Index paths of unsupported files").setDesc(ar(`
Omnisearch can index file<strong>names</strong> of "unsupported" files, such as e.g. <pre style="display:inline">.mp4</pre>
or non-extracted PDFs & images.<br/>
"Obsidian setting" will respect the value of "Files & Links > Detect all file extensions".`)).addDropdown(p=>{p.addOptions({yes:"Yes",no:"No",default:"Obsidian setting"}).setValue(t.unsupportedFilesIndexing).onChange(async g=>{await u(),t.unsupportedFilesIndexing=g,await ke(e)})}),new Ji.Setting(r).setName("Set frontmatter property key as title").setDesc(ar(`If you have a custom property in your notes that you want to use as the title in search results. If you set this to '#heading', then use the first heading from a file as the title.<br>
Leave empty to disable.`)).addText(p=>{p.setValue(t.displayTitle).onChange(async g=>{await u(),t.displayTitle=g,await ke(e)})}),new Ji.Setting(r).setName("Additional TEXT files to index").setDesc(ar(`In addition to standard <code>md</code> files, Omnisearch can also index other <strong style="color: var(--text-accent)">PLAINTEXT</strong> files.<br/>
Add extensions separated by a space, without the dot. Example: "<code>txt org csv</code>".<br />
\u26A0\uFE0F <span style="color: var(--text-accent)">Using extensions of non-plaintext files (like .pptx) WILL cause crashes,
because Omnisearch will try to index their content.</span>`)).addText(p=>{p.setValue(t.indexedFileTypes.join(" ")).setPlaceholder("Example: txt org csv").onChange(async g=>{await a.clearCache(),t.indexedFileTypes=g.split(" "),await ke(e)})})}var Ji,Cy=v(()=>{Ji=require("obsidian");mr();mr();Dc()});function Iy(e,t,r){new Ma.Setting(r).setName("User Interface").setHeading(),new Ma.Setting(r).setName("Show ribbon button").setDesc("Add a button on the sidebar to open the Vault search modal.").addToggle(n=>n.setValue(t.ribbonIcon).onChange(async i=>{t.ribbonIcon=i,await ke(e),i?e.addRibbonButton():e.removeRibbonButton()})),new Ma.Setting(r).setName("Show excerpts").setDesc("Shows the contextual part of the note that matches the search. Disable this to only show filenames in results.").addToggle(n=>n.setValue(t.showExcerpt).onChange(async i=>{Fa.set(i)})),new Ma.Setting(r).setName("Show embed references").setDesc(ar(`Some results are <a href="https://help.obsidian.md/Linking+notes+and+files/Embed+files">embedded</a> in other notes.<br>
This setting controls the maximum number of embeds to show in the search results. Set to 0 to disable.<br>
Also works with Text Extractor for embedded images and documents.`)).addSlider(n=>{n.setLimits(0,10,1).setValue(t.maxEmbeds).setDynamicTooltip().onChange(async i=>{t.maxEmbeds=i,await ke(e)})}),new Ma.Setting(r).setName("Render line return in excerpts").setDesc("Activate this option to render line returns in result excerpts.").addToggle(n=>n.setValue(t.renderLineReturnInExcerpts).onChange(async i=>{t.renderLineReturnInExcerpts=i,await ke(e)})),new Ma.Setting(r).setName('Show "Create note" button').setDesc(ar(`Shows a button next to the search input, to create a note.
Acts the same as the <code>shift \u21B5</code> shortcut, can be useful for mobile device users.`)).addToggle(n=>n.setValue(t.showCreateButton).onChange(async i=>{t.showCreateButton=i,await ke(e)})),new Ma.Setting(r).setName("Highlight matching words in results").setDesc("Will highlight matching results when enabled. See README for more customization options.").addToggle(n=>n.setValue(t.highlight).onChange(async i=>{t.highlight=i,await ke(e)}))}var Ma,Ny=v(()=>{Ma=require("obsidian");wo();mr();mr()});function Dy(e,t,r,n){function i(u,l){u.setLimits(1,10,.5).setValue(t[l]).setDynamicTooltip().onChange(async d=>{t[l]=d,await ke(e)})}let a=kc(e.app);new Fn.Setting(r).setName("Results weighting").setHeading(),new Fn.Setting(r).setName(`File name & declared aliases (default: ${a.weightBasename})`).addSlider(u=>i(u,"weightBasename")),new Fn.Setting(r).setName(`File directory (default: ${a.weightDirectory})`).addSlider(u=>i(u,"weightDirectory")),new Fn.Setting(r).setName(`Headings level 1 (default: ${a.weightH1})`).addSlider(u=>i(u,"weightH1")),new Fn.Setting(r).setName(`Headings level 2 (default: ${a.weightH2})`).addSlider(u=>i(u,"weightH2")),new Fn.Setting(r).setName(`Headings level 3 (default: ${a.weightH3})`).addSlider(u=>i(u,"weightH3")),new Fn.Setting(r).setName(`Tags (default: ${a.weightUnmarkedTags})`).addSlider(u=>i(u,"weightUnmarkedTags")),new Fn.Setting(r).setName("Header properties fields").setDesc('You can set custom weights for values of header properties (e.g. "keywords"). Weights under 1.0 will downrank the results.');for(let u=0;u<t.weightCustomProperties.length;u++){let l=t.weightCustomProperties[u],d=new Fn.Setting(r).setName((u+1).toString()+".");d.settingEl.style.paddingLeft="2em",d.addText(p=>{p.setPlaceholder("Property name").setValue(l.name).onChange(async g=>{l.name=g,await ke(e)})}).addSlider(p=>{p.setLimits(.1,5,.1).setValue(l.weight).setDynamicTooltip().onChange(async g=>{l.weight=g,await ke(e)})}).addButton(p=>{p.setButtonText("Remove"),p.onClick(async()=>{t.weightCustomProperties.splice(u,1),await ke(e),n()})})}new Fn.Setting(r).addButton(u=>{u.setButtonText("Add a new property"),u.onClick(l=>{t.weightCustomProperties.push({name:"",weight:1}),n()})}),new Fn.Setting(r).setName("Recency boost (experimental)").setDesc("Files that have been modified more recently than [selected cutoff] are given a higher rank.").addDropdown(u=>u.addOptions({["0"]:"Disabled",["1"]:"24 hours",["2"]:"7 days",["3"]:"30 days"}).setValue(t.recencyBoost).onChange(async l=>{t.recencyBoost=l,await ke(e)}))}var Fn,ky=v(()=>{Fn=require("obsidian");wo();mr();en()});function kc(e){return{useCache:!0,hideExcluded:!1,recencyBoost:"0",downrankedFoldersFilters:[],ignoreDiacritics:!0,ignoreArabicDiacritics:!1,indexedFileTypes:[],displayTitle:"",PDFIndexing:!1,officeIndexing:!1,imagesIndexing:!1,aiImageIndexing:!1,unsupportedFilesIndexing:"default",splitCamelCase:!1,openInNewPane:!1,vimLikeNavigationShortcut:e.vault.getConfig("vimMode"),ribbonIcon:!0,showExcerpt:!0,maxEmbeds:5,renderLineReturnInExcerpts:!0,showCreateButton:!1,highlight:!0,showPreviousQueryResults:!0,simpleSearch:!1,tokenizeUrls:!1,fuzziness:"1",weightBasename:10,weightDirectory:7,weightH1:6,weightH2:5,weightH3:4,weightUnmarkedTags:2,weightCustomProperties:[],httpApiEnabled:!1,httpApiPort:"51361",httpApiNotice:!0,welcomeMessage:"",verboseLogging:!1,DANGER_httpHost:null,DANGER_forceSaveCache:!1}}async function Ry(e){return Or=Object.assign({},kc(e.app),await e.loadData()),Fa.set(Or.showExcerpt),Sm(Or.verboseLogging),Or}var Rc,Fa,id,Or,wo=v(()=>{Rc=require("obsidian");Em();en();Nr();Tv();yv();wv();Cy();Ny();ky();mr();Fa=yo(!1),id=class extends Rc.PluginSettingTab{constructor(r){super(r.app,r);this.plugin=r,Fa.subscribe(async n=>{Or.showExcerpt=n,await ke(this.plugin)})}display(){let{containerEl:r}=this;if(r.empty(),this.app.loadLocalStorage(Ss)=="1"){let i=r.createEl("span");i.innerHTML='<strong style="color: var(--text-accent)">\u26A0\uFE0F OMNISEARCH IS DISABLED \u26A0\uFE0F</strong>'}r.createEl("h1",{text:"Omnisearch"});let n=r.createDiv();n.innerHTML=`
<iframe sandbox="allow-top-navigation-by-user-activation" src="https://github.com/sponsors/scambier/button" title="Sponsor scambier" height="35" width="116" style="border: 0;"></iframe>
<a href='https://ko-fi.com/B0B6LQ2C' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://cdn.ko-fi.com/cdn/kofi2.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
`,Sy(this.plugin,Or,r),r.createEl("hr"),vv(this.plugin,Or,r),r.createEl("hr"),Iy(this.plugin,Or,r),r.createEl("hr"),Dy(this.plugin,Or,r,()=>{this.display()}),r.createEl("hr"),Av(this.plugin,Or,r),r.createEl("hr"),xv(this.plugin,Or,r),r.createEl("hr"),new Rc.Setting(r).setName("Debugging").setHeading(),new Rc.Setting(r).setName("Enable verbose logging").setDesc('Adds a LOT of logs for debugging purposes. You also need to enable "Verbose" logging in the console to see these logs.').addToggle(i=>i.setValue(Or.verboseLogging).onChange(async a=>{Or.verboseLogging=a,Sm(a),await ke(this.plugin)}))}}});function a0(e){var t=b6();we(e,t)}var b6,Ly=v(()=>{Wn();Ai();Pn();b6=Le('<span class="suggestion-flair" aria-label="Not created yet, select to create"><svg viewBox="0 0 100 100" class="add-note-glyph" width="16" height="16"><path fill="currentColor" stroke="currentColor" d="M23.3,6.7c-3.7,0-6.7,3-6.7,6.7v73.3c0,3.7,3,6.7,6.7,6.7h28.4c-3.2-4.8-5.1-10.5-5.1-16.7c0-16.6,13.4-30,30-30 c2.3,0,4.5,0.3,6.7,0.8V31.7c0-0.9-0.3-1.7-1-2.4L60.7,7.6c-0.6-0.6-1.5-1-2.4-1L23.3,6.7z M56.7,13L77,33.3H60 c-1.8,0-3.3-1.5-3.3-3.3L56.7,13z M76.7,53.3c-12.9,0-23.3,10.4-23.3,23.3S63.8,100,76.7,100S100,89.6,100,76.7 S89.6,53.3,76.7,53.3z M76.7,63.3c1.8,0,3.3,1.5,3.3,3.3v6.7h6.7c1.8,0,3.3,1.5,3.3,3.3c0,1.8-1.5,3.3-3.3,3.3H80v6.7 c0,1.8-1.5,3.3-3.3,3.3c-1.8,0-3.3-1.5-3.3-3.3V80h-6.7c-1.8,0-3.3-1.5-3.3-3.3s1.5-3.3,3.3-3.3h6.7v-6.7 C73.3,64.8,74.8,63.3,76.7,63.3L76.7,63.3z"></path></svg></span>')});function Lc(e,t){let r=ze(t,"id",8),n=ze(t,"selected",8,!1),i=ze(t,"glyph",8,!1),a=ze(t,"cssClass",8,"");var u=E6();let l;var d=xe(u);{var p=E=>{a0(E,{})};tt(d,E=>{i()&&E(p)})}var g=Ye(d,2);Yi(g,t,"default",{},null),Te(u),rr(E=>{ji(u,"data-result-id",r()),l=Ki(u,1,`suggestion-item omnisearch-result ${a()??""}`,null,l,E)},[()=>({"is-selected":n()})],Br),pr("mousemove",u,function(E){Jr.call(this,t,E)}),pr("click",u,function(E){Jr.call(this,t,E)}),pr("keypress",u,function(E){Jr.call(this,t,E)}),pr("auxclick",u,function(E){Jr.call(this,t,E)}),we(e,u)}var E6,s0=v(()=>{Wn();Ai();Pn();Ly();E6=Le("<div><!> <!></div>")});function sd(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#039;")}var Py,ad,o0=v(()=>{en();Nr();Py=require("obsidian");Dc();ad=class{constructor(t){this.plugin=t}highlightText(t,r){let n=`suggestion-highlight omnisearch-highlight ${this.plugin.settings.highlight?"omnisearch-default-highlight":""}`;if(!r.length)return t;try{return t.replace(new RegExp(`(${r.map(i=>Oc(i.match)).join("|")})`,"giu"),`<span class="${n}">$1</span>`)}catch(i){return console.error("Omnisearch - Error in highlightText()",i),t}}stringsToRegex(t){if(!t.length)return/^$/g;t.sort((n,i)=>i.length-n.length);let r=`(${t.map(n=>`\\b${Oc(n)}\\b|${Oc(n)}`).join("|")})`;return new RegExp(`${r}`,"gui")}getMatches(t,r,n){r=r.map(sd);let i=this.stringsToRegex(r),a=t;this.plugin.settings.ignoreDiacritics&&(t=Gi(t,this.plugin.settings.ignoreArabicDiacritics));let u=new Date().getTime(),l=null,d=[],p=0;for(;(l=i.exec(t))!==null;){if(++p>=100||new Date().getTime()-u>50){ri("Stopped getMatches at",p,"results");break}let g=l.index,E=g+l[0].length,_=a.substring(g,E).trim();_&&l.index>=0&&d.push({match:_,offset:l.index})}if(n&&(n.query.text.length>1||n.getExactTerms().length>0)){let g=t.indexOf(n.getBestStringForExcerpt());g>-1&&d.find(E=>E.offset===g)&&d.unshift({offset:g,match:n.getBestStringForExcerpt()})}return d}makeExcerpt(t,r){let n=this.plugin.settings;try{let i=r??-1,a=Math.max(0,i-av),u=Math.min(t.length,i+cc);if(i>-1?t=(a>0?"\u2026":"")+t.slice(a,u).trim()+(u<t.length-1?"\u2026":""):t=t.slice(0,cc),n.renderLineReturnInExcerpts){let l=new RegExp(/(?:\r\n|\r|\n)/g);t=t.split(l).filter(p=>p).join(`
`);let d=t.lastIndexOf(`
`,i-a);d>0&&(t=t.slice(d))}return t=sd(t),n.renderLineReturnInExcerpts&&(t=t.trim().replaceAll(`
`,"<br>")),t}catch(i){return new Py.Notice("Omnisearch - Error while creating excerpt, see developer console"),console.error("Omnisearch - Error while creating excerpt"),console.error(i),""}}}});async function My(e){let t=e.app;if(!t.plugins.getPlugin("obsidian-icon-folder"))return{};let n=`${t.vault.configDir}/plugins/obsidian-icon-folder/data.json`;try{let i=await t.vault.adapter.read(n),a=JSON.parse(i),u={};for(let l in a){let d=(0,qo.normalizePath)(l);u[d]=a[l]}return u}catch(i){return ri("Failed to read data.json:",i),{}}}async function Fy(e){let t={Li:"lucide-icons"},r="icons",n=e.app,i=n.plugins.getPlugin("obsidian-icon-folder");if(i){r=i.settings?.iconPacksPath||"icons";let u=`${n.vault.configDir}/${r}`;try{let l=await n.vault.adapter.list(u);if(l.folders&&l.folders.length>0)for(let d of l.folders){let p=d.split("/"),g=p[p.length-1],E=v6(g);t[E]=g}}catch(l){ri("Failed to list icon packs:",l)}}return{prefixToIconPack:t,iconsPath:r}}function v6(e){if(e.includes("-")){let t=e.split("-"),r=t[0].charAt(0).toUpperCase();for(let n=1;n<t.length;n++)r+=t[n].charAt(0).toLowerCase();return r}return e.charAt(0).toUpperCase()+e.charAt(1).toLowerCase()}function u0(e,t){let r=(0,qo.normalizePath)(e),n=t[r];if(n){if(typeof n=="string")return n;if(typeof n=="object"&&n.iconName)return n.iconName}return null}function T6(e){let t=e.match(/^[A-Z][a-z]*/);if(t){let r=t[0],n=e.substring(r.length);return{prefix:r,name:n}}else return{prefix:"",name:e}}async function c0(e,t,r,n){let i=T6(e),{prefix:a,name:u}=i;if(!a)return`<span class="omnisearch-result__icon--emoji">${sd(u)}</span>`;let l=n[a];if(!l)return ri(`No icon pack found for prefix: ${a}`),null;if(l==="lucide-icons"){let d=u.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),p=(0,qo.getIcon)(d);return p?p.outerHTML:(ri(`Lucide icon not found: ${d}`),null)}else{if(!r)return ri("Icons path is not set. Cannot load icon SVG."),null;let d=`${t.app.vault.configDir}/${r}/${l}/${u}.svg`;try{return await t.app.vault.adapter.read(d)}catch(p){return ri(`Failed to load icon SVG for ${e} at ${d}:`,p),null}}}function l0(e){let t="file";e==="folder"?t="folder":Mn(e)?t="image":ti(e)?t="file-text":(wi(e)||dc(e)||Cs(e))&&(t="layout-dashboard");let r=(0,qo.getIcon)(t);return r?r.outerHTML:""}var qo,By=v(()=>{qo=require("obsidian");Nr();o0()});function f0(e,t){dr(t,!1);let[r,n]=uc(),i=()=>oc(Fa,"$showExcerpt",r),a=ft(),u=ft(),l=ft(),d=ft(),p=ze(t,"selected",8,!1),g=ze(t,"note",8),E=ze(t,"plugin",8),_=ft(null),y=ft(""),C=ft(""),D={},P=ft(null),N=ft(null),L={},H,R=ft(!1);As(async()=>{D=await My(E());let qe=await Fy(E());L=qe.prefixToIconPack,H=qe.iconsPath,oe(R,!0)});async function B(){let qe=u0(q(C),D);qe?oe(P,await c0(qe,E(),H,L)):oe(P,l0("folder"));let St=u0(g().path,D);St?oe(N,await c0(St,E(),H,L)):oe(N,l0(g().path))}function V(qe,St){return qe.innerHTML=St,{update(Dt){qe.innerHTML=Dt},destroy(){qe.innerHTML=""}}}let X=null,ce=null,ve=ft(null);Qt(()=>(vt(g()),q(R),fc),()=>{g()&&g().path&&q(R)&&(async()=>(oe(y,g().displayTitle||g().basename),oe(C,fc(g().path)),await B()))()}),Qt(()=>(Mn,vt(g()),vt(E()),ui.TFile),()=>{if(oe(_,null),Mn(g().path)){let qe=E().app.vault.getAbstractFileByPath(g().path);qe instanceof ui.TFile&&oe(_,E().app.vault.getResourcePath(qe))}}),Qt(()=>(vt(g()),fc,ui.setIcon,Mn,ti,wi,dc,Cs,q(ve)),()=>{oe(y,g().displayTitle||g().basename),oe(C,fc(g().path)),X&&(0,ui.setIcon)(X,"folder-open"),ce&&(Mn(g().path)?(0,ui.setIcon)(ce,"image"):ti(g().path)?(0,ui.setIcon)(ce,"file-text"):wi(g().path)||dc(g().path)||Cs(g().path)?(0,ui.setIcon)(ce,"layout-dashboard"):(0,ui.setIcon)(ce,"file")),q(ve)&&(0,ui.setIcon)(q(ve),"corner-down-right")}),Qt(()=>(vt(E()),q(y),vt(g())),()=>{oe(a,E().textProcessor.getMatches(q(y),g().foundWords))}),Qt(()=>(vt(E()),q(C),vt(g())),()=>{oe(u,E().textProcessor.getMatches(q(C),g().foundWords))}),Qt(()=>(vt(E()),vt(g())),()=>{oe(l,E().textProcessor.makeExcerpt(g().content,g().matches[0]?.offset??-1))}),Qt(()=>{},()=>{oe(d,!1)}),Jn(),En();let Re=Br(()=>g().isEmbed?"omnisearch-result__embed":"");Lc(e,{get glyph(){return q(d)},get id(){return g().path},get cssClass(){return` ${q(Re)??""}`},get selected(){return p()},$$events:{auxclick(qe){Jr.call(this,t,qe)},click(qe){Jr.call(this,t,qe)},mousemove(qe){Jr.call(this,t,qe)}},children:(qe,St)=>{var Dt=D6(),Se=xe(Dt),et=xe(Se),je=xe(et);{var lt=rt=>{var ct=x6();ys(ct,Xt=>oe(ve,Xt),()=>q(ve)),we(rt,ct)},F=rt=>{var ct=zi(),Xt=Sr(ct);{var Er=Pr=>{var zr=y6();wa(zr,(Ct,$t)=>V?.(Ct,$t),()=>q(N)),we(Pr,zr)};tt(Xt,Pr=>{q(N)&&Pr(Er)})}we(rt,ct)};tt(je,rt=>{g().isEmbed?rt(lt):rt(F,!1)})}var K=Ye(je,2),te=xe(K);Ts(te,()=>E().textProcessor.highlightText(q(y),q(a)),!1,!1),Te(K);var fe=Ye(K,2);{var Fe=rt=>{var ct=A6(),Xt=xe(ct);Te(ct),rr(Er=>ir(Xt,`.${Er??""}`),[()=>Is(g().path)],Br),we(rt,ct)};tt(fe,rt=>{g().displayTitle||rt(Fe)})}var Je=Ye(fe,2);{var Ue=rt=>{var ct=w6(),Xt=xe(ct);Te(ct),rr(()=>ir(Xt,`${g().matches.length??""}\xA0${(g().matches.length>1?"matches":"match")??""}`)),we(rt,ct)};tt(Je,rt=>{g().matches.lengthLine truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Je=!0,Ue=!1,ot;return{s:function(){te=te.call(F)},n:function(){var _t=te.next();return Je=_t.done,_t},e:function(_t){Ue=!0,ot=_t},f:function(){try{!Je&&te.return!=null&&te.return()}finally{if(Ue)throw ot}}}}function p(F,K){if(F){if(typeof F=="string")return g(F,K);var te=Object.prototype.toString.call(F).slice(8,-1);if(te==="Object"&&F.constructor&&(te=F.constructor.name),te==="Map"||te==="Set")return Array.from(F);if(te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te))return g(F,K)}}function g(F,K){(K==null||K>F.length)&&(K=F.length);for(var te=0,fe=new Array(K);te<K;te++)fe[te]=F[te];return fe}function E(F,K){if(!(F instanceof K))throw new TypeError("Cannot call a class as a function")}function _(F,K){for(var te=0;te<K.length;te++){var fe=K[te];fe.enumerable=fe.enumerable||!1,fe.configurable=!0,"value"in fe&&(fe.writable=!0),Object.defineProperty(F,fe.key,fe)}}function y(F,K,te){return K&&_(F.prototype,K),te&&_(F,te),Object.defineProperty(F,"prototype",{writable:!1}),F}function C(F,K,te){return K in F?Object.defineProperty(F,K,{value:te,enumerable:!0,configurable:!0,writable:!0}):F[K]=te,F}function D(F,K,te){P(F,K),K.set(F,te)}function P(F,K){if(K.has(F))throw new TypeError("Cannot initialize the same private elements twice on an object")}function N(F,K){var te=R(F,K,"get");return L(F,te)}function L(F,K){return K.get?K.get.call(F):K.value}function H(F,K,te){var fe=R(F,K,"set");return B(F,fe,te),te}function R(F,K,te){if(!K.has(F))throw new TypeError("attempted to "+te+" private field on non-instance");return K.get(F)}function B(F,K,te){if(K.set)K.set.call(F,te);else{if(!K.writable)throw new TypeError("attempted to set read only private field");K.value=te}}var V=typeof Symbol<"u"?Symbol.toStringTag:"@@toStringTag",X=new WeakMap,ce=new WeakMap,ve=function(){function F(K){var te=K.executor,fe=te===void 0?function(){}:te,Fe=K.internals,Je=Fe===void 0?lt():Fe,Ue=K.promise,ot=Ue===void 0?new Promise(function(ut,_t){return fe(ut,_t,function(qr){Je.onCancelList.push(qr)})}):Ue;E(this,F),D(this,X,{writable:!0,value:void 0}),D(this,ce,{writable:!0,value:void 0}),C(this,V,"CancelablePromise"),this.cancel=this.cancel.bind(this),H(this,X,Je),H(this,ce,ot||new Promise(function(ut,_t){return fe(ut,_t,function(qr){Je.onCancelList.push(qr)})}))}return y(F,[{key:"then",value:function(te,fe){return et(N(this,ce).then(Se(te,N(this,X)),Se(fe,N(this,X))),N(this,X))}},{key:"catch",value:function(te){return et(N(this,ce).catch(Se(te,N(this,X))),N(this,X))}},{key:"finally",value:function(te,fe){var Fe=this;return fe&&N(this,X).onCancelList.push(te),et(N(this,ce).finally(Se(function(){if(te)return fe&&(N(Fe,X).onCancelList=N(Fe,X).onCancelList.filter(function(Je){return Je!==te})),te()},N(this,X))),N(this,X))}},{key:"cancel",value:function(){N(this,X).isCanceled=!0;var te=N(this,X).onCancelList;N(this,X).onCancelList=[];var fe=d(te),Fe;try{for(fe.s();!(Fe=fe.n()).done;){var Je=Fe.value;if(typeof Je=="function")try{Je()}catch(Ue){console.error(Ue)}}}catch(Ue){fe.e(Ue)}finally{fe.f()}}},{key:"isCanceled",value:function(){return N(this,X).isCanceled===!0}}]),F}(),Re=function(F){t(te,F);var K=n(te);function te(fe){return E(this,te),K.call(this,{executor:fe})}return y(te)}(ve);e.CancelablePromise=Re,C(Re,"all",function(K){return je(K,Promise.all(K))}),C(Re,"allSettled",function(K){return je(K,Promise.allSettled(K))}),C(Re,"any",function(K){return je(K,Promise.any(K))}),C(Re,"race",function(K){return je(K,Promise.race(K))}),C(Re,"resolve",function(K){return St(Promise.resolve(K))}),C(Re,"reject",function(K){return St(Promise.reject(K))}),C(Re,"isCancelable",Dt);var qe=Re;e.default=qe;function St(F){return et(F,lt())}function Dt(F){return F instanceof Re||F instanceof ve}function Se(F,K){if(F)return function(te){if(!K.isCanceled){var fe=F(te);return Dt(fe)&&K.onCancelList.push(fe.cancel),fe}return te}}function et(F,K){return new ve({internals:K,promise:F})}function je(F,K){var te=lt();return te.onCancelList.push(function(){var fe=d(F),Fe;try{for(fe.s();!(Fe=fe.n()).done;){var Je=Fe.value;Dt(Je)&&Je.cancel()}}catch(Ue){fe.e(Ue)}finally{fe.f()}}),new ve({internals:te,promise:K})}function lt(){return{isCanceled:!1,onCancelList:[]}}})});function Yy(e,{delay:t=0,duration:r=400,easing:n=k6}={}){let i=+getComputedStyle(e).opacity;return{delay:t,duration:r,easing:n,css:a=>`opacity: ${a*i}`}}var k6,Ky=v(()=>{mt();Wr();k6=e=>e});function ld(e,t){dr(t,!1);let r=ze(t,"placeholder",8,null),n=ze(t,"placeholderProps",8,null),i="svelte-lazy-placeholder";En();var a=zi(),u=Sr(a);{var l=d=>{var p=L6();Ki(p,1,xs(i));var g=xe(p);{var E=y=>{var C=R6(),D=xe(C,!0);Te(C),rr(()=>ir(D,r())),we(y,C)},_=(y,C)=>{{var D=P=>{var N=zi(),L=Sr(N);Qp(L,r,(H,R)=>{R(H,gm(n))}),we(P,N)};tt(y,P=>{["function","object"].includes(typeof r())&&P(D)},C)}};tt(g,y=>{typeof r()=="string"?y(E):y(_,!1)})}Te(p),we(d,p)};tt(u,d=>{r()&&d(l)})}we(e,a),hr()}var R6,L6,jy=v(()=>{Wn();Ai() Line truncated
characters.</span>`,1),q6=Le("We found 0 results for your search here. <!>",1),z6=Le('<!> <div style="text-align: center;"><!></div>',1),Y6=Le('<!> <!> <!> <div class="prompt-instructions"><div class="prompt-instruction"><span class="prompt-instruction-command">\u2191\u2193</span><span>to navigate</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to cycle history</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to open</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command">Tab</span> <span>to switch to In-File Search</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to open in a new pane</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"></span> <span>to open in a new split</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to open in the background</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to create</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to create in a new pane</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to insert a link</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to toggle excerpts</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command">Esc</span><span>to close</span></div></div>',1)});function g0(e,t){dr(t,!1);let r=ft(),n=ze(t,"plugin",8),i=ze(t,"offset",8),a=ze(t,"note",8),u=ze(t,"index",8,0),l=ze(t,"selected",8,!1);Qt(()=>(vt(n()),vt(a()),vt(i())),()=>{oe(r,n().textProcessor.makeExcerpt(a()?.content??"",i()))}),Jn(),En();let d=Br(()=>u().toString());Lc(e,{get id(){return q(d)},get selected(){return l()},$$events:{auxclick(p){Jr.call(this,t,p)},click(p){Jr.call(this,t,p)},mousemove(p){Jr.call(this,t,p)}},children:(p,g)=>{var E=K6(),_=xe(E);Ts(_,()=>n().textProcessor.highlightText(q(r),a().matches),!1,!1),Te(E),we(p,E)},$$slots:{default:!0}}),hr()}var K6,Zy=v(()=>{Wn();Ai();Pn();s0();K6=Le('<div class="omnisearch-result__body"><!></div>')});function _0(e,t){dr(t,!1);let r=ze(t,"plugin",8),n=ze(t,"modal",8),i=ze(t,"parent",8,null),a=ze(t,"singleFilePath",8,""),u=ze(t,"previousQuery",8),l=ft(),d=ft([]),p=ft(0),g=ft(),E=ft();As(()=>{Me.enable("infile"),Me.on("infile","enter",N),Me.on("infile","open-in-new-pane",P),Me.on("infile","arrow-up",()=>C(-1)),Me.on("infile","arrow-down",()=>C(1)),Me.on("infile","tab",L)}),gf(()=>{Me.disable("infile")});function _(Se){let et=[],je=-1,lt=0;for(;++lt<100;){let F=y(Se,je,cc);if(!F.length)break;je=F.last().offset,et.push(F)}return et}function y(Se,et,je){let lt=Se.find(F=>F.offset>et);return lt?Se.filter(F=>F.offset>et&&F.offset<=lt.offset+je):[]}function C(Se){oe(p,Sf(q(p)+Se,q(d).length)),D()}async function D(){await vi(),document.querySelector(`[data-result-id="${q(p)}"]`)?.scrollIntoView({behavior:"auto",block:"nearest"})}async function P(){return N(!0)}async function N(Se=!1){if(q(g)){n().close(),i()&&i().close();let et=r().textProcessor.stringsToRegex(q(g).foundWords);et.exec(q(g).content),await If(r().app,q(g),et.lastIndex,Se);let je=r().app.workspace.getActiveViewOfType(fd.MarkdownView);if(!je)return;let lt=q(d)[q(p)]??0,F=je.editor.offsetToPos(lt);F.ch=0,je.editor.setCursor(F),je.editor.scrollIntoView({from:{line:F.line-10,ch:0},to:{line:F.line+10,ch:0}})}}function L(){new ta(r(),q(l)??u()).open(),n().close()}Qt(()=>vt(u()),()=>{oe(l,u()??"")}),Qt(()=>(q(l),q(E),ea,vt(r()),vt(a())),()=>{(async()=>(q(l)&&(oe(E,new ea(q(l),{ignoreDiacritics:r().settings.ignoreDiacritics,ignoreArabicDiacritics:r().settings.ignoreArabicDiacritics})),oe(g,(await r().searchEngine.getSuggestions(q(E),{singleFilePath:a()}))[0]??null)),oe(p,0),await D()))()}),Qt(()=>(q(g),q(E)),()=>{if(q(g)){let Se=_(q(g).matches),et=q(E).getExactTerms();et.length&&(Se=Se.filter(je=>et.every(lt=>je.some(F=>F.match.includes(lt))))),oe(d,Se.map(je=>Math.round(je.first().offset)))}}),Jn(),En();var H=Z6(),R=Sr(H);gc(R,{get plugin(){return r()},placeholder:"Omnisearch - File",get initialValue(){return u()},$$events:{input:Se=>oe(l,Se.detail)},children:(Se,et)=>{var je=W6(),lt=xe(je);{var F=K=>{var te=j6();pr("click",te,L),we(K,te)};tt(lt,K=>{fd.Platform.isMobile&&K(F)})}Te(je),we(Se,je)},$$slots:{default:!0}});var B=Ye(R,2);_c(B,{children:(Se,et)=>{var je=zi(),lt=Sr(je);{var F=te=>{var fe=zi(),Fe=Sr(fe);nc(Fe,1,()=>q(d),rc,(Je,Ue,ot)=>{let ut=Br(()=>ot===q(p));g0(Je,{get plugin(){return r()},get offset(){return q(Ue)},get note(){return q(g)},index:ot,get selected(){return q(ut)},$$events:{mousemove:_t=>oe(p,ot),click:_t=>N(_t.ctrlKey),auxclick:_t=>{_t.button==1&&N(!0)}}})}),we(te,fe)},K=te=>{var fe=G6();we(te,fe)};tt(lt,te=>{q(d).length&&q(g)?te(F):te(K,!1)})}we(Se,je)},$$Line truncated
`)}function zr(s,o,f,h){this.failures=o,this.failedKeys=h,this.successCount=f,this.message=Pr(s,o)}C(zr).from(Er);function Ct(s,o){this.name="BulkError",this.failures=Object.keys(o).map(function(f){return o[f]}),this.failuresByPos=o,this.message=Pr(s,this.failures)}C(Ct).from(Er);var $t=ct.reduce(function(s,o){return s[o]=o+"Error",s},{}),ki=Er,me=ct.reduce(function(s,o){var f=o+"Error";function h(m,b){this.name=f,m?typeof m=="string"?(this.message="".concat(m).concat(b?`
`+b:""),this.inner=b||null):typeof m=="object"&&(this.message="".concat(m.name," ").concat(m.message),this.inner=m):(this.message=Xt[o]||f,this.inner=null)}return C(h).from(ki),s[o]=h,s},{});me.Syntax=SyntaxError,me.Type=TypeError,me.Range=RangeError;var _u=rt.reduce(function(s,o){return s[o+"Error"]=me[o],s},{});function Nh(s,o){if(!s||s instanceof Er||s instanceof TypeError||s instanceof SyntaxError||!s.name||!_u[s.name])return s;var f=new _u[s.name](o||s.message,s);return"stack"in s&&y(f,"stack",{get:function(){return this.inner.stack}}),f}var ca=ct.reduce(function(s,o){return["Syntax","Type","Range"].indexOf(o)===-1&&(s[o+"Error"]=me[o]),s},{});ca.ModifyError=zr,ca.DexieError=Er,ca.BulkError=Ct;function nt(){}function Qa(s){return s}function bu(s,o){return s==null||s===Qa?o:function(f){return o(s(f))}}function di(s,o){return function(){s.apply(this,arguments),o.apply(this,arguments)}}function Oh(s,o){return s===nt?o:function(){var f=s.apply(this,arguments);f!==void 0&&(arguments[0]=f);var h=this.onsuccess,m=this.onerror;this.onsuccess=null,this.onerror=null;var b=o.apply(this,arguments);return h&&(this.onsuccess=this.onsuccess?di(h,this.onsuccess):h),m&&(this.onerror=this.onerror?di(m,this.onerror):m),b!==void 0?b:f}}function Eu(s,o){return s===nt?o:function(){s.apply(this,arguments);var f=this.onsuccess,h=this.onerror;this.onsuccess=this.onerror=null,o.apply(this,arguments),f&&(this.onsuccess=this.onsuccess?di(f,this.onsuccess):f),h&&(this.onerror=this.onerror?di(h,this.onerror):h)}}function El(s,o){return s===nt?o:function(f){var h=s.apply(this,arguments);l(f,h);var m=this.onsuccess,b=this.onerror;this.onsuccess=null,this.onerror=null;var T=o.apply(this,arguments);return m&&(this.onsuccess=this.onsuccess?di(m,this.onsuccess):m),b&&(this.onerror=this.onerror?di(b,this.onerror):b),h===void 0?T===void 0?void 0:T:l(h,T)}}function Dh(s,o){return s===nt?o:function(){return o.apply(this,arguments)===!1?!1:s.apply(this,arguments)}}function js(s,o){return s===nt?o:function(){var f=s.apply(this,arguments);if(f&&typeof f.then=="function"){for(var h=this,m=arguments.length,b=new Array(m);m--;)b[m]=arguments[m];return f.then(function(){return o.apply(h,b)})}return o.apply(this,arguments)}}var on=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function vl(s,o){on=s}var Ne={},kt=100,Rt=typeof Promise>"u"?[]:function(){var s=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[s,d(s),s];var o=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[o,d(o),s]}(),ur=Rt[0],Sn=Rt[1],Ri=Rt[2],vu=Sn&&Sn.then,cr=ur&&ur.constructor,Zt=!!Ri;function la(){queueMicrotask(GS)}var Cn=function(s,o){Tu.push([s,o]),Kn&&(la(),Kn=!1)},Yn=!0,Kn=!0,un=[],Xa=[],kh=Qa,fa={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:nt,pgp:!1,env:{},finalize:nt},be=fa,Tu=[],Za=0,Tl=[];function de(s){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var o=this._PSD=be;if(typeof s!="function"){if(s!==Ne)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&Lh(this,this._value);return}this._state=null,this._value=null,++o.ref,o_(this,s)}var Rh={get:function(){var s=be,o=wl;function f(h,m){var b=this,T=!s.global&&(s!==be||o!==wl),A=T&&!ha(),S=new de(function(O,$){Ph(b,new s_(l_(h,s,T,A),l_(m,s,T,A),O,$,s))});return this._consoleTask&&(S._consoleTask=this._consoleTask),S}return f.prototype=Ne,f},set:function(s){y(this,"then",s&&s.prototype===Ne?Rh:{get:function(){return s},set:Rh.set})}};E(de.prototype,{then:Rh,_then:function(s,o){Ph(this,new s_(null,null,s,o,be))},catch:function(s){if(arguments.length===1)return this.then(null,s);var o=arguments[0],f=arguments[1];return typeof o=="function"?this.then(null,function(h){return h instanceof o?f(h):xl(h)}):this.then(null,function(h){return h&&h.name===o?f(h):xl(h)})},finally:function(s){return this.then(function(o){return de.resolve(s()).then(function(){return o})},function(o){return de.resolve(s()).then(function(){return xl(o)})})},timeout:function(s,o){var f=this;return s<1/0?new de(function(h,m){var b=setTimeout(function(){return m(new me.Timeout(o))},s);f.then(h,m).finally(clearTimeout.bind(null,b))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&y(de.prototype,Symbol.toStringTag,"Dexie.Promise"),fa.env=c_();function s_(s,o,f,h,m){this.onFulfilled=typeof s=="function"?s:null,this.onRejected=typeof o=="function"?o:null,this.resolve=f,this.reject=h,this.psd=m}E(de,{all:function(){var s=ut.apply(null,arguments).map(Sl);return new de(function(o,f){s.length===0&&o([]);var h=s.length;s.forEach(function(m,b){return de.resolve(m).then(function(T){s[b]=T,--h||o(s)},f)})})},resolve:function(s){if(s instanceof de)return s;if(s&&typeof s.then=="function")return new de(function(f,h){s.then(f,h)});var o=new de(Ne,!0,s);return o},reject:xl,race:function(){var s=ut.apply(null,arguments).map(Sl);return new de(function(o,f){s.map(function(h){return de Line truncated
`).map(i=>{let a=i.match(/^\s+/);if(a===null)return i;let[u]=a;return u.length>=n.length?i.slice(n.length):i}).join(`
`)}var Ls=class{options;rules;lexer;constructor(t){this.options=t||Tt.defaults}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let n=r[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Td(n,`
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let n=r[0],i=bR(n,r[3]||"");return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let n=r[2].trim();if(/#$/.test(n)){let i=Td(n,"#");(this.options.pedantic||!i||/ $/.test(i))&&(n=i.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:r[0]}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let n=r[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
$1`);n=Td(n.replace(/^ *>[ \t]?/gm,""),`
`);let i=this.lexer.state.top;this.lexer.state.top=!0;let a=this.lexer.blockTokens(n);return this.lexer.state.top=i,{type:"blockquote",raw:r[0],tokens:a,text:n}}}list(t){let r=this.rules.block.list.exec(t);if(r){let n=r[1].trim(),i=n.length>1,a={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let u=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),l="",d="",p=!1;for(;t;){let g=!1;if(!(r=u.exec(t))||this.rules.block.hr.test(t))break;l=r[0],t=t.substring(l.length);let E=r[2].split(`
`,1)[0].replace(/^\t+/,N=>" ".repeat(3*N.length)),_=t.split(`
`,1)[0],y=0;this.options.pedantic?(y=2,d=E.trimStart()):(y=r[2].search(/[^ ]/),y=y>4?1:y,d=E.slice(y),y+=r[1].length);let C=!1;if(!E&&/^ *$/.test(_)&&(l+=_+`
`,t=t.substring(_.length+1),g=!0),!g){let N=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),L=new RegExp(`^ {0,${Math.min(3,y-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),H=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:\`\`\`|~~~)`),R=new RegExp(`^ {0,${Math.min(3,y-1)}}#`);for(;t;){let B=t.split(`
`,1)[0];if(_=B,this.options.pedantic&&(_=_.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),H.test(_)||R.test(_)||N.test(_)||L.test(t))break;if(_.search(/[^ ]/)>=y||!_.trim())d+=`
`+_.slice(y);else{if(C||E.search(/[^ ]/)>=4||H.test(E)||R.test(E)||L.test(E))break;d+=`
`+_}!C&&!_.trim()&&(C=!0),l+=B+`
`,t=t.substring(B.length+1),E=_.slice(y)}}a.loose||(p?a.loose=!0:/\n *\n *$/.test(l)&&(p=!0));let D=null,P;this.options.gfm&&(D=/^\[[ xX]\] /.exec(d),D&&(P=D[0]!=="[ ] ",d=d.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:l,task:!!D,checked:P,loose:!1,text:d,tokens:[]}),a.raw+=l}a.items[a.items.length-1].raw=l.trimEnd(),a.items[a.items.length-1].text=d.trimEnd(),a.raw=a.raw.trimEnd();for(let g=0;g<a.items.length;g++)if(this.lexer.state.top=!1,a.items[g].tokens=this.lexer.blockTokens(a.items[g].text,[]),!a.loose){let E=a.items[g].tokens.filter(y=>y.type==="space"),_=E.length>0&&E.some(y=>/\n.*\n/.test(y.raw));a.loose=_}if(a.loose)for(let g=0;g<a.items.length;g++)a.items[g].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let n=r[1].toLowerCase().replace(/\s+/g," "),i=r[2]?r[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:i,title:a}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!/[:|]/.test(r[2]))return;let n=vA(r[1]),i=r[2].replace(/^\||\| *$/g,"").split("|"),a=r[3]&&r[3].trim()?r[3].replace(/\n[ \t]*$/,"").split(`
`):[],u={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let l of i)/^ *-+: *$/.test(l)?u.align.push("right"):/^ *:-+: *$/.test(l)?u.align.push("center"):/^ *:-+ *$/.test(l)?u.align.push("left"):u.align.push(null);for(let l of n)u.header.push({text:l,tokens:this.lexer.inline(l)});for(let l of a)u.rows.push(vA(l,u.header.length).map(d=>({text:d,tokens:this.lexer.inline(d)})));return u}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let n=r[1].charAt(r[1].length-1)===`
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:xn(r[1])}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&/^<a /i.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let n=r[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;let u=Td(n.slice(0,-1),"\\");if((n.length-u.length)%2===0)return}else{let u=_R(r[2],"()");if(u>-1){let d=(r[0].indexOf("!")===0?5:4)+r[1].length+u;r[2]=r[2].substring(0,u),r[0]=r[0].substring(0,d).trim(),r[3]=""}}let i=r[2],a="";if(this.options.pedantic){let u=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);u&&(i=u[1],a=u[3])}else a=r[3]?r[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(n)?i=i.slice(1):i=i.slice(1,-1)),TA(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer)}}reflink(t,r){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let i=(n[2]||n[1]).replace(/\s+/g," "),a=r[i.toLowerCase()];if(!a){let u=n[0].charAt(0);return{type:"text",raw:u,text:u}}return TA(n,a,n[0],this.lexer)}}emStrong(t,r,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i||i[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!n||this.rules.inline.punctuation.exec(n)){let u=[...i[0]].length-1,l,d,p=u,g=0,E=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(E.lastIndex=0,r=r.slice(-1*t.length+u);(i=E.exec(r))!=null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l)continue;if(d=[...l].length,i[3]||i[4]){p+=d;continue}else if((i[5]||i[6])&&u%3&&!((u+d)%3)){g+=d;continue}if(p-=d,p>0)continue;d=Math.min(d,d+p+g);let _=[...i[0]][0].length,y=t.slice(0,u+i.index+_+d);if(Math.min(u,d)%2){let D=y.slice(1,-1);return{type:"em",raw:y,text:D,tokens:this.lexer.inlineTokens(D)}}let C=y.slice(2,-2);return{type:"strong",raw:y,text:C,tokens:this.lexer.inlineTokens(C)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let n=r[2].replace(/\n/g," "),i=/[^ ]/.test(n),a=/^ /.test(n)&&/ $/.test(n);return i&&a&&(n=n.substring(1,n.length-1)),n=xn(n,!0),{type:"codespan",raw:r[0],text:n}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let n,i;return r[2]==="@"?(n=xn(r[1]),i="mailto:"+n):(n=xn(r[1]),i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let n,i;if(r[2]==="@")n=xn(r[0]),i="mailto:"+n;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);n=xn(r[0]),r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let n;return this.lexer.state.inRawBlock?n=r[0]:n=xn(r[0]),{type:"text",raw:r[0],text:n}}}},ER=/^(?: *(?:\n|$))+/,vR=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,TR=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Hc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,xR=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,SA=/(?:[*+-]|\d{1,9}[.)])/,CA=dt(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,SA).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),R0=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,yR=/^[^\n]+/,L0=/(?!\s*\])(?:\\.|[^\[\]\\])+/,AR=dt(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",L0).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),wR=dt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,SA).getRegex(),Sd="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|heaLine truncated
]`).replace("lheading",CA).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},NA=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,OR=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,OA=/^( {2,}|\\)\n(?!\s*$)/,DR=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Uc="\\p{P}\\p{S}",kR=dt(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Uc).getRegex(),RR=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,LR=dt(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Uc).getRegex(),PR=dt("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Uc).getRegex(),MR=dt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Uc).getRegex(),FR=dt(/\\([punct])/,"gu").replace(/punct/g,Uc).getRegex(),BR=dt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),$R=dt(P0).replace("(?:-->|$)","-->").getRegex(),HR=dt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",$R).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),yd=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,UR=dt(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",yd).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),DA=dt(/^!?\[(label)\]\[(ref)\]/).replace("label",yd).replace("ref",L0).getRegex(),kA=dt(/^!?\[(ref)\](?:\[\])?/).replace("ref",L0).getRegex(),VR=dt("reflink|nolink(?!\\()","g").replace("reflink",DA).replace("nolink",kA).getRegex(),F0={_backpedal:$c,anyPunctuation:FR,autolink:BR,blockSkip:RR,br:OA,code:OR,del:$c,emStrongLDelim:LR,emStrongRDelimAst:PR,emStrongRDelimUnd:MR,escape:NA,link:UR,nolink:kA,punctuation:kR,reflink:DA,reflinkSearch:VR,tag:HR,text:DR,url:$c},qR={...F0,link:dt(/^!?\[(label)\]\((.*?)\)/).replace("label",yd).getRegex(),reflink:dt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",yd).getRegex()},k0={...F0,escape:dt(NA).replace("])","~|])").getRegex(),url:dt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},zR={...k0,br:dt(OA).replace("{2,}","*").getRegex(),text:dt(k0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},xd={normal:M0,gfm:IR,pedantic:NR},Bc={normal:F0,gfm:k0,breaks:zR,pedantic:qR},yn=class{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Tt.defaults,this.options.tokenizer=this.options.tokenizer||new Ls,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={block:xd.normal,inline:Bc.normal};this.options.pedantic?(r.block=xd.pedantic,r.inline=Bc.pedantic):this.options.gfm&&(r.block=xd.gfm,this.options.breaks?r.inline=Bc.breaks:r.inline=Bc.gfm),this.tokenizer.rules=r}static get rules(){return{block:xd,inline:Bc}}static lex(t,r){return new yn(r).lex(t)}static lexInline(t,r){return new yn(r).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(l,d,p)=>d+" ".repeat(p.length));let n,i,a,u;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(n=l.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length),n.raw.length===1&&r.length>0?r[r.length-1].raw+=`
`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length),i=r[r.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+n.raw,i.text+=`
`+n.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length),i=r[r.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+n.raw,i.text+=`
`+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(a=t,this.options.extensions&&this.options.extensions.startBlock){let l=1/0,d=t.slice(1),p;this.options.extensions.startBlock.forEach(g=>{p=g.call({lexer:this},d),typeof p=="number"&&p>=0&&(l=Math.min(l,p))}),l<1/0&&l>=0&&(a=t.substring(0,l+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){i=r[r.length-1],u&&i.type==="paragraph"?(i.raw+=`
`+n.raw,i.text+=`
`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(n),u=a.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length),i=r[r.length-1],i&&i.type==="text"?(i.raw+=`
`+n.raw,i.text+=`
`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(n);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let n,i,a,u=t,l,d,p;if(this.tokens.links){let g=Object.keys(this.tokens.links);if(g.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(u))!=null;)g.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(u=u.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(u))!=null;)u=u.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(u))!=null;)u=u.slice(0,l.index)+"++"+u.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(d||(p=""),d=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(g=>(n=g.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),i=r[r.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length),i=r[r.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(n=this.tokenizer.emStrong(t,u,p)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length),r.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),r.push(n);continue}if(a=t,this.options.extensions&&this.options.extensions.startInline){let g=1/0,E=t.slice(1),_;this.options.extensions.startInline.forEach(y=>{_=y.call({lexer:this},E),typeof _=="number"&&_>=0&&(g=Math.min(g,_))}),g<1/0&&g>=0&&(a=t.substring(0,g+1))}if(n=this.tokenizer.inlineText(a)){t=t.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(p=n.raw.slice(-1)),d=!0,i=r[r.length-1],i&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(t){let g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},Ps=class{options;constructor(t){this.options=t||Tt.defaults}code(t,r,n){let i=(r||"").match(/^\S*/)?.[0];return t=t.replace(/\n$/,"")+`
`,i?'<pre><code class="language-'+xn(i)+'">'+(n?t:xn(t,!0))+`</code></pre>
`:"<pre><code>"+(n?t:xn(t,!0))+`</code></pre>
`}blockquote(t){return`<blockquote>
${t}</blockquote>
`}html(t,r){return t}heading(t,r,n){return`<h${r}>${t}</h${r}>
`}hr(){return`<hr>
`}list(t,r,n){let i=r?"ol":"ul",a=r&&n!==1?' start="'+n+'"':"";return"<"+i+a+`>
`+t+"</"+i+`>
`}listitem(t,r,n){return`<li>${t}</li>
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){return`<p>${t}</p>
`}table(t,r){return r&&(r=`<tbody>${r}</tbody>`),`<table>
<thead>
`+t+`</thead>
`+r+`</table>
`}tablerow(t){return`<tr>
${t}</tr>
`}tablecell(t,r){let n=r.header?"th":"td";return(r.align?`<${n} align="${r.align}">`:`<${n}>`)+t+`</${n}>
`}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return"<br>"}del(t){return`<del>${t}</del>`}link(t,r,n){let i=EA(t);if(i===null)return n;t=i;let a='<a href="'+t+'"';return r&&(a+=' title="'+r+'"'),a+=">"+n+"</a>",a}image(t,r,n){let i=EA(t);if(i===null)return n;t=i;let a=`<img src="${t}" alt="${n}"`;return r&&(a+=` title="${r}"`),a+=">",a}text(t){return t}},Ko=class{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,r,n){return""+n}image(t,r,n){return""+n}br(){return""}},An=class{options;renderer;textRenderer;constructor(t){this.options=t||Tt.defaults,this.options.renderer=this.options.renderer||new Ps,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ko}static parse(t,r){return new An(r).parse(t)}static parseInline(t,r){return new An(r).parseInline(t)}parse(t,r=!0){let n="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){let u=a,l=this.options.extensions.renderers[u.type].call({parser:this},u);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(u.type)){n+=l||"";continue}}switch(a.type){case"space":continue;case"hr":{n+=this.renderer.hr();continue}case"heading":{let u=a;n+=this.renderer.heading(this.parseInline(u.tokens),u.depth,mR(this.parseInline(u.tokens,this.textRenderer)));continue}case"code":{let u=a;n+=this.renderer.code(u.text,u.lang,!!u.escaped);continue}case"table":{let u=a,l="",d="";for(let g=0;g<u.header.length;g++)d+=this.renderer.tablecell(this.parseInline(u.header[g].tokens),{header:!0,align:u.align[g]});l+=this.renderer.tablerow(d);let p="";for(let g=0;g<u.rows.length;g++){let E=u.rows[g];d="";for(let _=0;_<E.length;_++)d+=this.renderer.tablecell(this.parseInline(E[_].tokens),{header:!1,align:u.align[_]});p+=this.renderer.tablerow(d)}n+=this.renderer.table(l,p);continue}case"blockquote":{let u=a,l=this.parse(u.tokens);n+=this.renderer.blockquote(l);continue}case"list":{let u=a,l=u.ordered,d=u.start,p=u.loose,g="";for(let E=0;E<u.items.length;E++){let _=u.items[E],y=_.checked,C=_.task,D="";if(_.task){let P=this.renderer.checkbox(!!y);p?_.tokens.length>0&&_.tokens[0].type==="paragraph"?(_.tokens[0].text=P+" "+_.tokens[0].text,_.tokens[0].tokens&&_.tokens[0].tokens.length>0&&_.tokens[0].tokens[0].type==="text"&&(_.tokens[0].tokens[0].text=P+" "+_.tokens[0].tokens[0].text)):_.tokens.unshift({type:"text",text:P+" "}):D+=P+" "}D+=this.parse(_.tokens,p),g+=this.renderer.listitem(D,C,!!y)}n+=this.renderer.list(g,l,d);continue}case"html":{let u=a;n+=this.renderer.html(u.text,u.block);continue}case"paragraph":{let u=a;n+=this.renderer.paragraph(this.parseInline(u.tokens));continue}case"text":{let u=a,l=u.tokens?this.parseInline(u.tokens):u.text;for(;i+1<t.length&&t[i+1].type==="text";)u=t[++i],l+=`
`+(u.tokens?this.parseInline(u.tokens):u.text);n+=r?this.renderer.paragraph(l):l;continue}default:{let u='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}parseInline(t,r){r=r||this.renderer;let n="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){let u=this.options.extensions.renderers[a.type].call({parser:this},a);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=u||"";continue}}switch(a.type){case"escape":{let u=a;n+=r.text(u.text);break}case"html":{let u=a;n+=r.html(u.text);break}case"link":{let u=a;n+=r.link(u.href,u.title,this.parseInline(u.tokens,r));break}case"image":{let u=a;n+=r.image(u.href,u.title,u.text);break}case"strong":{let u=a;n+=r.strong(this.parseInline(u.tokens,r));break}case"em":{let u=a;n+=r.em(this.parseInline(u.tokens,r));break}case"codespan":{let u=a;n+=r.codespan(u.text);break}case"br":{n+=r.br();break}case"del":{let u=a;n+=r.del(this.parseInline(u.tokens,r));break}case"text":{let u=a;n+=r.text(u.text);break}default:{let u='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}},Ba=class{options;constructor(t){this.options=t||Tt.defaults}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}};zl(Ba,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var Ad=class{defaults=wd();options=this.setOptions;parse=this.#e(yn.lex,An.parse);parseInline=this.#e(yn.lexInline,An.parseInline);Parser=An;Renderer=Ps;TextRenderer=Ko;Lexer=yn;Tokenizer=Ls;Hooks=Ba;constructor(...t){this.use(...t)}walkTokens(t,r){let n=[];for(let i of t)switch(n=n.concat(r.call(this,i)),i.type){case"table":{let a=i;for(let u of a.header)n=n.concat(this.walkTokens(u.tokens,r));for(let u of a.rows)for(let l of u)n=n.concat(this.walkTokens(l.tokens,r));break}case"list":{let a=i;n=n.concat(this.walkTokens(a.items,r));break}default:{let a=i;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(u=>{let l=a[u].flat(1/0);n=n.concat(this.walkTokens(l,r))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,r)))}}return n}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let u=r.renderers[a.name];u?r.renderers[a.name]=function(...l){let d=a.renderer.apply(this,l);return d===!1&&(d=u.apply(this,l)),d}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let u=r[a.level];u?u.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),i.extensions=r),n.renderer){let a=this.defaults.renderer||new Ps(this.defaults);for(let u in n.renderer){if(!(u in a))throw new Error(`renderer '${u}' does not exist`);if(u==="options")continue;let l=u,d=n.renderer[l],p=a[l];a[l]=(...g)=>{let E=d.apply(a,g);return E===!1&&(E=p.apply(a,g)),E||""}}i.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new Ls(this.defaults);for(let u in n.tokenizer){if(!(u in a))throw new Error(`tokenizer '${u}' does not exist`);if(["options","rules","lexer"].includes(u))continue;let l=u,d=n.tokenizer[l],p=a[l];a[l]=(...g)=>{let E=d.apply(a,g);return E===!1&&(E=p.apply(a,g)),E}}i.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new Ba;for(let u in n.hooks){if(!(u in a))throw new Error(`hook '${u}' does not exist`);if(u==="options")continue;let l=u,d=n.hooks[l],p=a[l];Ba.passThroughHooks.has(u)?a[l]=g=>{if(this.defaults.async)return Promise.resolve(d.call(a,g)).then(_=>p.call(a,_));let E=d.call(a,g);return p.call(a,E)}:a[l]=(...g)=>{let E=d.apply(a,g);return E===!1&&(E=p.apply(a,g)),E}}i.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,u=n.walkTokens;i.walkTokens=function(l){let d=[];return d.push(u.call(this,l)),a&&(d=d.concat(a.call(this,l))),d}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return yn.lex(t,r??this.defaults)}parser(t,r){return An.parse(t,r??this.defaults)}#e(t,r){return(n,i)=>{let a={...i},u={...this.defaults,...a};this.defaults.async===!0&&a.async===!1&&(u.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),u.async=!0);let l=this.#t(!!u.silent,!!u.async);if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined o Line truncated
Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+xn(n.message+"",!0)+"</pre>";return r?Promise.resolve(i):i}if(r)return Promise.reject(n);throw n}}},Ms=new Ad;function st(e,t){return Ms.parse(e,t)}st.options=st.setOptions=function(e){return Ms.setOptions(e),st.defaults=Ms.defaults,yA(st.defaults),st};st.getDefaults=wd;st.defaults=Tt.defaults;st.use=function(...e){return Ms.use(...e),st.defaults=Ms.defaults,yA(st.defaults),st};st.walkTokens=function(e,t){return Ms.walkTokens(e,t)};st.parseInline=Ms.parseInline;st.Parser=An;st.parser=An.parse;st.Renderer=Ps;st.TextRenderer=Ko;st.Lexer=yn;st.lexer=yn.lex;st.Tokenizer=Ls;st.Hooks=Ba;st.parse=st;var YR=st.options,KR=st.setOptions,jR=st.use,WR=st.walkTokens,GR=st.parseInline,QR=st,XR=An.parse,ZR=yn.lex;Tt.Hooks=Ba;Tt.Lexer=yn;Tt.Marked=Ad;Tt.Parser=An;Tt.Renderer=Ps;Tt.TextRenderer=Ko;Tt.Tokenizer=Ls;Tt.getDefaults=wd;Tt.lexer=ZR;Tt.marked=st;Tt.options=YR;Tt.parse=QR;Tt.parseInline=GR;Tt.parser=XR;Tt.setOptions=KR;Tt.use=jR;Tt.walkTokens=WR});function LA(e){return e.type===Ze.Tag||e.type===Ze.Script||e.type===Ze.Style}var Ze,PA,MA,FA,BA,$A,HA,UA,VA,qA,jo=v(()=>{(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(Ze||(Ze={}));PA=Ze.Root,MA=Ze.Text,FA=Ze.Directive,BA=Ze.Comment,$A=Ze.Script,HA=Ze.Style,UA=Ze.Tag,VA=Ze.CDATA,qA=Ze.Doctype});function _e(e){return LA(e)}function Wo(e){return e.type===Ze.CDATA}function nn(e){return e.type===Ze.Text}function Hs(e){return e.type===Ze.Comment}function Id(e){return e.type===Ze.Directive}function Bn(e){return e.type===Ze.Root}function ht(e){return Object.prototype.hasOwnProperty.call(e,"children")}function Go(e,t=!1){let r;if(nn(e))r=new Oi(e.data);else if(Hs(e))r=new Fs(e.data);else if(_e(e)){let n=t?B0(e.children):[],i=new $s(e.name,{...e.attribs},n);n.forEach(a=>a.parent=i),e.namespace!=null&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]={...e["x-attribsPrefix"]}),r=i}else if(Wo(e)){let n=t?B0(e.children):[],i=new zc(n);n.forEach(a=>a.parent=i),r=i}else if(Bn(e)){let n=t?B0(e.children):[],i=new wn(n);n.forEach(a=>a.parent=i),e["x-mode"]&&(i["x-mode"]=e["x-mode"]),r=i}else if(Id(e)){let n=new Bs(e.name,e.data);e["x-name"]!=null&&(n["x-name"]=e["x-name"],n["x-publicId"]=e["x-publicId"],n["x-systemId"]=e["x-systemId"]),r=n}else throw new Error(`Not implemented yet: ${e.type}`);return r.startIndex=e.startIndex,r.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function B0(e){let t=e.map(r=>Go(r,!0));for(let r=1;r<t.length;r++)t[r].prev=t[r-1],t[r-1].next=t[r];return t}var Cd,Vc,Oi,Fs,Bs,qc,zc,wn,$s,$0=v(()=>{jo();Cd=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return Go(this,t)}},Vc=class extends Cd{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}},Oi=class extends Vc{constructor(){super(...arguments),this.type=Ze.Text}get nodeType(){return 3}},Fs=class extends Vc{constructor(){super(...arguments),this.type=Ze.Comment}get nodeType(){return 8}},Bs=class extends Vc{constructor(t,r){super(r),this.name=t,this.type=Ze.Directive}get nodeType(){return 1}},qc=class extends Cd{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}},zc=class extends qc{constructor(){super(...arguments),this.type=Ze.CDATA}get nodeType(){return 4}},wn=class extends qc{constructor(){super(...arguments),this.type=Ze.Root}get nodeType(){return 9}},$s=class extends qc{constructor(t,r,n=[],i=t==="script"?Ze.Script:t==="style"?Ze.Style:Ze.Tag){super(n),this.name=t,this.attribs=r,this.type=i}get nodeType(){return 1}get tagName(){return this.name}set tagName(t){this.name=t}get attributes(){return Object.keys(this.attribs).map(t=>{var r,n;return{name:t,value:this.attribs[t],namespace:(r=this["x-attribsNamespace"])===null||r===void 0?void 0:r[t],prefix:(n=this["x-attribsPrefix"])===null||n===void 0?void 0:n[t]}})}}});var YA,Qo,_r=v(()=>{jo();$0();$0();YA={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},Qo=class{constructor(t,r,n){this.dom=[],this.root=new wn(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof r=="function"&&(n=r,r=YA),typeof t=="object"&&(r=t,t=void 0),this.callback=t??null,this.options=r??YA,this.elementCB=n??null}onparserinit(t){this.parser=t} Line truncated
`:kd(e.children):Wo(e)?kd(e.children):nn(e)?e.data:""}function ra(e){return Array.isArray(e)?e.map(ra).join(""):ht(e)&&!Hs(e)?ra(e.children):nn(e)?e.data:""}function jc(e){return Array.isArray(e)?e.map(jc).join(""):ht(e)&&(e.type===Ze.Tag||Wo(e))?jc(e.children):nn(e)?e.data:""}var X0=v(()=>{_r();Q0();jo()});function ru(e){return ht(e)?e.children:[]}function c2(e){return e.parent||null}function Z0(e){let t=c2(e);if(t!=null)return ru(t);let r=[e],{prev:n,next:i}=e;for(;n!=null;)r.unshift(n),{prev:n}=n;for(;i!=null;)r.push(i),{next:i}=i;return r}function EL(e,t){var r;return(r=e.attribs)===null||r===void 0?void 0:r[t]}function vL(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function TL(e){return e.name}function Rd(e){let{next:t}=e;for(;t!==null&&!_e(t);)({next:t}=t);return t}function Ld(e){let{prev:t}=e;for(;t!==null&&!_e(t);)({prev:t}=t);return t}var l2=v(()=>{_r()});function na(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){let t=e.parent.children,r=t.lastIndexOf(e);r>=0&&t.splice(r,1)}e.next=null,e.prev=null,e.parent=null}function xL(e,t){let r=t.prev=e.prev;r&&(r.next=t);let n=t.next=e.next;n&&(n.prev=t);let i=t.parent=e.parent;if(i){let a=i.children;a[a.lastIndexOf(e)]=t,e.parent=null}}function yL(e,t){if(na(t),t.next=null,t.parent=e,e.children.push(t)>1){let r=e.children[e.children.length-2];r.next=t,t.prev=r}else t.prev=null}function AL(e,t){na(t);let{parent:r}=e,n=e.next;if(t.next=n,t.prev=e,e.next=t,t.parent=r,n){if(n.prev=t,r){let i=r.children;i.splice(i.lastIndexOf(n),0,t)}}else r&&r.children.push(t)}function wL(e,t){if(na(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){let r=e.children[1];r.prev=t,t.next=r}else t.next=null}function SL(e,t){na(t);let{parent:r}=e;if(r){let n=r.children;n.splice(n.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=r,t.prev=e.prev,t.next=e,e.prev=t}var f2=v(()=>{});function nu(e,t,r=!0,n=1/0){return Pd(e,Array.isArray(t)?t:[t],r,n)}function Pd(e,t,r,n){let i=[],a=[Array.isArray(t)?t:[t]],u=[0];for(;;){if(u[0]>=a[0].length){if(u.length===1)return i;a.shift(),u.shift();continue}let l=a[0][u[0]++];if(e(l)&&(i.push(l),--n<=0))return i;r&&ht(l)&&l.children.length>0&&(u.unshift(0),a.unshift(l.children))}}function CL(e,t){return t.find(e)}function Md(e,t,r=!0){let n=Array.isArray(t)?t:[t];for(let i=0;i<n.length;i++){let a=n[i];if(_e(a)&&e(a))return a;if(r&&ht(a)&&a.children.length>0){let u=Md(e,a.children,!0);if(u)return u}}return null}function d2(e,t){return(Array.isArray(t)?t:[t]).some(r=>_e(r)&&e(r)||ht(r)&&d2(e,r.children))}function IL(e,t){let r=[],n=[Array.isArray(t)?t:[t]],i=[0];for(;;){if(i[0]>=n[0].length){if(n.length===1)return r;n.shift(),i.shift();continue}let a=n[0][i[0]++];_e(a)&&e(a)&&r.push(a),ht(a)&&a.children.length>0&&(i.unshift(0),n.unshift(a.children))}}var J0=v(()=>{_r()});function eg(e,t){return typeof t=="function"?r=>_e(r)&&t(r.attribs[e]):r=>_e(r)&&r.attribs[e]===t}function NL(e,t){return r=>e(r)||t(r)}function h2(e){let t=Object.keys(e).map(r=>{let n=e[r];return Object.prototype.hasOwnProperty.call(Fd,r)?Fd[r](n):eg(r,n)});return t.length===0?null:t.reduce(NL)}function OL(e,t){let r=h2(e);return r?r(t):!0}function DL(e,t,r,n=1/0){let i=h2(e);return i?nu(i,t,r,n):[]}function kL(e,t,r=!0){return Array.isArray(t)||(t=[t]),Md(eg("id",e),t,r)}function Us(e,t,r=!0,n=1/0){return nu(Fd.tag_name(e),t,r,n)}function RL(e,t,r=!0,n=1/0){return nu(eg("class",e),t,r,n)}function LL(e,t,r=!0,n=1/0){return nu(Fd.tag_type(e),t,r,n)}var Fd,tg=v(()=>{_r();J0();Fd={tag_name(e){return typeof e=="function"?t=>_e(t)&&e(t.name):e==="*"?_e:t=>_e(t)&&t.name===e},tag_type(e){return typeof e=="function"?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e=="function"?t=>nn(t)&&e(t.data):t=>nn(t)&&t.data===e}}});function PL(e){let t=e.length;for(;--t>=0;){let r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0){e.splice(t,1);continue}for(let n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e}function p2(e,t){let r=[],n=[];if(e===t)return 0;let i=ht(e)?e:e.parent;for(;i;)r.unshift(i),i=i.parent;for(i=ht(t)?t:t.parent;i;)n.unshift(i),i=i.parent;let a=Math.min(r.length,n.length),u=0;for(;u<a&&r[u]===n[u];)u++;if(u===0)return $n.DISCONNECTED;let l=r[u-1],d=l.children,p=r[u],g=n[u];return d.indexOf(p)>d.indexOf(g)?l===t?$n.FOLLOWING|$n.CONTAINED_BY:$n.FOLLOWING:l===e?$n.PRECEDING|$n.CONTAINS:$n.PRECEDING}function Ua(e){return e=e.filter((t,r,n)=>!n.includes(t,r+1)),e.sort((t,r)=>{let n=p2(t,r);return n&$n.PRECEDING?-1:n&$n.FOLLOWING?1:0}),e}var $n,m2=v(()=>{_r();(function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"})($n||($n={}))});function rg(e){let t=Bd(HL,e);return t?t.name==="feed"?ML(t):FL(t):null}function ML(e){var t;let r=e.children,n={type:"atom",items:Us("entry",r).map(u=>{var l;let{children:d}=u,p={media:g2(d)};an(p,"id","id",d),an(p,"title","title",d);let g=(l=Bd Line truncated
:is(button, input, select, textarea, optgroup, option)[disabled],
optgroup[disabled] > option,
fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
)`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"}});function vg(e,t){return e===Un.default.falseFunc?Un.default.falseFunc:r=>t.isTag(r)&&e(r)}function Tg(e,t){let r=t.getSiblings(e);if(r.length<=1)return[];let n=r.indexOf(e);return n<0||n===r.length-1?[]:r.slice(n+1).filter(t.isTag)}function bg(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}var Un,Eg,_g,qd,zd=v(()=>{Un=ln(za(),1);hg();Eg={};_g=(e,t,r,n,i)=>{let a=i(t,bg(r),n);return a===Un.default.trueFunc?e:a===Un.default.falseFunc?Un.default.falseFunc:u=>a(u)&&e(u)},qd={is:_g,matches:_g,where:_g,not(e,t,r,n,i){let a=i(t,bg(r),n);return a===Un.default.falseFunc?e:a===Un.default.trueFunc?Un.default.falseFunc:u=>!a(u)&&e(u)},has(e,t,r,n,i){let{adapter:a}=r,u=bg(r);u.relativeSelector=!0;let l=t.some(g=>g.some(el))?[Eg]:void 0,d=i(t,u,l);if(d===Un.default.falseFunc)return Un.default.falseFunc;let p=vg(d,a);if(l&&d!==Un.default.trueFunc){let{shouldTestNextSiblings:g=!1}=d;return E=>{if(!e(E))return!1;l[0]=E;let _=a.getChildren(E),y=g?[..._,...Tg(E,a)]:_;return a.existsOne(p,y)}}return g=>e(g)&&a.existsOne(p,a.getChildren(g))}}});function G2(e,t,r,n,i){var a;let{name:u,data:l}=t;if(Array.isArray(l)){if(!(u in qd))throw new Error(`Unknown pseudo-class :${u}(${l})`);return qd[u](e,l,r,n,i)}let d=(a=r.pseudos)===null||a===void 0?void 0:a[u],p=typeof d=="string"?d:Vd[u];if(typeof p=="string"){if(l!=null)throw new Error(`Pseudo ${u} doesn't have any arguments`);let g=ia(p);return qd.is(e,g,r,n,i)}if(typeof d=="function")return gg(d,u,l,1),g=>d(g,l)&&e(g);if(u in cu)return cu[u](e,l,r,n);if(u in rl){let g=rl[u];return gg(g,u,l,2),E=>g(E,r,l)&&e(E)}throw new Error(`Unknown pseudo-class :${u}`)}var xg=v(()=>{ou();K2();j2();W2();zd()});function yg(e,t){let r=t.getParent(e);return r&&t.isTag(r)?r:null}function Q2(e,t,r,n,i){let{adapter:a,equals:u}=r;switch(t.type){case Ee.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case Ee.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case Ee.Attribute:{if(t.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!r.xmlMode||r.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),B2[t.action](e,t,r)}case Ee.Pseudo:return G2(e,t,r,n,i);case Ee.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:l}=t;return(!r.xmlMode||r.lowerCaseTags)&&(l=l.toLowerCase()),function(p){return a.getName(p)===l&&e(p)}}case Ee.Descendant:{if(r.cacheResults===!1||typeof WeakSet>"u")return function(p){let g=p;for(;g=yg(g,a);)if(e(g))return!0;return!1};let l=new WeakSet;return function(p){let g=p;for(;g=yg(g,a);)if(!l.has(g)){if(a.isTag(g)&&e(g))return!0;l.add(g)}return!1}}case"_flexibleDescendant":return function(d){let p=d;do if(e(p))return!0;while(p=yg(p,a));return!1};case Ee.Parent:return function(d){return a.getChildren(d).some(p=>a.isTag(p)&&e(p))};case Ee.Child:return function(d){let p=a.getParent(d);return p!=null&&a.isTag(p)&&e(p)};case Ee.Sibling:return function(d){let p=a.getSiblings(d);for(let g=0;g<p.length;g++){let E=p[g];if(u(d,E))break;if(a.isTag(E)&&e(E))return!0}return!1};case Ee.Adjacent:return a.prevElementSibling?function(d){let p=a.prevElementSibling(d);return p!=null&&e(p)}:function(d){let p=a.getSiblings(d),g;for(let E=0;E<p.length;E++){let _=p[E];if(u(d,_))break;a.isTag(_)&&(g=_)}return!!g&&e(g)};case Ee.Universal:{if(t.namespace!=null&&t.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}}var X2=v(()=>{$2();xg();ou()});function Z2(e,t,r){let n=Yd(e,t,r);return vg(n,t.adapter)}function Yd(e,t,r){let n=typeof e=="string"?ia(e):e;return Kd(n,t,r)}function J2(e){return e.type===Ee.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(J2)))}function gP(e,{adapter:t},r){let n=!!r?.every(i=>{let a=t.isTag(i)&&t.getParent(i);return i===Eg||a&&t.isTag(a)});for(let i of e){if(!(i.length>0&&el(i[0])&&i[0].type!==Ee.Descendant))if(n&&!i.some(J2))i.unshift(hP);else continue;i.unshift(mP)}}function Kd(e,t,r){var n;e.forEach(dg),r=(n=t.context)!==null&&n!==void 0?n:r;let i=Array.isArray(r),a=r&&(Arra Line truncated
`)})):{name:i,value:a.replace(Tw,`\r
`)}}).toArray()}var vw,C4,Tw,xw=v(()=>{_r();vw="input,select,textarea,keygen",C4=/%20/g,Tw=/\r?\n/g});var Vg={};Nn(Vg,{extract:()=>D4});function O4(e){var t;return typeof e=="string"?{selector:e,value:"textContent"}:{selector:e.selector,value:(t=e.value)!==null&&t!==void 0?t:"textContent"}}function D4(e){let t={};for(let r in e){let n=e[r],i=Array.isArray(n),{selector:a,value:u}=O4(i?n[0]:n),l=typeof u=="function"?u:typeof u=="string"?d=>this._make(d).prop(u):d=>this._make(d).extract(u);if(i)t[r]=this._findBySelector(a,Number.POSITIVE_INFINITY).map((d,p)=>l(p,r,t)).get();else{let d=this._findBySelector(a,1);t[r]=d.length>0?l(d[0],r,t):void 0}}return t}var yw=v(()=>{});var ja,Aw=v(()=>{N2();dw();gw();Ew();xw();yw();ja=class{constructor(t,r,n){if(this.length=0,this.options=n,this._root=r,t){for(let i=0;i<t.length;i++)this[i]=t[i];this.length=t.length}}};ja.prototype.cheerio="[cheerio object]";ja.prototype.splice=Array.prototype.splice;ja.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator];Object.assign(ja.prototype,cg,Fg,$g,Hg,Ug,Vg)});function ww(e,t){return function r(n,i,a=!0){if(n==null)throw new Error("cheerio.load() expects a string");let u=Wc(i),l=e(n,u,a,null);class d extends ja{_make(E,_){let y=p(E,_);return y.prevObject=this,y}_parse(E,_,y,C){return e(E,_,y,C)}_render(E){return t(E,this.options)}}function p(g,E,_=l,y){if(g&&Hn(g))return g;let C=Wc(y,u),D=typeof _=="string"?[e(_,C,!1,null)]:"length"in _?_:[_],P=Hn(D)?D:new d(D,null,C);if(P._root=P,!g)return new d(void 0,P,C);let N=typeof g=="string"&&Qc(g)?e(g,C,!1,null).children:k4(g)?[g]:Array.isArray(g)?g:void 0,L=new d(N,P,C);if(N)return L;if(typeof g!="string")throw new TypeError("Unexpected type of selector");let H=g,R=E?typeof E=="string"?Qc(E)?new d([e(E,C,!1,null)],P,C):(H=`${E} ${H}`,P):Hn(E)?E:new d(Array.isArray(E)?E:[E],P,C):P;return R?R.find(H):L}return Object.assign(p,ag,{load:r,_root:l,_options:u,fn:d.prototype,prototype:d.prototype}),p}}function k4(e){return!!e.name||e.type==="root"||e.type==="text"||e.type==="comment"}var Sw=v(()=>{ng();iu();Aw();au()});function Zd(e){return e>=55296&&e<=57343}function Cw(e){return e>=56320&&e<=57343}function Iw(e,t){return(e-55296)*1024+9216+t}function Jd(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function eh(e){return e>=64976&&e<=65007||R4.has(e)}var R4,xt,x,Vr,th=v(()=>{R4=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),xt="\uFFFD";(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(x||(x={}));Vr={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"}});var Y,al=v(()=>{(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeVal Line truncated
`)}else if(hc(t))try{let g=JSON.parse(await r.vault.cachedRead(n)),E=[],_=y=>{for(let C in y)typeof y[C]=="object"?_(y[C]):C==="content"&&E.push(y[C])};_(g),i=E.join(`\r
`)}catch(g){console.error("Omnisearch: Error while parsing Dataloom file",t),console.error(g)}else Mn(t)?this.plugin.settings.aiImageIndexing&&u?.canBeAnalyzed(n)?i=await u.analyzeImage(n):this.plugin.settings.imagesIndexing&&a?.canFileBeExtracted(t)&&(i=await a.extractText(n)):ti(t)&&this.plugin.settings.PDFIndexing&&a?.canFileBeExtracted(t)?i=await a.extractText(n):dv(t)&&this.plugin.settings.officeIndexing&&a?.canFileBeExtracted(t)?i=await a.extractText(n):this.plugin.notesIndexer.isFilenameIndexable(t)&&(i=n.path);i==null&&(ri(`Omnisearch: ${i} content for file`,n.path),i="");let l=r.metadataCache.getFileCache(n);if(l){let g=bv(this.plugin.app,n,l);for(let E of g.filter(_=>!this.documents.has(_))){let _=this.plugin.notesIndexer.generateIndexableNonexistingDocument(E,n.path)}if(l.frontmatter?.["excalidraw-plugin"]){let E=l.sections?.filter(_=>_.type==="comment")??[];for(let{start:_,end:y}of E.map(C=>C.position))i=i.substring(0,_.offset-1)+i.substring(y.offset)}}let d;this.plugin.settings.displayTitle==="#heading"?d=l?.headings?.find(g=>g.level===1)?.heading??"":d=l?.frontmatter?.[this.plugin.settings.displayTitle]??"";let p=fv(l);return{basename:n.basename,displayTitle:d,content:i,cleanedContent:cv(Gi(i)),path:n.path,mtime:n.stat.mtime,tags:p,unmarkedTags:p.map(g=>g.replace("#","")),aliases:lv(l).join(""),headings1:l?wf(l,1).join(" "):"",headings2:l?wf(l,2).join(" "):"",headings3:l?wf(l,3).join(" "):""}}};Nr();bc();Nr();var Ah=class{constructor(t){this.plugin=t;this.notesToReindex=new Set}flagNoteForReindex(t){this.notesToReindex.add(t)}async refreshIndex(){for(let r of this.notesToReindex)Ke("Updating file",r.path),await this.plugin.documentsRepository.addDocument(r.path);let t=[...this.notesToReindex].map(r=>r.path);t.length&&(this.plugin.searchEngine.removeFromPaths(t),await this.plugin.searchEngine.addFromPaths(t),this.notesToReindex.clear())}isFileIndexable(t){return this.isFilenameIndexable(t)||this.isContentIndexable(t)}isContentIndexable(t){let r=this.plugin.settings,n=!!this.plugin.getTextExtractor(),i=!!this.plugin.getAIImageAnalyzer(),a=n&&r.PDFIndexing,u=n&&r.imagesIndexing,l=i&&r.aiImageIndexing;return this.isFilePlaintext(t)||wi(t)||hc(t)||a&&ti(t)||u&&Mn(t)||l&&Mn(t)}isFilenameIndexable(t){return this.canIndexUnsupportedFiles()||this.isFilePlaintext(t)||wi(t)||Cs(t)||hc(t)}canIndexUnsupportedFiles(){return this.plugin.settings.unsupportedFilesIndexing==="yes"||this.plugin.settings.unsupportedFilesIndexing==="default"&&!!this.plugin.app.vault.getConfig("showUnsupportedFiles")}generateIndexableNonexistingDocument(t,r){return t=Om(t),{path:t+(t.endsWith(".md")?"":".md"),basename:t,displayTitle:"",mtime:0,content:"",cleanedContent:"",tags:[],unmarkedTags:[],aliases:"",headings1:"",headings2:"",headings3:"",doesNotExist:!0,parent:r}}isFilePlaintext(t){return[...this.plugin.settings.indexedFileTypes,"md"].some(r=>t.endsWith(`.${r}`))}};o0();var Sh=require("obsidian");Nr();var wh=class{constructor(t){this.plugin=t;this.embeds=new Map}addEmbed(t,r){this.embeds.has(t)||this.embeds.set(t,new Set),this.embeds.get(t).add(r)}removeFile(t){this.embeds.delete(t),this.refreshEmbedsForNote(t)}renameFile(t,r){this.embeds.has(t)&&(this.embeds.set(r,this.embeds.get(t)),this.embeds.delete(t)),this.embeds.forEach((n,i)=>{n.has(t)&&(n.delete(t),n.add(r))})}refreshEmbedsForNote(t){this.embeds.forEach((r,n)=>{r.has(t)&&r.delete(t)}),this.addEmbedsForNote(t)}getEmbeds(t){return this.embeds.has(t)?[...this.embeds.get(t)]:[]}async writeToCache(){Ke("Writing embeds to cache");let t=this.plugin.database,r=[];for(let[n,i]of this.embeds)r.push({embedded:n,referencedBy:[...i]});await t.embeds.clear(),await t.embeds.bulkAdd(r)}async loadFromCache(){try{let t=this.plugin.database;if(!t.embeds){Ke("No embeds in cache");return}Ke("Loading embeds from cache");let r=await t.embeds.toArray();for(let{embedded:n,referencedBy:i}of r)for(let a of i)this.addEmbed(n,a)}catch{this.plugin.database.clearCache(),console.error("Omnisearch - Error while loading embeds cache"),new Sh.Notice("Omnisearch - There was an error while loading the cache. Please restart Obsidian.")}}addEmbedsForNote(t){let r=(this.plugin.app.metadataCache.getCache(t)?.embeds??[]).map(n=>this.plugin.app.metadataCache.getFirstLinkpathDest((0,Sh.getLinkpath)(n.link),t)).filter(n=>!!n);for(let n of r)this.addEmbed(n.path,t)}};var Ch=class{constructor(t){this.plugin=t;this.nextQueryIsEmpty=!1}async addToHistory(t){if(!t){this.nextQueryIsEmpty=!0;return}this.nextQueryIsEmpty=!1;let r=this.plugin.database,n=await r.searchHistory.toArray();n=n.filter(i=>i.query!==t).reverse(),n.unshift({query:t}),n=n.slice(0,10),await r.searchHistory.clear(),await r.searchHistory.bulkAdd(n)}async getHistory(){let t=(await this.plugin.database.searchHistory.toArray()).reverse().map(r=>r.query);return this.nextQueryIsEmpty&&t.unshift(""),t}};var Ih=class extends zn.Plugin{constructor(r,n){super(r,n);this.apiHttpServer=null;this.settings=kc(this.app);this.embedsRepository=new wh(this);this.da Line truncated
/*! Bundled license information:
lodash-es/lodash.js:
(**
* @license
* Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="es" -o ./`
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*)
search-query-parser/lib/search-query-parser.js:
(*!
* search-query-parser.js
* Copyright(c) 2014-2019
* MIT Licensed
*)
dexie/dist/dexie.js:
(*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** *)
*/
/* nosourcemap */
+14
View File
@@ -0,0 +1,14 @@
{
"id": "omnisearch",
"name": "Omnisearch",
"version": "1.28.2",
"minAppVersion": "1.7.2",
"description": "A search engine that just works",
"author": "Simon Cambier",
"authorUrl": "https://github.com/scambier/obsidian-omnisearch",
"fundingUrl": {
"Github": "https://github.com/sponsors/scambier",
"Ko-fi": "https://ko-fi.com/scambier"
},
"isDesktopOnly": false
}
+135
View File
@@ -0,0 +1,135 @@
.omnisearch-modal {
}
.omnisearch-result {
white-space: normal;
display: flex;
flex-direction: row;
/* justify-content: space-between; */
flex-wrap: nowrap;
}
.omnisearch-result__title-container {
display: flex;
align-items: center;
justify-content: space-between;
column-gap: 5px;
flex-wrap: wrap;
}
.omnisearch-result__title {
white-space: pre-wrap;
align-items: center;
display: flex;
gap: 5px;
}
.omnisearch-result__title > span {
}
.omnisearch-result__folder-path {
font-size: 0.75rem;
align-items: center;
display: flex;
gap: 5px;
color: var(--text-muted);
}
.omnisearch-result__extension {
font-size: 0.7rem;
color: var(--text-muted);
}
.omnisearch-result__counter {
font-size: 0.7rem;
color: var(--text-muted);
}
.omnisearch-result__body {
white-space: normal;
font-size: small;
word-wrap: normal;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
color: var(--text-muted);
margin-inline-start: 0.5em;
}
.omnisearch-result__embed {
margin-left: 1em;
}
.omnisearch-result__image-container {
flex-basis: 20%;
text-align: end;
}
.omnisearch-highlight {
}
.omnisearch-default-highlight {
text-decoration: underline;
text-decoration-color: var(--text-highlight-bg);
text-decoration-thickness: 3px;
text-underline-offset: -1px;
text-decoration-skip-ink: none;
}
.omnisearch-input-container {
display: flex;
align-items: center;
flex-direction: row;
gap: 5px;
}
.omnisearch-result__icon {
display: inline-block;
vertical-align: middle;
width: 16px;
height: 16px;
margin-right: 4px;
}
.omnisearch-result__icon svg {
width: 100%;
height: 100%;
}
.omnisearch-result__icon--emoji {
font-size: 16px;
vertical-align: middle;
margin-right: 4px;
}
@media only screen and (max-width: 600px) {
.omnisearch-input-container {
flex-direction: column;
}
.omnisearch-input-container__buttons {
display: flex;
flex-direction: row;
width: 100%;
padding: 0 1em 0 1em;
gap: 1em;
}
.omnisearch-input-container__buttons > button {
flex-grow: 1;
}
}
@media only screen and (min-width: 600px) {
.omnisearch-input-container__buttons {
margin-inline-end: 1em;
}
}
.omnisearch-input-field {
position: relative;
flex-grow: 1;
}