PageSourceSearch

https://www.lhsystems.com/9755-a47023110e2fd0ea3565.js

js lhsystems.com collected 2026-09-24 09:05:13 UTC 4,485 bytes, 3 lines download raw bytes

1"use strict";(self.webpackChunklhsystems=self.webpackChunklhsystems||[]).push([[9755,7759],{57759:function(A,D,o){o.r(D);var r=o(67294),g=o(31732),m=o(44235),l=o(78874),M=(u,E,_)=>new Promise((y,i)=>{var P=e=>{try{v(_.next(e))}catch(t){i(t)}},f=e=>{try{v(_.throw(e))}catch(t){i(t)}},v=e=>e.done?y(e.value):Promise.resolve(e.value).then(P,f);v((_=_.apply(u,E)).next())});const S={selectedStrategy:"Prefix match"},O=u=>M(void 0,null,function*(){var E,_,y,i;const P=u==null?void 0:u.url;if(!P)return!1;const f=yield fetch(P,{method:"HEAD"});if(!f||!f.ok)return!1;const v=(E=u==null?void 0:u.headers)==null?void 0:E.get("ETag"),e=(_=u==null?void 0:u.headers)==null?void 0:_.get("Last-Modified"),t=(y=f==null?void 0:f.headers)==null?void 0:y.get("ETag"),n=(i=f==null?void 0:f.headers)==null?void 0:i.get("Last-Modified");return!v||!t||!e||!n?!1:v===t&&e===n}),C=({langcode:u,onSubmit:E})=>{const[_,y]=(0,r.useState)(!1),[i,P]=(0,r.useState)(""),f=s=>{s.preventDefault();let d;d=setInterval(()=>{_||((0,m.navigate)(`/search?q=${i}`,{state:{search:i}}),clearInterval(d))},300),E&&E(i)},v=s=>{P(s.target.value)},e=()=>{y(!1),t({cacheName:`LHSYS:searchDataCache_${u}`,url:`/search_data_cache_${u}.json`})},t=(...s)=>M(void 0,[...s],function*(d={}){const{cacheName:c,url:p}=d;let h=yield n(c,p);return h?(a(h),h):(yield(yield caches.open(c)).add(p),h=yield n(c,p,!1),(0,l.ZH)(),a(h),h)}),n=(s,d,c=!0)=>M(void 0,null,function*(){const h=yield(yield caches.open(s)).match(d);return!h||!h.ok||c&&!(yield O(h))?!1:yield h.json()}),a=s=>{(0,l.U2)(`LSYH_search_tokenMap_${u}`).then(d=>{if(d)y(!1);else{const c=new g.ol("title");S.selectedStrategy==="All"&&(c.indexStrategy=new g.vZ),S.selectedStrategy==="Prefix match"&&(c.indexStrategy=new g.c8),c.sanitizer=new g.xd,c.addIndex("title"),c.addIndex("field_lead_text"),c.addIndex("field_body_text"),c.addDocuments(s),(0,l.t8)(`LSYH_search_documents_${u}`,c._documents).then(()=>{(0,l.t8)(`LSYH_search_tokenMap_${u}`,c._searchIndex._tokenMap).then(y(!1)).catch(p=>console.warn("Caching failed!",p))}).catch(p=>console.warn("Caching failed!",p))}})};return r.createElement("form",{onSubmit:f,className:"search-box"},r.createElement("input",{type:"search",value:i,onChange:v,onFocus:e}))};D.default=(0,r.memo)(C)},49755:function(A,D,o){o.r(D);var r=o(67294),g=o(45697),m=o.n(g),l=o(69397),M=o(57759);const S=({langcode:O,pageContext:C})=>!C||C==="default"?r.createElement("div",{className:"search-field"},r.createElement(M.default,{langcode:O})):r.createElement(l.Z,{disabled:!0,style:{flexGrow:1},size:"large"});D.default=(0,r.memo)(S),S.propTypes={pageContext:m().string,langcode:m().string}},78874:function(A,D,o){o.d(D,{U2:function(){return M},ZH:function(){return y},t8:function(){return S}});function r(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function g(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const a=r(n);return(s,d)=>a.then(c=>d(c.transaction(t,s).objectStore(t)))}let m;function l(){return m||(m=g("keyval-store","keyval")),m}function M(e,t=l()){return t("readonly",n=>r(n.get(e)))}function S(e,t,n=l()){return n("readwrite",a=>(a.put(t,e),r(a.transaction)))}function O(e,t=l()){return t("readwrite",n=>(e.forEach(a=>n.put(a[1],a[0])),r(n.transaction)))}function C(e,t=l()){return t("readonly",n=>Promise.all(e.map(a=>r(n.get(a)))))}function u(e,t,n=l()){return n("readwrite",a=>new Promise((s,d)=>{a.get(e).onsuccess=function(){try{a.put(t(this.result),e),s(r(a.transaction))}catch(c){d(c)}}}))}function E(e,t=l()){return t("readwrite",n=>(n.delete(e),r(n.transaction)))}function _(e,t=l()){return t("readwrite",n=>(e.forEach(a=>n.delete(a)),r(n.transaction)))}function y(e=l()){return e("readwrite",t=>(t.clear(),r(t.transaction)))}function i(e,t){return e.openCursor().onsuccess=function(){!this.result||(t(this.result),this.result.continue())},r(e.transaction)}function P(e=l()){return e("readonly",t=>{if(t.getAllKeys)return r(t.getAllKeys());const n=[];return i(t,a=>n.push(a.key)).then(()=>n)})}function f(e=l()){return e("readonly",t=>{if(t.getAll)return r(t.getAll());const n=[];return i(t,a=>n.push(a.value)).then(()=>n)})}function v(e=l()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([r(t.getAllKeys()),r(t.getAll())]).then(([a,s])=>
1a.map((d,c)=>[d,s[c]]));const n=[];return e("readonly",a=>i(a,s=>n.push([s.key,s.value])).then(()=>n))})}}}]);
2
3//# sourceMappingURL=9755-a47023110e2fd0ea3565.js.map

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.