1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,435405,337374,e=>{"use strict";var t=e.i(255827);let r=(0,t.createContext)({hasAccess:!1,isAuthenticated:!1}),s=r.Provider;function i(){return(0,t.use)(r)}e.s(["MetadataAccessProvider",0,s,"useMetadataAccessContext",()=>i],337374);var a=e.i(724711),n=e.i(386909);let o=["@usul.ai","@digitalseem.org"],l=["STARTER","RESEARCH","ENTERPRISE"];function c(){let e=i(),{data:r,isPending:s}=(0,n.useSession)(),[c,u]=(0,t.useState)(null);(0,t.useEffect)(()=>{if(s)return;if(!r)return void u({hasAccess:!1,isAuthenticated:!1});if(function(e){if(!e)return!1;let t=e.trim().toLowerCase(),r=t.lastIndexOf("@");if(r<0)return!1;let s=t.slice(r);return o.includes(s)}(r.user.email))return void u({hasAccess:!0,isAuthenticated:!0});let e=!1;return(0,a.getQuotaStatus)().then(t=>{e||u({hasAccess:function(e,t){return!!e&&"FREE"!==e&&!!l.includes(e)&&("ACTIVE"===t||"CANCEL_AT_PERIOD_END"===t)}(t?.planTier,t?.subscriptionStatus),isAuthenticated:!0})}).catch(()=>{e||u({hasAccess:!1,isAuthenticated:!0})}),()=>{e=!0}},[s,r]);let d=c??e;return{hasAccess:d.hasAccess,isAuthenticated:d.isAuthenticated,isPending:s&&null===c&&!e.isAuthenticated}}e.s(["useMetadataAccess",()=>c],435405)},614272,e=>{"use strict";var t;let{searchAuthors:r,searchBooks:s,searchAdvancedGenres:i,searchRegions:a,searchEmpires:n,searchAllCollections:o,searchCorpus:l,searchContent:c}=(t=e.i(994860).apiFetch,{searchAuthors:async(e,{filters:r,mode:s,...i}={})=>await t({path:"/search/authors",params:{q:e,...i,...r,...s&&"keyword"!==s?{mode:s}:{}}}),searchBooks:async(e,{filters:r,mode:s,...i}={})=>{let a=i.page??1,n=await t({path:"/search/books",params:{q:e,...i,...r}});return n||{...((e=1)=>({pagination:((e=1)=>({totalRecords:0,totalPages:0,currentPage:e,hasPrev:!1,hasNext:!1}))(e),results:{found:0,page:e,hits:[]}}))(a),selectedAuthors:null}},searchAdvancedGenres:async(e,{filters:r,mode:s,...i}={})=>await t({path:"/search/advancedGenres",params:{q:e,...i,...s&&"keyword"!==s?{mode:s}:{}}}),searchRegions:async(e,{filters:r,mode:s,...i}={})=>await t({path:"/search/regions",params:{q:e,...i,...s&&"keyword"!==s?{mode:s}:{}}}),searchEmpires:async(e,{filters:r,mode:s,...i}={})=>t({path:"/search/empires",params:{q:e,...i,...s&&"keyword"!==s?{mode:s}:{}}}),searchAllCollections:async(e,{filters:r,...s}={})=>await t({path:"/search/all",params:{q:e,...s}}),searchCorpus:async(e,r)=>{let s=await t({path:"/search",params:{q:e,locale:r}});return s?{content:s.content,books:s.books,authors:s.authors,genres:s.advancedGenres??{found:0,hits:[]},regions:s.regions??{found:0,hits:[]},empires:s.empires??{found:0,hits:[]}}:{content:{total:0,results:[]},books:{found:0,hits:[]},authors:{found:0,hits:[]},genres:{found:0,hits:[]},regions:{found:0,hits:[]},empires:{found:0,hits:[]}}},searchContent:async(e,r="semantic",s=1,i)=>t({path:"/search/corpus-content",params:{q:e,page:s,limit:20,include_details:!0,type:"semantic"===r?"vector":"text",...i?{locale:i}:{}}})});e.s(["searchAdvancedGenres",0,i,"searchAllCollections",0,o,"searchAuthors",0,r,"searchBooks",0,s,"searchEmpires",0,n,"searchRegions",0,a],614272)},86660,e=>{"use strict";var t=e.i(119761),r=e.i(975157);function s({className:e,...s}){return(0,t.jsx)("div",{className:(0,r.cn)("bg-primary/20 animate-pulse rounded-md",e),...s})}e.s(["Skeleton",()=>s])},506513,e=>{"use strict";var t=e.i(868711),r=e.i(368376);let s=Object.keys(t.pathLocaleToSupportedBcp47LocaleMap),i=e=>{let r=Object.entries(t.pathLocaleToSupportedBcp47LocaleMap).find(t=>t[1]===e);if(r)return r[0];throw Error(`Expected to find ${e} in path locale to bcp47locale map but no such entry was found!`)},a=e=>t.localeToDirection[e];e.s(["PATH_LOCALES",0,s,"appLocaleToPathLocale",0,i,"getLocaleDirection",0,a,"getLocaleFullName",0,e=>t.localeToFullName[e],"useDirection",0,()=>a((0,r.useLocale)()),"usePathLocale",0,()=>i((0,r.useLocale)())])},301130,e=>{"use strict";var t=e.i(255827),r=e.i(775453),s=e.i(195657),i=e.i(892303),a=e.i(530741),n=e.i(375425),o=e.i(177852),l=e.i(389915),c=e.i(55119),u=e.i(215774),d=e.i(48226),h=e.i(457195),p=e.i(49749),f=e.i(645751),v=e.i(260087),g=e.i(119761),m="Dialog",[y,b]=(0,i.createContextScope)(m),[R,C]=y(m),D=e=>{let{__scopeDialog:r,children:s,open:i,defaultOpen:o,onOpenChange:l,modal:c=!0}=e,u=t.useRef(null),d=t.useRef(null),[h,p]=(0,n.useControllableState)({prop:i,defaultProp:o??!1,onChange:l,caller:m});return(0,g.jsx)(R,{scope:r,triggerRef:u,contentRef:d,contentId:(0,a.useId)(),titleId:(0,a.useId)(),descriptionId:(0,a.useId)(),open:h,onOpenChange:p,onOpenToggle:t.useCallback(()=>p(e=>!e),[p]),modal:c,children:s})};D.displayName=m;var x="DialogTrigger",S=t.forwardRef((e,t)=>
1{let{__scopeDialog:i,...a}=e,n=C(x,i),o=(0,s.useComposedRefs)(t,n.triggerRef);return(0,g.jsx)(d.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":K(n.open),...a,ref:o,onClick:(0,r.composeEventHandlers)(e.onClick,n.onOpenToggle)})});S.displayName=x;var T="DialogPortal",[w,I]=y(T,{forceMount:void 0}),E=e=>{let{__scopeDialog:r,forceMount:s,children:i,container:a}=e,n=C(T,r);return(0,g.jsx)(w,{scope:r,forceMount:s,children:t.Children.map(i,e=>(0,g.jsx)(u.Presence,{present:s||n.open,children:(0,g.jsx)(c.Portal,{asChild:!0,container:a,children:e})}))})};E.displayName=T;var O="DialogOverlay",F=t.forwardRef((e,t)=>{let r=I(O,e.__scopeDialog),{forceMount:s=r.forceMount,...i}=e,a=C(O,e.__scopeDialog);return a.modal?(0,g.jsx)(u.Presence,{present:s||a.open,children:(0,g.jsx)(A,{...i,ref:t})}):null});F.displayName=O;var j=(0,v.createSlot)("DialogOverlay.RemoveScroll"),A=t.forwardRef((e,t)=>{let{__scopeDialog:r,...s}=e,i=C(O,r);return(0,g.jsx)(p.RemoveScroll,{as:j,allowPinchZoom:!0,shards:[i.contentRef],children:(0,g.jsx)(d.Primitive.div,{"data-state":K(i.open),...s,ref:t,style:{pointerEvents:"auto",...s.style}})})}),P="DialogContent",Q=t.forwardRef((e,t)=>{let r=I(P,e.__scopeDialog),{forceMount:s=r.forceMount,...i}=e,a=C(P,e.__scopeDialog);return(0,g.jsx)(u.Presence,{present:s||a.open,children:a.modal?(0,g.jsx)(k,{...i,ref:t}):(0,g.jsx)(U,{...i,ref:t})})});Q.displayName=P;var k=t.forwardRef((e,i)=>{let a=C(P,e.__scopeDialog),n=t.useRef(null),o=(0,s.useComposedRefs)(i,a.contentRef,n);return t.useEffect(()=>{let e=n.current;if(e)return(0,f.hideOthers)(e)},[]),(0,g.jsx)(N,{...e,ref:o,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,r.composeEventHandlers)(e.onCloseAutoFocus,e=>{e.preventDefault(),a.triggerRef.current?.focus()}),onPointerDownOutside:(0,r.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:(0,r.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault())})}),U=t.forwardRef((e,r)=>{let s=C(P,e.__scopeDialog),i=t.useRef(!1),a=t.useRef(!1);return(0,g.jsx)(N,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(i.current||s.triggerRef.current?.focus(),t.preventDefault()),i.current=!1,a.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(i.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));let r=t.target;s.triggerRef.current?.contains(r)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})}),N=t.forwardRef((e,r)=>{let{__scopeDialog:i,trapFocus:a,onOpenAutoFocus:n,onCloseAutoFocus:c,...u}=e,d=C(P,i),p=t.useRef(null),f=(0,s.useComposedRefs)(r,p);return(0,h.useFocusGuards)(),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.FocusScope,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:n,onUnmountAutoFocus:c,children:(0,g.jsx)(o.DismissableLayer,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":K(d.open),...u,ref:f,onDismiss:()=>d.onOpenChange(!1)})}),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(z,{titleId:d.titleId}),(0,g.jsx)(V,{contentRef:p,descriptionId:d.descriptionId})]})]})}),M="DialogTitle",L=t.forwardRef((e,t)=>{let{__scopeDialog:r,...s}=e,i=C(M,r);return(0,g.jsx)(d.Primitive.h2,{id:i.titleId,...s,ref:t})});L.displayName=M;var _="DialogDescription",q=t.forwardRef((e,t)=>{let{__scopeDialog:r,...s}=e,i=C(_,r);return(0,g.jsx)(d.Primitive.p,{id:i.descriptionId,...s,ref:t})});q.displayName=_;var H="DialogClose",G=t.forwardRef((e,t)=>{let{__scopeDialog:s,...i}=e,a=C(H,s);return(0,g.jsx)(d.Primitive.button,{type:"button",...i,ref:t,onClick:(0,r.composeEventHandlers)(e.onClick,()=>a.onOpenChange(!1))})});function K(e){return e?"open":"closed"}G.displayName=H;var B="DialogTitleWarning",[W,$]=(0,i.createContext)(B,{contentName:P,titleName:M,docsSlug:"dialog"}),z=({titleId:e})=>{let r=$(B),s=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users. 2 3If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component. 4 5For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return t.useEffect(()=>{e&&(document.getElementById(e)||console.error(s))},[s,e]),null},V=({contentRef:e,descriptionId:r})=>{let s=$("DialogDescriptionWarning"),i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${s.contentName}}.`;return t.useEffect(()=>{let t=e.current?.getAttribute("aria-describedby");r&&t&&(document.getElementById(r)||console.warn(i))},[i,e,r]),null};e.s(["Close",()=>G,"Content",()=>Q,"Description",()=>q,"Dialog",()=>D,"DialogClose",()=>G,"DialogContent",()=>Q,"DialogDescription",()=>q,"DialogOverlay",()=>F,"DialogPortal",()=>E,"DialogTitle",()=>L,"DialogTrigger",()=>S,"Overlay",()=>F,"Portal",()=>E,"Root",()=>D,"Title",()=>L,"Trigger",()=>S,"WarningProvider",()=>W,"createDialogScope",()=>b],199286);var X=e.i(199286);e.s(["Dialog",0,X],301130)},376690,e=>{"use strict";var t=e.i(119761),r=e.i(975157),s=e.i(301130),i=e.i(929433);let a=s.Dialog.Root,n=s.Dialog.Trigger,o=s.Dialog.Portal;s.Dialog.Close;let l=({className:e,...i})=>(0,t.jsx)(s.Dialog.Overlay,{className:(0,r.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 grid place-items-center overflow-y-auto bg-black/80 pt-40 pb-20",e),...i}),c=s.Dialog.Content,u=s.Dialog.Close,d=s.Dialog.Title,h=({className:e,children:a,overlayProps:n,...c})=>(0,t.jsx)(o,{children:(0,t.jsx)(l,{...n,children:(0,t.jsxs)(s.Dialog.Content,{className:(0,r.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[5%] data-[state=open]:slide-in-from-top-[5%] relative z-50 grid w-full max-w-lg gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",e),...c,children:[a,(0,t.jsxs)(s.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 roun
5ded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none ltr:right-4 rtl:left-4",children:[(0,t.jsx)(i.XIcon,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})})}),p=({className:e,...s})=>(0,t.jsx)("div",{className:(0,r.cn)("flex flex-col space-y-1.5",e),...s}),f=({className:e,...s})=>(0,t.jsx)("div",{className:(0,r.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...s}),v=({className:e,...i})=>(0,t.jsx)(s.Dialog.Title,{className:(0,r.cn)("text-lg leading-none font-semibold tracking-tight",e),...i}),g=({className:e,...i})=>(0,t.jsx)(s.Dialog.Description,{className:(0,r.cn)("text-muted-foreground text-sm",e),...i});e.s(["Dialog",()=>a,"DialogContent",()=>h,"DialogDescription",()=>g,"DialogFooter",()=>f,"DialogHeader",()=>p,"DialogOverlay",()=>l,"DialogPortal",()=>o,"DialogTitle",()=>v,"DialogTrigger",()=>n,"RawDialogClose",0,u,"RawDialogContent",0,c,"RawDialogTitle",0,d])},602255,667610,e=>{"use strict";let t;var r=e.i(585719),s=e.i(223109);e.i(69966);var i=e.i(424196),a=e.i(449845),n=e.i(257547),o=class extends n.Removable{#e;#t;#r;#s;#i;#a;#n;constructor(e){super(),this.#n=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#r=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,s=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#r.remove(this)}setData(e,t){let r=(0,i.replaceData)(this.state.data,e,this.options);return this.#o({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(i.noop).catch(i.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>!1!==(0,i.resolveEnabled)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===i.skipToken||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!(0,i.timeUntilStale)(this.state.dataUpdatedAt,e)}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.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.#i&&(this.#n?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let r=new AbortController,s=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#n=!0,r.signal)}
5)},n=()=>{let e=(0,i.ensureQueryFn)(this.options,t),r={client:this.#s,queryKey:this.queryKey,meta:this.meta};return(s(r),this.#n=!1,this.options.persister)?this.options.persister(e,r,this):e(r)},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:n};s(o),this.options.behavior?.onFetch(o,this),this.#t=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#o({type:"fetch",meta:o.fetchOptions?.meta});let l=e=>{(0,a.isCancelledError)(e)&&e.silent||this.#o({type:"error",error:e}),(0,a.isCancelledError)(e)||(this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this)),this.scheduleGc()};return this.#i=(0,a.createRetryer)({initialPromise:t?.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:e=>{if(void 0===e)return void l(Error(`${this.queryHash} data is undefined`));try{this.setData(e)}catch(e){l(e);return}this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),this.scheduleGc()},onError:l,onFail:(e,t)=>{this.#o({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),this.#i.start()}#o(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":return{...t,...l(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let r=e.error;if((0,a.isCancelledError)(r)&&r.revert&&this.#t)return{...this.#t,fetchStatus:"idle"};return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),s.notifyManager.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function l(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,a.canFetch)(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}e.s(["Query",()=>o,"fetchState",()=>l],667610);var c=e.i(502646),u=e.i(603084),d=class extends c.Subscribable{constructor(e,t){super(),this.options=t,this.#s=e,this.#l=null,this.#c=(0,u.pendingThenable)(),this.options.experimental_prefetchInRender||this.#c.reject(Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#s;#u=void 0;#d=void 0;#h=void 0;#p;#f;#c;#l;#v;#g;#m;#y;#b;#R;#C=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#u.addObserver(this),h(this.#u,this.options)?this.#D():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return p(this.#u,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return p(this.#u,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#T(),this.#u.removeObserver(this)}setOptions(e){let t=this.options,r=this.#u;if(this.options=this.#s.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,i.resolveEnabled)(this.options.enabled,this.#u))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#u.setOptions(this.options),t._defaulted&&!(0,i.shallowEqualObjects)(this.options,t)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#u,observer:this});let s=this.hasListeners();s&&f(this.#u,r,this.options,t)&&this.#D(),this.updateResult(),s&&(this.#u!==r||(0,i.resolveEnabled)(this.options.enabled,this.#u)!==(0,i.resolveEnabled)(t.enabled,this.#u)||(0,i.resolveStaleTime)(this.options.staleTime,this.#u)!==(0,i.resolveStaleTime)(t.staleTime,this.#u))&&this.#I();let a=this.#E();s&&(this.#u!==r||(0,i.resolveEnabled)(this.options.enabled,this.#u)!==(0,i.resolveEnabled)(t.enabled,this.#u)||a!==this.#R)&&this.#O(a)}getOptimisticResult(e){var t,r;let s=this.#s.getQueryCache().build(this.#s,e),a=this.createResult(s,e);return t=this,r=a,(0,i.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#h=a,this.#f=this.options,this.#p=this.#u.state),a}getCurrentResult(){return this.#h}trackResult(e,t){let r={};return Object.keys(e).forEach(s=>{Object.defineProperty(r,s,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(s),t?.(s),e[s])})}),r}trackProp(e){this.#C.add(e)}getCurrentQuery(){return this.#u}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#s.defaultQueryOptions(e),r=this.#s.getQueryCache().build(this.#s,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#D({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#h))}#D(e){this.#w();let t=this.#u.fetch(this.options,e);return e?.throwOnError||(t=t.catch(i.noop)),t}#I(){this.#S();let e=(0,i.resolveStaleTime)(this.options.staleTime,this.#u);if(i.isServer||this.#h.isStale||!(0,i.isValidTimeout)(e))return;let t=(0,i.timeUntilStale)(this.#h.dataUpdatedAt,e);this.#y=setTimeout(()=>{this.#h.isStale||this.updateResult()},t+1)}#E(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#u):this.options.refetchInterval)??!1}#O(e){this.#T(),this.#R=e,!i.isServer&&!1!==(0,i.resolveEnabled)(this.options.enabled,this.#u)&&(0,i.isValidTimeout)(this.#R)&&0!==this.#R&&(this.#b=setInterval(()=>
5{(this.options.refetchIntervalInBackground||r.focusManager.isFocused())&&this.#D()},this.#R))}#x(){this.#I(),this.#O(this.#E())}#S(){this.#y&&(clearTimeout(this.#y),this.#y=void 0)}#T(){this.#b&&(clearInterval(this.#b),this.#b=void 0)}createResult(e,t){let r,s=this.#u,a=this.options,n=this.#h,o=this.#p,c=this.#f,d=e!==s?e.state:this.#d,{state:p}=e,g={...p},m=!1;if(t._optimisticResults){let r=this.hasListeners(),i=!r&&h(e,t),n=r&&f(e,s,t,a);(i||n)&&(g={...g,...l(p.data,e.options)}),"isRestoring"===t._optimisticResults&&(g.fetchStatus="idle")}let{error:y,errorUpdatedAt:b,status:R}=g;r=g.data;let C=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===R){let e;n?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(e=n.data,C=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#m?.state.data,this.#m):t.placeholderData,void 0!==e&&(R="success",r=(0,i.replaceData)(n?.data,e,t),m=!0)}if(t.select&&void 0!==r&&!C)if(n&&r===o?.data&&t.select===this.#v)r=this.#g;else try{this.#v=t.select,r=t.select(r),r=(0,i.replaceData)(n?.data,r,t),this.#g=r,this.#l=null}catch(e){this.#l=e}this.#l&&(y=this.#l,r=this.#g,b=Date.now(),R="error");let D="fetching"===g.fetchStatus,x="pending"===R,S="error"===R,T=x&&D,w=void 0!==r,I={status:R,fetchStatus:g.fetchStatus,isPending:x,isSuccess:"success"===R,isError:S,isInitialLoading:T,isLoading:T,data:r,dataUpdatedAt:g.dataUpdatedAt,error:y,errorUpdatedAt:b,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:D,isRefetching:D&&!x,isLoadingError:S&&!w,isPaused:"paused"===g.fetchStatus,isPlaceholderData:m,isRefetchError:S&&w,isStale:v(e,t),refetch:this.refetch,promise:this.#c};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===I.status?e.reject(I.error):void 0!==I.data&&e.resolve(I.data)},r=()=>{t(this.#c=I.promise=(0,u.pendingThenable)())},i=this.#c;switch(i.status){case"pending":e.queryHash===s.queryHash&&t(i);break;case"fulfilled":("error"===I.status||I.data!==i.value)&&r();break;case"rejected":("error"!==I.status||I.error!==i.reason)&&r()}}return I}updateResult(){let e=this.#h,t=this.createResult(this.#u,this.options);if(this.#p=this.#u.state,this.#f=this.options,void 0!==this.#p.data&&(this.#m=this.#u),(0,i.shallowEqualObjects)(t,e))return;this.#h=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#C.size)return!0;let s=new Set(r??this.#C);return this.options.throwOnError&&s.add("error"),Object.keys(this.#h).some(t=>this.#h[t]!==e[t]&&s.has(t))};this.#F({listeners:r()})}#w(){let e=this.#s.getQueryCache().build(this.#s,this.options);if(e===this.#u)return;let t=this.#u;this.#u=e,this.#d=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#F(e){s.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#h)}),this.#s.getQueryCache().notify({query:this.#u,type:"observerResultsUpdated"})})}};function h(e,t){return!1!==(0,i.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&p(e,t,t.refetchOnMount)}function p(e,t,r){if(!1!==(0,i.resolveEnabled)(t.enabled,e)){let s="function"==typeof r?r(e):r;return"always"===s||!1!==s&&v(e,t)}return!1}function f(e,t,r,s){return(e!==t||!1===(0,i.resolveEnabled)(s.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&v(e,r)}function v(e,t){return!1!==(0,i.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,i.resolveStaleTime)(t.staleTime,e))}var g=e.i(255827),m=e.i(704830);e.i(119761);var y=g.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),b=e.i(345693),R=g.createContext(!1);R.Provider;var C=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function D(e,t){return function(e,t,r){let a,n=(0,m.useQueryClient)(r),o=g.useContext(R),l=g.useContext(y),c=n.defaultQueryOptions(e);
5n.getDefaultOptions().queries?._experimental_beforeQuery?.(c),c._optimisticResults=o?"isRestoring":"optimistic",a=c.staleTime,c.suspense&&(c.staleTime="function"==typeof a?(...e)=>Math.max(a(...e),1e3):Math.max(a??1e3,1e3),"number"==typeof c.gcTime&&(c.gcTime=Math.max(c.gcTime,1e3))),(c.suspense||c.throwOnError||c.experimental_prefetchInRender)&&!l.isReset()&&(c.retryOnMount=!1),g.useEffect(()=>{l.clearReset()},[l]);let u=!n.getQueryCache().get(c.queryHash),[d]=g.useState(()=>new t(n,c)),h=d.getOptimisticResult(c),p=!o&&!1!==e.subscribed;if(g.useSyncExternalStore(g.useCallback(e=>{let t=p?d.subscribe(s.notifyManager.batchCalls(e)):b.noop;return d.updateResult(),t},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),g.useEffect(()=>{d.setOptions(c)},[c,d]),c?.suspense&&h.isPending)throw C(c,d,l);if((({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(i&&void 0===e.data||(0,b.shouldThrowError)(r,[e.error,s])))({result:h,errorResetBoundary:l,throwOnError:c.throwOnError,query:n.getQueryCache().get(c.queryHash),suspense:c.suspense}))throw h.error;if(n.getDefaultOptions().queries?._experimental_afterQuery?.(c,h),c.experimental_prefetchInRender&&!i.isServer&&h.isLoading&&h.isFetching&&!o){let e=u?C(c,d,l):n.getQueryCache().get(c.queryHash)?.promise;e?.catch(b.noop).finally(()=>{d.updateResult()})}return c.notifyOnChangeProps?h:d.trackResult(h)}(e,d,t)}e.s(["useQuery",()=>D],602255)},574032,e=>{"use strict";var t=e.i(255827),r=e.i(775453),s=e.i(150926),i=e.i(195657),a=e.i(892303),n=e.i(530741),o=e.i(48226),l=e.i(63116),c=e.i(375425),u=e.i(355650),d=e.i(119761),h="rovingFocusGroup.onEntryFocus",p={bubbles:!1,cancelable:!0},f="RovingFocusGroup",[v,g,m]=(0,s.createCollection)(f),[y,b]=(0,a.createContextScope)(f,[m]),[R,C]=y(f),D=t.forwardRef((e,t)=>(0,d.jsx)(v.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(v.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(x,{...e,ref:t})})}));D.displayName=f;var x=t.forwardRef((e,s)=>{let{__scopeRovingFocusGroup:a,orientation:n,loop:v=!1,dir:m,currentTabStopId:y,defaultCurrentTabStopId:b,onCurrentTabStopIdChange:C,onEntryFocus:D,preventScrollOnEntryFocus:x=!1,...S}=e,T=t.useRef(null),w=(0,i.useComposedRefs)(s,T),E=(0,u.useDirection)(m),[O,F]=(0,c.useControllableState)({prop:y,defaultProp:b??null,onChange:C,caller:f}),[j,A]=t.useState(!1),P=(0,l.useCallbackRef)(D),Q=g(a),k=t.useRef(!1),[U,N]=t.useState(0);return t.useEffect(()=>{let e=T.current;if(e)return e.addEventListener(h,P),()=>e.removeEventListener(h,P)},[P]),(0,d.jsx)(R,{scope:a,orientation:n,dir:E,loop:v,currentTabStopId:O,onItemFocus:t.useCallback(e=>F(e),[F]),onItemShiftTab:t.useCallback(()=>A(!0),[]),onFocusableItemAdd:t.useCallback(()=>N(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>N(e=>e-1),[]),children:(0,d.jsx)(o.Primitive.div,{tabIndex:j||0===U?-1:0,"data-orientation":n,...S,ref:w,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{k.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!k.current;if(e.target===e.currentTarget&&t&&!j){let t=new CustomEvent(h,p);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=Q().filter(e=>e.focusable);I([e.find(e=>e.active),e.find(e=>e.id===O),...e].filter(Boolean).map(e=>e.ref.current),x)}}k.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>A(!1))})})}),S="RovingFocusGroupItem",T=t.forwardRef((e,s)=>{let{__scopeRovingFocusGroup:i,focusable:a=!0,active:l=!1,tabStopId:c,children:u,...h}=e,p=(0,n.useId)(),f=c||p,m=C(S,i),y=m.currentTabStopId===f,b=g(i),{onFocusableItemAdd:R,onFocusableItemRemove:D,currentTabStopId:x}=m;return t.useEffect(()=>{if(a)return R(),()=>D()},[a,R,D]),(0,d.jsx)(v.ItemSlot,{scope:i,id:f,focusable:a,active:l,children:(0,d.jsx)(o.Primitive.span,{tabIndex:y?0:-1,"data-orientation":m.orientation,...h,ref:s,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{a?m.onItemFocus(f):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>m.onItemFocus(f)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void m.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var s;let i=(s=e.key,"rtl"!==r?s:"ArrowLeft"===s?"ArrowRight":"ArrowRight"===s?"ArrowLeft":s);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return w[i]}(e,m.orientation,m.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=b().filter(e=>
5e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var r,s;"prev"===t&&i.reverse();let a=i.indexOf(e.currentTarget);i=m.loop?(r=i,s=a+1,r.map((e,t)=>r[(s+t)%r.length])):i.slice(a+1)}setTimeout(()=>I(i))}}),children:"function"==typeof u?u({isCurrentTabStop:y,hasTabStop:null!=x}):u})})});T.displayName=S;var w={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function I(e,t=!1){let r=document.activeElement;for(let s of e)if(s===r||(s.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",()=>T,"Root",()=>D,"createRovingFocusGroupScope",()=>b])},189799,e=>{"use strict";var t=e.i(119761),r=e.i(975157),s=e.i(255827),i=e.i(775453),a=e.i(892303),n=e.i(574032),o=e.i(215774),l=e.i(48226),c=e.i(355650),u=e.i(375425),d=e.i(530741),h="Tabs",[p,f]=(0,a.createContextScope)(h,[n.createRovingFocusGroupScope]),v=(0,n.createRovingFocusGroupScope)(),[g,m]=p(h),y=s.forwardRef((e,r)=>{let{__scopeTabs:s,value:i,onValueChange:a,defaultValue:n,orientation:o="horizontal",dir:p,activationMode:f="automatic",...v}=e,m=(0,c.useDirection)(p),[y,b]=(0,u.useControllableState)({prop:i,onChange:a,defaultProp:n??"",caller:h});return(0,t.jsx)(g,{scope:s,baseId:(0,d.useId)(),value:y,onValueChange:b,orientation:o,dir:m,activationMode:f,children:(0,t.jsx)(l.Primitive.div,{dir:m,"data-orientation":o,...v,ref:r})})});y.displayName=h;var b="TabsList",R=s.forwardRef((e,r)=>{let{__scopeTabs:s,loop:i=!0,...a}=e,o=m(b,s),c=v(s);return(0,t.jsx)(n.Root,{asChild:!0,...c,orientation:o.orientation,dir:o.dir,loop:i,children:(0,t.jsx)(l.Primitive.div,{role:"tablist","aria-orientation":o.orientation,...a,ref:r})})});R.displayName=b;var C="TabsTrigger",D=s.forwardRef((e,r)=>{let{__scopeTabs:s,value:a,disabled:o=!1,...c}=e,u=m(C,s),d=v(s),h=T(u.baseId,a),p=w(u.baseId,a),f=a===u.value;return(0,t.jsx)(n.Item,{asChild:!0,...d,focusable:!o,active:f,children:(0,t.jsx)(l.Primitive.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":p,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:h,...c,ref:r,onMouseDown:(0,i.composeEventHandlers)(e.onMouseDown,e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():u.onValueChange(a)}),onKeyDown:(0,i.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&u.onValueChange(a)}),onFocus:(0,i.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==u.activationMode;f||o||!e||u.onValueChange(a)})})})});D.displayName=C;var x="TabsContent",S=s.forwardRef((e,r)=>{let{__scopeTabs:i,value:a,forceMount:n,children:c,...u}=e,d=m(x,i),h=T(d.baseId,a),p=w(d.baseId,a),f=a===d.value,v=s.useRef(f);return s.useEffect(()=>{let e=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(o.Presence,{present:n||f,children:({present:s})=>(0,t.jsx)(l.Primitive.div,{"data-state":f?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":h,hidden:!s,id:p,tabIndex:0,...u,ref:r,style:{...e.style,animationDuration:v.current?"0s":void 0},children:s&&c})})});function T(e,t){return`${e}-trigger-${t}`}function w(e,t){return`${e}-content-${t}`}S.displayName=x,e.s(["Content",()=>S,"List",()=>R,"Root",()=>y,"Tabs",()=>y,"TabsContent",()=>S,"TabsList",()=>R,"TabsTrigger",()=>D,"Trigger",()=>D,"createTabsScope",()=>f],654701);var I=e.i(654701),I=I,E=e.i(92425),O=e.i(305500);let F=I.Root,j=({className:e,...s})=>(0,t.jsx)(I.List,{className:(0,r.cn)("border-border bg-muted text-muted-foreground dark:bg-accent/80 inline-flex h-[38px] items-center justify-center rounded-lg border p-[3px]",e),...s}),A=({className:e,tooltip:s,tooltipProps:i,children:a,...n})=>{let o=!!s;return(0,t.jsx)(I.Trigger,{className:(0,r.cn)("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex h-full items-center justify-center rounded text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:opacity-50 data-[state=active]:shadow-sm",!o&&"px-3 disabled:pointer-events-none",e),...n,children:o?(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{className:"flex h-full w-full items-center justify-center px-3",asChild:!0,children:(0,t.jsx)("span",{children:a})}),(0,t.jsx)(E.Tooltip.Portal,{children:(0,t.jsx)(O.TooltipContent,{...i,children:s})})]}):a})},P=({className:e,...s})=>(0,t.jsx)(I.Content,{className:(0,r.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden",e),...s});e.s(["Tabs",()=>F,"TabsContent",()=>P,"TabsList",()=>j,"TabsTrigger",()=>A],189799)}]);
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.