1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,392858,(e,t,i)=>{t.exports=e.r(873318)},370465,e=>{"use strict";var t=e.i(389959),i=Object.defineProperty,n=new Map,s=new WeakMap,r=0,a=void 0;t.Component,e.s(["useInView",0,function({threshold:e,delay:i,trackVisibility:o,rootMargin:d,root:l,triggerOnce:u,skip:c,initialInView:m,fallbackInView:g,onChange:h}={}){var p;let[f,v]=t.useState(null),w=t.useRef(h),[y,b]=t.useState({inView:!!m,entry:void 0});w.current=h,t.useEffect(()=>{let t;if(!c&&f)return t=function(e,t,i={},o=a){if(void 0===window.IntersectionObserver&&void 0!==o){let n=e.getBoundingClientRect();return t(o,{isIntersecting:o,target:e,intersectionRatio:"number"==typeof i.threshold?i.threshold:0,time:0,boundingClientRect:n,intersectionRect:n,rootBounds:n}),()=>{}}let{id:d,observer:l,elements:u}=function(e){let t=Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{var i;return`${t}_${"root"===t?!(i=e.root)?"0":(s.has(i)||(r+=1,s.set(i,r.toString())),s.get(i)):e[t]}`}).toString(),i=n.get(t);if(!i){let s,r=new Map,a=new IntersectionObserver(t=>{t.forEach(t=>{var i;let n=t.isIntersecting&&s.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=n),null==(i=r.get(t.target))||i.forEach(e=>{e(n,t)})})},e);s=a.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),i={id:t,observer:a,elements:r},n.set(t,i)}return i}(i),c=u.get(e)||[];return u.has(e)||u.set(e,c),c.push(t),l.observe(e),function(){c.splice(c.indexOf(t),1),0===c.length&&(u.delete(e),l.unobserve(e)),0===u.size&&(l.disconnect(),n.delete(d))}}(f,(e,i)=>{b({inView:e,entry:i}),w.current&&w.current(e,i),i.isIntersecting&&u&&t&&(t(),t=void 0)},{root:l,rootMargin:d,threshold:e,trackVisibility:o,delay:i},g),()=>{t&&t()}},[Array.isArray(e)?e.toString():e,f,l,d,u,c,o,g,i]);let x=null==(p=y.entry)?void 0:p.target,S=t.useRef(void 0);f||!x||u||c||S.current===x||(S.current=x,b({inView:!!m,entry:void 0}));let I=[v,y.inView,y.entry];return I.ref=I[0],I.inView=I[1],I.entry=I[2],I}])},941840,e=>{"use strict";var t=e.i(23704);let i=(0,t.adUnitFactory)({adUnit:"incontent_1",sizes:[[320,100],[320,50],[300,250],[300,100],[300,50]]}),n=(0,t.adUnitFactory)({adUnit:"side_1",lutSizes:[[[1200],[[300,600],[300,250],[336,280]]]]}),s=(0,t.adUnitFactory)({adUnit:"side_2",lutSizes:[[[1200],[[200,200],[250,250],[300,250],[336,280]]]]}),r=(0,t.adUnitFactory)({adUnit:"side_3",sizes:[[200,200],[250,250],[300,250],[336,280]]}),a=(0,t.adUnitFactory)({adUnit:"top",lutSizes:[[[0,759],[[320,100],[320,50],[300,250],[300,100],[300,50],[336,280]]],[[760,1023],[[468,60],[728,90]]],[[1024],[[728,90],[970,90],[970,250],[980,90]]]]}),o=(0,t.adUnitFactory)({adUnit:"adhesive",lutSizes:[[[0,759],[[1,1],[320,50],[300,50]]],[[760,1023],[[8,1],[728,90]]],[[1024],[[8,1],[728,90],[970,90],[980,90],[970,250]]]]});e.s(["AdUnitAdhesive",0,o,"AdUnitIncontent_1",0,i,"AdUnitSide_1",0,n,"AdUnitSide_2",0,s,"AdUnitSide_3",0,r,"AdUnitTop",0,a])},23704,765662,e=>{"use strict";var t=e.i(478902),i=e.i(841188),n=e.i(917979),s=e.i(407257);function r({maxWidth:e=300,maxHeight:a=600,className:o="flex justify-center"}){let d=(0,s.getSupportUsImage)(e,a);return d?(0,t.jsx)(n.NextLink,{href:"/pricing",className:o,children:(0,t.jsx)(i.default,{src:d.src,alt:"Support Civitai creators",width:d.width,height:d.height,className:"h-auto max-w-full"})}):null}var a=e.i(43047),o=e.i(389959),d=e.i(216951),l=e.i(197649),u=e.i(375936),c=e.i(705218);function m({children:e,hideOnBlocked:i}){let{adsEnabled:n,adsBlocked:s}=(0,d.useAdsContext)();return!n||i&&s?null:(0,t.jsx)(c.default,{children:e})}e.s(["AdUnitRenderable",0,m],765662);var g=e.i(510546),h=e.i(136659),p=e.i(399368),f=e.i(370465),v=e.i(460871),w=e.i(279023),y=e.i(90376);class b{intervalMs;callback;timeoutId=null;remainingMs;startTime=null;isRunning=!1;constructor(e,t){this.callback=e,this.intervalMs=t,this.remainingMs=t}start(e){(e||!this.isRunning)&&(this.isRunning=!0,this.startTime=Date.now(),this.timeoutId=setTimeout(()=>{this.callback(),this.remainingMs=this.intervalMs,this.start(!0)},this.remainingMs))}pause(){if(this.isRunning){if(this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),null!==this.startTime){let e=Date.now()-this.startTime;this.remainingMs=Math.max(0,this.remainingMs-e)}this.isRunning=!1,this.startTime=null}}stop(){this.pause(),this.remainingMs=this.intervalMs}get isActive(){return this.isRunning}}let x=["/moderator/test","/404","/air/confirm","/collections/[collectionId]/review","/creator-program","/content/dmca-notice","/content/dmca-counter-notice","/dmca/notice","/games/chopped","/home","/images","/models/[id]/edit","/models/[id]/model-versions/[versionId]/edit","/models","/payment/success","/posts","/product/odor","/product/vault","/search/articles","/search/bounties","/search/collections","/search/models","/search/users","/subscribe/[plan]","/support","/testing/demo","/testing/metadata-test","/user/[username]/[list]","/user/[username]/images","/user/[username]/models","/user/[username]/posts","/user/[username]/videos","/user/downloads","/user/notifications","/vi
1deos","/articles/[id]/edit","/articles","/bounties/[id]/edit","/articles/create","/articles/[id]/[[...slug]]","/bounties/[id]/entries/[entryId]/edit","/bounties/[id]/entries/create","/bounties/entries/[entryId]","/bounties/create","/bounties","/claim/buzz/[id]","/builds","/claim/cosmetic/[id]","/bounties/[id]/entries/[entryId]","/bounties/[id]/[[...slug]]","/collections/[collectionId]","/collections","/content/[[...slug]]","/discord/link-role","/comments/v2/[id]","/events","/images/[imageId]","/","/generate","/intent/avatar","/intent/post","/login","/model-versions/[id]","/leaderboard/[id]","/models/[id]/model-versions/create","/models/[id]/model-versions/[versionId]/wizard","/models/[id]/wizard","/models/create","/models/license/[versionId]","/models/train","/events/[slug]","/models/[id]/reviews","/posts/[postId]/[[...postSlug]]","/posts/[postId]/edit","/payment/paddle","/newsroom","/posts/create","/product/link","/pricing","/questions/create","/purchase/buzz","/questions","/models/[id]/[[...slug]]","/reviews/[reviewId]","/questions/[questionId]/[[...questionDetailSlug]]","/search/images","/safety","/tag/[tagname]","/shop","/user/[username]/articles","/user/[username]/collections","/user/[username]","/user/account","/user/account/[[...section]]","/games/knights-of-new-order","/user/earn-potential","/user/[username]/manage-categories","/user/stripe-connect/onboard","/user/buzz-dashboard","/user/membership","/user/transactions","/user/vault"].reduce((e,t)=>({...e,[t]:t.replace(/^\//,"").split("/")}),{}),S={};function I({adUnit:e,sizes:i,id:n,onDismount:s}){let[r]=(0,o.useState)(()=>n??(0,w.v4)());return(0,o.useEffect)(()=>(S[e]||(S[e]=r),window.adngin&&window.adngin.adnginLoaderReady&&window.adngin.queue.push(()=>{let t={adUnit:e,placement:r,gpIdUniquifier:S[e],sizes:i};window.adngin.cmd.startAuction([t])}),()=>{window.googletag.cmd.push(function(){let e=window.googletag.pubads().getSlots().find(e=>e.getSlotElementId()===r);e&&window.googletag.destroySlots([e])}),s?.(r)}),[]),(0,t.jsx)("div",{className:"flex items-center justify-center",id:r})}function A({adUnit:e,sizes:i,lutSizes:s,withFeedback:c,className:m,id:g,maxHeight:p,maxWidth:f,preserveLayout:v,onDismount:w}){var y,b;let x,{adsBlocked:S,ready:j,isMember:U,consent:R,useDirectAds:L}=(0,d.useAdsContext)(),_=function({sizes:e,lutSizes:t,maxHeight:i,maxWidth:n}){let s=(0,u.useScrollAreaRef)(),[r,a]=(0,o.useState)(void 0);return(0,o.useEffect)(()=>{function r(e){e&&(i||n)?a(e.filter(([e,t])=>(!i||!(t>i))&&(!n||!(e>n)))):a(e)}if(e||null===e)r(e);else if(t){let e=s?.current?.clientWidth??window.innerWidth;r(t?.filter(([[t,i]])=>(!t||!(e<t))&&(!i||!(e>i))).flatMap(([e,t])=>t))}},[]),r}({sizes:i,lutSizes:s,maxHeight:p,maxWidth:f}),[T,M]=(0,h.useInView)({key:`${S}:${R}`});if(_&&!_.length)return null;if(S||!R)return _?.length?(0,t.jsx)(r,{maxWidth:Math.max(..._.map(([e])=>e)),maxHeight:Math.max(..._.map(([,e])=>e))}):null;let B=(0,t.jsxs)(t.Fragment,{children:[L?void 0!==_&&(0,t.jsx)(C,{adUnit:e,id:g,maxHeight:(y=_,b=p,(x=(y??[]).map(([,e])=>e).filter(e=>e>1)).length?Math.max(...x):b)}):M&&j&&void 0!==_?(0,t.jsx)(I,{adUnit:e,sizes:_??void 0,id:g,onDismount:w}):null,c&&!U&&(0,t.jsx)("div",{className:"flex w-full justify-end",children:(0,t.jsx)(a.Text,{component:n.NextLink,td:"underline",href:"/pricing",c:"dimmed",size:"xs",align:"center",children:"Remove ads"})})]}),z=(0,l.default)("relative box-content flex flex-col items-center justify-center gap-2",m);return s?(0,t.jsx)(E,{ref:T,lutSizes:s,maxHeight:p,maxWidth:f,className:z,preserveLayout:v,children:B}):i?(0,t.jsx)(k,{ref:T,sizes:i,maxHeight:p,maxWidth:f,className:z,preserveLayout:v,children:B}):null}function j(e,t){let{maxHeight:i,maxWidth:n}=t??{},s=Math.max(...(n?e.filter(([e])=>e<=n):e).map(([e,t])=>Math.max(t)));return i?Math.min(i,s):s}let E=(0,o.forwardRef)(({className:e,children:i,lutSizes:n,maxHeight:s,maxWidth:r,preserveLayout:a=!0},d)=>{let{nodeRef:l,containerName:u}=(0,p.useContainerContext)(),c=(0,p.useContainerProviderStore)((0,o.useCallback)(e=>{let t=e[u]?.inlineSize??l.current?.offsetWidth??0;return n.find(([[e,i]])=>(!e||!(t<e))&&(!i||!(t>i)))?.[1]},[]));return(0,t.jsx)("div",{ref:d,className:e,style:a&&c?{minHeight:j(c,{maxHeight:s,maxWidth:r})}:void 0,children:i})});
1E.displayName="AdunitLutStyles";let k=(0,o.forwardRef)(({className:e,children:i,sizes:n,maxHeight:s,maxWidth:r,preserveLayout:a=!0},o)=>(0,t.jsx)("div",{ref:o,className:e,style:a?{minHeight:j(n,{maxHeight:s,maxWidth:r})}:void 0,children:i}));k.displayName="AdunitSizesStyles";let U=y.isDev?"http://localhost:5173":"https://advertising.civitai.com";function C(e){let i,n,s,r,a,[d,l]=(0,o.useState)(e.id),[c,m]=(0,o.useState)(!1),{nodeRef:h}=(0,p.useContainerContext)(),y=(0,p.useContainerWidth)(),S=(0,u.useScrollAreaRef)(),I=(0,g.useBrowsingLevelDebounced)(),A=o.default.useRef(!1),j=o.default.useRef(!1),[E,k]=(0,o.useState)(null),{ref:C,inView:L}=(0,f.useInView)({root:S?.current??h?.current??void 0,threshold:.5}),_=(0,o.useRef)(),T=(0,o.useRef)(y??0);T.current=y??0;let M=(0,o.useCallback)(()=>{let t=e.id??(0,w.v4)();if(e.id||l(t),A.current||"visible"!==document.visibilityState||!T.current)return;A.current=!0;let i=R[e.adUnit],n=new URLSearchParams(`placement=${t}&name=${i}&container=${T.current}&browsingLevel=${I}`);e.maxHeight&&n.append("maxHeight",String(e.maxHeight)),_.current&&n.append("trace",_.current),fetch(`${U}/api/v1/serve?${n.toString()}`,{credentials:"include"}).then(async e=>{if(e.ok){let t=await e.json();k(t),_.current=t.trace,A.current=!t?.next}else A.current=!1;j.current=!1}).catch(()=>{A.current=!1,j.current=!1})},[I,e.adUnit,e.id,e.maxHeight]),B=(i=(0,o.useRef)(null),n=(0,o.useRef)(M),(0,o.useEffect)(()=>{n.current=M},[M]),s=(0,o.useCallback)(()=>{i.current?.start()},[]),r=(0,o.useCallback)(()=>{i.current?.pause()},[]),a=(0,o.useCallback)(()=>{i.current?.stop()},[]),(0,o.useEffect)(()=>(i.current=new b(()=>n.current(),3e4),()=>{a(),i.current=null}),[3e4,void 0,s,a]),{pause:r,start:s,stop:a}),z=!!y;return(0,o.useEffect)(()=>{L&&!E&&M()},[L,E,M,z]),(0,o.useEffect)(()=>{L?B.start():B.pause()},[L,M,B.start,B.pause]),(0,o.useEffect)(()=>()=>{B.stop()},[B.stop]),(0,o.useEffect)(()=>{function e(){"visible"===document.visibilityState&&L?B.start():B.pause()}return window.addEventListener("visibilitychange",e),()=>{window.removeEventListener("visibilitychange",e)}},[B.start,B.pause,L]),(0,o.useEffect)(()=>{let t=setTimeout(function(){!j.current&&c&&L&&E&&"visible"===document.visibilityState&&(j.current=!0,fetch(`${U}/api/v1/view?trace=${E.trace}`,{method:"POST",credentials:"include",body:JSON.stringify({pathname:function(e){let t,i=e.replace(/^\//,"").split("/");for(let[e,n]of Object.entries(x)){if(i.every((e,t)=>e===n[t])){t=e;break}let s=n.filter(e=>!e.includes("[[")).length;i.every((e,t)=>(n.length===i.length||s===i.length)&&(e===n[t]||n[t]?.startsWith("[")))&&(t=e)}return t??e}(window.location.pathname)}),headers:{"Content-Type":"application/json"}}).then(()=>{window.dispatchEvent(new CustomEvent("civitai-custom-ad-impression",{detail:e.adUnit}))}).catch(()=>{j.current=!1}))},1e3);return()=>{clearTimeout(t)}},[c,L,E,e.adUnit]),(0,t.jsx)("div",{id:d,ref:C,children:E?(0,t.jsx)("a",{target:"_blank",href:`${U}/api/v1/engagement?trace=${E.trace}`,"aria-label":"visit advertiser",children:(0,t.jsx)("img",{src:`${v.env.NEXT_PUBLIC_IMAGE_LOCATION}/${E.url}/original=true/media.webp`,alt:"advertisement",loading:"lazy",onLoad:()=>m(!0)})}):null})}let R={incontent_1:"feed",side_1:"side_sky",side_2:"side",side_3:"side",top:"banner",adhesive:"footer"};e.s(["adUnitFactory",0,function(e){function i({withFeedback:n,className:s,maxHeight:r,maxWidth:a,preserveLayout:o}){return(0,t.jsx)(m,{children:(0,t.jsx)(A,{...e,withFeedback:n,className:s,maxHeight:r,maxWidth:a,preserveLayout:o})})}return i.useImpressionTracked=function(){return function(e){let[t,i]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{let t=t=>{t.detail===e&&setTimeout(()=>i(!0),1e3)};return window.addEventListener("civitai-ad-impression",t),window.addEventListener("civitai-custom-ad-impression",t),()=>{window.removeEventListener("civitai-ad-impression",t),window.removeEventListener("civitai-custom-ad-impression",t)}},[e]),t}(e.adUnit)},i}],23704)},27954,e=>{"use strict";var t=e.i(478902),i=e.i(23704),n=e.i(389959),s=e.i(74813),r=e.i(483880);let a=(0,s.create)()((0,r.immer)(e=>({adUnits:{},enableAdUnit:t=>e(e=>{e.adUnits[t]=!0}),disableAdUnit:t=>e(e=>{e.adUnits[t]=!1})})));var o=e.i(216951),d=e.i(299221),l=e.i(869414);let u=(0,i.adUnitFactory)({adUnit:"outstream",sizes:[[1,1]],id:"adngin-outstream-0",onDismount:()=>
1{document.querySelectorAll("script").forEach(e=>{e.src.includes("anyclip")&&e.remove()});let e=document.body.getElementsByTagName("*");for(let t=e.length-1;t>=0;t--){let i=e[t];(i.innerHTML.includes("anyclip")||Array.from(i.attributes).some(e=>e.value.includes("anyclip")))&&i.remove()}}});function c(){return(0,n.useEffect)(()=>(a.getState().enableAdUnit("outstream"),()=>{a.getState().disableAdUnit("outstream")}),[]),null}function m(){let e=u.useImpressionTracked();return(0,t.jsxs)("div",{className:"flex flex-col items-end [&_iframe]:hidden",children:[e&&(0,t.jsx)(l.CloseButton,{}),(0,t.jsx)(u,{})]})}e.s(["AdUnitOutstream",0,u,"AdUnitOutstreamWithCloseButton",0,function(){let{useDirectAds:e}=(0,o.useAdsContext)(),i=a(e=>e.adUnits.outstream);return e?null:i?(0,t.jsx)(m,{}):null},"RenderAdUnitOutstream",0,function({minContainerWidth:e}){let{useDirectAds:i}=(0,o.useAdsContext)(),n=(0,d.useContainerQuery)({type:"min-width",width:e});return i?null:n?(0,t.jsx)(c,{}):null}],27954)},216951,407257,e=>{"use strict";var t=e.i(478902),i=e.i(15652),n=e.i(392858),s=e.i(389959),r=e.i(74813),a=e.i(996772),o=e.i(523264);let d=[[1,[5,7]],[2,[5,7]],[3,[5,8]],[4,[5,9]],[5,[6,9]],[6,[6,9]],[7,[6,9]]],l=[{width:970,height:250,src:"/images/creators/wide.jpg"},{width:970,height:90,src:"/images/creators/wide-thin.jpg"},{width:728,height:90,src:"/images/creators/long.jpg"},{width:300,height:600,src:"/images/creators/tall.jpg"},{width:120,height:600,src:"/images/creators/tall-thin.jpg"},{width:300,height:250,src:"/images/creators/box.jpg"},{width:300,height:100,src:"/images/creators/strip.jpg"},{width:320,height:100,src:"/images/creators/strip-wide.jpg"},{width:320,height:50,src:"/images/creators/strip-thin.jpg"}],u={};e.s(["adUnitsLoaded",0,u,"getSupportUsImage",0,function(e,t){return l.filter(({width:i,height:n})=>i<=e&&n<=t).sort((e,t)=>t.height-e.height||t.width-e.width)[0]},"useCreateAdFeed",0,function(){let e=(0,s.useRef)({});return function({data:t,columnCount:i,options:n}){let s=d.find(([e])=>e===i)?.[1]??d[d.length-1][1];if(!n||!s)return t.map(e=>({type:"data",data:e}));let r=s.join("_");e.current[r]=e.current[r]??{indices:[],lastIndex:0};let l=e.current[r],[u,c]=s;for(;l.lastIndex<t.length;){let e=l.lastIndex+u+1,t=l.lastIndex+c,i=0===l.indices.length?(0,o.getRandomInt)(3,5):(0,o.getRandomInt)(e,t),s=(0,a.getRandom)(n);l.indices.push({index:i,...s}),l.lastIndex=i}let m=l.indices.map(e=>e.index);return t.reduce((e,t,i)=>{let n=m.indexOf(i);return n>-1&&e.push({type:"ad",data:l.indices[n]}),e.push({type:"data",data:t}),e},[])}}],407257);var c=e.i(204568),m=e.i(41923),g=e.i(49185),h=e.i(90376),p=e.i(923850),f=e.i(908542),v=e.i(959986),w=e.i(505251),y=e.i(952332);let b={production:"https://cdn.snigelweb.com/adengine/civitai.com/loader.js",staging:"https://staging-cdn.snigelweb.com/adengine/civitai.com/loader.js"},x="adengine",S="civitai:adengine";function I(){let e=new URLSearchParams(window.location.search).get(x),t="staging"===e||"production"===e?e:null;try{return t&&sessionStorage.setItem(S,t),(t??sessionStorage.getItem(S))==="staging"?"staging":"production"}catch{return t??"production"}}let A=(0,s.createContext)(null),j=(0,r.create)(()=>({ready:!1,adsBlocked:void 0,consent:!0,browserBlocked:!1,gateBlocked:!1})),E=["/collections/6503138","/collections/7514194","/collections/7514211","/moderator"];function k(){let e=(0,p.useCurrentUser)(),{worker:t}=(0,g.useSignalContext)();return(0,s.useEffect)(()=>{let i=i=>{let n=i.detail;u[n]=!0,t&&e&&t.send("recordAdImpression",{userId:e.id,adId:n})};return window.addEventListener("civitai-ad-impression",i),()=>{window.removeEventListener("civitai-ad-impression",i)}},[t,e]),null}e.s(["AD_ENGINE_PARAM",0,x,"AdsProvider",0,function({children:e,gated:r=!1}){let a=(0,i.useRouter)(),o=j(e=>e.ready),d=j(e=>e.adsBlocked),l=j(e=>e.consent),u=j(e=>e.browserBlocked),g=j(e=>e.gateBlocked),f=(0,p.useCurrentUser)(),x=(0,w.useFeatureFlags)(),{allowed:S}=(0,c.useThirdPartyConsent)(),[U]=(0,s.useState)(I),C=f?.isMember??!1,R=(0,v.useBrowsingSettings)(e=>e.allowAds),L=x.isRed,_=!h.isDev&&!u&&S&&(R||!C)&&!E.some(e=>a.asPath.includes(e))&&!a.asPath.split("?")[0].endsWith("/edit");return(0,s.useEffect)(()=>
1{if(!L||!_)return;let e=h.isDev?"http://localhost:5173":"https://advertising.civitai.com";fetch(`${e}/api/v1/serve?placement=probe&name=footer&container=1531&browsingLevel=1`,{credentials:"include"}).then(()=>j.setState({adsBlocked:!1})).catch(()=>j.setState({adsBlocked:!0}))},[L,_]),(0,s.useEffect)(()=>{(0,y.isBraveBrowser)().then(e=>{e&&j.setState({browserBlocked:!0})})},[]),(0,s.useEffect)(()=>{function e(){window.__tcfapi("addEventListener",2,function(e,t){["tcloaded","useractioncomplete"].includes(e.eventStatus)&&(window.__tcfapi("removeEventListener",2,null,e.listenerId),t?j.setState({ready:!0}):j.setState({consent:!1}))}),window.googletag.cmd.push(function(){window.googletag.pubads().addEventListener("impressionViewable",function(e){let t=e.slot,i=t.getAdUnitPath()?.split("/")?.reverse()?.[0];i&&dispatchEvent(new CustomEvent("civitai-ad-impression",{detail:i}))})})}return window.addEventListener("adnginLoaderReady",e),()=>{window.removeEventListener("adnginLoaderReady",e)}},[]),(0,t.jsxs)(A.Provider,{value:{ready:o,adsBlocked:d,consent:l,adsEnabled:_&&!((r||g)&&!L),useDirectAds:L,adEngine:U,username:f?.username,isMember:C},children:[e,_&&!L&&h.isDev&&(0,t.jsx)(n.default,{id:"snigel-ads-domain-spoof","data-cfasync":"false",type:"text/javascript",dangerouslySetInnerHTML:{__html:` 2 // Spoofing domain to 'civitai.com' --> ONLY FOR TESTING PURPOSES. 3 // This is required when the test environment domain differs from the production domain. 4 window.addEventListener("adnginLoaderReady", function () { 5 adngin.queue.push(function () { 6 googletag.cmd.push(function () { 7 googletag.pubads().set("page_url", "civitai.com"); 8 }); 9 }); 10 }); 11 `}}),_&&!L&&(0,t.jsx)(n.default,{id:"snigel-config","data-cfasync":"false",type:"text/javascript",dangerouslySetInnerHTML:{__html:` 12 13 window.snigelPubConf = { 14 "adengine": { 15 "activeAdUnits": ["incontent_1", "outstream", "side_1", "side_2", "side_3", "top", "adhesive"] 16 } 17 } 18 `}}),_&&!L&&(0,t.jsx)(n.default,{defer:!0,src:b[U],onError:function(){j.setState({adsBlocked:!0})},onLoad:function(){j.setState({adsBlocked:!1})}}),(0,t.jsx)(m.IsClient,{children:"staging"===U&&(0,t.jsx)("div",{className:"pointer-events-none fixed bottom-2 left-2 z-50 rounded bg-red-6 px-2 py-1 text-xs font-bold uppercase text-white",children:"Snigel staging ad engine"})}),_&&!L&&(0,t.jsx)(n.default,{id:"ad-cleanup",type:"text/javascript",dangerouslySetInnerHTML:{__html:` 19 // GPT 20 window.googletag = window.googletag || {cmd: []}; 21 googletag.cmd.push(function() { 22 googletag.pubads().disableInitialLoad(); 23 googletag.pubads().enableSingleRequest(); 24 googletag.enableServices(); 25 }); 26 27 // adsense 28 (window.adsbygoogle = window.adsbygoogle || []).pauseAdRequests = 1 29 `}}),_&&!L&&(0,t.jsx)(k,{})]})},"useAdGate",0,function(e){(0,f.useIsomorphicLayoutEffect)(()=>{if(e)return j.setState({gateBlocked:!0}),()=>j.setState({gateBlocked:!1})},[e])},"useAdsContext",0,function(){let e=(0,s.useContext)(A);if(!e)throw Error("missing AdsProvider");return e}],216951)},609265,e=>{"use strict";var t=e.i(478902),i=e.i(318491),n=e.i(15652),s=e.i(389959);let r=(0,s.createContext)(null),a="my-bids";e.s(["AuctionContextProvider",0,({children:e})=>{let[o,d]=(0,s.useState)(void 0),[l,u]=(0,s.useState)(void 0),[c,m]=(0,s.useState)(!0),[g,h]=(0,s.useState)(void 0),[p,f]=(0,s.useState)({}),[v,{close:w,toggle:y}]=(0,i.useDisclosure)(),b=(0,n.useRouter)();return(0,t.jsx)(r.Provider,{value:{selectedAuction:o,selectedModel:l,validAuction:c,justBid:g,viewing:p,setSelectedAuction:d,setSelectedModel:u,setValidAuction:m,setJustBid:h,setViewing:f,drawerIsOpen:v,drawerToggle:y,drawerClose:w,chooseAuction:e=>{(!e||e?.id&&o?.id!==e.id)&&(d(e),u(void 0),m(!0),b.push({query:{slug:e?e.auctionBase.slug:a}},void 0,{shallow:!0}).catch()),w()}},children:e})},"MY_BIDS",0,a,"useAuctionContext",0,()=>{let e=(0,s.useContext)(r);if(!e)throw Error("AuctionContext not in tree");return e}])},591557,e=>{"use strict";let t;var i=e.i(280451);let n=(t={},{addItem:(e,i)=>(t[e]=i,{[e]:i}),getItems:()=>t}),s=(0,i.default)(()=>
29e.A(884889),{loadableGenerated:{modules:[330942]},ssr:!1});n.addItem("imageDetail",{component:s,target:"#main",resolve:(e,{imageId:t,...i})=>({query:{...e,imageId:t},asPath:`/images/${t}`,state:i})});let r=(0,i.default)(()=>e.A(164977),{loadableGenerated:{modules:[211269]},ssr:!1});n.addItem("collectionEdit",{component:r,resolve:(e,{collectionId:t})=>({query:{...e,collectionId:t}})});let a=(0,i.default)(()=>e.A(581784),{loadableGenerated:{modules:[116786]},ssr:!1});n.addItem("hiddenComments",{component:a,resolve:(e,{entityType:t,entityId:i})=>({query:{...e,entityType:t,entityId:i}})});let o=(0,i.default)(()=>e.A(736382),{loadableGenerated:{modules:[538920]},ssr:!1});n.addItem("resourceReview",{component:o,target:"#main",resolve:(e,{reviewId:t})=>({query:{...e,reviewId:t}})});let d=(0,i.default)(()=>e.A(770328),{loadableGenerated:{modules:[648958]},ssr:!1});n.addItem("filesEdit",{component:d,resolve:(e,{modelVersionId:t})=>({query:{...e,modelVersionId:t}})});let l=(0,i.default)(()=>e.A(223913),{loadableGenerated:{modules:[579551]},ssr:!1});n.addItem("commentEdit",{component:l,resolve:(e,{commentId:t})=>({query:{...e,commentId:t}})});let u=(0,i.default)(()=>e.A(629531),{loadableGenerated:{modules:[339187]},ssr:!1});n.addItem("commentThread",{component:u,resolve:(e,{commentId:t,highlight:i})=>({query:{...e,commentId:t,highlight:i}})});let c=(0,i.default)(()=>e.A(251234),{loadableGenerated:{modules:[920098]},ssr:!1});n.addItem("support",{component:c,resolve:e=>({query:e,asPath:"/support"})});let m=n.getItems();e.s(["dialogs",0,m],591557)},41923,e=>{"use strict";var t=e.i(478902),i=e.i(848942);e.s(["IsClient",0,function({children:e}){return(0,i.default)()?(0,t.jsx)(t.Fragment,{children:e}):null}])},789703,e=>{"use strict";let t=["https://twitter.com/HelloCivitai","https://discord.gg/civitai","https://www.youtube.com/@civitai","https://www.instagram.com/hellocivitai/","https://www.tiktok.com/@hellocivitai","https://reddit.com/r/civitai","https://www.twitch.tv/civitai","https://github.com/civitai/civitai"];function i(e){return`https://${e}`}e.s(["buildBreadcrumbSchema",0,function(e,t){if(t.length)return{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:t.map(({name:t,path:i},n)=>({"@type":"ListItem",position:n+1,name:t,...i?{item:`${e}${i}`}:{}}))}},"getSiteSchema",0,function({domain:e,serverDomains:n}){let s=e?n?.[e]?.primary:void 0;if(!s)return;let r=i(s),a=n?.green?.primary,o={"@type":"WebSite","@id":`${r}/#website`,url:r,name:"Civitai",inLanguage:"en"};if("green"!==e||!a)return{"@context":"https://schema.org","@graph":[o]};let d=i(a);return{"@context":"https://schema.org","@graph":[{...o,publisher:{"@id":`${d}/#organization`}},{"@type":"Organization","@id":`${d}/#organization`,name:"Civitai",url:d,description:"Civitai is an open platform for sharing, discovering and running AI image and video models â checkpoints, LoRAs and embeddings â with an in-browser generator and model training.",logo:{"@type":"ImageObject",url:`${d}/images/logo_light_mode.png`},sameAs:t}]}}])},326925,e=>{"use strict";var t=e.i(802878),i=e.i(389959),n=e.i(74813),s=e.i(483880);function r(e){if(e&&"object"==typeof e){let t=e.key;if("string"==typeof t)return t}}let a=!!window.navigation,o="hist_keys",d=(0,n.create)()((0,s.immer)(e=>({index:0,keys:[],setDefault:t=>{e(e=>{e.keys=[t]})},pushKey:t=>{e(e=>{e.keys=e.keys.slice(0,e.index+1).concat([t]),e.index=e.keys.length-1})},setKey:t=>{e(e=>{let i=e.keys.indexOf(t);i>-1?e.index=i:-1===i&&(e.keys=e.keys.slice(0,i).concat([t]),e.index=e.keys.length-1)})}})));e.s(["ClientHistoryStore",0,function(){let e=d(e=>e.keys),n=d(e=>e.pushKey),s=d(e=>e.setDefault),a=d(e=>e.setKey);return(0,i.useEffect)(()=>{sessionStorage.setItem(o,e.join(","))},[e]),(0,i.useEffect)(()=>{if(!e.length){let e=r(history.state);e&&s(e)}},[e,s]),(0,i.useEffect)(()=>{let e=history.pushState;return history.pushState=function(t,i,s){return t?.key&&n(t.key),e.apply(history,[t,i,s])},()=>{history.pushState=e}},[n]),(0,t.useWindowEvent)("popstate",e=>{let t=r(e?.state);t&&a(t)}),null},"getHasClientHistory",0,()=>{if(a)return(navigation.currentEntry?.index??0)>0;{let e=sessionStorage.getItem(o)?.split(",")??[],t=r(history.state);return(t?e.indexOf(t):-1)>0}},"useHasClientHistory",0,function(){let e=d(e=>e.index??0);return a?(navigation.currentEntry?.index??0)>0:e>0}],326925)}]); 30 31//# sourceMappingURL=156cekujqe-45.js.map
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.