PageSourceSearch

https://tangra.link/_next/static/chunks/3364-326ecb4c96e8babb.js

js tangra.link collected 2026-10-02 07:34:06 UTC 39,328 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3364],{3364:function(e,t,i){var a=i(85893),s=i(40645),r=i.n(s),n=i(67294),o=i(22419),l=i(71278),c=i(67421);i(1296);var d=i(97265),m=i(11555),g=i(37081),h=i(2664),p=i(10955);let f="undefined"!=typeof navigator&&(window.Android||/iPhone|iPad|iPod|Macintosh|Android/i.test(navigator.userAgent));t.Z=e=>{var t,i;let{t:s}=(0,c.$G)(["images","default"]),u=(0,h.I0)(),y=(0,h.v9)(e=>"video"===e.images.view),x=(0,h.v9)(e=>"music"===e.images.view),v=(0,h.v9)(e=>"voice"===e.images.view),k=!y&&!x&&!v,{viewportWidth:w}=(0,o.n)(),[b,j]=(0,n.useState)(0),[S,N]=(0,n.useState)(!1),[z,C]=(0,n.useState)(!1),[M,L]=(0,n.useState)(0),[E,B]=(0,n.useState)(!1),P=(0,n.useRef)(),R=(0,n.useRef)(0),A=(0,n.useRef)(),I=(0,n.useCallback)(t=>{A.current&&A.current.disconnect(),A.current=new IntersectionObserver(t=>{if(t[0].isIntersecting&&e.loadMore){let t=Date.now();t-R.current>500&&(R.current=t,e.loadMore())}},{root:null,rootMargin:"100px",threshold:.1}),t&&(A.current.observe(t),setTimeout(()=>{let i=t.getBoundingClientRect();if(i.top<window.innerHeight+100&&i.bottom>0&&e.loadMore){let t=Date.now();t-R.current>500&&(R.current=t,e.loadMore())}},100))},[e.loadMore]);(0,n.useEffect)(()=>{if(!z||!e.loadMore||!e.showLoadMore)return;let t=()=>{let t=window.pageYOffset||document.documentElement.scrollTop,i=window.innerHeight;if(document.documentElement.scrollHeight-(t+i)<200){let t=Date.now();t-R.current>500&&(R.current=t,e.loadMore())}};return window.addEventListener("scroll",t),t(),()=>window.removeEventListener("scroll",t)},[z,e.loadMore,e.showLoadMore]);let D=e.files,T=e.itemHeight;T?w>0&&T>w-80&&(T=w-80):T=w>1200?200:Math.round(33*w/100),T<350&&(T=350),T>400&&(T=400),S&&(T=250);let H=0;if(z&&(H=w<660?1:w<970?2:w<1280?3:w<1590?4:5,(T=Math.round((w-10*H-40)/H))>400&&(T=400)),T=Math.min(T,w-50,400),x&&!z&&w>0&&(T=Math.min(T,Math.round((w-60)/2.2)-10)),(0,n.useEffect)(()=>{C(e.vertical)},[e.vertical]),(0,n.useEffect)(()=>{let e=()=>{z&&B(window.scrollY>500)};if(z)return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[z]),(0,n.useEffect)(()=>{if(!D)return;j("".concat(T,"px"));let e=0;for(let t=0;t<D.length;t++){let i=D[t];(0,l.updateImageSize)(i),e+=(z?T:(0,l.getImageWidthForHeight)(i,T))+10}L(Math.round(e)+"px")},[w,D,e.itemHeight,S,z,T]),0==M)return(0,a.jsx)("div",{style:{width:"100%",height:b}});let _=(e.selection?"number"==typeof e.selection.size?e.selection.size:Array.isArray(e.selection)?e.selection.length:0:0)>0,F=t=>!!e.selection&&("function"==typeof e.selection.has?e.selection.has(t._id):!!Array.isArray(e.selection)&&e.selection.some(e=>e===t._id||(null==e?void 0:e._id)===t._id)),q=(t,i)=>{var a,s,r;if((_||(null==t?void 0:t.shiftKey))&&e.onToggleSelect){t&&(null===(s=t.preventDefault)||void 0===s||s.call(t),null===(r=t.stopPropagation)||void 0===r||r.call(t)),e.onToggleSelect(t,i);return}null===(a=e.onClick)||void 0===a||a.call(e,i)},U=(t,i)=>{var a,s,r;t&&(null===(s=t.preventDefault)||void 0===s||s.call(t),null===(r=t.stopPropagation)||void 0===r||r.call(t)),null===(a=e.onToggleSelect)||void 0===a||a.call(e,t,i)},V=e=>{let{selected:t,onClick:i}=e;return(0,a.jsx)("button",{type:"button",className:"select-circle",onClick:i,"aria-label":t?"Deselect image":"Select image",title:t?s("deselect",{ns:"default",defaultValue:"Deselect"}):s("select",{defaultValue:"Select"}),children:t&&(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",style:{width:"60%",height:"60%",fill:"currentColor"},children:(0,a.jsx)("path",{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"})})})};return D&&D.length>0?(0,a.jsxs)("div",{style:null!==(t=e.style)&&void 0!==t?t:{paddingLeft:z?"0px":"10px"},className:"jsx-d218423df863fc8f",children:[e.title&&!z?(0,a.jsx)("div",{style:{fontSize:"26px",textAlign:"left",paddingLeft:"10px",paddingTop:"20px",marginBottom:"0px",display:"flex",minHeight:"60px",justifyContent:"flex-end"},className:"jsx-d218423df863fc8f",children:(0,a.jsxs)("span",{style:{marginRight:"auto"},className:"jsx-d218423df863fc8f",children:[e.title,e.shuffleImages?(0,a.jsx)("button",{id:"menu-image",type:"button",style:{fontSize:"14px"},onClick:()=>e.shuffleImages(),title:"Shuffle",className:"jsx-d218423df863fc8f submit-btn-circle",children:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",style:{filter:"invert(100%)"},className:"jsx-d218423df863fc8f",children:(0,a.jsx)("path",{d:"M403.8 34.4c12-5 25.7-2.2 34.9 6.9l64 64c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-64 64c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6V160H352c-10.1 0-19.6 4.7-25.6 12.8L284 229.3 244 176l31.2-41.6C293.3 110.2 321.8 96 352 96h32V64c0-12.9 7.8-24.6 19.8-29.6zM164 282.7L204 336l-31.2 41.6C154.7 401.8 126.2 416 96 416H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H96c10.1 0 19.6-4.7 25.6-12.8L164 282.7zm274.6 188c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6V416H352c-30.2 0-58.7-14.2-76.8-38.4L121.6 172.8c-6-8.1-15.5-12.8-25.6-12.8H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H96c30.2 0 58.7 14.2 76.8 38.4L326.4 339.2c6 8.1 15.5 12.8 25.6 12.8h32V320c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l64 64c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-64 64z",className:"jsx-d218423df863fc8f"})})}):""]})}):"",z?(0,a.jsx)("div",{style:{padding:1==H?"0px":"5px"},className:"jsx-d218423df863fc8f music-gallery",children:D.map((t,i)=>{let r="".concat(T,"px");if(e.itemRender)return e.itemRender(t,r,b);let n=F(t);return(0,a.jsxs)("div",{style:{marginRight:"10px",margin:"10px 5px",position:"relative"},className:"jsx-d218423df863fc8f "+("image-container"+(n?" is-selected":"")+(_?" has-selection":"")||0),children:[(0,a.jsx)("div",{style:{position:"absolute",top:"5px",left:"15px",marginRight:"10px",fontSize:"12px"},className:"jsx-d218423df863fc8f",children:(0,l.getModelNameByModel)(t.model)||("custom"==t.model?"":"Automatic")}),(0,a.jsxs)("button",{style:{border:"0px",background:"transparent",maxWidth:"100%"},onClick:e=>q(e,t),className:"jsx-d218423df863fc8f",children:[(0,a.jsx)(m.ZP,{image:t,style:{width:r,height:b,objectFit:"contain",objectPosition:"center"},loading:i<=3?"eager":e.eagerLoading?"eager":"lazy",fetchpriority:0===i?"high":void 0,alt:t.description,title:t.description}),(0,a.jsx)("div",{style:{width:"".concat(T-20,"px")},className:"jsx-d218423df863fc8f name hide-on-very-small-screen",children:t.name})]}),e.onToggleSelect&&(0,a.jsx)(V,{selected:n,onClick:e=>U(e,t)}),!e.hideAddorners&&!_&&(0,a.jsx)("div",{style:{width:r,height:b},onClick:e=>q(e,t),className:"jsx-d218423df863fc8f image-overlay",children:(0,a.jsx)("div",{className:"jsx-d218423df863fc8f "+((f?"":"show-on-hover")||""),children:(0,a.jsxs)("div",{style:{display:"flex",gap:"10px"}
1,className:"jsx-d218423df863fc8f",children:[(v||k)&&(0,a.jsx)("button",{title:s("ai-edit"),onClick:e=>{e.preventDefault(!0),e.stopPropagation(!0),u((0,g.rh)(t))},className:"jsx-d218423df863fc8f submit-btn-circle",children:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",style:{cursor:"pointer",width:"50%"},className:"jsx-d218423df863fc8f",children:(0,a.jsx)("path",{d:"M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160L0 416c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 64z",className:"jsx-d218423df863fc8f"})})}),(0,a.jsx)("div",{onClick:e=>{e.preventDefault(),e.stopPropagation()},className:"jsx-d218423df863fc8f",children:(0,a.jsx)(p.Z,{image:t})})]})})})]},"my".concat(t._id))})}):(0,a.jsx)("div",{ref:P,style:{scrollBehavior:"smooth"},className:"jsx-d218423df863fc8f "+((null!==(i=e.groupClassName)&&void 0!==i?i:"music-group")||""),children:(0,a.jsx)("div",{style:{width:M,height:"".concat(T+20,"px")},className:"jsx-d218423df863fc8f music-gallery",children:D.map((t,i)=>{let r=(0,l.getImageWidthForHeight)(t,T),n="".concat(r,"px");if(e.itemRender)return e.itemRender(t,n,b);let o=F(t);return(0,a.jsxs)("div",{style:{width:n,marginRight:"10px",position:"relative"},className:"jsx-d218423df863fc8f "+("image-container"+(o?" is-selected":"")+(_?" has-selection":"")||0),children:[(0,a.jsx)("div",{style:{position:"absolute",top:"5px",left:"15px",marginRight:"10px",fontSize:"12px"},className:"jsx-d218423df863fc8f",children:(0,l.getModelNameByModel)(t.model)||("custom"==t.model?"":"Automatic")}),(0,a.jsxs)("button",{style:{border:"0px",background:"transparent",maxWidth:"100%"},onClick:e=>q(e,t),className:"jsx-d218423df863fc8f",children:[(0,a.jsx)(m.ZP,{image:t,style:{width:n,height:b},loading:i<=3?"eager":e.eagerLoading?"eager":"lazy",fetchpriority:0===i?"high":void 0,alt:t.description,title:t.description}),(0,a.jsx)("div",{style:{width:"".concat(r-20,"px"),fontSize:T<200?"13px":void 0},className:"jsx-d218423df863fc8f name hide-on-very-small-screen",children:t.name})]}),e.onToggleSelect&&(0,a.jsx)(V,{selected:o,onClick:e=>U(e,t)}),!e.hideAddorners&&!_&&(0,a.jsx)("div",{style:{width:n,height:b},onClick:e=>q(e,t),className:"jsx-d218423df863fc8f image-overlay",children:(0,a.jsx)("div",{className:"jsx-d218423df863fc8f "+((f?"":"show-on-hover")||""),children:(0,a.jsxs)("div",{style:{display:"flex",gap:"10px"},className:"jsx-d218423df863fc8f",children:[(v||k)&&(0,a.jsx)("button",{title:s("ai-edit"),onClick:e=>{e.preventDefault(!0),e.stopPropagation(!0),u((0,g.rh)(t))},className:"jsx-d218423df863fc8f submit-btn-circle",children:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",style:{cursor:"pointer",width:"50%"},className:"jsx-d218423df863fc8f",children:(0,a.jsx)("path",{d:"M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160L0 416c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 64z",className:"jsx-d218423df863fc8f"})})}),(0,a.jsx)("div",{onClick:e=>{e.preventDefault(),e.stopPropagation()},className:"jsx-d218423df863fc8f",children:(0,a.jsx)(p.Z,{image:t})})]})})})]},"my".concat(t._id))})})}),!z&&(0,a.jsx)(d.Z,{containerRef:P,viewportWidth:w,itemHeight:T,loadMore:e.loadMore,showLoadMore:e.showLoadMore}),z&&e.loadMore&&e.showLoadMore&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("br",{className:"jsx-d218423df863fc8f"}),(0,a.jsx)("center",{className:"jsx-d218423df863fc8f",children:e.searching?(0,a.jsx)("div",{role:"status",className:"jsx-d218423df863fc8f spinner-border",children:(0,a.jsx)("span",{className:"jsx-d218423df863fc8f sr-only",children:"Loading..."})}):(0,a.jsx)("button",{onClick:()=>{e.loadMore()},ref:I,className:"jsx-d218423df863fc8f submit-btn-2",children:s("show-more",{ns:"default"})})})]}),z&&E&&(0,a.jsx)("button",{onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},style:{position:"fixed",bottom:x?"80px":"30px",right:"30px",width:"60px",height:"60px",cursor:"pointer",boxShadow:"0 4px 16px rgba(0, 0, 0, 0.4)",zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease",backgroundColor:"var(--background)"},title:s("scroll-to-top",{ns:"default"}),className:"jsx-d218423df863fc8f submit-btn-circle",children:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",style:{width:"28px",height:"28px"},className:"jsx-d218423df863fc8f",children:(0,a.jsx)("path",{d:"M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z",className:"jsx-d218423df863fc8f"})})}),(0,a.jsx)(r(),{id:"d218423df863fc8f",children:".image-container>.select-circle{position:absolute;top:10px;left:15px;width:30px;height:30px;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;background:var(--background);border:2px solid var(--foreground);color:var(--foreground);padding:0;cursor:pointer;z-index:5;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;
1-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center;opacity:0;-webkit-transition:opacity.15s ease,-webkit-transform.1s ease;-moz-transition:opacity.15s ease,-moz-transform.1s ease;-o-transition:opacity.15s ease,-o-transform.1s ease;transition:opacity.15s ease,-webkit-transform.1s ease;transition:opacity.15s ease,-moz-transform.1s ease;transition:opacity.15s ease,-o-transform.1s ease;transition:opacity.15s ease,transform.1s ease;-webkit-box-shadow:0 1px 4px rgba(0,0,0,.35);-moz-box-shadow:0 1px 4px rgba(0,0,0,.35);box-shadow:0 1px 4px rgba(0,0,0,.35);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0}.my-item.image-container>.select-circle{left:10px}.image-container:hover>.select-circle,.image-container.has-selection>.select-circle,.image-container.is-selected>.select-circle{opacity:1}.image-container>.select-circle:hover{-webkit-transform:scale(1.08);-moz-transform:scale(1.08);-ms-transform:scale(1.08);-o-transform:scale(1.08);transform:scale(1.08)}"})]}):""}},1296:function(e,t,i){i.d(t,{AE:function(){return n},Sz:function(){return o},W2:function(){return r},fN:function(){return s},ix:function(){return d},kK:function(){return a},tk:function(){return l}});let a=[{name:"3D render",img:"",key:"trick-3d-render"},{name:"3D shading",img:"",key:"trick-3d-shading"},{name:"backlit",img:"",key:"trick-backlit"},{name:"clear transparent glass",img:"",key:"trick-clear-transparent-glass"},{name:"cybernetic",img:"",key:"trick-cybernetic"},{name:"dark tones",img:"DescentintoDepravity",key:"trick-dark-tones"},{name:"distorted reflections and shadows",img:"",key:"trick-distorted-reflections-and-shadows"},{name:"dramatic",img:"",key:"trick-dramatic"},{name:"dynamic pose",img:"DramaticPose",key:"trick-dynamic-pose"},{name:"ethereal and inspirational",img:"",key:"trick-ethereal-and-inspirational"},{name:"glow worms that look like stars",img:"",key:"trick-glow-worms-that-look-like-stars"},{name:"HD",img:"",key:"trick-hd"},{name:"low contrast",img:"",key:"trick-low-contrast"},{name:"northern lights",img:"",key:"trick-northern-lights"},{name:"nostalgic vintage scene",img:"PawsandReflect",key:"trick-nostalgic-vintage-scene"},{name:"old rustic suitcase",img:"",key:"trick-old-rustic-suitcase"},{name:"picture of the day",img:"CelestialMaternalEmbrace",key:"trick-picture-of-the-day"},{name:"reflections are cast by a stretched metal canopy",img:"",key:"trick-reflections-are-cast-by-a-stretched-metal-canopy"},{name:"translucent face",img:"",key:"trick-translucent-face"},{name:"unique framing and composition",img:"",key:"trick-unique-framing-and-composition"},{name:"V-Ray rendering",img:"",key:"trick-v-ray-rendering"},{name:"vivid colors",img:"SpringtimeSplendor1",key:"trick-vivid-colors"},{name:"water splashes",img:"AquaSpectrum",key:"trick-water-splashes"},{name:"water transforms into",img:"",key:"trick-water-transforms-into"}],s=[{name:"50mm lens",img:"",key:"photography-50mm-lens"},{name:"antique wall portrait",img:"TimelessElegance31",key:"photography-antique-wall-portrait"},{name:"close-up macro photograph",img:"MelancholyDroplet",key:"photography-close-up-macro-photograph"},{name:"deserted street at night",img:"SolitaryStroll1",key:"photography-deserted-street-at-night"},{name:"fish eye",img:"CoralSymphony",key:"photography-fish-eye"},{name:"high-speed photography",img:"",key:"photography-high-speed-photography"},{name:"highlights: Nikon D700, Nikkor 50mm 1.8",img:"SunsetSanctuary",key:"photography-highlights-nikon-d700-nikkor-50mm-1.8"},{name:"hyper realistic",img:"",key:"photography-hyper-realistic"},{name:"night lighting",img:"SereneHighlands",key:"photography-night-lighting"},{name:"photorealistic",img:"ChubbyCheeks",key:"photography-photorealistic"},{name:"photoshoot at ant's view perspective",img:"",key:"photography-photoshoot-at-ants-view-perspective"},{name:"pro studio photo",img:"",key:"photography-pro-studio-photo"},{name:"radial blur with long exposure time",img:"",key:"photography-radial-blur-with-long-exposure-time"},{name:"renaissance chiaroscuro lighting style",img:"",key:"photography-renaissance-chiaroscuro-lighting-style"},{name:"ultra high speed image",img:"",key:"photography-ultra-high-speed-image"},{name:"ultra wide lens at long shot",img:"",key:"photography-ultra-wide-lens-at-long-shot"},{name:"zeiss zm icon",img:"",key:"photography-zeiss-zm-icon"},{name:"zoomed out",img:"",key:"photography-zoomed-out"}],r=[{name:"abstract",img:"CrescendoofAbstraction",key:"styles-abstract"},{name:"alcohol ink",img:"TheJoyfulKitten",key:"styles-alcohol-ink"},{name:"anamorphic picture",img:"",key:"styles-anamorphic-picture"},{name:"aquarelle",img:"SunsetoverGeleon",key:"styles-aquarelle"},{name:"cartoony",img:"RebelScholar",key:"styles-cartoony"},{name:"chalk",img:"ColorfulChalkFlowerArt",key:"styles-chalk"},{name:"charosal",img:"",key:"styles-charosal"},{name:"colorful",img:"BatBuilderAdventure",key:"styles-colorful"},{name:"contour drawings",img:"MonochromeMistletoe",key:"styles-contour-drawings"},{name:"copper relief",img:"EtherealCopperCascade",key:"styles-copper-relief"},{name:"cross-hatching technique",img:"",key:"styles-cross-hatching-technique"},{name:"cubism clipart",img:"",key:"styles-cubism-clipart"},{name:"cyberpunk",img:"HyperPriusSixer",key:"styles-cyberpunk"},{name:"doodle",img:"SketchyGreenOrb",key:"styles-doodle"},{name:"early spring pastel pallette",img:"",key:"styles-early-spring-pastel-pallette"},{name:"fantasy art",img:"TwilightofEmpires",key:"styles-fantasy-art"},{name:"ghibli",img:"GhibliCloseUpPortrait",key:"styles-ghibli"},{name:"gothic",img:"",key:"styles-gothic"},{name:"gouache technique",img:"",key:"styles-gouache-technique"},{name:"high resolution digital art style",img:"",key:"styles-high-resolution-digital-art-style"},{name:"hyper-surrealism",img:"",key:"styles-hyper-surrealism"},{name:"intricate details",img:"",key:"styles-intricate-details"},{name:"kiri-e art",img:"ColorfulOrigamiSwans",key:"styles-kiri-e-art"},{name:"kirigami style",img:"",key:"styles-kirigami-style"},{name:"light art style",img:"",key:"styles-light-art-style"},{name:"miniature",img:"",key:"styles-miniature"},{name:"minimalist line art",img:"BalletGrace",key:"styles-minimalist-line-
1art"},{name:"oil art",img:"SunflowerSolstice",key:"styles-oil-art"},{name:"oil painting with palette knife",img:"FestivePalette",key:"styles-oil-painting-with-palette-knife"},{name:"pastel colors",img:"PastelNightfall",key:"styles-pastel-colors"},{name:"pencil drawing",img:"PawsandReflect",key:"styles-pencil-drawing"},{name:"perspective drawing",img:"",key:"styles-perspective-drawing"},{name:"pixel art",img:"happyflamingdumpster",key:"styles-pixel-art"},{name:"pop art",img:"",key:"styles-pop-art"},{name:"quilt art",img:"",key:"styles-quilt-art"},{name:"sketching",img:"Inbothcolorandblackchalks",key:"styles-sketching"},{name:"stained glass image",img:"FallenPetals",key:"styles-stained-glass-image"},{name:"stippling drawing",img:"StellarStippling",key:"styles-stippling-drawing"},{name:"surrealismus",img:"TimekeepersDomain",key:"styles-surrealismus"},{name:"symmetric",img:"",key:"styles-symmetric"},{name:"tattoo drawing",img:"CupidsEmbrace",key:"styles-tattoo-drawing"},{name:"technical drawing",img:"",key:"styles-technical-drawing"},{name:"typography drawing",img:"TypographicTango",key:"styles-typography-drawing"},{name:"ukiyo-e",img:"Foxspective",key:"styles-ukiyo-e"},{name:"watercolor",img:"TwilightContemplation",key:"styles-watercolor"}],n=[{name:"Amedeo Modigliani",img:""},{name:"Andrey Yaroshevich",img:""},{name:"Bo Bartlett",img:""},{name:"Claude Monet",img:"SunsetSanctuary5"},{name:"Dragon Muse - Yvette Marie",img:""},{name:"Durer",img:""},{name:"Egon Schiele",img:""},{name:"Giger",img:"OtherworldlyGlow"},{name:"Giorgione",img:"4MythologicalScene"},{name:"J.M.W. Turner",img:"TempestuousVoyage"},{name:"Kaoru Yamada",img:"3230"},{name:"Leonardo da Vinci",img:"MonaLisasEnigm"},{name:"Luis Royo",img:"JoyfulPlaytime2"},{name:"Matisse",img:"JoyfulGathering"},{name:"Michelangelo",img:"ReverentSupplication1"},{name:"Pablo Picasso",img:"MelancholyBlues"},{name:"Paul Gauguin",img:""},{name:"Raphael",img:"resurrectionofJesusChrist"},{name:"Rembrandt",img:""},{name:"Salvador Dali",img:"LamentableDebauchery"},{name:"Seurat",img:""},{name:"Van Gogh",img:"StarryNightPastel"},{name:"Vermeer",img:""}],o=[{name:"sepia tone",description:"Warm, brownish tones, giving a vintage look.",img:"BearFamilyRiverEncounter",key:"effects-sepia-tone"},{name:"vignette",description:"Darkening the edges of a frame to focus on the center.",key:"effects-vignette"},{name:"double exposure",description:"Two different images superimposed over each other.",img:"SunsetSerenade2",key:"effects-double-exposure"},{name:"bokeh",description:"Blurred background to emphasize the subject.",key:"effects-bokeh"},{name:"high dynamic range",description:"Enhancing the contrast and details.",img:"Amistysunriseovermountains3",key:"effects-high-dynamic-range"},{name:"grain effect",description:"Adding a textured, film-like quality.",img:"BeautyinFocus",key:"effects-grain-effect"},{name:"glitch art",description:"Digital artifacts, creating a corrupted image look.",key:"effects-glitch-art"},{name:"infrared photography",description:"Capturing light beyond the visible spectrum.",key:"effects-infrared-photography"},{name:"solarization",description:"Inverting or altering the tones of a photograph.",key:"effects-solarization"},{name:"time-lapse",description:"Showing a sequence of images to illustrate time passing.",key:"effects-time-lapse"},{name:"chiaroscuro",description:"Strong contrasts between light and dark.",key:"effects-chiaroscuro"},{name:"duotone",description:"Using two contrasting colors for dramatic effect.",key:"effects-duotone"},{name:"motion blur",description:"Capturing movement in a still image.",img:"NavigatingSuccess",key:"effects-motion-blur"},{name:"fish-eye effect",description:"Ultra wide-angle, creating a spherical appearance.",key:"effects-fish-eye-effect"},{name:"cross processing",description:"Unusual color shifts, often seen in vintage photos.",key:"effects-cross-processing"},{name:"tilt-shift",description:"Miniature effect by blurring parts of the photo.",key:"effects-tilt-shift"},{name:"color splash",description:"Keeping one color while the rest is black and white.",key:"effects-color-splash"},{name:"anaglyph 3D",description:"Creating a stereoscopic effect using two colors.",key:"effects-anaglyph-3d"},{name:"panorama",description:"Wide-angle view, stitching multiple images together.",key:"effects-panorama"},{name:"lens flare",description:"Light scattered in lens systems, often for a dreamy effect.",img:"MindfulReflection",key:"effects-lens-flare"}],l=[{name:"bird's eye view",description:"Directly overhead, high above the subject.",img:"BirdsEyeSoire",key:"views-birds-eye-view"},{name:"worm's eye view",description:"From below, looking up.",key:"views-worms-eye-view"},{name:"dutch angle",description:"Tilted horizon, creating a sense of unease.",key:"views-dutch-angle"},{name:"profile view",description:"Side view of the subject.",img:"TeenageFootballer",key:"views-profile-view"},{name:"frontal view",description:"Directly facing the subject.",key:"views-frontal-view"},{name:"three-quarter view",description:"Slightly off-center, giving depth.",key:"views-three-quarter-view"},{name:"high angle",description:"Looking down from above, often conveys powerlessness.",key:"views-high-angle"},{name:"low angle",description:"Looking up, can convey power or grandeur.",key:"views-low-angle"}
1,{name:"oblique angle",description:"Unusual, off-balance framing.",key:"views-oblique-angle"},{name:"over-the-shoulder",description:"From behind a person looking at another.",img:"SunsetAdventure",key:"views-over-the-shoulder"},{name:"close-up",description:"Tight framing on a subject or object.",img:"photoofatreewithalotof2",key:"views-close-up"},{name:"long shot",description:"Wide view, showing a large area.",key:"views-long-shot"},{name:"extreme close-up",description:"Very tight framing, focusing on detail.",img:"MajesticAvianReflection",key:"views-extreme-close-up"},{name:"panoramic view",description:"Wide horizontal view.",img:"ClifftopOasis",key:"views-panoramic-view"},{name:"elevated view",description:"Slightly above, giving an overview.",key:"views-elevated-view"},{name:"ground level",description:"Shot from the ground, giving a realistic perspective.",key:"views-ground-level"},{name:"aerial view",description:"From a high point, but not directly overhead.",img:"tropicalisland1",key:"views-aerial-view"},{name:"point-of-view",description:"Shot as if through the eyes of a character.",key:"views-point-of-view"},{name:"two-shot",description:"Framing two subjects equally.",key:"views-two-shot"},{name:"master shot",description:"Covers characters and action in one continuous shot.",img:"TheSplendidSplintersGlory",key:"views-master-shot"},{name:"1/3 side view",description:"1/3 Side view of the subject.",img:"FairytaleEnigma",key:"views-1-3-side-view"}],c=[...a,...s,...r,...n,...o].reduce((e,t)=>(e[t.name]=t.key,e),{}),d=e=>c[e];i.g.imageProptsInitialized||(i.g.imageProptsInitialized=!0,r.sort(),a.sort(),n.sort(),s.sort(),["Minions","The Little Prince","young Grogu, also known as 'Baby Yoda', from the Star Wars universe","Nemo - Pixar character","Dory - Pixar character","Doctor Strange from Marvel Universe"].sort())},10955:function(e,t,i){i.d(t,{Z:function(){return u}});var a=i(85893),s=i(40645),r=i.n(s),n=i(67294),o=i(30901),l=i(67994),c=i(11555),d=i(98008),m=i(82785),g=i(14884),h=i(91940),p=i(2664),f=e=>{let{show:t,onHide:s,image:o,isFavorited:l,setFavorite:f,onLikedChange:u}=e,{t:y}=(0,h.$G)("images"),x=(0,p.v9)(e=>{var t;return null===(t=e.images)||void 0===t?void 0:t.view})||"images",v="music"===x,[k,w]=(0,n.useState)([]),[b,j]=(0,n.useState)([]),[S,N]=(0,n.useState)([]),[z,C]=(0,n.useState)(""),[M,L]=(0,n.useState)(""),[E,B]=(0,n.useState)(!1),[P,R]=(0,n.useState)(!1),[A,I]=(0,n.useState)(!1),D=v?"playlist":"list";(0,n.useEffect)(()=>{if(t&&o){(async()=>{let[e,t]=await Promise.all([T(),H()]);1===e.length&&(null==t?void 0:t.length)===0&&j([e[0]._id])})();let e=l(o);R(e),I(e)}},[t,o]);let T=async()=>{try{let e=await (0,m.getJson)("".concat(i.g.serverUrl,"/images/lists?type=").concat(x));if(null==e?void 0:e.error)console.error("Error loading lists:",e.error),w([]);else{let t=Array.isArray(e)?e:null==e?void 0:e.data,i=Array.isArray(t)?t:[];return w(i),i}}catch(e){console.error("Error loading lists:",e),w([])}return[]},H=async()=>{try{let e=await (0,m.getJson)("".concat(i.g.serverUrl,"/images/lists/").concat(o._id));if(null==e?void 0:e.error)console.error("Access denied for image lists:",e.error),j([]),N([]);else{let t=Array.isArray(e)?e:null==e?void 0:e.data;if(Array.isArray(t)){let e=t.map(e=>e._id).filter(Boolean);return j(e),N([...e]),e}console.error("Unexpected response for image lists:",e),j([]),N([])}}catch(e){console.error("Error loading image lists:",e),j([]),N([])}return null},_=async()=>{if(z.trim()){B(!0);try{let e=await (0,g.$)({name:z,type:x,...o.private?{}:{imageThumbUrl:o.imageThumbUrl}});w([e,...k]),C(""),await F(e._id,!0)}catch(e){console.error("Error creating list:",e)}finally{B(!1)}}},F=async(e,t)=>{try{t?j([...b,e]):j(b.filter(t=>t!==e))}catch(e){console.error("Error toggling list:",e)}},q=async()=>{try{P!==A&&await f(o,P);let e=b.filter(e=>!S.includes(e)),t=S.filter(e=>!b.includes(e));for(let t of e)await (0,m.uz)("".concat(i.g.serverUrl,"/images/lists/").concat(t,"/add/").concat(o._id));for(let e of t)await (0,m.uz)("".concat(i.g.serverUrl,"/images/lists/").concat(e,"/remove/").concat(o._id));u&&u(P||b.length>0),(e.length>0||t.length>0)&&window.dispatchEvent(new CustomEvent("listChanged",{detail:{action:"imageModified",imageId:o._id,addedToLists:e,removedFromLists:t}}))}catch(e){console.error("Error updating lists:",e)}s()},U=(k||[]).filter(e=>e&&"string"==typeof e.name).filter(e=>e.name.toLowerCase().includes(M.toLowerCase()));return(0,a.jsx)(d.Z,{show:t,onHide:s,centered:!0,children:(0,a.jsxs)(d.Z.Body,{style:{background:"var(--background)",padding:"20px",borderRadius:"12px"},children:[(0,a.jsx)("h5",{style:{marginBottom:"20px",color:"var(--text)"},className:"jsx-f6cbc3cc767ac2c5",children:y(v?"add-to-playlist":"add-to-list")}),k.length>=10&&(0,a.jsxs)("div",{style:{position:"relative",marginBottom:"15px"},className:"jsx-f6cbc3cc767ac2c5",children:[(0,a.jsx)("input",{type:"text",placeholder:y("find-list",{list:D}),value:M,onChange:e=>L(e.target.value),style:{paddingLeft:"40px",background:"var(--input-bg)",border:"1px solid var(--border)",color:"var(--text)"},className:"jsx-f6cbc3cc767ac2c5 form-control"}),(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
1currentColor",style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",width:"20px",height:"20px",opacity:.5},className:"jsx-f6cbc3cc767ac2c5",children:(0,a.jsx)("path",{d:"M10 18a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396 1.414-1.414-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8s-8 3.589-8 8 3.589 8 8 8zm0-14c3.309 0 6 2.691 6 6s-2.691 6-6 6-6-2.691-6-6 2.691-6 6-6z",className:"jsx-f6cbc3cc767ac2c5"})})]}),(0,a.jsxs)("div",{style:{maxHeight:"300px",overflowY:"auto",marginBottom:"15px"},className:"jsx-f6cbc3cc767ac2c5",children:[(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"12px",cursor:"pointer",borderRadius:"8px",marginBottom:"4px",transition:"background 0.2s",background:P?"var(--hover-bg)":"transparent"},onClick:()=>R(!P),className:"jsx-f6cbc3cc767ac2c5 list-item",children:[(0,a.jsx)("div",{style:{width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",background:"linear-gradient(135deg, #d01a62 0%, #ff6b6b 100%)",borderRadius:"4px"},className:"jsx-f6cbc3cc767ac2c5",children:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"white",style:{width:"20px",height:"20px"},className:"jsx-f6cbc3cc767ac2c5",children:(0,a.jsx)("path",{d:"m18.199 2.04c-2.606-.284-4.262.961-6.199 3.008-2.045-2.047-3.593-3.292-6.199-3.008-3.544.388-6.321 4.43-5.718 7.96.966 5.659 5.944 9 11.917 12 5.973-3 10.951-6.341 11.917-12 .603-3.53-2.174-7.572-5.718-7.96z",className:"jsx-f6cbc3cc767ac2c5"})})}),(0,a.jsx)("span",{style:{flex:1,color:"var(--text)",fontSize:"15px"},className:"jsx-f6cbc3cc767ac2c5",children:y("liked")}),(0,a.jsx)("div",{style:{width:"24px",height:"24px",borderRadius:"50%",border:"2px solid ".concat(P?"var(--background)":"var(--border)"),display:"flex",alignItems:"center",justifyContent:"center",background:P?"var(--foreground)":"transparent"},className:"jsx-f6cbc3cc767ac2c5",children:P&&(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"var(--background)",style:{width:"14px",height:"14px"},className:"jsx-f6cbc3cc767ac2c5",children:(0,a.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z",className:"jsx-f6cbc3cc767ac2c5"})})})]}),U.map(e=>{let t=b.includes(e._id);return(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"12px",cursor:"pointer",borderRadius:"8px",marginBottom:"4px",transition:"background 0.2s"},onClick:()=>F(e._id,!t),className:"jsx-f6cbc3cc767ac2c5 list-item",children:[(0,a.jsx)("div",{style:{width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",background:v?"linear-gradient(135deg, #667eea 0%, #764ba2 100%)":"linear-gradient(135deg, #f093fb 0%, #f5576c 100%)",borderRadius:"4px"},className:"jsx-f6cbc3cc767ac2c5",children:e.imageThumbUrl?(0,a.jsx)(c.ZP,{image:{_id:e._id,imageThumbUrl:e.imageThumbUrl},alt:e.name,style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"4px"}}):(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"white",style:{width:"20px",height:"20px"},className:"jsx-f6cbc3cc767ac2c5",children:v?(0,a.jsx)("path",{d:"M21 3v12.5a3.5 3.5 0 1 1-2-3.163V5.002L9 7.002v10.498a3.5 3.5 0 1 1-2-3.163V3l14 0z",className:"jsx-f6cbc3cc767ac2c5"}):(0,a.jsx)("path",{d:"M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z",className:"jsx-f6cbc3cc767ac2c5"})})}),(0,a.jsx)("span",{style:{flex:1,color:"var(--text)",fontSize:"15px"},className:"jsx-f6cbc3cc767ac2c5",children:e.name}),(0,a.jsx)("div",{style:{width:"24px",height:"24px",borderRadius:"50%",border:"2px solid ".concat(t?"var(--background)":"var(--border)"),display:"flex",alignItems:"center",justifyContent:"center",background:t?"var(--foreground)":"transparent"},className:"jsx-f6cbc3cc767ac2c5",children:t&&(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"var(--background)",style:{width:"14px",height:"14px"},className:"jsx-f6cbc3cc767ac2c5",children:(0,a.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z",className:"jsx-f6cbc3cc767ac2c5"})})})]},e._id)})]}),(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"10px",marginBottom:"15px"},className:"jsx-f6cbc3cc767ac2c5",children:[(0,a.jsxs)("div",{style:{position:"relative",flex:1},className:"jsx-f6cbc3cc767ac2c5",children:[(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
1currentColor",style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",width:"20px",height:"20px",opacity:.5,pointerEvents:"none"},className:"jsx-f6cbc3cc767ac2c5",children:(0,a.jsx)("path",{d:"M19 11h-6V5h-2v6H5v2h6v6h2v-6h6z",className:"jsx-f6cbc3cc767ac2c5"})}),(0,a.jsx)("input",{id:"new-list-input",type:"text",placeholder:y("new-list-placeholder",{list:D}),value:z,onChange:e=>C(e.target.value),onKeyDown:e=>"Enter"===e.key&&_(),disabled:E,style:{paddingLeft:"40px",background:"var(--input-bg)",border:"1px solid var(--border)",color:"var(--text)",fontWeight:300},className:"jsx-f6cbc3cc767ac2c5 form-control"})]}),z.trim()&&(0,a.jsx)("button",{onClick:_,disabled:E,className:"jsx-f6cbc3cc767ac2c5 submit-btn-2",children:y("create")})]}),(0,a.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"10px"},className:"jsx-f6cbc3cc767ac2c5",children:(0,a.jsx)("button",{onClick:q,className:"jsx-f6cbc3cc767ac2c5 submit-btn-2",children:y("done")})}),(0,a.jsx)(r(),{id:"f6cbc3cc767ac2c5",children:".list-item.jsx-f6cbc3cc767ac2c5:hover{background:var(--hover-bg)}"})]})})},u=e=>{let{image:t,onShareModalRequest:i,renderButton:s}=e,{t:c}=(0,h.$G)("images"),{isFavorited:d,setFavorite:m}=(0,o.r)(),[g,p]=(0,n.useState)(!1),[u,y]=(0,n.useState)(t.likes||0),[x,v]=(0,n.use
1State)(d(t)||t.imageLists&&t.imageLists.length>0),[k,w]=(0,n.useState)(!1);(0,n.useEffect)(()=>{v(d(t)||t.imageLists&&t.imageLists.length>0)},[t,d]);let b=async()=>{if(g){p(!1);return}if(x)p(!0);else{let e=localStorage.getItem("likes"),a=e?parseInt(e):1;(0,l.ry)("like",{imageId:t.id,filename:t.filename,likes:a}),y(e=>e+1);let s=await m(t,!0);(null==s?void 0:s.posted)?(v(!0),(null==s?void 0:s.shouldShowShareModal)&&i&&i()):y(e=>e-1)}},j=(0,a.jsxs)("button",{title:c("image-like"),onClick:b,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),style:{position:"relative",marginBottom:"0px"},className:"jsx-f312f1244b25153c submit-btn-circle",children:[(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",enableBackground:"new 0 0 24 24",viewBox:"0 0 24 24",fill:x?"#d01a62":"#999999",style:{cursor:"pointer",filter:"none",width:"50%",animation:x&&k?"heartPulse 1.5s infinite":"none"},className:"jsx-f312f1244b25153c",children:(0,a.jsx)("path",{d:"m18.199 2.04c-2.606-.284-4.262.961-6.199 3.008-2.045-2.047-3.593-3.292-6.199-3.008-3.544.388-6.321 4.43-5.718 7.96.966 5.659 5.944 9 11.917 12 5.973-3 10.951-6.341 11.917-12 .603-3.53-2.174-7.572-5.718-7.96z",className:"jsx-f312f1244b25153c"})}),!x&&k&&(0,a.jsx)("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:"#d01a62",fontSize:"10px",fontWeight:"bold",pointerEvents:"none",zIndex:1},className:"jsx-f312f1244b25153c",children:"+"}),(0,a.jsx)(r(),{id:"f312f1244b25153c",children:"@-webkit-keyframes heartPulse{0%,100%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@-moz-keyframes heartPulse{0%,100%{-moz-transform:scale(1);transform:scale(1)}50%{-moz-transform:scale(1.2);transform:scale(1.2)}}@-o-keyframes heartPulse{0%,100%{-o-transform:scale(1);transform:scale(1)}50%{-o-transform:scale(1.2);transform:scale(1.2)}}@keyframes heartPulse{0%,100%{-webkit-transform:scale(1);-moz-transform:scale(1);-o-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);-moz-transform:scale(1.2);-o-transform:scale(1.2);transform:scale(1.2)}}"})]});return(0,a.jsxs)(a.Fragment,{children:[s?s(b,d(t),u,k):j,(0,a.jsx)(f,{show:g,onHide:()=>p(!1),image:t,isFavorited:d,setFavorite:m,onLikedChange:v})]})}},14884:function(e,t,i){i.d(t,{$:function(){return r}});var a=i(82785),s=i(67994);let r=async e=>{let t=await (0,a.uz)("".concat(i.g.serverUrl,"/images/lists"),e);return(null==t?void 0:t._id)&&(0,s.ry)("music"===e.type?"playlist_created":"list_created",{type:e.type}),t}},30901:function(e,t,i){i.d(t,{r:function(){return n}});var a=i(67294),s=i(33299),r=i(82785);let n=()=>{let{data:e}=(0,s.useSession)(),t=null==e?void 0:e.userId,n=(0,a.useCallback)(e=>!!e&&!!e.liked,[]),o=(0,a.useCallback)(async(e,a,s)=>{if(!e||!e.filename)return console.error("useFavorites: Invalid image object"),{shouldShowShareModal:!1,posted:!1};if(e.private&&(!t||e.userId!==t)||n(e)===a)return{shouldShowShareModal:!1,posted:!1};let o=!1,l=null;try{if(a){if(void 0!==e.likes&&(e.likes=(e.likes||0)+1),e.liked=!0,"undefined"!=typeof localStorage){let e=localStorage.getItem("likes");if(e){let t=parseInt(e);t%5==0&&(o=!0),localStorage.setItem("likes",String(t+1))}else localStorage.setItem("likes","1")}}else void 0!==e.likes&&(e.likes=Math.max(0,e.likes-1)),e.liked=!1;await (0,r.uz)("".concat(i.g.serverUrl,"/images/").concat(e.filename,"/").concat(a?"like":"dislike")),s&&s(e),window.dispatchEvent(new CustomEvent("favoritesChanged",{detail:{image:e,liked:a}}))}catch(t){console.error("Error setting favorite:",t),l=t,a?(void 0!==e.likes&&(e.likes=Math.max(0,e.likes-1)),e.liked=!1):(void 0!==e.likes&&(e.likes=(e.likes||0)+1),e.liked=!0),o=!1}return l?{shouldShowShareModal:o,posted:!1,error:l}:{shouldShowShareModal:o,posted:!0}},[n,t]),l=(0,a.useCallback)(async(e,t)=>{let i=!n(e);return await o(e,i,t)},[n,o]),c=(0,a.useCallback)(async(e,t)=>await o(e,!0,t),[o]),d=(0,a.useCallback)(async(e,t)=>await o(e,!1,t),[o]);return{isFavorited:n,setFavorite:o,toggleFavorite:l,like:c,dislike:d}}}}]);

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.