var QuerySuggestionsComponent=function(n){return function(t,i){var f=this,r=t,u=i;this.GetQuerySuggestions=function(t){n(".js-coveo-query-suggestions-list").empty();n.get(r.restEndpointUri+"/querySuggest?sitecoreItemUri="+r.itemUri+"&siteName="+r.siteName+"&q="+(t||"")+"&authentication&searchHub=search",function(){let t=n("
<\/ul>");if(arguments.length>1&&arguments[0]&&arguments[1]==="success"){let i=arguments[0].completions;if(!i)return;i.some(function(i,f){let e=n("- <\/li>");e.addClass("js-query-suggestion");e.on("click",function(){u(i.expression)});return e.html(i.highlighted.replace(/\{(.*?)\}/g,'$1<\/span>').replace(/[\[\]]/g,"")),t.append(e),f<\/li>");i.addClass("js-query-suggestion");i.text(r.noQuerySuggestionsMessage);t.append(i)}n(".js-coveo-query-suggestions-list").append(t)})}}}(jQuery);(function(n,t,i){t.coveo=t.coveo||{};t.coveo.parseAdvancedQueryExpressions=function(n,t){if(n&&t)try{let i=JSON.parse(t);i&&(i.aq&&r(i.aq,n.advancedExpression),i.dq&&r(i.dq,n.disjunctionExpression))}catch(i){console.error(i)}};var u=function(n){var t=Array.isArray(n.value)?'("'+n.value.join('","')+'")':n.value;return"$qre(expression:'"+i.Context.fields.toCoveo(n.field)+n.op+t+"',modifier:'"+n.boost+"')"},f=function(n){return"$qrf(expression:'"+n.expression.replace(n.field,i.Context.fields.toCoveo(n.field))+"',normalizeWeight:"+n.normalizeWeight+")"},r=function(n,t){n&&(console.log(n),n.parts&&(Array.isArray(n.parts)?n.parts:[n.parts]).forEach(function(n){n.field&&n.op&&n.value?n.op==="!="||n.op==="<>"||n.op==="ne"?t.addFieldNotEqualExpression(i.Context.fields.toCoveo(n.field),n.value):t.addFieldExpression(i.Context.fields.toCoveo(n.field),n.op,n.value):console.warn("JSON value for AQ is invalid. Expected following properties: field, op, value. Received: "+n)}),n.qre&&(Array.isArray(n.qre)?n.qre:[n.qre]).forEach(function(n){n.field&&n.op&&n.value&&n.boost?t.add(u(n)):console.warn("JSON value for QRE is invalid. Expected following properties: field, op, value, boost. Received: "+n)}),n.qrf&&(Array.isArray(n.qrf)?n.qrf:[n.qrf]).forEach(function(n){n.field&&n.expression&&n.normalizeWeight?t.add(f(n)):console.warn("JSON value for QRF is invalid. Expected following properties: field, expression, normalizeWeight. Received: "+n)}))}})(jQuery,91¾ÅÉ«ÊÓƵ=91¾ÅÉ«ÊÓƵ||{},CoveoForSitecore)