PageSourceSearch

https://www.weroad.com/_nuxt/DWaPpKXt2.js

js weroad.com collected 2026-10-01 12:36:55 UTC 2,071 bytes, 1 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:weroad":!0});var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`75264237-a9f9-4193-8a13-b636bf9dbf7f`,e._sentryDebugIdIdentifier=`sentry-dbid-75264237-a9f9-4193-8a13-b636bf9dbf7f`)}catch{}})();import{l as e,xt as t}from"./BSXR3eMi.js";import{t as n}from"./Ci8UjNx3.js";import{g as r,h as i}from"./DYJF4Ecw.js";import{t as a}from"./B3KSCJh4.js";import{t as o}from"./Dl5eCTZ82.js";var s=`ai-search-history`,c=`has_ai_search_history`,l=80,u=10,d=i({sessionId:r(),title:r(),date:r()}),f=a(()=>{let r=n(c,{path:`/`,maxAge:31536e3}),i=t([]),a=t(r.value===!0),f=t(!1),p=()=>{if(!o())return[];try{let e=JSON.parse(localStorage.getItem(s)||`[]`);return Array.isArray(e)?e.filter(e=>d.safeParse(e).success):[]}catch{return[]}},m=()=>{o()&&(r.value=p().length>0||void 0)},h=e=>{if(o())try{localStorage.setItem(s,JSON.stringify(e)),r.value=e.length>0||void 0}catch{}},g=()=>{i.value=p(),m(),f.value=!0},_=(e,t)=>{let n=p().filter(t=>t.sessionId!==e);n.unshift({sessionId:e,title:t.slice(0,l),date:new Date().toISOString()}),h(n.slice(0,u)),g()},v=e=>{let t=p().find(t=>t.sessionId===e);if(!t)return;let n=p().filter(t=>t.sessionId!==e);n.unshift({...t,date:new Date().toISOString()}),h(n.slice(0,u)),g()},y=e=>{let t=e.filter(e=>d.safeParse(e).success);h(t.slice(0,u)),g()},b=e=>p().some(t=>t.sessionId===e),x=e=>e===void 0?i.value.slice():i.value.slice(0,e),S=e(()=>a.value&&!f.value&&i.value.length===0);return{history:i,addSession:_,touchSession:v,setSessions:y,hasSession:b,getHistory:x,getStoredHistory:p,hasHistory:e(()=>i.value.length>0||S.value),shouldShowSkeleton:S,refresh:g}});export{f as t};

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.