(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8382],{25617:(e,t,i)=>{Promise.resolve().then(i.bind(i,46117)),Promise.resolve().then(i.bind(i,36556)),Promise.resolve().then(i.t.bind(i,71667,23)),Promise.resolve().then(i.t.bind(i,18495,23)),Promise.resolve().then(i.t.bind(i,95437,23)),Promise.resolve().then(i.t.bind(i,72302,23)),Promise.resolve().then(i.t.bind(i,38173,23)),Promise.resolve().then(i.t.bind(i,231,23))},46117:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>n});var o=i(57437);i(77436);var a=i(4670);function n(e){let{gif:t,children:i,widthBtn:n}=e,{setIsHovering:r,setGif:l}=(0,a.j)();return(0,o.jsx)("div",{className:"".concat(n||"w-fit"),onMouseEnter:()=>{r(!0),t&&l(t)},onMouseLeave:()=>{r(!1),l("")},onClick:()=>{r(!1),l("")},children:i})}},51436:(e,t,i)=>{"use strict";i.d(t,{Z:()=>l});var o=i(57437);i(2265);var a=i(66648);let n=e=>/\.(jpg|jpeg|png|gif|bmp|webp)$/i.test(e),r=e=>/\.(mp4|webm|ogg|avi|mov|wmv|flv)$/i.test(e),l=e=>{let{url:t}=e;return t?n(t)?(0,o.jsx)(a.default,{className:"absolute top-0 left-0 w-full h-full object-cover object-center bg-black",src:t,alt:"loader",fill:!0,priority:!0,unoptimized:!0}):r(t)?(0,o.jsx)("video",{className:"absolute top-0 left-0 w-full h-full object-cover object-center bg-black box-border !m-0 !p-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,loading:"lazy",children:(0,o.jsx)("source",{src:t,type:"video/mp4"})}):(0,o.jsx)("p",{children:"Unsupported media type"}):null}},13937:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>c});var o=i(57437),a=i(76250),n=i(44954),r=i.n(n),l=i(52785),s=i(2265);function c(e){let{titolo:t,classe:i="",justify:n="center",delay:c=.1,startDelay:d=0}=e,u=t.split(" "),p=(0,s.useRef)(null),[v,h]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{let e=new IntersectionObserver(e=>{let[t]=e;h(t.isIntersecting)},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}},[]),(0,o.jsx)("div",{ref:p,className:r().container,style:{justifyContent:n},children:u.map((e,t)=>(0,o.jsx)("span",{className:r().inner,children:(0,o.jsx)(l.E.span,{variants:(0,a.f1)(c,d),initial:"initial",animate:v?"animate":"",custom:t,className:i,dangerouslySetInnerHTML:{__html:e+"&nbsp;"}})},t))})}},36556:(e,t,i)=>{"use strict";i.d(t,{default:()=>h});var o=i(57437);i(13937),i(11405);var a=i(66648),n=i(51436),r=i(2265),l=i(43393),s=i.n(l);let c=e=>{let{animationUrl:t,height:i="100%",width:a="100%"}=e,[n,l]=(0,r.useState)(null);return(0,r.useEffect)(()=>{(async()=>{try{let e=await fetch(t),i=await e.json();l(i)}catch(e){console.error("Error fetching Lottie animation:",e)}})()},[t]),(0,o.jsx)("div",{style:{height:i,width:a},children:n?(0,o.jsx)(s(),{animationData:n,style:{height:"100%",width:"100%"}}):""})};var d=i(87138),u=i(8837),p=i(46117);let v=e=>{let{videoUrl:t}=e,[i,n]=(0,r.useState)(!1);return(0,o.jsxs)(p.default,{children:[(0,o.jsx)("button",{onClick:()=>n(!0),children:(0,o.jsxs)("div",{className:"flex flex-row gap-3 items-center flex-nowrap px-4 py-2 rounded-full border border-white",children:[(0,o.jsx)(a.default,{src:"/icone/video.svg",alt:"showreel",width:100,height:100,className:"w-6 aspect-square"}),(0,o.jsx)("div",{className:"p text-white",children:"Guarda il video"})]})}),i&&(0,o.jsx)("div",{className:"fixed inset-0 flex items-center justify-center !z-[999] bg-black bg-opacity-75",children:(0,o.jsxs)("div",{className:"relative w-full aspect-video max-w-[70vw] p-0",children:[(0,o.jsx)(p.default,{children:(0,o.jsx)("button",{onClick:()=>n(!1),className:"absolute top-0 right-0 -mr-5 -mt-5 p-2 rounded-full aspect-square bg-white text-black hover:text-black",children:(0,o.jsx)("svg",{className:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})}),(0,o.jsx)("div",{className:"w-full h-full !rounded-lg overflow-hidden",children:(0,o.jsx)("iframe",{src:(0,u.EI)(t),allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"w-full h-full rounded-lg overflow-hidden",title:"video showreel"})})]})})]})};function h(e){var t,i,r,l,s,u,p,h,f,m,x,w,y,g,_,j,b;let{progetto:N}=e;return null===(i=N.acf)||void 0===i||null===(t=i.hero)||void 0===t||t.anno,(0,o.jsxs)("section",{className:"relative min-h-[100vh] h-[100vh] p-0 flex flex-col justify-between overflow-hidden",children:[(0,o.jsx)(n.Z,{url:null==N?void 0:null===(s=N.acf)||void 0===s?void 0:null===(l=s.hero)||void 0===l?void 0:null===(r=l.hero_bg)||void 0===r?void 0:r.url}),(0,o.jsx)("div",{className:"p-[2lvh] 2xl:p-[10lvh] h-[100vh] z-[91] flex flex-row justify-between items-end gap-4 w-full bg-[radial-gradient(circle_at_center,_var(--tw-gradient-stops))] from-black-hero ",children:(0,o.jsxs)("div",{className:"relative flex flex-col items-center justify-center w-full h-full gap-5 xl:gap-10",children:[(0,o.jsxs)("div",{className:"flex flex-col gap-10 items-center justify-center",children:[(0,o.jsx)(a.default,{alt:null===(p=N.acf)||void 0===p?void 0:null===(u=p.dettaglio)||void 0===u?void 0:u.cliente,src:null==N?void 0:null===(f=N.acf)||void 0===f?void 0:null===(h=f.hero)||void 0===h?void 0:h.logo_hero,width:400,height:400,className:"max-h-[130px] md:max-h-[130px] 2xl:max-h-[200px] max-w-[220px] md:max-w-[280px] 2xl:max-w-[320px] object-contain object-center ".concat((null==N?void 0:null===(x=N.acf)||void 0===x?void 0:null===(m=x.contenuto_progetto)||void 0===m?void 0:m.some(e=>"sezione_video"===e.acf_fc_layout&&e.video_url))&&"object-bottom")}),(null==N?void 0:null===(y=N.acf)||void 0===y?void 0:null===(w=y.contenuto_progetto)||void 0===w?void 0:w.some(e=>"sezione_video"===e.acf_fc_layout&&e.video_url))&&(0,o.jsx)(v,{videoUrl:null==N?void 0:null===(_=N.acf)||void 0===_?void 0:null===(g=_.contenuto_progetto)||void 0===g?void 0:g.find(e=>"sezione_video"===e.acf_fc_layout).video_url})]}),(0,o.jsxs)("div",{className:"absolute flex flex-col justify-center items-center gap-3 bottom-0 w-full",children:[(0,o.jsx)("div",{className:"pxl !leading-[1.2] text-white text-center text-balance w-full md:w-2/3 min-[1000px]:w-1/2 2xl:w-1/3 [text-shadow:_0px_0px_5px_rgb(0_0_0_/30%)]",children:null==N?void 0:null===(b=N.acf)||void 0===b?void 0:null===(j=b.hero)||void 0===j?void 0:j.descrizione_hero}),(0,o.jsx)("div",{className:"w-16 xl:w-16 -mx-4 overflow-hidden",children:(0,o.jsx)(d.default,{href:"#next",children:(0,o.jsx)(c,{animationUrl:"/lottie/scroll-down.json"})})})]})]})})]})}},76250:(e,t,i)=>{"use strict";i.d(t,{Ev:()=>l,G3:()=>o,GP:()=>a,IJ:()=>n,ZM:()=>d,cG:()=>c,f1:()=>r,gk:()=>s,jF:()=>p,kl:()=>u});let o={initial:{opacity:0,rotateX:90,translateY:80,translateX:-20},enter:e=>({opacity:1,rotateX:0,translateY:0,translateX:0,transition:{duration:.65,delay:.4+.1*e,ease:[.215,.61,.355,1],opacity:{duration:.35}}}),exit:{opacity:0,transition:{duration:.5,type:"linear",ease:[.76,0,.24,1]}}},a={open:{opacity:1,x:"0%",transition:{duration:.75,type:"tween",ease:[.76,0,.24,1]}},closed:{opacity:0,x:"100%",transition:{duration:.75,type:"tween",ease:[.76,0,.24,1]}}},n={open:{opacity:1,transition:{duration:.75,type:"tween",ease:[.76,0,.24,1]}},closed:{opacity:0,transition:{duration:.75,type:"tween",ease:[.76,0,.24,1]}}},r=(e,t)=>({initial:{y:"100%",transition:{duration:.75,type:"tween",ease:[.76,0,.24,1],delay:t}},animate:i=>({y:"-1%",transition:{duration:.75,delay:t+i*e,type:"tween",ease:[.76,0,.24,1]}})}),l={initial:{height:"0%",width:"0%",transition:{duration:.25,type:"tween",ease:[.76,0,.24,1]}},animate:{height:"100%",width:"100%",transition:{duration:.25,type:"tween",ease:[.76,0,.24,1]}},exit:{height:"0%",width:"0%",transition:{duration:.25,type:"tween",ease:[.76,0,.24,1]}}},s={initial:{opacity:0,y:20,transition:{duration:.25,type:"tween",ease:[.76,0,.24,1]}},animate:{opacity:1,y:0,transition:{duration:.25,delay:.25,type:"tween",ease:[.76,0,.24,1]}}},c={initial:{transform:"scale(0)"},animate:{transform:"scale(1)",transition:{duration:.25,type:"tween",ease:[.76,0,.24,1]}},exit:{transform:"scale(0)",transition:{duration:.25,type:"tween",ease:[.76,0,.24,1]}}},d={initial:{y:"-100%",transition:{duration:.5,type:"tween",ease:[.76,0,.24,1]}},animate:{y:"0%",transition:{duration:.5,type:"tween",ease:[.76,0,.24,1]}},exit:{y:"-100%",transition:{duration:.5,type:"tween",ease:[.76,0,.24,1]}}},u={initial:{y:"-100%",opacity:0},animate:{y:"0%",opacity:1,transition:{duration:.5,type:"tween",ease:[.76,0,.24,1]}},exit:{y:"-100%",opacity:0,transition:{duration:.5,type:"tween",ease:[.76,0,.24,1]}}},p={initial:{y:"0%",opacity:0},animate:{y:"0%",opacity:1,transition:{duration:.3,type:"tween",ease:[.76,0,.24,1]}},exit:{y:"0%",opacity:0,transition:{duration:.3,type:"tween",ease:[.76,0,.24,1]}}}},8837:(e,t,i)=>{"use strict";async function o(e){let t=await fetch("".concat("https://cms.redmango.agency/wp-json/wp/v2/","pacchetto?_embed=true&slug=").concat(e),{revalidate:30});if(!t.ok)throw Error("Failed to fetch data");return function e(t){if(Array.isArray(t))return t.map(e);if("object"==typeof t&&null!==t){let i={};for(let o in t)t.hasOwnProperty(o)&&(i[o]=e(t[o]));return i}return"string"==typeof t?t.replace(/https:\/\/cms\.redmango\.agency/g,"https://redmango.agency"):t}(await t.json())}function a(e){return null==e?void 0:e.replaceAll("https://www.youtube.com/watch?v=","https://www.youtube.com/embed/")}function n(e){return e.replace(/https:\/\/cms\.redmango\.agency(?!.*\.(jpg|jpeg|png|gif|mp4|mov|avi))/g,"")}function r(e){return null==e?void 0:e.replaceAll("<p>",'<span className="serviceTag">').replaceAll("</p>","</span>").replaceAll(",",'</span><span className="serviceTag">')}i.d(t,{EI:()=>a,YL:()=>o,yD:()=>r,yc:()=>n})},4670:(e,t,i)=>{"use strict";i.d(t,{CursorProvider:()=>r,j:()=>l});var o=i(57437),a=i(2265);let n=(0,a.createContext)(),r=e=>{let{children:t}=e,[i,r]=(0,a.useState)(!1),[l,s]=(0,a.useState)(!1),[c,d]=(0,a.useState)(!1),[u,p]=(0,a.useState)("");return(0,o.jsx)(n.Provider,{value:{isHovering:i,setIsHovering:r,isHero:l,setIsHero:s,isDraggable:c,setIsDraggable:d,gif:u,setGif:p},children:t})},l=()=>(0,a.useContext)(n)},77436:()=>{},95437:e=>{e.exports={progetto:"progettoDaSottoporre_progetto__Dcjs5",row:"progettoDaSottoporre_row__3qVD3",col:"progettoDaSottoporre_col__HULBI",bottom:"progettoDaSottoporre_bottom__HkG3n"}},44954:e=>{e.exports={container:"titolo_container__XDd_K",inner:"titolo_inner___lhPJ"}},72302:e=>{e.exports={desc:"descrizione_desc__SFoUD"}},18495:e=>{e.exports={dettagli:"dettagli_dettagli__EZtcV",main:"dettagli_main__XnPgJ",categorie:"dettagli_categorie__KbbJD"}},11405:e=>{e.exports={hero:"hero_hero__PWpX8",intro:"hero_intro__jUrKJ",databutton:"hero_databutton__InZfB"}},71667:()=>{}},e=>{var t=t=>e(e.s=t);e.O(0,[3687,6751,7025,7307,2785,3419,231,8173,1431,1451,4363,7495,8960,9011,580,1410,1744],()=>t(25617)),_N_E=e.O()}]);