2023-03-25 16:36:44 +00:00
/ *
THIS IS A GENERATED / BUNDLED FILE BY ESBUILD
if you want to view the source , please visit the github repository of this plugin
* /
2023-04-27 04:26:35 +00:00
var Fc = Object . create ; var Sr = Object . defineProperty , Sc = Object . defineProperties , Ec = Object . getOwnPropertyDescriptor , Dc = Object . getOwnPropertyDescriptors , Tc = Object . getOwnPropertyNames , ro = Object . getOwnPropertySymbols , kc = Object . getPrototypeOf , no = Object . prototype . hasOwnProperty , Ic = Object . prototype . propertyIsEnumerable ; var io = ( t , e , r ) => e in t ? Sr ( t , e , { enumerable : ! 0 , configurable : ! 0 , writable : ! 0 , value : r } ) : t [ e ] = r , re = ( t , e ) => { for ( var r in e || ( e = { } ) ) no . call ( e , r ) && io ( t , r , e [ r ] ) ; if ( ro ) for ( var r of ro ( e ) ) Ic . call ( e , r ) && io ( t , r , e [ r ] ) ; return t } , xe = ( t , e ) => Sc ( t , Dc ( e ) ) , so = t => Sr ( t , "__esModule" , { value : ! 0 } ) ; var yi = ( t , e ) => ( ) => ( e || t ( ( e = { exports : { } } ) . exports , e ) , e . exports ) , Oc = ( t , e ) => { so ( t ) ; for ( var r in e ) Sr ( t , r , { get : e [ r ] , enumerable : ! 0 } ) } , Mc = ( t , e , r ) => { if ( e && typeof e == "object" || typeof e == "function" ) for ( let n of Tc ( e ) ) ! no . call ( t , n ) && n !== "default" && Sr ( t , n , { get : ( ) => e [ n ] , enumerable : ! ( r = Ec ( e , n ) ) || r . enumerable } ) ; return t } , be = t => Mc ( so ( Sr ( t != null ? Fc ( kc ( t ) ) : { } , "default" , t && t . _ _esModule && "default" in t ? { get : ( ) => t . default , enumerable : ! 0 } : { value : t , enumerable : ! 0 } ) ) , t ) ; var ya = yi ( ( Xr , bs ) => { ( function ( t , e ) { if ( typeof Xr == "object" && typeof bs == "object" ) bs . exports = e ( ) ; else if ( typeof define == "function" && define . amd ) define ( [ ] , e ) ; else { var r = e ( ) ; for ( var n in r ) ( typeof Xr == "object" ? Xr : t ) [ n ] = r [ n ] } } ) ( typeof self != "undefined" ? self : Xr , function ( ) { return function ( t ) { var e = { } ; function r ( n ) { if ( e [ n ] ) return e [ n ] . exports ; var i = e [ n ] = { i : n , l : ! 1 , exports : { } } ; return t [ n ] . call ( i . exports , i , i . exports , r ) , i . l = ! 0 , i . exports } return r . m = t , r . c = e , r . d = function ( n , i , s ) { r . o ( n , i ) || Object . defineProperty ( n , i , { enumerable : ! 0 , get : s } ) } , r . r = function ( n ) { typeof Symbol != "undefined" && Symbol . toStringTag && Object . defineProperty ( n , Symbol . toStringTag , { value : "Module" } ) , Object . defineProperty ( n , "__esModule" , { value : ! 0 } ) } , r . t = function ( n , i ) { if ( 1 & i && ( n = r ( n ) ) , 8 & i || 4 & i && typeof n == "object" && n && n . _ _esModule ) return n ; var s = Object . create ( null ) ; if ( r . r ( s ) , Object . defineProperty ( s , "default" , { enumerable : ! 0 , value : n } ) , 2 & i && typeof n != "string" ) for ( var o in n ) r . d ( s , o , function ( a ) { return n [ a ] } . bind ( null , o ) ) ; return s } , r . n = function ( n ) { var i = n && n . _ _esModule ? function ( ) { return n . default } : function ( ) { return n } ; return r . d ( i , "a" , i ) , i } , r . o = function ( n , i ) { return Object . prototype . hasOwnProperty . call ( n , i ) } , r . p = "" , r ( r . s = 0 ) } ( [ function ( t , e , r ) { "use strict" ; r . r ( e ) , r . d ( e , "md5" , function ( ) { return b } ) ; var n = "0123456789abcdef" . split ( "" ) , i = function ( x ) { for ( var h = "" , v = 0 ; v < 4 ; v ++ ) h += n [ x >> 8 * v + 4 & 15 ] + n [ x >> 8 * v & 15 ] ; return h } , s = function ( x ) { for ( var h = x . length , v = 0 ; v < h ; v ++ ) x [ v ] = i ( x [ v ] ) ; return x . join ( "" ) } , o = function ( x , h ) { return x + h & 4294967295 } , a = function ( x , h , v , p , m , _ , g ) { return function ( j , A , C ) { return o ( j << A | j >>> 32 - A , C ) } ( h = function ( j , A , C , F ) { return A = o ( o ( A , j ) , o ( C , F ) ) } ( x , h , p , _ ) , m , v ) } , l = function ( x , h , v , p , m , _ , g , j ) { return a ( v & p | ~ v & m , h , v , _ , g , j , x ) } , u = function ( x , h , v , p , m , _ , g , j ) { return a ( v & m | p & ~ m , h , v , _ , g , j , x ) } , c = function ( x , h , v , p , m , _ , g , j ) { return a ( v ^ p ^ m , h , v , _ , g , j , x ) } , d = function ( x , h , v , p , m , _ , g , j ) { return a ( p ^ ( v | ~ m ) , h , v , _ , g , j , x ) } , f = function ( x , h , v ) { v === void 0 && ( v = o ) ; var p = x [ 0 ] , m = x [ 1 ] , _ = x [ 2 ] , g = x [ 3 ] , j = l . bind ( null , v ) ; p = j ( p , m , _ , g , h [ 0 ] , 7 , - 680876936 ) , g = j ( g , p , m , _ , h [ 1 ] , 12 , - 389564586 ) , _ = j ( _ , g , p , m , h [ 2 ] , 17 , 606105819 ) , m = j ( m , _ , g , p , h [ 3 ] , 22 , - 1044525330 ) , p = j ( p , m , _ , g , h [ 4 ] , 7 , - 176418897 ) , g = j ( g , p , m , _ , h [ 5 ] , 12 , 1200080426 ) , _ = j ( _ , g , p , m , h [ 6 ] , 17 , - 1473231341 ) , m = j ( m , _ , g , p , h [ 7 ] , 22 , - 45705983 ) , p = j ( p , m , _ , g , h [ 8 ] , 7 , 1770035416 ) , g = j ( g , p , m , _ , h [ 9 ] , 12 , - 1958414417 ) , _ = j ( _ , g , p , m , h [ 10 ] , 17 , - 42063 ) , m = j ( m , _ , g , p , h [ 11 ] , 22 , - 1990404162 ) , p = j ( p , m , _ , g , h [ 12 ] , 7 , 1804603682 ) , g = j ( g , p , m , _ , h [ 13 ] , 12 , - 40341101 ) , _ = j ( _ , g , p , m , h [ 14 ] , 17 , - 1502002290 ) , m = j ( m , _ , g , p , h [ 15 ] , 22 , 1236535329 ) ; var A = u . bind ( null , v ) ; p = A ( p , m , _ , g , h [ 1 ] , 5 , - 165796510 ) , g = A ( g , p , m , _ , h [ 6 ] , 9 , - 1069501632 ) , _ = A ( _ , g , p , m , h [ 11 ] , 14 , 643717713 ) , m = A ( m , _ , g , p , h [ 0 ] , 20 , - 373897302 ) , p = A ( p , m , _ , g , h [ 5 ] , 5 , - 701558691 ) , g = A ( g , p , m , _ , h [ 10 ] , 9 , 38016083 ) , _ = A ( _ , g , p , m , h [ 15 ] , 14 , - 660478335 ) , m = A ( m , _ , g , p , h [ 4 ] , 20 , - 405537848 ) , p = A ( p , m , _ , g , h [ 9 ] , 5 , 568446438 ) , g = A ( g , p , m , _ , h [ 14 ] , 9 , - 1019803690 ) , _ = A ( _ , g , p , m , h [ 3 ] , 14 , - 187363961 ) , m = A ( m , _ , g , p , h [ 8 ] , 20 , 1163531501 ) , p = A ( p , m , _ , g , h [ 13 ] , 5 , - 1444681467 ) , g = A ( g , p , m , _ , h [ 2 ] , 9 , - 51403784 ) , _ = A ( _ , g , p , m , h [ 7 ] , 14 , 1735328473 ) , m = A ( m , _ , g , p , h [ 12 ] , 20 , - 1926607734 ) ; var C = c . bind ( null , v ) ; p = C ( p , m , _ , g , h [ 5 ] , 4 , - 378558 ) , g = C ( g , p , m , _ , h [ 8 ] , 11 , - 2022574463 ) ,
2023-03-25 16:36:44 +00:00
` ).length),r.split( `
2023-04-27 04:26:35 +00:00
` ).slice(e).filter(Co).map(n=> `
` +n).join("")):""}var Zc=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"],Fo=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Mi=Zc.concat(Fo),ef={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function rr(t,e){this._e=kt(),this.name=t,this.message=e}er(rr).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Oi(this._e,2))}},toString:function(){return this.name+": "+this.message}});function So(t,e){return t+". Errors: "+Object.keys(e).map(r=>e[r].toString()).filter((r,n,i)=>i.indexOf(r)===n).join( `
` )}function mn(t,e,r,n){this._e=kt(),this.failures=e,this.failedKeys=n,this.successCount=r,this.message=So(t,e)}er(mn).from(rr);function Rr(t,e){this._e=kt(),this.name="BulkError",this.failures=Object.keys(e).map(r=>e[r]),this.failuresByPos=e,this.message=So(t,e)}er(Rr).from(rr);var Pi=Mi.reduce((t,e)=>(t[e]=e+"Error",t),{}),tf=rr,L=Mi.reduce((t,e)=>{var r=e+"Error";function n(i,s){this._e=kt(),this.name=r,i?typeof i=="string"?(this.message= ` $ { i } $ { s ? `
` +s:""} ` , this . inner = s || null ) : typeof i == "object" && ( this . message = ` ${ i . name } ${ i . message } ` , this . inner = i ) : ( this . message = ef [ e ] || r , this . inner = null ) } return er ( n ) . from ( tf ) , t [ e ] = n , t } , { } ) ; L . Syntax = SyntaxError ; L . Type = TypeError ; L . Range = RangeError ; var Eo = Fo . reduce ( ( t , e ) => ( t [ e + "Error" ] = L [ e ] , t ) , { } ) ; function rf ( t , e ) { if ( ! t || t instanceof rr || t instanceof TypeError || t instanceof SyntaxError || ! t . name || ! Eo [ t . name ] ) return t ; var r = new Eo [ t . name ] ( e || t . message , t ) ; return "stack" in t && We ( r , "stack" , { get : function ( ) { return this . inner . stack } } ) , r } var gn = Mi . reduce ( ( t , e ) => ( [ "Syntax" , "Type" , "Range" ] . indexOf ( e ) === - 1 && ( t [ e + "Error" ] = L [ e ] ) , t ) , { } ) ; gn . ModifyError = mn ; gn . DexieError = rr ; gn . BulkError = Rr ; function Y ( ) { } function Br ( t ) { return t } function nf ( t , e ) { return t == null || t === Br ? e : function ( r ) { return e ( t ( r ) ) } } function It ( t , e ) { return function ( ) { t . apply ( this , arguments ) , e . apply ( this , arguments ) } } function sf ( t , e ) { return t === Y ? e : function ( ) { var r = t . apply ( this , arguments ) ; r !== void 0 && ( arguments [ 0 ] = r ) ; var n = this . onsuccess , i = this . onerror ; this . onsuccess = null , this . onerror = null ; var s = e . apply ( this , arguments ) ; return n && ( this . onsuccess = this . onsuccess ? It ( n , this . onsuccess ) : n ) , i && ( this . onerror = this . onerror ? It ( i , this . onerror ) : i ) , s !== void 0 ? s : r } } function of ( t , e ) { return t === Y ? e : function ( ) { t . apply ( this , arguments ) ; var r = this . onsuccess , n = this . onerror ; this . onsuccess = this . onerror = null , e . apply ( this , arguments ) , r && ( this . onsuccess = this . onsuccess ? It ( r , this . onsuccess ) : r ) , n && ( this . onerror = this . onerror ? It ( n , this . onerror ) : n ) } } function af ( t , e ) { return t === Y ? e : function ( r ) { var n = t . apply ( this , arguments ) ; je ( r , n ) ; var i = this . onsuccess , s = this . onerror ; this . onsuccess = null , this . onerror = null ; var o = e . apply ( this , arguments ) ; return i && ( this . onsuccess = this . onsuccess ? It ( i , this . onsuccess ) : i ) , s && ( this . onerror = this . onerror ? It ( s , this . onerror ) : s ) , n === void 0 ? o === void 0 ? void 0 : o : je ( n , o ) } } function lf ( t , e ) { return t === Y ? e : function ( ) { return e . apply ( this , arguments ) === ! 1 ? ! 1 : t . apply ( this , arguments ) } } function Ri ( t , e ) { return t === Y ? e : function ( ) { var r = t . apply ( this , arguments ) ; if ( r && typeof r . then == "function" ) { for ( var n = this , i = arguments . length , s = new Array ( i ) ; i -- ; ) s [ i ] = arguments [ i ] ; return r . then ( function ( ) { return e . apply ( n , s ) } ) } return e . apply ( this , arguments ) } } var Lr = { } , uf = 100 , cf = 20 , Do = 100 , [ Bi , yn , Li ] = typeof Promise == "undefined" ? [ ] : ( ( ) => { let t = Promise . resolve ( ) ; if ( typeof crypto == "undefined" || ! crypto . subtle ) return [ t , Or ( t ) , t ] ; let e = crypto . subtle . digest ( "SHA-512" , new Uint8Array ( [ 0 ] ) ) ; return [ e , Or ( e ) , t ] } ) ( ) , To = yn && yn . then , vn = Bi && Bi . constructor , Ni = ! ! Li , Ki = ! 1 , ff = Li ? ( ) => { Li . then ( wn ) } : J . setImmediate ? setImmediate . bind ( null , wn ) : J . MutationObserver ? ( ) => { var t = document . createElement ( "div" ) ; new MutationObserver ( ( ) => { wn ( ) , t = null } ) . observe ( t , { attributes : ! 0 } ) , t . setAttribute ( "i" , "1" ) } : ( ) => { setTimeout ( wn , 0 ) } , Nr = function ( t , e ) { Kr . push ( [ t , e ] ) , _n && ( ff ( ) , _n = ! 1 ) } , zi = ! 0 , _n = ! 0 , Ot = [ ] , xn = [ ] , Vi = null , $i = Br , nr = { id : "global" , global : ! 0 , ref : 0 , unhandleds : [ ] , onunhandled : Ko , pgp : ! 1 , env : { } , finalize : function ( ) { this . unhandleds . forEach ( t => { try { Ko ( t [ 0 ] , t [ 1 ] ) } catch { } } ) } } , R = nr , Kr = [ ] , Mt = 0 , bn = [ ] ; function I ( t ) { if ( typeof this != "object" ) throw new TypeError ( "Promises must be constructed via new" ) ; this . _listeners = [ ] , this . onuncatched = Y , this . _lib = ! 1 ; var e = this . _PSD = R ; if ( Ke && ( this . _stackHolder = kt ( ) , this . _prev = null , this . _numPrev = 0 ) , typeof t != "function" ) { if ( t !== Lr ) throw new TypeError ( "Not a function" ) ; this . _state = arguments [ 1 ] , this . _value = arguments [ 2 ] , this . _state === ! 1 && Wi ( this , this . _value ) ; return } this . _state = null , this . _value = null , ++ e . ref , Io ( this , t ) } var Hi = { get : function ( ) { var t = R , e = Cn ; function r ( n , i ) { var s = ! t . global && ( t !== R || e !== Cn ) ; let o = s && ! Qe ( ) ; var a = new I ( ( l , u ) => { Ui ( this , new ko ( Sn ( n , t , s , o ) , Sn ( i , t , s , o ) , l , u , t ) ) } ) ; return Ke && Po ( a , this ) , a } return r . prototype = Lr , r } , set : function ( t ) { We ( this , "then" , t && t . prototype === Lr ? Hi : { get : function ( ) { return t } , set : Hi . set } ) } } ; Zt ( I . prototype , { then : Hi , _then : function ( t , e ) { Ui ( this , new ko ( null , null , t , e , R ) ) } , catch : function ( t ) { if ( arguments . length === 1 ) return this . then ( null , t ) ; var e = arguments [ 0 ] , r = arguments [ 1 ] ; return typeof e == "function" ? this . then ( null , n => n instanceof e ? r ( n ) : jn ( n ) ) : this . then ( null , n => n && n . name === e ? r ( n ) : jn ( n ) ) } , finally : function ( t ) { return this . then ( e => ( t ( ) , e ) , e => ( t ( ) , j
From previous : ` );return this._state!==null&&(this._stack=e),e}finally{Ki=!1}}},timeout:function(t,e){return t<1/0?new I((r,n)=>{var i=setTimeout(()=>n(new L.Timeout(e)),t);this.then(r,n).finally(clearTimeout.bind(null,i))}):this}});typeof Symbol!="undefined"&&Symbol.toStringTag&&We(I.prototype,Symbol.toStringTag,"Dexie.Promise");nr.env=Ro();function ko(t,e,r,n,i){this.onFulfilled=typeof t=="function"?t:null,this.onRejected=typeof e=="function"?e:null,this.resolve=r,this.reject=n,this.psd=i}Zt(I,{all:function(){var t=Ge.apply(null,arguments).map(Fn);return new I(function(e,r){t.length===0&&e([]);var n=t.length;t.forEach((i,s)=>I.resolve(i).then(o=>{t[s]=o,--n||e(t)},r))})},resolve:t=>{if(t instanceof I)return t;if(t&&typeof t.then=="function")return new I((r,n)=>{t.then(r,n)});var e=new I(Lr,!0,t);return Po(e,Vi),e},reject:jn,race:function(){var t=Ge.apply(null,arguments).map(Fn);return new I((e,r)=>{t.map(n=>I.resolve(n).then(e,r))})},PSD:{get:()=>R,set:t=>R=t},totalEchoes:{get:()=>Cn},newPSD:lt,usePSD:sr,scheduler:{get:()=>Nr,set:t=>{Nr=t}},rejectionMapper:{get:()=> $ i,set:t=>{ $ i=t}},follow:(t,e)=>new I((r,n)=>lt((i,s)=>{var o=R;o.unhandleds=[],o.onunhandled=s,o.finalize=It(function(){hf(()=>{this.unhandleds.length===0?i():s(this.unhandleds[0])})},o.finalize),t()},e,r,n))});vn&&(vn.allSettled&&We(I,"allSettled",function(){let t=Ge.apply(null,arguments).map(Fn);return new I(e=>{t.length===0&&e([]);let r=t.length,n=new Array(r);t.forEach((i,s)=>I.resolve(i).then(o=>n[s]={status:"fulfilled",value:o},o=>n[s]={status:"rejected",reason:o}).then(()=>--r||e(n)))})}),vn.any&&typeof AggregateError!="undefined"&&We(I,"any",function(){let t=Ge.apply(null,arguments).map(Fn);return new I((e,r)=>{t.length===0&&r(new AggregateError([]));let n=t.length,i=new Array(n);t.forEach((s,o)=>I.resolve(s).then(a=>e(a),a=>{i[o]=a,--n||r(new AggregateError(i))}))})}));function Io(t,e){try{e(r=>{if(t._state===null){if(r===t)throw new TypeError("A promise cannot be resolved with itself.");var n=t._lib&&zr();r&&typeof r.then=="function"?Io(t,(i,s)=>{r instanceof I?r._then(i,s):r.then(i,s)}):(t._state=!0,t._value=r,Oo(t)),n&&Vr()}},Wi.bind(null,t))}catch(r){Wi(t,r)}}function Wi(t,e){if(xn.push(e),t._state===null){var r=t._lib&&zr();e= $ i(e),t._state=!1,t._value=e,Ke&&e!==null&&typeof e=="object"&&!e._promise&&Uc(()=>{var n=Ei(e,"stack");e._promise=t,We(e,"stack",{get:()=>Ki?n&&(n.get?n.get.apply(e):n.value):t.stack})}),pf(t),Oo(t),r&&Vr()}}function Oo(t){var e=t._listeners;t._listeners=[];for(var r=0,n=e.length;r<n;++r)Ui(t,e[r]);var i=t._PSD;--i.ref||i.finalize(),Mt===0&&(++Mt,Nr(()=>{--Mt==0&&Gi()},[]))}function Ui(t,e){if(t._state===null){t._listeners.push(e);return}var r=t._state?e.onFulfilled:e.onRejected;if(r===null)return(t._state?e.resolve:e.reject)(t._value);++e.psd.ref,++Mt,Nr(df,[r,t,e])}function df(t,e,r){try{Vi=e;var n,i=e._value;e._state?n=t(i):(xn.length&&(xn=[]),n=t(i),xn.indexOf(i)===-1&&mf(e)),r.resolve(n)}catch(s){r.reject(s)}finally{Vi=null,--Mt==0&&Gi(),--r.psd.ref||r.psd.finalize()}}function Mo(t,e,r){if(e.length===r)return e;var n="";if(t._state===!1){var i=t._value,s,o;i!=null?(s=i.name||"Error",o=i.message||i,n=Oi(i,0)):(s=i,o=""),e.push(s+(o?": "+o:"")+n)}return Ke&&(n=Oi(t._stackHolder,2),n&&e.indexOf(n)===-1&&e.push(n),t._prev&&Mo(t._prev,e,r)),e}function Po(t,e){var r=e?e._numPrev+1:0;r<uf&&(t._prev=e,t._numPrev=r)}function wn(){zr()&&Vr()}function zr(){var t=zi;return zi=!1,_n=!1,t}function Vr(){var t,e,r;do for(;Kr.length>0;)for(t=Kr,Kr=[],r=t.length,e=0;e<r;++e){var n=t[e];n[0].apply(null,n[1])}while(Kr.length>0);zi=!0,_n=!0}function Gi(){var t=Ot;Ot=[],t.forEach(n=>{n._PSD.onunhandled.call(null,n._value,n)});for(var e=bn.slice(0),r=e.length;r;)e[--r]()}function hf(t){function e(){t(),bn.splice(bn.indexOf(e),1)}bn.push(e),++Mt,Nr(()=>{--Mt==0&&Gi()},[])}function pf(t){Ot.some(e=>e._value===t._value)||Ot.push(t)}function mf(t){for(var e=Ot.length;e;)if(Ot[--e]._value===t._value){Ot.splice(e,1);return}}function jn(t){return new I(Lr,!1,t)}function Z(t,e){var r=R;return function(){var n=zr(),i=R;try{return ut(r,!0),t.apply
2023-03-25 16:36:44 +00:00
< iframe src = "https://github.com/sponsors/scambier/button" title = "Sponsor scambier" height = "35" width = "116" style = "border: 0;" > < / i f r a m e >
< 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 >
2023-04-27 04:26:35 +00:00
` ,new G.Setting(e).setName("Indexing").setHeading();let n=new DocumentFragment; $ e()?n.createSpan({},c=>{c.innerHTML= ` \ u { 1 F44D } You have installed < a href = "https://github.com/scambier/obsidian-text-extractor" > Text Extractor < / a > , O m n i s e a r c h w i l l u s e i t t o i n d e x P D F s a n d i m a g e s .
< br / > Text extraction only works on desktop , but the cache can be synchronized with your mobile device . ` }):n.createSpan({},c=>{c.innerHTML=' \u 26A0 \u FE0F Omnisearch requires <a href="https://github.com/scambier/obsidian-text-extractor">Text Extractor</a> to index PDFs and images.'}),new G.Setting(e).setDesc(n);let i=new DocumentFragment;i.createSpan({},c=>{c.innerHTML="Include PDFs in search results"}),new G.Setting(e).setName( ` PDFs Indexing $ { $e ( ) ? "" : "\u26A0\uFE0F Disabled" } ` ).setDesc(i).addToggle(c=>c.setValue(E.PDFIndexing).onChange(async d=>{E.PDFIndexing=d,await ue(this.plugin)})).setDisabled(! $ e());let s=new DocumentFragment;s.createSpan({},c=>{c.innerHTML="Include images in search results"}),new G.Setting(e).setName( ` Images Indexing $ { $e ( ) ? "" : "\u26A0\uFE0F Disabled" } ` ).setDesc(s).addToggle(c=>c.setValue(E.imagesIndexing).onChange(async d=>{E.imagesIndexing=d,await ue(this.plugin)})).setDisabled(! $ e());let o=new DocumentFragment;o.createSpan({},c=>{c.innerHTML= ` In addition to standard < code > md < / c o d e > f i l e s , O m n i s e a r c h c a n a l s o i n d e x o t h e r < s t r o n g s t y l e = " c o l o r : v a r ( - - t e x t - a c c e n t ) " > p l a i n t e x t < / s t r o n g > f i l e s . < b r / >
2023-03-25 16:36:44 +00:00
Add extensions separated by a space , without the dot . Example : "<code>txt org</code>" . < br / >
\u26A0\uFE0F < span style = "color: var(--text-accent)" > Using extensions of non - plaintext files ( like . docx or . pptx ) WILL cause crashes ,
because Omnisearch will try to index their content . < /span><br / >
2023-04-27 04:26:35 +00:00
< strong style = "color: var(--text-accent)" > Needs a restart to fully take effect . < / s t r o n g > ` } ) , n e w G . S e t t i n g ( e ) . s e t N a m e ( " A d d i t i o n a l f i l e s t o i n d e x " ) . s e t D e s c ( o ) . a d d T e x t ( c = > { c . s e t V a l u e ( E . i n d e x e d F i l e T y p e s . j o i n ( " " ) ) . s e t P l a c e h o l d e r ( " E x a m p l e : t x t o r g " ) . o n C h a n g e ( a s y n c d = > { E . i n d e x e d F i l e T y p e s = d . s p l i t ( " " ) , a w a i t u e ( t h i s . p l u g i n ) } ) } ) , n e w G . S e t t i n g ( e ) . s e t N a m e ( " B e h a v i o r " ) . s e t H e a d i n g ( ) , n e w G . S e t t i n g ( e ) . s e t N a m e ( " S a v e i n d e x t o c a c h e " ) . s e t D e s c ( " E n a b l e c a c h i n g t o s p e e d u p i n d e x i n g t i m e . I n r a r e c a s e s , t h e c a c h e w r i t e m a y c a u s e a f r e e z e i n O b s i d i a n . T h i s o p t i o n w i l l d i s a b l e i t s e l f i f i t h a p p e n s . " ) . a d d T o g g l e ( c = > c . s e t V a l u e ( E . u s e C a c h e ) . o n C h a n g e ( a s y n c d = > { E . u s e C a c h e = d , a w a i t u e ( t h i s . p l u g i n ) } ) ) , n e w G . S e t t i n g ( e ) . s e t N a m e ( ` R e s p e c t O b s i d i a n ' s " E x c l u d e d F i l e s " ` ) . s e t D e s c ( ` B y d e f a u l t , f i l e s t h a t a r e i n O b s i d i a n ' s " O p t i o n s > F i l e s & L i n k s > E x c l u d e d F i l e s " l i s t a r e d o w n r a n k e d i n r e s u l t s .
Enable this option to completely hide them ` ).addToggle(c=>c.setValue(E.hideExcluded).onChange(async d=>{E.hideExcluded=d,await ue(this.plugin)}));let a=new DocumentFragment;a.createSpan({},c=>{c.innerHTML= ` Normalize diacritics in search terms . Words like "br\xFBl\xE9e" or "\u017Elu\u0165ou\u010Dk\xFD" will be indexed as "brulee" and "zlutoucky" . < br / >
2023-03-25 16:36:44 +00:00
\u26A0\uFE0F < span style = "color: var(--text-accent)" > You probably should < strong > NOT < / s t r o n g > d i s a b l e t h i s . < / s p a n > < b r >
\u26A0\uFE0F < span style = "color: var(--text-accent)" > Changing this setting will clear the cache . < / s p a n > < b r >
< strong style = "color: var(--text-accent)" > Needs a restart to fully take effect . < / s t r o n g >
2023-04-27 04:26:35 +00:00
` }),new G.Setting(e).setName("Ignore diacritics").setDesc(a).addToggle(c=>c.setValue(E.ignoreDiacritics).onChange(async d=>{await Ee.clearCache(),E.ignoreDiacritics=d,await ue(this.plugin)}));let l=new DocumentFragment;l.createSpan({},c=>{c.innerHTML= ` Enable this if you want to be able to search for CamelCaseWords as separate words . < br / >
2023-03-25 16:36:44 +00:00
\u26A0\uFE0F < span style = "color: var(--text-accent)" > Changing this setting will clear the cache . < / s p a n > < b r >
< strong style = "color: var(--text-accent)" > Needs a restart to fully take effect . < / s t r o n g >
2023-04-27 04:26:35 +00:00
` }),new G.Setting(e).setName("Split CamelCaseWords").setDesc(l).addToggle(c=>c.setValue(E.splitCamelCase).onChange(async d=>{await Ee.clearCache(),E.splitCamelCase=d,await ue(this.plugin)})),new G.Setting(e).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(c=>c.setValue(E.simpleSearch).onChange(async d=>{E.simpleSearch=d,await ue(this.plugin)})),new G.Setting(e).setName("User Interface").setHeading(),new G.Setting(e).setName("Show ribbon button").setDesc("Add a button on the sidebar to open the Vault search modal.").addToggle(c=>c.setValue(E.ribbonIcon).onChange(async d=>{E.ribbonIcon=d,await ue(this.plugin),d?this.plugin.addRibbonButton():this.plugin.removeRibbonButton()})),new G.Setting(e).setName("Show excerpts").setDesc("Shows the contextual part of the note that matches the search. Disable this to only show filenames in results.").addToggle(c=>c.setValue(E.showExcerpt).onChange(async d=>{Lt.set(d)})),new G.Setting(e).setName("Render line return in excerpts").setDesc("Activate this option to render line returns in result excerpts.").addToggle(c=>c.setValue(E.renderLineReturnInExcerpts).onChange(async d=>{E.renderLineReturnInExcerpts=d,await ue(this.plugin)})),new G.Setting(e).setName("Show previous query results").setDesc("Re-executes the previous query when opening Omnisearch.").addToggle(c=>c.setValue(E.showPreviousQueryResults).onChange(async d=>{E.showPreviousQueryResults=d,await ue(this.plugin)}));let u=new DocumentFragment;if(u.createSpan({},c=>{c.innerHTML= ` Shows a button next to the search input , to create a note .
Acts the same as the < code > shift \u21B5 < / c o d e > s h o r t c u t , c a n b e u s e f u l f o r m o b i l e d e v i c e u s e r s . ` } ) , n e w G . S e t t i n g ( e ) . s e t N a m e ( ' S h o w " C r e a t e n o t e " b u t t o n ' ) . s e t D e s c ( u ) . a d d T o g g l e ( c = > c . s e t V a l u e ( E . s h o w C r e a t e B u t t o n ) . o n C h a n g e ( a s y n c d = > { E . s h o w C r e a t e B u t t o n = d , a w a i t u e ( t h i s . p l u g i n ) } ) ) , n e w G . S e t t i n g ( e ) . s e t N a m e ( " H i g h l i g h t m a t c h i n g w o r d s i n r e s u l t s " ) . s e t D e s c ( " W i l l h i g h l i g h t m a t c h i n g r e s u l t s w h e n e n a b l e d . S e e R E A D M E f o r m o r e c u s t o m i z a t i o n o p t i o n s . " ) . a d d T o g g l e ( c = > c . s e t V a l u e ( E . h i g h l i g h t ) . o n C h a n g e ( a s y n c d = > { E . h i g h l i g h t = d , a w a i t u e ( t h i s . p l u g i n ) } ) ) , n e w G . S e t t i n g ( e ) . s e t N a m e ( " R e s u l t s w e i g h t i n g " ) . s e t H e a d i n g ( ) , n e w G . S e t t i n g ( e ) . s e t N a m e ( ` F i l e n a m e & d e c l a r e d a l i a s e s ( d e f a u l t : $ { N t . w e i g h t B a s e n a m e } ) ` ) . a d d S l i d e r ( c = > t h i s . w e i g h t S l i d e r ( c , " w e i g h t B a s e n a m e " ) ) , n e w G . S e t t i n g ( e ) . s e t N a m e ( ` F i l e d i r e c t o r y ( d e f a u l t : $ { N t . w e i g h t D i r e c t o r y } ) ` ) . a d d S l i d e r ( c = > t h i s . w e i g h t S l i d e r ( c , " w e i g h t D i r e c t o r y " ) ) , n e w G . S e t t i n g ( e ) . s e t N a m e ( ` H e a d i n g s l e v e l 1 ( d e f a u l t : $ { N t . w e i g h t H 1 } ) ` ) . a d d S l i d e r ( c = > t h i s . w e i g h t S l i d e r ( c , " w e i g h t H 1 " ) ) , n e w G . S e t t i n g ( e ) . s e t N a m e ( ` H e a d i n g s l e v e l 2 ( d e f a u l t : $ { N t . w e i g h t H 2 } ) ` ) . a d d S l i d e r ( c = > t h i s . w e i g h t S l i d e r ( c , " w e i g h t H 2 " ) ) , n e w G . S e t t i n g ( e ) . s e t N a m e ( ` H e a d i n g s l e v e l 3 ( d e f a u l t : $ { N t . w e i g h t H 3 } ) ` ) . a d d S l i d e r ( c = > t h i s . w e i g h t S l i d e r ( c , " w e i g h t H 3 " ) ) , n e w G . S e t t i n g ( e ) . s e t N a m e ( " D e b u g g i n g " ) . s e t H e a d i n g ( ) , n e w G . S e t t i n g ( e ) . s e t N a m e ( " E n a b l e v e r b o s e l o g g i n g " ) . s e t D e s c ( " A d d s a L O T o f l o g s f o r d e b u g g i n g p u r p o s e s . D o n ' t f o r g e t t o d i s a b l e i t . " ) . a d d T o g g l e ( c = > c . s e t V a l u e ( E . v e r b o s e L o g g i n g ) . o n C h a n g e ( a s y n c d = > { E . v e r b o s e L o g g i n g = d , a w a i t u e ( t h i s . p l u g i n ) } ) ) , h t ( ) ) { n e w G . S e t t i n g ( e ) . s e t N a m e ( " D a n g e r Z o n e " ) . s e t H e a d i n g ( ) ; l e t c = n e w D o c u m e n t F r a g m e n t ; c . c r e a t e S p a n ( { } , d = > { d . i n n e r H T M L = ` E r a s e a l l O m n i s e a r c h c a c h e d a t a .
2023-03-25 16:36:44 +00:00
Use this if Omnisearch results are inconsistent , missing , or appear outdated . < br >
2023-04-27 04:26:35 +00:00
< strong style = "color: var(--text-accent)" > Needs a restart to fully take effect . < /strong>`}),new G.Setting(e).setName("Clear cache data").setDesc(c).addButton(d=>{d.setButtonText("Clear cache"),d.onClick(async()=>{await Ee.clearCache(),new G.Notice("Omnisearch - Cache cleared. Please restart Obsidian.")})})}}weightSlider(e,r){e.setLimits(1,5,.1).setValue(E[r]).setDynamicTooltip().onChange(n=>{E[r]=n,ue(this.plugin)})}},Nt={useCache:!0,hideExcluded:!1,ignoreDiacritics:!0,indexedFileTypes:[],PDFIndexing:!1,imagesIndexing:!1,splitCamelCase:!1,ribbonIcon:!0,showExcerpt:!0,renderLineReturnInExcerpts:!0,showCreateButton:!1,highlight:!0,showPreviousQueryResults:!0,simpleSearch:!1,weightBasename:3,weightDirectory:2,weightH1:1.5,weightH2:1.3,weightH3:1.1,welcomeMessage:"",verboseLogging:!1},E=Object.assign({},Nt);async function ca(t){E=Object.assign({},Nt,await t.loadData()),Lt.set(E.showExcerpt)}async function ue(t){await t.saveData(E)}var fa=be(require("obsidian"));var da=/ [ \u4e00 - \u9fa5 ] / ; var ha = 100 , Jr = 300 , pa = ` suggestion-highlight omnisearch-highlight ${ E . highlight ? "omnisearch-default-highlight" : "" } ` , H = new Si , Ln = { ToggleExcerpts : "toggle-excerpts" } , Pe = ( s => ( s [ s . Done = 0 ] = "Done" , s [ s . LoadingCache = 1 ] = "LoadingCache" , s [ s . ReadingFiles = 2 ] = "ReadingFiles" , s [ s . IndexingFiles = 3 ] = "IndexingFiles" , s [ s . WritingCache = 4 ] = "WritingCache" , s ) ) ( Pe || { } ) ; var pt = hn ( 0 ) , ma = ! 1 ; function xs ( t ) { ma = t } function ga ( ) { return ma } function Nn ( ) { return app . plugins . plugins [ "cm-chs-patch" ] } function $e ( ) { return app . plugins ? . plugins ? . [ "text-extractor" ] ? . api } function ht ( ) { return ! fa . Platform . isIosApp && E . useCache } var mt = /[|\n\r -#%-*,-/:;?@[-\]_{}\u00A0\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2000-\u200A\u2010-\u2029\u202F-\u2043\u2045-\u2051\u2053-\u205F\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u3000-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]+/u ; var Ea = be ( require ( "obsidian" ) ) ; var Ze = be ( require ( "obsidian" ) ) ; var va = be ( require ( "crypto" ) ) , _a = be ( ya ( ) ) ; function gt ( ... t ) { return t [ 1 ] !== null && t [ 1 ] !== void 0 && t [ 2 ] !== null && t [ 2 ] !== void 0 ? ` ${ t [ 1 ] } <span class=" ${ pa } "> ${ t [ 2 ] } </span> ` : "<no content>" } function hd ( t ) { return t . replaceAll ( "&" , "&" ) . replaceAll ( "<" , "<" ) . replaceAll ( ">" , ">" ) . replaceAll ( '"' , """ ) . replaceAll ( "'" , "'" ) } function xa ( t ) { let e = t . split ( "/" ) ; return e . pop ( ) , e . join ( "/" ) } function pd ( t ) { return t . replace ( /[-/\\^$*+?.()|[\]{}]/g , "[$&]" ) } function yt ( t ) { if ( ! t . length ) return /^$/g ; let e = "(" + ( Nn ( ) ? "" : E . splitCamelCase ? ` ^| ${ mt . source } |[A-Z] ` : ` ^| ${ mt . source } ` ) + ` )( ${ t . map ( n => pd ( n ) ) . join ( "|" ) } ) ` ; return new RegExp ( ` ${ e } ` , "giu" ) } function Kn ( t , e ) { return t . headings ? . filter ( r => r . level === e ) . map ( r => r . heading ) ? ? [ ] } function zn ( t , e ) { return ( t + e ) % e } function ur ( t , e ) { try { let r = e ? ? - 1 , n = Math . max ( 0 , r - ha ) , i = Math . min ( t . length , r + Jr ) ; if ( r > - 1 ? t = ( n > 0 ? "\u2026" : "" ) + t . slice ( n , i ) . trim ( ) + ( i < t . length - 1 ? "\u2026" : "" ) : t = t . slice ( 0 , Jr ) , E . renderLineReturnInExcerpts ) { let s = new RegExp ( /(?:\r\n|\r|\n)/g ) ; t = t . split ( s ) . filter ( a => a ) . join ( `
2023-03-25 16:36:44 +00:00
` );let o=t.lastIndexOf( `
2023-04-27 04:26:35 +00:00
` ,r-n);o>0&&(t=t.slice(o))}return t=hd(t),E.renderLineReturnInExcerpts&&(t=t.trim().replaceAll( `
` ,"<br>")),t}catch(r){return new Ze.Notice("Omnisearch - Error while creating excerpt, see developer console"),console.error("Omnisearch - Error while creating excerpt"),console.error(r),""}}function ws(t){return t.replace(/( \* |_)+(.+?)( \* |_)+/g,(e,r,n)=>n)}function ba(t){return t?.frontmatter?(0,Ze.parseFrontMatterAliases)(t.frontmatter)??[]:[]}function wa(t){let e=t?(0,Ze.getAllTags)(t)??[]:[];return e=[...new Set(e.reduce((r,n)=>[...r,...n.split("/").filter(i=>i).map(i=>i.startsWith("#")?i: ` # $ { i } ` ),n],[]))],e}function et(t){return t==null?"":(t=t.replaceAll(" ` "," [ _ _omnisearch _ _backtick _ _ ] "),t=t.normalize(" NFD ").replace(/\p{Diacritic}/gu," "),t=t.replaceAll(" [ _ _omnisearch _ _backtick _ _ ] "," ` "),t)}function Vn(){return Ze.Platform.isMacOS?" \u 2318":"ctrl"}function Zr(t){let e=!! $ e(),r=e&&E.PDFIndexing,n=e&&E.imagesIndexing;return js(t)||tn(t)||r&&en(t)||n&& $ n(t)}function $ n(t){let e=Kt(t);return e==="png"||e==="jpg"||e==="jpeg"}function en(t){return Kt(t)==="pdf"}function js(t){return[...E.indexedFileTypes,"md"].some(e=>t.endsWith( ` . $ { e } ` ))}function tn(t){return t.endsWith(".canvas")}function Kt(t){let e=t.split(".");return e[e.length-1]??""}function ja(t){return Ze.Platform.isMobileApp?(0,_a.md5)(t.toString()):(0,va.createHash)("md5").update(t).digest("hex")}function Aa(t,e){let r=[],n=0,i=t.length;for(;n<i;)r.push(t.slice(n,n+=e));return r}function Ca(t){return t.replace(/([a-z](?=[A-Z]))/g," $ 1 ").split(" ")}function ie(...t){Sa(console.log,...t)}function Fa(...t){Sa(console.warn,...t)}function Sa(t,...e){if(E.verboseLogging){let r=new Date,n= ` $ { r . getMinutes ( ) } : $ { r . getSeconds ( ) } : $ { r . getMilliseconds ( ) } ` ;t("Omnisearch -",n+" -",...e)}}async function md(t){let e=app.vault.getFiles().find(s=>s.path===t);if(!e)throw new Error( ` Invalid file path : "${t}" ` );let r=null,n= $ e();if(js(t))r=await app.vault.cachedRead(e);else if(tn(t)){let s=JSON.parse(await app.vault.cachedRead(e)),o=[];for(let a of s.nodes)a.type==="text"?o.push(a.text):a.type==="file"&&o.push(a.file);for(let a of s.edges.filter(l=>!!l.label))o.push(a.label);r=o.join( ` \ r
` )}else if(n?.canFileBeExtracted(t))r=await n.extractText(e);else throw new Error( ` Unsupported file type : "${t}" ` );r==null&&(console.warn( ` Omnisearch : $ { r } content for file ` ,e.path),r=""),r=et(r);let i=app.metadataCache.getFileCache(e);if(i&&i.frontmatter?.["excalidraw-plugin"]){let s=i.sections?.filter(o=>o.type==="comment")??[];for(let{start:o,end:a}of s.map(l=>l.position))r=r.substring(0,o.offset-1)+r.substring(a.offset)}return{basename:et(e.basename),content:r,path:e.path,mtime:e.stat.mtime,tags:wa(i),aliases:ba(i).join(""),headings1:i?Kn(i,1).join(" "):"",headings2:i?Kn(i,2).join(" "):"",headings3:i?Kn(i,3).join(" "):""}}var Da=class{constructor(){this.nextQueryIsEmpty=!1;this.documents=new Map}async addToLiveCache(e){try{let r=await md(e);if(!r.path){console.error( ` Missing . path field in IndexedDocument "${r.basename}" , skipping ` );return}this.documents.set(e,r)}catch(r){console.warn( ` Omnisearch : Error while adding "${e}" to live cache ` ,r),this.removeFromLiveCache(e)}}removeFromLiveCache(e){this.documents.delete(e)}async getDocument(e){return this.documents.has(e)?this.documents.get(e):(ie("Generating IndexedDocument from",e),await this.addToLiveCache(e),this.documents.get(e))}async addToSearchHistory(e){if(!e){this.nextQueryIsEmpty=!0;return}this.nextQueryIsEmpty=!1;let r=await Ee.searchHistory.toArray();r=r.filter(n=>n.query!==e).reverse(),r.unshift({query:e}),r=r.slice(0,10),await Ee.searchHistory.clear(),await Ee.searchHistory.bulkAdd(r)}async getSearchHistory(){let e=(await Ee.searchHistory.toArray()).reverse().map(r=>r.query);return this.nextQueryIsEmpty&&e.unshift(""),e}getDocumentsChecksum(e){return ja(JSON.stringify(e.sort((r,n)=>r.path<n.path?-1:r.path>n.path?1:0)))}async getMinisearchCache(){try{return(await Ee.minisearch.toArray())[0]}catch(e){return new Ea.Notice("Omnisearch - Cache missing or invalid. Some freezes may occur while Omnisearch indexes your vault."),console.error("Omnisearch - Error while loading Minisearch cache"),console.error(e),null}}async writeMinisearchCache(e,r){let n=Array.from(r).map(([i,s])=>({path:i,mtime:s}));await Ee.minisearch.clear(),await Ee.minisearch.add({date:new Date().toISOString(),paths:n,data:e.toJSON()}),console.log("Omnisearch - Search cache written")}},de=new Da;function gd(t){let e,r,n,i,s,o,a,l,u=t[9].default,c=Gt(u,t,t[8],null);return{c(){e=O("div"),r=O("div"),n=O("input"),s=U(),c&&c.c(),B(n,"class","prompt-input"),B(n,"placeholder",t[0]),B(n,"spellcheck","false"),B(n,"type","text"),B(r,"class","omnisearch-input-field"),B(e,"class","omnisearch-input-container")},m(d,f){z(d,e,f),k(e,r),k(r,n),t[10](n),xi(n,t[1]),k(e,s),c&&c.m(e,null),o=!0,a||(l=[Te(n,"input",t[11]),co(i=t[3].call(null,n)),Te(n,"compositionend",t[12]),Te(n,"compositionstart",t[13]),Te(n,"input",t[4])],a=!0)},p(d,[f]){(!o||f&1)&&B(n,"placeholder",d[0]),f&2&&n.value!==d[1]&&xi(n,d[1]),c&&c.p&&(!o||f&256)&&qt(c,u,d,d[8],o?Qt(u,d[8],f,null):Yt(d[8]),null)},i(d){o||(Q(c,d),o=!0)},o(d){q(c,d),o=!1},d(d){d&&K(e),t[10](null),c&&c.d(d),a=!1,Re(l)}}}function yd(t,e,r){let{ $ $ slots:n={}, $ $ scope:i}=e,{initialValue:s=""}=e,o=!1,{placeholder:a=""}=e,l="",u,c=ji();function d(v){r(1,l=v)}function f(v){ot().then(()=>(u.focus(),ot())).then(()=>{u.select()})}let y=(0,Ta.debounce)(()=>{de.addToSearchHistory(""),c("input",l)},250);function w(v){He[v?"unshift":"push"](()=>{u=v,r(2,u)})}function b(){l=this.value,r(1,l),r(5,s),r(7,o)}let x=v=>xs(!1),h=v=>xs(!0);return t. $ $ set=v=>{"initialValue"in v&&r(5,s=v.initialValue),"placeholder"in v&&r(0,a=v.placeholder)," $ $ scope"in v&&r(8,i=v. $ $ scope)},t. $ $ .update=()=>{if(t. $ $ .dirty&162){e:s&&!o&&!l&&(r(7,o=!0),r(1,l=s),f())}},[a,l,u,f,y,s,d,o,i,n,w,b,x,h]}var ka=class extends pe{constructor(e){super();ye(this,e,yd,gd,fe,{initialValue:5,placeholder:0,setInputValue:6})}get setInputValue(){return this. $ $ .ctx[6]}},Hn=ka;function vd(t){let e,r,n,i,s=t[1].default,o=Gt(s,t,t[0],null);return{c(){e=O("div"),o&&o.c(),B(e,"class","prompt-results")},m(a,l){z(a,e,l),o&&o.m(e,null),r=!0,n||(i=Te(e,"mousedown",_d),n=!0)},p(a,[l]){o&&o.p&&(!r||l&1)&&qt(o,s,a,a[0],r?Qt(s,a[0],l,null):Yt(a[0]),nu
` ),i&&i.c(),n=Jt()},m(s,o){z(s,e,o),i&&i.m(s,o),z(s,n,o)},p(s,o){o[0]&2&&(r=E.simpleSearch&&s[1].split(mt).some(dc)),r?i||(i=fc(s),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(s){s&&K(e),i&&i.d(s),s&&K(n)}}}function fc(t){let e,r,n;return{c(){e=O("br"),r=U(),n=O("span"),n.textContent= ` You have enabled "Simpler Search" in the settings , try to type more
characters . ` ,ke(n,"color","var(--text-accent)"),ke(n,"font-size","small")},m(i,s){z(i,e,s),z(i,r,s),z(i,n,s)},d(i){i&&K(e),i&&K(r),i&&K(n)}}}function py(t){let e,r,n,i=t[2],s=[];for(let c=0;c<i.length;c+=1)s[c]=cc(lc(t,i,c));let o=c=>q(s[c],1,1,()=>{s[c]=null});function a(c,d){if(!c[2].length&&c[1]&&!c[4])return hy;if(c[4])return dy}let l=a(t,[-1,-1]),u=l&&l(t);return{c(){for(let c=0;c<s.length;c+=1)s[c].c();e=U(),r=O("div"),u&&u.c(),ke(r,"text-align","center")},m(c,d){for(let f=0;f<s.length;f+=1)s[f].m(c,d);z(c,e,d),z(c,r,d),u&&u.m(r,null),n=!0},p(c,d){if(d[0]&197){i=c[2];let f;for(f=0;f<i.length;f+=1){let y=lc(c,i,f);s[f]?(s[f].p(y,d),Q(s[f],1)):(s[f]=cc(y),s[f].c(),Q(s[f],1),s[f].m(e.parentNode,e))}for(Dt(),f=i.length;f<s.length;f+=1)o(f);Tt()}l===(l=a(c,d))&&u?u.p(c,d):(u&&u.d(1),u=l&&l(c),u&&(u.c(),u.m(r,null)))},i(c){if(!n){for(let d=0;d<i.length;d+=1)Q(s[d]);n=!0}},o(c){s=s.filter(Boolean);for(let d=0;d<s.length;d+=1)q(s[d]);n=!1},d(c){un(s,c),c&&K(e),c&&K(r),u&&u.d()}}}function my(t){let e,r,n,i,s,o,a,l,u,c,d,f,y,w,b,x,h,v,p,m,_,g,j,A,C,F,D,P,T,N={initialValue:t[1],placeholder:"Omnisearch - Vault", $ $ slots:{default:[fy]}, $ $ scope:{ctx:t}};e=new Hn({props:N}),t[12](e),e. $ on("input",t[13]);let $ =t[3]&&uc(t);return i=new Wn({props:{ $ $ slots:{default:[py]}, $ $ scope:{ctx:t}}}),{c(){Se(e. $ $ .fragment),r=U(), $ && $ .c(),n=U(),Se(i. $ $ .fragment),s=U(),o=O("div"),a=O("div"),a.innerHTML='<span class="prompt-instruction-command"> \u 2191 \u 2193</span><span>to navigate</span>',l=U(),u=O("div"),u.innerHTML= ` < span class = "prompt-instruction-command" > alt \u2191\u2193 < / s p a n >
< span > to cycle history < / s p a n > ` , c = U ( ) , d = O ( " d i v " ) , d . i n n e r H T M L = ' < s p a n c l a s s = " p r o m p t - i n s t r u c t i o n - c o m m a n d " > \ u 2 1 B 5 < / s p a n > < s p a n > t o o p e n < / s p a n > ' , f = U ( ) , y = O ( " d i v " ) , y . i n n e r H T M L = ` < s p a n c l a s s = " p r o m p t - i n s t r u c t i o n - c o m m a n d " > t a b < / s p a n >
< span > to switch to In - File Search < / s p a n > ` , w = U ( ) , b = O ( " d i v " ) , x = O ( " s p a n " ) , x . t e x t C o n t e n t = ` $ { V n ( ) } \ u 2 1 B 5 ` , h = U ( ) , v = O ( " s p a n " ) , v . t e x t C o n t e n t = " t o o p e n i n a n e w p a n e " , p = U ( ) , m = O ( " d i v " ) , m . i n n e r H T M L = ` < s p a n c l a s s = " p r o m p t - i n s t r u c t i o n - c o m m a n d " > s h i f t \ u 2 1 B 5 < / s p a n >
< span > to create < / s p a n > ` , _ = U ( ) , g = O ( " d i v " ) , g . i n n e r H T M L = ` < s p a n c l a s s = " p r o m p t - i n s t r u c t i o n - c o m m a n d " > c t r l s h i f t \ u 2 1 B 5 < / s p a n >
< span > to create in a new pane < / s p a n > ` , j = U ( ) , A = O ( " d i v " ) , A . i n n e r H T M L = ` < s p a n c l a s s = " p r o m p t - i n s t r u c t i o n - c o m m a n d " > a l t \ u 2 1 B 5 < / s p a n >
< span > to insert a link < / s p a n > ` , C = U ( ) , F = O ( " d i v " ) , F . i n n e r H T M L = ` < s p a n c l a s s = " p r o m p t - i n s t r u c t i o n - c o m m a n d " > c t r l + h < / s p a n >
< span > to toggle excerpts < / s p a n > ` , D = U ( ) , P = O ( " d i v " ) , P . i n n e r H T M L = ' < s p a n c l a s s = " p r o m p t - i n s t r u c t i o n - c o m m a n d " > e s c < / s p a n > < s p a n > t o c l o s e < / s p a n > ' , B ( a , " c l a s s " , " p r o m p t - i n s t r u c t i o n " ) , B ( u , " c l a s s " , " p r o m p t - i n s t r u c t i o n " ) , B ( d , " c l a s s " , " p r o m p t - i n s t r u c t i o n " ) , B ( y , " c l a s s " , " p r o m p t - i n s t r u c t i o n " ) , B ( x , " c l a s s " , " p r o m p t - i n s t r u c t i o n - c o m m a n d " ) , B ( b , " c l a s s " , " p r o m p t - i n s t r u c t i o n " ) , B ( m , " c l a s s " , " p r o m p t - i n s t r u c t i o n " ) , B ( g , " c l a s s " , " p r o m p t - i n s t r u c t i o n " ) , B ( A , " c l a s s " , " p r o m p t - i n s t r u c t i o n " ) , B ( F , " c l a s s " , " p r o m p t - i n s t r u c t i o n " ) , B ( P , " c l a s s " , " p r o m p t - i n s t r u c t i o n " ) , B ( o , " c l a s s " , " p r o m p t - i n s t r u c t i o n s " ) } , m ( M , S ) { w e ( e , M , S ) , z ( M , r , S ) , $ & & $ . m ( M , S ) , z ( M , n , S ) , w e ( i , M , S ) , z ( M , s , S ) , z ( M , o , S ) , k ( o , a ) , k ( o , l ) , k ( o , u ) , k ( o , c ) , k ( o , d ) , k ( o , f ) , k ( o , y ) , k ( o , w ) , k ( o , b ) , k ( b , x ) , k ( b , h ) , k ( b , v ) , k ( o , p ) , k ( o , m ) , k ( o , _ ) , k ( o , g ) , k ( o , j ) , k ( o , A ) , k ( o , C ) , k ( o , F ) , k ( o , D ) , k ( o , P ) , T = ! 0 } , p ( M , S ) { l e t V = { } ; S [ 0 ] & 2 & & ( V . i n i t i a l V a l u e = M [ 1 ] ) , S [ 1 ] & 4 & & ( V . $ $ s c o p e = { d i r t y : S , c t x : M } ) , e . $ s e t ( V ) , M [ 3 ] ? $ ? $ . p ( M , S ) : ( $ = u c ( M ) , $ . c ( ) , $ . m ( n . p a r e n t N o d e , n ) ) : $ & & ( $ . d ( 1 ) , $ = n u l l ) ; l e t t e = { } ; S [ 0 ] & 2 3 | S [ 1 ] & 4 & & ( t e . $ $ s c o p e = { d i r t y : S , c t x : M } ) , i . $ s e t ( t e ) } , i ( M ) { T | | ( Q ( e . $ $ . f r a g m e n t , M ) , Q ( i . $ $ . f r a g m e n t , M ) , T = ! 0 ) } , o ( M ) { q ( e . $ $ . f r a g m e n t , M ) , q ( i . $ $ . f r a g m e n t , M ) , T = ! 1 } , d ( M ) { t [ 1 2 ] ( n u l l ) , g e ( e , M ) , M & & K ( r ) , $ & & $ . d ( M ) , M & & K ( n ) , g e ( i , M ) , M & & K ( s ) , M & & K ( o ) } } } v a r d c = t = > t . l e n g t h < 3 ; f u n c t i o n g y ( t , e , r ) { l e t n , i ; l n ( t , p t , S = > r ( 1 1 , i = S ) ) ; l e t { m o d a l : s } = e , { p r e v i o u s Q u e r y : o } = e , a = 0 , l = 0 , u , c = [ ] , d , f = " " , y = ! 0 , w ; T r ( a s y n c ( ) = > { H . e n a b l e ( " v a u l t " ) , H . o n ( " v a u l t " , " e n t e r " , p ) , H . o n ( " v a u l t " , " c r e a t e - n o t e " , A ) , H . o n ( " v a u l t " , " o p e n - i n - n e w - p a n e " , m ) , H . o n ( " v a u l t " , " i n s e r t - l i n k " , C ) , H . o n ( " v a u l t " , " t a b " , F ) , H . o n ( " v a u l t " , " a r r o w - u p " , ( ) = > D ( - 1 ) ) , H . o n ( " v a u l t " , " a r r o w - d o w n " , ( ) = > D ( 1 ) ) , H . o n ( " v a u l t " , " p r e v - s e a r c h - h i s t o r y " , b ) , H . o n ( " v a u l t " , " n e x t - s e a r c h - h i s t o r y " , x ) , a w a i t m i ( ) , E . s h o w P r e v i o u s Q u e r y R e s u l t s & & r ( 9 , o = ( a w a i t d e . g e t S e a r c h H i s t o r y ( ) ) [ 0 ] ) } ) , k r ( ( ) = > { H . d i s a b l e ( " v a u l t " ) } ) ; a s y n c f u n c t i o n b ( ) { l e t S = ( a w a i t d e . g e t S e a r c h H i s t o r y ( ) ) . f i l t e r ( V = > V ) ; + + l > = S . l e n g t h & & ( l = 0 ) , r ( 1 , u = S [ l ] ) , w ? . s e t I n p u t V a l u e ( u ) } a s y n c f u n c t i o n x ( ) { l e t S = ( a w a i t d e . g e t S e a r c h H i s t o r y ( ) ) . f i l t e r ( V = > V ) ; - - l < 0 & & ( l = S . l e n g t h ? S . l e n g t h - 1 : 0 ) , r ( 1 , u = S [ l ] ) , w ? . s e t I n p u t V a l u e ( u ) } a s y n c f u n c t i o n h ( ) { d = n e w z t ( u ) , r ( 2 , c = a w a i t c e . g e t S u g g e s t i o n s ( d ) ) , r ( 0 , a = 0 ) , a w a i t P ( ) } f u n c t i o n v ( S ) { ! n | | ( S ? . c t r l K e y ? m ( ) : p ( ) , s . c l o s e ( ) ) } f u n c t i o n p ( ) { ! n | | ( g ( n ) , s . c l o s e ( ) ) } f u n c t i o n m ( ) { ! n | | ( g ( n , ! 0 ) , s . c l o s e ( ) ) } f u n c t i o n _ ( ) { u & & d e . a d d T o S e a r c h H i s t o r y ( u ) } f u n c t i o n g ( S , V = ! 1 ) { _ ( ) , U n ( S , V ) } a s y n c f u n c t i o n j ( S ) { a w a i t A ( ) } a s y n c f u n c t i o n A ( S ) { i f ( u ) { t r y { a w a i t O a ( u , S ? . n e w L e a f ) } c a t c h ( V ) { n e w F t . N o t i c e ( V . m e s s a g e ) ; r e t u r n } s . c l o s e ( ) } } f u n c t i o n C ( ) { i f ( ! n ) r e t u r n ; l e t S = a p p . v a u l t . g e t M a r k d o w n F i l e s ( ) . f i n d ( s t = > s t . p a t h = = = n . p a t h ) , V = a p p . w o r k s p a c e . g e t A c t i v e F i l e ( ) , t e = a p p . w o r k s p a c e . g e t A c t i v e V i e w O f T y p e ( F t . M a r k d o w n V i e w ) ; i f ( ! t e ? . e d i t o r ) { n e w F t . N o t i c e ( " O m n i s e a r c h - E r r o r - N o a c t i v e e d i t o r " , 3 e 3 ) ; r e t u r n } l e t W t ; S & & V ? W t = a p p . f i l e M a n a g e r . g e n e r a t e M a r k d o w n L i n k ( S , V . p a t h ) : W t = ` [ [ $ { n . b a s e n a m e } . $ { K t ( n . p a t h ) } ] ] ` ; l e t i t = t e . e d i t o r . g e t C u r s o r ( ) ; t e . e d i t o r . r e p l a c e R a n g e ( W t , i t , i t ) , i t . c h + = W t . l e n g t h , t e . e d i t o r . s e t C u r s o r ( i t ) , s . c l o s e ( ) } f u n c t i o n F ( ) { i f ( ! ( n & & ( e n ( n ? . p a t h ) | | ! n ? . m a t c h e s . l e n g t h ) ) ) i f ( _ ( ) , s . c l o s e ( ) , n ) { l e t S = a p p . v a u l t . g e t A b s t r a c t F i l e B y P a t h ( n . p a t h ) ; S & & S i n s t a n c e o f F t . T F i l e & & n e w C r ( a p p , S , u ) . o p e n ( ) } e l s e { l e t S = a p p . w o r k s p a c e . g e t A c t i v e V i e w O f T y p e ( F t . M a r k d o w n V i e w ) ; S & & n e w C r ( a p p , S . f i l e , u ) . o p e n ( ) } } f u n c t i o n D ( S ) { r ( 0 , a = z n ( a + S , c . l e n g t h ) ) , P ( ) } a s y n c f u n c t i o n P ( ) { a w a i t o t ( ) , n & & a c t i v e W i n d o w . d o c u m e n t . q u e r y S e l e c t o r ( ` [ d a t a - r e s u l t - i d = " $ { n . p a t h } " ] ` ) ? . s c r o l l I n t o V i e w ( { b e h a v i o r : " a u t o " , b l o c k : " n e a r e s t " } ) } f u n c t i o n T ( S ) { H e [ S ? " u n s h i f t " : " p u s h " ] ( ( ) = > { w = S , r ( 5 , w ) } ) } l e t N = S = > r ( 1 , u = S . d e t a i l ) , $ = ( S , V ) = > r ( 0 , a = S ) , M = S = > { S . b u t t o n = = 1 & & m ( ) } ; r e t u r n t . $ $ s e t = S = > { " m o d a l " i n S & & r ( 1 0 , s = S . m o d a l ) , " p r e v i o u s Q u e r y " i n S & & r ( 9 , o = S . p r e v i o u s Q u e r y ) } , t . $ $ . u p d a t e = ( ) = > { i f ( t . $ $ . d i r t y [ 0 ] & 5 1 4 ) { e : r ( 1 , u = u ? ? o ) } i f ( t . $ $ . d i r t y [ 0 ] & 2 ) { e : u ? ( r ( 4 , y = ! 0 ) , h ( ) . t h e n ( ( ) = > { r ( 4 , y = ! 1 ) } ) ) : ( r ( 4 , y = ! 1 ) , r ( 2 , c = [ ] ) ) } i f ( t . $ $ . d i r t y [ 0 ] & 5 ) { e : n = c [ a ] } i f ( t . $ $ . d i r t y [ 0 ] & 2 0 4 8 ) { e : s w i t c h ( i ) { c a s e P e . L o a d i n g C a c h e : r ( 3 , f = " L o a d i n g c a c h e . . . " ) ; b r e a k ; c a s e P e . R e a d i n g F i l e s : r ( 3 , f = " R e a d i n g f i l e s . . . " ) ; b r e a k ; c a s e P e . I n d e x i n g F i l e s : r ( 3 , f = " I n d e x i n g f i l e s . . . " ) ; b r e a k ; c a s e P e . W r i t i n g C a c h e : h ( ) , r ( 3 , f = " U p d a t i n g c a c h e . . . " ) ; b r e a k ; d e f a u l t : h ( ) , r ( 3 , f = " " ) ; b r e a k } } } , [ a , u , c , f , y , w , v , m , j , o , s , i , T , N , $ , M ] } v a r h c = c l a s s e x t e n d s p e { c o n s t r u c t o r (
< span > to switch to Vault Search < / s p a n > ` , d = U ( ) , f = O ( " d i v " ) , y = O ( " s p a n " ) , y . t e x t C o n t e n t = " e s c " , w = U ( ) , j . c ( ) , b = U ( ) , x = O ( " d i v " ) , h = O ( " s p a n " ) , h . t e x t C o n t e n t = ` $ { V n ( ) } \ u 2 1 B 5 ` , v = U ( ) , p = O ( " s p a n " ) , p . t e x t C o n t e n t = " t o o p e n i n a n e w p a n e " , B ( o , " c l a s s " , " p r o m p t - i n s t r u c t i o n " ) , B ( l , " c l a s s " , " p r o m p t - i n s t r u c t i o n " ) , B ( c , " c l a s s " , " p r o m p t - i n s t r u c t i o n " ) , B ( y , " c l a s s " , " p r o m p t - i n s t r u c t i o n - c o m m a n d " ) , B ( f , " c l a s s " , " p r o m p t - i n s t r u c t i o n " ) , B ( h , " c l a s s " , " p r o m p t - i n s t r u c t i o n - c o m m a n d " ) , B ( x , " c l a s s " , " p r o m p t - i n s t r u c t i o n " ) , B ( s , " c l a s s " , " p r o m p t - i n s t r u c t i o n s " ) } , m ( A , C ) { w e ( e , A , C ) , z ( A , r , C ) , w e ( n , A , C ) , z ( A , i , C ) , z ( A , s , C ) , k ( s , o ) , k ( s , a ) , k ( s , l ) , k ( s , u ) , k ( s , c ) , k ( s , d ) , k ( s , f ) , k ( f , y ) , k ( f , w ) , j . m ( f , n u l l ) , k ( s , b ) , k ( s , x ) , k ( x , h ) , k ( x , v ) , k ( x , p ) , m = ! 0 } , p ( A , [ C ] ) { l e t F = { } ; C & 2 & & ( F . i n i t i a l V a l u e = A [ 1 ] ) , e . $ s e t ( F ) ; l e t D = { } ; C & 4 1 9 4 3 6 0 & & ( D . $ $ s c o p e = { d i r t y : C , c t x : A } ) , n . $ s e t ( D ) , g ! = = ( g = _ ( A , C ) ) & & ( j . d ( 1 ) , j = g ( A ) , j & & ( j . c ( ) , j . m ( f , n u l l ) ) ) } , i ( A ) { m | | ( Q ( e . $ $ . f r a g m e n t , A ) , Q ( n . $ $ . f r a g m e n t , A ) , m = ! 0 ) } , o ( A ) { q ( e . $ $ . f r a g m e n t , A ) , q ( n . $ $ . f r a g m e n t , A ) , m = ! 1 } , d ( A ) { g e ( e , A ) , A & & K ( r ) , g e ( n , A ) , A & & K ( i ) , A & & K ( s ) , j . d ( ) } } } f u n c t i o n F y ( t , e , r ) { l e t n = t . f i n d ( i = > i . o f f s e t > e ) ; r e t u r n n ? t . f i l t e r ( i = > i . o f f s e t > e & & i . o f f s e t < = n . o f f s e t + r ) : [ ] } f u n c t i o n S y ( t , e , r ) { l e t { m o d a l : n } = e , { p a r e n t : i = n u l l } = e , { s i n g l e F i l e P a t h : s = " " } = e , { p r e v i o u s Q u e r y : o } = e , a , l = [ ] , u = 0 , c , d ; T r ( ( ) = > { H . e n a b l e ( " i n f i l e " ) , H . o n ( " i n f i l e " , " e n t e r " , x ) , H . o n ( " i n f i l e " , " o p e n - i n - n e w - p a n e " , b ) , H . o n ( " i n f i l e " , " a r r o w - u p " , ( ) = > y ( - 1 ) ) , H . o n ( " i n f i l e " , " a r r o w - d o w n " , ( ) = > y ( 1 ) ) , H . o n ( " i n f i l e " , " t a b " , h ) } ) , k r ( ( ) = > { H . d i s a b l e ( " i n f i l e " ) } ) ; f u n c t i o n f ( g ) { l e t j = [ ] , A = - 1 , C = 0 ; f o r ( ; ; ) { l e t F = F y ( g , A , J r ) ; i f ( ! F . l e n g t h | | ( A = F . l a s t ( ) . o f f s e t , j . p u s h ( F ) , + + C > 1 0 0 ) ) b r e a k } r e t u r n j } f u n c t i o n y ( g ) { r ( 5 , u = z n ( u + g , l . l e n g t h ) ) , w ( ) } a s y n c f u n c t i o n w ( ) { a w a i t o t ( ) , d o c u m e n t . q u e r y S e l e c t o r ( ` [ d a t a - r e s u l t - i d = " $ { u } " ] ` ) ? . s c r o l l I n t o V i e w ( { b e h a v i o r : " a u t o " , b l o c k : " n e a r e s t " } ) } a s y n c f u n c t i o n b ( ) { r e t u r n x ( ! 0 ) } a s y n c f u n c t i o n x ( g = ! 1 ) { i f ( c ) { n . c l o s e ( ) , i & & i . c l o s e ( ) , a w a i t U n ( c , g ) ; l e t j = a p p . w o r k s p a c e . g e t A c t i v e V i e w O f T y p e ( y c . M a r k d o w n V i e w ) ; i f ( ! j ) r e t u r n ; l e t A = l [ u ] ? ? 0 , C = j . e d i t o r . o f f s e t T o P o s ( A ) ; C . c h = 0 , j . e d i t o r . s e t C u r s o r ( C ) , j . e d i t o r . s c r o l l I n t o V i e w ( { f r o m : { l i n e : C . l i n e - 1 0 , c h : 0 } , t o : { l i n e : C . l i n e + 1 0 , c h : 0 } } ) } } f u n c t i o n h ( ) { n e w H t ( a p p , a ? ? o ) . o p e n ( ) , n . c l o s e ( ) } l e t v = g = > r ( 2 , a = g . d e t a i l ) , p = ( g , j ) = > r ( 5 , u = g ) , m = g = > x ( g . c t r l K e y ) , _ = g = > { g . b u t t o n = = 1 & & x ( ! 0 ) } ; r e t u r n t . $ $ s e t = g = > { " m o d a l " i n g & & r ( 7 , n = g . m o d a l ) , " p a r e n t " i n g & & r ( 0 , i = g . p a r e n t ) , " s i n g l e F i l e P a t h " i n g & & r ( 8 , s = g . s i n g l e F i l e P a t h ) , " p r e v i o u s Q u e r y " i n g & & r ( 1 , o = g . p r e v i o u s Q u e r y ) } , t . $ $ . u p d a t e = ( ) = > { i f ( t . $ $ . d i r t y & 2 ) { e : r ( 2 , a = o ? ? " " ) } i f ( t . $ $ . d i r t y & 7 7 2 ) { e : ( a s y n c ( ) = > { a & & ( r ( 9 , d = n e w z t ( a ) ) , r ( 3 , c = ( a w a i t c e . g e t S u g g e s t i o n s ( d , { s i n g l e F i l e P a t h : s } ) ) [ 0 ] ? ? n u l l ) ) , r ( 5 , u = 0 ) , a w a i t w ( ) } ) ( ) } i f ( t . $ $ . d i r t y & 8 ) { e : i f ( c ) { l e t g = f ( c . m a t c h e s ) ; r ( 4 , l = g . m a p ( j = > M a t h . r o u n d ( ( j . f i r s t ( ) . o f f s e t + j . l a s t ( ) . o f f s e t ) / 2 ) ) ) } } } , [ i , o , a , c , l , u , x , n , s , d , v , p , m , _ ] } v a r x c = c l a s s e x t e n d s p e { c o n s t r u c t o r ( e ) { s u p e r ( ) ; y e ( t h i s , e , S y , C y , f e , { m o d a l : 7 , p a r e n t : 0 , s i n g l e F i l e P a t h : 8 , p r e v i o u s Q u e r y : 1 } ) } } , b c = x c ; v a r X s = c l a s s e x t e n d s w c . M o d a l { c o n s t r u c t o r ( e ) { s u p e r ( e ) ; t h i s . m o d a l E l . r e p l a c e C h i l d r e n ( ) , t h i s . m o d a l E l . a d d C l a s s ( " o m n i s e a r c h - m o d a l " , " p r o m p t " ) , t h i s . m o d a l E l . r e m o v e C l a s s ( " m o d a l " ) , t h i s . m o d a l E l . t a b I n d e x = - 1 , t h i s . s c o p e . r e g i s t e r ( [ ] , " A r r o w D o w n " , r = > { r . p r e v e n t D e f a u l t ( ) , H . e m i t ( " a r r o w - d o w n " ) } ) , t h i s . s c o p e . r e g i s t e r ( [ ] , " A r r o w U p " , r = > { r . p r e v e n t D e f a u l t ( ) , H . e m i t ( " a r r o w - u p " ) } ) ; f o r ( l e t r o f [ { k : " J " , d i r : " d o w n " } , { k : " K " , d i r : " u p " } ] ) f o r ( l e t n o f [ " C t r l " , " M o d " ] ) t h i s . s c o p e . r e g i s t e r ( [ n ] , r . k , i = > { t h i s . a p p . v a u l t . g e t C o n f i g ( " v i m M o d e " ) & & H . e m i t ( " a r r o w - " + r . d i r ) } ) ; f o r ( l e t r o f [ { k : " N " , d i r : " d o w n " } , { k : " P " , d i r : " u p " } ] ) f o r ( l e t n o f [ " C t r l " , " M o d " ] ) t h i s . s c o p e . r e g i s t e r ( [ n ] , r . k , i = > { t h i s . a p p . v a u l t . g e t C o n f i g ( " v i m M o d e " ) & & H . e m i t ( " a r r o w - " + r . d i r ) } ) ; t h i s . s c o p e . r e g i s t e r ( [ " M o d " ] , " E n t e r " , r = > { r . p r e v e n t D e f a u l t ( ) , H . e m i t ( " o p e n - i n - n e w - p a n e " ) } ) , t h i s . s c o p e . r e g i s t e r ( [ " A l t " ] , " E n t e r " , r = > { r . p r e v e n t D e f a u l t ( ) , H . e m i t ( " i n s e r t - l i n k " ) } ) , t h i s . s c o p e . r e g i s t e r ( [ " S h i f t " ] , " E n t e r " , r = > { r . p r e v e n t D e f a u l t ( ) , H . e m i t ( " c r e a t e - n o t e " ) } ) , t h i s . s c o p e . r e g i s t e r ( [ " C t r l " , " S h i f t " ] , " E n t e r " , r = > { r . p r e v e n t D e f a u l t ( ) , H . e m i t ( " c r e a t e - n o t e " , { n e w L e a f : ! 0 } ) } ) , t h i s . s c o p e . r e g i s t e r ( [ ] , " E n t e r " , r = > { g a ( ) | | ( r . p r e v e n t D e f a u l t ( ) , H . e m i t ( " e n t e r " ) ) } ) , t h i s . s c o p e . r e g i s t e r ( [ ] , " T a b " , r = > { r . p r e v e n t D e f a u l t ( ) , H . e m i t ( " t a b " ) } ) , t h i s . s c o p e . r e g i s t e r ( [ " A l t " ] , " A r r o w D o w n " , r = > { r . p r e v e n t D e f a u l t ( ) , H . e m i t ( " n e x t - s