1(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{1319:function(t,e,r){},1411:function(t,e,r){"use strict";r(369)("trimRight",(function(t){return function(){return t(this,2)}}),"trimEnd")},1412:function(t,e,r){"use strict";r(1319)},1489:function(t,e,r){"use strict";r.r(e);r(12),r(13),r(15),r(16),r(68);var n=r(30),o=r(1),l=r(7),c=r(24),d=r(49),h=(r(23),r(143),r(55),r(27),r(43),r(10),r(58),r(28),r(42),r(1411),r(34),r(33),r(36),r(40),r(144),r(53),r(21),r(280),r(101),r(78),r(79),r(225)),f=r(14),m=r(0),y=r(9),v=r(142);function _(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return C(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return C(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return l=t.done,t},e:function(t){c=!0,o=t},f:function(){try{l||null==r.return||r.return()}finally{if(c)throw o}}}}function C(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=new Array(e);i<e;i++)r[i]=t[i];return r}function T(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,r)}return e}function x(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?T(Object(source),!0).forEach((function(e){Object(o.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):T(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}f.a.config.silent=!0;var S=20,k=50,A=new Set(["1063"]),w={components:{VueTypeaheadBootstrap:h.a},mixins:[y.a],props:{suggestions:{type:Object,default:function(){}}},data:function(){return{query:"",hideModal:!1,canClose:!1,productsArray:[],articlesArray:[],suggestionsArray:[],debounceTimer:null,settleTimer:null,searchAnalyticsTimer:null,abortController:null,isSearching:!1,lastQuery:"",activeTab:"all",renderLimit:S,searchPlan:null,productsOffset:0,articlesOffset:0,productsDone:!0,articlesDone:!0,isLoadingMore:!1,loadMoreController:null,autoFillTries:0,lastSearchCounts:{products:0,articles:0},finderSessionId:null,userId:null,userIdType:null,deviceType:null,finderOpenedAt:null,searchRefinementCount:0,lastLoggedSearchTerm:null,lastQueryLength:0,hasDeletedSinceLastLog:!1,pendingClickData:null,localFallbackPromise:null,localFallbackReady:!1,logo:{height:38,width:183,alt:"RUNNEA"}}},computed:{showRunneaAI:function(){var t;return void 0!==(null===(t=m.contents)||void 0===t?void 0:t.chatIA)&&m.contents.chatIA},hasQuery:function(){return this.query.trim().length>1},isTrendingView:function(){return!this.hasQuery||!this.suggestionsArray.length},tabs:function(){return[{key:"all",label:this.$t("module_finder.tab_all")},{key:"product",label:this.$t("index.products")},{key:"article",label:this.$t("index.articles")}]},filteredSuggestionsArray:function(){var t=this;return"all"===this.activeTab?this.suggestionsArray:this.suggestionsArray.filter((function(e){return e.type===t.activeTab}))},renderableCount:function(){return"all"!==this.activeTab||this.productsDone?this.filteredSuggestionsArray.length:this.filteredSuggestionsArray.filter((function(t){return"product"===t.type})).length},visibleLimit:function(){return Math.min(this.renderLimit,this.renderableCount)},activeTabLabel:function(){return this.$t("product"===this.activeTab?"index.products":"index.articles").toLowerCase()},noResultsForActiveTab:function(){return!this.isTrendingView&&"all"!==this.activeTab&&0===this.filteredSuggestionsArray.length},filteredCards:function(){var t=this,e=this.suggestions.cards,r=[];return Array.isArray(e)?r=e:e&&"object"===Object(d.a)(e)&&(r=Object.values(e)),"all"!==this.activeTab&&(r=r.filter((function(e){return(e.type||"product")===t.activeTab}))),r},resultsCountParts:function(){var t=this.suggestionsArray.filter((function(t){return"product"===t.type})).length,e=this.suggestionsArray.filter((function(t){return"article"===t.type})).length,r=Math.max(this.lastSearchCounts.products,t),n=Math.max(this.lastSearchCounts.articles,e),o=this.$t(1===r?"index.product":"index.products").toLowerCase(),l=this.$t(1===n?"index.article":"index.articles").toLowerCase(),d="".concat(r," ").concat(o," · ").concat(n," ").concat(l),h=this.$t("module_finder.results_for").replace("{counts}",d).split("{query}"),f=Object(c.a)(h,2);return{before:f[0],after:f[1]||""}},aiQuery:function(){var t=this.query.trim();return t.length>60?"".concat(t.slice(0,60).trimEnd(),"..."):t},aiSuggestionKey:function(){return this.aiQuery.length<=1?"module_finder.ask_ai_suggestion_default":this.suggestionsArray.some((function(t){return"product"===t.type}))?"module_finder.ask_ai_suggestion_product":"module_finder.ask_ai_suggestion"},aiSuggestionText:function(){return this.$t(this.aiSuggestionKey,{query:this.aiQuery})},askAiLabelHtml:function(){return this.$t("module_finder.ask_ai").replaceAll("RUNNEA AI","<strong>RUNNEA AI</strong>")}},watch:{hasQuery:function(t){t||(this.activeTab="all")},activeTab:function(){var t=this;this.renderLimit=S,this.autoFillTries=0,this.$nextTick((function(){t.scrollResultsToTop(),t.ensureListFilled()}))}},beforeMount:function(){var t=this;this.$config.meilisearchHost||this.ensureLocalFallback().then((function(){t.suggestionsArray=[].concat(t.productsArray,t.articlesArray)}))},mounted:function(){var t=this;if(this.$el&&1===this.$el.nodeType&&this.$el.parentNode!==document.body&&document.body.appendChild(this.$el),this.setFocus(),setTimeout((function(){t.canClose
1=!0}),400),setTimeout(this.updateListMaxHeight,150),window.addEventListener("resize",this.scheduleListMaxHeight),this.$el.addEventListener("scroll",this.onResultsScroll,!0),"undefined"!=typeof ResizeObserver){this.toolbarResizeObserver=new ResizeObserver(this.scheduleListMaxHeight);var e=this.$el.querySelector(".finder-toolbar");e&&this.toolbarResizeObserver.observe(e);var r=this.$el.querySelector(".finder-bottom-bar");r&&this.toolbarResizeObserver.observe(r)}this.finderSessionId=crypto.randomUUID();var n=this.getUserId(),o=n.id,l=n.type;this.userId=o,this.userIdType=l,this.finderOpenedAt=Date.now();var c=window.innerWidth;this.deviceType=c<=768?"mobile":c<=1024?"tablet":"desktop"},beforeDestroy:function(){window.removeEventListener("resize",this.scheduleListMaxHeight),this.$el.removeEventListener("scroll",this.onResultsScroll,!0),this.listMaxHeightFrame&&cancelAnimationFrame(this.listMaxHeightFrame),this.toolbarResizeObserver&&this.toolbarResizeObserver.disconnect(),this.abortController&&this.abortController.abort(),this.loadMoreController&&this.loadMoreController.abort(),clearTimeout(this.settleTimer),this.pushSessionEvent(),this.$el&&this.$el.parentNode&&this.$el.remove()},methods:{tapFinderItem:function(t){var e=t.currentTarget;e.classList.remove("finder-item--tapped"),e.getBoundingClientRect(),e.classList.add("finder-item--tapped")},ensureLocalFallback:function(){var t=this;return this.localFallbackReady?Promise.resolve():(this.localFallbackPromise||(this.localFallbackPromise=Object(l.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.$store.state.productsLoaded){e.next=3;break}return e.next=3,t.$store.dispatch("loadProducts");case 3:if(t.$store.state.articlesLoaded){e.next=6;break}return e.next=6,t.$store.dispatch("loadArticles");case 6:t.productsArray=t.$store.state.products.filter((function(p){return!A.has(String(p.type_id))})).map((function(p){return{id:p.id,title:p.brand+" "+p.title,type_id:p.type_id,path:p.path,photo:p.photo,type:"product",category:t.getProdTypeName(p.type_id),priceLabel:p.pvp_eur?t.$t("price_card.from_price",{price:Number(p.pvp_eur).toLocaleString(m.loc_code,{minimumFractionDigits:2,maximumFractionDigits:2})}):t.$t("price_card.no_price"),search:t.plainText(p.brand+" "+p.title),prioritySearch:t.plainText(p.brand)}})),t.articlesArray=t.$store.state.articles.map((function(a){return{id:a.id,title:a.title,type_id:a.type_id,path:a.path,photo:a.photo,type:"article",search:t.plainText(a.title)}})),t.localFallbackReady=!0;case 9:case"end":return e.stop()}}),e)})))()),this.localFallbackPromise)},onArticleImgError:function(t){var img=t.target;img.src=r(685),img.classList.add("finder-item-img--fallback")},setGTMCustomEvent:function(data){clearTimeout(this.searchAnalyticsTimer);var t=data.target?data.target.value:data.cards_enlace_texto?data.cards_enlace_texto:data.lista_enlace_titulo?data.lista_enlace_titulo:data.title,e=data.target?"query":data.cards_enlace_texto?"promocion-card":data.lista_enlace_titulo?"promocion-link":"sugerencia";window.dataLayer&&window.dataLayer.push((function(){this.reset()})),this.$gtm&&this.$gtm.push({event:"ClickFinder",query:t,origen:"finder",tipo:e});var r=data.target?data.target.value||null:data._query||this.query||null,n=data.type?this.filteredSuggestionsArray.indexOf(data):-1;this.pendingClickData={search_term:r,tipo:e,item_id:data.id||null,item_type:data.target?null:data.type||null,item_title:data.title||data.cards_enlace_texto||data.lista_enlace_titulo||null,item_path:data.path||data.cards_enlace_link||data.lista_enlace_link||null,position:n>=0?n+1:null,time_open_ms:Date.now()-this.finderOpenedAt}},pushSessionEvent:function(){if(this.finderSessionId&&(null!==this.pendingClickData||null!==this.lastLoggedSearchTerm)){clearTimeout(this.searchAnalyticsTimer);var t=this.pendingClickData;window.dataLayer&&window.dataLayer.push((function(){this.reset()})),this.$gtm&&this.$gtm.push({event:"FinderSession",outcome:t?"click":"abandon",search_term:t?t.search_term:this.lastLoggedSearchTerm,tipo:t?t.tipo:null,item_id:t?t.item_id:null,item_type:t?t.item_type:null,item_title:t?t.item_title:null,item_path:t?t.item_path:null,position:t?t.position:null,time_open_ms:t?t.time_open_ms:Date.now()-this.finderOpenedAt,products_count:this.lastSearchCounts.products,articles_count:this.lastSearchCounts.articles,total_results:this.lastSearchCounts.products+this.lastSearchCounts.articles,search_refinements:this.searchRefinementCount,active_tab:this.activeTab,session_id:this.finderSessionId,user_id:this.userId,user_id_type:this.userIdType,device_type:this.deviceType}),this.finderSessionId=null}},getUserId:function(){var t,e,r;if(null!==(t=this.$auth)&&void 0!==t&&t.loggedIn&&null!==(e=this.$auth.user)&&void 0!==e&&e.id)return{id:String(this.$auth.user.id),type:"authenticated"};var n=document.cookie.split("; ").find((function(t){return t.startsWith("_ga=")})),o=(null==n||null===(r=n.split("=")[1])||void 0===r?void 0:r.split(".").slice(2).join("."))||null;if(o)return{id:o,type:"ga_cookie"};
1var l="finder_anon_id",c=localStorage.getItem(l);return c||(c=crypto.randomUUID(),localStorage.setItem(l,c)),{id:c,type:"anonymous"}},askAI:function(){var t=this.hasQuery?this.query.trim():this.aiSuggestionText;this.setGTMCustomEvent({title:this.aiSuggestionText,type:"ask-ai-suggestion",_query:t}),this.closeFinder(),this.$router.push({path:"/chat",query:{q:t}})},navigateOrClose:function(t){var e=this.$route.path===t;this.closeFinderDelayed(),e||this.$router.push(t)},closeFinderDelayed:function(){var t=this;setTimeout((function(){return t.closeFinder()}),200)},findItem:function(t){if("product"===t.type){var e=t.path.match(/^\/json\/products\/([0-9]+)(.+?)index.json$/),r=Object.values(m.contents.product_types).find((function(p){return p.id===t.type_id}))||Object.values(m.contents.product_types_marketplaces).find((function(p){return p.id===t.type_id}));if(r&&e){var n="/".concat(r.paths.home).concat(e[2]);this.navigateOrClose(n)}}else if("15"===t.type_id){var o=t.path.match(/^\/json\/articles\/(.+?)index.json$/),l="/".concat(m.contents.articles.all.paths.home,"/").concat(o[1]);this.navigateOrClose(l)}else if("60"===t.type_id){var c=t.path.match(/^\/json\/galleries\/(.+?)index.json$/),d="/".concat(m.contents.galleries.all.paths.home,"/").concat(c[1]);this.navigateOrClose(d)}},setFocus:function(){this.$refs.productfinder.$refs.input.focus()},scrollResultsToTop:function(){if(this.$el&&this.$el.querySelector){var t=this.$el.querySelector("#productfinder .vbt-autcomplete-list");t&&(t.scrollTop=0);var e=this.$el.querySelector(".finder-list");e&&(e.scrollTop=0)}},growResults:function(){return this.renderLimit<this.renderableCount&&(this.renderLimit=Math.min(this.renderLimit+S,this.renderableCount),!0)},ensureListFilled:function(){if(this.$el&&this.$el.querySelector){var t=this.$el.querySelector("#productfinder .vbt-autcomplete-list");t&&t.offsetParent&&(t.scrollHeight>t.clientHeight+8||(this.growResults()?this.$nextTick(this.ensureListFilled):this.autoFillTries>=3||(this.autoFillTries++,this.loadMoreResults())))}},onResultsScroll:function(t){var e=t.target;e.classList&&e.classList.contains("vbt-autcomplete-list")&&(e.scrollTop+e.clientHeight<e.scrollHeight-200||(this.autoFillTries=0,this.growResults()||this.loadMoreResults()))},scheduleListMaxHeight:function(){var t=this;this.listMaxHeightFrame||(this.listMaxHeightFrame=requestAnimationFrame((function(){t.listMaxHeightFrame=null,t.updateListMaxHeight()})))},updateListMaxHeight:function(){var t=this.$el.querySelector&&this.$el.querySelector("#productfinder .vbt-autcomplete-list"),e=this.$el.querySelector&&this.$el.querySelector(".finder"),r=this.$el.querySelector&&this.$el.querySelector(".finder-toolbar");if(t&&e&&r){if(t.offsetParent){var n=r.getBoundingClientRect().bottom-t.offsetParent.getBoundingClientRect().top+8;t.style.top="".concat(Math.round(n),"px")}var o=this.$el.querySelector(".finder-bottom-bar"),l=o?o.getBoundingClientRect().top:e.getBoundingClientRect().bottom,c=l-t.getBoundingClientRect().top;t.style.maxHeight=c>0?"".concat(Math.floor(c),"px"):"";var d=this.$el.querySelector(".finder-list");if(d){var h=l-d.getBoundingClientRect().top;d.style.maxHeight=h>0?"".concat(Math.floor(h),"px"):""}}},onAskAiMouseMove:function(t){var rect=t.currentTarget.getBoundingClientRect(),e=(t.clientX-rect.left)/rect.width*100,r=(t.clientY-rect.top)/rect.height*100;t.currentTarget.style.setProperty("--btn-ai-x","".concat(e,"%")),t.currentTarget.style.setProperty("--btn-ai-y","".concat(r,"%"))},onAskAiMouseLeave:function(t){t.currentTarget.style.setProperty("--btn-ai-x","50%"),t.currentTarget.style.setProperty("--btn-ai-y","50%")},closeFinder:function(){this.canClose?(this.pushSessionEvent(),this.hideModal=!0):this.pendingClickData=null},taSearch:function(){var t=this;clearTimeout(this.debounceTimer),clearTimeout(this.searchAnalyticsTimer),clearTimeout(this.settleTimer),this.query.length<this.lastQueryLength&&(this.hasDeletedSinceLastLog=!0),this.lastQueryLength=this.query.length;var e=this.query.trim();if(e.length<=1)return this.abortController&&this.abortController.abort(),this.loadMoreController&&this.loadMoreController.abort(),this.lastQuery="",this.isSearching=!1,void(this.isLoadingMore=!1);e!==this.lastQuery&&(this.suggestionsArray.length>0&&(this.isSearching=!0),this.debounceTimer=setTimeout((function(){t.lastQuery=e,t.$config.meilisearchHost?t.meiliSearch(e):t.localSearch(e)}
1),150),this.searchAnalyticsTimer=setTimeout((function(){null!==t.pendingClickData||t.query.length<2||t.query===t.lastLoggedSearchTerm||(!(null===t.lastLoggedSearchTerm)&&t.hasDeletedSinceLastLog&&t.searchRefinementCount++,t.hasDeletedSinceLastLog=!1,t.lastLoggedSearchTerm=t.query,window.dataLayer&&window.dataLayer.push((function(){this.reset()})),t.$gtm&&t.$gtm.push({event:"FinderSearchQuery",search_term:t.query,products_count:t.lastSearchCounts.products,articles_count:t.lastSearchCounts.articles,total_results:t.lastSearchCounts.products+t.lastSearchCounts.articles,session_id:t.finderSessionId,user_id:t.userId,user_id_type:t.userIdType,device_type:t.deviceType}))}),800))},buildProductQuery:function(t,e,r){var n={indexUid:r,q:t.q,sort:t.sort,matchingStrategy:t.matchingStrategy,limit:k,offset:e,attributesToRetrieve:t.productAttributes,attributesToHighlight:["title","brand"],showRankingScore:!0,showRankingScoreDetails:!0,highlightPreTag:"<strong>",highlightPostTag:"</strong>",hybrid:{semanticRatio:t.semanticRatio,embedder:"default"}};return t.filter&&(n.filter=t.filter),n},buildArticleQuery:function(t,e,r){return{indexUid:r,q:t.q,sort:["visits:desc"],matchingStrategy:"frequency",hybrid:{semanticRatio:t.articleSemanticRatio,embedder:"default"},limit:k,offset:e,attributesToRetrieve:["id","type_id","title","path","photo","reading_time"],showRankingScoreDetails:!0,attributesToHighlight:["title"],highlightPreTag:"<strong>",highlightPostTag:"</strong>"}},buildCountQuery:function(t){return x(x({},t),{},{limit:0,offset:0,hybrid:{semanticRatio:0,embedder:"default"},attributesToRetrieve:[],attributesToHighlight:[],showRankingScore:!1,showRankingScoreDetails:!1})},mapProducts:function(t,e,r){var n=this,o=t.filter((function(t){return!A.has(String(t.type_id))}));return Object(v.h)(o,{priceSort:e.priceSort,pricePriority:!0,hasQuery:!!e.q}).hits.map((function(t){var o,l;return{id:t.id,title:(t.brand?t.brand+" ":"")+t.title,htmlTitle:(null!==(o=t._formatted)&&void 0!==o&&o.brand?t._formatted.brand+" ":"")+((null===(l=t._formatted)||void 0===l?void 0:l.title)||t.title),type_id:t.type_id,path:t.path,photo:Object(v.e)(t,e.color),type:"product",category:n.getProdTypeNameBySurface(t.type_id,Object(v.b)(t)),priceLabel:t.pvp_eur?n.$t("price_card.from_price",{price:Number(t.pvp_eur).toLocaleString(m.loc_code,{minimumFractionDigits:2,maximumFractionDigits:2})}):n.$t("price_card.no_price"),_query:r}}))},mapArticles:function(t,e,r){return Object(v.c)(t,!!e.q).map((function(article){var t;return{id:article.id,title:article.title,htmlTitle:(null===(t=article._formatted)||void 0===t?void 0:t.title)||article.title,type_id:article.type_id,path:article.path,photo:article.photo,type:"article",readingTime:article.reading_time,_query:r}}))},meiliSearch:function(t){var e=this;return Object(l.a)(regeneratorRuntime.mark((function r(){var o,l,d,h,f,m,y,_,C,T,x,A,w,L,$,O,R,M,D,F,j,P,I,H,E,Q,z,B;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e.abortController&&e.abortController.abort(),e.loadMoreController&&(e.loadMoreController.abort(),e.loadMoreController=null),e.isLoadingMore=!1,e.abortController=new AbortController,o=e.abortController.signal,l=e.$config.meilisearchHost,d=e.$config.id,h={apiKey:e.$config.meilisearchApiKey,signal:o},f=Object(v.a)(d),m=f.products,y=f.articles,r.prev=9,T=(e.$config.locale||"es").split("_")[0],x=Object(v.f)(t,T),A=e.buildProductQuery(x,0,m),w=e.buildArticleQuery(x,0,y),r.next=16,Object(v.d)(l,[A,w,e.buildCountQuery(A),e.buildCountQuery(w)],h);case 16:L=r.sent,$=Object(c.a)(L,4),O=$[0],R=void 0===O?{}:O,M=$[1],D=void 0===M?{}:M,F=$[2],j=void 0===F?{}:F,P=$[3],I=void 0===P?{}:P,H=R.hits||[],E=D.hits||[],Q=e.mapProducts(H,x,t),z=e.mapArticles(E,x,t),e.searchPlan={plan:x,query:t,productsIndex:m,articlesIndex:y},e.productsOffset=H.length,e.articlesOffset=E.length,e.productsDone=H.length<k||!Q.length,e.articlesDone=E.length<k||!z.length,e.suggestionsArray=[].concat(Object(n.a)(Q),Object(n.a)(z)),e.renderLimit=S,e.autoFillTries=0,e.lastSearchCounts={products:e.productsDone?Q.length:null!==(_=j.estimatedTotalHits)&&void 0!==_?_:Q.length,articles:e.articlesDone?z.length:null!==(C=I.estimatedTotalHits)&&void 0!==C?C:z.length},e.isSearching=!1,e.$nextTick((function(){e.scrollResultsToTop(),e.ensureListFilled()})),B=[],e.productsDone||B.push("product"),e.articlesDone||B.push("article"),B.length&&(clearTimeout(e.settleTimer),e.settleTimer=setTimeout((function(){return e.settleCounts(B)}),350)),r.next=53;break;case 47:if(r.prev=47,r.t0=r.catch(9),"AbortError"===r.t0.name){r.next=53;break}return r.next=52,e.ensureLocalFallback();case 52:e.localSearch(t);case 53:case"end":return r.stop()}}),r,null,[[9,47]])})))()},fetchPage:function(t,e){var r=this;return Object(l.a)(regeneratorRuntime.mark((function o(){var l,d,h,f,m,y,_,C,T,x,S,A,w,L,$,O;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return l="product"===t,d=r.searchPlan,h=d.plan,f=d.query,m=d.productsIndex,y=d.articlesIndex,_=l?r.productsOffset:r.articlesOffset,C=l?r.buildProductQuery(h,_,m):r.buildArticleQuery(h,_,y),o.next=6,Object(v.d)(r.$config.meilisearchHost,[C],{apiKey:r.$config.meilisearchApiKey,signal:e});case 6:return T=o.sent,x=Object(c.a)(T,1),S=x[0],A=(void 0===S?{}:S).hits||[],w=l?r.mapProducts(A,h,f):r.mapArticles(A,h,f),L=A.length<k||!w.length,l?(r.productsOffset+=A.length,r.productsDone=L):(r.articlesOffset+=A.length,r.articlesDone=L),w.length&&($=r.suggestionsArray.filter((function(t){return"product"===t.type})),O=r.suggestionsArray.filter((function(t){return"article"===t.type})),l?$.push.apply($,Object(n.a)(w)):O.push.apply(O,Object(n.a)(w)),r.suggestionsArray=[].concat(Object(n.a)($),Object(n.a)(O))),o.abrupt("return",w.length);case 16:case"end":return o.stop()}}),o)})))()},pickLoadMoreType:function(){return"article"===this.activeTab||this.productsDone?"product"===this.activeTab||this.articlesDone?null:"article":"product"},loadMoreResults:function(){var t=this;return Object(l.a)(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.isLoadingMore&&t.searchPlan){e.next=2;break}return e.abrupt("return");case 2:if(r=t.pickLoadMoreType()){e.next=5;break}return e.abrupt("return");case 5:return t.isLoadingMore=!0,t.loadMoreController=new AbortController,e.prev=7,e.next=10,t.fetchPage(r,t.loadMoreController.signal);case 10:t.renderLimit+=S,t.productsDone&&(t.lastSearchCounts.products=t.suggestionsArray.filter((function(t){return"product"===t.type})).length),t.articlesDone&&(t.lastSearchCounts.articles=t.suggestionsArray.filter((function(t){return"article"===t.type})).length),t.isLoadingMore=!1,t.$nextTick(t.ensureListFilled),e.next=21;break;case 17:e.prev=17,e.t0=e.catch(7),t.isLoadingMore=!1,"AbortError"!==e.t0.name&&(t.productsDone=t.articlesDone=!0);case 21:case"end":return e.stop()}}),e,null,[[7,17]])})))()},settleCounts:function(t){var e=this;return Object(l.a)(regeneratorRuntime.mark((function r(){var n,o,l,c;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:10,n=e.abortController.signal,e.isLoadingMore=!0,r.prev=3,o=_(t),r.prev=5,c=regeneratorRuntime.mark((function t(){var r,o,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=l.value,o=function(){return"product"===r?e.productsDone:e.articlesDone},c=0;case 3:if(!(c<10)||o()){t.next=12;break}return t.next=6,e.fetchPage(r,n);case 6:if(!(t.sent>=40)){t.next=9;break}return t.abrupt("break",12);case 9:c++,t.next=3;break;case 12:case"end":return t.stop()}}),t)})),o.s();case 8:if((l=o.n()).done){r.next=12;break}return r.delegateYield(c(),"t0",10);case 10:r.next=8;break;case 12:r.next=17;break;case 14:r.prev=14,r.t1=r.catch(5),o.e(r.t1);case 17:return r.prev=17,o.f(),r.finish(17);case 20:r.next=25;break;case 22:r.prev=22,r.t2=r.catch(3),"AbortError"!==r.t2.name&&(e.productsDone=e.articlesDone=!0);case 25:if(e.isLoadingMore=!1,!n.aborted){r.next=28;break}return r.abrupt("return");case 28:e.lastSearchCounts={products:e.productsDone?e.suggestionsArray.filter((function(t){return"product"===t.type})).length:e.lastSearchCounts.products,articles:e.articlesDone?e.suggestionsArray.filter((function(t){return"article"===t.type})).length:e.lastSearchCounts.articles},e.$nextTick(e.ensureListFilled);case 30:case"end":return r.stop()}}),r,null,[[3,22],[5,14,17,20]])})))()},localSearch:function(t){var e=this.plainText(t);if(!e)return this.suggestionsArray=[].concat(this.productsArray,this.articlesArray),this.lastSearchCounts={products:this.productsArray.length,articles:this.articlesArray.length},void(this.productsDone=this.articlesDone=!0);
1var r=[].concat(this.productsArray.filter((function(t){return t.prioritySearch===e})),this.productsArray.filter((function(t){return t.prioritySearch!==e&&t.search.indexOf(e)>-1}))),n=this.articlesArray.filter((function(article){return article.search.indexOf(e)>-1}));this.suggestionsArray=[].concat(r,n),this.renderLimit=S,this.lastSearchCounts={products:r.length,articles:n.length},this.searchPlan=null,this.productsDone=this.articlesDone=!0,this.isSearching=!1,this.$nextTick(this.scrollResultsToTop)},plainText:function(text){return"ãà áäâẽèéëêìÃïîõòóöôùúüûñç·/_,:;".split("").forEach((function(t,i){text=text.replace(new RegExp(t,"g"),"aaaaaeeeeeiiiiooooouuuunc------".charAt(i))})),text.toString().toLowerCase().trim().replace(/\s+/g,"-").replace(/&/g,"-y-").replace(/[^\w-]+/g,"").replace(/--+/g,"-")}}},L=(r(1412),r(5)),component=Object(L.a)(w,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"finder-mobile",appear:""},on:{"after-leave":function(e){return t.$emit("closeFinder")}}},[t.hideModal?t._e():n("div",{staticClass:"AppFnd-overlay",on:{click:function(e){return e.target!==e.currentTarget?null:t.closeFinder()}}},[n("div",{staticClass:"AppFnd finder"},[n("div",{staticClass:"d-flex justify-content-between w-100 align-items-center flex-gap-3"},[n("div",{staticClass:"searchbar d-flex align-items-center flex-gap-2"},[n("div",{staticClass:"searchbar-field flex-grow-1",on:{"!keydown":function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab"))return null;e.stopPropagation()}}},[n("vue-typeahead-bootstrap",{ref:"productfinder",staticClass:"productfinder",attrs:{id:"productfinder",data:t.filteredSuggestionsArray,serializer:function(s){return s._query?t.query:s.title},placeholder:t.$t("module_finder.placeholder"),"max-matches":t.visibleLimit,"disable-sort":""},on:{keyup:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.setGTMCustomEvent(e),t.closeFinder(),t.findText(e)},input:t.taSearch},scopedSlots:t._u([{key:"suggestion",fn:function(e){var data=e.data,r=e.htmlText;return["product"===data.type?n("div",{staticClass:"finder-item item-product",on:{click:function(e){t.tapFinderItem(e),t.findItem(data),t.setGTMCustomEvent(data)}}},[n("img",{staticClass:"imageboot finder-item-img",attrs:{loading:"lazy",decoding:"async",width:"94",height:"64",src:""+data.photo.src,alt:""+data.title}}),t._v(" "),n("div",{staticClass:"finder-item-info"},[n("span",{staticClass:"finder-item-title",domProps:{innerHTML:t._s(data.htmlTitle||r)}}),t._v(" "),data.category||data.priceLabel?n("span",{staticClass:"finder-item-meta"},[t._v(t._s([data.category,data.priceLabel].filter(Boolean).join(" · ")))]):t._e()])]):"article"===data.type?n("div",{staticClass:"finder-item item-article",on:{click:function(e){t.tapFinderItem(e),t.findItem(data),t.setGTMCustomEvent(data)}}},[n("img",{staticClass:"imageboot finder-item-img",attrs:{loading:"lazy",decoding:"async",width:"94",height:"64",src:""+data.photo.src,alt:data.title},on:{error:t.onArticleImgError}}),t._v(" "),n("div",{staticClass:"finder-item-info"},[n("span",{staticClass:"finder-item-title",domProps:{innerHTML:t._s(data.htmlTitle||r)}}),t._v(" "),n("span",{staticClass:"finder-item-meta"},[t._v("\n "+t._s(t.$t("index.article"))+"\n "),data.readingTime?[t._v(" · "+t._s(t.$t("index.reading_time",{min:data.readingTime})))]:t._e()],2)])]):t._e()]}}],null,!1,720197163),model:{value:t.query,callback:function(e){t.query=e},expression:"query"}}),t._v(" "),t.showRunneaAI?n("nuxt-link",{staticClass:"btn-ask-ai d-none d-lg-flex",attrs:{to:"/chat"},nativeOn:{mousemove:function(e){return t.onAskAiMouseMove.apply(null,arguments)},mouseleave:function(e){return t.onAskAiMouseLeave.apply(null,arguments)},click:function(e){t.setGTMCustomEvent({title:t.$t("module_finder.ask_ai"),type:"ask-ai-header"}),t.closeFinder()}}},[n("span",{staticClass:"btn-ask-ai-content"},[n("b-img",{attrs:{src:r(361),width:"14",height:"14"}}),t._v(" "),n("span",{domProps:{innerHTML:t._s(t.askAiLabelHtml)}})],1)]):t._e(),t._v(" "),n("button",{staticClass:"finder-close",attrs:{type:"button","aria-label":t.$t("ProductHeaderButtons.close")},on:{click:function(e){return t.closeFinder()}}},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"16",viewBox:"0 0 14 14"}},[n("g",{attrs:{fill:"none","fill-rule":"evenodd",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5"}},[n("path",{attrs:{d:"M13 1L1 13M13 13L1 1"}}
1)])])])],1)])]),t._v(" "),n("div",{staticClass:"sugerencias row"},[n("div",{staticClass:"col-12"},[n("div",{staticClass:"finder-toolbar d-flex justify-content-between align-items-center flex-wrap flex-gap-2"},[n("h5",{staticClass:"finder-toolbar-title"},[t.isTrendingView?n("b-img",{staticClass:"trend-icon",attrs:{src:r(690),height:"16",width:"16"}}):t._e(),t._v(" "),t.isTrendingView?n("span",{staticClass:"finder-toolbar-text"},[t._v(t._s(t.suggestions.cards_titulo))]):n("span",{staticClass:"finder-toolbar-parts"},[n("span",{staticClass:"finder-toolbar-prefix"},[t._v(t._s(t.resultsCountParts.before))]),t._v(" "),n("span",{staticClass:"finder-toolbar-query"},[t._v(t._s(t.query.trim()))]),t._v(" "),t.resultsCountParts.after?n("span",{staticClass:"finder-toolbar-suffix"},[t._v(t._s(t.resultsCountParts.after))]):t._e()]),t._v(" "),n("span",{staticClass:"finder-loading",style:{visibility:t.isSearching||t.isLoadingMore?"visible":"hidden"},attrs:{"aria-hidden":"true"}})],1),t._v(" "),t.isTrendingView?t._e():n("div",{staticClass:"finder-tabs"},t._l(t.tabs,(function(e){return n("button",{key:e.key,staticClass:"finder-tab",class:{active:t.activeTab===e.key},attrs:{type:"button"},on:{click:function(r){t.activeTab=e.key}}},[t._v("\n "+t._s(e.label)+"\n ")])})),0)]),t._v(" "),t.noResultsForActiveTab?n("p",{staticClass:"finder-empty"},[t._v("\n "+t._s(t.$t("module_finder.no_results_tab",{type:t.activeTabLabel,query:t.query}))+"\n ")]):t._e(),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.isSearching&&(t.query.length<=1||!t.suggestionsArray.length),expression:"!isSearching && (query.length <= 1 || !suggestionsArray.length)"}],staticClass:"list-group finder-list"},t._l(t.filteredCards,(function(e,i){return n("nuxt-link",{key:i,staticClass:"list-group-item finder-item",attrs:{to:e.cards_enlace_link,title:e.cards_enlace_texto},nativeOn:{click:function(r){t.tapFinderItem(r),t.setGTMCustomEvent(e),t.closeFinderDelayed()}}},[n("div",{staticClass:"sr-only"},[t._v("\n "+t._s(e.cards_enlace_texto)+"\n ")]),t._v(" "),n("div",{staticClass:"finder-item d-flex w-100 flex-gap-2 align-items-center",attrs:{"aria-hidden":"true"}},[n("img",{staticClass:"imageboot finder-item-img",attrs:{loading:"lazy",src:e.cards_enlace_src.src,alt:e.cards_enlace_texto}}),t._v(" "),n("div",{staticClass:"finder-item-info"},[n("span",{staticClass:"finder-item-title"},[t._v(t._s(e.cards_enlace_texto))])])])])})),1)])]),t._v(" "),t.showRunneaAI?n("div",{staticClass:"finder-bottom-bar"},[n("hr",{staticClass:"finder-divider"}),t._v(" "),n("div",{staticClass:"finder-ai-suggestion d-flex align-items-center flex-gap-2",on:{click:t.askAI}},[n("b-img",{attrs:{src:r(361),width:"16",height:"16"}}),t._v(" "),n("i18n",{staticClass:"finder-ai-suggestion-text",attrs:{path:t.aiSuggestionKey,tag:"div"}},[n("span",{staticClass:"finder-ai-suggestion-query",attrs:{slot:"query"},slot:"query"},[t._v(t._s(t.aiQuery))])])],1)]):t._e()])])])}),[],!1,null,null,null);e.default=component.exports}}]); 2//# sourceMappingURL=ad2eec3.js.map
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.