PageSourceSearch

https://objetivosierranevada.es/_next/static/chunks/pages/jurado/votaciones-14cf63b81e8c5938.js

js objetivosierranevada.es collected 2026-10-08 14:42:32 UTC 10,639 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[783],{8165:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/jurado/votaciones",function(){return n(35373)}])},77283:function(e,t,n){"use strict";n.d(t,{U:function(){return h}});var a=n(85893),r=n(67294),o=n(88078),i=n(16628),s=n(9974),c=n(83965),l=n(11775),d=n(29902),u=n(77804),x=n(86810);let h=e=>{let{id:t,title:n,display:h=!0}=e,{openLightbox:p}=(0,x.ev)(),m=(0,r.useRef)(null),g=(0,u.S1)(m,{}),[f,j]=(0,r.useState)(!1),[y,v]=(0,r.useState)(void 0),[S,b]=(0,r.useState)(void 0),[Z,w]=(0,r.useState)(!1),P=async e=>{let n="image"===e?d.g.protectedPhotoEntryImage:d.g.protectedPhotoEntryThumbnail,a=await (0,l.k)(),r=await a.get(n(t),{responseType:"blob"}),o=new Blob([r.data],{type:"image/jpeg"}),i=URL.createObjectURL(o);return i},C=async()=>{let e=await P("image");return b(e),e},_=async()=>{let e=await P("thumbnail");v(e)},E=async()=>{if(!Z){if(S){p(S,n);return}w(!0),await C().then(e=>{e?p(e,n):y&&p(y,n)}).finally(()=>{w(!1)})}};return((0,r.useEffect)(()=>{(null==g?void 0:g.isIntersecting)?j(!0):j(!1)},[g]),(0,r.useEffect)(()=>{f&&!y&&_()},[f]),y)?(0,a.jsx)(i.Z,{in:h,timeout:500,children:(0,a.jsx)(s.Z,{sx:{display:h?"block":"none"},onClick:E,children:(0,a.jsx)(c.Z,{sx:{height:{xs:180,sm:200,md:220,lg:250,xl:280}},image:y||"",title:n})})}):(0,a.jsx)(o.Z,{ref:m,sx:{height:{xs:180,sm:200,md:220,lg:250,xl:280}},variant:"rectangular"})}},85581:function(e,t,n){"use strict";n.d(t,{z:function(){return z}});var a=n(85893),r=n(67294),o=n(66242),i=n(9974),s=n(86886),c=n(87462),l=n(63366),d=n(86010),u=n(94780),x=n(90948),h=n(71657),p=n(98216),m=n(1588),g=n(34867);function f(e){return(0,g.Z)("MuiIcon",e)}(0,m.Z)("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);let j=["baseClassName","className","color","component","fontSize"],y=e=>{let{color:t,fontSize:n,classes:a}=e,r={root:["root","inherit"!==t&&`color${(0,p.Z)(t)}`,`fontSize${(0,p.Z)(n)}`]};return(0,u.Z)(r,f,a)},v=(0,x.ZP)("span",{name:"MuiIcon",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${(0,p.Z)(n.color)}`],t[`fontSize${(0,p.Z)(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,fontSize:({inherit:"inherit",small:e.typography.pxToRem(20),medium:e.typography.pxToRem(24),large:e.typography.pxToRem(36)})[t.fontSize],color:({primary:(e.vars||e).palette.primary.main,secondary:(e.vars||e).palette.secondary.main,info:(e.vars||e).palette.info.main,success:(e.vars||e).palette.success.main,warning:(e.vars||e).palette.warning.main,action:(e.vars||e).palette.action.active,error:(e.vars||e).palette.error.main,disabled:(e.vars||e).palette.action.disabled,inherit:void 0})[t.color]})),S=r.forwardRef(function(e,t){let n=(0,h.Z)({props:e,name:"MuiIcon"}),{baseClassName:r="material-icons",className:o,color:i="inherit",component:s="span",fontSize:u="medium"}=n,x=(0,l.Z)(n,j),p=(0,c.Z)({},n,{baseClassName:r,color:i,component:s,fontSize:u}),m=y(p);return(0,a.jsx)(v,(0,c.Z)({as:s,className:(0,d.Z)(r,"notranslate",m.root,o),ownerState:p,"aria-hidden":!0,ref:t},x))});S.muiName="Icon";var b=n(98456),Z=n(11775),w=n(29902),P={src:"/_next/static/media/video_icon.7f1c635a.svg",height:100,width:100,blurWidth:0,blurHeight:0},C=n(25675),_=n.n(C),E=n(82010),V=n.n(E);let z=e=>{let{id:t,title:n,display:i=!0}=e,[s,c]=(0,r.useState)(void 0),[l,d]=(0,r.useState)(!1),u=async()=>{let e=w.g.protectedPhotoEntryVideo,n=await (0,Z.k)(),a=await n.get(e(t),{responseType:"blob"}),r=new Blob([a.data],{type:"video/mp4"}),o=URL.createObjectURL(r);return o},x=async()=>{l||(d(!0),await h(),d(!1))},h=async()=>{let e=await u();return c(e),e};return s?(0,a.jsx)(o.Z,{sx:{height:{xs:180,sm:200,md:220,lg:250,xl:280},width:"100%",boxShadow:1},children:(0,a.jsxs)("video",{width:"100%",height:"100%",controls:!0,children:[(0,a.jsx)("source",{src:s,type:"video/mp4"}),"Your browser does not support the video tag."]})}):(0,a.jsx)(k,{onPlayClick:x,isLoading:l})},k=e=>{let{onPlayClick:t,isLoading:n=!0}=e;return(0,a.jsx)(i.Z,{sx:{display:"block"},onClick:t,children:(0,a.jsx)(s.ZP,{container:!0,justifyContent:"center",alignItems:"center",sx:{height:{xs:180,sm:200,md:220,lg:250,xl:280}},children:(0,a.jsx)(s.ZP,{item:!0,xs:12,sx:{height:"100%",width:"100%"},children:(0,a.jsx)(S,{className:V().VideoPlayIconContainer,sx:{height:"100% !important",width:"100% !important"},children:n?(0,a.jsx)(s.ZP,{container:!0,justifyContent:"center",alignItems:"center",sx:{height:"100%"},children:(0,a.jsx)(b.Z,{color:"inherit",size:60})}):(0,a.jsx)(_(),{className:V().VideoPlayIcon,src:P,alt:"video icon"})})})})})}},35373:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return O}});var a=n(85893),r=n(86886),o=n(15861),i=n(16677),s=n(11775),c=n(67294),l=n(95718),d=n(91842),u=n(33299),x=n(29902),h=n(78672),p=n(66242),m=n(62023),g=n(78445),f=n(69661),j=n(34386),y=n(93946),v=n(77283),S=n(94953),b=n(27171),Z=n(62244),w=n(72505),P=n(6714),C=n(72450),_=n(85581);let E=e=>{let{photoEntry:t}=e,{openAlertDialog:n}=(0,b.bl)(),[r,o]=(0,c.useState)(!1),i=e=>{n("Error al enviar voto",e,"error","Entendido")},l=async e=>{let n=await (0,s.k)(),a=await n.post(x.g.juryVote,{photo_entry:t.id,score:e}).then(e=>!0).catch(e=>{try{let t=Z.eS.drfErrorsToArray(e);i(t[0].message)}catch(e){i("Error al enviar voto")}return!1});return a},d=()=>{o(!r)};return(0,a.jsxs)(p.Z,{sx:{width:"100%",boxShadow:1},children:[(0,a.jsx)(g.Z,{avatar:(0,a.jsx)(f.Z,{sx:{bgcolor:"secondary.main",fontSize:16},"aria-label":"recipe",children:t.id}),title:"Categor\xeda: ".concat(t.category),action:(0,a.jsx)(j.Z,{title:"Ver/ocultar detalles",placement:"bottom-end",children:(0,a.jsx)(y.Z,{"aria-label":"settings",onClick:d,children:r?(0,a.jsx)(C.Z,{}):(0,a.jsx)(P.Z,{})})})}
1),r&&(0,a.jsx)(w.C,{title:t.title,description:t.description}),t.is_video?(0,a.jsx)(_.z,{display:!r,id:t.id,title:"Video #".concat(t.id)}):(0,a.jsx)(v.U,{display:!r,id:t.id,title:"Imagen #".concat(t.id)}),(0,a.jsxs)(m.Z,{children:[(0,a.jsx)(S.V,{defaultValue:t.score?t.score:void 0,onVote:l}),(0,a.jsx)("div",{style:{flexGrow:1}})]})]})},V=e=>{let{photoEntries:t,photoEntriesFound:n=null,total:o,step:i}=e;return(0,a.jsx)(r.ZP,{container:!0,display:"flex",justifyContent:"center",spacing:2,children:(0,a.jsx)(r.ZP,{item:!0,xs:12,children:(0,a.jsx)(h.ZP,{sx:{width:"100%",px:2,m:0},columns:{xs:1,sm:2,md:3,xl:4},spacing:2,children:t.map(e=>(0,a.jsx)(r.ZP,{children:(0,a.jsx)(E,{photoEntry:e})},e.id))})})})};var z=n(28510),k=n(95591),I=n(33321);let N=(0,c.memo)(z.L),R=()=>{let[e,t]=(0,c.useState)([]),[n,h]=(0,c.useState)(!0),{data:p,status:m}=(0,u.useSession)(),[g,f]=(0,c.useState)(null),[j,y]=(0,c.useState)({}),[v,S]=(0,c.useState)(1),[b,Z]=(0,c.useState)(0),[w,P]=(0,c.useState)(0),[C,_]=(0,c.useState)(12),E=(0,c.useCallback)(async e=>{let t=await (0,s.k)();return t.get(e).then(e=>e.data)},[]),{data:z,error:R,isValidating:O,isLoading:T}=(0,k.ZP)(()=>{let e=new URLSearchParams(Object.entries(j).filter(e=>{let[,t]=e;return null!=t&&""!==t}).reduce((e,t)=>{let[n,a]=t;return{...e,[n]:a}},{}));return e.append("page_size",C.toString()),e.append("page",v.toString()),"".concat(x.g.juryPhotoEntries,"?").concat(e.toString())},E,{shouldRetryOnError:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}),L=e=>{S(e)};(0,c.useEffect)(()=>{let e=z?z.results:[],n=z?z.count:0;P(n),Z(Math.ceil(n/C)),t(e),z&&(e.length>0?f(!0):f(!1))},[z,C,v]),(0,c.useEffect)(()=>{S(1)},[j]);let M=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n={score:"",category:""};e&&(n.score="null"),t&&(n.category=t.toString()),y(n)},U=async(e,t)=>{await M(e,t)},[B,q]=(0,c.useState)(""),A=()=>{let t=[C*(v-1)+1,C*v>w?w:C*v],n=g?"Mostrando \n        ".concat(e.length,"\n        ").concat(t?" ("+t.join(" al ")+")":"","\n        ").concat(w?" de ".concat(w):""," resultados para la b\xfasqueda realizada."):null===g?"Realiza una b\xfasqueda para ver los resultados.":"No se han encontrado resultados para la busqueda realizada.";q(n)};(0,c.useEffect)(()=>{A()},[e,g,v,C,w]);let D=()=>{window.location.reload()};return((0,c.useEffect)(()=>{p&&"authenticated"===m?M():h(!1)},[m]),T&&!e)?(0,a.jsx)(i.u,{title:"Objetivo Sierra Nevada - Votaciones",pageDescription:"Votaciones del concurso de fotograf\xeda Objetivo Sierra Nevada",children:(0,a.jsx)(l.S4,{message:"Cargando im\xe1genes",fullScreen:!0})}):(0,a.jsx)(i.u,{title:"Objetivo Sierra Nevada - Votaciones",pageDescription:"Votaciones del concurso de fotograf\xeda Objetivo Sierra Nevada",children:(0,a.jsx)(d._n,{children:(0,a.jsxs)(r.ZP,{container:!0,display:"flex",justifyContent:"center",children:[(0,a.jsx)(r.ZP,{item:!0,xs:12,sx:{pt:4},children:T?(0,a.jsx)(l.S4,{message:"Cargando im\xe1genes",fullScreen:!0}):(0,a.jsxs)(r.ZP,{container:!0,display:"flex",justifyContent:"space-between",alignItems:"center",sx:{px:3},children:[(0,a.jsxs)(r.ZP,{item:!0,children:[(0,a.jsx)(o.Z,{variant:"h2",component:"h2",gutterBottom:!0,textAlign:"center",children:B}),(0,a.jsxs)(o.Z,{variant:"body1",component:"p",gutterBottom:!0,color:"primary",children:["\xbfNo aparece ninguna imagen? Prueba a reiniciar los filtros haciendo click ",(0,a.jsx)(l.zw,{href:"#",onClick:()=>D(),children:" aqu\xed"})]}),(0,a.jsxs)(o.Z,{variant:"body1",component:"p",gutterBottom:!0,color:"secondary",children:[(0,a.jsx)("strong",{children:"Importante: "}),"Para votar en la categor\xeda historica debes hacerlo a trav\xe9s de ",(0,a.jsx)(l.zw,{sx:{textDecoration:"underline !important"},color:"secondary",href:"/jurado/votaciones_histonevada",children:"este enlace"})]})]}),(0,a.jsx)(r.ZP,{item:!0,children:(0,a.jsx)(N,{onFilterChange:U})})]})}),(0,a.jsx)(r.ZP,{item:!0,xs:12,sx:{py:3},children:e.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(I.o,{currentPage:v,pages:b,setCurrentPage:L,containerProps:{display:"flex",justifyContent:"center",sx:{pt:4,px:{xs:3,sm:10,md:20}}}}),(0,a.jsx)(V,{photoEntries:e}),(0,a.jsx)(I.o,{currentPage:v,pages:b,setCurrentPage:L,containerProps:{display:"flex",justifyContent:"center",sx:{pt:4,px:{xs:3,sm:10,md:20}}}})]})})]})})})};var O=R},82010:function(e){e.exports={VideoPlayIcon:"ContestProtectedVideo_VideoPlayIcon__cbTff",VideoPlayIconContainer:"ContestProtectedVideo_VideoPlayIconContainer__mbb2r",VideoContainer:"ContestProtectedVideo_VideoContainer__nanrK"}}}
1,function(e){e.O(0,[662,714,234,157,231,398,857,677,450,774,888,179],function(){return e(e.s=8165)}),_N_E=e.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.