PageSourceSearch

https://openpanel.dev/_next/static/chunks/3270.0cb30fbffa045377.js

js openpanel.dev collected 2026-10-02 04:25:43 UTC 2,447 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3270],{30889:(t,e,r)=>{r.r(e),r.d(e,{oramaCloudClient:()=>l});var n=r(43816),i=r(35347);function l(t){let{index:e="default",client:r,params:l,tag:u}=t;return{deps:[e,r,u],async search(t){let o=(0,n.r)(t),a=[];if("crawler"===e){let e=await r.search({datasources:[],...l,term:t,where:{category:u?{eq:u.slice(0,1).toUpperCase()+u.slice(1)}:void 0,...l?.where},limit:10});if(!e)return a;for(let t of e.hits){let e=t.document;a.push({id:t.id,type:"page",content:o.highlightMarkdown(e.title),url:e.path},{id:"page"+t.id,type:"text",content:o.highlightMarkdown(e.content),url:e.path})}return a}let s=await r.search({datasources:[],...l,term:t,limit:20,where:(0,i.t)({tag:u,...l?.where}),groupBy:{properties:["page_id"],max_results:7,...l?.groupBy}});if(!s||!s.groups)return a;for(let t of s.groups){let e=!1;for(let r of t.result){let t=r.document;e||(a.push({id:t.page_id,type:"page",content:o.highlightMarkdown(t.title),breadcrumbs:t.breadcrumbs,url:t.url}),e=!0),a.push({id:t.id,content:o.highlightMarkdown(t.content),type:t.content===t.section?"heading":"text",url:t.section_id?`${t.url}#${t.section_id}`:t.url})}}return a.length>80?a.slice(0,80):a}}}},35347:(t,e,r)=>{r.d(e,{t:()=>function t(e,r=!1){for(let n in e){if(void 0===e[n]&&delete e[n],!r)continue;let i=e[n];if("object"==typeof i&&null!==i){t(i,r);continue}if(Array.isArray(i))for(let e of i)t(e,r)}return e}})},43816:(t,e,r)=>{r.d(e,{r:()=>o});var n=r(95767),i=r(10219);function l(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}let u=(0,n.V)();function o(t){let e="string"==typeof t?function(t){let e=t.trim();if(0===e.length)return null;let r=Array.from(new Set(e.split(/\s+/).filter(Boolean)));if(0===r.length)return null;let n=r.map(l).join("|");return RegExp(`(${n})`,"gi")}(t):t;return{highlight(t){if(!e)return[{type:"text",content:t}];let r=[],n=0;for(let i of t.matchAll(e))n<i.index&&r.push({type:"text",content:t.substring(n,i.index)}),r.push({type:"text",content:i[0],styles:{highlight:!0}}),n=i.index+i[0].length;return n<t.length&&r.push({type:"text",content:t.substring(n)}),r},highlightMarkdown(t){var r,n;if(!e)return t;let l=u.parse(t);return r=l,n=e,(0,i.YR)(r,"text",t=>{let e="",r=t.value,i=0;for(let t of r.matchAll(n))i<t.index&&(e+=r.substring(i,t.index)),e+=`<mark>${t[0]}</mark>`,i=t.index+t[0].length;i<r.length&&(e+=r.substring(i)),t.type="html",t.value=e}),u.stringify(l).trim()}}}}}]);

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.