1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[88131],{131:(e,t,r)=>{r.r(t),r.d(t,{default:()=>s});class s extends window.PluginBaseClass{static #e=this.options={maxHistoryLength:10,localStorageKey:"elio-data-discovery-search-history"};init(){let e=this._getSearchTermObject();if(e){let{searchTermId:t,channel:r,searchTerm:s}=e;this._storeSearchTerm(r,t,s)}}_getSearchTermObject(){let e=this.options;return e&&e.searchTerm&&e.channel?{searchTermId:e.searchTerm.toLowerCase(),searchTerm:e.searchTerm,channel:e.channel}:null}_storeSearchTerm(e,t,r){let s=JSON.parse(localStorage.getItem(this.options.localStorageKey)||null)||{};s.hasOwnProperty(e)||(s[e]=[]);let a=!1;for(let r of s[e])"object"==typeof r&&r.hasOwnProperty("searchTermId")&&r.searchTermId===t&&(r.lastOccurrence=new Date().toISOString(),a=!0);a||s[e].push({searchTermId:t,searchTerm:r,lastOccurrence:new Date().toISOString()}),s[e].sort(function(e,t){return new Date(e.lastOccurrence)>new Date(t.lastOccurrence)?-1:1}),s[e].length>this.options.maxHistoryLength&&(s[e]=s[e].slice(0,this.options.maxHistoryLength)),localStorage.setItem(this.options.localStorageKey,JSON.stringify(s))}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.