1_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[52],{MJc2:function(t,e,n){var a=n("KEM+");function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var i=n("ERkP"),c=n("8cHP").Link;t.exports=function(t){return i.createElement(t.route?c:"a",o(o({},t),{},{href:t.route||t.to||""}),t.children)}},gOGC:function(t,e,n){"use strict";n.r(e);var a=n("zygG"),r=n("zjfJ"),o=(n("sAyc"),n("fGyu")),i=n("QsI/"),c=n("9fIP"),s=n("MMYH"),u=n("K/z8"),l=n("sRHE"),d=n("8K1b"),p=n("cxan"),h=n("ERkP"),f=n.n(h),g=n("0D0S"),m=n.n(g),v=n("7xIC"),b=n.n(v),O=n("r4FT"),y=n("fN3Q"),w=n.n(y),j=n("tTwn"),_=n.n(j),D=n("QtE3"),T=n("MJc2"),P=n.n(T),E=n("uPMs"),S=n("iR2b"),k=n("mtjO"),z=n("Lm5w"),F=f.a.createElement;function C(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function M(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?C(Object(n),!0).forEach((function(e){Object(r.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function R(){var t,e,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,a,r,o){var s=a&&a.prototype instanceof c?a:c,u=Object.create(s.prototype);return L(u,"_invoke",function(n,a,r){var o,c,s,u=0,l=r||[],d=!1,p={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,c=0,s=t,p.n=n,i}};function h(n,a){for(c=n,s=a,e=0;!d&&u&&!r&&e<l.length;e++){var r,o=l[e],h=p.p,f=o[2];n>3?(r=f===a)&&(s=o[(c=o[4])?5:(c=3,3)],o[4]=o[5]=t):o[0]<=h&&((r=n<2&&h<o[1])?(c=0,p.v=a,p.n=o[1]):h<f&&(r=n<3||o[0]>a||a>f)&&(o[4]=n,o[5]=a,p.n=f,c=0))}if(r||n>1)return i;throw d=!0,a}return function(r,l,f){if(u>1)throw TypeError("Generator is already running");for(d&&1===l&&h(l,f),c=l,s=f;(e=c<2?t:s)||!d;){o||(c?c<3?(c>1&&(p.n=-1),h(c,s)):p.n=s:p.v=s);try{if(u=2,o){if(c||(r="next"),e=o[r]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,c<2&&(c=0)}else 1===c&&(e=o.return)&&e.call(o),c<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),c=1);o=t}else if((e=(d=p.n<0)?s:n.call(a,p))!==i)break}catch(e){o=t,c=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,r,o),!0),u}var i={};function c(){}function s(){}function u(){}e=Object.getPrototypeOf;var l=[][a]?e(e([][a]())):(L(e={},a,(function(){return this})),e),d=u.prototype=c.prototype=Object.create(l);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,L(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=u,L(d,"constructor",u),L(u,"constructor",s),s.displayName="GeneratorFunction",L(u,r,"GeneratorFunction"),L(d),L(d,r,"Generator"),L(d,a,(function(){return this})),L(d,"toString",(function(){return"[object Generator]"})),(R=function(){return{w:o,m:p}})()}function L(t,e,n,a){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}(L=function(t,e,n,a){function o(e,n){L(t,e,(function(t){return this._invoke(e,n,t)}))}e?r?r(t,e,{value:n,enumerable:!a,configurable:!a,writable:!a}):t[e]=n:(o("next",0),o("throw",1),o("return",2))})(t,e,n,a)}function I(t,e,n){return e=Object(l.a)(e),Object(u.a)(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,n||[],Object(l.a)(t).constructor):e.apply(t,n))}var A=m()().publicRuntimeConfig.PLATFORM,G=function(t){return F(D.EventCard,Object(p.a)({},t,{LinkComponent:P.a}))},x=function(t){t.events;var e=t.total,n=t.keyword,a=t.searchStartDate,r=n||a?'<p><a href="/eventi">Resetta la ricerca</a></p>':"",o=[n&&'<h1 style="text-align:center; margin-bottom: .5rem;">
1Hai cercato <strong>"'.concat(_()(n),'"</strong></h1>'),r&&r].filter((function(t){return t})).join(""),i=!!n&&e;return F(f.a.Fragment,null,F(D.FiltersResults,{total:i,message:o}))},K=function(t,e){var n=new Date(t+e);return"".concat(n.getFullYear(),"-").concat(n.getMonth()+1,"-").concat(n.getDate())},N=function(t,e){var n=[],a=t&&"1970-1-1"!==t?new Date(t).getTime():null,r=e&&"1970-1-1"!==e?new Date(e).getTime():null;return a&&r?(t=K(a,0),a&&r<a&&(r=a),e=K(r,0),n.push("date_to_show=".concat(t,",").concat(e,"|BETWEEN"))):(a&&(t=K(a,-864e5),n.push("date_to_show=".concat(t,"|GREATER"))),r&&(a&&r<a&&(r=a),e=K(r,864e5),n.push("date_to_show=".concat(e,"|LOWER")))),n.length>0?n.join("&"):"date_from=now"},B=function(t){function e(t){var n;return Object(c.a)(this,e),(n=I(this,e,[t])).state={currentPage:1,events:!1,showLoadMore:t.showLoadMore,temi:!1,idTema:!!t.idTema&&parseInt(t.idTema,10),filterTitle:"Tutti gli eventi",searchKeyword:t.searchKeyword||"",searchStartDate:t.searchStartDate||null,searchEndDate:t.searchEndDate||null,selectedOptions:t.selectedOptions||null,userPosition:!1,meta:{loading:!0},total:t.total},n.handleTemiClick=n.handleTemiClick.bind(n),n.search=n.search.bind(n),n.handleLoadMore=n.handleLoadMore.bind(n),n.updateResults=n.updateResults.bind(n),n.geolocate=n.geolocate.bind(n),n}return Object(d.a)(e,t),Object(s.a)(e,[{key:"componentDidMount",value:function(){this.setState({meta:{loading:!1}})}},{key:"handleTemiClick",value:function(t){var e=this,n=this.state,a=n.searchKeyword,r=n.searchStartDate,o=n.searchEndDate,i=n.selectedOptions,c="&date_from=now&limit=12";a||r||o||i?(c=[a&&"search=".concat(a),t&&"id_tema=".concat(t),N(r,o),i&&i.join("&")].filter((function(t){return t})),c="&".concat(c.join("&"))):c=t?"&id_tema=".concat(t):"",this.setState({idTema:t,currentPage:1,filterTitle:t?this.props.temi.find((function(e){return e.id===t})).tema:"Tutti gli eventi"}),Object(k.e)(c).then((function(t){return e.setState({events:t.data,showLoadMore:t.to<t.total},e.updateRoute)}))}},{key:"handleLoadMore",value:function(){var t=Object(i.a)(R().m((function t(){var e,n,a,r,i,c,s,u,l,d,p,h,f,g,m;return R().w((function(t){for(;;)switch(t.n){case 0:return e=this.state,n=e.currentPage,a=e.searchKeyword,r=e.idTema,i=e.startDate,c=e.endDate,s=e.selectedOptions,(a||r||i||c||s)&&(u=[a&&"search=".concat(a),r&&"id_tema=".concat(r),N(i,c),s&&s.join("&")].filter((function(t){return t})),u="&".concat(u.join("&"))),l=this.state.events||this.props.events,d=n+1,t.n=1,Object(k.e)("&limit=12&page=".concat(d).concat(u));case 1:p=t.v,h=p.data,f=p.current_page,g=p.to,m=p.total,this.setState({events:[].concat(Object(o.a)(l),Object(o.a)(h)),currentPage:f,showLoadMore:g<m});case 2:return t.a(2)}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"search",value:function(t){var e=this,n=t.selectedOptions,a=t.search,r=t.startDate,o=t.endDate,i=this.state.idTema;this.setState({selectedOptions:n,search:a,searchKeyword:a,searchStartDate:r,searchEndDate:o,meta:{loading:!0}});var c=[a&&"&search=".concat(a),i&&"id_tema=".concat(i),N(r,o),n&&n.map((function(t){var e=t.split("|");return e[1]?"".concat(e[0],"[]=").concat(e[1]):e[0]})).join("&")].filter((function(t){return!1!==t})).join("&");n&&n.length&&"geolocation"===n.find((function(t){return"geolocation"===t}))?this.geolocate((function(){var t=e.state.userPosition,i="".concat(c.replace("&geolocation",""),"&radius[coords]=").concat(parseFloat(t.lat).toFixed(2),",").concat(parseFloat(t.lng).toFixed(2),"&radius[distance]=100");e.updateResults(i,n,a,r,o)})):this.updateResults(c,n,a,r,o)}},{key:"geolocate",value:function(t){var e=this;navigator.geolocation?this.state.userPosition?t():navigator.geolocation.getCurrentPosition((function(n){e.setState({userPosition:{lat:n.coords.latitude,lng:n.coords.longitude}},(function(){t()}))})):alert("Geolocation is not supported by this browser.")}},{key:"updateRoute",value:function(){var t=function(t){var e,n=[];return t.searchKeyword&&n.push("s=".concat(t.searchKeyword)),t.selectedOptions&&t.selectedOptions.length&&n.push("selectedOptions=".concat(t.selectedOptions.map((function(t){var e=t.split("|");return e[1]?"".concat(e[0],"[]=").concat(e[1]):e[0]})).join(","))),t.idTema&&n.push("idTema=".concat(t.idTema)),t.searchStartDate&&"1970-1-1"!==t.searchStartDate&&n.push("startDate=".concat(t.searchStartDate)),t.searchEndDate&&"1970-1-1"!==t.searchEndDate&&n.push("endDate=".concat(t.searchEndDate)),(e=n.join("&")).length?"?".concat(e):""}(this.state);t&&b.a.replace({pathname:"/eventi"},"/eventi/".concat(t),{shallow:!0})}},{key:"updateResults",value:function(){var t=Object(i.a)(R().m((function t(e,n,a,r,o){var i,c,s,u,l;return R().w((function(t){for(;;)switch(t.n){case 0:return i=r?"":"date_from=now",t.n=1,Object(k.e)("".concat(e,"&orderby=date_to_show+&").concat(i));case 1:c=t.v,s=c.data,u=c.total,l=c.to,this.setState({events:s,total:u,searchKeyword:a,showLoadMore:l<u,searchStartDate:r,searchEndDate:o,hasSearchOptions:n.length>0,selectedOptions:n,meta:{loading:!1}},this.updateRoute);case 2:return t.a(2)}}),t,this)})));return function(e,n,a,r,o){return t.apply(this,arguments)}}()},{key:"render",value:function(){var t=this.props,e=t.temi,n=t.seo,a=t.title,r=t.eventsTargets,o=t.eventsSettori,i=this.state,c=i.idTema,s=i.showLoadMore,u=i.total,l=i.searchKeyword,d=i.hasSearchOptions,p=i.searchStartDate,h=i.searchEndDate,f=i.selectedOptions,g=i.meta,m=this.state.events||this.props.events,v=this.state.highlights||this.props.highlights,b=this.state.filterTitle||this.props.filterTitle,O=l&&l.length>0,y=p||h,j=v&&v.length>
10&&!O&&!d&&!y,_=e.filter((function(t){var e=t.id,n=t.fl_filtro;return!1===e||n}));return F(E.a,{seo:n},g&&g.loading&&F(D.Loading,null),F(D.Hero,{title:a,subtitle:"Per esperienze da non dimenticare",LinkComponent:P.a,backgroundImage:{url:"https://fai-website.imgix.net/uploads/2018/07/04134203/STE2317_Foto-Stefano-Crove_2016-C-FAI.jpg"},breadCrumbs:[["/","Home"],["/eventi","Eventi"]],height:"small"}),F(D.Background,{color:"grey"},F(D.TabsNavigation,{tabs:_.map((function(t){return{id:t.id,label:t.tema}})),selectedId:c,onTabClick:this.handleTemiClick}),F(D.FiltersBar,{model:[{id:w()(),type:"dropdown",name:"Organizzatore",groups:[{options:o}]},{id:w()(),type:"dropdown",name:"Eventi rivolti a",groups:[{options:r}]},{id:w()(),type:"group",options:[{name:"Vicino a me",id:"geolocation",icon:!1}]}],searchPlaceholder:"Cerca un evento per titolo, luogo o localit\xe0",onChange:this.search,searchValue:l,datePicker:!0,startDate:p,endDate:h,selectedOptions:f.map((function(t){return t.replace("[]=","|")}))}),0===m.length?F(D.Padder,{size:"medium",align:"center"},"Non ci sono eventi in programma"):"",l&&x({events:m,total:u,keyword:l,searchStartDate:p,searchEndDate:h}),j&&F("div",null,!c&&F("div",null,F(D.Padder,{size:"small"},F(D.FasciaTitle,{title:"Eventi in evidenza",cta:""})),F(D.EventsGrid,{samesize:"true",cards:v.map(S.a),CardComponent:G,highlights:!0}))),m.length>0&&F(D.Padder,{size:"small"},F(D.FasciaTitle,{title:b,cta:""})),p&&!l&&x({events:m,total:u,keyword:l,searchStartDate:p,searchEndDate:h}),m.length>0&&F(D.EventsGrid,{samesize:"true",cards:m.map(S.a),CardComponent:G,vertical:!0}),s&&m.length>0&&F(D.Padder,{size:"medium"},F(D.Button,{centered:!0,onClick:this.handleLoadMore},"Carica Altri Eventi")),F(D.Padder,{size:"medium".concat(s?" o-no-padding-top":"")},F(D.Wrapper,{size:"small"},F("p",{style:{textAlign:"center",fontStyle:"italic",padding:"0 1rem"}},"Il calendario \u201cEventi nei Beni del FAI 2026\u201d \xe8 reso possibile grazie al fondamentale sostegno di",F("strong",null," Ferrarelle"),", Partner degli eventi istituzionali e Acqua Ufficiale della Fondazione, e al prezioso contributo di",F("strong",null," Pirelli")," , accanto al FAI dal 2005, che rinnova per il quattordicesimo anno consecutivo la sua storica vicinanza all'iniziativa; due sinergie pluriennali strategiche e virtuose, da sempre fondate su medesimi obiettivi e valori, che si sono consolidate negli anni con la realizzazione di numerosi progetti. Si ringrazia anche ",F("strong",null," Mitsubishi Electric")," , al fianco del FAI da anni, che dal 2025 ha scelto di rinnovare e rafforzare il proprio impegno con un sostegno ancora pi\xf9 significativo.\u202f Grazie anche a ",F("strong",null,"Coop Lombardia"),", sponsor degli Eventi nei Beni FAI della Lombardia.")))),F(D.FasciaNewsletterApp,null),F(D.FasciaSupporto,null))}}],[{key:"getInitialProps",value:function(){var t=Object(i.a)(R().m((function t(e){var n,r,i,c,s,u,l,d,p,h,f,g,m,v,b;return R().w((function(t){for(;;)switch(t.n){case 0:return n=e.query,r=n.s,i=n.idTema,c=n.startDate,s=n.endDate,u=n.selectedOptions,l="",(r||i||c||s||u)&&(l=[r&&"search=".concat(r),i&&"id_tema=".concat(i),N(c,s),u&&u.split(",").join("&")].filter((function(t){return t})),l="&".concat(l.join("&"))),l="&date_from=now&limit=12&orderby=date_to_show+".concat(l),t.n=1,Object(k.e)(l);case 1:if(d=t.v,!(r||c||s||u)){t.n=2;break}b=null,t.n=4;break;case 2:return t.n=3,Object(k.a)("&limit=4&display_order_evidenza=null|NOT&orderby=display_order_evidenza+");case 3:b=t.v;case 4:return p=b,t.n=5,O.a.get("".concat(A,"/eventi/temi?limit=100")).then((function(t){return t.data.data})).then((function(t){return t.filter((function(t){return 14!==t.id}))}));case 5:return h=t.v,t.n=6,Object(k.d)().then((function(t){return t.map((function(t){return M(M({},t),{},{name:t.target,id:"id_target|".concat(t.id)})}))}));case 6:return f=t.v,t.n=7,Object(k.c)().then((function(t){return t.map((function(t){return M(M({},t),{},{name:t.settore,id:"id_settore|".concat(t.id)})}))}));case 7:return g=t.v,v={title:m="Scopri gli eventi proposti dal FAI in tutta Italia",description:"Mostre, gite culturali, laboratori per bambini e tanto altro:
1scopri il ricco calendario di eventi proposti dal FAI in tutta Italia.",ogImage:"https://fai-website.imgix.net/uploads/2017/09/16142549/sito_eventifoto.jpg"},t.a(2,{events:d.data,total:d.total,showLoadMore:d.to<d.total,highlights:p,seo:v,title:m,temi:[{id:!1,tema:"Tutti"}].concat(Object(o.a)(h)),eventsTargets:f,eventsSettori:g,searchKeyword:r,idTema:i,searchStartDate:c,searchEndDate:s,selectedOptions:u?u.split(","):[],query:Object.entries(n).map((function(t){var e=Object(a.a)(t,2),n=e[0],r=e[1];return"".concat(n,"=").concat(r)})).join("&")})}}),t)})));return function(e){return t.apply(this,arguments)}}()}])}(h.Component);e.default=Object(z.b)(B)},iR2b:function(t,e,n){"use strict";var a=n("gc+n");e.a=function(t){if("undefined"===typeof t)return{};var e=t.date_to_show,n=t.dt_inizio,r=t.dt_fine,o=t.titolo,i=t.luogo,c=t.url_landing_page,s=e,u=function(t){var e=t.background_type;return"I"===e?"fullImg":"B"===e?"white":"V"===e?"green":void 0}(t),l=new Date(s).toString()===new Date((new Date).setHours(0,0,0,0)).toString();return{category:t.tema?t.tema.tema:"",title:o,dateFrom:Object(a.c)(n),dateTo:Object(a.c)(r),isToday:l,exactDate:s,exactDay:Object(a.d)(s),exactMonth:Object(a.e)(s),info:[t.owner&&t.owner.toUpperCase(),i?i.localita_web:""].join("<br />"),link:"/eventi/".concat(t.slug),hasLanding:c,thumbnail:{image:{url:t.media[0]&&t.media[0].url}},backgroundType:u}}},mtjO:function(t,e,n){"use strict";n.d(e,"e",(function(){return c})),n.d(e,"d",(function(){return u})),n.d(e,"c",(function(){return l})),n.d(e,"f",(function(){return s})),n.d(e,"b",(function(){return d}));var a=n("r4FT"),r=n("0D0S"),o=n.n(r)()().publicRuntimeConfig.PLATFORM,i="eventi?with=content,alert,related,settore,news,tema,tipologia,categoria,media,luogo,luogo.regione,luogo.provincia&limit=150",c=function(t){return a.a.get("".concat(o,"/").concat(i).concat(t)).then((function(t){return t.data}))},s=function(t){return a.a.get("".concat(o,"/ldc/eventi/?with=calendar,luogo,luogo.ldc").concat(t||"")).then((function(t){return t.data}))},u=function(){return a.a.get("".concat(o,"/").concat("eventi/target")).then((function(t){return t.data.data}))},l=function(){return a.a.get("".concat(o,"/").concat("eventi/settori?fl_filtro=true")).then((function(t){return t.data.data}))},d=function(t,e){var n="";null!==t&&void 0!==t&&t.length&&(n="&search=".concat(t[0].toLowerCase()));var r="";return e&&(r="&ownersmodel=".concat(e.filter((function(t){return 0!==t})).join(","))),a.a.get("".concat(o,"/").concat(i,"&date_from=now&orderby=date_to_show+").concat(n).concat(r)).then((function(t){return t.data.data}))};e.a=function(t){return a.a.get("".concat(o,"/").concat(i).concat(t)).then((function(t){return t.data.data}))}},rjqV:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/eventi",function(){return n("gOGC")}])}},[["rjqV",1,0,5,7,3,2,6,4,8,9,10,11,13,12,15,14,16,19]]]);
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.