1(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[15],{"/rPB":function(t,n,e){"use strict";e.r(n),e.d(n,"pushNotification",(function(){return a})),e.d(n,"closeNotification",(function(){return o})),e.d(n,"removeNotification",(function(){return c}));var r=e("Fn0h"),a=function(t){var n=t.message,e=void 0===n?"lorem ipsum":n,a=t.id,o=void 0===a?parseInt(Math.random()*Math.random()*1e3,10):a;return{type:r.b,payload:{message:e,id:o}}},o=function(t){var n=t.id;return{type:r.a,payload:{id:n}}},c=function(t){var n=t.id,e=t.type;return{type:r.c,payload:{id:n},meta:{type:e}}}},"4k0w":function(t,n,e){"use strict";var r=e("zjfJ"),a=e("zygG");function o(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function c(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?o(Object(e),!0).forEach((function(n){Object(r.a)(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):o(Object(e)).forEac
1h((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}n.a=function(t){return t?t.split("; ").map((function(t){var n=t.split("="),e=Object(a.a)(n,2),o=e[0],c=e[1];return Object(r.a)({},o,c)})).reduce((function(t,n){return c(c({},t),n)}),{}):{}}},CRdG:function(t,n,e){"use strict";e.d(n,"b",(function(){return r})),e.d(n,"c",(function(){return a})),e.d(n,"a",(function(){return o}));var r="COMITATI_REQUEST",a="COMITATI_SET",o="COMITATI_FAILED"},Fn0h:function(t,n,e){"use strict";e.d(n,"b",(function(){return r})),e.d(n,"a",(function(){return a})),e.d(n,"c",(function(){return o}));var r="NOTIFICATION_PUSH",a="NOTIFICATION_CLOSE",o="NOTIFICATION_REMOVE"},NFNr:function(t,n,e){"use strict";var r=e("9fIP"),a=e("MMYH"),o=e("zjfJ"),c=e("ERkP"),i=e.n(c),u=(e("pJ8o"),e("QtE3")),d=e("i8i4"),s=e("0D0S"),f=e.n(s),l=i.a.createElement,h=(e("lon2"),f()().publicRuntimeConfig),p=h.CLIENT_ID,g=h.OAUTH_DOMAIN,m=h.MYFAI_URL||"",v={},O=null,b="";b="attachEvent"===(window.addEventListener?"addEventListener":"attachEvent")?"onmessage":"message",window.addEventListener(b,(function(t){t.origin===v.domain&&null!==O&&(t.data.loginDate=new Date,t.data.expirationDate=new Date(t.data.loginDate.getTime()+Number(t.data.expires_in)),localStorage.setItem(v.storageName,JSON.stringify(t.data)),O(t.data.access_token))}),!1);var y=function(){var t=localStorage.getItem(v.storageName);if(t){var n=JSON.parse(t);return new Date(n.expirationDate).getTime()>(new Date).getTime()?n.access_token:(localStorage.removeItem(v.storageName),null)}return null},j=function(){return new Promise((function(t,n){O=t;var e=encodeURIComponent(window.location.href);window.location.href="".concat(m,"/myfai/login?returnUrl=").concat(e)}))},A=new(function(){return Object(a.a)((function t(n){var e=this;Object(r.a)(this,t),Object(o.a)(this,"isBrowserSupportedForLogin",(function(){var t=navigator.userAgent||navigator.vendor||window.opera;return!(t.indexOf("FB_IAB")>-1||t.indexOf("FBAN")>-1||t.indexOf("FBAV")>-1)||(e.renderModal("#overlay-container",{message:'Per effettuare il login apri il menu in alto a destra e clicca su "Apri in [...]" in modo da utilizzare il tuo browser predefinito.',id:"modal-overlay"}),!1)})),Object(o.a)(this,"renderModal",(function(t,n){return Object(d.render)(l(u.Modal,n),document.querySelector(t))}));var a={client_id:n.client_id,response_type:"token"};"id_referral"in n&&(a.id_referral=n.id_referral),"bag"in n&&(a.bag=n.bag);var c={popupUrl:"".concat(n.domain,"/oauth/authorize/"),logoutUrl:n.domain,query:a,popupTarget:"targetWindow",popupOptions:"toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=1200,height=800"};v=Object.assign({storageName:"faiOauth"},c,n)}),[{key:"getToken",value:function(){return y()}},{key:"login",value:function(){return j()}},{key:"logout",value:function(){return function(){if(localStorage.removeItem(v.storageName),document.cookie="FAI_auth=;Max-age=0;path=/;","undefined"!==typeof fetch)try{fetch("/api/auth/logout",{method:"POST",credentials:"include",keepalive:!0}).catch((function(){}))}catch(t){}window.location.href="".concat(m,"/myfai/login")}()}},{key:"getUser",value:function(){return new Promise((function(t,n){var e=y();fetch(v.domain+"/api/users/me",{method:"GET",mode:"cors",headers:{"Content-Type":"application/json",Authorization:"Bearer "+e}}).then((function(t){return t.json()})).then(t).catch(n)}))}},{key:"renewLogin",value:function(){return function(){var t=y();return t?Promise.resolve(t):j()}()}},{key:"setReferralId",value:function(t){return v.query.id_referral=t,this}},{key:"setBag",value:function(t){return v.query.bag=t,this}},{key:"addBag",value:function(t,n){return v.query.bag=v.query.bag||{},v.query.bag[t]=n,this}}])}())({id_referral:8,client_id:p,domain:g});n.a=A},OZdK:function(t,n,e){"use strict";e.r(n),e.d(n,"requestUser",(function(){return a})),e.d(n,"setUser",(function(){return o})),e.d(n,"userDelete",(function(){return c}));var r=e("802c"),a=function(t){return{type:r.b,payload:{tokenId:t}}},o=function(t){return{type:r.c,payload:{user:t}}},c=function(t){return{type:r.a,payload:{tokenId:t}}}},lon2:function(t,n){var e=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,escape).replace(/%20/g,"+")},r=function(t,n,a,o){return n=n||null,a=a||"&",o=o||null,t?Object.keys(t).map((function(c){var i,u,d=c;if(o&&(d=o+"["+d+"]"),"object"===typeof t[c]&&null!==t[c])i=r(t[c],null,a,d);else{n&&(u=d,d=!isNaN(parseFloat(u))&&isFinite(u)?n+Number(d):d);var s=t[c];s=(s=0===(s=!1===(s=!0===s?"1":s)?"0":s)?"0":s)||"",i=e(d)+"="+e(s)}return i})).join(a).replace(/[!'()*]/g,""):""};t.exports=r},mAD7:function(t,n,e){"use strict";e.d(n,"b",(function(){return s}));var r=e("zjfJ"),a=e("fGyu"),o=e("Fn0h");var c,i,u=function(t){return{id:t.id,message:t.message}},d=(c=[],i=Object(r.a)(Object(r.a)({},o.b,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;return[].concat(Object(a.a)(t),[u(n.payload)])})),o.c,(function(t,n){var e=n.payload.id,r=t.findIndex((function(t){return t.id===e}));
1return r<0?t:[].concat(Object(a.a)(t.slice(0,r)),Object(a.a)(t.slice(r+1)))})),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,n=arguments.length>1?arguments[1]:void 0;return i.hasOwnProperty(n.type)?i[n.type](t,n):t});n.a=d;var s=function(t){return t.notifications}},pqH2:function(t,n,e){"use strict";e.d(n,"c",(function(){return g})),e.d(n,"l",(function(){return m})),e.d(n,"m",(function(){return v})),e.d(n,"u",(function(){return O})),e.d(n,"k",(function(){return b})),e.d(n,"j",(function(){return y})),e.d(n,"t",(function(){return j})),e.d(n,"A",(function(){return A})),e.d(n,"x",(function(){return w})),e.d(n,"y",(function(){return _})),e.d(n,"v",(function(){return I})),e.d(n,"z",(function(){return k})),e.d(n,"w",(function(){return E})),e.d(n,"B",(function(){return T})),e.d(n,"o",(function(){return R})),e.d(n,"n",(function(){return N})),e.d(n,"h",(function(){return D})),e.d(n,"p",(function(){return S})),e.d(n,"g",(function(){return F})),e.d(n,"q",(function(){return L})),e.d(n,"C",(function(){return C})),e.d(n,"a",(function(){return z})),e.d(n,"b",(function(){return M})),e.d(n,"e",(function(){return B})),e.d(n,"f",(function(){return U})),e.d(n,"i",(function(){return q})),e.d(n,"r",(function(){return V})),e.d(n,"d",(function(){return G})),e.d(n,"s",(function(){return x}));e("QsI/");var r=e("zygG"),a=e("zjfJ"),o=e("r4FT"),c=e("0D0S"),i=e.n(c);e("ezIv");function u(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function d(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?u(Object(e),!0).forEach((function(n){Object(a.a)(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):u(Object(e)).forEac
1h((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var s=i()().publicRuntimeConfig,f=s.PLATFORM,l=s.LARAVEL,h=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t?d(d({},n),{},{"X-Captcha-Token":t}):n},p=function(t,n){if("object"!==typeof n||"string"!==typeof t)throw new Error("Params should be an object");var e=Object.entries(n).map((function(t){var n=Object(r.a)(t,2),e=n[0],a=n[1];return"".concat(e,"=").concat(Array.isArray(a)?a.join(","):a)})).join("&"),a=t.replace(/^\/+|\/+$/g,"");return"".concat(f,"/").concat(a,"?").concat(e)},g=function(t,n){var e=p(t,n);return o.a.get(e).then((function(t){return t.data}))},m=function(t){var n=t.page,e=t.query,r=t.limit,a=t.string,c=t.tipologiaId,i=r?"&limit=".concat(r):"",u=n?"&page=".concat(n):"",d=c?"&tipologia.id[]=".concat(c):"",s=e?"&".concat(e):"";return s=s.replace("&&","&"),a&&(s+=a),o.a.get("".concat(f,"/luoghi/?with=").concat(["ldc","ldc.media","news","rank","classifiche","tipologia","ldc_tipologia","comune","media","provincia","regione","eventi"].join(","),"&has=ldc_tipologia,ldc").concat(u).concat(s).concat(d).concat(i)).then((function(t){return t.data}))},v=function(t){var n=t.page,e=t.query;return o.a.get("".concat(f,"/luoghi/?with=news,rank,ldc,ldc.media,ldc.censimento_intervento&has=tipologia,ldc,ldc.censimento_intervento&tipologia.fl_ldc=1&ldc.fl_intervento=1&limit=27&page=").concat(n,"&").concat(e||"")).then((function(t){return t.data}))},O=function(t){var n=t.page,e=t.queryTotal,r=t.total;return o.a.get("".concat(f,"/luoghi/?with=news,rank,ldc,ldc.media,ldc.censimento_intervento,ldc.stato_intervento,ldc.tipo_intervento&has=tipologia,ldc,ldc.censimento_intervento&tipologia.fl_ldc=1&ldc.fl_intervento=1&limit=").concat(r,"&page=").concat(n,"&").concat(e||"")).then((function(t){return t.data}))},b=function(t){return o.a.get("".concat(f,"/ldc/eventi/?with=calendar,luogo,luogo.ldc").concat(t||"")).then((function(t){return t.data}))},y=function(t){var n=t.slug,e=t.id,r="".concat(n?"slug=".concat(n):"").concat(e&&n?"&":"").concat(e?"id=".concat(e):"");return m({query:r}).then((function(t){return t.data[0]}))},j=function(){return o.a.get("".concat(f,"/distinct/ldc/tipologie?limit=100")).then((function(t){return t.data.data})).catch((function(t){return[]}))},A=function(t){var n=t.data,e=t.captchaToken;return Object(o.a)({method:"post",url:"".concat(f,"/luoghi"),data:n,headers:h(e)})},w=function(t){var n=t.data,e=t.id,r=t.captchaToken;return Object(o.a)({method:"patch",url:"".concat(f,"/luoghi/").concat(e),data:n,headers:h(r)})},_=function(t){var n=t.data,e=t.captchaToken;return Object(o.a)({method:"post",url:"".concat(f,"/ldc/comitati"),data:n,headers:h(e)})},I=function(t){var n=t.data,e=t.id,r=t.captchaToken;return Object(o.a)({method:"patch",url:"".concat(f,"/ldc/comitati/").concat(e),data:n,headers:h(r)})},k=function(t){var n=t.data,e=t.captchaToken;return Object(o.a)({method:"post",url:"".concat(f,"/ldc/eventi"),data:n,headers:h(e)})},E=function(t){var n=t.data,e=t.id,r=t.captchaToken;return Object(o.a)({method:"patch",url:"".concat(f,"/ldc/eventi/").concat(e),data:n,headers:h(r)})},T=function(t){var n=t.data,e=t.captchaToken;return Object(o.a)({method:"post",url:"".concat(f,"/users/me/ldc/firme"),data:n,headers:h(e)})},R=function(t){var n=t.tokenId;return o.a.get("".concat(f,"/users/me/ldc/firme?with=*&limit=1000&orderby=id-"),{headers:{Authorization:"Bearer ".concat(n)}}).then((function(t){return t.data.data}))},N=function(t){return o.a.get("".concat(f,"/luoghi?with=ldc,ldc.media&has=ldc&radius[coords]=").concat(parseFloat(t.lat).toFixed(2),",").concat(parseFloat(t.lng).toFixed(2),"&radius[distance]=").concat(t.distance,"&limit=4&id=4554|NOT")).then((function(t){return t.data.data}))},D=function(t){return o.a.get("".concat(f,"/ldc/eventi/").concat(t)).then((function(t){return t.data.data})).then((function(t){return t&&t[0]}))},P=function(t){if(!t)return t;var n=t.replace("\u2019","'");return n="MONZA E BRIANZA"===n||"MONZA-E-BRIANZA"===n?"MONZA E DELLA BRIANZA":"GALLURA-NORD-EST-SARDEGNA"===n||"GALLURA NORD-EST SARDEGNA"===n?"GALLURA NORD-EST SARDEGNA":"MASSA CARRARA"===n||"MASSA-CARRARA"===n?"MASSA-CARRARA":n.replaceAll("-"," ")},S=function(t){return o.a.get("".concat(f,"/province?nome=*").concat(P(t),"*|LIKE")).then((function(t){return t.data.data}))}
1,F=function(t){return o.a.get("".concat(f,"/comuni?nome=*").concat(P(t),"*|LIKE&limit=999")).then((function(t){return t.data.data}))},L=function(t){return o.a.get("".concat(f,"/regioni?nome=*").concat(P(t),"*|LIKE")).then((function(t){return t.data.data}))},C=function(t){var n=t.file,e=t.tokenId,r=t.folder,a=void 0===r?"image":r,c=t.type,i=void 0===c?"image":c,u=new FormData;u.append(i,n);var d={"Access-Control-Allow-Origin":"*","Content-Type":"multipart/form-data"};return e&&(d.Authorization="Bearer ".concat(e)),Object(o.a)({method:"post",url:"".concat(l,"ldc/upload/").concat(a),headers:d,data:u}).then((function(t){return t.data}))},z={commitVote:function(t){var n=t.id,e=t.id_comitato,r=t.tokenId;return Object(o.a)({method:"post",url:"".concat(f,"/ldc/voti"),data:{id_luogo:n,id_comitato:e},headers:{Authorization:"Bearer ".concat(r)}})},commitPendingVote:function(t){var n=t.id_luogo,e=t.user,r=t.tokenId,a=t.captchaToken,c={};return r&&(c.Authorization="Bearer ".concat(r)),a&&(c["X-Captcha-Token"]=a),Object(o.a)({method:"post",url:"".concat(f,"/ldc/pendingVotes"),data:{id_luogo:n,user:e},headers:Object.keys(c).length>0?c:void 0}).then((function(t){return t.data})).then((function(t){return{status:t.status,message:t.message}})).catch((function(t){return t.response.data}))},fetchRemoteVotes:function(t){t.userId;var n=t.tokenId;return o.a.get("".concat(f,"/users/me/?with=voti"),{headers:{Authorization:"Bearer ".concat(n)}}).then((function(t){return t.data})).then((function(t){return t.voti})).catch((function(){return[]})).catch((function(t){return console.log("fetchRemoteVotesError",t)}))},fetchRemoteVotesForMyFai:function(t){var n=t.tokenId;return o.a.get("".concat(f,"/users/me?with=voti,ldc_user,ldc_user.pending_votes"),{headers:{Authorization:"Bearer ".concat(n)}}).then((function(t){return t.data})).then((function(t){return t.ldc_user.pending_votes})).catch((function(){return[]})).catch((function(t){return console.log("fetchRemoteVotesError",t)}))},fetchSettings:function(){return o.a.get("".concat(f,"/settings")).then((function(t){return t.data}))},fetchRemoteSocials:function(t){var n=t.tokenId;return o.a.get("".concat(f,"/users/me/friends?with=voti"),{headers:{Authorization:"Bearer ".concat(n)}}).then((function(t){return t.data})).then((function(t){return t.data})).catch((function(t){return console.log("fetchRemoteSocialsError",t)}))},fetchPendingVotes:function(t){var n=t.user,e=t.tokenId;return o.a.get("".concat(f,"/ldc/pendingVotes"),{headers:{"X-User":n,Authorization:"Bearer ".concat(e)}}).then((function(t){return t.data})).catch((function(){return[]})).catch((function(t){return console.log("fetchPendingVotesError",t)}))},resendEmail:function(t){var n=t.user;return o.a.get("".concat(f,"/ldc/users/resendEmail"),{headers:{"X-User":n}}).then((function(t){return t.data})).catch((function(){})).catch((function(t){return console.log("resendEmailError",t)}))},fetchComitati:function(t){var n=t.userId;return o.a.get("".concat(f,"/ldc/comitati?id_user=").concat(n)).then((function(t){return t.data})).then((function(t){return t.data}))}},M=function(t){return Object(o.a)({method:"post",url:"".concat(f,"/ldc/pendingVotes/confirmEmail"),data:t}).then((function(t){var n=t&&t.data||{},e=n.status||"success";return{ok:"success"===e||"already_confirmed"===e,status:e,reason:n.reason||null,message:n.message||null}})).catch((function(t){var n=t&&t.response&&t.response.data||{};return{ok:!1,status:n.status||"error",reason:n.reason||"unknown",message:n.message||null}}))},B=function(t){var n=p("ldc/comitati",{with:"luogo.ldc.media"});return o.a.get("".concat(n,"&").concat(t)).then((function(t){return t.data}))},U=function(t){var n=p("ldc/comitati",{with:["luogo.ldc.media","luogo.rank"],id:t});return o.a.get("".concat(n)).then((function(t){return t.data})).then((function(t){return t.data[0]}))},q=function(t){var n=p("ldc/eventi",{id:t,with:"calendar"});return o.a.get("".concat(n)).then((function(t){return t.data})).then((function(t){return t.data[0]}))},V=function(){return o.a.get("".concat(f,"/selezioni?fl_display_classifica_ldc=1&has=censimento_classifica&with=censimento_classifica")).then((function(t){return t.data.data}))},G=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return o.a.get("".concat(f,"/ldc/classifiche").concat(t)).then((function(t){return t.data.data}))},x=function(){return o.a.get("".concat(f,"/settings")).then((function(t){return t.data}))}},wUHy:function(t,n,e){"use strict";e.d(n,"b",(function(){return i}));var r=e("zjfJ"),a=e("CRdG");function o(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function c(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};
1n%2?o(Object(e),!0).forEach((function(n){Object(r.a)(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):o(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}n.a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{items:[]},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case a.b:return c(c({},t),{},{meta:{status:"LOADING"}});case a.c:return c(c({},t),{},{items:n.payload,meta:{status:"LOADED"}});case a.a:return c(c({},t),{},{meta:{status:"FAILED"}});default:return c({},t)}};var i=function(t){return t&&t.ldc&&t.ldc.comitati&&t.ldc.comitati.items}},wye4:function(t,n,e){"use strict";var r=e("r4FT"),a=e("0D0S"),o=e.n(a)()().publicRuntimeConfig.PLATFORM;n.a=function(t){return r.a.get("".concat(o,"/users/me"),{headers:{Authorization:"Bearer ".concat(t)}}).then((function(t){return t.data})).catch((function(t){return""}))}}}]);
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.