PageSourceSearch

https://www.hub-grade.com/_nuxt/BsambJZS.js

js hub-grade.com collected 2026-10-06 13:03:41 UTC 10,510 bytes, 1 lines download raw bytes

1function C(){const e=typeof globalThis<"u"?globalThis:void 0;return e&&e.scheduler&&e.scheduler.yield?e.scheduler.yield().catch(t=>(console.error("Failed to yield to main: ",t),new Promise(r=>setTimeout(r,0)))):new Promise(t=>setTimeout(t,0))}function U(e){const t=`algoliasearch-client-js-${e.key}`;let r;const n=()=>(r===void 0&&(r=e.localStorage||window.localStorage),r),a=()=>JSON.parse(n().getItem(t)||"{}"),s=o=>{n().setItem(t,JSON.stringify(o))},u=()=>{const o=e.timeToLive?e.timeToLive*1e3:null,l=a(),f=new Date().getTime();return Object.fromEntries(Object.entries(l).filter(([,m])=>!m||m.timestamp===void 0?!1:o?m.timestamp+o>=f:!0))};return{get(o,l,f={miss:()=>Promise.resolve()}){return C().then(()=>{const m=u(),i=JSON.stringify(o),d=m[i];return s(m),d?d.value:l().then(g=>f.miss(g).then(()=>g))})},set(o,l){return C().then(()=>{const f=a();return f[JSON.stringify(o)]={timestamp:new Date().getTime(),value:l},n().setItem(t,JSON.stringify(f)),l})},delete(o){return C().then(()=>{const l=a();delete l[JSON.stringify(o)],n().setItem(t,JSON.stringify(l))})},clear(){return Promise.resolve().then(()=>{n().removeItem(t)})}}}function S(e){const t=[...e.caches],r=t.shift();return r===void 0?W():{get(n,a,s={miss:()=>Promise.resolve()}){return r.get(n,a,s).catch(()=>S({caches:t}).get(n,a,s))},set(n,a){return r.set(n,a).catch(()=>S({caches:t}).set(n,a))},delete(n){return r.delete(n).catch(()=>S({caches:t}).delete(n))},clear(){return r.clear().catch(()=>S({caches:t}).clear())}}}function W(){return{get(e,t,r={miss:()=>Promise.resolve()}){return t().then(a=>Promise.all([a,r.miss(a)])).then(([a])=>a)},set(e,t){return Promise.resolve(t)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}}function N(e={serializable:!0}){let t={};return{get(r,n,a={miss:()=>Promise.resolve()}){const s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);const u=n(),o=a&&a.miss||(()=>Promise.resolve());return u.then(l=>o(l)).then(()=>u)},set(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete(r){return delete t[JSON.stringify(r)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}function L(e,t,r){const n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers(){return e===w.WithinHeaders?n:{}},queryParameters(){return e===w.WithinQueryParameters?n:{}}}}function Q(e){let t=e.length-1;for(t;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function J(e,t){return t&&Object.keys(t).forEach(r=>{e[r]=t[r](e)}),e}function A(e,...t){let r=0;return e.replace(/%s/g,()=>encodeURIComponent(t[r++]))}const R="4.26.0",w={WithinQueryParameters:0,WithinHeaders:1};function x(e,t){const r=e||{},n=r.data||{};return Object.keys(r).forEach(a=>{["timeout","headers","queryParameters","data","cacheable"].indexOf(a)===-1&&(n[a]=r[a])}),{data:Object.entries(n).length>0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}const T={Read:1,Write:2,Any:3},O={Up:1,Down:2,Timeouted:3},I=120*1e3;function F(e,t=O.Up){return{...e,status:t,lastUpdate:Date.now()}}function G(e){return e.status===O.Up||Date.now()-e.lastUpdate>I}function _(e){return e.status===O.Timeouted&&Date.now()-e.lastUpdate<=I}function k(e){return typeof e=="string"?{protocol:"https",url:e,accept:T.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||T.Any}}const y={Get:"GET",Post:"POST"};function B(e,t){return Promise.all(t.map(r=>e.get(r,()=>Promise.resolve(F(r))))).then(r=>{const n=r.filter(o=>G(o)),a=r.filter(o=>_(o)),s=[...n,...a],u=s.length>0?s.map(o=>k(o)):t;return{getTimeout(o,l){return(a.length===0&&o===0?1:a.length+3+o)*l},statelessHosts:u}})}const V=({isTimedOut:e,status:t})=>!e&&~~t===0,X=e=>{const t=e.status;return e.isTimedOut||V(e)||~~(t/100)!==2&&~~(t/100)!==4},K=({status:e})=>~~(e/100)===2,Y=(e,t)=>X(e)?t.onRetry(e):K(e)?t.onSuccess(e):t.onFail(e);function E(e,t,r,n){const a=[],s=ae(r,n),u=se(e,n),o=r.method,l=r.method!==y.Get?{}:{...r.data,...n.data},f={"x-algolia-agent":e.userAgent.value,...e.queryParameters,...l,...n.queryParameters};let m=0;const i=(d,g)=>{const h=d.pop();if(h===void 0)throw ie($(a));const b={data:s,headers:u,method:o,url:ne(h,r.path,f),connectTimeout:g(m,e.timeouts.connect),responseTimeout:g(m,n.timeout)},v=c=>{const P={request:b,response:c,host:h,triesLeft:d.length};return a.push(P),P},p={onSuccess:c=>te(c),onRetry(c){const P=v(c);return c.isTimedOut&&m++,Promise.all([e.logger.info("Retryable failure",D(P)),e.hostsCache.set(h,F(h,c.isTimedOut?O.Timeouted:O.Down))]).then(()=>i(d,g))}
1,onFail(c){throw v(c),re(c,$(a))}};return e.requester.send(b).then(c=>Y(c,p))};return B(e.hostsCache,t).then(d=>i([...d.statelessHosts].reverse(),d.getTimeout))}function Z(e){const{hostsCache:t,logger:r,requester:n,requestsCache:a,responsesCache:s,timeouts:u,userAgent:o,hosts:l,queryParameters:f,headers:m}=e,i={hostsCache:t,logger:r,requester:n,requestsCache:a,responsesCache:s,timeouts:u,userAgent:o,headers:m,queryParameters:f,hosts:l.map(d=>k(d)),read(d,g){const h=x(g,i.timeouts.read),b=()=>E(i,i.hosts.filter(c=>(c.accept&T.Read)!==0),d,h);if((h.cacheable!==void 0?h.cacheable:d.cacheable)!==!0)return b();const p={request:d,mappedRequestOptions:h,transporter:{queryParameters:i.queryParameters,headers:i.headers}};return i.responsesCache.get(p,()=>i.requestsCache.get(p,()=>i.requestsCache.set(p,b()).then(c=>Promise.all([i.requestsCache.delete(p),c]),c=>Promise.all([i.requestsCache.delete(p),Promise.reject(c)])).then(([c,P])=>P)),{miss:c=>i.responsesCache.set(p,c)})},write(d,g){return E(i,i.hosts.filter(h=>(h.accept&T.Write)!==0),d,x(g,i.timeouts.write))}};return i}function ee(e){const t={value:`Algolia for JavaScript (${e})`,add(r){const n=`; ${r.segment}${r.version!==void 0?` (${r.version})`:""}`;return t.value.indexOf(n)===-1&&(t.value=`${t.value}${n}`),t}};return t}function te(e){try{return JSON.parse(e.content)}catch(t){throw ce(t.message,e)}}function re({content:e,status:t},r){let n=e;try{n=JSON.parse(e).message}catch{}return oe(n,t,r)}function ne(e,t,r){const n=z(r);let a=`${e.protocol}://${e.url}/${t.charAt(0)==="/"?t.substr(1):t}`;return n.length&&(a+=`?${n}`),a}function z(e){const t=r=>Object.prototype.toString.call(r)==="[object Object]"||Object.prototype.toString.call(r)==="[object Array]";return Object.keys(e).map(r=>A("%s=%s",r,t(e[r])?JSON.stringify(e[r]):e[r])).join("&")}function ae(e,t){if(e.method===y.Get||e.data===void 0&&t.data===void 0)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}function se(e,t){const r={...e.headers,...t.headers},n={};return Object.keys(r).forEach(a=>{const s=r[a];n[a.toLowerCase()]=s}),n}function $(e){return e.map(t=>D(t))}function D(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function oe(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}function ce(e,t){return{name:"DeserializationError",message:e,response:t}}function ie(e){return{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support .",transporterStackTrace:e}}const ue=e=>{const t=e.appId,r=L(e.authMode!==void 0?e.authMode:w.WithinHeaders,t,e.apiKey),n=Z({hosts:[{url:`${t}-dsn.algolia.net`,accept:T.Read},{url:`${t}.algolia.net`,accept:T.Write}].concat(Q([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}])),...e,headers:{...r.headers(),"content-type":"application/x-www-form-urlencoded",...e.headers},queryParameters:{...r.queryParameters(),...e.queryParameters}});return J({transporter:n,appId:t,addAlgoliaAgent(s,u){n.userAgent.add({segment:s,version:u})},clearCache(){return Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then(()=>{})}},e.methods)},le=e=>(t,r)=>t.method===y.Get?e.transporter.read(t,r):e.transporter.write(t,r),H=e=>(t,r={})=>{const n={transporter:e.transporter,appId:e.appId,indexName:t};return J(n,r.methods)},j=e=>(t,r)=>{const n=t.map(a=>({...a,params:z(a.params||{})}));return e.transporter.read({method:y.Post,path:"1/indexes/*/queries",data:{requests:n},cacheable:!0},r)},q=e=>(t,r)=>Promise.all(t.map(n=>{const{facetName:a,facetQuery:s,...u}=n.params;return H(e)(n.indexName,{methods:{searchForFacetValues:M}}).searchForFacetValues(a,s,{...r,...u})})),de=e=>(t,r,n)=>e.transporter.read({method:y.Post,path:A("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n),me=e=>(t,r)=>e.transporter.read({method:y.Post,path:A("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r),M=e=>(t,r,n)=>e.transporter.read({method:y.Post,path:A("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n);function he(e){return{debug(t,r){return Promise.resolve()},info(t,r){return Promise.resolve()},error(t,r){return console.error(t,r),Promise.resolve()}}}const fe=e=>(t,r)=>{const n=t.map(a=>({...a,threshold:a.threshold||0}));return e.transporter.read({method:y.Post,path:"1/indexes/*/recommendations",data:{requests:n},cacheable:!0},r)};function ge(){return{send(e){return new Promise(t=>{const r=new XMLHttpRequest;
1r.open(e.method,e.url,!0),Object.keys(e.headers).forEach(u=>r.setRequestHeader(u,e.headers[u]));const n=(u,o)=>setTimeout(()=>{r.abort(),t({status:0,content:o,isTimedOut:!0})},u*1e3),a=n(e.connectTimeout,"Connection timeout");let s;r.onreadystatechange=()=>{r.readyState>r.OPENED&&s===void 0&&(clearTimeout(a),s=n(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{r.status===0&&(clearTimeout(a),clearTimeout(s),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(s),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)})}}}function pe(e,t,r){const n={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:ge(),logger:he(),responsesCache:N(),requestsCache:N({serializable:!1}),hostsCache:S({caches:[U({key:`${R}-${e}`}),N()]}),userAgent:ee(R).add({segment:"Browser",version:"lite"}),authMode:w.WithinQueryParameters};return ue({...n,...r,methods:{search:j,searchForFacetValues:q,multipleQueries:j,multipleSearchForFacetValues:q,customRequest:le,initIndex:a=>s=>H(a)(s,{methods:{search:me,searchForFacetValues:M,findAnswers:de}}),getRecommendations:fe}})}pe.version=R;export{pe as default};

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.