PageSourceSearch

https://www.chraft.ai/_next/static/chunks/37815-cb3887a7297625da.js

js chraft.ai collected 2026-10-05 11:55:41 UTC 11,188 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[37815],{14806:(e,t,r)=>{e.exports=r(30125)},30125:(e,t,r)=>{var n=r(12115),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=n.useState,u=n.useEffect,o=n.useLayoutEffect,l=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var s="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=a({inst:{value:r,getSnapshot:t}}),i=n[0].inst,s=n[1];return o(function(){i.value=r,i.getSnapshot=t,c(i)&&s({inst:i})},[e,r,t]),u(function(){return c(i)&&s({inst:i}),e(function(){c(i)&&s({inst:i})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:s},37815:(e,t,r)=>{let n;r.d(t,{Ay:()=>X});var i=r(12115),a=r(14806),u=Object.prototype.hasOwnProperty;let o=new WeakMap,l=()=>{},c=l(),s=Object,f=e=>e===c,d=(e,t)=>({...e,...t}),g={},p={},y="undefined",h=typeof window!=y,v=typeof document!=y,w=h&&"Deno"in window,b=(e,t)=>{let r=o.get(e);return[()=>!f(t)&&e.get(t)||g,n=>{if(!f(t)){let i=e.get(t);t in p||(p[t]=i),r[5](t,d(i,n),i||g)}},r[6],()=>!f(t)&&t in p?p[t]:!f(t)&&e.get(t)||g]},m=!0,[S,O]=h&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[l,l],E={initFocus:e=>(v&&document.addEventListener("visibilitychange",e),S("focus",e),()=>{v&&document.removeEventListener("visibilitychange",e),O("focus",e)}),initReconnect:e=>{let t=()=>{m=!0,e()},r=()=>{m=!1};return S("online",t),S("offline",r),()=>{O("online",t),O("offline",r)}}},_=!i.useId,R=!h||w,k=R?i.useEffect:i.useLayoutEffect,L="undefined"!=typeof navigator&&navigator.connection,T=!R&&L&&(["slow-2g","2g"].includes(L.effectiveType)||L.saveData),V=new WeakMap,D=(e,t)=>e==="[object ".concat(t,"]"),j=0,C=e=>{let t,r,n=typeof e,i=s.prototype.toString.call(e),a=D(i,"Date"),u=D(i,"RegExp"),o=D(i,"Object");if(s(e)!==e||a||u)t=a?e.toJSON():"symbol"==n?e.toString():"string"==n?JSON.stringify(e):""+e;else{if(t=V.get(e))return t;if(t=++j+"~",V.set(e,t),Array.isArray(e)){for(r=0,t="@";r<e.length;r++)t+=C(e[r])+",";V.set(e,t)}if(o){t="#";let n=s.keys(e).sort();for(;!f(r=n.pop());)f(e[r])||(t+=r+":"+C(e[r])+",");V.set(e,t)}}return t},x=e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?C(e):"",t]},P=0,A=()=>++P;async function M(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let[n,i,a,u]=t,l=d({populateCache:!0,throwOnError:!0},"boolean"==typeof u?{revalidate:u}:u||{}),s=l.populateCache,g=l.rollbackOnError,p=l.optimisticData,y=l.throwOnError;if("function"==typeof i){let e=[];for(let t of n.keys())!/^\$(inf|sub)\$/.test(t)&&i(n.get(t)._k)&&e.push(t);return Promise.all(e.map(h))}return h(i);async function h(e){let r,[i]=x(e);if(!i)return;let[u,d]=b(n,i),[h,v,w,m]=o.get(n),S=()=>{let t=h[i];return("function"==typeof l.revalidate?l.revalidate(u().data,e):!1!==l.revalidate)&&(delete w[i],delete m[i],t&&t[0])?t[0](2).then(()=>u().data):u().data};if(t.length<3)return S();let O=a,E=!1,_=A();v[i]=[_,0];let R=!f(p),k=u(),L=k.data,T=k._c,V=f(T)?L:T;if(R&&d({data:p="function"==typeof p?p(V,L):p,_c:V}),"function"==typeof O)try{O=O(V)}catch(e){r=e,E=!0}if(O&&"function"==typeof O.then){let e;if(O=await O.catch(e=>{r=e,E=!0}),_!==v[i][0]){if(E)throw r;return O}E&&R&&(e=r,"function"==typeof g?g(e):!1!==g)&&(s=!0,d({data:V,_c:c}))}if(s&&!E&&("function"==typeof s?d({data:s(O,V),error:c,_c:c}):d({data:O,error:c,_c:c})),v[i][1]=A(),Promise.resolve(S()).then(()=>{d({_c:c})}),E){if(y)throw r;return}return O}}let F=(e,t)=>{for(let r in e)e[r][0]&&e[r][0](t)},I=(e,t)=>{if(!o.has(e)){let r=d(E,t),n=Object.create(null),i=M.bind(c,e),a=l,u=Object.create(null),s=(e,t)=>{let r=u[e]||[];return u[e]=r,r.push(t),()=>r.splice(r.indexOf(t),1)},f=(t,r,n)=>{e.set(t,r);let i=u[t];if(i)for(let e of i)e(r,n)},g=()=>{if(!o.has(e)&&(o.set(e,[n,Object.create(null),Object.create(null),Object.create(null),i,f,s]),!R)){let t=r.initFocus(setTimeout.bind(c,F.bind(c,n,0))),i=r.initReconnect(setTimeout.bind(c,F.bind(c,n,1)));a=()=>{t&&t(),i&&i(),o.delete(e)}}};return g(),[e,i,g,a]}return[e,o.get(e)[4]]},[W,$]=I(new Map),N=d({onLoadingSlow:l,onSuccess:l,onError:l,onErrorRetry:(e,t,r,n,i)=>{let a=r.errorRetryCount,u=i.retryCount,o=~~((Math.random()+.5)*(1<<(u<8?u:8)))*r.errorRetryInterval;(f(a)||!(u>a))&&setTimeout(n,o,i)},onDiscarded:l,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:T?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:T?5e3:3e3,compare:function e(t,r){var n,i;if(t===r)return!0;
1if(t&&r&&(n=t.constructor)===r.constructor){if(n===Date)return t.getTime()===r.getTime();if(n===RegExp)return t.toString()===r.toString();if(n===Array){if((i=t.length)===r.length)for(;i--&&e(t[i],r[i]););return -1===i}if(!n||"object"==typeof t){for(n in i=0,t)if(u.call(t,n)&&++i&&!u.call(r,n)||!(n in r)||!e(t[n],r[n]))return!1;return Object.keys(r).length===i}}return t!=t&&r!=r},isPaused:()=>!1,cache:W,mutate:$,fallback:{}},{isOnline:()=>m,isVisible:()=>{let e=v&&document.visibilityState;return f(e)||"hidden"!==e}}),q=(e,t)=>{let r=d(e,t);if(t){let{use:n,fallback:i}=e,{use:a,fallback:u}=t;n&&a&&(r.use=n.concat(a)),i&&u&&(r.fallback=d(i,u))}return r},J=(0,i.createContext)({}),U=h&&window.__SWR_DEVTOOLS_USE__,z=(U?window.__SWR_DEVTOOLS_USE__:[]).concat(e=>(t,r,n)=>{let i=r&&((...e)=>{let[n]=x(t),[,,,i]=o.get(W);if(n.startsWith("$inf$"))return r(...e);let a=i[n];return f(a)?r(...e):(delete i[n],a)});return e(t,i,n)});U&&(window.__SWR_DEVTOOLS_REACT__=i);let Y=()=>{},B=Y();new WeakMap;let G=i.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),H={dedupe:!0},K=Promise.resolve(c),Q=()=>l;s.defineProperty(e=>{let{value:t}=e,r=(0,i.useContext)(J),n="function"==typeof t,a=(0,i.useMemo)(()=>n?t(r):t,[n,r,t]),u=(0,i.useMemo)(()=>n?a:q(r,a),[n,r,a]),o=a&&a.provider,l=(0,i.useRef)(c);o&&!l.current&&(l.current=I(o(u.cache||W),a));let s=l.current;return s&&(u.cache=s[0],u.mutate=s[1]),k(()=>{if(s)return s[2]&&s[2](),s[3]},[]),(0,i.createElement)(J.Provider,d(e,{value:u}))},"defaultValue",{value:N});let X=(n=(e,t,r)=>{let{cache:n,compare:u,suspense:l,fallbackData:s,revalidateOnMount:g,revalidateIfStale:p,refreshInterval:v,refreshWhenHidden:w,refreshWhenOffline:m,keepPreviousData:S,strictServerPrefetchWarning:O}=r,[E,L,T,V]=o.get(n),[D,j]=x(e),C=(0,i.useRef)(!1),P=(0,i.useRef)(!1),F=(0,i.useRef)(D),I=(0,i.useRef)(t),W=(0,i.useRef)(r),$=()=>W.current.isVisible()&&W.current.isOnline(),[N,q,J,U]=b(n,D),z=(0,i.useRef)({}).current,Y=f(s)?f(r.fallback)?c:r.fallback[D]:s,B=(e,t)=>{for(let r in z)if("data"===r){if(!u(e[r],t[r])&&(!f(e[r])||!u(eu,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},X=!C.current,Z=(0,i.useMemo)(()=>{let e=N(),r=U(),n=e=>{let r=d(e);return(delete r._k,(()=>{if(!D||!t||W.current.isPaused())return!1;if(X&&!f(g))return g;let e=f(Y)?r.data:Y;return f(e)||p})())?{isValidating:!0,isLoading:!0,...r}:r},i=n(e),a=e===r?i:n(r),u=i;return[()=>{let e=n(N());return B(e,u)?(u.data=e.data,u.isLoading=e.isLoading,u.isValidating=e.isValidating,u.error=e.error,u):(u=e,e)},()=>a]},[n,D]),ee=(0,a.useSyncExternalStore)((0,i.useCallback)(e=>J(D,(t,r)=>{B(r,t)||e()}),[n,D]),Z[0],Z[1]),et=E[D]&&E[D].length>0,er=ee.data,en=f(er)?Y&&"function"==typeof Y.then?G(Y):Y:er,ei=ee.error,ea=(0,i.useRef)(en),eu=S?f(er)?f(ea.current)?en:ea.current:er:en,eo=D&&f(en),el=(0,i.useRef)(null);R||(0,a.useSyncExternalStore)(Q,()=>(el.current=!1,el),()=>(el.current=!0,el));let ec=el.current;O&&ec&&!l&&eo&&console.warn(`Missing pre-initiated data for serialized key "${D}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);let es=!(!D||!t||W.current.isPaused())&&(!et||!!f(ei))&&(X&&!f(g)?g:l?!f(en)&&p:f(en)||p),ef=f(ee.isValidating)?es:ee.isValidating,ed=f(ee.isLoading)?es:ee.isLoading,eg=(0,i.useCallback)(async e=>{let t,n,i=I.current;if(!D||!i||P.current||W.current.isPaused())return!1;let a=!0,o=e||{},l=!T[D]||!o.dedupe,s=()=>_?!P.current&&D===F.current&&C.current:D===F.current,d={isValidating:!1,isLoading:!1},g=()=>{q(d)},p=()=>{let e=T[D];e&&e[1]===n&&delete T[D]},y={isValidating:!0};f(N().data)&&(y.isLoading=!0);try{if(l&&(q(y),r.loadingTimeout&&f(N().data)&&setTimeout(()=>{a&&s()&&W.current.onLoadingSlow(D,r)},r.loadingTimeout),T[D]=[i(j),A()]),[t,n]=T[D],t=await t,l&&setTimeout(p,r.dedupingInterval),!T[D]||T[D][1]!==n)return l&&s()&&W.current.onDiscarded(D),!1;d.error=c;let e=L[D];if(!f(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return g(),l&&s()&&W.current.onDiscarded(D),!1;let o=N().data;d.data=u(o,t)?o:t,l&&s()&&W.current.onSuccess(t,D,r)}catch(r){p();let e=W.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=r,l&&s())&&(e.onError(r,D,e),(!0===t||"function"==typeof t&&t(r))&&(!W.current.revalidateOnFocus||!W.current.revalidateOnReconnect||$())&&e.onErrorRetry(r,D,e,e=>{let t=E[D];t&&t[0]&&t[0](3,e)},{retryCount:(o.retryCount||0)+1,dedupe:!0}))}return a=!1,g(),!0},[D,n]),ep=(0,i.useCallback)((...e)=>M(n,F.current,...e),[]);if(k(()=>{I.current=t,W.current=r,f(er)||(ea.current=er)}),k(()=>
1{if(!D)return;let e=eg.bind(c,H),t=0;W.current.revalidateOnFocus&&(t=Date.now()+W.current.focusThrottleInterval);let r=((e,t,r)=>{let n=t[e]||(t[e]=[]);return n.push(r),()=>{let e=n.indexOf(r);e>=0&&(n[e]=n[n.length-1],n.pop())}})(D,E,(r,n={})=>{if(0==r){let r=Date.now();W.current.revalidateOnFocus&&r>t&&$()&&(t=r+W.current.focusThrottleInterval,e())}else if(1==r)W.current.revalidateOnReconnect&&$()&&e();else if(2==r)return eg();else if(3==r)return eg(n)});return P.current=!1,F.current=D,C.current=!0,q({_k:j}),es&&!T[D]&&(f(en)||R?e():(e=>h&&typeof window.requestAnimationFrame!=y?window.requestAnimationFrame(e):setTimeout(e,1))(e)),()=>{P.current=!0,r()}},[D]),k(()=>{let e;function t(){let t="function"==typeof v?v(N().data):v;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!N().error&&(w||W.current.isVisible())&&(m||W.current.isOnline())?eg(H).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[v,w,m,D]),(0,i.useDebugValue)(eu),l){if(!_&&R&&eo)throw Error("Fallback data is required when using Suspense in SSR.");eo&&(I.current=t,W.current=r,P.current=!1);let e=V[D];if(G(!f(e)&&eo?ep(e):K),!f(ei)&&eo)throw ei;let n=eo?eg(H):K;!f(eu)&&eo&&(n.status="fulfilled",n.value=!0),G(n)}return{mutate:ep,get data(){return z.data=!0,eu},get error(){return z.error=!0,ei},get isValidating(){return z.isValidating=!0,ef},get isLoading(){return z.isLoading=!0,ed}}},function(...e){let t=(()=>{let e=(0,i.useContext)(J);return(0,i.useMemo)(()=>d(N,e),[e])})(),[r,a,u]="function"==typeof e[1]?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],o=q(t,u),l=n,{use:c}=o,s=(c||[]).concat(z);for(let e=s.length;e--;)l=s[e](l);return l(r,a||o.fetcher||null,o)})}}]);

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.