PageSourceSearch

https://www.confindustria.it/_next/static/chunks/0ethudrdngzwj.js

js confindustria.it collected 2026-09-24 08:36:37 UTC 42,954 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,856668,e=>{"use strict";var t=e.i(843476),s=e.i(271645),i=e.i(259687),a=e.i(174080);let r=({isOpen:e,onClose:i,mapUrl:r,city:n})=>{let[l,o]=(0,s.useState)(!1),[u,h]=(0,s.useState)(!1),[d,c]=(0,s.useState)(!1);return((0,s.useEffect)(()=>{o(!0)},[]),(0,s.useEffect)(()=>{if(e)c(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{h(!0)})}),document.body.style.overflow="hidden";else{h(!1);let e=setTimeout(()=>{c(!1)},500);return document.body.style.overflow="unset",()=>clearTimeout(e)}},[e]),(0,s.useEffect)(()=>{let t=e=>{"Escape"===e.key&&i()};return e&&document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[e,i]),d&&l)?(0,a.createPortal)((0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex",children:[(0,t.jsx)("div",{className:`absolute inset-0 bg-black/50 backdrop-blur-sm transition-opacity duration-500 ${u?"opacity-100":"opacity-0"}`,style:{transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)"},onClick:i}),(0,t.jsxs)("div",{className:`ml-auto relative w-full md:w-1/2 h-full bg-white shadow-none filter-none transform transition-all duration-500 ${u?"translate-x-0":"translate-x-full"}`,style:{boxShadow:"none",filter:"none",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)"},children:[(0,t.jsx)("button",{onClick:i,className:`absolute top-4 right-4 z-10 bg-white rounded-full p-2 hover:bg-gray-100 transition-all duration-300 ${u?"opacity-100 scale-100":"opacity-0 scale-90"}`,style:{transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDelay:u?"200ms":"0ms"},"aria-label":"Chiudi mappa",children:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6 text-gray-700",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,t.jsx)("iframe",{src:r,className:"w-full h-full",style:{border:0},allowFullScreen:"",loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",title:`Mappa ${n}`})]})]}),document.body):null};e.s(["default",0,({mapUrl:e,mapLink:a,city:n})=>
1{let[l,o]=(0,s.useState)(!1),[u,h]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{let e=()=>{h(window.innerWidth<768)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>{u?window.open(a,"_blank"):o(!0)},className:"block cursor-pointer hover:opacity-80 transition-opacity mb-4","aria-label":`Visualizza mappa ${n}`,children:(0,t.jsx)(i.default,{icon:"globe",className:"size-9"})}),(0,t.jsx)(r,{isOpen:l,onClose:()=>o(!1),mapUrl:e,city:n})]})}],856668)},327974,e=>{"use strict";var t=class extends Error{name="MeilisearchError"},s=class extends t{name="MeilisearchApiError";cause;response;constructor(e,t){super(t?.message??`${e.status}: ${e.statusText}`),this.response=e,void 0!==t&&(this.cause=t)}},i=class extends t{name="MeilisearchRequestError";constructor(e,t){super(`Request to ${e} has failed`,{cause:t})}},a=class extends t{name="MeilisearchRequestTimeOutError";cause;constructor(e,t){super(`request timed out after ${e}ms`),this.cause={timeout:e,requestInit:t}}},r=class extends t{name="MeilisearchTaskTimeOutError";cause;constructor(e,t){super(`timeout of ${t}ms has exceeded on task ${e} when waiting for it to be resolved.`),this.cause={taskUid:e,timeout:t}}};async function n(e){let t=e.getReader(),s=new TextDecoder,i="";for(;;){let{done:e,value:a}=await t.read();if(e)break;i+=s.decode(a,{stream:!0})}return i+s.decode()}var l=Symbol("<timeout>");function o(e,t){let{signal:s}=e,i=new AbortController;if(null!=s){let e=null;if(s.aborted)i.abort(s.reason);else{let t=()=>i.abort(s.reason);s.addEventListener("abort",t,{once:!0}),e=()=>s.removeEventListener("abort",t),i.signal.addEventListener("abort",e,{once:!0})}return()=>{if(s.aborted)return;let a=setTimeout(()=>i.abort(l),t),r=()=>{clearTimeout(a),null!==e&&i.signal.removeEventListener("abort",e)};return s.addEventListener("abort",r,{once:!0}),()=>{s.removeEventListener("abort",r),r()}}}return e.signal=i.signal,()=>{let e=setTimeout(()=>i.abort(l),t);return()=>clearTimeout(e)}}var u=class{#e;#t;#s;#i;constructor(e){let s=function(e){return e.endsWith("/")||(e+="/"),e}(function(e){return e.startsWith("https://")||e.startsWith("http://")?e:`http://${e}`}(e.host));try{this.#e=new URL(s)}catch(e){throw new t("The provided host is not valid",{cause:e})}this.#t={...e.requestInit,headers:function(e,t){let s="X-Meilisearch-Client",i="Meilisearch JavaScript (v0.59.0)",a="Content-Type",r="Authorization",n=new Headers(t);if(e.apiKey&&!n.has(r)&&n.set(r,`Bearer ${e.apiKey}`),n.has(a)||n.set(a,"application/json"),void 0!==e.clientAgents){let t=e.clientAgents.concat(i);n.set(s,t.join(" ; "))}else n.set(s,i);return n}(e,e.requestInit?.headers)},this.#s=e.httpClient,this.#i=e.timeout}#a(e,t){if(void 0===e&&void 0===t)return this.#t.headers;let s=new Headers(e);for(let[e,i]of(void 0===t||s.has("Content-Type")||s.set("Content-Type",t),this.#t.headers))s.has(e)||s.set(e,i);return s}#r({path:e,method:t,params:s,contentType:i,body:a,extraRequestInit:r}){let n=new URL(e,this.#e);return void 0!==s&&function(e,t){for(let[s,i]of Object.entries(t))null!=i&&e.set(s,Array.isArray(i)?i.join():i instanceof Date?i.toISOString():String(i))}(n.searchParams,s),{url:n,init:{method:t,body:void 0===i||"string"!=typeof a?JSON.stringify(a):a,...r,...this.#t,headers:this.#a(r?.headers,i)}}}async #n(e){let{url:t,init:r}=this.#r(e),n=(void 0===this.#i?null:o(r,this.#i))?.(),u,h;try{if(void 0!==this.#s)return await this.#s(t,r);u=await fetch(t,r),h=await u.text()}catch(e){throw new i(t.toString(),Object.is(e,l)?new a(this.#i,r):e)}finally{n?.()}let d=""===h?void 0:JSON.parse(h);if(!u.ok)throw new s(u,d);return d}get(e){return this.#n(e)}getStream(e){return this.#l(e)}post(e){return this.#n({...e,method:"POST"})}put(e){return this.#n({...e,method:"PUT"})}patch(e){return this.#n({...e,method:"PATCH"})}delete(e){return this.#n({...e,method:"DELETE"})}postStream(e){return this.#l({...e,method:"POST"})}async #l(e){let{url:r,init:n}=this.#r(e),u=(void 0===this.#i?null:o(n,this.#i))?.(),h;try{if(void 0!==this.#s){let e=await this.#s(r,n);if(!(e instanceof ReadableStream))throw new t("Custom HTTP client must return a ReadableStream for streaming requests");return e}h=await fetch(r,n)}catch(e){throw new i(r.toString(),Object.is(e,l)?new a(this.#i,n):e)}finally{u?.()}if(!h.ok){let e=await h.text();throw new s(h,""===e?void 0:JSON.parse(e))}if(!h.body)throw new t("Response body is null - server did not return a readable stream");return h.body}
1},h=Symbol("<task timeout>");function d(e){return function(t){return Object.defineProperty(t,"waitTask",{value:async s=>await e.waitForTask(await t,s)})}}var c=class{#e;#t;#s;#i;constructor(e,t){this.#e=e,this.#t=t?.timeout??5e3,this.#s=t?.interval??50,this.#i=d(this)}async getTask(e,t){return await this.#e.get({path:`tasks/${e}`,extraRequestInit:t})}async getTasks(e){return await this.#e.get({path:"tasks",params:e})}async getTaskDocuments(e,t){let s=(await n(await this.#e.getStream({path:`tasks/${e}/documents`,extraRequestInit:t}))).trim();if(!s)return[];try{let e=JSON.parse(s);return Array.isArray(e)?e:[e]}catch{return s.split(/\r?\n/).flatMap(e=>e.split(/(?<=})\s*(?=\{)/)).map(e=>e.trim()).filter(e=>e.length>0).map(e=>JSON.parse(e))}}async waitForTask(e,t){let s="number"==typeof e?e:e.taskUid,i=t?.timeout??this.#t,a=t?.interval??this.#s,n=i>0?new AbortController:null,l=null===n?void 0:setTimeout(()=>{n.abort(h)},i);try{for(;;){let e=await this.getTask(s,{signal:n?.signal});if("enqueued"!==e.status&&"processing"!==e.status)return clearTimeout(l),e;a>0&&await new Promise(e=>setTimeout(e,a))}}catch(e){throw Object.is(e.cause,h)?new r(s,i):e}}async *waitForTasksIter(e,t){for await(let s of e)yield await this.waitForTask(s,t)}async waitForTasks(...e){let t=[];for await(let s of this.waitForTasksIter(...e))t.push(s);return t}cancelTasks(e){return this.#i(this.#e.post({path:"tasks/cancel",params:e}))}deleteTasks(e){return this.#i(this.#e.delete({path:"tasks",params:e}))}};function p(e,t){let s=d(t);return{post:(...t)=>s(e.post(...t)),put:(...t)=>s(e.put(...t)),patch:(...t)=>s(e.patch(...t)),delete:(...t)=>s(e.delete(...t))}}var m=class{uid;primaryKey;createdAt;updatedAt;httpRequest;tasks;#e;constructor(e,t,s){this.uid=t,this.primaryKey=s,this.httpRequest=new u(e),this.tasks=new c(this.httpRequest,e.defaultWaitOptions),this.#e=p(this.httpRequest,this.tasks)}async search(e,t,s){return await this.httpRequest.post({path:`indexes/${this.uid}/search`,body:{q:e,...t},extraRequestInit:s})}async searchGet(e,s,i){let a={q:e,...s,filter:(e=>{if("string"==typeof e)return e;if(Array.isArray(e))throw new t("The filter query parameter should be in string format when using searchGet")})(s?.filter),sort:s?.sort?.join(","),facets:s?.facets?.join(","),attributesToRetrieve:s?.attributesToRetrieve?.join(","),attributesToCrop:s?.attributesToCrop?.join(","),attributesToHighlight:s?.attributesToHighlight?.join(","),vector:s?.vector?.join(","),attributesToSearchOn:s?.attributesToSearchOn?.join(",")};return await this.httpRequest.get({path:`indexes/${this.uid}/search`,params:a,extraRequestInit:i})}async searchForFacetValues(e,t){return await this.httpRequest.post({path:`indexes/${this.uid}/facet-search`,body:e,extraRequestInit:t})}async searchSimilarDocuments(e){return await this.httpRequest.post({path:`indexes/${this.uid}/similar`,body:e})}async getRawInfo(){let e=await this.httpRequest.get({path:`indexes/${this.uid}`});return this.primaryKey=e.primaryKey,this.updatedAt=new Date(e.updatedAt),this.createdAt=new Date(e.createdAt),e}async fetchInfo(){return await this.getRawInfo(),this}async fetchPrimaryKey(){return this.primaryKey=(await this.getRawInfo()).primaryKey,this.primaryKey}static create(e,t={},s){let i=new u(s);return p(i,new c(i)).post({path:"indexes",body:{...t,uid:e}})}update(e){return this.#e.patch({path:`indexes/${this.uid}`,body:e})}delete(){return this.#e.delete({path:`indexes/${this.uid}`})}async getStats(){return await this.httpRequest.get({path:`indexes/${this.uid}/stats`})}async getDocuments(e){let t=`indexes/${this.uid}/documents`,s=e?{...e}:void 0;return s&&Array.isArray(s.sort)&&0===s.sort.length&&delete s.sort,s?.filter===void 0?await this.httpRequest.get({path:t,params:s}):await this.httpRequest.post({path:`${t}/fetch`,body:s})}async getDocument(e,t){let s=Array.isArray(t?.fields)?t.fields.join():void 0;return await this.httpRequest.get({path:`indexes/${this.uid}/documents/${e}`,params:{...t,fields:s}})}addDocuments(e,t){return this.#e.post({path:`indexes/${this.uid}/documents`,params:t,body:e})}addDocumentsFromString(e,t,s){return this.#e.post({path:`indexes/${this.uid}/documents`,body:e,params:s,contentType:t})}addDocumentsInBatches(e,t=1e3,s){let i=[];for(let a=0;a<e.length;a+=t)i.push(this.addDocuments(e.slice(a,a+t),s));return i}updateDocuments(e,t){return this.#e.put({path:`indexes/${this.uid}/documents`,params:t,body:e})}updateDocumentsInBatches(e,t=1e3,s){let i=[];for(let a=0;a<e.length;a+=t)i.push(this.updateDocuments(e.slice(a,a+t),s));return i}
1updateDocumentsFromString(e,t,s){return this.#e.put({path:`indexes/${this.uid}/documents`,body:e,params:s,contentType:t})}deleteDocument(e,t){return this.#e.delete({path:`indexes/${this.uid}/documents/${e}`,params:t})}deleteDocuments(e,t){let s=Array.isArray(e)||"object"!=typeof e?"documents/delete-batch":"documents/delete";return this.#e.post({path:`indexes/${this.uid}/${s}`,body:e,params:t})}deleteAllDocuments(e){return this.#e.delete({path:`indexes/${this.uid}/documents`,params:e})}updateDocumentsByFunction(e,t){return this.#e.post({path:`indexes/${this.uid}/documents/edit`,body:e,params:t})}async getSettings(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings`})}updateSettings(e){return this.#e.patch({path:`indexes/${this.uid}/settings`,body:e})}resetSettings(){return this.#e.delete({path:`indexes/${this.uid}/settings`})}async getPagination(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/pagination`})}updatePagination(e){return this.#e.patch({path:`indexes/${this.uid}/settings/pagination`,body:e})}resetPagination(){return this.#e.delete({path:`indexes/${this.uid}/settings/pagination`})}async getSynonyms(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/synonyms`})}updateSynonyms(e){return this.#e.put({path:`indexes/${this.uid}/settings/synonyms`,body:e})}resetSynonyms(){return this.#e.delete({path:`indexes/${this.uid}/settings/synonyms`})}async getStopWords(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/stop-words`})}updateStopWords(e){return this.#e.put({path:`indexes/${this.uid}/settings/stop-words`,body:e})}resetStopWords(){return this.#e.delete({path:`indexes/${this.uid}/settings/stop-words`})}async getRankingRules(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/ranking-rules`})}updateRankingRules(e){return this.#e.put({path:`indexes/${this.uid}/settings/ranking-rules`,body:e})}resetRankingRules(){return this.#e.delete({path:`indexes/${this.uid}/settings/ranking-rules`})}async getDistinctAttribute(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/distinct-attribute`})}updateDistinctAttribute(e){return this.#e.put({path:`indexes/${this.uid}/settings/distinct-attribute`,body:e})}resetDistinctAttribute(){return this.#e.delete({path:`indexes/${this.uid}/settings/distinct-attribute`})}async getFilterableAttributes(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/filterable-attributes`})}updateFilterableAttributes(e){return this.#e.put({path:`indexes/${this.uid}/settings/filterable-attributes`,body:e})}resetFilterableAttributes(){return this.#e.delete({path:`indexes/${this.uid}/settings/filterable-attributes`})}async getSortableAttributes(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/sortable-attributes`})}updateSortableAttributes(e){return this.#e.put({path:`indexes/${this.uid}/settings/sortable-attributes`,body:e})}resetSortableAttributes(){return this.#e.delete({path:`indexes/${this.uid}/settings/sortable-attributes`})}async getSearchableAttributes(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/searchable-attributes`})}updateSearchableAttributes(e){return this.#e.put({path:`indexes/${this.uid}/settings/searchable-attributes`,body:e})}resetSearchableAttributes(){return this.#e.delete({path:`indexes/${this.uid}/settings/searchable-attributes`})}async getDisplayedAttributes(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/displayed-attributes`})}updateDisplayedAttributes(e){return this.#e.put({path:`indexes/${this.uid}/settings/displayed-attributes`,body:e})}resetDisplayedAttributes(){return this.#e.delete({path:`indexes/${this.uid}/settings/displayed-attributes`})}async getTypoTolerance(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/typo-tolerance`})}updateTypoTolerance(e){return this.#e.patch({path:`indexes/${this.uid}/settings/typo-tolerance`,body:e})}resetTypoTolerance(){return this.#e.delete({path:`indexes/${this.uid}/settings/typo-tolerance`})}async getFaceting(){return await this.httpRequest.get({path:`indexes/${this.uid}
1/settings/faceting`})}updateFaceting(e){return this.#e.patch({path:`indexes/${this.uid}/settings/faceting`,body:e})}resetFaceting(){return this.#e.delete({path:`indexes/${this.uid}/settings/faceting`})}async getSeparatorTokens(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/separator-tokens`})}updateSeparatorTokens(e){return this.#e.put({path:`indexes/${this.uid}/settings/separator-tokens`,body:e})}resetSeparatorTokens(){return this.#e.delete({path:`indexes/${this.uid}/settings/separator-tokens`})}async getNonSeparatorTokens(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/non-separator-tokens`})}updateNonSeparatorTokens(e){return this.#e.put({path:`indexes/${this.uid}/settings/non-separator-tokens`,body:e})}resetNonSeparatorTokens(){return this.#e.delete({path:`indexes/${this.uid}/settings/non-separator-tokens`})}async getDictionary(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/dictionary`})}updateDictionary(e){return this.#e.put({path:`indexes/${this.uid}/settings/dictionary`,body:e})}resetDictionary(){return this.#e.delete({path:`indexes/${this.uid}/settings/dictionary`})}async getProximityPrecision(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/proximity-precision`})}updateProximityPrecision(e){return this.#e.put({path:`indexes/${this.uid}/settings/proximity-precision`,body:e})}resetProximityPrecision(){return this.#e.delete({path:`indexes/${this.uid}/settings/proximity-precision`})}async getEmbedders(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/embedders`})}updateEmbedders(e){return this.#e.patch({path:`indexes/${this.uid}/settings/embedders`,body:e})}resetEmbedders(){return this.#e.delete({path:`indexes/${this.uid}/settings/embedders`})}async getSearchCutoffMs(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/search-cutoff-ms`})}updateSearchCutoffMs(e){return this.#e.put({path:`indexes/${this.uid}/settings/search-cutoff-ms`,body:e})}resetSearchCutoffMs(){return this.#e.delete({path:`indexes/${this.uid}/settings/search-cutoff-ms`})}async getLocalizedAttributes(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/localized-attributes`})}updateLocalizedAttributes(e){return this.#e.put({path:`indexes/${this.uid}/settings/localized-attributes`,body:e})}resetLocalizedAttributes(){return this.#e.delete({path:`indexes/${this.uid}/settings/localized-attributes`})}async getForeignKeys(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/foreign-keys`})}updateForeignKeys(e){return this.#e.put({path:`indexes/${this.uid}/settings/foreign-keys`,body:e})}resetForeignKeys(){return this.#e.delete({path:`indexes/${this.uid}/settings/foreign-keys`})}async getFacetSearch(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/facet-search`})}updateFacetSearch(e){return this.#e.put({path:`indexes/${this.uid}/settings/facet-search`,body:e})}resetFacetSearch(){return this.#e.delete({path:`indexes/${this.uid}/settings/facet-search`})}async getPrefixSearch(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/prefix-search`})}updatePrefixSearch(e){return this.#e.put({path:`indexes/${this.uid}/settings/prefix-search`,body:e})}resetPrefixSearch(){return this.#e.delete({path:`indexes/${this.uid}/settings/prefix-search`})}async getChat(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/chat`})}updateChat(e){return this.#e.patch({path:`indexes/${this.uid}/settings/chat`,body:e})}async getFields(e,t){return await this.httpRequest.post({path:`indexes/${this.uid}/fields`,body:e||{},extraRequestInit:t})}},g=class{#e;constructor(e){this.#e=e}async getBatch(e){return await this.#e.get({path:`batches/${e}`})}async getBatches(e){return await this.#e.get({path:"batches",params:e})}},x=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}async get(){return await this.#e.get({path:`chats/${this.#t}/settings`})}async update(e){return await this.#e.patch({path:`chats/${this.#t}/settings`,body:e})}async reset(){await this.#e.delete({path:`chats/${this.#t}/settings`})}async streamCompletion(e){if(!e.stream)throw Error("The SDK only supports streaming");return await this.#e.postStream({path:`chats/${this.#t}/chat/completions`,body:e})}},y=class{config;httpRequest;#e;get tasks(){return this.#e}#t;get batches(){return this.#t}#s;constructor(e){this.config=e,this.httpRequest=new u(e),this.#e=new c(this.httpRequest,e.defaultWaitOptions),this.#t=new g(this.httpRequest),this.#s=p(this.httpRequest,this.tasks)}index(e){return new m(this.config,e)}async getIndex(e){return new m(this.config,e).fetchInfo()}async getRawIndex(e){return new m(this.config,e).getRawInfo()}async getIndexes(e){let t=await this.getRawIndexes(e),s=t.results.map(e=>new m(this.config,e.uid,e.primaryKey));return{...t,results:s}}async getRawIndexes(e){return await this.httpRequest.get({path:"indexes",params:e})}createIndex(e,t){return m.create(e,t,this.config)}updateIndex(e,t){return new m(this.config,e).update(t)}deleteIndex(e){return new m(this.config,e).delete()}async deleteIndexIfExists(e){try{return await this.deleteIndex(e),!0}catch(e){if(e?.cause?.code==="index_not_found")return!1;throw e}}
1swapIndexes(e){return this.#s.post({path:"swap-indexes",body:e})}async multiSearch(e,t){return await this.httpRequest.post({path:"multi-search",body:e,extraRequestInit:t})}chat(e){return new x(this.httpRequest,e)}async getChatWorkspaces(){return await this.httpRequest.get({path:"chats"})}async getDynamicSearchRules(e){return await this.httpRequest.post({path:"dynamic-search-rules",body:e??{}})}async getDynamicSearchRule(e){return await this.httpRequest.get({path:`dynamic-search-rules/${e}`})}async updateDynamicSearchRule(e,t){return await this.httpRequest.patch({path:`dynamic-search-rules/${e}`,body:t})}async deleteDynamicSearchRule(e){await this.httpRequest.delete({path:`dynamic-search-rules/${e}`})}async getWebhooks(){return await this.httpRequest.get({path:"webhooks"})}async getWebhook(e){return await this.httpRequest.get({path:`webhooks/${e}`})}async createWebhook(e){return await this.httpRequest.post({path:"webhooks",body:e})}async updateWebhook(e,t){return await this.httpRequest.patch({path:`webhooks/${e}`,body:t})}async deleteWebhook(e){await this.httpRequest.delete({path:`webhooks/${e}`})}#i(e){return this.#s.patch({path:"network",body:e})}#a(e,t){let s=Object.entries(t);if(0===s.length)throw TypeError("initializeNetwork requires at least one shard when leader is set.");let i={};for(let[t,a]of s){if(!Array.isArray(a.remotes)||0===a.remotes.length)throw TypeError(`Shard "${t}" must have at least one remote.`);let s=a.remotes.filter(t=>void 0===e[t]);if(s.length>0)throw TypeError(`Shard "${t}" references unknown remotes: ${s.join(", ")}`);i[t]={remotes:[...a.remotes]}}return i}async getNetwork(){return await this.httpRequest.get({path:"network"})}initializeNetwork(e){let t=this.#a(e.remotes,e.shards);return this.#i({self:e.self,leader:e.self,remotes:e.remotes,shards:t})}addRemote(e){return this.#i({remotes:{[e.name]:e.remote}})}removeRemote(e){return this.#i({remotes:{[e.name]:null}})}addRemotesToShard(e,t){return this.#i({shards:{[e]:{addRemotes:t}}})}removeRemotesFromShard(e,t){return this.#i({shards:{[e]:{removeRemotes:t}}})}async getKeys(e){let t=await this.httpRequest.get({path:"keys",params:e});return t.results=t.results.map(e=>({...e,createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt)})),t}async getKey(e){return await this.httpRequest.get({path:`keys/${e}`})}async createKey(e){return await this.httpRequest.post({path:"keys",body:e})}async updateKey(e,t){return await this.httpRequest.patch({path:`keys/${e}`,body:t})}async deleteKey(e){await this.httpRequest.delete({path:`keys/${e}`})}async health(){return await this.httpRequest.get({path:"health"})}async isHealthy(){try{let{status:e}=await this.health();return"available"===e}catch{return!1}}async getStats(){return await this.httpRequest.get({path:"stats"})}async getVersion(){return await this.httpRequest.get({path:"version"})}createDump(){return this.#s.post({path:"dumps"})}createSnapshot(){return this.#s.post({path:"snapshots"})}async renderTemplate(e){return await this.httpRequest.post({path:"render-template",body:e})}async getExperimentalFeatures(){return await this.httpRequest.get({path:"experimental-features"})}async updateExperimentalFeatures(e){return await this.httpRequest.patch({path:"experimental-features",body:e})}};e.s(["Meilisearch",0,y])},814621,e=>{"use strict";var t=e.i(843476),s=e.i(271645),i=e.i(174080),a=e.i(522016),r=e.i(487473);e.i(247167);let n=new(e.i(327974)).Meilisearch({host:"https://ms-1627950f0e35-46065.fra.meilisearch.io",apiKey:"57c780dad200c094e8177521bc36f9ed7203d9796cc41734ef08a0443664ccb3"}),l=n.index("content"),o=n.index("post_meta");async function u(e,t=5){let s=e.trim();if(!s)return[];let i=(await l.search(s,{limit:t,distinct:"post_id",attributesToRetrieve:["post_id","title","cpt"],attributesToHighlight:["title"],highlightPreTag:"<mark>",highlightPostTag:"</mark>"})).hits;if(!i.length)return[];let a=i.map(e=>e.post_id),r=new Map((await o.search("",{filter:`post_id IN [${a.join(",")}]`,limit:a.length})).hits.map(e=>[e.post_id,e.data]));return i.map(e=>({postId:e.post_id,title:e.title,cpt:e.cpt,link:r.get(e.post_id)?.link,titleHtml:e._formatted?.title}))}let h={news:"News",events:"Eventi",pubblicazioni:"Centro Studi",progetti:"Progetti",documenti:"Documenti",comunicati_stampa:"Comunicati Stampa",team:"Persone",basepage:"Pagine","bandi-eu":"Bandi UE","programmi-eu":"Programmi UE",rivista:"Rivista"},d=e=>{try{return new URL(e).pathname}catch{return e||"/"}},c=({locale:e="",switchHref:n="/",switchLabel:l="EN",searchQuery:o="",isPending:c=!1,onSearch:p=null,compact:m=!1})=>
1{let[g,x]=(0,s.useState)(o),[y,b]=(0,s.useState)([]),[f,w]=(0,s.useState)(!1),[v,k]=(0,s.useState)(!1),[j,$]=(0,s.useState)(null),R=(0,s.useRef)(null),S=(0,s.useRef)(null),N=(0,s.useRef)(null),T=(0,s.useRef)(null);(0,s.useEffect)(()=>{x(o)},[o]),(0,s.useEffect)(()=>{let e=T.current;if(!e)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){e.style.transform="translateY(0)";return}let t=e.animate([{transform:"translateY(100%)"},{transform:"translateY(0)"}],{duration:1400,easing:"cubic-bezier(0.16, 1, 0.3, 1)",fill:"forwards"});return()=>t.cancel()},[]);let q=(0,s.useCallback)(()=>{if(S.current){let e=S.current.getBoundingClientRect();$({top:e.bottom+window.scrollY,left:e.left+window.scrollX,width:e.width})}},[]);(0,s.useEffect)(()=>{let e=e=>{let t=S.current&&S.current.contains(e.target),s=N.current&&N.current.contains(e.target);t||s||w(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,s.useEffect)(()=>{if(!f)return;let e=()=>q();return window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}},[f,q]);let A=(0,s.useCallback)(async e=>{k(!0);try{let t=await u(e);b(t.filter(e=>h[e.cpt])),q(),w(!0)}catch{b([])}finally{k(!1)}},[q]),E=(0,t.jsx)("h1",{className:"text-sky-blue text-6xl max-xl:text-5xl max-lg:text-4xl max-md:text-3xl leading-tight font-medium",children:"en"===e?"Search a topic":"Cerca un argomento"}),_=(0,t.jsx)("form",{onSubmit:e=>{e.preventDefault(),w(!1),R.current&&clearTimeout(R.current);let t=g.trim();t&&p&&p(t)},className:"w-full",children:(0,t.jsxs)("div",{className:"relative w-full",ref:S,children:[(0,t.jsx)("input",{type:"text",name:"q",value:g,onChange:e=>{let t=e.target.value;if(x(t),R.current&&clearTimeout(R.current),t.trim().length<2){b([]),w(!1);return}R.current=setTimeout(()=>A(t),150)},onKeyDown:e=>{"Escape"===e.key&&w(!1)},placeholder:"en"===e?"Search...":"Cerca...",autoComplete:"off",autoFocus:!0,className:"w-full bg-white/10 border border-white/30 rounded-full pl-8 pr-20 py-5 text-white placeholder:text-white/60 text-xl max-lg:text-lg outline-none focus:border-white/60 focus:bg-white/15 transition-all"}),(0,t.jsx)("button",{type:"submit","aria-label":"en"===e?"Search a topic":"Cerca un argomento",className:"absolute right-2.5 top-1/2 -translate-y-1/2 flex items-center justify-center size-12 max-lg:size-11 rounded-full bg-sky-blue text-dark-blue hover:bg-white cursor-pointer transition-colors duration-300",children:c||v?(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):(0,t.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,t.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}),f&&j&&y.length>0&&(0,i.createPortal)((0,t.jsxs)("div",{ref:N,style:{position:"absolute",top:j.top+8,left:j.left,width:j.width,zIndex:99999},className:"bg-white rounded-2xl shadow-xl overflow-hidden text-left",children:[y.map(e=>{let s,i="flex items-center gap-3 px-5 py-3 transition-colors group no-underline",r=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"flex-shrink-0 text-gray-400 group-hover:text-sky-500 transition-colors",children:(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("line",{x1:"7",y1:"17",x2:"17",y2:"7"}),(0,t.jsx)("polyline",{points:"7 7 17 7 17 17"})]})}),(0,t.jsx)("span",{className:"text-dark-blue text-sm line-clamp-1 [&_mark]:bg-sky-blue/40 [&_mark]:text-inherit",dangerouslySetInnerHTML:{__html:e.titleHtml||e.title}}
1),(0,t.jsx)("span",{className:"ml-auto flex-shrink-0 text-sm font-medium text-gray-500 border border-gray-200 rounded-full px-2.5 py-0.5 whitespace-nowrap",children:h[e.cpt]||e.cpt})]});return e.link?(0,t.jsx)(a.default,{href:"basepage"===e.cpt?"/home/"===(s=d(e.link).replace(/^\/basepage/,""))||"/home"===s?"/":s:d(e.link),target:"_blank",rel:"noopener noreferrer",className:`${i} hover:bg-gray-50`,children:r},e.postId):(0,t.jsx)("div",{className:`${i} cursor-default`,children:r},e.postId)}),(0,t.jsx)("div",{className:"border-t border-gray-100",children:(0,t.jsxs)("button",{type:"button",onClick:()=>{w(!1),R.current&&clearTimeout(R.current);let e=g.trim();e&&p&&p(e)},className:"flex items-center gap-3 px-5 py-4 w-full text-left hover:bg-gray-50 text-dark-blue transition-colors group",children:[(0,t.jsx)("span",{className:"flex-shrink-0 text-gray-400 group-hover:text-sky-500 transition-colors",children:(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,t.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}),(0,t.jsxs)("span",{className:"text-sm lg:text-base text-gray-600 group-hover:text-dark-blue transition-colors",children:["en"===e?"All results for ":"Tutti i risultati per ",(0,t.jsxs)("span",{className:"font-bold text-sky-blue",children:['"',g,'"']})]})]})})]}),document.body)]})});return(0,t.jsxs)("div",{className:`relative overflow-hidden ${m?"min-h-[50vh] max-md:min-h-[33vh] flex flex-col justify-center pt-40 pb-8":"min-h-screen flex flex-col"}`,children:[(0,t.jsx)("div",{className:"absolute inset-0 -z-10 bg-dark-blue bg-cover bg-center",style:{backgroundImage:"linear-gradient(rgba(32,50,98,0.25), rgba(32,50,98,0.25)), url('/design/images/webp/hero-2-bg.webp')"}}),(0,t.jsx)("div",{ref:T,className:"absolute inset-0 -z-10 bg-dark-blue opacity-[0.8] pointer-events-none",style:{transform:"translateY(100%)"}}),(0,t.jsx)(r.default,{locale:e,switchHref:n,switchLabel:l}),m?(0,t.jsxs)("div",{className:"relative max-w-415 w-full mx-auto px-8 flex flex-col items-center justify-center text-center",children:[E,(0,t.jsx)("div",{className:"mt-12 max-lg:mt-8 w-full max-w-4xl",children:_})]}):(0,t.jsx)("div",{className:"relative flex-1 w-full flex items-center justify-center px-8",children:(0,t.jsxs)("div",{className:"relative w-full max-w-4xl",children:[(0,t.jsx)("div",{className:"hero-title-in absolute bottom-full left-0 right-0 mb-10 max-lg:mb-8 text-center",children:E}),(0,t.jsx)("div",{className:"hero-form-in",children:_})]})})]})},p={a:"aàáâãäå",e:"eèéêë",i:"iìíîï",o:"oòóôõö",u:"uùúûü",c:"cç",n:"nñ"},m=(e,t)=>e&&t?String(e).replace(/(<[^>]*>)|(&[a-zA-Z#0-9]+;)|([^<&]+)/g,(e,s,i,a)=>s||i?s||i:a.replace(t,'<mark class="bg-sky-blue/30 text-inherit rounded-[2px]">$1</mark>')):e||"",g=e=>{let t=String(e||"").replace(/<[^>]*>/g," ").replace(/&#8217;|&#039;|&#8216;|&rsquo;|&lsquo;/g,"’").replace(/&#8211;|&#8212;|&ndash;|&mdash;/g,"–").replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&nbsp;| /g," ").replace(/&hellip;/g,"…").replace(/\s+/g," ").trim();return t.length>180&&(t=t.slice(0,180).replace(/\s+\S*$/,"")+"…"),t},x=()=>(0,t.jsxs)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"shrink-0",children:[(0,t.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,t.jsx)("polyline",{points:"7 10 12 15 17 10"}),(0,t.jsx)("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),y=e=>{try{return new URL(e).pathname}catch{return e||"/"}},b={news:"News",events:"Eventi",pubblicazioni:"Centro Studi",progetti:"Progetti",documenti:"Documenti",comunicati_stampa:"Comunicati Stampa",team:"Persone",basepage:"Pagine","bandi-eu":"Bandi UE","programmi-eu":"Programmi UE",rivista:"Rivista"},f={news:"News",events:"Events",pubblicazioni:"Research Center",progetti:"Projects",documenti:"Documents",comunicati_stampa:"Press Releases",team:"People",basepage:"Pages","bandi-eu":"EU Calls","programmi-eu":"EU Programmes",rivista:"Magazine"},w=({results:e=[],query:i="",loading:r=!1,locale:n=""})=>{let l,o=(e=>{let t=(e||"").trim().toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"");if(!t)return null;let s=t.split("").map(e=>""===e.trim()?"\\s+":p[e]?`[${p[e]}]`:e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("");return s?RegExp(`(${s})`,"gi"):null})(i),u=e=>("en"===n?f:b)[e]||e,h=["news","events","pubblicazioni","documenti","progetti","comunicati_stampa","team","basepage","bandi-eu","programmi-eu","rivista"],d=new Set(h),c=e.filter(e=>d.has(e.data?.type||e.cpt||"altro")),w={};for(let e of c){let t=e.data?.type||e.cpt||"altro";(w[t]||=[]).push(e)}let v=[{id:"tutto",label:"en"===n?"All":"Tutto",data:c},...h.filter(e=>w[e]?.length).map(e=>({id:e,label:u(e),data:w[e]}
1))],[k,j]=(0,s.useState)("tutto"),[$,R]=(0,s.useState)("score"),S=v.find(e=>e.id===k)||v[0];return(0,t.jsx)("div",{className:"bg-light-white lg:py-20 md:py-16 py-14",children:(0,t.jsx)("div",{className:"max-w-415 mx-auto px-8",children:r?(0,t.jsx)("div",{className:"text-center py-20",children:(0,t.jsxs)("svg",{className:"animate-spin h-8 w-8 text-dark-blue mx-auto",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}):0===e.length?(0,t.jsx)("div",{className:"text-center py-20",children:(0,t.jsx)("p",{className:"text-dark-blue/60 text-lg",children:"en"===n?"No results found":"Nessun risultato trovato"})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-end justify-between gap-4 flex-wrap",children:[(0,t.jsx)("div",{className:"flex flex-wrap gap-x-8",style:{background:"repeating-linear-gradient(to bottom, transparent 0, transparent calc(3.5rem - 1px), #9ca3af calc(3.5rem - 1px), #9ca3af 3.5rem)"},children:v.map(e=>(0,t.jsx)("button",{onClick:()=>j(e.id),className:`h-14 flex items-end pb-2.5 lg:text-xl text-base font-bold text-dark-blue transition-all duration-300 whitespace-nowrap border-b-[2px] ${k===e.id?"opacity-100 border-dark-blue":"opacity-50 border-transparent"}`,children:e.label},e.id))}),(0,t.jsxs)("div",{className:"flex items-center gap-1 pb-2.5 shrink-0",children:[(0,t.jsx)("span",{className:"text-sm text-dark-blue/70 whitespace-nowrap mr-1",children:"en"===n?"Order:":"Ordine:"}),[{id:"score",label:"en"===n?"Relevance":"Corrispondenza"},{id:"date",label:"en"===n?"Date":"Data"}].map(e=>(0,t.jsx)("button",{onClick:()=>R(e.id),className:`text-sm font-normal leading-none rounded-full px-4 py-2 whitespace-nowrap transition-all duration-300 cursor-pointer ${$===e.id?"bg-dark-blue text-white":"border border-dark-blue/20 text-dark-blue hover:border-dark-blue"}`,children:e.label},e.id))]})]}),(0,t.jsx)("div",{className:"mt-10",children:(0,t.jsx)("div",{className:"grid xl:grid-cols-4 lg:grid-cols-3 md:grid-cols-2 grid-cols-1 gap-x-5 gap-y-10 items-stretch",children:(l=[...S.data||[]],"date"===$?l.sort((e,t)=>new Date(t.data?.date||0)-new Date(e.data?.date||0)):l).map(e=>{let s,i,r=e.data,l=r.type||e.cpt,h=r.title?.rendered||"",d=r.acf||{},c="";if(r.date){let e=new Date(r.date).toLocaleDateString("en"===n?"en-US":"it-IT",{month:"long",year:"numeric"});c=e.charAt(0).toUpperCase()+e.slice(1)}let p="team"===l,b="basepage"===l,f="documenti"===l,w="comunicati_stampa"===l,v="rivista"===l,k=["news","events","pubblicazioni","progetti","team","bandi-eu","programmi-eu","rivista"].includes(l),j=r.link?y(r.link):null;if(p)if(String(r.content?.rendered||"").replace(/<[^>]*>/g,"").replace(/&nbsp;/gi," ").trim().length>=10)j=r.slug?"en"===n?`/en/people/${r.slug}`:`/team/${r.slug}`:j;else{let e=String(d.link_indietro_chiudi||"").trim();j=e.length>=3?y(e):null}v&&(j=r.slug?`/rivista/${r.slug}`:j),b&&j&&("/home/"===(j=j.replace(/^\/basepage/,""))||"/home"===j)&&(j="/");let $=!!j,R=r._embedded?.["wp:featuredmedia"]?.[0]?.source_url||null,S=f?(i=[],["","_2","_3","_4","_5"].forEach(e=>{let t=d["scarica"+e],s=t&&("object"==typeof t?t.url:t);s&&i.push({url:s,label:d["label_download"+e]||"Scarica PDF"})}),i):[],N=b?g(r.excerpt?.rendered)||g(e.snippetHtml):"",T=w?g(r.excerpt?.rendered):"",q=p?R&&(0,t.jsx)("div",{className:"h-full aspect-square",children:(0,t.jsx)("img",{src:R,alt:"",loading:"lazy",className:"w-full h-full object-cover object-top rounded-full"})}):k&&R?(0,t.jsx)("img",{src:R,alt:"",loading:"lazy",className:"w-full h-full object-cover"}):f?(0,t.jsx)("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-2 p-4",style:{backgroundImage:"linear-gradient(135deg, #203262 0%, #364772 100%)"},children:S.length>0?S.map((e,s)=>(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"max-w-full flex items-center gap-2 text-white text-base lg:text-lg font-medium leading-snug hover:underline transition-colors",children:[(0,t.jsx)(x,{}),(0,t.jsx)("span",{className:"truncate",children:e.label})]},s)):(0,t.jsx)("span",{className:"text-white/80 text-sm",children:"en"===n?"Document":"Documento"})}):w?(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center p-5 text-center",style:{backgroundImage:"linear-gradient(135deg, #7bb2d6 0%, #cae0ef 100%)"},children:T&&(0,t.jsx)("p",{className:"text-dark-blue text-base lg:text-lg font-medium leading-snug line-clamp-5",dangerouslySetInnerHTML:{__html:m(T,o)}})}):b?(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center p-5 text-center",style:{backgroundImage:"linear-gradient(135deg, #E9762B 0%, #F29A4E 100%)"},children:N&&(0,t.jsx)("p",{className:"text-white text-base lg:text-lg font-medium leading-snug line-clamp-5",dangerouslySetInnerHTML:{__html:m(N,o)}})}):null,A=p?"relative w-full aspect-video overflow-hidden flex-shrink-0 bg-white flex justify-center items-start pb-4 xl:pb-6":"relative w-full aspect-video overflow-hidden flex-shrink-0 bg-[#e6e6e6]",E=$&&!f?(0,t.jsx)(a.default,{href:j,className:p?A:`block ${A}`,target:"_blank",rel:"noopener noreferrer","aria-label":h.replace(/<[^>]*>/g,""),children:q}):(0,t.jsx)("div",{className:A,children:q});
1if(p){let e=[d.position,d.additional].filter(Boolean).join(" – ");s=(0,t.jsxs)("div",{className:"w-full bg-white flex flex-col flex-1 min-h-[120px] p-3 xl:px-5 xl:pt-6",children:[$?(0,t.jsx)(a.default,{href:j,target:"_blank",rel:"noopener noreferrer",className:"font-bold text-dark-blue lg:text-xl text-base no-underline hover:underline",dangerouslySetInnerHTML:{__html:m(h,o)}}):(0,t.jsx)("p",{className:"font-bold text-dark-blue lg:text-xl text-base",dangerouslySetInnerHTML:{__html:m(h,o)}}),e&&(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:e}),d.mail&&(0,t.jsxs)("a",{href:`mailto:${d.mail}`,className:"text-sm text-dark-blue hover:underline mt-2 inline-block break-all",children:["@ ",d.mail]})]})}else{let e="font-bold xl:pt-6 p-3 pb-1 xl:px-5 text-dark-blue lg:text-xl text-base";s=(0,t.jsxs)("div",{className:"w-full bg-white flex flex-col justify-between flex-1 min-h-[160px]",children:[(0,t.jsxs)("div",{className:"flex flex-col flex-1",children:[$?(0,t.jsx)(a.default,{href:j,className:`no-underline hover:underline ${e}`,target:"_blank",rel:"noopener noreferrer",dangerouslySetInnerHTML:{__html:m(h,o)}}):(0,t.jsx)("p",{className:e,dangerouslySetInnerHTML:{__html:m(h,o)}}),(0,t.jsx)("div",{className:`flex flex-wrap gap-2 px-3 xl:px-5 pt-4 mt-auto ${c&&!b?"":"pb-4 xl:pb-6"}`,children:(0,t.jsx)("div",{className:"border border-dark-blue py-1.5 px-3 max-xl:p-1.5 rounded-full leading-none text-dark-blue sm:text-custom-sm text-xs",children:u(l)})})]}),c&&!b&&(0,t.jsx)("p",{className:"text-sm text-gray-500 p-3 xl:px-5 pb-3",children:c})]})}return(0,t.jsxs)("div",{className:"transition-all ease-linear duration-300 flex flex-col w-full bg-white hover:shadow-lg",children:[s,E]},e.postId)})})})]})})})};async function v(e,{filters:t=[],hitsPerPage:s=48,page:i=1}={}){let a=e.trim();if(!a)return{results:[],total:0};let r=await l.search(a,{hybrid:{embedder:"openai",semanticRatio:.5},rankingScoreThreshold:.25,filter:t.length?t:void 0,attributesToRetrieve:["post_id","cpt","chunk_type","url"],attributesToCrop:["chunk_text"],cropLength:40,attributesToHighlight:["chunk_text"],highlightPreTag:"<mark>",highlightPostTag:"</mark>",limit:200}),n=[],u=new Map,h=new Map;for(let e of r.hits)u.has(e.post_id)||(u.set(e.post_id,e._formatted?.chunk_text??""),h.set(e.post_id,e.cpt),n.push(e.post_id));let d=n.length,c=n.slice((i-1)*s,i*s);if(!c.length)return{results:[],total:d};let p=new Map((await o.search("",{filter:`post_id IN [${c.join(",")}]`,limit:c.length})).hits.map(e=>[e.post_id,e.data]));return{results:c.map(e=>({postId:e,cpt:h.get(e)??"",snippetHtml:u.get(e)??"",data:p.get(e)})).filter(e=>e.data),total:d}}e.s(["default",0,function({locale:e="",switchHref:i="/",switchLabel:a="EN",footer:r}){let[n,l]=(0,s.useState)(!1),[o,u]=(0,s.useState)(""),[h,d]=(0,s.useState)(!1),[p,m]=(0,s.useState)([]),g=async e=>{u(e),l(!0),d(!0);try{let{results:t}=await v(e,{hitsPerPage:48});m(t)}catch(e){console.error("[aisearch] ricerca fallita:",e),m([])}finally{d(!1)}};return(0,t.jsxs)("div",{children:[(0,t.jsx)(c,{locale:e,switchHref:i,switchLabel:a,searchQuery:o,compact:n,isPending:h,onSearch:g}),n&&(0,t.jsx)(w,{results:p,query:o,loading:h,locale:e}),r]})}],814621)}]);

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.