PageSourceSearch

https://animox.ai/_next/static/chunks/c9270d70f6e81a89.js?dpl=dpl_9wpjvzWBfA5dF18ywne8c1sAtc74

js animox.ai collected 2026-10-05 12:51:58 UTC 32,073 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,799985,e=>{"use strict";var t=e.i(413274),r=e.i(519455),s=e.i(755146),a=e.i(945228),i=e.i(143666),n=e.i(669701),o=e.i(43764),l=e.i(450549),c=e.i(242092);function u(){let{setTheme:e}=(0,c.useTheme)(),u=(0,l.useTranslations)("Common.mode");return a.websiteConfig.ui.mode?.enableSwitch?(0,t.jsxs)(s.DropdownMenu,{children:[(0,t.jsx)(s.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)(r.Button,{variant:"ghost",size:"sm",className:"size-8 p-0.5 border border-border rounded-full",children:[(0,t.jsx)(o.SunIcon,{className:"rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,t.jsx)(n.MoonIcon,{className:"absolute rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,t.jsx)("span",{className:"sr-only",children:u("label")})]})}),(0,t.jsxs)(s.DropdownMenuContent,{align:"end",children:[(0,t.jsxs)(s.DropdownMenuItem,{onClick:()=>e("light"),children:[(0,t.jsx)(o.SunIcon,{className:"mr-2 size-4"}),(0,t.jsx)("span",{children:u("light")})]}),(0,t.jsxs)(s.DropdownMenuItem,{onClick:()=>e("dark"),children:[(0,t.jsx)(n.MoonIcon,{className:"mr-2 size-4"}),(0,t.jsx)("span",{children:u("dark")})]}),(0,t.jsxs)(s.DropdownMenuItem,{onClick:()=>e("system"),children:[(0,t.jsx)(i.LaptopIcon,{className:"mr-2 size-4"}),(0,t.jsx)("span",{children:u("system")})]})]})]}):null}e.s(["ModeSwitcher",()=>u])},143666,669701,43764,e=>{"use strict";var t=e.i(667784);let r=(0,t.default)("laptop",[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]]);e.s(["LaptopIcon",()=>r],143666);let s=(0,t.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);e.s(["MoonIcon",()=>s],669701);let a=(0,t.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["SunIcon",()=>a],43764)},658912,370021,e=>{"use strict";let t;var r=e.i(862667);let s=e=>{let t,r=new Set,s=(e,s)=>{let a="function"==typeof e?e(t):e;if(!Object.is(a,t)){let e=t;t=(null!=s?s:"object"!=typeof a||null===a)?a:Object.assign({},t,a),r.forEach(r=>r(t,e))}},a=()=>t,i={setState:s,getState:a,getInitialState:()=>n,subscribe:e=>(r.add(e),()=>r.delete(e))},n=t=e(s,a,i);return i},a=e=>{let t=e?s(e):s,a=e=>(function(e,t=e=>e){let s=r.default.useSyncExternalStore(e.subscribe,r.default.useCallback(()=>t(e.getState()),[e,t]),r.default.useCallback(()=>t(e.getInitialState()),[e,t]));return r.default.useDebugValue(s),s})(t,e);return Object.assign(a,t),a},i=(t=e=>({currentLocale:"",setCurrentLocale:t=>e(e=>({currentLocale:t}))}))?a(t):a;e.s(["useLocaleStore",0,i],658912);let n=(0,e.i(667784).default)("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);e.s(["Languages",()=>n],370021)},74058,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={callServer:function(){return i.callServer},createServerReference:function(){return o.createServerReference},findSourceMapURL:function(){return n.findSourceMapURL}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let i=e.r(635894),n=e.r(699381),o=e.r(732080)},99004,e=>{"use strict";let t;var r=e.i(82679),s=e.i(259864),a=e.i(959243),i=e.i(578889),n=e.i(757142),o=e.i(766271),l=e.i(305763),c=class extends i.Subscribable{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#r=(0,n.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#e;#s=void 0;#a=void 0;#i=void 0;#n;#o;#r;#t;#l;#c;#u;#d;#h;#p;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#s.addObserver(this),u(this.#s,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return d(this.#s,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return d(this.#s,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#g(),this.#b(),this.#s.removeObserver(this)}setOptions(e){let t=this.options,r=this.#s;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,o.resolveEnabled)(this.options.enabled,this.#s))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#v(),this.#s.setOptions(this.options),t._defaulted&&!(0,o.shallowEqualObjects)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#s,observer:this});let s=this.hasListeners();s&&h(this.#s,r,this.options,t)&&this.#m(),this.updateResult(),s&&(this.#s!==r||(0,o.resolveEnabled)(this.options.enabled,this.#s)!==(0,o.resolveEnabled)(t.enabled,this.#s)||(0,o.resolveStaleTime)(this.options.staleTime,this.#s)!==(0,o.resolveStaleTime)(t.staleTime,this.#s))&&this.#x();let a=this.#R();s&&(this.#s!==r||(0,o.resolveEnabled)(this.options.enabled,this.#s)!==(0,o.resolveEnabled)(t.enabled,this.#s)||a!==this.#p)&&this.#j(a)}getOptimisticResult(e){var t,r;let s=this.#e.getQueryCache().build(this.#e,e),a=this.createResult(s,e);return t=this,r=a,(0,o.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#i=a,this.#o=this.options,this.#n=this.#s.state),a}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#r.status||this.#r.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#f.add(e)}getCurrentQuery(){return this.#s}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#m(e){this.#v();let t=this.#s.fetch(this.options,e);return e?.throwOnError||(t=t.catch(o.noop)),t}#x(){this.#g();let e=(0,o.resolveStaleTime)(this.options.staleTime,this.#s);if(o.isServer||this.#i.isStale||!(0,o.isValidTimeout)(e))return;let t=(0,o.timeUntilStale)(this.#i.dataUpdatedAt,e);this.#d=l.timeoutManager.setTimeout(()=>{this.#i.isStale||this.updateResult()},t+1)}#R(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#s):this.options.refetchInterval)??!1}#j(e){this.#b(),this.#p=e,!o.isServer&&!1!==(0,o.resolveEnabled)(this.options.enabled,this.#s)&&(0,o.isValidTimeout)(this.#p)&&0!==this.#p&&(this.#h=l.timeoutManager.setInterval(()=>
1{(this.options.refetchIntervalInBackground||r.focusManager.isFocused())&&this.#m()},this.#p))}#y(){this.#x(),this.#j(this.#R())}#g(){this.#d&&(l.timeoutManager.clearTimeout(this.#d),this.#d=void 0)}#b(){this.#h&&(l.timeoutManager.clearInterval(this.#h),this.#h=void 0)}createResult(e,t){let r,s=this.#s,i=this.options,l=this.#i,c=this.#n,d=this.#o,f=e!==s?e.state:this.#a,{state:m}=e,y={...m},g=!1;if(t._optimisticResults){let r=this.hasListeners(),n=!r&&u(e,t),o=r&&h(e,s,t,i);(n||o)&&(y={...y,...(0,a.fetchState)(m.data,e.options)}),"isRestoring"===t._optimisticResults&&(y.fetchStatus="idle")}let{error:b,errorUpdatedAt:v,status:x}=y;r=y.data;let R=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===x){let e;l?.isPlaceholderData&&t.placeholderData===d?.placeholderData?(e=l.data,R=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,void 0!==e&&(x="success",r=(0,o.replaceData)(l?.data,e,t),g=!0)}if(t.select&&void 0!==r&&!R)if(l&&r===c?.data&&t.select===this.#l)r=this.#c;else try{this.#l=t.select,r=t.select(r),r=(0,o.replaceData)(l?.data,r,t),this.#c=r,this.#t=null}catch(e){this.#t=e}this.#t&&(b=this.#t,r=this.#c,v=Date.now(),x="error");let j="fetching"===y.fetchStatus,C="pending"===x,S="error"===x,k=C&&j,w=void 0!==r,I={status:x,fetchStatus:y.fetchStatus,isPending:C,isSuccess:"success"===x,isError:S,isInitialLoading:k,isLoading:k,data:r,dataUpdatedAt:y.dataUpdatedAt,error:b,errorUpdatedAt:v,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>f.dataUpdateCount||y.errorUpdateCount>f.errorUpdateCount,isFetching:j,isRefetching:j&&!C,isLoadingError:S&&!w,isPaused:"paused"===y.fetchStatus,isPlaceholderData:g,isRefetchError:S&&w,isStale:p(e,t),refetch:this.refetch,promise:this.#r,isEnabled:!1!==(0,o.resolveEnabled)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==I.data,r="error"===I.status&&!t,a=e=>{r?e.reject(I.error):t&&e.resolve(I.data)},i=()=>{a(this.#r=I.promise=(0,n.pendingThenable)())},o=this.#r;switch(o.status){case"pending":e.queryHash===s.queryHash&&a(o);break;case"fulfilled":(r||I.data!==o.value)&&i();break;case"rejected":r&&I.error===o.reason||i()}}return I}updateResult(){let e=this.#i,t=this.createResult(this.#s,this.options);if(this.#n=this.#s.state,this.#o=this.options,void 0!==this.#n.data&&(this.#u=this.#s),(0,o.shallowEqualObjects)(t,e))return;this.#i=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#f.size)return!0;let s=new Set(r??this.#f);return this.options.throwOnError&&s.add("error"),Object.keys(this.#i).some(t=>this.#i[t]!==e[t]&&s.has(t))};this.#C({listeners:r()})}#v(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#s)return;let t=this.#s;this.#s=e,this.#a=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){s.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#i)}),this.#e.getQueryCache().notify({query:this.#s,type:"observerResultsUpdated"})})}};function u(e,t){return!1!==(0,o.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&d(e,t,t.refetchOnMount)}function d(e,t,r){if(!1!==(0,o.resolveEnabled)(t.enabled,e)&&"static"!==(0,o.resolveStaleTime)(t.staleTime,e)){let s="function"==typeof r?r(e):r;return"always"===s||!1!==s&&p(e,t)}return!1}function h(e,t,r,s){return(e!==t||!1===(0,o.resolveEnabled)(s.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&p(e,r)}function p(e,t){return!1!==(0,o.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,o.resolveStaleTime)(t.staleTime,e))}e.i(354414);var f=e.i(862667),m=e.i(198892);e.i(413274);var y=f.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),g=f.createContext(!1);g.Provider;var b=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function v(e,t){return function(e,t,r){let a,i=f.useContext(g),n=f.useContext(y),l=(0,m.useQueryClient)(r),c=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(c);let u=l.getQueryCache().get(c.queryHash);if(c._optimisticResults=i?"isRestoring":"optimistic",c.suspense){let e=e=>"static"===e?e:Math.max(e??1e3,1e3),t=c.staleTime;c.staleTime="function"==typeof t?(...r)=>e(t(...r)):e(t),"number"==typeof c.gcTime&&(c.gcTime=Math.max(c.gcTime,1e3))}a=u?.state.error&&"function"==typeof c.throwOnError?(0,o.shouldThrowError)(c.throwOnError,[u.state.error,u]):c.throwOnError,(c.suspense||c.experimental_prefetchInRender||a)&&!n.isReset()&&(c.retryOnMount=!1),f.useEffect(()=>{n.clearReset()},[n]);let d=!l.getQueryCache().get(c.queryHash),[h]=f.useState(()=>
1new t(l,c)),p=h.getOptimisticResult(c),v=!i&&!1!==e.subscribed;if(f.useSyncExternalStore(f.useCallback(e=>{let t=v?h.subscribe(s.notifyManager.batchCalls(e)):o.noop;return h.updateResult(),t},[h,v]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),f.useEffect(()=>{h.setOptions(c)},[c,h]),c?.suspense&&p.isPending)throw b(c,h,n);if((({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(a&&void 0===e.data||(0,o.shouldThrowError)(r,[e.error,s])))({result:p,errorResetBoundary:n,throwOnError:c.throwOnError,query:u,suspense:c.suspense}))throw p.error;if(l.getDefaultOptions().queries?._experimental_afterQuery?.(c,p),c.experimental_prefetchInRender&&!o.isServer&&p.isLoading&&p.isFetching&&!i){let e=d?b(c,h,n):u?.promise;e?.catch(o.noop).finally(()=>{h.updateResult()})}return c.notifyOnChangeProps?p:h.trackResult(p)}(e,c,t)}e.s(["useQuery",()=>v],99004)},779778,e=>{"use strict";var t=e.i(862667),r=e.i(51449),s=e.i(259864),a=e.i(578889),i=e.i(766271),n=class extends a.Subscribable{#e;#i=void 0;#S;#k;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#w()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,i.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#S,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,i.hashKey)(t.mutationKey)!==(0,i.hashKey)(this.options.mutationKey)?this.reset():this.#S?.state.status==="pending"&&this.#S.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#S?.removeObserver(this)}onMutationUpdate(e){this.#w(),this.#C(e)}getCurrentResult(){return this.#i}reset(){this.#S?.removeObserver(this),this.#S=void 0,this.#w(),this.#C()}mutate(e,t){return this.#k=t,this.#S?.removeObserver(this),this.#S=this.#e.getMutationCache().build(this.#e,this.options),this.#S.addObserver(this),this.#S.execute(e)}#w(){let e=this.#S?.state??(0,r.getDefaultState)();this.#i={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#C(e){s.notifyManager.batch(()=>{if(this.#k&&this.hasListeners()){let t=this.#i.variables,r=this.#i.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#k.onSuccess?.(e.data,t,r,s)}catch(e){Promise.reject(e)}try{this.#k.onSettled?.(e.data,null,t,r,s)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#k.onError?.(e.error,t,r,s)}catch(e){Promise.reject(e)}try{this.#k.onSettled?.(void 0,e.error,t,r,s)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#i)})})}},o=e.i(198892);function l(e,r){let a=(0,o.useQueryClient)(r),[l]=t.useState(()=>new n(a,e));t.useEffect(()=>{l.setOptions(e)},[l,e]);let c=t.useSyncExternalStore(t.useCallback(e=>l.subscribe(s.notifyManager.batchCalls(e)),[l]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),u=t.useCallback((e,t)=>{l.mutate(e,t).catch(i.noop)},[l]);if(c.error&&(0,i.shouldThrowError)(l.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:u,mutateAsync:c.mutate}}e.s(["useMutation",()=>l],779778)},846216,e=>{"use strict";var t=e.i(74058);let r=(0,t.createServerReference)("7febfeb21c3e2fd53d933b5eb991e4144f89e2134c",t.callServer,void 0,t.findSourceMapURL,"consumeCreditsAction"),s=(0,t.createServerReference)("7f431727863c910b58d6a499c61c041ecf6b7ab836",t.callServer,void 0,t.findSourceMapURL,"getCreditBalanceAction"),a=(0,t.createServerReference)("7fa9884e6ea2fc1d8ff09c67681257518814c86eaf",t.callServer,void 0,t.findSourceMapURL,"getCreditStatsAction"),i=(0,t.createServerReference)("7f4c942f606c0ef1e3ad127bd99441a1b598422e56",t.callServer,void 0,t.findSourceMapURL,"getCreditTransactionsAction");var n=e.i(766271),o=e.i(779778),l=e.i(99004),c=e.i(198892);let u={all:["credits"],balance:e=>[...u.all,"balance",e],stats:e=>[...u.all,"stats",e],transactions:e=>[...u.all,"transactions",e],transactionsList:(e,t)=>
1[...u.transactions(e),t]};function d(e){return(0,l.useQuery)({queryKey:u.balance(e||""),queryFn:async()=>{if(!e)throw Error("User ID is required");console.log("Fetching credit balance...");let t=await s();if(!t?.data?.success)throw console.log("useCreditBalance error:",t?.data?.error),Error(t?.data?.error||"Failed to fetch credit balance");return console.log("Credit balance fetched:",t.data.credits),t.data.credits||0},enabled:!!e})}function h(e){return(0,l.useQuery)({queryKey:u.stats(e||""),queryFn:async()=>{if(!e)throw Error("User ID is required");console.log("Fetching credit stats...");let t=await a();if(!t?.data?.success)throw console.log("useCreditStats error:",t?.data?.error),Error(t?.data?.error||"Failed to fetch credit stats");return console.log("Credit stats fetched:",t.data.data),t.data.data},enabled:!!e})}function p(e){let t=(0,c.useQueryClient)();return(0,o.useMutation)({mutationFn:async({amount:e,description:t})=>{let s=await r({amount:e,description:t});if(!s?.data?.success)throw console.log("useConsumeCredits error:",s?.data?.error),Error(s?.data?.error||"Failed to consume credits");return s.data},onSuccess:()=>{e&&(t.invalidateQueries({queryKey:u.balance(e)}),t.invalidateQueries({queryKey:u.stats(e)}),t.invalidateQueries({queryKey:u.transactions(e)}))}})}function f(e,t,r,s,a,o){return(0,l.useQuery)({queryKey:u.transactionsList(e||"",{pageIndex:t,pageSize:r,search:s,sorting:a,filters:o}),queryFn:async()=>{if(!e)throw Error("User ID is required");let n=await i({pageIndex:t,pageSize:r,search:s,sorting:a,filters:o});if(!n?.data?.success)throw console.log("useCreditTransactions error:",n?.data?.error),Error(n?.data?.error||"Failed to fetch credit transactions");return{items:n.data.data?.items||[],total:n.data.data?.total||0}},enabled:!!e,placeholderData:n.keepPreviousData})}e.s(["useConsumeCredits",()=>p,"useCreditBalance",()=>d,"useCreditStats",()=>h,"useCreditTransactions",()=>f],846216)},165754,e=>{"use strict";var t=e.i(413274),r=e.i(519455),s=e.i(755146),a=e.i(945228),i=e.i(520133),n=e.i(658912),o=e.i(370021),l=e.i(705301),c=e.i(450549),u=e.i(676993),d=e.i(862667);function h(){let e=(0,i.useLocaleRouter)(),h=(0,i.useLocalePathname)(),p=(0,u.useParams)(),f=(0,l.useLocale)(),{currentLocale:m,setCurrentLocale:y}=(0,n.useLocaleStore)(),[,g]=(0,d.useTransition)(),b=(0,c.useTranslations)("Common");return Object.keys(a.websiteConfig.i18n.locales).length>1?((0,d.useEffect)(()=>{y(f)},[f,y]),(0,t.jsxs)(s.DropdownMenu,{children:[(0,t.jsx)(s.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)(r.Button,{variant:"ghost",size:"sm",className:"size-8 p-0.5 border border-border rounded-full",children:[(0,t.jsx)(o.Languages,{className:"size-3"}),(0,t.jsx)("span",{className:"sr-only",children:b("language")})]})}),(0,t.jsx)(s.DropdownMenuContent,{align:"end",children:Object.entries(a.websiteConfig.i18n.locales).map(([r,a])=>(0,t.jsxs)(s.DropdownMenuItem,{onClick:()=>{y(r),g(()=>{e.replace({pathname:h,params:p},{locale:r})})},children:[a.flag&&(0,t.jsx)("span",{className:"mr-2 text-md",children:a.flag}),(0,t.jsx)("span",{className:"text-sm",children:a.name})]},r))})]})):null}e.s(["default",()=>h])},297651,e=>{"use strict";var t=e.i(862667),r=e.i(291967),s=e.i(780600),a=e.i(254856),i=e.i(190464),n=e.i(226099),o=e.i(83812),l=e.i(238716),c=e.i(450021),u=e.i(413274),d="Collapsible",[h,p]=(0,s.createContextScope)(d),[f,m]=h(d),y=t.forwardRef((e,r)=>{let{__scopeCollapsible:s,open:i,defaultOpen:n,disabled:l,onOpenChange:h,...p}=e,[m,y]=(0,a.useControllableState)({prop:i,defaultProp:n??!1,onChange:h,caller:d});return(0,u.jsx)(f,{scope:s,disabled:l,contentId:(0,c.useId)(),open:m,onOpenToggle:t.useCallback(()=>y(e=>!e),[y]),children:(0,u.jsx)(o.Primitive.div,{"data-state":j(m),"data-disabled":l?"":void 0,...p,ref:r})})});y.displayName=d;var g="CollapsibleTrigger",b=t.forwardRef((e,t)=>{let{__scopeCollapsible:s,...a}=e,i=m(g,s);return(0,u.jsx)(o.Primitive.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":j(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...a,ref:t,onClick:(0,r.composeEventHandlers)(e.onClick,i.onOpenToggle)})});b.displayName=g;var v="CollapsibleContent",x=t.forwardRef((e,t)=>
1{let{forceMount:r,...s}=e,a=m(v,e.__scopeCollapsible);return(0,u.jsx)(l.Presence,{present:r||a.open,children:({present:e})=>(0,u.jsx)(R,{...s,ref:t,present:e})})});x.displayName=v;var R=t.forwardRef((e,r)=>{let{__scopeCollapsible:s,present:a,children:l,...c}=e,d=m(v,s),[h,p]=t.useState(a),f=t.useRef(null),y=(0,n.useComposedRefs)(r,f),g=t.useRef(0),b=g.current,x=t.useRef(0),R=x.current,C=d.open||h,S=t.useRef(C),k=t.useRef(void 0);return t.useEffect(()=>{let e=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,i.useLayoutEffect)(()=>{let e=f.current;if(e){k.current=k.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();g.current=t.height,x.current=t.width,S.current||(e.style.transitionDuration=k.current.transitionDuration,e.style.animationName=k.current.animationName),p(a)}},[d.open,a]),(0,u.jsx)(o.Primitive.div,{"data-state":j(d.open),"data-disabled":d.disabled?"":void 0,id:d.contentId,hidden:!C,...c,ref:y,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":R?`${R}px`:void 0,...e.style},children:C&&l})});function j(e){return e?"open":"closed"}e.s(["Collapsible",()=>y,"CollapsibleContent",()=>x,"CollapsibleTrigger",()=>b,"Content",()=>x,"Root",()=>y,"Trigger",()=>b,"createCollapsibleScope",()=>p])},920932,e=>{"use strict";var t=e.i(413274),r=e.i(828420),s=e.i(776639),a=e.i(520133),i=e.i(77607),n=e.i(862667);e.s(["LoginWrapper",0,({children:e,mode:o="redirect",asChild:l,callbackUrl:c})=>{let u=(0,a.useLocaleRouter)(),[d,h]=(0,n.useState)(!1),[p,f]=(0,n.useState)(!1);return((0,n.useEffect)(()=>{h(!0)},[]),d)?"modal"===o?(0,t.jsxs)(s.Dialog,{open:p,onOpenChange:f,children:[(0,t.jsx)(s.DialogTrigger,{asChild:l,children:e}),(0,t.jsxs)(s.DialogContent,{className:"sm:max-w-[400px] p-0",children:[(0,t.jsx)(s.DialogHeader,{className:"hidden",children:(0,t.jsx)(s.DialogTitle,{})}),(0,t.jsx)(r.LoginForm,{callbackUrl:c,className:"border-none"})]})]}):(0,t.jsx)("span",{onClick:()=>{let e=c?`${i.Routes.Login}?callbackUrl=${encodeURIComponent(c)}`:`${i.Routes.Login}`;u.push(e)},className:"cursor-pointer",children:e}):null}])},776639,e=>{"use strict";var t=e.i(413274),r=e.i(905427),s=e.i(975157),a=e.i(519455),i=e.i(323726);function n({...e}){return(0,t.jsx)(r.Dialog.Root,{"data-slot":"dialog",...e})}function o({...e}){return(0,t.jsx)(r.Dialog.Trigger,{"data-slot":"dialog-trigger",...e})}function l({...e}){return(0,t.jsx)(r.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function c({className:e,...a}){return(0,t.jsx)(r.Dialog.Overlay,{"data-slot":"dialog-overlay",className:(0,s.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function u({className:e,children:n,showCloseButton:o=!0,...u}){return(0,t.jsxs)(l,{children:[(0,t.jsx)(c,{}),(0,t.jsxs)(r.Dialog.Content,{"data-slot":"dialog-content",className:(0,s.cn)("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-sm ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...u,children:[n,o&&(0,t.jsx)(r.Dialog.Close,{"data-slot":"dialog-close",asChild:!0,children:(0,t.jsxs)(a.Button,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm",children:[(0,t.jsx)(i.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})})]})]})}function d({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"dialog-header",className:(0,s.cn)("flex flex-col gap-2",e),...r})}function h({className:e,showCloseButton:i=!1,children:n,...o}){return(0,t.jsxs)("div",{"data-slot":"dialog-footer",className:(0,s.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",e),...o,children:[n,i&&(0,t.jsx)(r.Dialog.Close,{asChild:!0,children:(0,t.jsx)(a.Button,{variant:"outline",children:"Close"})})]})}function p({className:e,...a}){return(0,t.jsx)(r.Dialog.Title,{"data-slot":"dialog-title",className:(0,s.cn)("text-base leading-none font-medium",e),...a})}function f({className:e,...a}){return(0,t.jsx)(r.Dialog.Description,{"data-slot":"dialog-description",className:(0,s.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...a})}e.s(["Dialog",()=>n,"DialogContent",()=>u,"DialogDescription",()=>f,"DialogFooter",()=>h,"DialogHeader",()=>d,"DialogTitle",()=>p,"DialogTrigger",()=>o])},828420,e=>{"use strict";var t=e.i(354414),r=e.i(413274),s=e.i(974524),a=e.i(319270),i=e.i(743173),n=e.i(44137),o=e.i(519455),l=e.i(903133),c=e.i(793479),u=e.i(945228),d=e.i(520133),h=e.i(578938),p=e.i(336845),f=e.i(975157),m=e.i(77607),y=e.i(666021
1),g=e.i(150978),b=e.i(935431),v=e.i(515246),x=e.i(705301),R=e.i(450549),j=e.i(676993),C=e.i(862667),S=e.i(990420),k=e.i(948071),w=e.i(629837),I=e.i(48185);e.s(["LoginForm",0,({className:e,callbackUrl:T})=>{let E=(0,R.useTranslations)("AuthPage.login"),M=(0,j.useSearchParams)(),O=M.get("error"),D=M.get("callbackUrl"),Q=(0,x.useLocale)(),L=(0,p.getPathWithLocale)(m.DEFAULT_LOGIN_REDIRECT,Q),N=T||D||L,[F,U]=(0,C.useState)(""),[P,z]=(0,C.useState)(""),[q,_]=(0,C.useState)(!1),[B,A]=(0,C.useState)(!1),K=(0,C.useRef)(null),H=u.websiteConfig.auth.enableCredentialLogin,$=u.websiteConfig.features.enableTurnstileCaptcha,W=t.default.env.NEXT_PUBLIC_TURNSTILE_SITE_KEY,V=$&&!!W,X=V?k.string().min(1,"Please complete the captcha"):k.string().optional(),G=k.object({email:k.email({message:E("emailRequired")}),password:k.string().min(1,{message:E("passwordRequired")}),captchaToken:X}),Y=(0,S.useForm)({resolver:(0,y.zodResolver)(G),defaultValues:{email:"",password:"",captchaToken:""}}),J=(0,S.useWatch)({control:Y.control,name:"captchaToken"}),Z=()=>{Y.setValue("captchaToken",""),K.current&&"function"==typeof K.current.reset&&K.current.reset()},ee=async e=>{if(V&&e.captchaToken){_(!0),U(""),z("");let t=await (0,s.validateCaptchaAction)({captchaToken:e.captchaToken});if(!t?.data?.success||!t?.data?.valid){console.error("login, captcha invalid:",e.captchaToken),U(t?.data?.error||E("captchaInvalid")),_(!1),Z();return}}await h.authClient.signIn.email({email:e.email,password:e.password,callbackURL:N},{onRequest:e=>{_(!0),U(""),z("")},onResponse:e=>{_(!1)},onSuccess:e=>{},onError:e=>{U(`${e.error.status}: ${e.error.message}`),V&&Z()}})},et=()=>{A(e=>!e)};return(0,r.jsxs)(a.AuthCard,{headerLabel:E("welcomeBack"),bottomButtonLabel:E("signUpHint"),bottomButtonHref:`${m.Routes.Register}${N?`?callbackUrl=${encodeURIComponent(N)}`:""}`,className:(0,f.cn)("",e),children:[H&&(0,r.jsx)(l.Form,{...Y,children:(0,r.jsxs)("form",{onSubmit:Y.handleSubmit(ee),className:"space-y-8",children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(l.FormField,{control:Y.control,name:"email",render:({field:e})=>(0,r.jsxs)(l.FormItem,{children:[(0,r.jsx)(l.FormLabel,{children:E("email")}),(0,r.jsx)(l.FormControl,{children:(0,r.jsx)(c.Input,{...e,disabled:q,placeholder:"[email protected]",type:"email"})}),(0,r.jsx)(l.FormMessage,{})]})}),(0,r.jsx)(l.FormField,{control:Y.control,name:"password",render:({field:e})=>(0,r.jsxs)(l.FormItem,{children:[(0,r.jsxs)("div",{className:"flex justify-between items-center",children:[(0,r.jsx)(l.FormLabel,{children:E("password")}),(0,r.jsx)(o.Button,{size:"sm",variant:"link",asChild:!0,className:"px-0 font-normal text-muted-foreground",children:(0,r.jsx)(d.LocaleLink,{href:`${m.Routes.ForgotPassword}`,className:"text-xs hover:underline hover:underline-offset-4 hover:text-primary",children:E("forgotPassword")})})]}),(0,r.jsx)(l.FormControl,{children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(c.Input,{...e,disabled:q,placeholder:"******",type:B?"text":"password",className:"pr-10"}),(0,r.jsxs)(o.Button,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:et,disabled:q,children:[B?(0,r.jsx)(b.EyeOffIcon,{className:"size-4 text-muted-foreground"}):(0,r.jsx)(g.EyeIcon,{className:"size-4 text-muted-foreground"}),(0,r.jsx)("span",{className:"sr-only",children:B?E("hidePassword"):E("showPassword")})]})]})}),(0,r.jsx)(l.FormMessage,{})]})})]}),(0,r.jsx)(i.FormError,{message:F||O||void 0}),(0,r.jsx)(n.FormSuccess,{message:P}),V&&(0,r.jsx)(w.Captcha,{ref:K,onSuccess:e=>Y.setValue("captchaToken",e),validationError:Y.formState.errors.captchaToken?.message}),(0,r.jsxs)(o.Button,{disabled:q||V&&!J,size:"lg",type:"submit",className:"w-full flex items-center justify-center gap-2",children:[q&&(0,r.jsx)(v.Loader2Icon,{className:"mr-2 size-4 animate-spin"}),(0,r.jsx)("span",{children:E("signIn")})]})]})}),(0,r.jsx)("div",{className:"mt-4",children:(0,r.jsx)(I.SocialLoginButton,{callbackUrl:N,showDivider:H})})]})}])},89726,e=>{"use strict";let t=(0,e.i(667784).default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);e.s(["default",()=>t])},357920,e=>{"use strict";let t=(0,e.i(667784).default)("user-round",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}
1],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);e.s(["User2Icon",()=>t],357920)},225123,e=>{"use strict";var t=e.i(413274),r=e.i(975157),s=e.i(357920);function a({name:e,image:a,className:i,...n}){return(0,t.jsxs)("div",{className:(0,r.cn)("relative flex size-8 shrink-0 overflow-hidden rounded-full bg-muted",i),...n,children:[(0,t.jsxs)("div",{className:"absolute inset-0 flex items-center justify-center",children:[(0,t.jsx)("span",{className:"sr-only",children:e}),(0,t.jsx)(s.User2Icon,{className:"size-4"})]}),a&&(0,t.jsx)("img",{alt:e,title:e,src:a,className:"absolute inset-0 size-full object-cover",loading:"lazy",onLoad:e=>{let t=e.currentTarget.previousElementSibling;t&&(t.style.opacity="0")},onError:e=>{let t=e.currentTarget.previousElementSibling;t&&(t.style.opacity="1"),e.currentTarget.style.display="none"}})]})}e.s(["UserAvatar",()=>a])},30967,e=>{"use strict";let t=(0,e.i(667784).default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);e.s(["MailIcon",()=>t],30967)},924070,78143,945336,e=>{"use strict";var t=e.i(667784);let r=(0,t.default)("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);e.s(["CreditCardIcon",()=>r],924070);let s=(0,t.default)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);e.s(["LayoutDashboardIcon",()=>s],78143);var a=e.i(89726);e.s(["Settings2Icon",()=>a.default],945336)},976866,e=>{"use strict";let t=(0,e.i(667784).default)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);e.s(["default",()=>t])},789658,e=>{e.v(t=>Promise.all(["static/chunks/1402b78a09a2c926.js"].map(t=>e.l(t))).then(()=>t(883698)))}]);

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.