PageSourceSearch

https://stus.ai/_next/static/chunks/161ki~og7f~4_.js

js stus.ai collected 2026-10-05 12:40:53 UTC 36,000 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,75254,e=>{"use strict";var t=e.i(71645);let s=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,s)=>s?s.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},i=(...e)=>e.filter((e,t,s)=>!!e&&""!==e.trim()&&s.indexOf(e)===t).join(" ").trim();var r={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let n=(0,t.forwardRef)(({color:e="currentColor",size:s=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:o="",children:u,iconNode:l,...c},h)=>(0,t.createElement)("svg",{ref:h,...r,width:s,height:s,stroke:e,strokeWidth:a?24*Number(n)/Number(s):n,className:i("lucide",o),...!u&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(c)&&{"aria-hidden":"true"},...c},[...l.map(([e,s])=>(0,t.createElement)(e,s)),...Array.isArray(u)?u:[u]]));e.s(["default",0,(e,r)=>{let a=(0,t.forwardRef)(({className:a,...o},u)=>(0,t.createElement)(n,{ref:u,iconNode:r,className:i(`lucide-${s(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,a),...o}));return a.displayName=s(e),a}],75254)},37727,e=>{"use strict";let t=(0,e.i(75254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",0,t],37727)},68834,e=>{"use strict";var t=e.i(71645);let s=e=>{let t,s=new Set,i=(e,i)=>{let r="function"==typeof e?e(t):e;if(!Object.is(r,t)){let e=t;t=(null!=i?i:"object"!=typeof r||null===r)?r:Object.assign({},t,r),s.forEach(s=>s(t,e))}},r=()=>t,n={setState:i,getState:r,getInitialState:()=>a,subscribe:e=>(s.add(e),()=>s.delete(e))},a=t=e(i,r,n);return n},i=e=>{let i=e?s(e):s,r=e=>(function(e,s=e=>e){let i=t.default.useSyncExternalStore(e.subscribe,t.default.useCallback(()=>s(e.getState()),[e,s]),t.default.useCallback(()=>s(e.getInitialState()),[e,s]));return t.default.useDebugValue(i),i})(i,e);return Object.assign(r,i),r};e.s(["create",0,e=>e?i(e):i],68834)},79473,e=>{"use strict";function t(e,t){let s;try{s=e()}catch(e){return}return{getItem:e=>{var i;let r=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),n=null!=(i=s.getItem(e))?i:null;return n instanceof Promise?n.then(r):r(n)},setItem:(e,i)=>s.setItem(e,JSON.stringify(i,null==t?void 0:t.replacer)),removeItem:e=>s.removeItem(e)}}let s=e=>t=>{try{let i=e(t);if(i instanceof Promise)return i;return{then:e=>s(e)(i),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>s(t)(e)}}};e.s(["createJSONStorage",0,t,"persist",0,(e,i)=>(r,n,a)=>{let o,u={storage:t(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...i},l=!1,c=0,h=new Set,d=new Set,f=u.storage;if(!f)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${u.name}', the given storage is currently unavailable.`),r(...e)},n,a);let p=()=>{let e=u.partialize({...n()});return f.setItem(u.name,{state:e,version:u.version})},m=a.setState;a.setState=(e,t)=>(m(e,t),p());let y=e((...e)=>(r(...e),p()),n,a);a.getInitialState=()=>y;let v=()=>{var e,t;if(!f)return;let i=++c;l=!1,h.forEach(e=>{var t;return e(null!=(t=n())?t:y)});let a=(null==(t=u.onRehydrateStorage)?void 0:t.call(u,null!=(e=n())?e:y))||void 0;return s(f.getItem.bind(f))(u.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===u.version)return[!1,e.state];else{if(u.migrate){let t=u.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;if(i!==c)return;let[s,a]=e;if(r(o=u.merge(a,null!=(t=n())?t:y),!0),s)return p()}).then(()=>{i===c&&(null==a||a(o,void 0),o=n(),l=!0,d.forEach(e=>e(o)))}).catch(e=>{i===c&&(null==a||a(void 0,e))})};return a.persist={setOptions:e=>{u={...u,...e},e.storage&&(f=e.storage)},clearStorage:()=>{null==f||f.removeItem(u.name)},getOptions:()=>u,rehydrate:()=>v(),hasHydrated:()=>l,onHydrate:e=>(h.add(e),()=>{h.delete(e)}),onFinishHydration:e=>(d.add(e),()=>{d.delete(e)})},u.skipHydration||v(),o||y}])},63178,e=>{"use strict";var t=e.i(71645),s=(e,t,s,i,r,n,a,o)=>{let u=document.documentElement,l=["light","dark"];function c(t){var s;
1(Array.isArray(e)?e:[e]).forEach(e=>{let s="class"===e,i=s&&n?r.map(e=>n[e]||e):r;s?(u.classList.remove(...i),u.classList.add(n&&n[t]?n[t]:t)):u.setAttribute(e,t)}),s=t,o&&l.includes(s)&&(u.style.colorScheme=s)}if(i)c(i);else try{let e=localStorage.getItem(t)||s,i=a&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;c(i)}catch(e){}},i=["light","dark"],r="(prefers-color-scheme: dark)",n="u"<typeof window,a=t.createContext(void 0),o={setTheme:e=>{},themes:[]},u=["light","dark"],l=({forcedTheme:e,disableTransitionOnChange:s=!1,enableSystem:n=!0,enableColorScheme:o=!0,storageKey:l="theme",themes:p=u,defaultTheme:m=n?"system":"light",attribute:y="data-theme",value:v,children:g,nonce:b,scriptProps:w})=>{let[C,S]=t.useState(()=>h(l,m)),[O,P]=t.useState(()=>"system"===C?f():C),q=v?Object.values(v):p,x=t.useCallback(e=>{let t=e;if(!t)return;"system"===e&&n&&(t=f());let r=v?v[t]:t,a=s?d(b):null,u=document.documentElement,l=e=>{"class"===e?(u.classList.remove(...q),r&&u.classList.add(r)):e.startsWith("data-")&&(r?u.setAttribute(e,r):u.removeAttribute(e))};if(Array.isArray(y)?y.forEach(l):l(y),o){let e=i.includes(m)?m:null,s=i.includes(t)?t:e;u.style.colorScheme=s}null==a||a()},[b]),M=t.useCallback(e=>{let t="function"==typeof e?e(C):e;S(t);try{localStorage.setItem(l,t)}catch(e){}},[C]),T=t.useCallback(t=>{P(f(t)),"system"===C&&n&&!e&&x("system")},[C,e]);t.useEffect(()=>{let e=window.matchMedia(r);return e.addListener(T),T(e),()=>e.removeListener(T)},[T]),t.useEffect(()=>{let e=e=>{e.key===l&&(e.newValue?S(e.newValue):M(m))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[M]),t.useEffect(()=>{x(null!=e?e:C)},[e,C]);let E=t.useMemo(()=>({theme:C,setTheme:M,forcedTheme:e,resolvedTheme:"system"===C?O:C,themes:n?[...p,"system"]:p,systemTheme:n?O:void 0}),[C,M,e,O,n,p]);return t.createElement(a.Provider,{value:E},t.createElement(c,{forcedTheme:e,storageKey:l,attribute:y,enableSystem:n,enableColorScheme:o,defaultTheme:m,value:v,themes:p,nonce:b,scriptProps:w}),g)},c=t.memo(({forcedTheme:e,storageKey:i,attribute:r,enableSystem:n,enableColorScheme:a,defaultTheme:o,value:u,themes:l,nonce:c,scriptProps:h})=>{let d=JSON.stringify([r,i,o,e,l,u,n,a]).slice(1,-1);return t.createElement("script",{...h,suppressHydrationWarning:!0,nonce:"u"<typeof window?c:"",dangerouslySetInnerHTML:{__html:`(${s.toString()})(${d})`}})}),h=(e,t)=>{let s;if(!n){try{s=localStorage.getItem(e)||void 0}catch(e){}return s||t}},d=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},f=e=>(e||(e=window.matchMedia(r)),e.matches?"dark":"light");e.s(["ThemeProvider",0,e=>t.useContext(a)?t.createElement(t.Fragment,null,e.children):t.createElement(l,{...e}),"useTheme",0,()=>{var e;return null!=(e=t.useContext(a))?e:o}])},63209,e=>{"use strict";let t=(0,e.i(75254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",0,t],63209)},32171,e=>{"use strict";var t=e.i(71645),s=e.i(68834),i=e.i(79473);let r=(0,i.createJSONStorage)(()=>localStorage),n=r&&{...r,getItem:e=>{try{return r.getItem(e)}catch{return null}}},a=(0,s.create)()((0,i.persist)((e,t)=>({leftCollapsed:null,rightCollapsed:null,mobileDrawer:null,mentionToInsert:null,toast:null,defaultChatMode:"confirm",chatModes:{},pdfPreview:null,csvPreview:null,markdownPreview:null,htmlPreview:null,setLeftCollapsed:t=>e({leftCollapsed:t}),setRightCollapsed:t=>e({rightCollapsed:t}),setMobileDrawer:t=>e({mobileDrawer:t}),setMentionToInsert:t=>e({mentionToInsert:t}),getChatMode:e=>{let s=t();return e&&s.chatModes[e]||s.defaultChatMode},setChatMode:(t,s)=>e(e=>t?{chatModes:{...e.chatModes,[t]:s}}:{defaultChatMode:s}),clearChatMode:t=>e(e=>{if(!(t in e.chatModes))return e;let{[t]:s,...i}=e.chatModes;return{chatModes:i}}),showToast:(t,s="info")=>e({toast:{message:t,type:s}}),hideToast:()=>e({toast:null}),setPdfPreview:t=>e({pdfPreview:t}),setCsvPreview:t=>e({csvPreview:t}),setMarkdownPreview:t=>e({markdownPreview:t}),setHtmlPreview:t=>e({htmlPreview:t}),closeAllModals:()=>e({pdfPreview:null,csvPreview:null,markdownPreview:null,htmlPreview:null})}),{name:"ui-storage",storage:n,partialize:e=>({defaultChatMode:e.defaultChatMode,chatModes:e.chatModes,leftCollapsed:e.leftCollapsed,right
1Collapsed:e.rightCollapsed}),merge:(e,t)=>{let s=e??{};return{...t,defaultChatMode:s.defaultChatMode??t.defaultChatMode,chatModes:s.chatModes??t.chatModes,leftCollapsed:s.leftCollapsed??t.leftCollapsed,rightCollapsed:s.rightCollapsed??t.rightCollapsed}}}));function o(e){let t,s=()=>t??=window.matchMedia(e);return{subscribe:e=>{let t=s();return t.addEventListener("change",e),()=>t.removeEventListener("change",e)},getSnapshot:()=>s().matches}}let u=o("(min-width: 64rem)"),l=o("(min-width: 48rem)");function c(){return(0,t.useSyncExternalStore)(u.subscribe,u.getSnapshot,()=>!0)}function h(){return!(0,t.useSyncExternalStore)(l.subscribe,l.getSnapshot,()=>!0)}function d(){let e=a.persist;return!e||e.hasHydrated()}e.s(["LEFT_SIDEBAR_ID",0,"left-sidebar","RIGHT_SIDEBAR_ID",0,"right-sidebar","useIsMobileViewport",0,h,"useLeftSidebarCollapsed",0,function(){let e=a(e=>e.leftCollapsed),t=c();return!d()||(e??!t)},"useMobileDrawer",0,function(){let e=a(e=>e.mobileDrawer),s=h();return(0,t.useEffect)(()=>{s||null===a.getState().mobileDrawer||a.setState({mobileDrawer:null})},[s]),s?e:null},"useRightSidebarOpen",0,function(){let e=a(e=>e.rightCollapsed),t=c();return!!d()&&!(e??!t)},"useUIStore",0,a])},98890,e=>{"use strict";let t,s,i,r,n,a;var o=e.i(18050);e.i(47167);var u={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},l=new class{#e=u;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},c="u"<typeof window||"Deno"in globalThis;function h(){}function d(e,t){return"function"==typeof e?e(t):e}function f(e,t){let{type:s="all",exact:i,fetchStatus:r,predicate:n,queryKey:a,stale:o}=e;if(a){if(i){if(t.queryHash!==m(a,t.options))return!1}else if(!v(t.queryKey,a))return!1}if("all"!==s){let e=t.isActive();if("active"===s&&!e||"inactive"===s&&e)return!1}return("boolean"!=typeof o||t.isStale()===o)&&(!r||r===t.state.fetchStatus)&&(!n||!!n(t))}function p(e,t){let{exact:s,status:i,predicate:r,mutationKey:n}=e;if(n){if(!t.options.mutationKey)return!1;if(s){if(y(t.options.mutationKey)!==y(n))return!1}else if(!v(t.options.mutationKey,n))return!1}return(!i||t.state.status===i)&&(!r||!!r(t))}function m(e,t){return(t?.queryKeyHashFn||y)(e)}function y(e){return JSON.stringify(e,(e,t)=>w(t)?Object.keys(t).sort().reduce((e,s)=>(e[s]=t[s],e),{}):t)}function v(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).every(s=>v(e[s],t[s]))}var g=Object.prototype.hasOwnProperty;function b(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function w(e){if(!C(e))return!1;let t=e.constructor;if(void 0===t)return!0;let s=t.prototype;return!!C(s)&&!!s.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function C(e){return"[object Object]"===Object.prototype.toString.call(e)}function S(e,t,s=0){let i=[...e,t];return s&&i.length>s?i.slice(1):i}function O(e,t,s=0){let i=[t,...e];return s&&i.length>s?i.slice(0,-1):i}var P=Symbol();function q(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==P?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}var x=(t=[],s=0,i=e=>{e()},r=e=>{e()},n=function(e){setTimeout(e,0)},{batch:e=>{let a;s++;try{a=e()}finally{let e;--s||(e=t,t=[],e.length&&n(()=>{r(()=>{e.forEach(e=>{i(e)})})}))}return a},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a=e=>{s?t.push(e):n(()=>{i(e)})},setNotifyFunction:e=>{i=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{n=e}}),M=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},T=new class extends M{#s;#i;#r;constructor(){super(),this.#r=e=>{if(!c&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#i||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#i?.(),this.#i=void 0)}setEventListener(e){this.#r=e,this.#i?.(),this.#i=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#s!==e&&(this.#s=e,this.onFocus())}onFocus(){let e=this.isFocused();
1this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#s?this.#s:globalThis.document?.visibilityState!=="hidden"}},E=new class extends M{#n=!0;#i;#r;constructor(){super(),this.#r=e=>{if(!c&&window.addEventListener){let t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#i||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#i?.(),this.#i=void 0)}setEventListener(e){this.#r=e,this.#i?.(),this.#i=e(this.setOnline.bind(this))}setOnline(e){this.#n!==e&&(this.#n=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#n}};function k(e){return Math.min(1e3*2**e,3e4)}function A(e){return(e??"online")!=="online"||E.isOnline()}var D=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function F(e){let t,s=!1,i=0,r=function(){let e,t,s=new Promise((s,i)=>{e=s,t=i});function i(e){Object.assign(s,e),delete s.resolve,delete s.reject}return s.status="pending",s.catch(()=>{}),s.resolve=t=>{i({status:"fulfilled",value:t}),e(t)},s.reject=e=>{i({status:"rejected",reason:e}),t(e)},s}(),n=()=>T.isFocused()&&("always"===e.networkMode||E.isOnline())&&e.canRun(),a=()=>A(e.networkMode)&&e.canRun(),o=e=>{"pending"===r.status&&(t?.(),r.resolve(e))},u=e=>{"pending"===r.status&&(t?.(),r.reject(e))},h=()=>new Promise(s=>{t=e=>{("pending"!==r.status||n())&&s(e)},e.onPause?.()}).then(()=>{t=void 0,"pending"===r.status&&e.onContinue?.()}),d=()=>{let t;if("pending"!==r.status)return;let a=0===i?e.initialPromise:void 0;try{t=a??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(o).catch(t=>{if("pending"!==r.status)return;let a=e.retry??3*!c,o=e.retryDelay??k,f="function"==typeof o?o(i,t):o,p=!0===a||"number"==typeof a&&i<a||"function"==typeof a&&a(i,t);s||!p?u(t):(i++,e.onFail?.(i,t),new Promise(e=>{l.setTimeout(e,f)}).then(()=>n()?void 0:h()).then(()=>{s?u(t):d()}))})};return{promise:r,status:()=>r.status,cancel:t=>{if("pending"===r.status){let s=new D(t);u(s),e.onCancel?.(s)}},continue:()=>(t?.(),r),cancelRetry:()=>{s=!0},continueRetry:()=>{s=!1},canStart:a,start:()=>(a()?d():h().then(d),r)}}var j=class{#a;destroy(){this.clearGcTimeout()}scheduleGc(){var e;this.clearGcTimeout(),"number"==typeof(e=this.gcTime)&&e>=0&&e!==1/0&&(this.#a=l.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(c?1/0:3e5))}clearGcTimeout(){this.#a&&(l.clearTimeout(this.#a),this.#a=void 0)}},I=class extends j{#o;#u;#l;#c;#h;#d;#f;constructor(e){super(),this.#f=!1,this.#d=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#c=e.client,this.#l=this.#c.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#o=Q(this.options),this.state=e.state??this.#o,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#h?.promise}setOptions(e){if(this.options={...this.#d,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=Q(this.options);void 0!==e.data&&(this.setState(R(e.data,e.dataUpdatedAt)),this.#o=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#l.remove(this)}setData(e,t){var s,i;let r=(s=this.state.data,"function"==typeof(i=this.options).structuralSharing?i.structuralSharing(s,e):!1!==i.structuralSharing?function e(t,s,i=0){if(t===s)return t;if(i>500)return s;let r=b(t)&&b(s);if(!r&&!(w(t)&&w(s)))return s;let n=(r?t:Object.keys(t)).length,a=r?s:Object.keys(s),o=a.length,u=r?Array(o):{},l=0;for(let c=0;c<o;c++){let o=r?c:a[c],h=t[o],d=s[o];if(h===d){u[o]=h,(r?c<n:g.call(t,o))&&l++;continue}if(null===h||null===d||"object"!=typeof h||"object"!=typeof d){u[o]=d;continue}let f=e(h,d,i+1);u[o]=f,f===h&&l++}return n===o&&l===n?t:u}(s,e):e);return this.#p({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#p({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#h?.promise;return this.#h?.cancel(e),t?t.then(h).catch(h):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#o)}isActive(){return this.observers.some(e=>{var t;return!1!==(t=e.options.enabled,"function"==typeof t?t(this):t)})}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===P||this.state.dataUpdateCount+this.state.errorUpdate
vendor: 4,521 bytes, line 1
1Count===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===d(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!Math.max(this.state.dataUpdatedAt+(e||0)-Date.now(),0))}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#l.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#h&&(this.#f?this.#h.cancel({revert:!0}):this.#h.cancelRetry()),this.scheduleGc()),this.#l.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#p({type:"invalidate"})}async fetch(e,t){let s;if("idle"!==this.state.fetchStatus&&this.#h?.status()!=="rejected"){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#h)return this.#h.continueRetry(),this.#h.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let i=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#f=!0,i.signal)})},n=()=>{let e,s=q(this.options,t),i=(r(e={client:this.#c,queryKey:this.queryKey,meta:this.meta}),e);return(this.#f=!1,this.options.persister)?this.options.persister(s,i,this):s(i)},a=(r(s={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#c,state:this.state,fetchFn:n}),s);this.options.behavior?.onFetch(a,this),this.#u=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#p({type:"fetch",meta:a.fetchOptions?.meta}),this.#h=F({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof D&&e.revert&&this.setState({...this.#u,fetchStatus:"idle"}),i.abort()},onFail:(e,t)=>{this.#p({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#p({type:"pause"})},onContinue:()=>{this.#p({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#h.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#l.config.onSuccess?.(e,this),this.#l.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof D){if(e.silent)return this.#h.promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#p({type:"error",error:e}),this.#l.config.onError?.(e,this),this.#l.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#p(e){let t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":var s;return{...t,...(s=t.data,{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:A(this.options.networkMode)?"fetching":"paused",...void 0===s&&{error:null,status:"pending"}}),fetchMeta:e.meta??null};case"success":let i={...t,...R(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#u=e.manual?i:void 0,i;case"error":let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),x.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#l.notify({query:this,type:"updated",action:e})})}};function R(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Q(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,s=void 0!==t,i=s?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdate
1Count:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var L=class extends M{constructor(e={}){super(),this.config=e,this.#m=new Map}#m;build(e,t,s){let i=t.queryKey,r=t.queryHash??m(i,t),n=this.get(r);return n||(n=new I({client:e,queryKey:i,queryHash:r,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(i)}),this.add(n)),n}add(e){this.#m.has(e.queryHash)||(this.#m.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#m.get(e.queryHash);t&&(e.destroy(),t===e&&this.#m.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){x.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#m.get(e)}getAll(){return[...this.#m.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>f(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>f(e,t)):t}notify(e){x.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){x.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){x.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},U=class extends j{#c;#y;#v;#h;constructor(e){super(),this.#c=e.client,this.mutationId=e.mutationId,this.#v=e.mutationCache,this.#y=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#y.includes(e)||(this.#y.push(e),this.clearGcTimeout(),this.#v.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#y=this.#y.filter(t=>t!==e),this.scheduleGc(),this.#v.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#y.length||("pending"===this.state.status?this.scheduleGc():this.#v.remove(this))}continue(){return this.#h?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#p({type:"continue"})},s={client:this.#c,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#h=F({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#p({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#p({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#v.canRun(this)});let i="pending"===this.state.status,r=!this.#h.canStart();try{if(i)t();else{this.#p({type:"pending",variables:e,isPaused:r}),await this.#v.config.onMutate?.(e,this,s);let t=await this.options.onMutate?.(e,s);t!==this.state.context&&this.#p({type:"pending",context:t,variables:e,isPaused:r})}let n=await this.#h.start();return await this.#v.config.onSuccess?.(n,e,this.state.context,this,s),await this.options.onSuccess?.(n,e,this.state.context,s),await this.#v.config.onSettled?.(n,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(n,null,e,this.state.context,s),this.#p({type:"success",data:n}),n}catch(t){try{await this.#v.config.onError?.(t,e,this.state.context,this,s)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,s)}catch(e){Promise.reject(e)}try{await this.#v.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,s)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,s)}catch(e){Promise.reject(e)}throw this.#p({type:"error",error:t}),t}finally{this.#v.runNext(this)}}#p(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPau
1sed:!1,status:"error"}}})(this.state),x.batch(()=>{this.#y.forEach(t=>{t.onMutationUpdate(e)}),this.#v.notify({mutation:this,type:"updated",action:e})})}},K=class extends M{constructor(e={}){super(),this.config=e,this.#g=new Set,this.#b=new Map,this.#w=0}#g;#b;#w;build(e,t,s){let i=new U({client:e,mutationCache:this,mutationId:++this.#w,options:e.defaultMutationOptions(t),state:s});return this.add(i),i}add(e){this.#g.add(e);let t=N(e);if("string"==typeof t){let s=this.#b.get(t);s?s.push(e):this.#b.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#g.delete(e)){let t=N(e);if("string"==typeof t){let s=this.#b.get(t);if(s)if(s.length>1){let t=s.indexOf(e);-1!==t&&s.splice(t,1)}else s[0]===e&&this.#b.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=N(e);if("string"!=typeof t)return!0;{let s=this.#b.get(t),i=s?.find(e=>"pending"===e.state.status);return!i||i===e}}runNext(e){let t=N(e);if("string"!=typeof t)return Promise.resolve();{let s=this.#b.get(t)?.find(t=>t!==e&&t.state.isPaused);return s?.continue()??Promise.resolve()}}clear(){x.batch(()=>{this.#g.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#g.clear(),this.#b.clear()})}getAll(){return Array.from(this.#g)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>p(t,e))}findAll(e={}){return this.getAll().filter(t=>p(e,t))}notify(e){x.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>
vendor: 4,173 bytes, line 1
1e.state.isPaused);return x.batch(()=>Promise.all(e.map(e=>e.continue().catch(h))))}};function N(e){return e.options.scope?.id}function H(e){return{onFetch:(t,s)=>{let i=t.options,r=t.fetchOptions?.meta?.fetchMore?.direction,n=t.state.data?.pages||[],a=t.state.data?.pageParams||[],o={pages:[],pageParams:[]},u=0,l=async()=>{let s=!1,l=q(t.options,t.fetchOptions),c=async(e,i,r)=>{if(s)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);let n=(()=>{var e,n;let a,o,u={client:t.client,queryKey:t.queryKey,pageParam:i,direction:r?"backward":"forward",meta:t.options.meta};return e=()=>t.signal,n=()=>s=!0,o=!1,Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(a??=e(),o||(o=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),u})(),a=await l(n),{maxPages:o}=t.options,u=r?O:S;return{pages:u(e.pages,a,o),pageParams:u(e.pageParams,i,o)}};if(r&&n.length){let e="backward"===r,t={pages:n,pageParams:a},s=(e?function(e,{pages:t,pageParams:s}){return t.length>0?e.getPreviousPageParam?.(t[0],t,s[0],s):void 0}:G)(i,t);o=await c(t,s,e)}else{let t=e??n.length;do{let e=0===u?a[0]??i.initialPageParam:G(i,o);if(u>0&&null==e)break;o=await c(o,e),u++}while(u<t)}return o};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=l}}}function G(e,{pages:t,pageParams:s}){let i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,s[i],s):void 0}var _=class{#C;#v;#d;#S;#O;#P;#q;#x;constructor(e={}){this.#C=e.queryCache||new L,this.#v=e.mutationCache||new K,this.#d=e.defaultOptions||{},this.#S=new Map,this.#O=new Map,this.#P=0}mount(){this.#P++,1===this.#P&&(this.#q=T.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#C.onFocus())}),this.#x=E.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#C.onOnline())}))}unmount(){this.#P--,0===this.#P&&(this.#q?.(),this.#q=void 0,this.#x?.(),this.#x=void 0)}isFetching(e){return this.#C.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#v.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#C.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),s=this.#C.build(this,t),i=s.state.data;return void 0===i?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(d(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#C.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,s){let i=this.defaultQueryOptions({queryKey:e}),r=this.#C.get(i.queryHash),n=r?.state.data,a="function"==typeof t?t(n):t;if(void 0!==a)return this.#C.build(this,i).setData(a,{...s,manual:!0})}setQueriesData(e,t,s){return x.batch(()=>this.#C.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,s)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#C.get(t.queryHash)?.state}removeQueries(e){let t=this.#C;x.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let s=this.#C;return x.batch(()=>(s.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let s={revert:!0,...t};return Promise.all(x.batch(()=>this.#C.findAll(e).map(e=>e.cancel(s)))).then(h).catch(h)}invalidateQueries(e,t={}){return x.batch(()=>(this.#C.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let s={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(x.batch(()=>this.#C.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,s);return s.throwOnError||(t=t.catch(h)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(h)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let s=this.#C.build(this,t);return s.isStaleByTime(d(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(h).catch(h)}fetchInfiniteQuery(e){return e.behavior=H(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(
1h).catch(h)}ensureInfiniteQueryData(e){return e.behavior=H(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return E.isOnline()?this.#v.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#C}getMutationCache(){return this.#v}getDefaultOptions(){return this.#d}setDefaultOptions(e){this.#d=e}setQueryDefaults(e,t){this.#S.set(y(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#S.values()],s={};return t.forEach(t=>{v(e,t.queryKey)&&Object.assign(s,t.defaultOptions)}),s}setMutationDefaults(e,t){this.#O.set(y(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#O.values()],s={};return t.forEach(t=>{v(e,t.mutationKey)&&Object.assign(s,t.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#d.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=m(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===P&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#d.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#C.clear(),this.#v.clear()}},z=e.i(71645),$=z.createContext(void 0),B=({client:e,children:t})=>(z.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,o.jsx)($.Provider,{value:e,children:t}));e.s(["QueryProvider",0,function({children:e}){let[t]=(0,z.useState)(()=>new _({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1}}}));return(0,o.jsx)(B,{client:t,children:e})}],98890)},83036,e=>{"use strict";var t=e.i(18050),s=e.i(71645),i=e.i(37727),r=e.i(63209),n=e.i(75254);let a=(0,n.default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),o=(0,n.default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),u=(0,n.default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var l=e.i(32171);e.s(["Toast",0,function(){let{toast:e,hideToast:n}=(0,l.useUIStore)();if((0,s.useEffect)(()=>{if(e){let e=setTimeout(()=>{n()},3e3);return()=>clearTimeout(e)}},[e,n]),!e)return null;let c={info:(0,t.jsx)(o,{className:"w-5 h-5"}),success:(0,t.jsx)(a,{className:"w-5 h-5"}),error:(0,t.jsx)(r.AlertCircle,{className:"w-5 h-5"}),warning:(0,t.jsx)(u,{className:"w-5 h-5"})};return(0,t.jsx)("div",{className:"fixed bottom-6 right-6 z-50 animate-fade-in",children:(0,t.jsxs)("div",{className:`flex items-center gap-3 px-4 py-3 rounded-lg border shadow-lg min-w-[300px] max-w-md ${{info:"bg-blue-500/10 border-blue-500/20 text-blue-600 dark:text-blue-400",success:"bg-green-500/10 border-green-500/20 text-green-600 dark:text-green-400",error:"bg-red-500/10 border-red-500/20 text-red-600 dark:text-red-400",warning:"bg-yellow-500/10 border-yellow-500/20 text-yellow-600 dark:text-yellow-400"}[e.type]}`,children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:c[e.type]}),(0,t.jsx)("p",{className:"flex-1 text-sm font-medium",children:e.message}),(0,t.jsx)("button",{onClick:n,className:"flex-shrink-0 p-1 rounded-md hover:bg-black/10 dark:hover:bg-white/10 transition-colors","aria-label":"Close",children:(0,t.jsx)(i.X,{className:"w-4 h-4"})})]})})}],83036)}]);

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.